Package org.gnome.gtk
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.NativeImpl
,PageSetupUnixDialog
,Popover
,PopoverMenu
,PreferencesWindow
,PrintUnixDialog
,Root.RootImpl
,ShortcutsWindow
,Window
,Window
GtkNative
is the interface implemented by all widgets that have
their own GdkSurface
.
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(org.gnome.gdk.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
Modifier and TypeInterfaceDescriptionstatic class
The NativeImpl type represents a native instance of the Native interface.static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic Native
getForSurface
(Surface surface) Finds theGtkNative
associated with the surface.default Renderer
Returns the renderer that is used for thisGtkNative
.default Surface
Returns the surface of thisGtkNative
.default void
getSurfaceTransform
(Out<Double> x, Out<Double> y) Retrieves the surface transform of this Native.static Type
getType()
Get the GType of the Native classdefault void
realize()
Realizes aGtkNative
.default void
Unrealizes aGtkNative
.
-
Method Details
-
getType
-
getForSurface
-
getRenderer
Returns the renderer that is used for thisGtkNative
.- Returns:
- the renderer for this Native
-
getSurface
Returns the surface of thisGtkNative
.- Returns:
- the surface of this Native
-
getSurfaceTransform
Retrieves the surface transform of this Native.This is the translation from this Native's surface coordinates into this Native's widget coordinates.
- Parameters:
x
- return location for the x coordinatey
- return location for the y coordinate
-
realize
default void realize()Realizes aGtkNative
.This should only be used by subclasses.
-
unrealize
default void unrealize()Unrealizes aGtkNative
.This should only be used by subclasses.
-