Module: Gtk::Native
- Defined in:
- (unknown)
Overview
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 [methodGtk.Widget.get_native].
To get the surface of a GtkNative, use [methodGtk.Native.get_surface].
It is also possible to find the GtkNative to which a surface
belongs, with [funcGtk.Native.get_for_surface].
In addition to a [classGdk.Surface], a GtkNative also provides
a [classGsk.Renderer] for rendering on that surface. To get the
renderer, use [methodGtk.Native.get_renderer].
Instance Method Summary collapse
-
#get_surface_transform(x, y) ⇒ nil
Retrieves the surface transform of self.
-
#realize ⇒ nil
Realizes a
GtkNative. -
#renderer ⇒ Gsk::Renderer
Returns the renderer that is used for this
GtkNative. -
#surface ⇒ Gdk::Surface
Returns the surface of this
GtkNative. -
#unrealize ⇒ nil
Unrealizes a
GtkNative.
Instance Method Details
#get_surface_transform(x, y) ⇒ nil
Retrieves the surface transform of self.
This is the translation from self's surface coordinates into self's widget coordinates.
#realize ⇒ nil
Realizes a GtkNative.
This should only be used by subclasses.
#renderer ⇒ Gsk::Renderer
Returns the renderer that is used for this GtkNative.
#surface ⇒ Gdk::Surface
Returns the surface of this GtkNative.
#unrealize ⇒ nil
Unrealizes a GtkNative.
This should only be used by subclasses.