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