Class ToplevelLayout

All Implemented Interfaces:
PointerInterface

public class ToplevelLayout extends Record
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).

https://docs.gtk.org/gdk4/struct.ToplevelLayout.html

  • Constructor Details

    • ToplevelLayout

      public ToplevelLayout(PointerContainer pointer)
    • ToplevelLayout

      public 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()).
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • copy

      public ToplevelLayout copy()
      Create a new `GdkToplevelLayout` and copy the contents of @layout into it.
      Returns:
      a copy of @layout.
    • equal

      public boolean equal(@Nonnull ToplevelLayout other)
      Check whether @layout and @other has identical layout properties.
      Parameters:
      other - another `GdkToplevelLayout`
      Returns:
      %TRUE if @layout and @other have identical layout properties, otherwise %FALSE.
    • getFullscreen

      public boolean getFullscreen(@Nonnull Int fullscreen)
      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.
      Parameters:
      fullscreen - location to store whether the toplevel should be fullscreen
      Returns:
      whether the @layout specifies the fullscreen state for the toplevel
    • getFullscreenMonitor

      public Monitor getFullscreenMonitor()
      Returns the monitor that the layout is fullscreening
      the surface on.
      Returns:
      the monitor on which @layout fullscreens
    • getMaximized

      public boolean getMaximized(@Nonnull Int maximized)
      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.
      Parameters:
      maximized - set to %TRUE if the toplevel should be maximized
      Returns:
      whether the @layout specifies the maximized state for the toplevel
    • getResizable

      public boolean getResizable()
      Returns whether the layout should allow the user
      to resize the surface.
      Returns:
      %TRUE if the layout is resizable
    • ref

      public ToplevelLayout ref()
      Increases the reference count of @layout.
      Returns:
      the same @layout
    • setFullscreen

      public void setFullscreen(boolean fullscreen, @Nullable Monitor monitor)
      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
    • setMaximized

      public void setMaximized(boolean maximized)
      Sets whether the layout should cause the surface
      to be maximized when presented.
      Parameters:
      maximized - %TRUE to maximize
    • setResizable

      public void setResizable(boolean resizable)
      Sets whether the layout should allow the user
      to resize the surface after it has been presented.
      Parameters:
      resizable - %TRUE to allow resizing
    • unref

      public void unref()
      Decreases the reference count of @layout.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()