Interface Native

All Superinterfaces:
Proxy
All Known Subinterfaces:
Root
All Known Implementing Classes:
AboutDialog, AboutWindow, AppChooserDialog, ApplicationWindow, ApplicationWindow, Assistant, ColorChooserDialog, Dialog, DragIcon, EmojiChooser, FileChooserDialog, FontChooserDialog, MessageDialog, MessageDialog, Native.Native$Impl, PageSetupUnixDialog, Popover, PopoverMenu, PreferencesWindow, PrintUnixDialog, Root.Root$Impl, ShortcutsWindow, Window, Window

@Generated("org.javagi.JavaGI") public interface Native extends Proxy

An interface for widgets that have their own Surface.

The obvious example of a GtkNative is GtkWindow.

Every widget that is not itself a GtkNative is contained in one, and you can get it with Widget.getNative().

To get the surface of a GtkNative, use getSurface(). It is also possible to find the GtkNative to which a surface belongs, with getForSurface(Surface).

In addition to a Surface, a GtkNative also provides a Renderer for rendering on that surface. To get the renderer, use getRenderer().

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    The Native$Impl type represents a native instance of the Native interface.
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable Native
    Finds the GtkNative associated with the surface.
    default @Nullable Renderer
    Returns the renderer that is used for this GtkNative.
    default @Nullable Surface
    Returns the surface of this GtkNative.
    default void
    Retrieves the surface transform of self.
    static @Nullable Type
    Get the GType of the Native class.
    default void
    Realizes a GtkNative.
    default void
    Unrealizes a GtkNative.

    Methods inherited from interface Proxy

    handle
  • Method Details

    • getType

      static @Nullable Type getType()
      Get the GType of the Native class.
      Returns:
      the GType
    • getForSurface

      static @Nullable Native getForSurface(Surface surface)
      Finds the GtkNative associated with the surface.
      Parameters:
      surface - a GdkSurface
      Returns:
      the GtkNative that is associated with surface
    • getRenderer

      default @Nullable Renderer getRenderer()
      Returns the renderer that is used for this GtkNative.
      Returns:
      the renderer for this Native
    • getSurface

      default @Nullable Surface getSurface()
      Returns the surface of this GtkNative.
      Returns:
      the surface of this Native
    • getSurfaceTransform

      default void getSurfaceTransform(Out<Double> x, Out<Double> y)

      Retrieves the surface transform of self.

      This is the translation from self's surface coordinates into self's widget coordinates.

      Parameters:
      x - return location for the x coordinate
      y - return location for the y coordinate
    • realize

      default void realize()

      Realizes a GtkNative.

      This should only be used by subclasses.

    • unrealize

      default void unrealize()

      Unrealizes a GtkNative.

      This should only be used by subclasses.