ToplevelLayout#
- class ToplevelLayout(**kwargs)#
Contains information that is necessary to present a sovereign window on screen.
The GdkToplevelLayout struct is necessary for using
present.
Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc).
Constructors#
- class ToplevelLayout
- classmethod new() ToplevelLayout#
Create a toplevel layout description.
Used together with
presentto describe how a toplevel surface should be placed and behave on-screen.The size is in ”application pixels”, not ”device pixels” (see
get_scale).
Methods#
- class ToplevelLayout
- equal(other: ToplevelLayout) bool#
Check whether
layoutandotherhas identical layout properties.- Parameters:
other – another toplevel layout
- get_fullscreen() tuple[bool, bool]#
If the layout specifies whether to the toplevel should go fullscreen, the value pointed to by
fullscreenis set to true if it should go fullscreen, or false, if it should go unfullscreen.
- get_fullscreen_monitor() Monitor | None#
Returns the monitor that the layout is fullscreening the surface on.
- get_maximized() tuple[bool, bool]#
If the layout specifies whether to the toplevel should go maximized, the value pointed to by
maximizedis set to true if it should go maximized, or false, if it should go unmaximized.
- set_fullscreen(fullscreen: bool, monitor: Monitor | None = None) None#
Sets whether the layout should cause the surface to be fullscreen when presented.
- Parameters:
fullscreen – true to fullscreen the surface
monitor – the monitor to fullscreen on