Class WindowHandle

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") public class WindowHandle extends Widget implements Accessible, Buildable, ConstraintTarget

Implements titlebar functionality for a window.

When added into a window, it can be dragged to move the window, and it implements the right click, double click and middle click behaviors that are expected of a titlebar.

CSS nodes

GtkWindowHandle has a single CSS node with the name windowhandle.

Accessibility

Until GTK 4.10, GtkWindowHandle used the Gtk.AccessibleRole.group role.

Starting from GTK 4.12, GtkWindowHandle uses the Gtk.AccessibleRole.generic role.

  • Constructor Details

    • WindowHandle

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

      public WindowHandle()
      Create a new WindowHandle.
  • Method Details

    • getType

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

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

      protected WindowHandle asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • getChild

      public @Nullable Widget getChild()
      Gets the child widget of self.
      Returns:
      the child widget of this WindowHandle
    • setChild

      public void setChild(@Nullable Widget child)
      Sets the child widget of self.
      Parameters:
      child - the child widget
    • builder

      public static WindowHandle.Builder<? extends WindowHandle.Builder> builder()
      A WindowHandle.Builder object constructs a WindowHandle with the specified properties. Use the various set...() methods to set properties, and finish construction with WindowHandle.Builder.build().
      Returns:
      the builder object