Native#
- class Native(*args, **kwargs)#
Implementations: AboutDialog, AppChooserDialog, ApplicationWindow, Assistant, ColorChooserDialog, Dialog, DragIcon, EmojiChooser, FileChooserDialog, FontChooserDialog, MessageDialog, PageSetupUnixDialog, Popover, PopoverMenu, PrintUnixDialog, ShortcutsWindow, Window
An interface for widgets that have their own Surface.
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 get_native.
To get the surface of a GtkNative, use get_surface.
It is also possible to find the GtkNative to which a surface
belongs, with get_for_surface.
In addition to a Surface, a GtkNative also provides
a Renderer for rendering on that surface. To get the
renderer, use get_renderer.
Methods#
- class Native
- classmethod get_for_surface(surface: Surface) Native | None#
Finds the
GtkNativeassociated with the surface.- Parameters:
surface – a
GdkSurface