From d745218d7286bc633870417ca36b33de1f715d70 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 15 Dec 2002 01:15:52 +0000 Subject: [PATCH] Add docs. * gtk/gtkcontainer.c (gtk_container_class_install_child_property): (gtk_container_child_get_valist): (gtk_container_child_get_property): (gtk_container_child_set_valist): (gtk_container_child_set_property): (gtk_container_add_with_properties): (gtk_container_child_set): (gtk_container_child_get): Add docs. * gtk/gtkwindow.c (gtk_window_activate_default): (gtk_window_activate_focus): Add docs. --- ChangeLog | 14 ++++++++ ChangeLog.pre-2-10 | 14 ++++++++ ChangeLog.pre-2-2 | 14 ++++++++ ChangeLog.pre-2-4 | 14 ++++++++ ChangeLog.pre-2-6 | 14 ++++++++ ChangeLog.pre-2-8 | 14 ++++++++ gtk/gtkcontainer.c | 80 +++++++++++++++++++++++++++++++++++++++++++++- gtk/gtkwindow.c | 19 +++++++++++ 8 files changed, 182 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f6a8aa5a2c..8341e6a657 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2002-12-15 Matthias Clasen + + * gtk/gtkcontainer.c (gtk_container_class_install_child_property): + (gtk_container_child_get_valist): + (gtk_container_child_get_property): + (gtk_container_child_set_valist): + (gtk_container_child_set_property): + (gtk_container_add_with_properties): + (gtk_container_child_set): + (gtk_container_child_get): Add docs. + + * gtk/gtkwindow.c (gtk_window_activate_default): + (gtk_window_activate_focus): Add docs. + 2002-12-14 Matthias Clasen * gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Made diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f6a8aa5a2c..8341e6a657 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +2002-12-15 Matthias Clasen + + * gtk/gtkcontainer.c (gtk_container_class_install_child_property): + (gtk_container_child_get_valist): + (gtk_container_child_get_property): + (gtk_container_child_set_valist): + (gtk_container_child_set_property): + (gtk_container_add_with_properties): + (gtk_container_child_set): + (gtk_container_child_get): Add docs. + + * gtk/gtkwindow.c (gtk_window_activate_default): + (gtk_window_activate_focus): Add docs. + 2002-12-14 Matthias Clasen * gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Made diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f6a8aa5a2c..8341e6a657 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,17 @@ +2002-12-15 Matthias Clasen + + * gtk/gtkcontainer.c (gtk_container_class_install_child_property): + (gtk_container_child_get_valist): + (gtk_container_child_get_property): + (gtk_container_child_set_valist): + (gtk_container_child_set_property): + (gtk_container_add_with_properties): + (gtk_container_child_set): + (gtk_container_child_get): Add docs. + + * gtk/gtkwindow.c (gtk_window_activate_default): + (gtk_window_activate_focus): Add docs. + 2002-12-14 Matthias Clasen * gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Made diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f6a8aa5a2c..8341e6a657 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +2002-12-15 Matthias Clasen + + * gtk/gtkcontainer.c (gtk_container_class_install_child_property): + (gtk_container_child_get_valist): + (gtk_container_child_get_property): + (gtk_container_child_set_valist): + (gtk_container_child_set_property): + (gtk_container_add_with_properties): + (gtk_container_child_set): + (gtk_container_child_get): Add docs. + + * gtk/gtkwindow.c (gtk_window_activate_default): + (gtk_window_activate_focus): Add docs. + 2002-12-14 Matthias Clasen * gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Made diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f6a8aa5a2c..8341e6a657 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +2002-12-15 Matthias Clasen + + * gtk/gtkcontainer.c (gtk_container_class_install_child_property): + (gtk_container_child_get_valist): + (gtk_container_child_get_property): + (gtk_container_child_set_valist): + (gtk_container_child_set_property): + (gtk_container_add_with_properties): + (gtk_container_child_set): + (gtk_container_child_get): Add docs. + + * gtk/gtkwindow.c (gtk_window_activate_default): + (gtk_window_activate_focus): Add docs. + 2002-12-14 Matthias Clasen * gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Made diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f6a8aa5a2c..8341e6a657 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +2002-12-15 Matthias Clasen + + * gtk/gtkcontainer.c (gtk_container_class_install_child_property): + (gtk_container_child_get_valist): + (gtk_container_child_get_property): + (gtk_container_child_set_valist): + (gtk_container_child_set_property): + (gtk_container_add_with_properties): + (gtk_container_child_set): + (gtk_container_child_get): Add docs. + + * gtk/gtkwindow.c (gtk_window_activate_default): + (gtk_window_activate_focus): Add docs. + 2002-12-14 Matthias Clasen * gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Made diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 4d8911427e..60b1f2683f 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -334,6 +334,16 @@ container_set_child_property (GtkContainer *container, g_value_unset (&tmp_value); } +/** + * gtk_container_child_get_valist: + * @container: a #GtkContainer + * @child: a widget which is a child of @container + * @first_prop_name: the name of the first property to get + * @va_list: a %NULL-terminated list of property names and #GValue*, + * starting with @first_prop_name. + * + * Gets the values of one or more child properties for @child and @container. + **/ void gtk_container_child_get_valist (GtkContainer *container, GtkWidget *child, @@ -394,6 +404,15 @@ gtk_container_child_get_valist (GtkContainer *container, g_object_unref (container); } +/** + * gtk_container_child_get_property: + * @container: a #GtkContainer + * @child: a widget which is a child of @container + * @property_name: the name of the property to get + * @value: a location to return the value + * + * Gets the value of a child property for @child and @container. + **/ void gtk_container_child_get_property (GtkContainer *container, GtkWidget *child, @@ -459,6 +478,16 @@ gtk_container_child_get_property (GtkContainer *container, g_object_unref (container); } +/** + * gtk_container_child_set_valist: + * @container: a #GtkContainer + * @child: a widget which is a child of @container + * @first_prop_name: the name of the first property to set + * @va_list: a %NULL-terminated list of property names and values, starting + * with @first_prop_name. + * + * Sets one or more child properties for @child and @container. + **/ void gtk_container_child_set_valist (GtkContainer *container, GtkWidget *child, @@ -525,6 +554,15 @@ gtk_container_child_set_valist (GtkContainer *container, g_object_unref (child); } +/** + * gtk_container_child_set_property: + * @container: a #GtkContainer + * @child: a widget which is a child of @container + * @property_name: the name of the property to set + * @value: the value to set the property to + * + * Sets a child property for @child and @container. + **/ void gtk_container_child_set_property (GtkContainer *container, GtkWidget *child, @@ -567,6 +605,17 @@ gtk_container_child_set_property (GtkContainer *container, g_object_unref (child); } +/** + * gtk_container_add_with_properties: + * @container: a #GtkContainer + * @widget: a widget to be placed inside @container + * @first_prop_name: the name of the first child property to set + * @Varargs: a %NULL-terminated list of property names and values, starting + * with @first_prop_name. + * + * Adds @widget to @container, setting child properties at the same time. + * See gtk_container_add() and gtk_container_child_set() for more details. + **/ void gtk_container_add_with_properties (GtkContainer *container, GtkWidget *widget, @@ -596,6 +645,16 @@ gtk_container_add_with_properties (GtkContainer *container, g_object_unref (container); } +/** + * gtk_container_child_set: + * @container: a #GtkContainer + * @child: a widget which is a child of @container + * @first_prop_name: the name of the first property to set + * @Varargs: a %NULL-terminated list of property names and values, starting + * with @first_prop_name. + * + * Sets one or more child properties for @child and @container. + **/ void gtk_container_child_set (GtkContainer *container, GtkWidget *child, @@ -613,6 +672,16 @@ gtk_container_child_set (GtkContainer *container, va_end (var_args); } +/** + * gtk_container_child_get: + * @container: a #GtkContainer + * @child: a widget which is a child of @container + * @first_prop_name: the name of the first property to get + * @Varargs: a %NULL-terminated list of property names and #GValue*, + * starting with @first_prop_name. + * + * Gets the values of one or more child properties for @child and @container. + **/ void gtk_container_child_get (GtkContainer *container, GtkWidget *child, @@ -630,6 +699,14 @@ gtk_container_child_get (GtkContainer *container, va_end (var_args); } +/** + * gtk_container_class_install_child_property: + * @cclass: a #GtkContainerClass + * @property_id: the id for the property + * @pspec: the #GParamSpec for the property + * + * Installs a child property on a container class. + **/ void gtk_container_class_install_child_property (GtkContainerClass *cclass, guint property_id, @@ -685,7 +762,8 @@ gtk_container_class_find_child_property (GObjectClass *cclass, * gtk_container_class_list_child_properties: * @cclass: a #GtkContainerClass * @n_properties: location to return the number of child properties found - * @returns: an newly allocated array of #GParamSpec*. The array must be freed with g_free(). + * @returns: a newly allocated array of #GParamSpec*. The array must be + * freed with g_free(). * * Returns all child properties of a container class. */ diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index f5d13a314d..fc9f9b1540 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1487,6 +1487,14 @@ gtk_window_set_position (GtkWindow *window, g_object_notify (G_OBJECT (window), "window_position"); } +/** + * gtk_window_activate_focus: + * @window: a #GtkWindow + * + * Activates the current focused widget within the window. + * + * Return value: %TRUE if a widget got activated. + **/ gboolean gtk_window_activate_focus (GtkWindow *window) { @@ -1522,6 +1530,17 @@ gtk_window_get_focus (GtkWindow *window) return window->focus_widget; } +/** + * gtk_window_activate_default: + * @window: a #GtkWindow + * + * Activates the default widget for the window, unless the current + * focused widget has been configured to receive the default action + * (see #GTK_RECEIVES_DEFAULT in #GtkWidgetFlags), in which case the + * focused widget is activated. + * + * Return value: %TRUE if a widget got activated. + **/ gboolean gtk_window_activate_default (GtkWindow *window) {