Gtk.Root
Description: Reference for Gtk.Root

### Interface

# GtkRoot

#### Description [src]

    interface Gtk.Root : Gtk.Native

`GtkRoot` is the interface implemented by all widgets that can act as a toplevel widget.

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 `gtk_root_get_display()`.

`GtkRoot` also maintains the location of keyboard focus inside its widget hierarchy, with `gtk_root_set_focus()` and `gtk_root_get_focus()`.

#### Prerequisite

In order to implement Root, your type must inherit from `GtkNative`.

#### Implementations

- GtkAboutDialog
- GtkAppChooserDialog
- GtkApplicationWindow
- GtkAssistant
- GtkColorChooserDialog
- GtkDialog
- GtkDragIcon
- GtkFileChooserDialog
- GtkFontChooserDialog
- GtkMessageDialog
- GtkPageSetupUnixDialog
- GtkPrintUnixDialog
- GtkShortcutsWindow
- GtkWindow

#### Instance methods

###### gtk_root_get_display

Returns the display that this `GtkRoot` is on.

###### gtk_root_get_focus

Retrieves the current focused widget within the root.

###### gtk_root_set_focus

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

#### Interface structure

    struct GtkRootInterface {
      /* no available fields */
    }