module Gtk::Native

Overview

Gtk::Native is the interface implemented by all widgets that have their own Gdk::Surface.

The obvious example of a Gtk::Native is Gtk::Window.

Every widget that is not itself a Gtk::Native is contained in one, and you can get it with Gtk::Widget#native.

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

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

Direct including types

Defined in:

lib/gi-crystal/src/auto/gtk-4.0/native.cr

Class Method Summary

Instance Method Summary

Class Method Detail

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

def self.g_type : UInt64 #

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 #