1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A mechanism to wrap opaque C structures registered by the type system
7 <!-- ##### SECTION Long_Description ##### -->
12 <!-- ##### SECTION See_Also ##### -->
14 #GParamSpecBoxed, g_param_spec_boxed()
17 <!-- ##### USER_FUNCTION GBoxedCopyFunc ##### -->
19 This function is provided by the user and should produce a copy of the passed
23 @boxed: The boxed structure to be copied.
24 @Returns: The newly created copy of the boxed structure.
27 <!-- ##### USER_FUNCTION GBoxedFreeFunc ##### -->
29 This function is provided by the user and should free the boxed
33 @boxed: The boxed structure to be freed.
36 <!-- ##### FUNCTION g_boxed_copy ##### -->
38 Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
41 @boxed_type: The type of @src_boxed.
42 @src_boxed: The boxed structure to be copied.
43 @Returns: The newly created copy of the boxed structure.
46 <!-- ##### FUNCTION g_boxed_free ##### -->
48 Free the boxed structure @boxed which is of type @boxed_type.
51 @boxed_type: The type of @boxed.
52 @boxed: The boxed structure to be freed.
55 <!-- ##### FUNCTION g_boxed_type_register_static ##### -->
57 This function creates a new %G_TYPE_BOXED derived type id for a new
58 boxed type with name @name. Boxed type handling functions have to be
59 provided to copy and free opaque boxed structures of this type.
62 @name: Name of the new boxed type.
63 @boxed_copy: Boxed structure copy function.
64 @boxed_free: Boxed structure free function.
65 @Returns: New %G_TYPE_BOXED derived type id for @name.
68 <!-- ##### FUNCTION g_pointer_type_register_static ##### -->
70 Creates a new %G_TYPE_POINTER derived type id for a new
71 pointer type with name @name.
74 @name: the name of the new pointer type.
75 @Returns: a new %G_TYPE_POINTER derived type id for @name.
78 <!-- ##### MACRO G_TYPE_GSTRING ##### -->
80 The #GType for #GString.
85 <!-- ##### MACRO G_TYPE_STRV ##### -->
87 The #GType for a boxed type holding a %NULL-terminated array of strings.
90 The code fragments in the following example show the use of a property of
91 type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
94 <informalexample><programlisting>
95 g_object_class_install_property (object_class,
97 g_param_spec_boxed ("authors",
104 gchar *authors[] = { "Owen", "Tim", NULL };
105 g_object_set (obj, "authors", authors, NULL);
109 g_object_get (obj, "authors", &writers, NULL);
110 /* do something with writers */
111 g_strfreev (writers);
112 </programlisting></informalexample>
116 <!-- ##### TYPEDEF GStrv ##### -->
118 A C representable type name for #G_TYPE_STRV.