Method

GtkWindowset_focus

Declaration [src]

void
gtk_window_set_focus (
  GtkWindow* window,
  GtkWidget* focus
)

Description [src]

Sets the focus widget.

If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window. If focus is NULL, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to use gtk_widget_grab_focus() instead of this function.

Parameters

focus

Type: GtkWidget

The new focus widget.

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