Class ToplevelLayout

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gdk.ToplevelLayout
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ToplevelLayout extends ProxyInstance

Contains information that is necessary to present a sovereign window on screen.

The GdkToplevelLayout struct is necessary for using Toplevel.present(ToplevelLayout).

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

  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a toplevel layout description.
    Create a ToplevelLayout proxy instance for the provided memory address.
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a new GdkToplevelLayout and copy the contents of this ToplevelLayout into it.
    boolean
    Check whether this ToplevelLayout and other has identical layout properties.
    boolean
    getFullscreen(Out<Boolean> 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.
    @Nullable Monitor
    Returns the monitor that the layout is fullscreening the surface on.
    boolean
    getMaximized(Out<Boolean> 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 maximized, or false, if it should go unmaximized.
    The memory layout of the native struct.
    boolean
    Returns whether the layout should allow the user to resize the surface.
    static @Nullable Type
    Get the GType of the ToplevelLayout class.
    ref()
    Increases the reference count of layout.
    void
    setFullscreen(boolean fullscreen, @Nullable Monitor monitor)
    Sets whether the layout should cause the surface to be fullscreen when presented.
    void
    setMaximized(boolean maximized)
    Sets whether the layout should cause the surface to be maximized when presented.
    void
    setResizable(boolean resizable)
    Sets whether the layout should allow the user to resize the surface after it has been presented.
    void
    Decreases the reference count of layout.

    Methods inherited from class ProxyInstance

    equals, handle, hashCode

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ToplevelLayout

      public ToplevelLayout(MemorySegment address)
      Create a ToplevelLayout proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ToplevelLayout

      public ToplevelLayout()

      Create a toplevel layout description.

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

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

  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the ToplevelLayout class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • copy

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

      public boolean equal(ToplevelLayout other)
      Check whether this ToplevelLayout and other has identical layout properties.
      Parameters:
      other - another toplevel layout
      Returns:
      true if this ToplevelLayout and other have identical layout properties, otherwise false.
    • getFullscreen

      public boolean getFullscreen(Out<Boolean> 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 this ToplevelLayout specifies the fullscreen state for the toplevel
    • getFullscreenMonitor

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

      public boolean getMaximized(Out<Boolean> 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 maximized, or false, if it should go unmaximized.
      Parameters:
      maximized - set to true if the toplevel should be maximized
      Returns:
      whether the this ToplevelLayout 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 this ToplevelLayout
    • 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.