Gtk.Root.set_focus

### Method

# Gtk Rootset_focus

#### Declaration [src]

    void
    gtk_root_set_focus (
      GtkRoot* self,
      GtkWidget* focus
    )

#### Description [src]

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.

#### Parameters

`focus`

  Type: `GtkWidget`

  Widget to be the new focus widget, or `NULL` to unset the focus widget.

  The argument can be `NULL`.
  The data is owned by the caller of the function.