Gnome::Gtk4::R-Native
Description
Gnome::Gtk4::R-Native is the interface implemented by all widgets that have their own Gnome::Gdk4::Surface.
The obvious example of a Gnome::Gtk4::R-Native is Gnome::Gtk4::Window.
Every widget that is not itself a Gnome::Gtk4::R-Native is contained in one, and you can get it with .get-native() in class Gnome::Gtk4::Widget
.
To get the surface of a Gnome::Gtk4::R-Native, use .get-surface()
. It is also possible to find the Gnome::Gtk4::R-Native to which a surface belongs, with .Native.get-for-surface()
.
In addition to a Gnome::Gdk4::Surface, a Gnome::Gtk4::R-Native also provides a Gnome::Gsk4::Renderer for rendering on that surface. To get the renderer, use .get-renderer()
.
Methods
get-renderer
Returns the renderer that is used for this Gnome::Gtk4::R-Native.
method get-renderer (--> N-Object )
Return value; the renderer for $self
.
get-surface
Returns the surface of this Gnome::Gtk4::R-Native.
method get-surface (--> N-Object )
Return value; the surface of $self
.
get-surface-transform
Retrieves the surface transform of $self
.
This is the translation from $self
's surface coordinates into $self
's widget coordinates.
method get-surface-transform ( Num() $x, Num() $y )
$x; (transfer ownership: full) return location for the x coordinate.
$y; (transfer ownership: full) return location for the y coordinate.
realize
Realizes a Gnome::Gtk4::R-Native.
This should only be used by subclasses.
method realize ( )
unrealize
Unrealizes a Gnome::Gtk4::R-Native.
This should only be used by subclasses.
method unrealize ( )
Functions
get-for-surface
Finds the Gnome::Gtk4::R-Native associated with the surface.
method get-for-surface ( N-Object() $surface --> N-Object )
$surface; a Gnome::Gdk4::Surface.
Return value; the Gnome::Gtk4::R-Native that is associated with $surface
.