mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-05 08:56:16 +01:00
f05c39ab42
Sat Jan 10 01:36:01 2004 Matthias Clasen <maclas@gmx.de> * gobject/tmpl/gtype.sgml: Document g_type_class_peek_static. Sat Jan 10 01:23:58 2004 Matthias Clasen <maclas@gmx.de> * gobject/gobject-sections.txt: Add g_type_class_peek_static, G_DEFINE_TYPE, G_DEFINE_TYPE_WITH_CODE, G_DEFINE_ABSTRACT_TYPE, G_DEFINE_ABSTRACT_TYPE_WITH_CODE, G_IMPLEMENT_INTERFACE. Sat Jan 10 01:23:01 2004 Matthias Clasen <maclas@gmx.de> * gobject/tmpl/objects.sgml: Update docs of g_object_connect. Fri Jan 9 23:40:23 2004 Matthias Clasen <maclas@gmx.de> * gobject/tmpl/gboxed.sgml: * gobject/gobject-sections.txt: Add G_TYPE_STRV and GStrv.
123 lines
3.1 KiB
Plaintext
123 lines
3.1 KiB
Plaintext
<!-- ##### SECTION Title ##### -->
|
|
GBoxed
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
|
A mechanism to wrap opaque C structures registered by the type system
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
<para>
|
|
#GParamSpecBoxed, g_param_spec_boxed()
|
|
</para>
|
|
|
|
<!-- ##### USER_FUNCTION GBoxedCopyFunc ##### -->
|
|
<para>
|
|
This function is provided by the user and should produce a copy of the passed
|
|
in boxed structure.
|
|
</para>
|
|
|
|
@boxed: The boxed structure to be copied.
|
|
@Returns: The newly created copy of the boxed structure.
|
|
|
|
|
|
<!-- ##### USER_FUNCTION GBoxedFreeFunc ##### -->
|
|
<para>
|
|
This function is provided by the user and should free the boxed
|
|
structure passed.
|
|
</para>
|
|
|
|
@boxed: The boxed structure to be freed.
|
|
|
|
|
|
<!-- ##### FUNCTION g_boxed_copy ##### -->
|
|
<para>
|
|
Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
|
|
</para>
|
|
|
|
@boxed_type: The type of @src_boxed.
|
|
@src_boxed: The boxed structure to be copied.
|
|
@Returns: The newly created copy of the boxed structure.
|
|
|
|
|
|
<!-- ##### FUNCTION g_boxed_free ##### -->
|
|
<para>
|
|
Free the boxed structure @boxed which is of type @boxed_type.
|
|
</para>
|
|
|
|
@boxed_type: The type of @boxed.
|
|
@boxed: The boxed structure to be freed.
|
|
|
|
|
|
<!-- ##### FUNCTION g_boxed_type_register_static ##### -->
|
|
<para>
|
|
This function creates a new %G_TYPE_BOXED derived type id for a new
|
|
boxed type with name @name. Boxed type handling functions have to be
|
|
provided to copy and free opaque boxed structures of this type.
|
|
</para>
|
|
|
|
@name: Name of the new boxed type.
|
|
@boxed_copy: Boxed structure copy function.
|
|
@boxed_free: Boxed structure free function.
|
|
@Returns: New %G_TYPE_BOXED derived type id for @name.
|
|
|
|
|
|
<!-- ##### FUNCTION g_pointer_type_register_static ##### -->
|
|
<para>
|
|
Creates a new %G_TYPE_POINTER derived type id for a new
|
|
pointer type with name @name.
|
|
</para>
|
|
|
|
@name: the name of the new pointer type.
|
|
@Returns: a new %G_TYPE_POINTER derived type id for @name.
|
|
|
|
|
|
<!-- ##### MACRO G_TYPE_GSTRING ##### -->
|
|
<para>
|
|
The #GType for #GString.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_TYPE_STRV ##### -->
|
|
<para>
|
|
The #GType for a boxed type holding a %NULL-terminated array of strings.
|
|
</para>
|
|
<para>
|
|
The code fragments in the following example show the use of a property of
|
|
type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
|
|
and g_object_get().
|
|
</para>
|
|
<informalexample><programlisting>
|
|
g_object_class_install_property (object_class,
|
|
PROP_AUTHORS,
|
|
g_param_spec_boxed ("authors",
|
|
_("Authors"),
|
|
_("List of authors"),
|
|
G_TYPE_STRV,
|
|
G_PARAM_READWRITE));
|
|
|
|
|
|
gchar *authors[] = { "Owen", "Tim", NULL };
|
|
g_object_set (obj, "authors", authors, NULL);
|
|
|
|
|
|
gchar *writers[];
|
|
g_object_get (obj, "authors", &writers, NULL);
|
|
/* do something with writers */
|
|
g_strfreev (writers);
|
|
</programlisting></informalexample>
|
|
|
|
@Since: 2.4
|
|
|
|
|
|
<!-- ##### TYPEDEF GStrv ##### -->
|
|
<para>
|
|
A C representable type name for #G_TYPE_STRV.
|
|
</para>
|
|
|
|
|