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
layout
andother
has 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
fullscreen
is set toTrue
if 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
maximized
is set toTrue
if 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 –
True
to fullscreen the surfacemonitor – the monitor to fullscreen on