### Interface

# Gtk Native

#### Description [src]

    interface Gtk.Native : Gtk.Widget

`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 `gtk_widget_get_native()`.

To get the surface of a `GtkNative`, use `gtk_native_get_surface()`. It is also possible to find the `GtkNative` to which a surface belongs, with `gtk_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 `gtk_native_get_renderer()`.

#### Prerequisite

In order to implement Native, your type must inherit from`GtkWidget`.

#### Implementations

- GtkAboutDialog
- GtkAppChooserDialog
- GtkApplicationWindow
- GtkAssistant
- GtkColorChooserDialog
- GtkDialog
- GtkDragIcon
- GtkEmojiChooser
- GtkFileChooserDialog
- GtkFontChooserDialog
- GtkMessageDialog
- GtkPageSetupUnixDialog
- GtkPopover
- GtkPopoverMenu
- GtkPrintUnixDialog
- GtkShortcutsWindow
- GtkWindow

#### Functions

###### gtk_native_get_for_surface

Finds the `GtkNative` associated with the surface.

#### Instance methods

###### gtk_native_get_renderer

Returns the renderer that is used for this `GtkNative`.

###### gtk_native_get_surface

Returns the surface of this `GtkNative`.

###### gtk_native_get_surface_transform

Retrieves the surface transform of `self`.

###### gtk_native_realize

Realizes a `GtkNative`.

###### gtk_native_unrealize

Unrealizes a `GtkNative`.

#### Interface structure

    struct GtkNativeInterface {
      /* no available fields */
    }

No description available.