Native

gtk.native.Native is the interface implemented by all widgets that have their own gdk.surface.Surface.

The obvious example of a gtk.native.Native is gtk.window.Window.

Every widget that is not itself a gtk.native.Native is contained in one, and you can get it with gtk.widget.Widget.getNative.

To get the surface of a gtk.native.Native, use gtk.native.Native.getSurface. It is also possible to find the gtk.native.Native to which a surface belongs, with gtk.native.Native.getForSurface.

In addition to a gdk.surface.Surface, a gtk.native.Native also provides a gsk.renderer.Renderer for rendering on that surface. To get the renderer, use gtk.native.Native.getRenderer.

Members

Functions

getRenderer
gsk.renderer.Renderer getRenderer()

Returns the renderer that is used for this gtk.native.Native.

getSurface
gdk.surface.Surface getSurface()

Returns the surface of this gtk.native.Native.

getSurfaceTransform
void getSurfaceTransform(double x, double y)

Retrieves the surface transform of self.

realize
void realize()

Realizes a gtk.native.Native.

unrealize
void unrealize()

Unrealizes a gtk.native.Native.

Static functions

getForSurface
gtk.native.Native getForSurface(gdk.surface.Surface surface)

Finds the gtk.native.Native associated with the surface.