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 module gtkc.gobjecttypes;
25 
26 
27 public import gtkc.glibtypes;
28 
29 alias void GTypeCValue;
30 
31 
32 
33 // G_TYPE_*
34 enum GType : size_t
35 {
36 	INVALID = 0<<2,
37 	NONE = 1<<2,
38 	INTERFACE = 2<<2,
39 	CHAR = 3<<2,
40 	UCHAR = 4<<2,
41 	BOOLEAN = 5<<2,
42 	INT = 6<<2,
43 	UINT = 7<<2,
44 	LONG = 8<<2,
45 	ULONG = 9<<2,
46 	INT64 = 10<<2,
47 	UINT64 = 11<<2,
48 	ENUM = 12<<2,
49 	FLAGS = 13<<2,
50 	FLOAT = 14<<2,
51 	DOUBLE = 15<<2,
52 	STRING = 16<<2,
53 	POINTER = 17<<2,
54 	BOXED = 18<<2,
55 	PARAM = 19<<2,
56 	OBJECT = 20<<2,
57 	VARIANT = 21<<2,
58 
59 }
60 
61 
62 /**
63  * typedef gchar** GStrv;
64  * A C representable type name for G_TYPE_STRV.
65  * See Also
66  * GParamSpecBoxed, g_param_spec_boxed()
67  */
68 public alias char** GStrv;
69 
70 /**
71  * typedef gchar* gchararray;
72  * A C representable type name for G_TYPE_STRING.
73  */
74 public alias char* gchararray;
75 
76 /**
77  * typedef GClosureMarshal			 GSignalCMarshaller;
78  * This is the signature of marshaller functions, required to marshall
79  * arrays of parameter values to signal emissions into C language callback
80  * invocations. It is merely an alias to GClosureMarshal since the GClosure
81  * mechanism takes over responsibility of actual function invocation for the
82  * signal system.
83  */
84 public alias GClosureMarshal GSignalCMarshaller;
85 /**
86  * The GTypeDebugFlags enumeration values can be passed to
87  * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
88  * Note that the messages can also be triggered by setting the
89  * GOBJECT_DEBUG environment variable to a ':'-separated list of
90  * "objects" and "signals".
91  * G_TYPE_DEBUG_NONE
92  * Print no messages.
93  * G_TYPE_DEBUG_OBJECTS
94  * Print messages about object bookkeeping.
95  * G_TYPE_DEBUG_SIGNALS
96  * Print messages about signal emissions.
97  * G_TYPE_DEBUG_MASK
98  * Mask covering all debug flags.
99  */
100 public enum GTypeDebugFlags
101 {
102 	NONE = 0,
103 	OBJECTS = 1 << 0,
104 	SIGNALS = 1 << 1,
105 	MASK = 0x03
106 }
107 alias GTypeDebugFlags TypeDebugFlags;
108 
109 /**
110  * Bit masks used to check or determine characteristics of a type.
111  * G_TYPE_FLAG_ABSTRACT
112  * Indicates an abstract type. No instances can be
113  *  created for an abstract type.
114  * G_TYPE_FLAG_VALUE_ABSTRACT
115  * Indicates an abstract value type, i.e. a type
116  *  that introduces a value table, but can't be used for
117  *  g_value_init().
118  */
119 public enum GTypeFlags
120 {
121 	ABSTRACT = (1 << 4),
122 	VALUE_ABSTRACT = (1 << 5)
123 }
124 alias GTypeFlags TypeFlags;
125 
126 /**
127  * Bit masks used to check or determine specific characteristics of a
128  * fundamental type.
129  * G_TYPE_FLAG_CLASSED
130  * Indicates a classed type.
131  * G_TYPE_FLAG_INSTANTIATABLE
132  * Indicates an instantiable type (implies classed).
133  * G_TYPE_FLAG_DERIVABLE
134  * Indicates a flat derivable type.
135  * G_TYPE_FLAG_DEEP_DERIVABLE
136  * Indicates a deep derivable type (implies derivable).
137  */
138 public enum GTypeFundamentalFlags
139 {
140 	FLAG_CLASSED = (1 << 0),
141 	FLAG_INSTANTIATABLE = (1 << 1),
142 	FLAG_DERIVABLE = (1 << 2),
143 	FLAG_DEEP_DERIVABLE = (1 << 3)
144 }
145 alias GTypeFundamentalFlags TypeFundamentalFlags;
146 
147 /**
148  * Through the GParamFlags flag values, certain aspects of parameters
149  * can be configured.
150  * G_PARAM_READABLE
151  * the parameter is readable
152  * G_PARAM_WRITABLE
153  * the parameter is writable
154  * G_PARAM_CONSTRUCT
155  * the parameter will be set upon object construction
156  * G_PARAM_CONSTRUCT_ONLY
157  * the parameter will only be set upon object construction
158  * G_PARAM_LAX_VALIDATION
159  * upon parameter conversion (see g_param_value_convert())
160  *  strict validation is not required
161  * G_PARAM_STATIC_NAME
162  * the string used as name when constructing the
163  *  parameter is guaranteed to remain valid and
164  *  unmodified for the lifetime of the parameter.
165  *  Since 2.8
166  * G_PARAM_PRIVATE
167  * internal
168  * G_PARAM_STATIC_NICK
169  * the string used as nick when constructing the
170  *  parameter is guaranteed to remain valid and
171  *  unmmodified for the lifetime of the parameter.
172  *  Since 2.8
173  * G_PARAM_STATIC_BLURB
174  * the string used as blurb when constructing the
175  *  parameter is guaranteed to remain valid and
176  *  unmodified for the lifetime of the parameter.
177  *  Since 2.8
178  * G_PARAM_DEPRECATED
179  * the parameter is deprecated and will be removed
180  *  in a future version. A warning will be generated if it is used
181  *  while running with G_ENABLE_DIAGNOSTIC=1.
182  *  Since: 2.26
183  */
184 public enum GParamFlags
185 {
186 	READABLE = 1 << 0,
187 	WRITABLE = 1 << 1,
188 	CONSTRUCT = 1 << 2,
189 	CONSTRUCT_ONLY = 1 << 3,
190 	LAX_VALIDATION = 1 << 4,
191 	STATIC_NAME = 1 << 5,
192 	PRIVATE = STATIC_NAME,
193 	STATIC_NICK = 1 << 6,
194 	STATIC_BLURB = 1 << 7,
195 	/+* User defined flags go up to 30 +/
196 	DEPRECATED = 1 << 31
197 }
198 alias GParamFlags ParamFlags;
199 
200 /**
201  * The signal flags are used to specify a signal's behaviour, the overall
202  * signal description outlines how especially the RUN flags control the
203  * stages of a signal emission.
204  * G_SIGNAL_RUN_FIRST
205  * Invoke the object method handler in the first emission stage.
206  * G_SIGNAL_RUN_LAST
207  * Invoke the object method handler in the third emission stage.
208  * G_SIGNAL_RUN_CLEANUP
209  * Invoke the object method handler in the last emission stage.
210  * G_SIGNAL_NO_RECURSE
211  * Signals being emitted for an object while currently being in
212  *  emission for this very object will not be emitted recursively,
213  *  but instead cause the first emission to be restarted.
214  * G_SIGNAL_DETAILED
215  * This signal supports "::detail" appendices to the signal name
216  *  upon handler connections and emissions.
217  * G_SIGNAL_ACTION
218  * Action signals are signals that may freely be emitted on alive
219  *  objects from user code via g_signal_emit() and friends, without
220  *  the need of being embedded into extra code that performs pre or
221  *  post emission adjustments on the object. They can also be thought
222  *  of as object methods which can be called generically by
223  *  third-party code.
224  * G_SIGNAL_NO_HOOKS
225  * No emissions hooks are supported for this signal.
226  */
227 public enum GSignalFlags
228 {
229 	RUN_FIRST = 1 << 0,
230 	RUN_LAST = 1 << 1,
231 	RUN_CLEANUP = 1 << 2,
232 	NO_RECURSE = 1 << 3,
233 	DETAILED = 1 << 4,
234 	ACTION = 1 << 5,
235 	NO_HOOKS = 1 << 6
236 }
237 alias GSignalFlags SignalFlags;
238 
239 /**
240  * The match types specify what g_signal_handlers_block_matched(),
241  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
242  * match signals by.
243  * G_SIGNAL_MATCH_ID
244  * The signal id must be equal.
245  * G_SIGNAL_MATCH_DETAIL
246  * The signal detail be equal.
247  * G_SIGNAL_MATCH_CLOSURE
248  * The closure must be the same.
249  * G_SIGNAL_MATCH_FUNC
250  * The C closure callback must be the same.
251  * G_SIGNAL_MATCH_DATA
252  * The closure data must be the same.
253  * G_SIGNAL_MATCH_UNBLOCKED
254  * Only unblocked signals may matched.
255  */
256 public enum GSignalMatchType
257 {
258 	ID = 1 << 0,
259 	DETAIL = 1 << 1,
260 	CLOSURE = 1 << 2,
261 	FUNC = 1 << 3,
262 	DATA = 1 << 4,
263 	UNBLOCKED = 1 << 5
264 }
265 alias GSignalMatchType SignalMatchType;
266 
267 /**
268  * The connection flags are used to specify the behaviour of a signal's
269  * connection.
270  * G_CONNECT_AFTER
271  * whether the handler should be called before or after the
272  *  default handler of the signal.
273  * G_CONNECT_SWAPPED
274  * whether the instance and data should be swapped when
275  *  calling the handler.
276  */
277 public enum GConnectFlags
278 {
279 	AFTER = 1 << 0,
280 	SWAPPED = 1 << 1
281 }
282 alias GConnectFlags ConnectFlags;
283 
284 /**
285  * Flags to be passed to g_object_bind_property() or
286  * g_object_bind_property_full().
287  * This enumeration can be extended at later date.
288  * G_BINDING_DEFAULT
289  * The default binding; if the source property
290  *  changes, the target property is updated with its value.
291  * G_BINDING_BIDIRECTIONAL
292  * Bidirectional binding; if either the
293  *  property of the source or the property of the target changes,
294  *  the other is updated.
295  * G_BINDING_SYNC_CREATE
296  * Synchronize the values of the source and
297  *  target properties when creating the binding; the direction of
298  *  the synchronization is always from the source to the target.
299  * G_BINDING_INVERT_BOOLEAN
300  * If the two properties being bound are
301  *  booleans, setting one to TRUE will result in the other being
302  *  set to FALSE and vice versa. This flag will only work for
303  *  boolean properties, and cannot be used when passing custom
304  *  transformation functions to g_object_bind_property_full().
305  * Since 2.26
306  */
307 public enum GBindingFlags
308 {
309 	DEFAULT = 0,
310 	BIDIRECTIONAL = 1 << 0,
311 	SYNC_CREATE = 1 << 1,
312 	INVERT_BOOLEAN = 1 << 2
313 }
314 alias GBindingFlags BindingFlags;
315 
316 
317 /**
318  * An opaque structure used as the base of all type instances.
319  */
320 struct GTypeInstance
321 {
322 	/*< private >*/
323 	GTypeClass* gClass;
324 }
325 
326 /**
327  * An opaque structure used as the base of all classes.
328  */
329 struct GTypeClass
330 {
331 	/*< private >*/
332 	GType gType;
333 }
334 
335 /**
336  * An opaque structure used as the base of all interface types.
337  */
338 public struct GTypeInterface
339 {
340 	GType gType;         /* iface type */
341 	GType gInstanceType;
342 }
343 
344 /**
345  * The class structure for the GObject type.
346  * Example4.Implementing singletons using a constructor
347  * static MySingleton *the_singleton = NULL;
348  * static GObject*
349  * my_singleton_constructor (GType type,
350  */
351 public struct GObjectClass
352 {
353 	GTypeClass gTypeClass;
354 	/*< private >*/
355 	GSList* constructProperties;
356 	/* seldomly overidden */
357 	extern(C) GObject*  function(GType type,uint nConstructProperties,GObjectConstructParam *constructProperties) constructor;
358 	/* overridable methods */
359 	extern(C) void  function(GObject *object,uint propertyId,GValue *value,GParamSpec *pspec) setProperty;
360 	extern(C) void  function(GObject *object,uint propertyId,GValue *value,GParamSpec *pspec) getProperty;
361 	extern(C) void  function(GObject *object) dispose;
362 	extern(C) void  function(GObject *object) finalize;
363 	/* seldomly overidden */
364 	extern(C) void  function(GObject *object,uint nPspecs,GParamSpec **pspecs) dispatchPropertiesChanged;
365 	/* signals */
366 	extern(C) void  function(GObject *object,GParamSpec *pspec) notify;
367 	/* called when done constructing */
368 	extern(C) void  function(GObject *object) constructed;
369 	/* padding */
370 	gpointer dummy[7];
371 }
372 
373 /**
374  * Main Gtk struct.
375  * All the fields in the GObject structure are private
376  * to the GObject implementation and should never be accessed directly.
377  */
378 public struct GObject
379 {
380 	GTypeInstance  gTypeInstance;
381 	
382 	/*< private >*/
383 	uint refCount;
384 	GData* qdata;
385 }
386 
387 struct GValue
388 {
389 	version(Windows)
390 	{
391 		GType		g_type;
392 		union Data
393 		{
394 			gint     v_int;
395 			guint    v_uint;
396 			glong    v_long;
397 			gulong   v_ulong;
398 			gint64   v_int64;
399 			guint64  v_uint64;
400 			gfloat   v_float;
401 			gdouble  v_double;
402 			gpointer v_pointer;
403 		};
404 	}
405 	else
406 	{
407 		align(4)
408 		{
409 			GType		g_type;
410 			union Data
411 			{
412 				gint     v_int;
413 				guint    v_uint;
414 				glong    v_long;
415 				gulong   v_ulong;
416 				gint64   v_int64;
417 				guint64  v_uint64;
418 				gfloat   v_float;
419 				gdouble  v_double;
420 				gpointer v_pointer;
421 			};
422 		}
423 	}
424 	Data data1;
425 	Data data2;
426 }
427 
428 /**
429  * This structure is used to provide the type system with the information
430  * required to initialize and destruct (finalize) a type's class and
431  * its instances.
432  * The initialized structure is passed to the g_type_register_static() function
433  * (or is copied into the provided GTypeInfo structure in the
434  * g_type_plugin_complete_type_info()). The type system will perform a deep
435  * copy of this structure, so its memory does not need to be persistent
436  * across invocation of g_type_register_static().
437  * guint16 class_size;
438  * Size of the class structure (required for interface, classed and instantiatable types).
439  * GBaseInitFunc base_init;
440  * Location of the base initialization function (optional).
441  * GBaseFinalizeFunc base_finalize;
442  * Location of the base finalization function (optional).
443  * GClassInitFunc class_init;
444  * Location of the class initialization function for
445  * classed and instantiatable types. Location of the default vtable
446  * inititalization function for interface types. (optional) This function
447  * is used both to fill in virtual functions in the class or default vtable,
448  * and to do type-specific setup such as registering signals and object
449  * properties.
450  * GClassFinalizeFunc class_finalize;
451  * Location of the class finalization function for
452  * classed and instantiatable types. Location fo the default vtable
453  * finalization function for interface types. (optional)
454  * gconstpointer class_data;
455  * User-supplied data passed to the class init/finalize functions.
456  * guint16 instance_size;
457  * Size of the instance (object) structure (required for instantiatable types only).
458  * guint16 n_preallocs;
459  * Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the slice allocator now.
460  * GInstanceInitFunc instance_init;
461  * Location of the instance initialization function (optional, for instantiatable types only).
462  * const GTypeValueTable *value_table;
463  * A GTypeValueTable function table for generic handling of GValues of this type (usually only
464  * useful for fundamental types).
465  */
466 public struct GTypeInfo
467 {
468 	/+* interface types, classed types, instantiated types +/
469 	ushort classSize;
470 	GBaseInitFunc baseInit;
471 	GBaseFinalizeFunc baseFinalize;
472 	/+* interface types, classed types, instantiated types +/
473 	GClassInitFunc classInit;
474 	GClassFinalizeFunc classFinalize;
475 	void* classData;
476 	/+* instantiated types +/
477 	ushort instanceSize;
478 	ushort nPreallocs;
479 	GInstanceInitFunc instanceInit;
480 	/+* value handling +/
481 	GTypeValueTable *valueTable;
482 }
483 
484 
485 /**
486  * A structure that provides information to the type system which is
487  * used specifically for managing fundamental types.
488  * GTypeFundamentalFlags type_flags;
489  * GTypeFundamentalFlags describing the characteristics of the fundamental type
490  */
491 public struct GTypeFundamentalInfo
492 {
493 	GTypeFundamentalFlags typeFlags;
494 }
495 
496 
497 /**
498  * A structure that provides information to the type system which is
499  * used specifically for managing interface types.
500  * GInterfaceInitFunc interface_init;
501  * location of the interface initialization function
502  * GInterfaceFinalizeFunc interface_finalize;
503  * location of the interface finalization function
504  * gpointer interface_data;
505  * user-supplied data passed to the interface init/finalize functions
506  */
507 public struct GInterfaceInfo
508 {
509 	GInterfaceInitFunc interfaceInit;
510 	GInterfaceFinalizeFunc interfaceFinalize;
511 	void* interfaceData;
512 }
513 
514 
515 /**
516  * The GTypeValueTable provides the functions required by the GValue implementation,
517  * to serve as a container for values of a type.
518  * value_init ()
519  * Default initialize values contents by poking values
520  * directly into the value->data array. The data array of
521  * the GValue passed into this function was zero-filled
522  * with memset(), so no care has to
523  * be taken to free any
524  * old contents. E.g. for the implementation of a string
525  * value that may never be NULL, the implementation might
526  * look like:
527  * $(DDOC_COMMENT example)
528  * value_free ()
529  * Free any old contents that might be left in the
530  * data array of the passed in value. No resources may
531  * remain allocated through the GValue contents after
532  * this function returns. E.g. for our above string type:
533  * $(DDOC_COMMENT example)
534  * value_copy ()
535  * dest_value is a GValue with zero-filled data section
536  * and src_value is a properly setup GValue of same or
537  * derived type.
538  * The purpose of this function is to copy the contents of
539  * src_value into dest_value in a way, that even after
540  * src_value has been freed, the contents of dest_value
541  * remain valid. String type example:
542  * $(DDOC_COMMENT example)
543  * value_peek_pointer ()
544  * If the value contents fit into a pointer, such as objects
545  * or strings, return this pointer, so the caller can peek at
546  * the current contents. To extend on our above string example:
547  * $(DDOC_COMMENT example)
548  * gchar *collect_format;
549  * A string format describing how to collect the contents of
550  * this value bit-by-bit. Each character in the format represents
551  * an argument to be collected, and the characters themselves indicate
552  * the type of the argument. Currently supported arguments are:
553  * 'i' - Integers. passed as collect_values[].v_int.
554  * 'l' - Longs. passed as collect_values[].v_long.
555  * 'd' - Doubles. passed as collect_values[].v_double.
556  * 'p' - Pointers. passed as collect_values[].v_pointer.
557  * It should be noted that for variable argument list construction,
558  * ANSI C promotes every type smaller than an integer to an int, and
559  * floats to doubles. So for collection of short int or char, 'i'
560  * needs to be used, and for collection of floats 'd'.
561  * collect_value ()
562  * The collect_value() function is responsible for converting the
563  * values collected from a variable argument list into contents
564  * suitable for storage in a GValue. This function should setup
565  * value similar to value_init(); e.g. for a string value that
566  * does not allow NULL pointers, it needs to either spew an error,
567  * or do an implicit conversion by storing an empty string.
568  * The value passed in to this function has a zero-filled data
569  * array, so just like for value_init() it is guaranteed to not
570  * contain any old contents that might need freeing.
571  * n_collect_values is exactly the string length of collect_format,
572  * and collect_values is an array of unions GTypeCValue with
573  * length n_collect_values, containing the collected values
574  * according to collect_format.
575  * collect_flags is an argument provided as a hint by the caller.
576  * It may contain the flag G_VALUE_NOCOPY_CONTENTS indicating,
577  * that the collected value contents may be considered "static"
578  * for the duration of the value lifetime.
579  * Thus an extra copy of the contents stored in collect_values is
580  * not required for assignment to value.
581  * For our above string example, we continue with:
582  * $(DDOC_COMMENT example)
583  * It should be noted, that it is generally a bad idea to follow the
584  * G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to
585  * reentrancy requirements and reference count assertions performed
586  * by the GSignal code, reference counts should always be incremented
587  * for reference counted contents stored in the value->data array.
588  * To deviate from our string example for a moment, and taking a look
589  * at an exemplary implementation for collect_value() of GObject:
590  * $(DDOC_COMMENT example)
591  * The reference count for valid objects is always incremented,
592  * regardless of collect_flags. For invalid objects, the example
593  * returns a newly allocated string without altering value.
594  * Upon success, collect_value() needs to return NULL. If, however,
595  * an error condition occurred, collect_value() may spew an
596  * error by returning a newly allocated non-NULL string, giving
597  * a suitable description of the error condition.
598  * The calling code makes no assumptions about the value
599  * contents being valid upon error returns, value
600  * is simply thrown away without further freeing. As such, it is
601  * a good idea to not allocate GValue contents, prior to returning
602  * an error, however, collect_values() is not obliged to return
603  * a correctly setup value for error returns, simply because
604  * any non-NULL return is considered a fatal condition so further
605  * program behaviour is undefined.
606  * gchar *lcopy_format;
607  * Format description of the arguments to collect for lcopy_value,
608  * analogous to collect_format. Usually, lcopy_format string consists
609  * only of 'p's to provide lcopy_value() with pointers to storage locations.
610  * lcopy_value ()
611  * This function is responsible for storing the value contents into
612  * arguments passed through a variable argument list which got
613  * collected into collect_values according to lcopy_format.
614  * n_collect_values equals the string length of lcopy_format,
615  * and collect_flags may contain G_VALUE_NOCOPY_CONTENTS.
616  * In contrast to collect_value(), lcopy_value() is obliged to
617  * always properly support G_VALUE_NOCOPY_CONTENTS.
618  * Similar to collect_value() the function may prematurely abort
619  * by returning a newly allocated string describing an error condition.
620  * To complete the string example:
621  * $(DDOC_COMMENT example)
622  * And an illustrative version of lcopy_value() for
623  * reference-counted types:
624  * $(DDOC_COMMENT example)
625  */
626 public struct GTypeValueTable
627 {
628 	extern(C) void function(GValue* value) valueInit;
629 	extern(C) void function(GValue* value) valueFree;
630 	extern(C) void function(GValue* srcValue, GValue* destValue) valueCopy;
631 	/+* varargs functionality (optional) +/
632 	extern(C) void* function(GValue* value) valuePeekPointer;
633 	char *collectFormat;
634 	extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) collectValue;
635 	char *lcopyFormat;
636 	extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) lcopyValue;
637 }
638 
639 
640 /**
641  * A structure holding information for a specific type. It is
642  * filled in by the g_type_query() function.
643  * GType type;
644  * the GType value of the type.
645  * const gchar *type_name;
646  * the name of the type.
647  * guint class_size;
648  * the size of the class structure.
649  * guint instance_size;
650  * the size of the instance structure.
651  */
652 public struct GTypeQuery
653 {
654 	GType type;
655 	char *typeName;
656 	uint classSize;
657 	uint instanceSize;
658 }
659 
660 
661 /**
662  * Main Gtk struct.
663  * The GTypePlugin typedef is used as a placeholder
664  * for objects that implement the GTypePlugin
665  * interface.
666  */
667 public struct GTypePlugin{}
668 
669 
670 /**
671  * The GTypePlugin interface is used by the type system in order to handle
672  * the lifecycle of dynamically loaded types.
673  * GTypePluginUse use_plugin;
674  * Increases the use count of the plugin.
675  * GTypePluginUnuse unuse_plugin;
676  * Decreases the use count of the plugin.
677  * GTypePluginCompleteTypeInfo complete_type_info;
678  * Fills in the GTypeInfo and
679  * GTypeValueTable structs for the type. The structs are initialized
680  * with memset(s, 0, sizeof (s)) before calling
681  * this function.
682  * GTypePluginCompleteInterfaceInfo complete_interface_info;
683  * Fills in missing parts of the GInterfaceInfo
684  * for the interface. The structs is initialized with
685  * memset(s, 0, sizeof (s)) before calling
686  * this function.
687  */
688 public struct GTypePluginClass
689 {
690 	GTypePluginUse usePlugin;
691 	GTypePluginUnuse unusePlugin;
692 	GTypePluginCompleteTypeInfo completeTypeInfo;
693 	GTypePluginCompleteInterfaceInfo completeInterfaceInfo;
694 }
695 
696 
697 /**
698  * Main Gtk struct.
699  * The members of the GTypeModule structure should not
700  * be accessed directly, except for the name field.
701  * gchar *name;
702  * the name of the module
703  */
704 public struct GTypeModule
705 {
706 	char *name;
707 }
708 
709 
710 /**
711  * In order to implement dynamic loading of types based on GTypeModule,
712  * the load and unload functions in GTypeModuleClass must be implemented.
713  * GObjectClass parent_class;
714  * the parent class
715  * load ()
716  * loads the module and registers one or more types using
717  * g_type_module_register_type().
718  * unload ()
719  * unloads the module
720  */
721 public struct GTypeModuleClass
722 {
723 	GObjectClass parentClass;
724 	extern(C) int function(GTypeModule* modul)  load;
725 	extern(C) void function(GTypeModule* modul)  unload;
726 }
727 
728 
729 /**
730  * The GObjectConstructParam struct is an auxiliary
731  * structure used to hand GParamSpec/GValue pairs to the constructor of
732  * a GObjectClass.
733  * GParamSpec *pspec;
734  * the GParamSpec of the construct parameter
735  * GValue *value;
736  * the value to set the parameter to
737  */
738 public struct GObjectConstructParam
739 {
740 	GParamSpec *pspec;
741 	GValue *value;
742 }
743 
744 
745 /**
746  * The GParameter struct is an auxiliary structure used
747  * to hand parameter name/value pairs to g_object_newv().
748  * const gchar *name;
749  * the parameter name
750  * GValue value;
751  * the parameter value
752  */
753 public struct GParameter
754 {
755 	char *name;
756 	GValue value;
757 }
758 
759 
760 /**
761  * All the fields in the GInitiallyUnowned structure
762  * are private to the GInitiallyUnowned implementation and should never be
763  * accessed directly.
764  */
765 public struct GInitiallyUnowned{}
766 
767 
768 /**
769  * The class structure for the GInitiallyUnowned type.
770  */
771 public struct GInitiallyUnownedClass{}
772 
773 
774 /**
775  * The class of an enumeration type holds information about its
776  * possible values.
777  * GTypeClass g_type_class;
778  * the parent class
779  * gint minimum;
780  * the smallest possible value.
781  * gint maximum;
782  * the largest possible value.
783  * guint n_values;
784  * the number of possible values.
785  * GEnumValue *values;
786  * an array of GEnumValue structs describing the
787  * individual values.
788  */
789 public struct GEnumClass
790 {
791 	GTypeClass gTypeClass;
792 	int minimum;
793 	int maximum;
794 	uint nValues;
795 	GEnumValue *values;
796 }
797 
798 
799 /**
800  * The class of a flags type holds information about its
801  * possible values.
802  * GTypeClass g_type_class;
803  * the parent class
804  * guint mask;
805  * a mask covering all possible values.
806  * guint n_values;
807  * the number of possible values.
808  * GFlagsValue *values;
809  * an array of GFlagsValue structs describing the
810  * individual values.
811  */
812 public struct GFlagsClass
813 {
814 	GTypeClass gTypeClass;
815 	uint mask;
816 	uint nValues;
817 	GFlagsValue *values;
818 }
819 
820 
821 /**
822  * Main Gtk struct.
823  * A structure which contains a single enum value, its name, and its
824  * nickname.
825  * gint value;
826  * the enum value
827  * const gchar *value_name;
828  * the name of the value
829  * const gchar *value_nick;
830  * the nickname of the value
831  */
832 public struct GEnumValue
833 {
834 	int value;
835 	char *valueName;
836 	char *valueNick;
837 }
838 
839 
840 /**
841  * A structure which contains a single flags value, its name, and its
842  * nickname.
843  * guint value;
844  * the flags value
845  * const gchar *value_name;
846  * the name of the value
847  * const gchar *value_nick;
848  * the nickname of the value
849  */
850 public struct GFlagsValue
851 {
852 	uint value;
853 	char *valueName;
854 	char *valueNick;
855 }
856 
857 
858 /**
859  * A GParamSpec derived structure that contains the meta data for boolean properties.
860  * GParamSpec parent_instance;
861  * private GParamSpec portion
862  * gboolean default_value;
863  * default value for the property specified
864  */
865 public struct GParamSpecBoolean
866 {
867 	GParamSpec parentInstance;
868 	int defaultValue;
869 }
870 
871 
872 /**
873  * A GParamSpec derived structure that contains the meta data for character properties.
874  * GParamSpec parent_instance;
875  * private GParamSpec portion
876  * gint8 minimum;
877  * minimum value for the property specified
878  * gint8 maximum;
879  * maximum value for the property specified
880  * gint8 default_value;
881  * default value for the property specified
882  */
883 public struct GParamSpecChar
884 {
885 	GParamSpec parentInstance;
886 	byte minimum;
887 	byte maximum;
888 	byte defaultValue;
889 }
890 
891 
892 /**
893  * A GParamSpec derived structure that contains the meta data for unsigned character properties.
894  * GParamSpec parent_instance;
895  * private GParamSpec portion
896  * guint8 minimum;
897  * minimum value for the property specified
898  * guint8 maximum;
899  * maximum value for the property specified
900  * guint8 default_value;
901  * default value for the property specified
902  */
903 public struct GParamSpecUChar
904 {
905 	GParamSpec parentInstance;
906 	ubyte minimum;
907 	ubyte maximum;
908 	ubyte defaultValue;
909 }
910 
911 
912 /**
913  * A GParamSpec derived structure that contains the meta data for integer properties.
914  * GParamSpec parent_instance;
915  * private GParamSpec portion
916  * gint minimum;
917  * minimum value for the property specified
918  * gint maximum;
919  * maximum value for the property specified
920  * gint default_value;
921  * default value for the property specified
922  */
923 public struct GParamSpecInt
924 {
925 	GParamSpec parentInstance;
926 	int minimum;
927 	int maximum;
928 	int defaultValue;
929 }
930 
931 
932 /**
933  * A GParamSpec derived structure that contains the meta data for unsigned integer properties.
934  * GParamSpec parent_instance;
935  * private GParamSpec portion
936  * guint minimum;
937  * minimum value for the property specified
938  * guint maximum;
939  * maximum value for the property specified
940  * guint default_value;
941  * default value for the property specified
942  */
943 public struct GParamSpecUInt
944 {
945 	GParamSpec parentInstance;
946 	uint minimum;
947 	uint maximum;
948 	uint defaultValue;
949 }
950 
951 
952 /**
953  * A GParamSpec derived structure that contains the meta data for long integer properties.
954  * GParamSpec parent_instance;
955  * private GParamSpec portion
956  * glong minimum;
957  * minimum value for the property specified
958  * glong maximum;
959  * maximum value for the property specified
960  * glong default_value;
961  * default value for the property specified
962  */
963 public struct GParamSpecLong
964 {
965 	GParamSpec parentInstance;
966 	glong minimum;
967 	glong maximum;
968 	glong defaultValue;
969 }
970 
971 
972 /**
973  * A GParamSpec derived structure that contains the meta data for unsigned long integer properties.
974  * GParamSpec parent_instance;
975  * private GParamSpec portion
976  * gulong minimum;
977  * minimum value for the property specified
978  * gulong maximum;
979  * maximum value for the property specified
980  * gulong default_value;
981  * default value for the property specified
982  */
983 public struct GParamSpecULong
984 {
985 	GParamSpec parentInstance;
986 	gulong minimum;
987 	gulong maximum;
988 	gulong defaultValue;
989 }
990 
991 
992 /**
993  * A GParamSpec derived structure that contains the meta data for 64bit integer properties.
994  * GParamSpec parent_instance;
995  * private GParamSpec portion
996  * gint64 minimum;
997  * minimum value for the property specified
998  * gint64 maximum;
999  * maximum value for the property specified
1000  * gint64 default_value;
1001  * default value for the property specified
1002  */
1003 public struct GParamSpecInt64
1004 {
1005 	GParamSpec parentInstance;
1006 	long minimum;
1007 	long maximum;
1008 	long defaultValue;
1009 }
1010 
1011 
1012 /**
1013  * A GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
1014  * GParamSpec parent_instance;
1015  * private GParamSpec portion
1016  * guint64 minimum;
1017  * minimum value for the property specified
1018  * guint64 maximum;
1019  * maximum value for the property specified
1020  * guint64 default_value;
1021  * default value for the property specified
1022  */
1023 public struct GParamSpecUInt64
1024 {
1025 	GParamSpec parentInstance;
1026 	ulong minimum;
1027 	ulong maximum;
1028 	ulong defaultValue;
1029 }
1030 
1031 
1032 /**
1033  * A GParamSpec derived structure that contains the meta data for float properties.
1034  * GParamSpec parent_instance;
1035  * private GParamSpec portion
1036  * gfloat minimum;
1037  * minimum value for the property specified
1038  * gfloat maximum;
1039  * maximum value for the property specified
1040  * gfloat default_value;
1041  * default value for the property specified
1042  * gfloat epsilon;
1043  * values closer than epsilon will be considered identical
1044  * by g_param_values_cmp(); the default value is 1e-30.
1045  */
1046 public struct GParamSpecFloat
1047 {
1048 	GParamSpec parentInstance;
1049 	float minimum;
1050 	float maximum;
1051 	float defaultValue;
1052 	float epsilon;
1053 }
1054 
1055 
1056 /**
1057  * A GParamSpec derived structure that contains the meta data for double properties.
1058  * GParamSpec parent_instance;
1059  * private GParamSpec portion
1060  * gdouble minimum;
1061  * minimum value for the property specified
1062  * gdouble maximum;
1063  * maximum value for the property specified
1064  * gdouble default_value;
1065  * default value for the property specified
1066  * gdouble epsilon;
1067  * values closer than epsilon will be considered identical
1068  * by g_param_values_cmp(); the default value is 1e-90.
1069  */
1070 public struct GParamSpecDouble
1071 {
1072 	GParamSpec parentInstance;
1073 	double minimum;
1074 	double maximum;
1075 	double defaultValue;
1076 	double epsilon;
1077 }
1078 
1079 
1080 /**
1081  * A GParamSpec derived structure that contains the meta data for enum
1082  * properties.
1083  * GParamSpec parent_instance;
1084  * private GParamSpec portion
1085  * GEnumClass *enum_class;
1086  * the GEnumClass for the enum
1087  * gint default_value;
1088  * default value for the property specified
1089  */
1090 public struct GParamSpecEnum
1091 {
1092 	GParamSpec parentInstance;
1093 	GEnumClass *enumClass;
1094 	int defaultValue;
1095 }
1096 
1097 
1098 /**
1099  * A GParamSpec derived structure that contains the meta data for flags
1100  * properties.
1101  * GParamSpec parent_instance;
1102  * private GParamSpec portion
1103  * GFlagsClass *flags_class;
1104  * the GFlagsClass for the flags
1105  * guint default_value;
1106  * default value for the property specified
1107  */
1108 public struct GParamSpecFlags
1109 {
1110 	GParamSpec parentInstance;
1111 	GFlagsClass *flagsClass;
1112 	uint defaultValue;
1113 }
1114 
1115 
1116 /**
1117  * A GParamSpec derived structure that contains the meta data for string
1118  * properties.
1119  * GParamSpec parent_instance;
1120  * private GParamSpec portion
1121  * gchar *default_value;
1122  * default value for the property specified
1123  * gchar *cset_first;
1124  * a string containing the allowed values for the first byte
1125  * gchar *cset_nth;
1126  * a string containing the allowed values for the subsequent bytes
1127  * gchar substitutor;
1128  * the replacement byte for bytes which don't match cset_first or cset_nth.
1129  * guint null_fold_if_empty : 1;
1130  * replace empty string by NULL
1131  * guint ensure_non_null : 1;
1132  * replace NULL strings by an empty string
1133  */
1134 public struct GParamSpecString
1135 {
1136 	GParamSpec parentInstance;
1137 	char *defaultValue;
1138 	char *csetFirst;
1139 	char *csetNth;
1140 	char substitutor;
1141 	uint bitfield0;
1142 	//uint nullFoldIfEmpty : 1;
1143 	//uint ensureNonNull : 1;
1144 }
1145 
1146 
1147 /**
1148  * A GParamSpec derived structure that contains the meta data for G_TYPE_PARAM
1149  * properties.
1150  * GParamSpec parent_instance;
1151  * private GParamSpec portion
1152  */
1153 public struct GParamSpecParam
1154 {
1155 	GParamSpec parentInstance;
1156 }
1157 
1158 
1159 /**
1160  * A GParamSpec derived structure that contains the meta data for boxed properties.
1161  * GParamSpec parent_instance;
1162  * private GParamSpec portion
1163  */
1164 public struct GParamSpecBoxed
1165 {
1166 	GParamSpec parentInstance;
1167 }
1168 
1169 
1170 /**
1171  * A GParamSpec derived structure that contains the meta data for pointer properties.
1172  * GParamSpec parent_instance;
1173  * private GParamSpec portion
1174  */
1175 public struct GParamSpecPointer
1176 {
1177 	GParamSpec parentInstance;
1178 }
1179 
1180 
1181 /**
1182  * A GParamSpec derived structure that contains the meta data for object properties.
1183  * GParamSpec parent_instance;
1184  * private GParamSpec portion
1185  */
1186 public struct GParamSpecObject
1187 {
1188 	GParamSpec parentInstance;
1189 }
1190 
1191 
1192 /**
1193  * A GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
1194  * GParamSpec parent_instance;
1195  * private GParamSpec portion
1196  * gunichar default_value;
1197  * default value for the property specified
1198  */
1199 public struct GParamSpecUnichar
1200 {
1201 	GParamSpec parentInstance;
1202 	gunichar defaultValue;
1203 }
1204 
1205 
1206 /**
1207  * A GParamSpec derived structure that contains the meta data for GValueArray properties.
1208  * GParamSpec parent_instance;
1209  * private GParamSpec portion
1210  * GParamSpec *element_spec;
1211  * a GParamSpec describing the elements contained in arrays of this property, may be NULL
1212  * guint fixed_n_elements;
1213  * if greater than 0, arrays of this property will always have this many elements
1214  */
1215 public struct GParamSpecValueArray
1216 {
1217 	GParamSpec parentInstance;
1218 	GParamSpec *elementSpec;
1219 	uint fixedNElements;
1220 }
1221 
1222 
1223 /**
1224  * This is a type of GParamSpec type that simply redirects operations to
1225  * another paramspec. All operations other than getting or
1226  * setting the value are redirected, including accessing the nick and
1227  * blurb, validating a value, and so forth. See
1228  * g_param_spec_get_redirect_target() for retrieving the overidden
1229  * property. GParamSpecOverride is used in implementing
1230  * g_object_class_override_property(), and will not be directly useful
1231  * unless you are implementing a new base type similar to GObject.
1232  * Since 2.4
1233  */
1234 public struct GParamSpecOverride{}
1235 
1236 
1237 /**
1238  * A GParamSpec derived structure that contains the meta data for GType properties.
1239  * GParamSpec parent_instance;
1240  * private GParamSpec portion
1241  * GType is_a_type;
1242  * a GType whose subtypes can occur as values
1243  * Since 2.10
1244  */
1245 public struct GParamSpecGType
1246 {
1247 	GParamSpec parentInstance;
1248 	GType isAType;
1249 }
1250 
1251 
1252 /**
1253  * A GParamSpec derived structure that contains the meta data for GVariant properties.
1254  * GParamSpec parent_instance;
1255  * private GParamSpec portion
1256  * GVariantType *type;
1257  * a GVariantType, or NULL
1258  * GVariant *default_value;
1259  * a GVariant, or NULL
1260  * Since 2.26
1261  */
1262 public struct GParamSpecVariant
1263 {
1264 	GParamSpec parentInstance;
1265 	GVariantType *type;
1266 	GVariant *defaultValue;
1267 }
1268 
1269 
1270 /**
1271  * Main Gtk struct.
1272  * All other fields of the GParamSpec struct are private and
1273  * should not be used directly.
1274  * GTypeInstance g_type_instance;
1275  * private GTypeInstance portion
1276  * gchar *name;
1277  * name of this parameter
1278  * GParamFlags flags;
1279  * GParamFlags flags for this parameter
1280  * GType value_type;
1281  * the GValue type for this parameter
1282  * GType owner_type;
1283  * GType type that uses (introduces) this parameter
1284  */
1285 public struct GParamSpec
1286 {
1287 	GTypeInstance gTypeInstance;
1288 	char *name;
1289 	GParamFlags flags;
1290 	GType valueType;
1291 	GType ownerType; /+* class or interface using this property +/
1292 }
1293 
1294 
1295 /**
1296  * The class structure for the GParamSpec type.
1297  * Normally, GParamSpec classes are filled by
1298  * g_param_type_register_static().
1299  * GTypeClass g_type_class;
1300  * the parent class
1301  * GType value_type;
1302  * the GValue type for this parameter
1303  * finalize ()
1304  * The instance finalization function (optional), should chain
1305  * up to the finalize method of the parent class.
1306  * value_set_default ()
1307  * Resets a value to the default value for this type
1308  * (recommended, the default is g_value_reset()), see
1309  * g_param_value_set_default().
1310  * value_validate ()
1311  * Ensures that the contents of value comply with the
1312  * specifications set out by this type (optional), see
1313  * g_param_value_set_validate().
1314  * values_cmp ()
1315  * Compares value1 with value2 according to this type
1316  * (recommended, the default is memcmp()), see g_param_values_cmp().
1317  */
1318 public struct GParamSpecClass
1319 {
1320 	GTypeClass gTypeClass;
1321 	GType valueType;
1322 	extern(C) void function(GParamSpec* pspec) finalize;
1323 	/+* GParam methods +/
1324 	extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault;
1325 	extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate;
1326 	extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp;
1327 }
1328 
1329 
1330 /**
1331  * This structure is used to provide the type system with the information
1332  * required to initialize and destruct (finalize) a parameter's class and
1333  * instances thereof.
1334  * The initialized structure is passed to the g_param_type_register_static()
1335  * The type system will perform a deep copy of this structure, so its memory
1336  * does not need to be persistent across invocation of
1337  * g_param_type_register_static().
1338  * guint16 instance_size;
1339  * Size of the instance (object) structure.
1340  * guint16 n_preallocs;
1341  * Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the slice allocator now.
1342  * instance_init ()
1343  * Location of the instance initialization function (optional).
1344  * GType value_type;
1345  * The GType of values conforming to this GParamSpec
1346  * finalize ()
1347  * The instance finalization function (optional).
1348  * value_set_default ()
1349  * Resets a value to the default value for pspec
1350  * (recommended, the default is g_value_reset()), see
1351  * g_param_value_set_default().
1352  * value_validate ()
1353  * Ensures that the contents of value comply with the
1354  * specifications set out by pspec (optional), see
1355  * g_param_value_set_validate().
1356  * values_cmp ()
1357  * Compares value1 with value2 according to pspec
1358  * (recommended, the default is memcmp()), see g_param_values_cmp().
1359  */
1360 public struct GParamSpecTypeInfo
1361 {
1362 	/+* type system portion +/
1363 	ushort instanceSize; /+* obligatory +/
1364 	ushort nPreallocs; /+* optional +/
1365 	extern(C) void function(GParamSpec* pspec) instanceInit; /+* optional +/
1366 	/+* class portion +/
1367 	GType valueType; /+* obligatory +/
1368 	extern(C) void function(GParamSpec* pspec) finalize; /+* optional +/
1369 	extern(C) void function(GParamSpec* pspec, /+* recommended +/GValue *value) valueSetDefault;
1370 	extern(C) int function(GParamSpec* pspec, /+* optional +/GValue *value) valueValidate;
1371 	extern(C) int function(GParamSpec* pspec, /+* recommended +/GValue *value1, GValue* value2) valuesCmp;
1372 }
1373 
1374 
1375 /**
1376  * A GParamSpecPool maintains a collection of GParamSpecs which can be
1377  * quickly accessed by owner and name. The implementation of the GObject property
1378  * system uses such a pool to store the GParamSpecs of the properties all object
1379  * types.
1380  */
1381 public struct GParamSpecPool{}
1382 
1383 
1384 /**
1385  * The GSignalInvocationHint structure is used to pass on additional information
1386  * to callbacks during a signal emission.
1387  * guint signal_id;
1388  * The signal id of the signal invoking the callback
1389  * GQuark detail;
1390  * The detail passed on for this emission
1391  * GSignalFlags run_type;
1392  * The stage the signal emission is currently in, this
1393  * field will contain one of G_SIGNAL_RUN_FIRST,
1394  * G_SIGNAL_RUN_LAST or G_SIGNAL_RUN_CLEANUP.
1395  */
1396 public struct GSignalInvocationHint
1397 {
1398 	uint signalId;
1399 	GQuark detail;
1400 	GSignalFlags runType;
1401 }
1402 
1403 
1404 /**
1405  * A structure holding in-depth information for a specific signal. It is
1406  * filled in by the g_signal_query() function.
1407  * guint signal_id;
1408  * The signal id of the signal being queried, or 0 if the
1409  * signal to be queried was unknown.
1410  * const gchar *signal_name;
1411  * The signal name.
1412  * GType itype;
1413  * The interface/instance type that this signal can be emitted for.
1414  * GSignalFlags signal_flags;
1415  * The signal flags as passed in to g_signal_new().
1416  * GType return_type;
1417  * The return type for user callbacks.
1418  * guint n_params;
1419  * The number of parameters that user callbacks take.
1420  * const GType *param_types;
1421  * The individual parameter types for user callbacks, note that the
1422  * effective callback signature is:
1423  * @return_type callback (gpointer data1,
1424  * [param_types param_names,]
1425  * gpointer data2);
1426  */
1427 public struct GSignalQuery
1428 {
1429 	uint signalId;
1430 	char *signalName;
1431 	GType itype;
1432 	GSignalFlags signalFlags;
1433 	GType returnType; /+* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag +/
1434 	uint nParams;
1435 	GType *paramTypes; /+* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag +/
1436 }
1437 
1438 
1439 /**
1440  * Main Gtk struct.
1441  * A GClosure represents a callback supplied by the programmer.
1442  * volatile 	guint in_marshal : 1;
1443  * Indicates whether the closure is currently being invoked with
1444  * g_closure_invoke()
1445  * volatile 	guint is_invalid : 1;
1446  * Indicates whether the closure has been invalidated by
1447  * g_closure_invalidate()
1448  */
1449 public struct GClosure
1450 {
1451 	uint bitfield0;
1452 	//uint inMarshal : 1;
1453 	//uint isInvalid : 1;
1454 }
1455 
1456 
1457 /**
1458  * A GCClosure is a specialization of GClosure for C function callbacks.
1459  * GClosure closure;
1460  * the GClosure
1461  * gpointer callback;
1462  * the callback function
1463  */
1464 public struct GCClosure
1465 {
1466 	GClosure closure;
1467 	void* callback;
1468 }
1469 
1470 
1471 /**
1472  * Main Gtk struct.
1473  * A GValueArray contains an array of GValue elements.
1474  * guint n_values;
1475  * number of values contained in the array
1476  * GValue *values;
1477  * array of values
1478  */
1479 public struct GValueArray
1480 {
1481 	uint nValues;
1482 	GValue *values;
1483 }
1484 
1485 
1486 /**
1487  * Main Gtk struct.
1488  * GBinding is an opaque structure whose members
1489  * cannot be accessed directly.
1490  * Since 2.26
1491  */
1492 public struct GBinding{}
1493 
1494 
1495 /*
1496  * The fundamental type which is the ancestor of type.
1497  * Fundamental types are types that serve as ultimate bases for the derived types,
1498  * thus they are the roots of distinct inheritance hierarchies.
1499  * type :
1500  * A GType value.
1501  */
1502 // TODO
1503 // #define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type))
1504 
1505 /*
1506  * Get the type ID for the fundamental type number x.
1507  * Use g_type_fundamental_next() instead of this macro to create new fundamental
1508  * types.
1509  * x :
1510  * the fundamental type number.
1511  * Returns :
1512  * the GType
1513  */
1514 // TODO
1515 // #define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT))
1516 
1517 /*
1518  * Checks if type is an abstract type. An abstract type can not be
1519  * instantiated and is normally used as an abstract base class for
1520  * derived classes.
1521  * type :
1522  * A GType value.
1523  * Returns :
1524  * TRUE on success.
1525  */
1526 // TODO
1527 // #define G_TYPE_IS_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT))
1528 
1529 /*
1530  * Checks if type is derived (or in object-oriented terminology:
1531  * inherited) from another type (this holds true for all non-fundamental
1532  * types).
1533  * type :
1534  * A GType value.
1535  * Returns :
1536  * TRUE on success.
1537  */
1538 // TODO
1539 // #define G_TYPE_IS_DERIVED(type) ((type) > G_TYPE_FUNDAMENTAL_MAX)
1540 
1541 /*
1542  * Checks if type is a fundamental type.
1543  * type :
1544  * A GType value.
1545  * Returns :
1546  * TRUE on success.
1547  */
1548 // TODO
1549 // #define G_TYPE_IS_FUNDAMENTAL(type) ((type) <= G_TYPE_FUNDAMENTAL_MAX)
1550 
1551 /*
1552  * Checks if type is a value type and can be used with g_value_init().
1553  * type :
1554  * A GType value.
1555  * Returns :
1556  * TRUE on success.
1557  */
1558 // TODO
1559 // #define G_TYPE_IS_VALUE_TYPE(type) (g_type_check_is_value_type (type))
1560 
1561 /*
1562  * Checks if type has a GTypeValueTable.
1563  * type :
1564  * A GType value.
1565  * Returns :
1566  * TRUE on success.
1567  */
1568 // TODO
1569 // #define G_TYPE_HAS_VALUE_TABLE(type) (g_type_value_table_peek (type) != NULL)
1570 
1571 /*
1572  * Checks if type is a classed type.
1573  * type :
1574  * A GType value.
1575  * Returns :
1576  * TRUE on success.
1577  */
1578 // TODO
1579 // #define G_TYPE_IS_CLASSED(type) (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
1580 
1581 /*
1582  * Checks if type can be instantiated. Instantiation is the
1583  * process of creating an instance (object) of this type.
1584  * type :
1585  * A GType value.
1586  * Returns :
1587  * TRUE on success.
1588  */
1589 // TODO
1590 // #define G_TYPE_IS_INSTANTIATABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
1591 
1592 /*
1593  * Checks if type is a derivable type. A derivable type can
1594  * be used as the base class of a flat (single-level) class hierarchy.
1595  * type :
1596  * A GType value.
1597  * Returns :
1598  * TRUE on success.
1599  */
1600 // TODO
1601 // #define G_TYPE_IS_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE))
1602 
1603 /*
1604  * Checks if type is a deep derivable type. A deep derivable type
1605  * can be used as the base class of a deep (multi-level) class hierarchy.
1606  * type :
1607  * A GType value.
1608  * Returns :
1609  * TRUE on success.
1610  */
1611 // TODO
1612 // #define G_TYPE_IS_DEEP_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE))
1613 
1614 /*
1615  * Checks if type is an interface type.
1616  * An interface type provides a pure API, the implementation
1617  * of which is provided by another type (which is then said to conform
1618  * to the interface). GLib interfaces are somewhat analogous to Java
1619  * interfaces and C++ classes containing only pure virtual functions,
1620  * with the difference that GType interfaces are not derivable (but see
1621  * g_type_interface_add_prerequisite() for an alternative).
1622  * type :
1623  * A GType value.
1624  * Returns :
1625  * TRUE on success.
1626  */
1627 // TODO
1628 // #define G_TYPE_IS_INTERFACE(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
1629 
1630 /*
1631  * Get the type identifier from a given instance structure.
1632  * This macro should only be used in type implementations.
1633  * instance :
1634  * Location of a valid GTypeInstance structure.
1635  * Returns :
1636  * the GType
1637  */
1638 // TODO
1639 // #define G_TYPE_FROM_INSTANCE(instance) (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class))
1640 
1641 /*
1642  * Get the type identifier from a given class structure.
1643  * This macro should only be used in type implementations.
1644  * g_class :
1645  * Location of a valid GTypeClass structure.
1646  * Returns :
1647  * the GType
1648  */
1649 // TODO
1650 // #define G_TYPE_FROM_CLASS(g_class) (((GTypeClass*) (g_class))->g_type)
1651 
1652 /*
1653  * Get the type identifier from a given interface structure.
1654  * This macro should only be used in type implementations.
1655  * g_iface :
1656  * Location of a valid GTypeInterface structure.
1657  * Returns :
1658  * the GType
1659  */
1660 // TODO
1661 // #define G_TYPE_FROM_INTERFACE(g_iface) (((GTypeInterface*) (g_iface))->g_type)
1662 
1663 /*
1664  * Get the class structure of a given instance, casted
1665  * to a specified ancestor type g_type of the instance.
1666  * Note that while calling a GInstanceInitFunc(), the class pointer gets
1667  * modified, so it might not always return the expected pointer.
1668  * This macro should only be used in type implementations.
1669  * instance :
1670  * Location of the GTypeInstance structure.
1671  * g_type :
1672  * The GType of the class to be returned.
1673  * c_type :
1674  * The C type of the class structure.
1675  * Returns :
1676  * a pointer to the class structure
1677  */
1678 // TODO
1679 // #define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type))
1680 
1681 /*
1682  * Get the interface structure for interface g_type of a given instance.
1683  * This macro should only be used in type implementations.
1684  * instance :
1685  * Location of the GTypeInstance structure.
1686  * g_type :
1687  * The GType of the interface to be returned.
1688  * c_type :
1689  * The C type of the interface structure.
1690  * Returns :
1691  * a pointer to the interface structure
1692  */
1693 // TODO
1694 // #define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
1695 
1696 /*
1697  * Gets the private structure for a particular type.
1698  * The private structure must have been registered in the
1699  * class_init function with g_type_class_add_private().
1700  * This macro should only be used in type implementations.
1701  * instance :
1702  * the instance of a type deriving from private_type.
1703  * g_type :
1704  * the type identifying which private data to retrieve.
1705  * c_type :
1706  * The C type for the private structure.
1707  * Returns :
1708  * a pointer to the private data structure.
1709  * Since 2.4
1710  */
1711 // TODO
1712 // #define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
1713 
1714 /*
1715  * Gets the private class structure for a particular type.
1716  * The private structure must have been registered in the
1717  * get_type() function with g_type_add_class_private().
1718  * This macro should only be used in type implementations.
1719  * klass :
1720  * the class of a type deriving from private_type.
1721  * g_type :
1722  * the type identifying which private data to retrieve.
1723  * c_type :
1724  * The C type for the private structure.
1725  * Returns :
1726  * a pointer to the private data structure.
1727  * Since 2.24
1728  */
1729 // TODO
1730 // #define G_TYPE_CLASS_GET_PRIVATE(klass, g_type, c_type) ((c_type*) g_type_class_get_private ((GTypeClass*) (klass), (g_type)))
1731 
1732 /*
1733  * Checks if instance is a valid GTypeInstance structure,
1734  * otherwise issues a warning and returns FALSE.
1735  * This macro should only be used in type implementations.
1736  * instance :
1737  * Location of a GTypeInstance structure.
1738  * Returns :
1739  * TRUE on success.
1740  */
1741 // TODO
1742 // #define G_TYPE_CHECK_INSTANCE(instance)				(_G_TYPE_CHI ((GTypeInstance*) (instance)))
1743 
1744 /*
1745  * Checks that instance is an instance of the type identified by g_type
1746  * and issues a warning if this is not the case. Returns instance casted
1747  * to a pointer to c_type.
1748  * This macro should only be used in type implementations.
1749  * instance :
1750  * Location of a GTypeInstance structure.
1751  * g_type :
1752  * The type to be returned.
1753  * c_type :
1754  * The corresponding C type of g_type.
1755  */
1756 // TODO
1757 // #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
1758 
1759 /*
1760  * Checks if instance is an instance of the type identified by g_type.
1761  * This macro should only be used in type implementations.
1762  * instance :
1763  * Location of a GTypeInstance structure.
1764  * g_type :
1765  * The type to be checked
1766  * Returns :
1767  * TRUE on success.
1768  */
1769 // TODO
1770 // #define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type) (_G_TYPE_CIT ((instance), (g_type)))
1771 
1772 /*
1773  * Checks that g_class is a class structure of the type identified by g_type
1774  * and issues a warning if this is not the case. Returns g_class casted
1775  * to a pointer to c_type.
1776  * This macro should only be used in type implementations.
1777  * g_class :
1778  * Location of a GTypeClass structure.
1779  * g_type :
1780  * The type to be returned.
1781  * c_type :
1782  * The corresponding C type of class structure of g_type.
1783  */
1784 // TODO
1785 // #define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type) (_G_TYPE_CCC ((g_class), (g_type), c_type))
1786 
1787 /*
1788  * Checks if g_class is a class structure of the type identified by
1789  * g_type.
1790  * This macro should only be used in type implementations.
1791  * g_class :
1792  * Location of a GTypeClass structure.
1793  * g_type :
1794  * The type to be checked.
1795  * Returns :
1796  * TRUE on success.
1797  */
1798 // TODO
1799 // #define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type) (_G_TYPE_CCT ((g_class), (g_type)))
1800 
1801 /*
1802  * Checks if value has been initialized to hold values
1803  * of a value type.
1804  * This macro should only be used in type implementations.
1805  * value :
1806  * a GValue
1807  * Returns :
1808  * TRUE on success.
1809  */
1810 // TODO
1811 // #define G_TYPE_CHECK_VALUE(value)				(_G_TYPE_CHV ((value)))
1812 
1813 /*
1814  * Checks if value has been initialized to hold values
1815  * of type g_type.
1816  * This macro should only be used in type implementations.
1817  * value :
1818  * a GValue
1819  * g_type :
1820  * The type to be checked.
1821  * Returns :
1822  * TRUE on success.
1823  */
1824 // TODO
1825 // #define G_TYPE_CHECK_VALUE_TYPE(value, g_type)			(_G_TYPE_CVH ((value), (g_type)))
1826 
1827 /*
1828  * A convenience macro for type implementations, which declares a
1829  * class initialization function, an instance initialization function (see GTypeInfo for information about
1830  * these) and a static variable named t_n_parent_class pointing to the parent class. Furthermore, it defines
1831  * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
1832  * TN :
1833  * The name of the new type, in Camel case.
1834  * t_n :
1835  * The name of the new type, in lowercase, with words
1836  * separated by '_'.
1837  * T_P :
1838  * The GType of the parent type.
1839  * Since 2.4
1840  */
1841 // TODO
1842 // #define G_DEFINE_TYPE(TN, t_n, T_P)			 G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
1843 
1844 /*
1845  * A convenience macro for type implementations.
1846  * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
1847  * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
1848  * See G_DEFINE_TYPE_EXTENDED() for an example.
1849  * TN :
1850  * The name of the new type, in Camel case.
1851  * t_n :
1852  * The name of the new type in lowercase, with words separated by '_'.
1853  * T_P :
1854  * The GType of the parent type.
1855  * _C_ :
1856  * Custom code that gets inserted in the *_get_type() function.
1857  * Since 2.4
1858  */
1859 // TODO
1860 // #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)	 _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
1861 
1862 /*
1863  * A convenience macro for type implementations.
1864  * Similar to G_DEFINE_TYPE(), but defines an abstract type.
1865  * See G_DEFINE_TYPE_EXTENDED() for an example.
1866  * TN :
1867  * The name of the new type, in Camel case.
1868  * t_n :
1869  * The name of the new type, in lowercase, with words
1870  * separated by '_'.
1871  * T_P :
1872  * The GType of the parent type.
1873  * Since 2.4
1874  */
1875 // TODO
1876 // #define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P)		 G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
1877 
1878 /*
1879  * A convenience macro for type implementations.
1880  * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
1881  * insert custom code into the *_get_type() function, e.g. interface implementations
1882  * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
1883  * TN :
1884  * The name of the new type, in Camel case.
1885  * t_n :
1886  * The name of the new type, in lowercase, with words
1887  * separated by '_'.
1888  * T_P :
1889  * The GType of the parent type.
1890  * _C_ :
1891  * Custom code that gets inserted in the @type_name_get_type() function.
1892  * Since 2.4
1893  */
1894 // TODO
1895 // #define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
1896 
1897 /*
1898  * A convenience macro for GTypeInterface definitions, which declares
1899  * a default vtable initialization function and defines a *_get_type()
1900  * function.
1901  * The macro expects the interface initialization function to have the
1902  * name t_n ## _default_init, and the interface
1903  * structure to have the name TN ## Interface.
1904  * TN :
1905  * The name of the new type, in Camel case.
1906  * t_n :
1907  * The name of the new type, in lowercase, with words separated by '_'.
1908  * T_P :
1909  * The GType of the prerequisite type for the interface, or 0
1910  * (G_TYPE_INVALID) for no prerequisite type.
1911  * Since 2.24
1912  */
1913 // TODO
1914 // #define G_DEFINE_INTERFACE(TN, t_n, T_P)		 G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;)
1915 
1916 /*
1917  * A convenience macro for GTypeInterface definitions. Similar to
1918  * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
1919  * *_get_type() function, e.g. additional interface implementations
1920  * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
1921  * G_DEFINE_TYPE_EXTENDED() for a similar example using
1922  * G_DEFINE_TYPE_WITH_CODE().
1923  * TN :
1924  * The name of the new type, in Camel case.
1925  * t_n :
1926  * The name of the new type, in lowercase, with words separated by '_'.
1927  * T_P :
1928  * The GType of the prerequisite type for the interface, or 0
1929  * (G_TYPE_INVALID) for no prerequisite type.
1930  * _C_ :
1931  * Custom code that gets inserted in the *_get_type() function.
1932  * Since 2.24
1933  */
1934 // TODO
1935 // #define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P) {_C_;} _G_DEFINE_INTERFACE_EXTENDED_END()
1936 
1937 /*
1938  * A convenience macro to ease interface addition in the _C_ section
1939  * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
1940  * See G_DEFINE_TYPE_EXTENDED() for an example.
1941  * Note that this macro can only be used together with the G_DEFINE_TYPE_*
1942  * macros, since it depends on variable names from those macros.
1943  * TYPE_IFACE :
1944  * The GType of the interface to add
1945  * iface_init :
1946  * The interface init function
1947  * Since 2.4
1948  */
1949 // TODO
1950 // #define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)
1951 
1952 /*
1953  * The most general convenience macro for type implementations, on which
1954  * G_DEFINE_TYPE(), etc are based.
1955  * $(DDOC_COMMENT example)
1956  * expands to
1957  * $(DDOC_COMMENT example)
1958  * The only pieces which have to be manually provided are the definitions of
1959  * the instance and class structure and the definitions of the instance and
1960  * class init functions.
1961  * TN :
1962  * The name of the new type, in Camel case.
1963  * t_n :
1964  * The name of the new type, in lowercase, with words
1965  * separated by '_'.
1966  * T_P :
1967  * The GType of the parent type.
1968  * _f_ :
1969  * GTypeFlags to pass to g_type_register_static()
1970  * _C_ :
1971  * Custom code that gets inserted in the *_get_type() function.
1972  * Since 2.4
1973  */
1974 // TODO
1975 // #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)	 _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
1976 
1977 /*
1978  * A convenience macro for boxed type implementations, which defines a
1979  * type_name_get_type() function registering the boxed type.
1980  * TypeName :
1981  * The name of the new type, in Camel case.
1982  * type_name :
1983  * The name of the new type, in lowercase, with words
1984  * separated by '_'.
1985  * copy_func :
1986  * the GBoxedCopyFunc for the new type
1987  * free_func :
1988  * the GBoxedFreeFunc for the new type
1989  * Since 2.26
1990  */
1991 // TODO
1992 // #define G_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) G_DEFINE_BOXED_TYPE_WITH_CODE (TypeName, type_name, copy_func, free_func, {})
1993 
1994 /*
1995  * A convenience macro for boxed type implementations.
1996  * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
1997  * type_name_get_type() function, e.g. to register value transformations with
1998  * g_value_register_transform_func().
1999  * TypeName :
2000  * The name of the new type, in Camel case.
2001  * type_name :
2002  * The name of the new type, in lowercase, with words
2003  * separated by '_'.
2004  * copy_func :
2005  * the GBoxedCopyFunc for the new type
2006  * free_func :
2007  * the GBoxedFreeFunc for the new type
2008  * _C_ :
2009  * Custom code that gets inserted in the *_get_type() function.
2010  * Since 2.26
2011  */
2012 // TODO
2013 // #define G_DEFINE_BOXED_TYPE_WITH_CODE(TypeName, type_name, copy_func, free_func, _C_) _G_DEFINE_BOXED_TYPE_BEGIN (TypeName, type_name, copy_func, free_func) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
2014 
2015 /*
2016  * A convenience macro for pointer type implementations, which defines a
2017  * type_name_get_type() function registering the pointer type.
2018  * TypeName :
2019  * The name of the new type, in Camel case.
2020  * type_name :
2021  * The name of the new type, in lowercase, with words
2022  * separated by '_'.
2023  * Since 2.26
2024  */
2025 // TODO
2026 // #define G_DEFINE_POINTER_TYPE(TypeName, type_name) G_DEFINE_POINTER_TYPE_WITH_CODE (TypeName, type_name, {})
2027 
2028 /*
2029  * A convenience macro for pointer type implementations.
2030  * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
2031  * type_name_get_type() function.
2032  * TypeName :
2033  * The name of the new type, in Camel case.
2034  * type_name :
2035  * The name of the new type, in lowercase, with words
2036  * separated by '_'.
2037  * _C_ :
2038  * Custom code that gets inserted in the *_get_type() function.
2039  * Since 2.26
2040  */
2041 // TODO
2042 // #define G_DEFINE_POINTER_TYPE_WITH_CODE(TypeName, type_name, _C_) _G_DEFINE_POINTER_TYPE_BEGIN (TypeName, type_name) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
2043 
2044 /*
2045  * A convenience macro for dynamic type implementations, which declares a
2046  * class initialization function, an instance initialization function (see
2047  * GTypeInfo for information about these) and a static variable named
2048  * t_n_parent_class pointing to the parent class. Furthermore,
2049  * it defines a *_get_type() and a static
2050  * *_register_type() function for use in your
2051  * module_init().
2052  * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
2053  * TN :
2054  * The name of the new type, in Camel case.
2055  * t_n :
2056  * The name of the new type, in lowercase, with words
2057  * separated by '_'.
2058  * T_P :
2059  * The GType of the parent type.
2060  * Since 2.14
2061  */
2062 // TODO
2063 // #define G_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) G_DEFINE_DYNAMIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
2064 
2065 /*
2066  * A more general version of G_DEFINE_DYNAMIC_TYPE() which
2067  * allows to specify GTypeFlags and custom code.
2068  * $(DDOC_COMMENT example)
2069  * expands to
2070  * $(DDOC_COMMENT example)
2071  * TypeName :
2072  * The name of the new type, in Camel case.
2073  * type_name :
2074  * The name of the new type, in lowercase, with words
2075  * separated by '_'.
2076  * TYPE_PARENT :
2077  * The GType of the parent type.
2078  * flags :
2079  * GTypeFlags to pass to g_type_module_register_type()
2080  * CODE :
2081  * Custom code that gets inserted in the *_get_type() function.
2082  * Since 2.14
2083  */
2084 // TODO
2085 // #define G_DEFINE_DYNAMIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE)
2086 
2087 /*
2088  * A convenience macro to ease interface addition in the _C_ section
2089  * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
2090  * for an example.
2091  * Note that this macro can only be used together with the
2092  * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
2093  * names from that macro.
2094  * TYPE_IFACE :
2095  * The GType of the interface to add
2096  * iface_init :
2097  * The interface init function
2098  * Since 2.24
2099  * See Also
2100  * GTypePlugin
2101  * The abstract type loader interface.
2102  * GModule
2103  * Portable mechanism for dynamically loaded modules.
2104  */
2105 // TODO
2106 // #define G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init)
2107 
2108 /*
2109  * Check if the passed in type id is a G_TYPE_OBJECT or derived from it.
2110  * type :
2111  * Type id to check
2112  * Returns :
2113  * FALSE or TRUE, indicating whether type is a G_TYPE_OBJECT.
2114  */
2115 // TODO
2116 // #define G_TYPE_IS_OBJECT(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
2117 
2118 /*
2119  * Casts a GObject or derived pointer into a (GObject*) pointer.
2120  * Depending on the current debugging level, this function may invoke
2121  * certain runtime checks to identify invalid casts.
2122  * object :
2123  * Object which is subject to casting.
2124  */
2125 // TODO
2126 // #define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject))
2127 
2128 /*
2129  * Checks whether a valid GTypeInstance pointer is of type G_TYPE_OBJECT.
2130  * object :
2131  * Instance to check for being a G_TYPE_OBJECT.
2132  */
2133 // TODO
2134 // #define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT))
2135 
2136 /*
2137  * Casts a derived GObjectClass structure into a GObjectClass structure.
2138  * class :
2139  * a valid GObjectClass
2140  */
2141 // TODO
2142 // #define G_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass))
2143 
2144 /*
2145  * Checks whether class "is a" valid GObjectClass structure of type
2146  * G_TYPE_OBJECT or derived.
2147  * class :
2148  * a GObjectClass
2149  */
2150 // TODO
2151 // #define G_IS_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT))
2152 
2153 /*
2154  * Get the class structure associated to a GObject instance.
2155  * object :
2156  * a GObject instance.
2157  * Returns :
2158  * pointer to object class structure.
2159  */
2160 // TODO
2161 // #define G_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))
2162 
2163 /*
2164  * Get the type id of an object.
2165  * object :
2166  * Object to return the type id for.
2167  * Returns :
2168  * Type id of object.
2169  */
2170 // TODO
2171 // #define G_OBJECT_TYPE(object) (G_TYPE_FROM_INSTANCE (object))
2172 
2173 /*
2174  * Get the name of an object's type.
2175  * object :
2176  * Object to return the type name for.
2177  * Returns :
2178  * Type name of object. The string is owned by the type system and
2179  * should not be freed.
2180  */
2181 // TODO
2182 // #define G_OBJECT_TYPE_NAME(object) (g_type_name (G_OBJECT_TYPE (object)))
2183 
2184 /*
2185  * Get the type id of a class structure.
2186  * class :
2187  * a valid GObjectClass
2188  * Returns :
2189  * Type id of class.
2190  */
2191 // TODO
2192 // #define G_OBJECT_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
2193 
2194 /*
2195  * Return the name of a class structure's type.
2196  * class :
2197  * a valid GObjectClass
2198  * Returns :
2199  * Type name of class. The string is owned by the type system and
2200  * should not be freed.
2201  */
2202 // TODO
2203 // #define G_OBJECT_CLASS_NAME(class) (g_type_name (G_OBJECT_CLASS_TYPE (class)))
2204 
2205 /*
2206  * This macro should be used to emit a standard warning about unexpected
2207  * properties in set_property() and get_property() implementations.
2208  * object :
2209  * the GObject on which set_property() or get_property() was called
2210  * property_id :
2211  * the numeric id of the property
2212  * pspec :
2213  * the GParamSpec of the property
2214  * Signal Details
2215  * The "notify" signal
2216  * void user_function (GObject *gobject,
2217  *  GParamSpec *pspec,
2218  *  gpointer user_data) : No Hooks
2219  * The notify signal is emitted on an object when one of its
2220  * properties has been changed. Note that getting this signal
2221  * doesn't guarantee that the value of the property has actually
2222  * changed, it may also be emitted when the setter for the property
2223  * is called to reinstate the previous value.
2224  * This signal is typically used to obtain change notification for a
2225  * single property, by specifying the property name as a detail in the
2226  * g_signal_connect() call, like this:
2227  * $(DDOC_COMMENT example)
2228  * It is important to note that you must use
2229  * canonical parameter names as
2230  * detail strings for the notify signal.
2231  * gobject :
2232  * the object which received the signal.
2233  * pspec :
2234  * the GParamSpec of the property which changed.
2235  * user_data :
2236  * user data set when the signal handler was connected.
2237  * See Also
2238  * GParamSpecObject, g_param_spec_object()
2239  */
2240 // TODO
2241 // #define G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec)
2242 
2243 /*
2244  * Get the type identifier from a given GEnumClass structure.
2245  * class :
2246  * a GEnumClass
2247  * Returns :
2248  * the GType
2249  */
2250 // TODO
2251 // #define G_ENUM_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
2252 
2253 /*
2254  * Get the static type name from a given GEnumClass structure.
2255  * class :
2256  * a GEnumClass
2257  * Returns :
2258  * the type name.
2259  */
2260 // TODO
2261 // #define G_ENUM_CLASS_TYPE_NAME(class) (g_type_name (G_ENUM_CLASS_TYPE (class)))
2262 
2263 /*
2264  * Checks whether type "is a" G_TYPE_ENUM.
2265  * type :
2266  * a GType ID.
2267  * Returns :
2268  * TRUE if type "is a" G_TYPE_ENUM.
2269  */
2270 // TODO
2271 // #define G_TYPE_IS_ENUM(type)	 (G_TYPE_FUNDAMENTAL (type) == G_TYPE_ENUM)
2272 
2273 /*
2274  * Casts a derived GEnumClass structure into a GEnumClass structure.
2275  * class :
2276  * a valid GEnumClass
2277  */
2278 // TODO
2279 // #define G_ENUM_CLASS(class)	 (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_ENUM, GEnumClass))
2280 
2281 /*
2282  * Checks whether class "is a" valid GEnumClass structure of type G_TYPE_ENUM
2283  * or derived.
2284  * class :
2285  * a GEnumClass
2286  */
2287 // TODO
2288 // #define G_IS_ENUM_CLASS(class)	 (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_ENUM))
2289 
2290 /*
2291  * Checks whether type "is a" G_TYPE_FLAGS.
2292  * type :
2293  * a GType ID.
2294  * Returns :
2295  * TRUE if type "is a" G_TYPE_FLAGS.
2296  */
2297 // TODO
2298 // #define G_TYPE_IS_FLAGS(type)	 (G_TYPE_FUNDAMENTAL (type) == G_TYPE_FLAGS)
2299 
2300 /*
2301  * Casts a derived GFlagsClass structure into a GFlagsClass structure.
2302  * class :
2303  * a valid GFlagsClass
2304  */
2305 // TODO
2306 // #define G_FLAGS_CLASS(class)	 (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_FLAGS, GFlagsClass))
2307 
2308 /*
2309  * Checks whether class "is a" valid GFlagsClass structure of type G_TYPE_FLAGS
2310  * or derived.
2311  * class :
2312  * a GFlagsClass
2313  */
2314 // TODO
2315 // #define G_IS_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_FLAGS))
2316 
2317 /*
2318  * Get the type identifier from a given GFlagsClass structure.
2319  * class :
2320  * a GFlagsClass
2321  * Returns :
2322  * the GType
2323  */
2324 // TODO
2325 // #define G_FLAGS_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
2326 
2327 /*
2328  * Get the static type name from a given GFlagsClass structure.
2329  * class :
2330  * a GFlagsClass
2331  * Returns :
2332  * the type name.
2333  */
2334 // TODO
2335 // #define G_FLAGS_CLASS_TYPE_NAME(class) (g_type_name (G_FLAGS_CLASS_TYPE (class)))
2336 
2337 /*
2338  * Checks if value holds (or contains) a value of type.
2339  * This macro will also check for value != NULL and issue a
2340  * warning if the check fails.
2341  * value :
2342  * A GValue structure.
2343  * type :
2344  * A GType value.
2345  * Returns :
2346  * TRUE if value holds the type.
2347  */
2348 // TODO
2349 // #define G_VALUE_HOLDS(value,type) (G_TYPE_CHECK_VALUE_TYPE ((value), (type)))
2350 
2351 /*
2352  * Get the type identifier of value.
2353  * value :
2354  * A GValue structure.
2355  * Returns :
2356  * the GType.
2357  */
2358 // TODO
2359 // #define G_VALUE_TYPE(value)		(((GValue*) (value))->g_type)
2360 
2361 /*
2362  * Gets the the type name of value.
2363  * value :
2364  * A GValue structure.
2365  * Returns :
2366  * the type name.
2367  */
2368 // TODO
2369 // #define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value)))
2370 
2371 /*
2372  * Checks whether the passed in type ID can be used for g_value_init().
2373  * That is, this macro checks whether this type provides an implementation
2374  * of the GTypeValueTable functions required for a type to create a GValue of.
2375  * type :
2376  * A GType value.
2377  * Returns :
2378  * Whether type is suitable as a GValue type.
2379  */
2380 // TODO
2381 // #define G_TYPE_IS_VALUE(type)		(g_type_check_is_value_type (type))
2382 
2383 /*
2384  * Checks if type is an abstract value type. An abstract value type introduces
2385  * a value table, but can't be used for g_value_init() and is normally used as
2386  * an abstract base type for derived value types.
2387  * type :
2388  * A GType value.
2389  * Returns :
2390  * TRUE on success.
2391  */
2392 // TODO
2393 // #define G_TYPE_IS_VALUE_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_VALUE_ABSTRACT))
2394 
2395 /*
2396  * Checks if value is a valid and initialized GValue structure.
2397  * value :
2398  * A GValue structure.
2399  * Returns :
2400  * TRUE on success.
2401  */
2402 // TODO
2403 // #define G_IS_VALUE(value)		(G_TYPE_CHECK_VALUE (value))
2404 
2405 /*
2406  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_BOOLEAN.
2407  * pspec :
2408  * a valid GParamSpec instance
2409  * Returns :
2410  * TRUE on success.
2411  */
2412 // TODO
2413 // #define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
2414 
2415 /*
2416  * Cast a GParamSpec instance into a GParamSpecBoolean.
2417  * pspec :
2418  * a valid GParamSpec instance
2419  */
2420 // TODO
2421 // #define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
2422 
2423 /*
2424  * Checks whether the given GValue can hold values of type G_TYPE_BOOLEAN.
2425  * value :
2426  * a valid GValue structure
2427  * Returns :
2428  * TRUE on success.
2429  */
2430 // TODO
2431 // #define G_VALUE_HOLDS_BOOLEAN(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN))
2432 
2433 /*
2434  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_CHAR.
2435  * pspec :
2436  * a valid GParamSpec instance
2437  * Returns :
2438  * TRUE on success.
2439  */
2440 // TODO
2441 // #define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
2442 
2443 /*
2444  * Cast a GParamSpec instance into a GParamSpecChar.
2445  * pspec :
2446  * a valid GParamSpec instance
2447  */
2448 // TODO
2449 // #define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
2450 
2451 /*
2452  * Checks whether the given GValue can hold values of type G_TYPE_CHAR.
2453  * value :
2454  * a valid GValue structure
2455  * Returns :
2456  * TRUE on success.
2457  */
2458 // TODO
2459 // #define G_VALUE_HOLDS_CHAR(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR))
2460 
2461 /*
2462  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_UCHAR.
2463  * pspec :
2464  * a valid GParamSpec instance
2465  * Returns :
2466  * TRUE on success.
2467  */
2468 // TODO
2469 // #define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
2470 
2471 /*
2472  * Cast a GParamSpec instance into a GParamSpecUChar.
2473  * pspec :
2474  * a valid GParamSpec instance
2475  */
2476 // TODO
2477 // #define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
2478 
2479 /*
2480  * Checks whether the given GValue can hold values of type G_TYPE_UCHAR.
2481  * value :
2482  * a valid GValue structure
2483  * Returns :
2484  * TRUE on success.
2485  */
2486 // TODO
2487 // #define G_VALUE_HOLDS_UCHAR(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR))
2488 
2489 /*
2490  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_INT.
2491  * pspec :
2492  * a valid GParamSpec instance
2493  * Returns :
2494  * TRUE on success.
2495  */
2496 // TODO
2497 // #define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
2498 
2499 /*
2500  * Cast a GParamSpec instance into a GParamSpecInt.
2501  * pspec :
2502  * a valid GParamSpec instance
2503  */
2504 // TODO
2505 // #define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
2506 
2507 /*
2508  * Checks whether the given GValue can hold values of type G_TYPE_INT.
2509  * value :
2510  * a valid GValue structure
2511  * Returns :
2512  * TRUE on success.
2513  */
2514 // TODO
2515 // #define G_VALUE_HOLDS_INT(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT))
2516 
2517 /*
2518  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_UINT.
2519  * pspec :
2520  * a valid GParamSpec instance
2521  * Returns :
2522  * TRUE on success.
2523  */
2524 // TODO
2525 // #define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
2526 
2527 /*
2528  * Cast a GParamSpec instance into a GParamSpecUInt.
2529  * pspec :
2530  * a valid GParamSpec instance
2531  */
2532 // TODO
2533 // #define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
2534 
2535 /*
2536  * Checks whether the given GValue can hold values of type G_TYPE_UINT.
2537  * value :
2538  * a valid GValue structure
2539  * Returns :
2540  * TRUE on success.
2541  */
2542 // TODO
2543 // #define G_VALUE_HOLDS_UINT(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT))
2544 
2545 /*
2546  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_LONG.
2547  * pspec :
2548  * a valid GParamSpec instance
2549  * Returns :
2550  * TRUE on success.
2551  */
2552 // TODO
2553 // #define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
2554 
2555 /*
2556  * Cast a GParamSpec instance into a GParamSpecLong.
2557  * pspec :
2558  * a valid GParamSpec instance
2559  */
2560 // TODO
2561 // #define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
2562 
2563 /*
2564  * Checks whether the given GValue can hold values of type G_TYPE_LONG.
2565  * value :
2566  * a valid GValue structure
2567  * Returns :
2568  * TRUE on success.
2569  */
2570 // TODO
2571 // #define G_VALUE_HOLDS_LONG(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_LONG))
2572 
2573 /*
2574  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_ULONG.
2575  * pspec :
2576  * a valid GParamSpec instance
2577  * Returns :
2578  * TRUE on success.
2579  */
2580 // TODO
2581 // #define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
2582 
2583 /*
2584  * Cast a GParamSpec instance into a GParamSpecULong.
2585  * pspec :
2586  * a valid GParamSpec instance
2587  */
2588 // TODO
2589 // #define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
2590 
2591 /*
2592  * Checks whether the given GValue can hold values of type G_TYPE_ULONG.
2593  * value :
2594  * a valid GValue structure
2595  * Returns :
2596  * TRUE on success.
2597  */
2598 // TODO
2599 // #define G_VALUE_HOLDS_ULONG(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ULONG))
2600 
2601 /*
2602  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_INT64.
2603  * pspec :
2604  * a valid GParamSpec instance
2605  * Returns :
2606  * TRUE on success.
2607  */
2608 // TODO
2609 // #define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
2610 
2611 /*
2612  * Cast a GParamSpec instance into a GParamSpecInt64.
2613  * pspec :
2614  * a valid GParamSpec instance
2615  */
2616 // TODO
2617 // #define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
2618 
2619 /*
2620  * Checks whether the given GValue can hold values of type G_TYPE_INT64.
2621  * value :
2622  * a valid GValue structure
2623  * Returns :
2624  * TRUE on success.
2625  */
2626 // TODO
2627 // #define G_VALUE_HOLDS_INT64(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT64))
2628 
2629 /*
2630  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_UINT64.
2631  * pspec :
2632  * a valid GParamSpec instance
2633  * Returns :
2634  * TRUE on success.
2635  */
2636 // TODO
2637 // #define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
2638 
2639 /*
2640  * Cast a GParamSpec instance into a GParamSpecUInt64.
2641  * pspec :
2642  * a valid GParamSpec instance
2643  */
2644 // TODO
2645 // #define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
2646 
2647 /*
2648  * Checks whether the given GValue can hold values of type G_TYPE_UINT64.
2649  * value :
2650  * a valid GValue structure
2651  * Returns :
2652  * TRUE on success.
2653  */
2654 // TODO
2655 // #define G_VALUE_HOLDS_UINT64(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT64))
2656 
2657 /*
2658  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_FLOAT.
2659  * pspec :
2660  * a valid GParamSpec instance
2661  * Returns :
2662  * TRUE on success.
2663  */
2664 // TODO
2665 // #define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
2666 
2667 /*
2668  * Cast a GParamSpec instance into a GParamSpecFloat.
2669  * pspec :
2670  * a valid GParamSpec instance
2671  */
2672 // TODO
2673 // #define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
2674 
2675 /*
2676  * Checks whether the given GValue can hold values of type G_TYPE_FLOAT.
2677  * value :
2678  * a valid GValue structure
2679  * Returns :
2680  * TRUE on success.
2681  */
2682 // TODO
2683 // #define G_VALUE_HOLDS_FLOAT(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT))
2684 
2685 /*
2686  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_DOUBLE.
2687  * pspec :
2688  * a valid GParamSpec instance
2689  * Returns :
2690  * TRUE on success.
2691  */
2692 // TODO
2693 // #define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
2694 
2695 /*
2696  * Cast a GParamSpec instance into a GParamSpecDouble.
2697  * pspec :
2698  * a valid GParamSpec instance
2699  */
2700 // TODO
2701 // #define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
2702 
2703 /*
2704  * Checks whether the given GValue can hold values of type G_TYPE_DOUBLE.
2705  * value :
2706  * a valid GValue structure
2707  * Returns :
2708  * TRUE on success.
2709  */
2710 // TODO
2711 // #define G_VALUE_HOLDS_DOUBLE(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_DOUBLE))
2712 
2713 /*
2714  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_ENUM.
2715  * pspec :
2716  * a valid GParamSpec instance
2717  * Returns :
2718  * TRUE on success.
2719  */
2720 // TODO
2721 // #define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
2722 
2723 /*
2724  * Cast a GParamSpec instance into a GParamSpecEnum.
2725  * pspec :
2726  * a valid GParamSpec instance
2727  */
2728 // TODO
2729 // #define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
2730 
2731 /*
2732  * Checks whether the given GValue can hold values derived from type G_TYPE_ENUM.
2733  * value :
2734  * a valid GValue structure
2735  * Returns :
2736  * TRUE on success.
2737  */
2738 // TODO
2739 // #define G_VALUE_HOLDS_ENUM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ENUM))
2740 
2741 /*
2742  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_FLAGS.
2743  * pspec :
2744  * a valid GParamSpec instance
2745  * Returns :
2746  * TRUE on success.
2747  */
2748 // TODO
2749 // #define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
2750 
2751 /*
2752  * Cast a GParamSpec instance into a GParamSpecFlags.
2753  * pspec :
2754  * a valid GParamSpec instance
2755  */
2756 // TODO
2757 // #define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
2758 
2759 /*
2760  * Checks whether the given GValue can hold values derived from type G_TYPE_FLAGS.
2761  * value :
2762  * a valid GValue structure
2763  * Returns :
2764  * TRUE on success.
2765  */
2766 // TODO
2767 // #define G_VALUE_HOLDS_FLAGS(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLAGS))
2768 
2769 /*
2770  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_STRING.
2771  * pspec :
2772  * a valid GParamSpec instance
2773  * Returns :
2774  * TRUE on success.
2775  */
2776 // TODO
2777 // #define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
2778 
2779 /*
2780  * Casts a GParamSpec instance into a GParamSpecString.
2781  * pspec :
2782  * a valid GParamSpec instance
2783  */
2784 // TODO
2785 // #define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
2786 
2787 /*
2788  * Checks whether the given GValue can hold values of type G_TYPE_STRING.
2789  * value :
2790  * a valid GValue structure
2791  * Returns :
2792  * TRUE on success.
2793  */
2794 // TODO
2795 // #define G_VALUE_HOLDS_STRING(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_STRING))
2796 
2797 /*
2798  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_PARAM.
2799  * pspec :
2800  * a valid GParamSpec instance
2801  * Returns :
2802  * TRUE on success.
2803  */
2804 // TODO
2805 // #define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
2806 
2807 /*
2808  * Casts a GParamSpec instance into a GParamSpecParam.
2809  * pspec :
2810  * a valid GParamSpec instance
2811  */
2812 // TODO
2813 // #define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
2814 
2815 /*
2816  * Checks whether the given GValue can hold values derived from type G_TYPE_PARAM.
2817  * value :
2818  * a valid GValue structure
2819  * Returns :
2820  * TRUE on success.
2821  */
2822 // TODO
2823 // #define G_VALUE_HOLDS_PARAM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))
2824 
2825 /*
2826  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_BOXED.
2827  * pspec :
2828  * a valid GParamSpec instance
2829  * Returns :
2830  * TRUE on success.
2831  */
2832 // TODO
2833 // #define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
2834 
2835 /*
2836  * Cast a GParamSpec instance into a GParamSpecBoxed.
2837  * pspec :
2838  * a valid GParamSpec instance
2839  */
2840 // TODO
2841 // #define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
2842 
2843 /*
2844  * Checks whether the given GValue can hold values derived from type G_TYPE_BOXED.
2845  * value :
2846  * a valid GValue structure
2847  * Returns :
2848  * TRUE on success.
2849  */
2850 // TODO
2851 // #define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED))
2852 
2853 /*
2854  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_POINTER.
2855  * pspec :
2856  * a valid GParamSpec instance
2857  * Returns :
2858  * TRUE on success.
2859  */
2860 // TODO
2861 // #define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
2862 
2863 /*
2864  * Casts a GParamSpec instance into a GParamSpecPointer.
2865  * pspec :
2866  * a valid GParamSpec instance
2867  */
2868 // TODO
2869 // #define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
2870 
2871 /*
2872  * Checks whether the given GValue can hold values of type G_TYPE_POINTER.
2873  * value :
2874  * a valid GValue structure
2875  * Returns :
2876  * TRUE on success.
2877  */
2878 // TODO
2879 // #define G_VALUE_HOLDS_POINTER(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_POINTER))
2880 
2881 /*
2882  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_OBJECT.
2883  * pspec :
2884  * a valid GParamSpec instance
2885  * Returns :
2886  * TRUE on success.
2887  */
2888 // TODO
2889 // #define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
2890 
2891 /*
2892  * Casts a GParamSpec instance into a GParamSpecObject.
2893  * pspec :
2894  * a valid GParamSpec instance
2895  */
2896 // TODO
2897 // #define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
2898 
2899 /*
2900  * Checks whether the given GValue can hold values derived from type G_TYPE_OBJECT.
2901  * value :
2902  * a valid GValue structure
2903  * Returns :
2904  * TRUE on success.
2905  */
2906 // TODO
2907 // #define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT))
2908 
2909 /*
2910  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_UNICHAR.
2911  * pspec :
2912  * a valid GParamSpec instance
2913  * Returns :
2914  * TRUE on success.
2915  */
2916 // TODO
2917 // #define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
2918 
2919 /*
2920  * Cast a GParamSpec instance into a GParamSpecUnichar.
2921  * pspec :
2922  * a valid GParamSpec instance
2923  */
2924 // TODO
2925 // #define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
2926 
2927 /*
2928  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_VALUE_ARRAY.
2929  * pspec :
2930  * a valid GParamSpec instance
2931  * Returns :
2932  * TRUE on success.
2933  */
2934 // TODO
2935 // #define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
2936 
2937 /*
2938  * Cast a GParamSpec instance into a GParamSpecValueArray.
2939  * pspec :
2940  * a valid GParamSpec instance
2941  */
2942 // TODO
2943 // #define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
2944 
2945 /*
2946  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_OVERRIDE.
2947  * pspec :
2948  * a GParamSpec
2949  * Returns :
2950  * TRUE on success.
2951  * Since 2.4
2952  */
2953 // TODO
2954 // #define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
2955 
2956 /*
2957  * Casts a GParamSpec into a GParamSpecOverride.
2958  * pspec :
2959  * a GParamSpec
2960  * Since 2.4
2961  */
2962 // TODO
2963 // #define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
2964 
2965 /*
2966  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_GTYPE.
2967  * pspec :
2968  * a GParamSpec
2969  * Returns :
2970  * TRUE on success.
2971  * Since 2.10
2972  */
2973 // TODO
2974 // #define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
2975 
2976 /*
2977  * Casts a GParamSpec into a GParamSpecGType.
2978  * pspec :
2979  * a GParamSpec
2980  * Since 2.10
2981  */
2982 // TODO
2983 // #define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
2984 
2985 /*
2986  * Checks whether the given GValue can hold values of type G_TYPE_GTYPE.
2987  * value :
2988  * a valid GValue structure
2989  * Returns :
2990  * TRUE on success.
2991  * Since 2.12
2992  */
2993 // TODO
2994 // #define G_VALUE_HOLDS_GTYPE(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE))
2995 
2996 /*
2997  * Checks whether the given GParamSpec is of type G_TYPE_PARAM_VARIANT.
2998  * pspec :
2999  * a GParamSpec
3000  * Returns :
3001  * TRUE on success
3002  * Since 2.26
3003  */
3004 // TODO
3005 // #define G_IS_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT))
3006 
3007 /*
3008  * Casts a GParamSpec into a GParamSpecVariant.
3009  * pspec :
3010  * a GParamSpec
3011  * Since 2.26
3012  */
3013 // TODO
3014 // #define G_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant))
3015 
3016 /*
3017  * Checks whether the given GValue can hold values of type G_TYPE_VARIANT.
3018  * value :
3019  * a valid GValue structure
3020  * Returns :
3021  * TRUE on success.
3022  * Since 2.26
3023  */
3024 // TODO
3025 // #define G_VALUE_HOLDS_VARIANT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_VARIANT))
3026 
3027 /*
3028  * Checks whether type "is a" G_TYPE_PARAM.
3029  * type :
3030  * a GType ID
3031  */
3032 // TODO
3033 // #define G_TYPE_IS_PARAM(type)		(G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
3034 
3035 /*
3036  * Casts a derived GParamSpec object (e.g. of type GParamSpecInt) into
3037  * a GParamSpec object.
3038  * pspec :
3039  * a valid GParamSpec
3040  */
3041 // TODO
3042 // #define G_PARAM_SPEC(pspec)		(G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
3043 
3044 /*
3045  * Checks whether pspec "is a" valid GParamSpec structure of type G_TYPE_PARAM
3046  * or derived.
3047  * pspec :
3048  * a GParamSpec
3049  */
3050 // TODO
3051 // #define G_IS_PARAM_SPEC(pspec)		(G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM))
3052 
3053 /*
3054  * Casts a derived GParamSpecClass structure into a GParamSpecClass structure.
3055  * pclass :
3056  * a valid GParamSpecClass
3057  */
3058 // TODO
3059 // #define G_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
3060 
3061 /*
3062  * Checks whether pclass "is a" valid GParamSpecClass structure of type
3063  * G_TYPE_PARAM or derived.
3064  * pclass :
3065  * a GParamSpecClass
3066  */
3067 // TODO
3068 // #define G_IS_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
3069 
3070 /*
3071  * Retrieves the GParamSpecClass of a GParamSpec.
3072  * pspec :
3073  * a valid GParamSpec
3074  */
3075 // TODO
3076 // #define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
3077 
3078 /*
3079  * Retrieves the GType of this pspec.
3080  * pspec :
3081  * a valid GParamSpec
3082  */
3083 // TODO
3084 // #define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec))
3085 
3086 /*
3087  * Retrieves the GType name of this pspec.
3088  * pspec :
3089  * a valid GParamSpec
3090  */
3091 // TODO
3092 // #define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
3093 
3094 /*
3095  * Retrieves the GType to initialize a GValue for this parameter.
3096  * pspec :
3097  * a valid GParamSpec
3098  */
3099 // TODO
3100 // #define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type)
3101 
3102 /*
3103  * Connects a GCallback function to a signal for a particular object.
3104  * The handler will be called before the default handler of the signal.
3105  * instance :
3106  * the instance to connect to.
3107  * detailed_signal :
3108  * a string of the form "signal-name::detail".
3109  * c_handler :
3110  * the GCallback to connect.
3111  * data :
3112  * data to pass to c_handler calls.
3113  * Returns :
3114  * the handler id
3115  */
3116 // TODO
3117 // #define g_signal_connect(instance, detailed_signal, c_handler, data)
3118 
3119 /*
3120  * Connects a GCallback function to a signal for a particular object.
3121  * The handler will be called after the default handler of the signal.
3122  * instance :
3123  * the instance to connect to.
3124  * detailed_signal :
3125  * a string of the form "signal-name::detail".
3126  * c_handler :
3127  * the GCallback to connect.
3128  * data :
3129  * data to pass to c_handler calls.
3130  * Returns :
3131  * the handler id
3132  */
3133 // TODO
3134 // #define g_signal_connect_after(instance, detailed_signal, c_handler, data)
3135 
3136 /*
3137  * Connects a GCallback function to a signal for a particular object.
3138  * The instance on which the signal is emitted and data will be swapped when
3139  * calling the handler.
3140  * instance :
3141  * the instance to connect to.
3142  * detailed_signal :
3143  * a string of the form "signal-name::detail".
3144  * c_handler :
3145  * the GCallback to connect.
3146  * data :
3147  * data to pass to c_handler calls.
3148  * Returns :
3149  * the handler id
3150  */
3151 // TODO
3152 // #define g_signal_connect_swapped(instance, detailed_signal, c_handler, data)
3153 
3154 /*
3155  * Blocks all handlers on an instance that match func and data.
3156  * instance :
3157  * The instance to block handlers from.
3158  * func :
3159  * The C closure callback of the handlers (useless for non-C closures).
3160  * data :
3161  * The closure data of the handlers' closures.
3162  * Returns :
3163  * The number of handlers that matched.
3164  */
3165 // TODO
3166 // #define g_signal_handlers_block_by_func(instance, func, data)
3167 
3168 /*
3169  * Unblocks all handlers on an instance that match func and data.
3170  * instance :
3171  * The instance to unblock handlers from.
3172  * func :
3173  * The C closure callback of the handlers (useless for non-C closures).
3174  * data :
3175  * The closure data of the handlers' closures.
3176  * Returns :
3177  * The number of handlers that matched.
3178  */
3179 // TODO
3180 // #define g_signal_handlers_unblock_by_func(instance, func, data)
3181 
3182 /*
3183  * Disconnects all handlers on an instance that match func and data.
3184  * instance :
3185  * The instance to remove handlers from.
3186  * func :
3187  * The C closure callback of the handlers (useless for non-C closures).
3188  * data :
3189  * The closure data of the handlers' closures.
3190  * Returns :
3191  * The number of handlers that matched.
3192  */
3193 // TODO
3194 // #define g_signal_handlers_disconnect_by_func(instance, func, data)
3195 
3196 /*
3197  * Check if the closure still needs a marshaller. See g_closure_set_marshal().
3198  * closure :
3199  * a GClosure
3200  * Returns :
3201  * TRUE if a GClosureMarshal marshaller has not yet been set on
3202  * closure.
3203  */
3204 // TODO
3205 // #define G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL)
3206 
3207 /*
3208  * Get the total number of notifiers connected with the closure cl.
3209  * The count includes the meta marshaller, the finalize and invalidate notifiers
3210  * and the marshal guards. Note that each guard counts as two notifiers.
3211  * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
3212  * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
3213  * cl :
3214  * a GClosure
3215  * Returns :
3216  * number of notifiers
3217  */
3218 // TODO
3219 // #define G_CLOSURE_N_NOTIFIERS(cl)
3220 
3221 /*
3222  * Checks whether the user data of the GCClosure should be passed as the
3223  * first parameter to the callback. See g_cclosure_new_swap().
3224  * cclosure :
3225  * a GCClosure
3226  * Returns :
3227  * TRUE if data has to be swapped.
3228  */
3229 // TODO
3230 // #define G_CCLOSURE_SWAP_DATA(cclosure)	 (((GClosure*) (cclosure))->derivative_flag)
3231 
3232 /*
3233  * Cast a function pointer to a GCallback.
3234  * f :
3235  * a function pointer.
3236  */
3237 // TODO
3238 // #define G_CALLBACK(f)			 ((GCallback) (f))
3239 
3240 /*
3241  * A callback function used by the type system to do base initialization
3242  * of the class structures of derived types. It is called as part of the
3243  * initialization process of all derived classes and should reallocate
3244  * or reset all dynamic class members copied over from the parent class.
3245  * For example, class members (such as strings) that are not sufficiently
3246  * handled by a plain memory copy of the parent class into the derived class
3247  * have to be altered. See GClassInitFunc() for a discussion of the class
3248  * intialization process.
3249  * g_class :
3250  * The GTypeClass structure to initialize.
3251  */
3252 // void (*GBaseInitFunc) (gpointer g_class);
3253 public alias extern(C) void function(void* gClass) GBaseInitFunc;
3254 
3255 /*
3256  * A callback function used by the type system to finalize those portions
3257  * of a derived types class structure that were setup from the corresponding
3258  * GBaseInitFunc() function. Class finalization basically works the inverse
3259  * way in which class intialization is performed.
3260  * See GClassInitFunc() for a discussion of the class intialization process.
3261  * g_class :
3262  * The GTypeClass structure to finalize.
3263  */
3264 // void (*GBaseFinalizeFunc) (gpointer g_class);
3265 public alias extern(C) void function(void* gClass) GBaseFinalizeFunc;
3266 
3267 /*
3268  * A callback function used by the type system to initialize the class
3269  * of a specific type. This function should initialize all static class
3270  * members.
3271  * The initialization process of a class involves:
3272  * 	1 - Copying common members from the parent class over to the
3273  * 	derived class structure.
3274  * 	2 - Zero initialization of the remaining members not copied
3275  * 	over from the parent class.
3276  * 	3 - Invocation of the GBaseInitFunc() initializers of all parent
3277  * 	types and the class' type.
3278  * 	4 - Invocation of the class' GClassInitFunc() initializer.
3279  * Since derived classes are partially initialized through a memory copy
3280  * of the parent class, the general rule is that GBaseInitFunc() and
3281  * GBaseFinalizeFunc() should take care of necessary reinitialization
3282  * and release of those class members that were introduced by the type
3283  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
3284  * GClassInitFunc() should only care about initializing static
3285  * class members, while dynamic class members (such as allocated strings
3286  * or reference counted resources) are better handled by a GBaseInitFunc()
3287  * for this type, so proper initialization of the dynamic class members
3288  * is performed for class initialization of derived types as well.
3289  * An example may help to correspond the intend of the different class
3290  * initializers:
3291  * $(DDOC_COMMENT example)
3292  * Initialization of TypeBClass will first cause initialization of
3293  * TypeAClass (derived classes reference their parent classes, see
3294  * g_type_class_ref() on this).
3295  * Initialization of TypeAClass roughly involves zero-initializing its fields,
3296  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
3297  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
3298  * type_a_class_init() to initialize its static members (static_integer).
3299  * The first step in the initialization process of TypeBClass is then
3300  * a plain memory copy of the contents of TypeAClass into TypeBClass and
3301  * zero-initialization of the remaining fields in TypeBClass.
3302  * The dynamic members of TypeAClass within TypeBClass now need
3303  * reinitialization which is performed by calling type_a_base_class_init()
3304  * with an argument of TypeBClass.
3305  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
3306  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
3307  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
3308  * is called to complete the initialization process with the static members
3309  * (static_float).
3310  * Corresponding finalization counter parts to the GBaseInitFunc() functions
3311  * have to be provided to release allocated resources at class finalization
3312  * time.
3313  * g_class :
3314  * The GTypeClass structure to initialize.
3315  * class_data :
3316  * The class_data member supplied via the GTypeInfo structure.
3317  */
3318 // void (*GClassInitFunc) (gpointer g_class,  gpointer class_data);
3319 public alias extern(C) void function(void* gClass, void* classData) GClassInitFunc;
3320 
3321 /*
3322  * A callback function used by the type system to finalize a class.
3323  * This function is rarely needed, as dynamically allocated class resources
3324  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
3325  * Also, specification of a GClassFinalizeFunc() in the GTypeInfo
3326  * structure of a static type is invalid, because classes of static types
3327  * will never be finalized (they are artificially kept alive when their
3328  * reference count drops to zero).
3329  * g_class :
3330  * The GTypeClass structure to finalize.
3331  * class_data :
3332  * The class_data member supplied via the GTypeInfo structure.
3333  */
3334 // void (*GClassFinalizeFunc) (gpointer g_class,  gpointer class_data);
3335 public alias extern(C) void function(void* gClass, void* classData) GClassFinalizeFunc;
3336 
3337 /*
3338  * A callback function used by the type system to initialize a new
3339  * instance of a type. This function initializes all instance members and
3340  * allocates any resources required by it.
3341  * Initialization of a derived instance involves calling all its parent
3342  * types instance initializers, so the class member of the instance
3343  * is altered during its initialization to always point to the class that
3344  * belongs to the type the current initializer was introduced for.
3345  * instance :
3346  * The instance to initialize.
3347  * g_class :
3348  * The class of the type the instance is created for.
3349  */
3350 // void (*GInstanceInitFunc) (GTypeInstance *instance,  gpointer g_class);
3351 public alias extern(C) void function(GTypeInstance* instanc, void* gClass) GInstanceInitFunc;
3352 
3353 /*
3354  * A callback function used by the type system to initialize a new
3355  * interface. This function should initialize all internal data and
3356  * allocate any resources required by the interface.
3357  * g_iface :
3358  * The interface structure to initialize.
3359  * iface_data :
3360  * The interface_data supplied via the GInterfaceInfo structure.
3361  */
3362 // void (*GInterfaceInitFunc) (gpointer g_iface,  gpointer iface_data);
3363 public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceInitFunc;
3364 
3365 /*
3366  * A callback function used by the type system to finalize an interface.
3367  * This function should destroy any internal data and release any resources
3368  * allocated by the corresponding GInterfaceInitFunc() function.
3369  * g_iface :
3370  * The interface structure to finalize.
3371  * iface_data :
3372  * The interface_data supplied via the GInterfaceInfo structure.
3373  */
3374 // void (*GInterfaceFinalizeFunc) (gpointer g_iface,  gpointer iface_data);
3375 public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceFinalizeFunc;
3376 
3377 /*
3378  * A callback function which is called when the reference count of a class
3379  * drops to zero. It may use g_type_class_ref() to prevent the class from
3380  * being freed. You should not call g_type_class_unref() from a
3381  * GTypeClassCacheFunc function to prevent infinite recursion, use
3382  * g_type_class_unref_uncached() instead.
3383  * The functions have to check the class id passed in to figure
3384  * whether they actually want to cache the class of this type, since all
3385  * classes are routed through the same GTypeClassCacheFunc chain.
3386  * cache_data :
3387  * data that was given to the g_type_add_class_cache_func() call
3388  * g_class :
3389  * The GTypeClass structure which is unreferenced
3390  * Returns :
3391  * TRUE to stop further GTypeClassCacheFuncs from being
3392  * called, FALSE to continue.
3393  */
3394 // gboolean (*GTypeClassCacheFunc) (gpointer cache_data,  GTypeClass *g_class);
3395 public alias extern(C) int function(void* cacheData, GTypeClass* gClass) GTypeClassCacheFunc;
3396 
3397 /*
3398  * A callback called after an interface vtable is initialized.
3399  * See g_type_add_interface_check().
3400  * check_data :
3401  * data passed to g_type_add_interface_check().
3402  * g_iface :
3403  * the interface that has been initialized
3404  * Since 2.4
3405  */
3406 // void (*GTypeInterfaceCheckFunc) (gpointer check_data,  gpointer g_iface);
3407 public alias extern(C) void function(void* checkData, void* gIface) GTypeInterfaceCheckFunc;
3408 
3409 /*
3410  * The type of the use_plugin function of GTypePluginClass, which gets called
3411  * to increase the use count of plugin.
3412  * plugin :
3413  * the GTypePlugin whose use count should be increased
3414  */
3415 // void (*GTypePluginUse) (GTypePlugin *plugin);
3416 public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUse;
3417 
3418 /*
3419  * The type of the unuse_plugin function of GTypePluginClass.
3420  * plugin :
3421  * the GTypePlugin whose use count should be decreased
3422  */
3423 // void (*GTypePluginUnuse) (GTypePlugin *plugin);
3424 public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUnuse;
3425 
3426 /*
3427  * The type of the complete_type_info function of GTypePluginClass.
3428  * plugin :
3429  * the GTypePlugin
3430  * g_type :
3431  * the GType whose info is completed
3432  * info :
3433  * the GTypeInfo struct to fill in
3434  * value_table :
3435  * the GTypeValueTable to fill in
3436  */
3437 // void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin,  GType g_type,  GTypeInfo *info,  GTypeValueTable *value_table);
3438 public alias extern(C) void function(GTypePlugin* plugin, GType gType, GTypeInfo* info, GTypeValueTable* valueTable) GTypePluginCompleteTypeInfo;
3439 
3440 /*
3441  * The type of the complete_interface_info function of GTypePluginClass.
3442  * plugin :
3443  * the GTypePlugin
3444  * instance_type :
3445  * the GType of an instantiable type to which the interface
3446  * is added
3447  * interface_type :
3448  * the GType of the interface whose info is completed
3449  * info :
3450  * the GInterfaceInfo to fill in
3451  */
3452 // void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin,  GType instance_type,  GType interface_type,  GInterfaceInfo *info);
3453 public alias extern(C) void function(GTypePlugin* plugin, GType instanceType, GType interfaceType, GInterfaceInfo* info) GTypePluginCompleteInterfaceInfo;
3454 
3455 /*
3456  * The type of the get_property function of GObjectClass.
3457  * object :
3458  * a GObject
3459  * property_id :
3460  * the numeric id under which the property was registered with
3461  * g_object_class_install_property().
3462  * value :
3463  * a GValue to return the property value in
3464  * pspec :
3465  * the GParamSpec describing the property
3466  */
3467 // void (*GObjectGetPropertyFunc) (GObject *object,  guint property_id,  GValue *value,  GParamSpec *pspec);
3468 public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectGetPropertyFunc;
3469 
3470 /*
3471  * The type of the set_property function of GObjectClass.
3472  * object :
3473  * a GObject
3474  * property_id :
3475  * the numeric id under which the property was registered with
3476  * g_object_class_install_property().
3477  * value :
3478  * the new value for the property
3479  * pspec :
3480  * the GParamSpec describing the property
3481  */
3482 // void (*GObjectSetPropertyFunc) (GObject *object,  guint property_id,  const GValue *value,  GParamSpec *pspec);
3483 public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectSetPropertyFunc;
3484 
3485 /*
3486  * The type of the finalize function of GObjectClass.
3487  * object :
3488  * the GObject being finalized
3489  */
3490 // void (*GObjectFinalizeFunc) (GObject *object);
3491 public alias extern(C) void function(GObject* object) GObjectFinalizeFunc;
3492 
3493 /*
3494  * A GWeakNotify function can be added to an object as a callback that gets
3495  * triggered when the object is finalized. Since the object is already being
3496  * finalized when the GWeakNotify is called, there's not much you could do
3497  * with the object, apart from e.g. using its adress as hash-index or the like.
3498  * data :
3499  * data that was provided when the weak reference was established
3500  * where_the_object_was :
3501  * the object being finalized
3502  */
3503 // void (*GWeakNotify) (gpointer data,  GObject *where_the_object_was);
3504 public alias extern(C) void function(void* data, GObject* whereTheObjectWas) GWeakNotify;
3505 
3506 /*
3507  * A callback function used for notification when the state
3508  * of a toggle reference changes. See g_object_add_toggle_ref().
3509  * data :
3510  * Callback data passed to g_object_add_toggle_ref()
3511  * object :
3512  * The object on which g_object_add_toggle_ref() was called.
3513  * is_last_ref :
3514  * TRUE if the toggle reference is now the
3515  * last reference to the object. FALSE if the toggle
3516  * reference was the last reference and there are now other
3517  * references.
3518  */
3519 // void (*GToggleNotify) (gpointer data,  GObject *object,  gboolean is_last_ref);
3520 public alias extern(C) void function(void* data, GObject* object, int isLastRef) GToggleNotify;
3521 
3522 /*
3523  * This function is provided by the user and should produce a copy of the passed
3524  * in boxed structure.
3525  * boxed :
3526  * The boxed structure to be copied.
3527  * Returns :
3528  * The newly created copy of the boxed structure.
3529  */
3530 // gpointer (*GBoxedCopyFunc) (gpointer boxed);
3531 public alias extern(C) void* function(void* boxed) GBoxedCopyFunc;
3532 
3533 /*
3534  * This function is provided by the user and should free the boxed
3535  * structure passed.
3536  * boxed :
3537  * The boxed structure to be freed.
3538  */
3539 // void (*GBoxedFreeFunc) (gpointer boxed);
3540 public alias extern(C) void function(void* boxed) GBoxedFreeFunc;
3541 
3542 /*
3543  * The type of value transformation functions which can be registered with
3544  * g_value_register_transform_func().
3545  * src_value :
3546  * Source value.
3547  * dest_value :
3548  * Target value.
3549  */
3550 // void (*GValueTransform) (const GValue *src_value,  GValue *dest_value);
3551 public alias extern(C) void function(GValue* srcValue, GValue* destValue) GValueTransform;
3552 
3553 /*
3554  * The signal accumulator is a special callback function that can be used
3555  * to collect return values of the various callbacks that are called
3556  * during a signal emission. The signal accumulator is specified at signal
3557  * creation time, if it is left NULL, no accumulation of callback return
3558  * values is performed. The return value of signal emissions is then the
3559  * value returned by the last callback.
3560  * ihint :
3561  * Signal invocation hint, see GSignalInvocationHint.
3562  * return_accu :
3563  * Accumulator to collect callback return values in, this
3564  * is the return value of the current signal emission.
3565  * handler_return :
3566  * A GValue holding the return value of the signal handler.
3567  * data :
3568  * Callback data that was specified when creating the signal.
3569  * Returns :
3570  * The accumulator function returns whether the signal emission
3571  * should be aborted. Returning FALSE means to abort the
3572  * current emission and TRUE is returned for continuation.
3573  */
3574 // gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint,  GValue *return_accu,  const GValue *handler_return,  gpointer data);
3575 public alias extern(C) int function(GSignalInvocationHint* ihint, GValue* returnAccu, GValue* handlerReturn, void* data) GSignalAccumulator;
3576 
3577 /*
3578  * A simple function pointer to get invoked when the signal is emitted. This
3579  * allows you to tie a hook to the signal type, so that it will trap all
3580  * emissions of that signal, from any object.
3581  * You may not attach these to signals created with the G_SIGNAL_NO_HOOKS flag.
3582  * ihint :
3583  * Signal invocation hint, see GSignalInvocationHint.
3584  * n_param_values :
3585  * the number of parameters to the function, including
3586  * the instance on which the signal was emitted.
3587  * param_values :
3588  * the instance on which the signal was emitted, followed by the
3589  * parameters of the emission.
3590  * data :
3591  * user data associated with the hook.
3592  * Returns :
3593  * whether it wants to stay connected. If it returns FALSE, the signal
3594  * hook is disconnected (and destroyed).
3595  */
3596 // gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint,  guint n_param_values,  const GValue *param_values,  gpointer data);
3597 public alias extern(C) int function(GSignalInvocationHint* ihint, uint nParamValues, GValue* paramValues, void* data) GSignalEmissionHook;
3598 
3599 /*
3600  * The type used for callback functions in structure definitions and function
3601  * signatures. This doesn't mean that all callback functions must take no
3602  * parameters and return void. The required signature of a callback function
3603  * is determined by the context in which is used (e.g. the signal to which it
3604  * is connected). Use G_CALLBACK() to cast the callback function to a GCallback.
3605  */
3606 // void (*GCallback) (void);
3607 public alias extern(C) void function() GCallback;
3608 
3609 /*
3610  * The type used for marshaller functions.
3611  * closure :
3612  * the GClosure to which the marshaller belongs
3613  * return_value :
3614  * a GValue to store the return value. May be NULL if the
3615  * callback of closure doesn't return a value.
3616  * n_param_values :
3617  * the length of the param_values array
3618  * param_values :
3619  * an array of GValues holding the arguments on
3620  * which to invoke the callback of closure
3621  * invocation_hint :
3622  * the invocation hint given as the last argument
3623  * to g_closure_invoke()
3624  * marshal_data :
3625  * additional data specified when registering the marshaller,
3626  * see g_closure_set_marshal() and g_closure_set_meta_marshal()
3627  */
3628 // void (*GClosureMarshal) (GClosure *closure,  GValue *return_value,  guint n_param_values,  const GValue *param_values,  gpointer invocation_hint,  gpointer marshal_data);
3629 public alias extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) GClosureMarshal;
3630 
3631 /*
3632  * The type used for the various notification callbacks which can be registered
3633  * on closures.
3634  * data :
3635  * data specified when registering the notification callback
3636  * closure :
3637  * the GClosure on which the notification is emitted
3638  */
3639 // void (*GClosureNotify) (gpointer data,  GClosure *closure);
3640 public alias extern(C) void function(void* data, GClosure* closure) GClosureNotify;
3641 
3642 /*
3643  * A function to be called to transform the source property of source
3644  * from source_value into the target property of target
3645  * using target_value.
3646  * binding :
3647  * a GBinding
3648  * source_value :
3649  * the value of the source property
3650  * target_value :
3651  * the value of the target property
3652  * user_data :
3653  * data passed to the transform function
3654  * Returns :
3655  * TRUE if the transformation was successful, and FALSE
3656  * otherwise
3657  * Since 2.26
3658  */
3659 // gboolean (*GBindingTransformFunc) (GBinding *binding,  const GValue *source_value,  GValue *target_value,  gpointer user_data);
3660 public alias extern(C) int function(GBinding* binding, GValue* sourceValue, GValue* targetValue, void* userData) GBindingTransformFunc;