GtkNative

GtkNative — Interface for widgets having surfaces

Types and Values

Object Hierarchy

    GInterface
    ╰── GtkNative

Prerequisites

GtkNative requires GtkWidget.

Known Derived Interfaces

GtkNative is required by GtkRoot.

Includes

#include <gtk/gtk.h>

Description

GtkNative is the interface implemented by all widgets that can provide a GdkSurface for widgets to render on.

The obvious example of a GtkNative is GtkWindow.

Functions

gtk_native_get_for_surface ()

GtkNative *
gtk_native_get_for_surface (GdkSurface *surface);

Finds the GtkNative associated with the surface.

Parameters

surface

a GdkSurface

 

Returns

the GtkNative that is associated with surface .

[transfer none]


gtk_native_get_surface ()

GdkSurface *
gtk_native_get_surface (GtkNative *self);

Returns the surface of this GtkNative.

Parameters

self

a GtkNative

 

Returns

the surface of self .

[transfer none]


gtk_native_get_renderer ()

GskRenderer *
gtk_native_get_renderer (GtkNative *self);

Returns the renderer that is used for this GtkNative.

Parameters

self

a GtkNative

 

Returns

the renderer for self .

[transfer none]


gtk_native_get_surface_transform ()

void
gtk_native_get_surface_transform (GtkNative *self,
                                  double *x,
                                  double *y);

Retrieves the surface transform of self . This is the translation from self 's surface coordinates into self 's widget coordinates.

Parameters

self

a GtkNative

 

x

return location for the x coordinate.

[out]

y

return location for the y coordinate.

[out]

gtk_native_realize ()

void
gtk_native_realize (GtkNative *self);

Realizes a GtkNative.

Parameters

self

a GtkNative

 

gtk_native_unrealize ()

void
gtk_native_unrealize (GtkNative *self);

Unrealizes a GtkNative.

Parameters

self

a GtkNative

 

Types and Values

GtkNative

typedef struct _GtkNative GtkNative;

See Also

GtkRoot