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 gtkc.gobject;
29 public  import gtkc.gobjecttypes;
30 
31 
32 /** */
33 public struct Boxed
34 {
35 
36 	/**
37 	 * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
38 	 *
39 	 * Params:
40 	 *     boxedType = The type of @src_boxed.
41 	 *     srcBoxed = The boxed structure to be copied.
42 	 *
43 	 * Return: The newly created copy of the boxed structure.
44 	 */
45 	public static void* copy(GType boxedType, void* srcBoxed)
46 	{
47 		return g_boxed_copy(boxedType, srcBoxed);
48 	}
49 
50 	/**
51 	 * Free the boxed structure @boxed which is of type @boxed_type.
52 	 *
53 	 * Params:
54 	 *     boxedType = The type of @boxed.
55 	 *     boxed = The boxed structure to be freed.
56 	 */
57 	public static void free(GType boxedType, void* boxed)
58 	{
59 		g_boxed_free(boxedType, boxed);
60 	}
61 
62 	/**
63 	 * This function creates a new %G_TYPE_BOXED derived type id for a new
64 	 * boxed type with name @name. Boxed type handling functions have to be
65 	 * provided to copy and free opaque boxed structures of this type.
66 	 *
67 	 * Params:
68 	 *     name = Name of the new boxed type.
69 	 *     boxedCopy = Boxed structure copy function.
70 	 *     boxedFree = Boxed structure free function.
71 	 *
72 	 * Return: New %G_TYPE_BOXED derived type id for @name.
73 	 */
74 	public static GType typeRegisterStatic(string name, GBoxedCopyFunc boxedCopy, GBoxedFreeFunc boxedFree)
75 	{
76 		return g_boxed_type_register_static(Str.toStringz(name), boxedCopy, boxedFree);
77 	}
78 
79 	/**
80 	 * Creates a new %G_TYPE_POINTER derived type id for a new
81 	 * pointer type with name @name.
82 	 *
83 	 * Params:
84 	 *     name = the name of the new pointer type.
85 	 *
86 	 * Return: a new %G_TYPE_POINTER derived type id for @name.
87 	 */
88 	public static GType pointerTypeRegisterStatic(string name)
89 	{
90 		return g_pointer_type_register_static(Str.toStringz(name));
91 	}
92 }