Gdk.ToplevelLayout

Fields

None

Methods

class

new ()

copy ()

equal (other)

get_fullscreen ()

get_fullscreen_monitor ()

get_maximized ()

get_resizable ()

ref ()

set_fullscreen (fullscreen, monitor)

set_maximized (maximized)

set_resizable (resizable)

unref ()

Details

class Gdk.ToplevelLayout

The GdkToplevelLayout struct contains information that is necessary to present a sovereign window on screen.

The GdkToplevelLayout struct is necessary for using [method`Gdk`.Toplevel.present].

Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc).

classmethod new()[source]
Returns:

newly created instance of GdkToplevelLayout

Return type:

Gdk.ToplevelLayout

Create a toplevel layout description.

Used together with Gdk.Toplevel.present() to describe how a toplevel surface should be placed and behave on-screen.

The size is in ”application pixels”, not ”device pixels” (see Gdk.Surface.get_scale_factor()).

copy()[source]
Returns:

a copy of self.

Return type:

Gdk.ToplevelLayout

Create a new GdkToplevelLayout and copy the contents of self into it.

equal(other)[source]
Parameters:

other (Gdk.ToplevelLayout) – another GdkToplevelLayout

Returns:

True if self and other have identical layout properties, otherwise False.

Return type:

bool

Check whether self and other has identical layout properties.

get_fullscreen()[source]
Returns:

whether the self specifies the fullscreen state for the toplevel

fullscreen:

location to store whether the toplevel should be fullscreen

Return type:

(bool, fullscreen: bool)

If the layout specifies whether to the toplevel should go fullscreen, the value pointed to by fullscreen is set to True if it should go fullscreen, or False, if it should go unfullscreen.

get_fullscreen_monitor()[source]
Returns:

the monitor on which self fullscreens

Return type:

Gdk.Monitor or None

Returns the monitor that the layout is fullscreening the surface on.

get_maximized()[source]
Returns:

whether the self specifies the maximized state for the toplevel

maximized:

set to True if the toplevel should be maximized

Return type:

(bool, maximized: bool)

If the layout specifies whether to the toplevel should go maximized, the value pointed to by maximized is set to True if it should go fullscreen, or False, if it should go unmaximized.

get_resizable()[source]
Returns:

True if the layout is resizable

Return type:

bool

Returns whether the layout should allow the user to resize the surface.

ref()[source]
Returns:

the same self

Return type:

Gdk.ToplevelLayout

Increases the reference count of self.

set_fullscreen(fullscreen, monitor)[source]
Parameters:
  • fullscreen (bool) – True to fullscreen the surface

  • monitor (Gdk.Monitor or None) – the monitor to fullscreen on

Sets whether the layout should cause the surface to be fullscreen when presented.

set_maximized(maximized)[source]
Parameters:

maximized (bool) – True to maximize

Sets whether the layout should cause the surface to be maximized when presented.

set_resizable(resizable)[source]
Parameters:

resizable (bool) – True to allow resizing

Sets whether the layout should allow the user to resize the surface after it has been presented.

unref()[source]

Decreases the reference count of self.