1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gobject.Boxed;
26 
27 private import glib.Str;
28 private import gobject.c.functions;
29 public  import gobject.c.types;
30 public  import gtkc.gobjecttypes;
31 
32 
33 /** */
34 public struct Boxed
35 {
36 
37 	/**
38 	 * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
39 	 *
40 	 * Params:
41 	 *     boxedType = The type of @src_boxed.
42 	 *     srcBoxed = The boxed structure to be copied.
43 	 *
44 	 * Returns: The newly created copy of the boxed
45 	 *     structure.
46 	 */
47 	public static void* copy(GType boxedType, void* srcBoxed)
48 	{
49 		return g_boxed_copy(boxedType, srcBoxed);
50 	}
51 
52 	/**
53 	 * Free the boxed structure @boxed which is of type @boxed_type.
54 	 *
55 	 * Params:
56 	 *     boxedType = The type of @boxed.
57 	 *     boxed = The boxed structure to be freed.
58 	 */
59 	public static void free(GType boxedType, void* boxed)
60 	{
61 		g_boxed_free(boxedType, boxed);
62 	}
63 
64 	/**
65 	 * This function creates a new %G_TYPE_BOXED derived type id for a new
66 	 * boxed type with name @name. Boxed type handling functions have to be
67 	 * provided to copy and free opaque boxed structures of this type.
68 	 *
69 	 * Params:
70 	 *     name = Name of the new boxed type.
71 	 *     boxedCopy = Boxed structure copy function.
72 	 *     boxedFree = Boxed structure free function.
73 	 *
74 	 * Returns: New %G_TYPE_BOXED derived type id for @name.
75 	 */
76 	public static GType typeRegisterStatic(string name, GBoxedCopyFunc boxedCopy, GBoxedFreeFunc boxedFree)
77 	{
78 		return g_boxed_type_register_static(Str.toStringz(name), boxedCopy, boxedFree);
79 	}
80 
81 	/**
82 	 * Creates a new %G_TYPE_POINTER derived type id for a new
83 	 * pointer type with name @name.
84 	 *
85 	 * Params:
86 	 *     name = the name of the new pointer type.
87 	 *
88 	 * Returns: a new %G_TYPE_POINTER derived type id for @name.
89 	 */
90 	public static GType pointerTypeRegisterStatic(string name)
91 	{
92 		return g_pointer_type_register_static(Str.toStringz(name));
93 	}
94 }