### Method

# Gtk Widget get_root

#### Declaration [src]

    GtkRoot*
    gtk_widget_get_root (
      GtkWidget* widget
    )

#### Description [src]

Returns the `GtkRoot` widget of `widget`.

This function will return `NULL` if the widget is not contained inside a widget tree with a root widget.

`GtkRoot` widgets will return themselves here.

Gets property | `Gtk.Widget:root`

#### Return value

Returns: | `GtkRoot`
| The root widget of `widget`.
| The data is owned by the instance.
| The return value can be `NULL`.