:right-sidebar: True ToplevelLayout =================================================================== .. currentmodule:: gi.repository.Gdk .. class:: ToplevelLayout(**kwargs) :no-contents-entry: The ``GdkToplevelLayout`` struct contains information that is necessary to present a sovereign window on screen. The ``GdkToplevelLayout`` struct is necessary for using :obj:`~gi.repository.Gdk.Toplevel.present`\. Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc). Constructors ------------ .. rst-class:: interim-class .. class:: ToplevelLayout :no-index: .. classmethod:: new() -> ~gi.repository.Gdk.ToplevelLayout Create a toplevel layout description. Used together with :func:`~gi.repository.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 :func:`~gi.repository.Gdk.Surface.get_scale_factor`). Methods ------- .. rst-class:: interim-class .. class:: ToplevelLayout :no-index: .. method:: equal(other: ~gi.repository.Gdk.ToplevelLayout) -> bool Check whether ``layout`` and ``other`` has identical layout properties. :param other: another ``GdkToplevelLayout`` .. method:: get_fullscreen() -> ~typing.Tuple[bool, bool] If the layout specifies whether to the toplevel should go fullscreen, the value pointed to by ``fullscreen`` is set to :const:`True` if it should go fullscreen, or :const:`False`, if it should go unfullscreen. .. method:: get_fullscreen_monitor() -> ~gi.repository.Gdk.Monitor | None Returns the monitor that the layout is fullscreening the surface on. .. method:: get_maximized() -> ~typing.Tuple[bool, bool] If the layout specifies whether to the toplevel should go maximized, the value pointed to by ``maximized`` is set to :const:`True` if it should go fullscreen, or :const:`False`, if it should go unmaximized. .. method:: get_resizable() -> bool Returns whether the layout should allow the user to resize the surface. .. method:: set_fullscreen(fullscreen: bool, monitor: ~gi.repository.Gdk.Monitor | None = None) -> None Sets whether the layout should cause the surface to be fullscreen when presented. :param fullscreen: :const:`True` to fullscreen the surface :param monitor: the monitor to fullscreen on .. method:: set_maximized(maximized: bool) -> None Sets whether the layout should cause the surface to be maximized when presented. :param maximized: :const:`True` to maximize .. method:: set_resizable(resizable: bool) -> None Sets whether the layout should allow the user to resize the surface after it has been presented. :param resizable: :const:`True` to allow resizing