Native
- class Native(*args, **kwargs)
Implementations: AboutDialog
, AppChooserDialog
, ApplicationWindow
, Assistant
, ColorChooserDialog
, Dialog
, DragIcon
, EmojiChooser
, FileChooserDialog
, FontChooserDialog
, MessageDialog
, PageSetupUnixDialog
, Popover
, PopoverMenu
, PrintUnixDialog
, ShortcutsWindow
, Window
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 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
- get_for_surface(surface: Surface) Native | None
Finds the
GtkNative
associated with the surface.- Parameters:
surface – a
GdkSurface