GtkRoot — Interface for root widgets
| GdkDisplay * | gtk_root_get_display () |
| GtkWidget * | gtk_root_get_focus () |
| void | gtk_root_set_focus () |
GInterface ╰── GtkRoot
GtkRoot is implemented by GtkAboutDialog, GtkAppChooserDialog, GtkApplicationWindow, GtkAssistant, GtkColorChooserDialog, GtkDialog, GtkDragIcon, GtkFileChooserDialog, GtkFontChooserDialog, GtkMessageDialog, GtkPageSetupUnixDialog, GtkPrintUnixDialog, GtkShortcutsWindow and GtkWindow.
#include <gtk/gtk.h>
GtkRoot is the interface implemented by all widgets that can act as a toplevel widget to a hierarchy of widgets. The root widget takes care of providing the connection to the windowing system and manages layout, drawing and event delivery for its widget hierarchy.
GdkDisplay *
gtk_root_get_display (GtkRoot *self); Returns the display that this GtkRoot is on.
self | a GtkRoot |
the display of root .
[transfer none]
GtkWidget *
gtk_root_get_focus (GtkRoot *self); 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.
self | a GtkRoot |
the currently focused widget, or NULL if there is none.
[nullable][transfer none]
void gtk_root_set_focus (GtkRoot *self,GtkWidget *focus);
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 gtk_widget_grab_focus() instead of this function.
self | a GtkRoot | |
focus | widget to be the new focus widget, or | [allow-none] |
typedef struct _GtkRoot GtkRoot;
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/GtkRoot.html