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  * Conversion parameters:
26  * inFile  = gtk-Types.html
27  * outPack = gtk
28  * outFile = Types
29  * strct   = GtkType
30  * realStrct=
31  * ctorStrct=
32  * clss    = Types
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_type_
41  * 	- gtk_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * structWrap:
49  * module aliases:
50  * local aliases:
51  * overrides:
52  */
53 
54 module gtk.Types;
55 
56 public  import gtkc.gtktypes;
57 
58 private import gtkc.gtk;
59 private import glib.ConstructionException;
60 private import gobject.ObjectG;
61 
62 
63 private import glib.Str;
64 
65 
66 
67 
68 /**
69  * Description
70  * The GTK+ type system is extensible. Because of that, types have to be
71  * managed at runtime.
72  */
73 public class Types
74 {
75 	
76 	/** the main Gtk struct */
77 	protected GtkType* gtkType;
78 	
79 	
80 	public GtkType* getTypesStruct()
81 	{
82 		return gtkType;
83 	}
84 	
85 	
86 	/** the main Gtk struct as a void* */
87 	protected void* getStruct()
88 	{
89 		return cast(void*)gtkType;
90 	}
91 	
92 	/**
93 	 * Sets our main struct and passes it to the parent class
94 	 */
95 	public this (GtkType* gtkType)
96 	{
97 		this.gtkType = gtkType;
98 	}
99 	
100 	/**
101 	 */
102 	
103 	/**
104 	 * Warning
105 	 * gtk_type_init is deprecated and should not be used in newly-written code.
106 	 * Initializes the data structures associated with GTK+ types.
107 	 * Params:
108 	 * debugFlags = debug flags
109 	 */
110 	public static void init(GTypeDebugFlags debugFlags)
111 	{
112 		// void gtk_type_init (GTypeDebugFlags debug_flags);
113 		gtk_type_init(debugFlags);
114 	}
115 	
116 	/**
117 	 * Warning
118 	 * gtk_type_unique is deprecated and should not be used in newly-written code.
119 	 * Creates a new, unique type.
120 	 * Params:
121 	 * parentType = if zero, a fundamental type is created
122 	 * gtkinfo = must not be NULL, and type_info->type_name must also not be NULL
123 	 * Returns: the new GtkType
124 	 */
125 	public static GtkType unique(GtkType parentType, GtkTypeInfo* gtkinfo)
126 	{
127 		// GtkType gtk_type_unique (GtkType parent_type,  const GtkTypeInfo *gtkinfo);
128 		return gtk_type_unique(parentType, gtkinfo);
129 	}
130 	
131 	/**
132 	 * Warning
133 	 * gtk_type_class has been deprecated since version 2.14 and should not be used in newly-written code. Use g_type_class_peek() or g_type_class_ref() instead.
134 	 * Returns a pointer pointing to the class of type or NULL if there
135 	 * was any trouble identifying type. Initializes the class if
136 	 * necessary.
137 	 * Returns a pointer pointing to the class of type or NULL if there was
138 	 * any trouble identifying type. Initializes the class if necessary.
139 	 * Params:
140 	 * type = a GtkType.
141 	 * Returns: pointer to the class.
142 	 */
143 	public static void* clss(GtkType type)
144 	{
145 		// gpointer gtk_type_class (GtkType type);
146 		return gtk_type_class(type);
147 	}
148 	
149 	/**
150 	 * Warning
151 	 * gtk_type_new is deprecated and should not be used in newly-written code.
152 	 * Creates a new object of a given type, and return a pointer to it.
153 	 * Returns NULL if you give it an invalid type. It allocates the object
154 	 * out of the type's memory chunk if there is a memory chunk. The object
155 	 * has all the proper initializers called.
156 	 * Params:
157 	 * type = a GtkType.
158 	 * Returns: pointer to a GtkTypeObject.
159 	 */
160 	public static void* newTypes(GtkType type)
161 	{
162 		// gpointer gtk_type_new (GtkType type);
163 		return gtk_type_new(type);
164 	}
165 	
166 	/**
167 	 * Warning
168 	 * gtk_type_enum_get_values is deprecated and should not be used in newly-written code.
169 	 * If enum_type has values, then return a pointer to all of them.
170 	 * Params:
171 	 * enumType = a GtkType.
172 	 * Returns: GtkEnumValue*
173 	 */
174 	public static GtkEnumValue* enumGetValues(GtkType enumType)
175 	{
176 		// GtkEnumValue * gtk_type_enum_get_values (GtkType enum_type);
177 		return gtk_type_enum_get_values(enumType);
178 	}
179 	
180 	/**
181 	 * Warning
182 	 * gtk_type_flags_get_values is deprecated and should not be used in newly-written code.
183 	 * If flags_type has values, then return a pointer to all of them.
184 	 * Params:
185 	 * flagsType = a GtkType.
186 	 * Returns: GtkFlagValue*
187 	 */
188 	public static GtkFlagValue* flagsGetValues(GtkType flagsType)
189 	{
190 		// GtkFlagValue * gtk_type_flags_get_values (GtkType flags_type);
191 		return gtk_type_flags_get_values(flagsType);
192 	}
193 	
194 	/**
195 	 * Warning
196 	 * gtk_type_enum_find_value is deprecated and should not be used in newly-written code.
197 	 * Returns a pointer to one of enum_type's GtkEnumValues's whose name (or nickname) matches value_name.
198 	 * Params:
199 	 * enumType = a GtkType.
200 	 * valueName = the name to look for.
201 	 * Returns: GtkEnumValue*
202 	 */
203 	public static GtkEnumValue* enumFindValue(GtkType enumType, string valueName)
204 	{
205 		// GtkEnumValue * gtk_type_enum_find_value (GtkType enum_type,  const gchar *value_name);
206 		return gtk_type_enum_find_value(enumType, Str.toStringz(valueName));
207 	}
208 	
209 	/**
210 	 * Warning
211 	 * gtk_type_flags_find_value is deprecated and should not be used in newly-written code.
212 	 * Returns a pointer to one of flag_type's GtkFlagValue's whose name (or nickname) matches value_name.
213 	 * Params:
214 	 * flagsType = a GtkType.
215 	 * valueName = the name to look for.
216 	 * Returns: GtkFlagValue*
217 	 */
218 	public static GtkFlagValue* flagsFindValue(GtkType flagsType, string valueName)
219 	{
220 		// GtkFlagValue * gtk_type_flags_find_value (GtkType flags_type,  const gchar *value_name);
221 		return gtk_type_flags_find_value(flagsType, Str.toStringz(valueName));
222 	}
223 }