ToplevelLayout#
- class ToplevelLayout(**kwargs)#
The GdkToplevelLayout struct 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
present()to describe how a toplevel surface should be placed and behave on-screen.The size is in ”application pixels”, not ”device pixels” (see
get_scale_factor()).
Methods#
- class ToplevelLayout
- equal(other: ToplevelLayout) bool#
Check whether
layoutandotherhas identical layout properties.- Parameters:
other – another
GdkToplevelLayout
- get_fullscreen() tuple[bool, bool]#
If the layout specifies whether to the toplevel should go fullscreen, the value pointed to by
fullscreenis set toTrueif it should go fullscreen, orFalse, 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 toTrueif it should go fullscreen, orFalse, 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 –
Trueto fullscreen the surfacemonitor – the monitor to fullscreen on