Compilation Units
Tagged Types
An interface for widgets that can act as the root of a widget hierarchy.
The root widget takes care of providing the connection to the windowing system and manages layout, drawing and event delivery for its widget hierarchy.
The obvious example of a GtkRoot is GtkWindow.
To get the display to which a GtkRoot belongs, use [methodGtk.Root.get_display].
GtkRoot also maintains the location of keyboard focus inside its widget hierarchy, with [methodGtk.Root.set_focus] and [methodGtk.Root.get_focus].
function "+" (W : Gtk_Root) return Gtk_Root
function Get_Display (Self : Gtk_Root) return Gdk.Gdk_Display
Returns the display that this GtkRoot is on.
the display of Root. Has transfer-ownership='none'.
function Get_Focus (Self : Gtk_Root) return Gtk.Widget.Gtk_Widget
Retrieves the current focused widget within the root. Note that this is the widget that would have the focus if the root is active; if the root is not focused then gtk_widget_has_focus (widget) will be False for the widget.
the currently focused widget. Has transfer-ownership='none'.
function Get_Type return Glib.GType
type Gtk_Root is new Glib.Types.GType_Interface;
Null_Gtk_Root : constant Gtk_Root;
procedure Set_Focus
(Self : Gtk_Root;
Focus : access Gtk.Widget.Gtk_Widget_Record'Class)
If Focus is not the current focus widget, and is focusable, sets it as the focus widget for the root. If Focus is null, unsets the focus widget for the root. To set the focus to a particular widget in the root, it is usually more convenient to use [methodGtk.Widget.grab_focus] instead of this function.
widget to be the new focus widget, or null to unset the focus widget