2.10 <GtkNative>

Interface: <GtkNative>

An interface for 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:get-native.

To get the surface of a <GtkNative>, use native:get-surface. It is also possible to find the <GtkNative> to which a surface belongs, with native:get-for-surface.

In addition to a <GdkSurface>, a <GtkNative> also provides a <GskRenderer> for rendering on that surface. To get the renderer, use native:get-renderer.

Procedures

Procedure: native:get-for-surface surface ⇒ %return

Finds the <GtkNative> associated with the surface.

surface

Passed: a <GdkSurface>.

a <GdkSurface>

%return

Returned: a <GtkNative>, or #f.

the <GtkNative> that is associated with surface

Method: native:get-renderer self ⇒ %return
Method: get-renderer self ⇒ %return

Returns the renderer that is used for this <GtkNative>.

self

Passed: a <GtkNative>.

a <GtkNative>

%return

Returned: a <GskRenderer>, or #f.

the renderer for self

Method: native:get-surface self ⇒ %return
Method: get-surface self ⇒ %return

Returns the surface of this <GtkNative>.

self

Passed: a <GtkNative>.

a <GtkNative>

%return

Returned: a <GdkSurface>, or #f.

the surface of self

Method: native:get-surface-transform self ⇒ x y
Method: get-surface-transform self ⇒ x y

Retrieves the surface transform of self.

This is the translation from self’s surface coordinates into self’s widget coordinates.

self

Passed: a <GtkNative>.

a <GtkNative>

x

Returned: a real number.

return location for the x coordinate

y

Returned: a real number.

return location for the y coordinate

Method: native:realize self
Method: realize self

Realizes a <GtkNative>.

This should only be used by subclasses.

self

Passed: a <GtkNative>.

a <GtkNative>

Method: native:unrealize self
Method: unrealize self

Unrealizes a <GtkNative>.

This should only be used by subclasses.

self

Passed: a <GtkNative>.

a <GtkNative>