2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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
56 import tango
.io
.Stdout
; // use the tango loging?
60 private import gtkc
.gobjecttypes
;
62 private import gtkc
.gobject
;
65 private import glib
.Str
;
72 * GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
73 * thing the type system needs to know about the structures is how to copy and
74 * free them, beyond that they are treated as opaque chunks of memory.
75 * Boxed types are useful for simple value-holder structures like rectangles or
76 * points. They can also be used for wrapping structures defined in non-GObject
88 * Provide a copy of a boxed structure src_boxed which is of type boxed_type.
90 * The type of src_boxed.
92 * The boxed structure to be copied.
94 * The newly created copy of the boxed structure.
96 public static void* boxedCopy(GType boxedType
, void* srcBoxed
)
98 // gpointer g_boxed_copy (GType boxed_type, gconstpointer src_boxed);
99 return g_boxed_copy(boxedType
, srcBoxed
);
103 * Free the boxed structure boxed which is of type boxed_type.
107 * The boxed structure to be freed.
109 public static void boxedFree(GType boxedType
, void* boxed
)
111 // void g_boxed_free (GType boxed_type, gpointer boxed);
112 g_boxed_free(boxedType
, boxed
);
116 * This function creates a new G_TYPE_BOXED derived type id for a new
117 * boxed type with name name. Boxed type handling functions have to be
118 * provided to copy and free opaque boxed structures of this type.
120 * Name of the new boxed type.
122 * Boxed structure copy function.
124 * Boxed structure free function.
126 * New G_TYPE_BOXED derived type id for name.
128 public static GType
boxedTypeRegisterStatic(char[] name
, GBoxedCopyFunc boxedCopy
, GBoxedFreeFunc boxedFree
)
130 // GType g_boxed_type_register_static (const gchar *name, GBoxedCopyFunc boxed_copy, GBoxedFreeFunc boxed_free);
131 return g_boxed_type_register_static(Str
.toStringz(name
), boxedCopy
, boxedFree
);
135 * Creates a new G_TYPE_POINTER derived type id for a new
136 * pointer type with name name.
138 * the name of the new pointer type.
140 * a new G_TYPE_POINTER derived type id for name.
142 public static GType
pointerTypeRegisterStatic(char[] name
)
144 // GType g_pointer_type_register_static (const gchar *name);
145 return g_pointer_type_register_static(Str
.toStringz(name
));