gobject.Boxed.Boxed Class Reference

List of all members.

Detailed Description

Description GBoxed is a generic wrapper mechanism for arbitrary C structures.

The only thing the type system needs to know about the structures is how to copy and free them, beyond that they are treated as opaque chunks of memory. Boxed types are useful for simple value-holder structures like rectangles or points. They can also be used for wrapping structures defined in non-GObject based libraries.


Static Public Member Functions

static void * boxedCopy (GType boxedType, void *srcBoxed)
 Provide a copy of a boxed structure src_boxed which is of type boxed_type.
static void boxedFree (GType boxedType, void *boxed)
 Free the boxed structure boxed which is of type boxed_type.
static GType boxedTypeRegisterStatic (char[] name, GBoxedCopyFunc boxedCopy, GBoxedFreeFunc boxedFree)
 This function creates a new G_TYPE_BOXED derived type id for a new boxed type with name name.
static GType pointerTypeRegisterStatic (char[] name)
 Creates a new G_TYPE_POINTER derived type id for a new pointer type with name name.


Member Function Documentation

static void* gobject.Boxed.Boxed.boxedCopy ( GType  boxedType,
void *  srcBoxed 
) [static]

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

boxed_type: The type of src_boxed. src_boxed: The boxed structure to be copied. Returns: The newly created copy of the boxed structure.

static void gobject.Boxed.Boxed.boxedFree ( GType  boxedType,
void *  boxed 
) [static]

Free the boxed structure boxed which is of type boxed_type.

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

static GType gobject.Boxed.Boxed.boxedTypeRegisterStatic ( char[]  name,
GBoxedCopyFunc  boxedCopy,
GBoxedFreeFunc  boxedFree 
) [static]

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

static GType gobject.Boxed.Boxed.pointerTypeRegisterStatic ( char[]  name  )  [static]

Creates a new G_TYPE_POINTER derived type id for a new pointer type with name name.

name: the name of the new pointer type. Returns: a new G_TYPE_POINTER derived type id for name.


SourceForge.net Logo DSource.org Logo digitalmars.com Logo