Method

GtkWindowset_default

Declaration [src]

void
gtk_window_set_default (
  GtkWindow* window,
  GtkWidget* default_widget
)

Description [src]

The default widget is the widget that’s activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a GtkWindow. When setting (rather than unsetting) the default widget it’s generally easier to call gtk_widget_grab_default() on the widget. Before making a widget the default widget, you must call gtk_widget_set_can_default() on the widget you’d like to make the default.

Parameters

default_widget

Type: GtkWidget

Widget to be the default, or NULL to unset the default widget for the toplevel.

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