NativeIF

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 [method@Gtk.Widget.get_native].

To get the surface of a GtkNative, use [method@Gtk.Native.get_surface]. It is also possible to find the GtkNative to which a surface belongs, with [func@Gtk.Native.get_for_surface].

In addition to a [class@Gdk.Surface], a GtkNative also provides a [class@Gsk.Renderer] for rendering on that surface. To get the renderer, use [method@Gtk.Native.get_renderer].

Members

Functions

getNativeStruct
GtkNative* getNativeStruct(bool transferOwnership)

Get the main Gtk struct

getRenderer
Renderer getRenderer()

Returns the renderer that is used for this GtkNative.

getStruct
void* getStruct()

the main Gtk struct as a void*

getSurface
Surface getSurface()

Returns the surface of this GtkNative.

getSurfaceTransform
void getSurfaceTransform(double x, double y)

Retrieves the surface transform of @self.

realizeNative
void realizeNative()

Realizes a GtkNative.

unrealizeNative
void unrealizeNative()

Unrealizes a GtkNative.

Static functions

getForSurface
NativeIF getForSurface(Surface surface)

Finds the GtkNative associated with the surface.

getType
GType getType()

Meta