gboxed.h File Reference

__G_BOXED_H__

G_TYPE_IS_BOXED

G_VALUE_HOLDS_BOXED

G_VALUE_HOLDS_BOXED: : a valid GValue structure

Checks whether the given GValue can hold values derived from type G_TYPE_BOXED.

Returns: TRUE on success.

Typedef GBoxedCopyFunc

typedef gpointer(*GBoxedCopyFunc

GBoxedCopyFunc: : The boxed structure to be copied.

This function is provided by the user and should produce a copy of the passed in boxed structure.

Returns: The newly created copy of the boxed structure.

Typedef GBoxedFreeFunc

typedef void(*GBoxedFreeFunc

GBoxedFreeFunc: : The boxed structure to be freed.

This function is provided by the user and should free the boxed structure passed.

g_boxed_copy ( GType, gconstpointer )

IMPORT_C gpointerg_boxed_copy(GTypeboxed_type,
gconstpointersrc_boxed
)

g_boxed_copy: : The type of . : The boxed structure to be copied.

Provide a copy of a boxed structure which is of type .

Returns: The newly created copy of the boxed structure.

g_boxed_free ( GType, gpointer )

IMPORT_C voidg_boxed_free(GTypeboxed_type,
gpointerboxed
)

g_boxed_free: : The type of . : The boxed structure to be freed.

Free the boxed structure which is of type .

g_value_set_boxed ( GValue *, gconstpointer )

IMPORT_C voidg_value_set_boxed(GValue *value,
gconstpointerv_boxed
)

g_value_set_boxed: : a valid GValue of G_TYPE_BOXED derived type : boxed value to be set

Set the contents of a G_TYPE_BOXED derived GValue to .

g_value_set_static_boxed ( GValue *, gconstpointer )

IMPORT_C voidg_value_set_static_boxed(GValue *value,
gconstpointerv_boxed
)

g_value_set_static_boxed: : a valid GValue of G_TYPE_BOXED derived type : static boxed value to be set

Set the contents of a G_TYPE_BOXED derived GValue to . The boxed value is assumed to be static, and is thus not duplicated when setting the GValue.

g_value_get_boxed ( const GValue * )

IMPORT_C gpointerg_value_get_boxed(const GValue *value)

g_value_get_boxed: : a valid GValue of G_TYPE_BOXED derived type

Get the contents of a G_TYPE_BOXED derived GValue.

Returns: boxed contents of

g_value_dup_boxed ( const GValue * )

IMPORT_C gpointerg_value_dup_boxed(const GValue *value)

g_value_dup_boxed: : a valid GValue of G_TYPE_BOXED derived type

Get the contents of a G_TYPE_BOXED derived GValue. Upon getting, the boxed value is duplicated and needs to be later freed with g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (), return_value);

Returns: boxed contents of

g_boxed_type_register_static ( const gchar *, GBoxedCopyFunc, GBoxedFreeFunc )

IMPORT_C GTypeg_boxed_type_register_static(const gchar *name,
GBoxedCopyFuncboxed_copy,
GBoxedFreeFuncboxed_free
)

G_TYPE_CLOSURE

G_TYPE_CLOSURE:

The GType for GClosure.

G_TYPE_VALUE

G_TYPE_VALUE:

The type ID of the "GValue" type which is a boxed type, used to pass around pointers to GValues.

G_TYPE_VALUE_ARRAY

G_TYPE_VALUE_ARRAY:

The type ID of the "GValueArray" type which is a boxed type, used to pass around pointers to GValueArrays.

G_TYPE_DATE

G_TYPE_DATE:

The GType for GDate.

G_TYPE_STRV

G_TYPE_STRV:

The GType for a boxed type holding a NULL-terminated array of strings.

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().

|[ 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); ]|

Since: 2.4

G_TYPE_GSTRING

G_TYPE_GSTRING:

The GType for GString.

G_TYPE_HASH_TABLE

G_TYPE_HASH_TABLE:

The GType for a boxed type holding a GHashTable reference.

Since: 2.10

G_TYPE_REGEX

G_TYPE_REGEX:

The GType for a boxed type holding a GRegex reference.

Since: 2.14

g_value_take_boxed ( GValue *, gconstpointer )

IMPORT_C voidg_value_take_boxed(GValue *value,
gconstpointerv_boxed
)

g_value_take_boxed: : a valid GValue of G_TYPE_BOXED derived type : duplicated unowned boxed value to be set

Sets the contents of a G_TYPE_BOXED derived GValue to and takes over the ownership of the callers reference to ; the caller doesn't have to unref it any more.

Since: 2.4

g_value_set_boxed_take_ownership ( GValue *, gconstpointer )

IMPORT_C voidg_value_set_boxed_take_ownership(GValue *value,
gconstpointerv_boxed
)

g_value_set_boxed_take_ownership: : a valid GValue of G_TYPE_BOXED derived type : duplicated unowned boxed value to be set

This is an internal function introduced mainly for C marshallers.

Deprecated: 2.4: Use g_value_take_boxed() instead.

g_closure_get_type ( void )

IMPORT_C GTypeg_closure_get_type(void)

g_value_get_type ( void )

IMPORT_C GTypeg_value_get_type(void)

g_value_array_get_type ( void )

IMPORT_C GTypeg_value_array_get_type(void)

g_date_get_type ( void )

IMPORT_C GTypeg_date_get_type(void)

g_strv_get_type ( void )

IMPORT_C GTypeg_strv_get_type(void)

g_gstring_get_type ( void )

IMPORT_C GTypeg_gstring_get_type(void)

g_hash_table_get_type ( void )

IMPORT_C GTypeg_hash_table_get_type(void)

g_regex_get_type ( void )

IMPORT_C GTypeg_regex_get_type(void)

Typedef GStrv

typedef gchar **GStrv

GStrv:

A C representable type name for G_TYPE_STRV.