2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gobject-Boxed-Types.html
51 private import gobject
.gobjecttypes
;
53 private import lib
.gobject
;
55 private import glib
.Str
;
59 * GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
60 * thing the type system needs to know about the structures is how to copy and
61 * free them, beyond that they are treated as opaque chunks of memory.
62 * Boxed types are useful for simple value-holder structures like rectangles or
63 * points. They can also be used for wrapping structures defined in non-GObject
75 * Provide a copy of a boxed structure src_boxed which is of type boxed_type.
77 * The type of src_boxed.
79 * The boxed structure to be copied.
81 * The newly created copy of the boxed structure.
83 public static void* boxedCopy(GType boxedType
, void* srcBoxed
)
85 // gpointer g_boxed_copy (GType boxed_type, gconstpointer src_boxed);
86 return g_boxed_copy(boxedType
, srcBoxed
);
90 * Free the boxed structure boxed which is of type boxed_type.
94 * The boxed structure to be freed.
96 public static void boxedFree(GType boxedType
, void* boxed
)
98 // void g_boxed_free (GType boxed_type, gpointer boxed);
99 g_boxed_free(boxedType
, boxed
);
103 * This function creates a new G_TYPE_BOXED derived type id for a new
104 * boxed type with name name. Boxed type handling functions have to be
105 * provided to copy and free opaque boxed structures of this type.
107 * Name of the new boxed type.
109 * Boxed structure copy function.
111 * Boxed structure free function.
113 * New G_TYPE_BOXED derived type id for name.
115 public static GType
boxedTypeRegisterStatic(char[] name
, GBoxedCopyFunc boxedCopy
, GBoxedFreeFunc boxedFree
)
117 // GType g_boxed_type_register_static (const gchar *name, GBoxedCopyFunc boxed_copy, GBoxedFreeFunc boxed_free);
118 return g_boxed_type_register_static(Str
.toStringz(name
), boxedCopy
, boxedFree
);
122 * Creates a new G_TYPE_POINTER derived type id for a new
123 * pointer type with name name.
125 * the name of the new pointer type.
127 * a new G_TYPE_POINTER derived type id for name.
129 public static GType
pointerTypeRegisterStatic(char[] name
)
131 // GType g_pointer_type_register_static (const gchar *name);
132 return g_pointer_type_register_static(Str
.toStringz(name
));