From: Matthias Clasen Date: Mon, 24 Mar 2003 23:28:35 +0000 (+0000) Subject: Additions. X-Git-Tag: GLIB_2_3_0~231 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfa521fdf7477c645b8d17d639ee83c34910232a;p=platform%2Fupstream%2Fglib.git Additions. --- diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 6ed3361..5140d64 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2003-03-25 Matthias Clasen + + * gobject/tmpl/param_value_types.sgml: + * gobject/tmpl/objects.sgml: Additions. + 2003-03-24 Matthias Clasen * gobject/tmpl/objects.sgml: Additions. diff --git a/docs/reference/gobject/gobject-sections.txt b/docs/reference/gobject/gobject-sections.txt index 3215304..1fa6b91 100644 --- a/docs/reference/gobject/gobject-sections.txt +++ b/docs/reference/gobject/gobject-sections.txt @@ -234,9 +234,9 @@ g_object_set_valist g_object_get_valist g_object_watch_closure g_object_run_dispose -G_OBJECT_WARN_INVALID_PSPEC G_OBJECT_WARN_INVALID_PROPERTY_ID +G_OBJECT_WARN_INVALID_PSPEC GObjectConstructParam diff --git a/docs/reference/gobject/tmpl/objects.sgml b/docs/reference/gobject/tmpl/objects.sgml index b5a86c8..1a8b4ed 100644 --- a/docs/reference/gobject/tmpl/objects.sgml +++ b/docs/reference/gobject/tmpl/objects.sgml @@ -162,55 +162,64 @@ Installs a new property. This is usually done in the class initializer. - +Looks up the #GParamSpec for a property of a class. -@oclass: -@property_name: -@Returns: +@oclass: a #GObjectClass +@property_name: the name of the property to look up +@Returns: the #GParamSpec for the property, or %NULL if the class doesn't have +a property of that name - +Returns an array of #GParamSpec* for all properties of a class. -@oclass: -@n_properties: -@Returns: +@oclass: a #GObjectClass +@n_properties: return location for the length of the returned array +@Returns: an array of #GParamSpec* which should be freed after use - +Creates a new instance of a #GObject subtype and sets its properties. + + +Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) +which are not explicitly specified are set to their default values. -@object_type: -@first_property_name: -@Varargs: -@Returns: - -@first_param_name: +@object_type: the type id of the #GObject subtype to instantiate +@first_property_name: the name of the first property +@Varargs: the value of the first property, followed optionally by more + name/value pairs, followed by %NULL +@Returns: a new instance of @object_type - +Creates a new instance of a #GObject subtype and sets its properties. + + +Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) +which are not explicitly specified are set to their default values. -@object_type: -@n_parameters: -@parameters: -@Returns: +@object_type: the type id of the #GObject subtype to instantiate +@n_parameters: the length of the @parameters array +@parameters: an array of #GParameter +@Returns: a new instance of @object_type - +The GParameter struct is an auxiliary structure used +to hand parameter name/value pairs to g_object_newv(). -@name: -@value: +@name: the parameter name +@value: the parameter value @@ -358,7 +367,7 @@ equivalent to g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNE @object: a #GObject -@signal_spec: the spec for the first signal +@signal_spec: the spec for the first signal @Varargs: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL @@ -376,7 +385,7 @@ means to disconnect any signal with matching callback and data, or @object: a #GObject -@signal_spec: the spec for the first signal +@signal_spec: the spec for the first signal @Varargs: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL @@ -395,8 +404,37 @@ Sets properties on an object. -Gets properties of an object. +Gets properties of an object. + + +In general, a copy is made of the property contents and the caller is +responsible for freeing the memory in the appropriate manner for the type, +for instance by calling g_free() or g_object_unref(). + +Using g_object_get(<!-- -->) + +An example of using g_object_get() to get the contents +of three properties - one of type #G_TYPE_INT, +one of type #G_TYPE_STRING, and one of type #G_TYPE_OBJECT: + + + gint intval; + gchar *strval; + GObject *objval; + + g_object_get (my_object, + "intproperty", &intval, + "strproperty", &strval, + "objproperty", &objval, + NULL); + + /* Do something with intval, strval, objval */ + + g_free (strval); + g_object_unref (objval); + + @object: a #GObject @first_property_name: name of the first property to get @@ -580,6 +618,14 @@ Sets a property on an object. Gets a property of an object. + +In general, a copy is made of the property contents and the caller is +responsible for freeing the memory in the appropriate manner for the type, +for instance by calling g_free() or g_object_unref(). + + +See g_object_get(). + @object: a #GObject @property_name: the name of the property to get @@ -588,13 +634,18 @@ Gets a property of an object. - +Creates a new instance of a #GObject subtype and sets its properties. + + +Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) +which are not explicitly specified are set to their default values. -@object_type: -@first_property_name: -@var_args: -@Returns: +@object_type: the type id of the #GObject subtype to instantiate +@first_property_name: the name of the first property +@var_args: the value of the first property, followed optionally by more + name/value pairs, followed by %NULL +@Returns: a new instance of @object_type @@ -612,6 +663,14 @@ Sets properties on an object. Gets properties of an object. + +In general, a copy is made of the property contents and the caller is +responsible for freeing the memory in the appropriate manner for the type, +for instance by calling g_free() or g_object_unref(). + + +See g_object_get(). + @object: a #GObject @first_property_name: name of the first property to get @@ -638,30 +697,24 @@ as closure data. - +Releases all references to other objects. This can be used to break +reference cycles. + +This functions should only be called from object system implementations. + -@object: - - - - - - - -@object: -@pname: -@property_id: -@pspec: +@object: a #GObject - +This macros should be used to emit a standard warning about unexpected +properties in set_property() and get_property() implementations. -@object: -@property_id: -@pspec: +@object: the #GObject on which set_property() or get_property() was called +@property_id: the numeric id of the property +@pspec: the #GParamSpec of the property diff --git a/docs/reference/gobject/tmpl/param_value_types.sgml b/docs/reference/gobject/tmpl/param_value_types.sgml index 022f48d..3f5da99 100644 --- a/docs/reference/gobject/tmpl/param_value_types.sgml +++ b/docs/reference/gobject/tmpl/param_value_types.sgml @@ -879,10 +879,10 @@ Cast a #GParamSpec instance into a #GParamSpecEnum. - +Return whether the given #GValue can hold values derived from type %G_TYPE_ENUM. -@value: +@value: a valid #GValue structure @@ -951,10 +951,10 @@ Cast a #GParamSpec instance into a #GParamSpecChar. - +Returns whether the given #GValue can hold values derived from type %G_TYPE_FLAGS. -@value: +@value: a valid #GValue structure @@ -1023,10 +1023,10 @@ Casts a #GParamSpec instance into a #GParamSpecString. - +Return whether the given #GValue can hold values of type %G_TYPE_STRING. -@value: +@value: a valid #GValue structure @@ -1131,10 +1131,10 @@ Casts a #GParamSpec instance into a #GParamSpecParam. - +Return whether the given #GValue can hold values derived from type %G_TYPE_PARAM. -@value: +@value: a valid #GValue structure @@ -1230,7 +1230,6 @@ The #GType of #GParamSpecBoxed. - A #GParamSpec derived structure that contains the meta data for boxed properties. @@ -1322,10 +1321,11 @@ Casts a #GParamSpec instance into a #GParamSpecPointer. +Return whether the given #GValue can hold values of type %G_TYPE_POINTER. -@value: +@value: a valid #GValue structure @@ -1390,10 +1390,10 @@ Casts a #GParamSpec instance into a #GParamSpecObject. - +Return whether the given #GValue can hold values derived from type %G_TYPE_OBJECT. -@value: +@value: a valid #GValue structure