gtk_widget_set_can_focus
gtk_widget_get_focus_on_click
gtk_widget_set_focus_on_click
+gtk_widget_set_focus_child
gtk_widget_get_has_surface
gtk_widget_set_has_surface
gtk_widget_get_sensitive
gtk_snapshot_offset (snapshot, -x, -y);
}
+/**
+ * gtk_widget_set_focus_child:
+ * @widget: a #GtkWidget
+ * @child: (nullable): a direct child widget of @widget or %NULL
+ * to unset the focus child of @widget
+ *
+ * Set @child as the current focus child of @widget. The previous
+ * focus child will be unset.
+ *
+ * This function is only suitable for widget implementations.
+ * If you want a certain widget to get the input focus, call
+ * gtk_widget_grab_focus() on it.
+*/
void
gtk_widget_set_focus_child (GtkWidget *widget,
GtkWidget *child)
if (GTK_IS_CONTAINER (widget))
gtk_container_set_focus_child (GTK_CONTAINER (widget), child);
-
- /* TODO: ??? */
}
+/**
+ * gtk_widget_get_focus_child:
+ * @widget: a #GtkWidget
+ *
+ * Returns the current focus child of @widget.
+ *
+ * Returns: (nullable): The current focus child of @widget,
+ * or %NULL in case the focus child is unset.
+ */
GtkWidget *
gtk_widget_get_focus_child (GtkWidget *widget)
{