module Gtk::Native

Overview

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#native.

To get the surface of a GtkNative, use Gtk::Native#surface. It is also possible to find the GtkNative to which a surface belongs, with Gtk::Native#for_surface.

In addition to a Gdk#Surface, a GtkNative also provides a Gsk#Renderer for rendering on that surface. To get the renderer, use Gtk::Native#renderer.

Direct including types

Defined in:

auto/gtk-4.0/native.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.for_surface(surface : Gdk::Surface) : Gtk::Native? #

Instance Method Detail

def realize : Nil #

def renderer : Gsk::Renderer #

def surface : Gdk::Surface #

def surface_transform(x : Float64, y : Float64) : Nil #

abstract def to_unsafe #

def unrealize : Nil #