2.13 <GtkRoot>

Interface: <GtkRoot>

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 root:get-display.

<GtkRoot> also maintains the location of keyboard focus inside its widget hierarchy, with root:set-focus and root:get-focus.

Procedures

Method: root:get-display self ⇒ %return
Method: get-display self ⇒ %return

Returns the display that this <GtkRoot> is on.

self

Passed: a <GtkRoot>.

a <GtkRoot>

%return

Returned: a <GdkDisplay>.

the display of root

Method: root:get-focus self ⇒ %return
Method: get-focus self ⇒ %return

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 #f for the widget.

self

Passed: a <GtkRoot>.

a <GtkRoot>

%return

Returned: a <GtkWidget>, or #f.

the currently focused widget

Method: root:set-focus self [focus]
Method: set-focus self [focus]

If focus is not the current focus widget, and is focusable, sets it as the focus widget for the root.

If focus is #f, 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 widget:grab-focus? instead of this function.

self

Passed: a <GtkRoot>.

a <GtkRoot>

focus

Passed, or left out: a <GtkWidget>, or #f.

widget to be the new focus widget, or #f to unset the focus widget