1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gobject.c.types;
26 
27 public import glib.c.types;
28 
29 
30 /**
31  * This is the signature of marshaller functions, required to marshall
32  * arrays of parameter values to signal emissions into C language callback
33  * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
34  * mechanism takes over responsibility of actual function invocation for the
35  * signal system.
36  */
37 public alias GClosureMarshal GSignalCMarshaller;
38 
39 /**
40  * This is the signature of va_list marshaller functions, an optional
41  * marshaller that can be used in some situations to avoid
42  * marshalling the signal argument into GValues.
43  */
44 public alias GVaClosureMarshal GSignalCVaMarshaller;
45 
46 /**
47  * A value which represents the unique identifier of a registered type.
48  */
49 enum GType : size_t
50 {
51 	INVALID = 0<<2,
52 	NONE = 1<<2,
53 	INTERFACE = 2<<2,
54 	CHAR = 3<<2,
55 	UCHAR = 4<<2,
56 	BOOLEAN = 5<<2,
57 	INT = 6<<2,
58 	UINT = 7<<2,
59 	LONG = 8<<2,
60 	ULONG = 9<<2,
61 	INT64 = 10<<2,
62 	UINT64 = 11<<2,
63 	ENUM = 12<<2,
64 	FLAGS = 13<<2,
65 	FLOAT = 14<<2,
66 	DOUBLE = 15<<2,
67 	STRING = 16<<2,
68 	POINTER = 17<<2,
69 	BOXED = 18<<2,
70 	PARAM = 19<<2,
71 	OBJECT = 20<<2,
72 	VARIANT = 21<<2,
73 }
74 
75 /**
76  * Flags to be passed to g_object_bind_property() or
77  * g_object_bind_property_full().
78  *
79  * This enumeration can be extended at later date.
80  *
81  * Since: 2.26
82  */
83 public enum GBindingFlags
84 {
85 	/**
86 	 * The default binding; if the source property
87 	 * changes, the target property is updated with its value.
88 	 */
89 	DEFAULT = 0,
90 	/**
91 	 * Bidirectional binding; if either the
92 	 * property of the source or the property of the target changes,
93 	 * the other is updated.
94 	 */
95 	BIDIRECTIONAL = 1,
96 	/**
97 	 * Synchronize the values of the source and
98 	 * target properties when creating the binding; the direction of
99 	 * the synchronization is always from the source to the target.
100 	 */
101 	SYNC_CREATE = 2,
102 	/**
103 	 * If the two properties being bound are
104 	 * booleans, setting one to %TRUE will result in the other being
105 	 * set to %FALSE and vice versa. This flag will only work for
106 	 * boolean properties, and cannot be used when passing custom
107 	 * transformation functions to g_object_bind_property_full().
108 	 */
109 	INVERT_BOOLEAN = 4,
110 }
111 alias GBindingFlags BindingFlags;
112 
113 /**
114  * The connection flags are used to specify the behaviour of a signal's
115  * connection.
116  */
117 public enum GConnectFlags
118 {
119 	/**
120 	 * whether the handler should be called before or after the
121 	 * default handler of the signal.
122 	 */
123 	AFTER = 1,
124 	/**
125 	 * whether the instance and data should be swapped when
126 	 * calling the handler; see g_signal_connect_swapped() for an example.
127 	 */
128 	SWAPPED = 2,
129 }
130 alias GConnectFlags ConnectFlags;
131 
132 /**
133  * Through the #GParamFlags flag values, certain aspects of parameters
134  * can be configured. See also #G_PARAM_STATIC_STRINGS.
135  */
136 public enum GParamFlags : uint
137 {
138 	/**
139 	 * the parameter is readable
140 	 */
141 	READABLE = 1,
142 	/**
143 	 * the parameter is writable
144 	 */
145 	WRITABLE = 2,
146 	/**
147 	 * alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE
148 	 */
149 	READWRITE = 3,
150 	/**
151 	 * the parameter will be set upon object construction
152 	 */
153 	CONSTRUCT = 4,
154 	/**
155 	 * the parameter can only be set upon object construction
156 	 */
157 	CONSTRUCT_ONLY = 8,
158 	/**
159 	 * upon parameter conversion (see g_param_value_convert())
160 	 * strict validation is not required
161 	 */
162 	LAX_VALIDATION = 16,
163 	/**
164 	 * the string used as name when constructing the
165 	 * parameter is guaranteed to remain valid and
166 	 * unmodified for the lifetime of the parameter.
167 	 * Since 2.8
168 	 */
169 	STATIC_NAME = 32,
170 	/**
171 	 * internal
172 	 */
173 	PRIVATE = 32,
174 	/**
175 	 * the string used as nick when constructing the
176 	 * parameter is guaranteed to remain valid and
177 	 * unmmodified for the lifetime of the parameter.
178 	 * Since 2.8
179 	 */
180 	STATIC_NICK = 64,
181 	/**
182 	 * the string used as blurb when constructing the
183 	 * parameter is guaranteed to remain valid and
184 	 * unmodified for the lifetime of the parameter.
185 	 * Since 2.8
186 	 */
187 	STATIC_BLURB = 128,
188 	/**
189 	 * calls to g_object_set_property() for this
190 	 * property will not automatically result in a "notify" signal being
191 	 * emitted: the implementation must call g_object_notify() themselves
192 	 * in case the property actually changes.  Since: 2.42.
193 	 */
194 	EXPLICIT_NOTIFY = 1073741824,
195 	/**
196 	 * the parameter is deprecated and will be removed
197 	 * in a future version. A warning will be generated if it is used
198 	 * while running with G_ENABLE_DIAGNOSTIC=1.
199 	 * Since 2.26
200 	 */
201 	DEPRECATED = 2147483648,
202 }
203 alias GParamFlags ParamFlags;
204 
205 /**
206  * The signal flags are used to specify a signal's behaviour, the overall
207  * signal description outlines how especially the RUN flags control the
208  * stages of a signal emission.
209  */
210 public enum GSignalFlags
211 {
212 	/**
213 	 * Invoke the object method handler in the first emission stage.
214 	 */
215 	RUN_FIRST = 1,
216 	/**
217 	 * Invoke the object method handler in the third emission stage.
218 	 */
219 	RUN_LAST = 2,
220 	/**
221 	 * Invoke the object method handler in the last emission stage.
222 	 */
223 	RUN_CLEANUP = 4,
224 	/**
225 	 * Signals being emitted for an object while currently being in
226 	 * emission for this very object will not be emitted recursively,
227 	 * but instead cause the first emission to be restarted.
228 	 */
229 	NO_RECURSE = 8,
230 	/**
231 	 * This signal supports "::detail" appendices to the signal name
232 	 * upon handler connections and emissions.
233 	 */
234 	DETAILED = 16,
235 	/**
236 	 * Action signals are signals that may freely be emitted on alive
237 	 * objects from user code via g_signal_emit() and friends, without
238 	 * the need of being embedded into extra code that performs pre or
239 	 * post emission adjustments on the object. They can also be thought
240 	 * of as object methods which can be called generically by
241 	 * third-party code.
242 	 */
243 	ACTION = 32,
244 	/**
245 	 * No emissions hooks are supported for this signal.
246 	 */
247 	NO_HOOKS = 64,
248 	/**
249 	 * Varargs signal emission will always collect the
250 	 * arguments, even if there are no signal handlers connected.  Since 2.30.
251 	 */
252 	MUST_COLLECT = 128,
253 	/**
254 	 * The signal is deprecated and will be removed
255 	 * in a future version. A warning will be generated if it is connected while
256 	 * running with G_ENABLE_DIAGNOSTIC=1.  Since 2.32.
257 	 */
258 	DEPRECATED = 256,
259 }
260 alias GSignalFlags SignalFlags;
261 
262 /**
263  * The match types specify what g_signal_handlers_block_matched(),
264  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
265  * match signals by.
266  */
267 public enum GSignalMatchType
268 {
269 	/**
270 	 * The signal id must be equal.
271 	 */
272 	ID = 1,
273 	/**
274 	 * The signal detail be equal.
275 	 */
276 	DETAIL = 2,
277 	/**
278 	 * The closure must be the same.
279 	 */
280 	CLOSURE = 4,
281 	/**
282 	 * The C closure callback must be the same.
283 	 */
284 	FUNC = 8,
285 	/**
286 	 * The closure data must be the same.
287 	 */
288 	DATA = 16,
289 	/**
290 	 * Only unblocked signals may matched.
291 	 */
292 	UNBLOCKED = 32,
293 }
294 alias GSignalMatchType SignalMatchType;
295 
296 /**
297  * These flags used to be passed to g_type_init_with_debug_flags() which
298  * is now deprecated.
299  *
300  * If you need to enable debugging features, use the GOBJECT_DEBUG
301  * environment variable.
302  *
303  * Deprecated: g_type_init() is now done automatically
304  */
305 public enum GTypeDebugFlags
306 {
307 	/**
308 	 * Print no messages
309 	 */
310 	NONE = 0,
311 	/**
312 	 * Print messages about object bookkeeping
313 	 */
314 	OBJECTS = 1,
315 	/**
316 	 * Print messages about signal emissions
317 	 */
318 	SIGNALS = 2,
319 	/**
320 	 * Keep a count of instances of each type
321 	 */
322 	INSTANCE_COUNT = 4,
323 	/**
324 	 * Mask covering all debug flags
325 	 */
326 	MASK = 7,
327 }
328 alias GTypeDebugFlags TypeDebugFlags;
329 
330 /**
331  * Bit masks used to check or determine characteristics of a type.
332  */
333 public enum GTypeFlags
334 {
335 	/**
336 	 * Indicates an abstract type. No instances can be
337 	 * created for an abstract type
338 	 */
339 	ABSTRACT = 16,
340 	/**
341 	 * Indicates an abstract value type, i.e. a type
342 	 * that introduces a value table, but can't be used for
343 	 * g_value_init()
344 	 */
345 	VALUE_ABSTRACT = 32,
346 }
347 alias GTypeFlags TypeFlags;
348 
349 /**
350  * Bit masks used to check or determine specific characteristics of a
351  * fundamental type.
352  */
353 public enum GTypeFundamentalFlags
354 {
355 	/**
356 	 * Indicates a classed type
357 	 */
358 	CLASSED = 1,
359 	/**
360 	 * Indicates an instantiable type (implies classed)
361 	 */
362 	INSTANTIATABLE = 2,
363 	/**
364 	 * Indicates a flat derivable type
365 	 */
366 	DERIVABLE = 4,
367 	/**
368 	 * Indicates a deep derivable type (implies derivable)
369 	 */
370 	DEEP_DERIVABLE = 8,
371 }
372 alias GTypeFundamentalFlags TypeFundamentalFlags;
373 
374 struct GBinding;
375 
376 /**
377  * A #GCClosure is a specialization of #GClosure for C function callbacks.
378  */
379 struct GCClosure
380 {
381 	/**
382 	 * the #GClosure
383 	 */
384 	GClosure closure;
385 	/**
386 	 * the callback function
387 	 */
388 	void* callback;
389 }
390 
391 struct GClosure
392 {
393 	import std.bitmanip: bitfields;
394 	mixin(bitfields!(
395 		uint, "refCount", 15,
396 		uint, "metaMarshalNouse", 1,
397 		uint, "nGuards", 1,
398 		uint, "nFnotifiers", 2,
399 		uint, "nInotifiers", 8,
400 		uint, "inInotify", 1,
401 		uint, "floating", 1,
402 		uint, "derivativeFlag", 1,
403 		uint, "inMarshal", 1,
404 		uint, "isInvalid", 1
405 	));
406 	/** */
407 	extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) marshal;
408 	void* data;
409 	GClosureNotifyData* notifiers;
410 }
411 
412 struct GClosureNotifyData
413 {
414 	void* data;
415 	GClosureNotify notify;
416 }
417 
418 /**
419  * The class of an enumeration type holds information about its
420  * possible values.
421  */
422 struct GEnumClass
423 {
424 	/**
425 	 * the parent class
426 	 */
427 	GTypeClass gTypeClass;
428 	/**
429 	 * the smallest possible value.
430 	 */
431 	int minimum;
432 	/**
433 	 * the largest possible value.
434 	 */
435 	int maximum;
436 	/**
437 	 * the number of possible values.
438 	 */
439 	uint nValues;
440 	/**
441 	 * an array of #GEnumValue structs describing the
442 	 * individual values.
443 	 */
444 	GEnumValue* values;
445 }
446 
447 /**
448  * A structure which contains a single enum value, its name, and its
449  * nickname.
450  */
451 struct GEnumValue
452 {
453 	/**
454 	 * the enum value
455 	 */
456 	int value;
457 	/**
458 	 * the name of the value
459 	 */
460 	const(char)* valueName;
461 	/**
462 	 * the nickname of the value
463 	 */
464 	const(char)* valueNick;
465 }
466 
467 /**
468  * The class of a flags type holds information about its
469  * possible values.
470  */
471 struct GFlagsClass
472 {
473 	/**
474 	 * the parent class
475 	 */
476 	GTypeClass gTypeClass;
477 	/**
478 	 * a mask covering all possible values.
479 	 */
480 	uint mask;
481 	/**
482 	 * the number of possible values.
483 	 */
484 	uint nValues;
485 	/**
486 	 * an array of #GFlagsValue structs describing the
487 	 * individual values.
488 	 */
489 	GFlagsValue* values;
490 }
491 
492 /**
493  * A structure which contains a single flags value, its name, and its
494  * nickname.
495  */
496 struct GFlagsValue
497 {
498 	/**
499 	 * the flags value
500 	 */
501 	uint value;
502 	/**
503 	 * the name of the value
504 	 */
505 	const(char)* valueName;
506 	/**
507 	 * the nickname of the value
508 	 */
509 	const(char)* valueNick;
510 }
511 
512 /**
513  * A structure that provides information to the type system which is
514  * used specifically for managing interface types.
515  */
516 struct GInterfaceInfo
517 {
518 	/**
519 	 * location of the interface initialization function
520 	 */
521 	GInterfaceInitFunc interfaceInit;
522 	/**
523 	 * location of the interface finalization function
524 	 */
525 	GInterfaceFinalizeFunc interfaceFinalize;
526 	/**
527 	 * user-supplied data passed to the interface init/finalize functions
528 	 */
529 	void* interfaceData;
530 }
531 
532 struct GObject
533 {
534 	GTypeInstance gTypeInstance;
535 	uint refCount;
536 	GData* qdata;
537 }
538 
539 struct GObjectClass
540 {
541 	/**
542 	 * the parent class
543 	 */
544 	GTypeClass gTypeClass;
545 	GSList* constructProperties;
546 	/** */
547 	extern(C) GObject* function(GType type, uint nConstructProperties, GObjectConstructParam* constructProperties) constructor;
548 	/** */
549 	extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) setProperty;
550 	/** */
551 	extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) getProperty;
552 	/** */
553 	extern(C) void function(GObject* object) dispose;
554 	/** */
555 	extern(C) void function(GObject* object) finalize;
556 	/** */
557 	extern(C) void function(GObject* object, uint nPspecs, GParamSpec** pspecs) dispatchPropertiesChanged;
558 	/** */
559 	extern(C) void function(GObject* object, GParamSpec* pspec) notify;
560 	/** */
561 	extern(C) void function(GObject* object) constructed;
562 	size_t flags;
563 	void*[6] pdummy;
564 }
565 
566 /**
567  * The GObjectConstructParam struct is an auxiliary
568  * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
569  * a #GObjectClass.
570  */
571 struct GObjectConstructParam
572 {
573 	/**
574 	 * the #GParamSpec of the construct parameter
575 	 */
576 	GParamSpec* pspec;
577 	/**
578 	 * the value to set the parameter to
579 	 */
580 	GValue* value;
581 }
582 
583 struct GParamSpec
584 {
585 	/**
586 	 * private #GTypeInstance portion
587 	 */
588 	GTypeInstance gTypeInstance;
589 	/**
590 	 * name of this parameter: always an interned string
591 	 */
592 	const(char)* name;
593 	/**
594 	 * #GParamFlags flags for this parameter
595 	 */
596 	GParamFlags flags;
597 	/**
598 	 * the #GValue type for this parameter
599 	 */
600 	GType valueType;
601 	/**
602 	 * #GType type that uses (introduces) this parameter
603 	 */
604 	GType ownerType;
605 	char* Nick;
606 	char* Blurb;
607 	GData* qdata;
608 	uint refCount;
609 	uint paramId;
610 }
611 
612 struct GParamSpecBoolean
613 {
614 	/**
615 	 * private #GParamSpec portion
616 	 */
617 	GParamSpec parentInstance;
618 	/**
619 	 * default value for the property specified
620 	 */
621 	bool defaultValue;
622 }
623 
624 struct GParamSpecBoxed
625 {
626 	/**
627 	 * private #GParamSpec portion
628 	 */
629 	GParamSpec parentInstance;
630 }
631 
632 struct GParamSpecChar
633 {
634 	/**
635 	 * private #GParamSpec portion
636 	 */
637 	GParamSpec parentInstance;
638 	/**
639 	 * minimum value for the property specified
640 	 */
641 	byte minimum;
642 	/**
643 	 * maximum value for the property specified
644 	 */
645 	byte maximum;
646 	/**
647 	 * default value for the property specified
648 	 */
649 	byte defaultValue;
650 }
651 
652 /**
653  * The class structure for the GParamSpec type.
654  * Normally, GParamSpec classes are filled by
655  * g_param_type_register_static().
656  */
657 struct GParamSpecClass
658 {
659 	/**
660 	 * the parent class
661 	 */
662 	GTypeClass gTypeClass;
663 	/**
664 	 * the #GValue type for this parameter
665 	 */
666 	GType valueType;
667 	/** */
668 	extern(C) void function(GParamSpec* pspec) finalize;
669 	/** */
670 	extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault;
671 	/** */
672 	extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate;
673 	/** */
674 	extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp;
675 	void*[4] dummy;
676 }
677 
678 struct GParamSpecDouble
679 {
680 	/**
681 	 * private #GParamSpec portion
682 	 */
683 	GParamSpec parentInstance;
684 	/**
685 	 * minimum value for the property specified
686 	 */
687 	double minimum;
688 	/**
689 	 * maximum value for the property specified
690 	 */
691 	double maximum;
692 	/**
693 	 * default value for the property specified
694 	 */
695 	double defaultValue;
696 	/**
697 	 * values closer than @epsilon will be considered identical
698 	 * by g_param_values_cmp(); the default value is 1e-90.
699 	 */
700 	double epsilon;
701 }
702 
703 struct GParamSpecEnum
704 {
705 	/**
706 	 * private #GParamSpec portion
707 	 */
708 	GParamSpec parentInstance;
709 	/**
710 	 * the #GEnumClass for the enum
711 	 */
712 	GEnumClass* enumClass;
713 	/**
714 	 * default value for the property specified
715 	 */
716 	int defaultValue;
717 }
718 
719 struct GParamSpecFlags
720 {
721 	/**
722 	 * private #GParamSpec portion
723 	 */
724 	GParamSpec parentInstance;
725 	/**
726 	 * the #GFlagsClass for the flags
727 	 */
728 	GFlagsClass* flagsClass;
729 	/**
730 	 * default value for the property specified
731 	 */
732 	uint defaultValue;
733 }
734 
735 struct GParamSpecFloat
736 {
737 	/**
738 	 * private #GParamSpec portion
739 	 */
740 	GParamSpec parentInstance;
741 	/**
742 	 * minimum value for the property specified
743 	 */
744 	float minimum;
745 	/**
746 	 * maximum value for the property specified
747 	 */
748 	float maximum;
749 	/**
750 	 * default value for the property specified
751 	 */
752 	float defaultValue;
753 	/**
754 	 * values closer than @epsilon will be considered identical
755 	 * by g_param_values_cmp(); the default value is 1e-30.
756 	 */
757 	float epsilon;
758 }
759 
760 struct GParamSpecGType
761 {
762 	/**
763 	 * private #GParamSpec portion
764 	 */
765 	GParamSpec parentInstance;
766 	/**
767 	 * a #GType whose subtypes can occur as values
768 	 */
769 	GType isAType;
770 }
771 
772 struct GParamSpecInt
773 {
774 	/**
775 	 * private #GParamSpec portion
776 	 */
777 	GParamSpec parentInstance;
778 	/**
779 	 * minimum value for the property specified
780 	 */
781 	int minimum;
782 	/**
783 	 * maximum value for the property specified
784 	 */
785 	int maximum;
786 	/**
787 	 * default value for the property specified
788 	 */
789 	int defaultValue;
790 }
791 
792 struct GParamSpecInt64
793 {
794 	/**
795 	 * private #GParamSpec portion
796 	 */
797 	GParamSpec parentInstance;
798 	/**
799 	 * minimum value for the property specified
800 	 */
801 	long minimum;
802 	/**
803 	 * maximum value for the property specified
804 	 */
805 	long maximum;
806 	/**
807 	 * default value for the property specified
808 	 */
809 	long defaultValue;
810 }
811 
812 struct GParamSpecLong
813 {
814 	/**
815 	 * private #GParamSpec portion
816 	 */
817 	GParamSpec parentInstance;
818 	/**
819 	 * minimum value for the property specified
820 	 */
821 	glong minimum;
822 	/**
823 	 * maximum value for the property specified
824 	 */
825 	glong maximum;
826 	/**
827 	 * default value for the property specified
828 	 */
829 	glong defaultValue;
830 }
831 
832 struct GParamSpecObject
833 {
834 	/**
835 	 * private #GParamSpec portion
836 	 */
837 	GParamSpec parentInstance;
838 }
839 
840 struct GParamSpecOverride
841 {
842 	GParamSpec parentInstance;
843 	GParamSpec* overridden;
844 }
845 
846 struct GParamSpecParam
847 {
848 	/**
849 	 * private #GParamSpec portion
850 	 */
851 	GParamSpec parentInstance;
852 }
853 
854 struct GParamSpecPointer
855 {
856 	/**
857 	 * private #GParamSpec portion
858 	 */
859 	GParamSpec parentInstance;
860 }
861 
862 struct GParamSpecPool;
863 
864 struct GParamSpecString
865 {
866 	/**
867 	 * private #GParamSpec portion
868 	 */
869 	GParamSpec parentInstance;
870 	/**
871 	 * default value for the property specified
872 	 */
873 	char* defaultValue;
874 	/**
875 	 * a string containing the allowed values for the first byte
876 	 */
877 	char* csetFirst;
878 	/**
879 	 * a string containing the allowed values for the subsequent bytes
880 	 */
881 	char* csetNth;
882 	/**
883 	 * the replacement byte for bytes which don't match @cset_first or @cset_nth.
884 	 */
885 	char substitutor;
886 	import std.bitmanip: bitfields;
887 	mixin(bitfields!(
888 		uint, "nullFoldIfEmpty", 1,
889 		uint, "ensureNonNull", 1,
890 		uint, "", 30
891 	));
892 }
893 
894 /**
895  * This structure is used to provide the type system with the information
896  * required to initialize and destruct (finalize) a parameter's class and
897  * instances thereof.
898  * The initialized structure is passed to the g_param_type_register_static()
899  * The type system will perform a deep copy of this structure, so its memory
900  * does not need to be persistent across invocation of
901  * g_param_type_register_static().
902  */
903 struct GParamSpecTypeInfo
904 {
905 	/**
906 	 * Size of the instance (object) structure.
907 	 */
908 	ushort instanceSize;
909 	/**
910 	 * 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][glib-Memory-Slices] now.
911 	 */
912 	ushort nPreallocs;
913 	/** */
914 	extern(C) void function(GParamSpec* pspec) instanceInit;
915 	/**
916 	 * The #GType of values conforming to this #GParamSpec
917 	 */
918 	GType valueType;
919 	/** */
920 	extern(C) void function(GParamSpec* pspec) finalize;
921 	/** */
922 	extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault;
923 	/** */
924 	extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate;
925 	/** */
926 	extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp;
927 }
928 
929 struct GParamSpecUChar
930 {
931 	/**
932 	 * private #GParamSpec portion
933 	 */
934 	GParamSpec parentInstance;
935 	/**
936 	 * minimum value for the property specified
937 	 */
938 	ubyte minimum;
939 	/**
940 	 * maximum value for the property specified
941 	 */
942 	ubyte maximum;
943 	/**
944 	 * default value for the property specified
945 	 */
946 	ubyte defaultValue;
947 }
948 
949 struct GParamSpecUInt
950 {
951 	/**
952 	 * private #GParamSpec portion
953 	 */
954 	GParamSpec parentInstance;
955 	/**
956 	 * minimum value for the property specified
957 	 */
958 	uint minimum;
959 	/**
960 	 * maximum value for the property specified
961 	 */
962 	uint maximum;
963 	/**
964 	 * default value for the property specified
965 	 */
966 	uint defaultValue;
967 }
968 
969 struct GParamSpecUInt64
970 {
971 	/**
972 	 * private #GParamSpec portion
973 	 */
974 	GParamSpec parentInstance;
975 	/**
976 	 * minimum value for the property specified
977 	 */
978 	ulong minimum;
979 	/**
980 	 * maximum value for the property specified
981 	 */
982 	ulong maximum;
983 	/**
984 	 * default value for the property specified
985 	 */
986 	ulong defaultValue;
987 }
988 
989 struct GParamSpecULong
990 {
991 	/**
992 	 * private #GParamSpec portion
993 	 */
994 	GParamSpec parentInstance;
995 	/**
996 	 * minimum value for the property specified
997 	 */
998 	gulong minimum;
999 	/**
1000 	 * maximum value for the property specified
1001 	 */
1002 	gulong maximum;
1003 	/**
1004 	 * default value for the property specified
1005 	 */
1006 	gulong defaultValue;
1007 }
1008 
1009 struct GParamSpecUnichar
1010 {
1011 	/**
1012 	 * private #GParamSpec portion
1013 	 */
1014 	GParamSpec parentInstance;
1015 	/**
1016 	 * default value for the property specified
1017 	 */
1018 	dchar defaultValue;
1019 }
1020 
1021 struct GParamSpecValueArray
1022 {
1023 	/**
1024 	 * private #GParamSpec portion
1025 	 */
1026 	GParamSpec parentInstance;
1027 	/**
1028 	 * a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
1029 	 */
1030 	GParamSpec* elementSpec;
1031 	/**
1032 	 * if greater than 0, arrays of this property will always have this many elements
1033 	 */
1034 	uint fixedNElements;
1035 }
1036 
1037 struct GParamSpecVariant
1038 {
1039 	/**
1040 	 * private #GParamSpec portion
1041 	 */
1042 	GParamSpec parentInstance;
1043 	/**
1044 	 * a #GVariantType, or %NULL
1045 	 */
1046 	GVariantType* type;
1047 	/**
1048 	 * a #GVariant, or %NULL
1049 	 */
1050 	GVariant* defaultValue;
1051 	void*[4] padding;
1052 }
1053 
1054 /**
1055  * The GParameter struct is an auxiliary structure used
1056  * to hand parameter name/value pairs to g_object_newv().
1057  *
1058  * Deprecated: This type is not introspectable.
1059  */
1060 struct GParameter
1061 {
1062 	/**
1063 	 * the parameter name
1064 	 */
1065 	const(char)* name;
1066 	/**
1067 	 * the parameter value
1068 	 */
1069 	GValue value;
1070 }
1071 
1072 /**
1073  * The #GSignalInvocationHint structure is used to pass on additional information
1074  * to callbacks during a signal emission.
1075  */
1076 struct GSignalInvocationHint
1077 {
1078 	/**
1079 	 * The signal id of the signal invoking the callback
1080 	 */
1081 	uint signalId;
1082 	/**
1083 	 * The detail passed on for this emission
1084 	 */
1085 	GQuark detail;
1086 	/**
1087 	 * The stage the signal emission is currently in, this
1088 	 * field will contain one of %G_SIGNAL_RUN_FIRST,
1089 	 * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
1090 	 */
1091 	GSignalFlags runType;
1092 }
1093 
1094 /**
1095  * A structure holding in-depth information for a specific signal. It is
1096  * filled in by the g_signal_query() function.
1097  */
1098 struct GSignalQuery
1099 {
1100 	/**
1101 	 * The signal id of the signal being queried, or 0 if the
1102 	 * signal to be queried was unknown.
1103 	 */
1104 	uint signalId;
1105 	/**
1106 	 * The signal name.
1107 	 */
1108 	const(char)* signalName;
1109 	/**
1110 	 * The interface/instance type that this signal can be emitted for.
1111 	 */
1112 	GType itype;
1113 	/**
1114 	 * The signal flags as passed in to g_signal_new().
1115 	 */
1116 	GSignalFlags signalFlags;
1117 	/**
1118 	 * The return type for user callbacks.
1119 	 */
1120 	GType returnType;
1121 	/**
1122 	 * The number of parameters that user callbacks take.
1123 	 */
1124 	uint nParams;
1125 	/**
1126 	 * The individual parameter types for
1127 	 * user callbacks, note that the effective callback signature is:
1128 	 * |[<!-- language="C" -->
1129 	 * @return_type callback (#gpointer     data1,
1130 	 * [param_types param_names,]
1131 	 * gpointer     data2);
1132 	 * ]|
1133 	 */
1134 	GType* paramTypes;
1135 }
1136 
1137 /**
1138  * A union holding one collected value.
1139  */
1140 struct GTypeCValue
1141 {
1142 	union
1143 	{
1144 		/**
1145 		 * the field for holding integer values
1146 		 */
1147 		int vInt;
1148 		/**
1149 		 * the field for holding long integer values
1150 		 */
1151 		glong vLong;
1152 		/**
1153 		 * the field for holding 64 bit integer values
1154 		 */
1155 		long vInt64;
1156 		/**
1157 		 * the field for holding floating point values
1158 		 */
1159 		double vDouble;
1160 		/**
1161 		 * the field for holding pointers
1162 		 */
1163 		void* vPointer;
1164 	}
1165 }
1166 
1167 struct GTypeClass
1168 {
1169 	GType gType;
1170 }
1171 
1172 /**
1173  * A structure that provides information to the type system which is
1174  * used specifically for managing fundamental types.
1175  */
1176 struct GTypeFundamentalInfo
1177 {
1178 	/**
1179 	 * #GTypeFundamentalFlags describing the characteristics of the fundamental type
1180 	 */
1181 	GTypeFundamentalFlags typeFlags;
1182 }
1183 
1184 /**
1185  * This structure is used to provide the type system with the information
1186  * required to initialize and destruct (finalize) a type's class and
1187  * its instances.
1188  *
1189  * The initialized structure is passed to the g_type_register_static() function
1190  * (or is copied into the provided #GTypeInfo structure in the
1191  * g_type_plugin_complete_type_info()). The type system will perform a deep
1192  * copy of this structure, so its memory does not need to be persistent
1193  * across invocation of g_type_register_static().
1194  */
1195 struct GTypeInfo
1196 {
1197 	/**
1198 	 * Size of the class structure (required for interface, classed and instantiatable types)
1199 	 */
1200 	ushort classSize;
1201 	/**
1202 	 * Location of the base initialization function (optional)
1203 	 */
1204 	GBaseInitFunc baseInit;
1205 	/**
1206 	 * Location of the base finalization function (optional)
1207 	 */
1208 	GBaseFinalizeFunc baseFinalize;
1209 	/**
1210 	 * Location of the class initialization function for
1211 	 * classed and instantiatable types. Location of the default vtable
1212 	 * inititalization function for interface types. (optional) This function
1213 	 * is used both to fill in virtual functions in the class or default vtable,
1214 	 * and to do type-specific setup such as registering signals and object
1215 	 * properties.
1216 	 */
1217 	GClassInitFunc classInit;
1218 	/**
1219 	 * Location of the class finalization function for
1220 	 * classed and instantiatable types. Location of the default vtable
1221 	 * finalization function for interface types. (optional)
1222 	 */
1223 	GClassFinalizeFunc classFinalize;
1224 	/**
1225 	 * User-supplied data passed to the class init/finalize functions
1226 	 */
1227 	void* classData;
1228 	/**
1229 	 * Size of the instance (object) structure (required for instantiatable types only)
1230 	 */
1231 	ushort instanceSize;
1232 	/**
1233 	 * 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][glib-Memory-Slices] now.
1234 	 */
1235 	ushort nPreallocs;
1236 	/**
1237 	 * Location of the instance initialization function (optional, for instantiatable types only)
1238 	 */
1239 	GInstanceInitFunc instanceInit;
1240 	/**
1241 	 * A #GTypeValueTable function table for generic handling of GValues
1242 	 * of this type (usually only useful for fundamental types)
1243 	 */
1244 	GTypeValueTable* valueTable;
1245 }
1246 
1247 struct GTypeInstance
1248 {
1249 	GTypeClass* gClass;
1250 }
1251 
1252 struct GTypeInterface
1253 {
1254 	GType gType;
1255 	GType gInstanceType;
1256 }
1257 
1258 struct GTypeModule
1259 {
1260 	GObject parentInstance;
1261 	uint useCount;
1262 	GSList* typeInfos;
1263 	GSList* interfaceInfos;
1264 	/**
1265 	 * the name of the module
1266 	 */
1267 	char* name;
1268 }
1269 
1270 /**
1271  * In order to implement dynamic loading of types based on #GTypeModule,
1272  * the @load and @unload functions in #GTypeModuleClass must be implemented.
1273  */
1274 struct GTypeModuleClass
1275 {
1276 	/**
1277 	 * the parent class
1278 	 */
1279 	GObjectClass parentClass;
1280 	/** */
1281 	extern(C) int function(GTypeModule* modul) load;
1282 	/** */
1283 	extern(C) void function(GTypeModule* modul) unload;
1284 	/** */
1285 	extern(C) void function() reserved1;
1286 	/** */
1287 	extern(C) void function() reserved2;
1288 	/** */
1289 	extern(C) void function() reserved3;
1290 	/** */
1291 	extern(C) void function() reserved4;
1292 }
1293 
1294 struct GTypePlugin;
1295 
1296 /**
1297  * The #GTypePlugin interface is used by the type system in order to handle
1298  * the lifecycle of dynamically loaded types.
1299  */
1300 struct GTypePluginClass
1301 {
1302 	GTypeInterface baseIface;
1303 	/**
1304 	 * Increases the use count of the plugin.
1305 	 */
1306 	GTypePluginUse usePlugin;
1307 	/**
1308 	 * Decreases the use count of the plugin.
1309 	 */
1310 	GTypePluginUnuse unusePlugin;
1311 	/**
1312 	 * Fills in the #GTypeInfo and
1313 	 * #GTypeValueTable structs for the type. The structs are initialized
1314 	 * with `memset(s, 0, sizeof (s))` before calling this function.
1315 	 */
1316 	GTypePluginCompleteTypeInfo completeTypeInfo;
1317 	/**
1318 	 * Fills in missing parts of the #GInterfaceInfo
1319 	 * for the interface. The structs is initialized with
1320 	 * `memset(s, 0, sizeof (s))` before calling this function.
1321 	 */
1322 	GTypePluginCompleteInterfaceInfo completeInterfaceInfo;
1323 }
1324 
1325 /**
1326  * A structure holding information for a specific type.
1327  * It is filled in by the g_type_query() function.
1328  */
1329 struct GTypeQuery
1330 {
1331 	/**
1332 	 * the #GType value of the type
1333 	 */
1334 	GType type;
1335 	/**
1336 	 * the name of the type
1337 	 */
1338 	const(char)* typeName;
1339 	/**
1340 	 * the size of the class structure
1341 	 */
1342 	uint classSize;
1343 	/**
1344 	 * the size of the instance structure
1345 	 */
1346 	uint instanceSize;
1347 }
1348 
1349 /**
1350  * The #GTypeValueTable provides the functions required by the #GValue
1351  * implementation, to serve as a container for values of a type.
1352  */
1353 struct GTypeValueTable
1354 {
1355 	/** */
1356 	extern(C) void function(GValue* value) valueInit;
1357 	/** */
1358 	extern(C) void function(GValue* value) valueFree;
1359 	/** */
1360 	extern(C) void function(GValue* srcValue, GValue* destValue) valueCopy;
1361 	/** */
1362 	extern(C) void* function(GValue* value) valuePeekPointer;
1363 	/**
1364 	 * A string format describing how to collect the contents of
1365 	 * this value bit-by-bit. Each character in the format represents
1366 	 * an argument to be collected, and the characters themselves indicate
1367 	 * the type of the argument. Currently supported arguments are:
1368 	 * - 'i' - Integers. passed as collect_values[].v_int.
1369 	 * - 'l' - Longs. passed as collect_values[].v_long.
1370 	 * - 'd' - Doubles. passed as collect_values[].v_double.
1371 	 * - 'p' - Pointers. passed as collect_values[].v_pointer.
1372 	 * It should be noted that for variable argument list construction,
1373 	 * ANSI C promotes every type smaller than an integer to an int, and
1374 	 * floats to doubles. So for collection of short int or char, 'i'
1375 	 * needs to be used, and for collection of floats 'd'.
1376 	 */
1377 	const(char)* collectFormat;
1378 	/** */
1379 	extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) collectValue;
1380 	/**
1381 	 * Format description of the arguments to collect for @lcopy_value,
1382 	 * analogous to @collect_format. Usually, @lcopy_format string consists
1383 	 * only of 'p's to provide lcopy_value() with pointers to storage locations.
1384 	 */
1385 	const(char)* lcopyFormat;
1386 	/** */
1387 	extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) lcopyValue;
1388 }
1389 
1390 struct GValue
1391 {
1392 	GType gType;
1393 	ValueDataUnion[2] data;
1394 }
1395 
1396 struct GValueArray
1397 {
1398 	/**
1399 	 * number of values contained in the array
1400 	 */
1401 	uint nValues;
1402 	/**
1403 	 * array of values
1404 	 */
1405 	GValue* values;
1406 	uint nPrealloced;
1407 }
1408 
1409 struct GWeakRef
1410 {
1411 	union Priv
1412 	{
1413 		void* p;
1414 	}
1415 	Priv priv;
1416 }
1417 
1418 struct ValueDataUnion
1419 {
1420 	union
1421 	{
1422 		int vInt;
1423 		uint vUint;
1424 		glong vLong;
1425 		gulong vUlong;
1426 		long vInt64;
1427 		ulong vUint64;
1428 		float vFloat;
1429 		double vDouble;
1430 		void* vPointer;
1431 	}
1432 }
1433 
1434 /**
1435  * A callback function used by the type system to finalize those portions
1436  * of a derived types class structure that were setup from the corresponding
1437  * GBaseInitFunc() function. Class finalization basically works the inverse
1438  * way in which class initialization is performed.
1439  * See GClassInitFunc() for a discussion of the class initialization process.
1440  *
1441  * Params:
1442  *     gClass = The #GTypeClass structure to finalize
1443  */
1444 public alias extern(C) void function(void* gClass) GBaseFinalizeFunc;
1445 
1446 /**
1447  * A callback function used by the type system to do base initialization
1448  * of the class structures of derived types. It is called as part of the
1449  * initialization process of all derived classes and should reallocate
1450  * or reset all dynamic class members copied over from the parent class.
1451  * For example, class members (such as strings) that are not sufficiently
1452  * handled by a plain memory copy of the parent class into the derived class
1453  * have to be altered. See GClassInitFunc() for a discussion of the class
1454  * initialization process.
1455  *
1456  * Params:
1457  *     gClass = The #GTypeClass structure to initialize
1458  */
1459 public alias extern(C) void function(void* gClass) GBaseInitFunc;
1460 
1461 /**
1462  * A function to be called to transform @from_value to @to_value. If
1463  * this is the @transform_to function of a binding, then @from_value
1464  * is the @source_property on the @source object, and @to_value is the
1465  * @target_property on the @target object. If this is the
1466  * @transform_from function of a %G_BINDING_BIDIRECTIONAL binding,
1467  * then those roles are reversed.
1468  *
1469  * Params:
1470  *     binding = a #GBinding
1471  *     fromValue = the #GValue containing the value to transform
1472  *     toValue = the #GValue in which to store the transformed value
1473  *     userData = data passed to the transform function
1474  *
1475  * Returns: %TRUE if the transformation was successful, and %FALSE
1476  *     otherwise
1477  *
1478  * Since: 2.26
1479  */
1480 public alias extern(C) int function(GBinding* binding, GValue* fromValue, GValue* toValue, void* userData) GBindingTransformFunc;
1481 
1482 /**
1483  * This function is provided by the user and should produce a copy
1484  * of the passed in boxed structure.
1485  *
1486  * Params:
1487  *     boxed = The boxed structure to be copied.
1488  *
1489  * Returns: The newly created copy of the boxed structure.
1490  */
1491 public alias extern(C) void* function(void* boxed) GBoxedCopyFunc;
1492 
1493 /**
1494  * This function is provided by the user and should free the boxed
1495  * structure passed.
1496  *
1497  * Params:
1498  *     boxed = The boxed structure to be freed.
1499  */
1500 public alias extern(C) void function(void* boxed) GBoxedFreeFunc;
1501 
1502 /**
1503  * The type used for callback functions in structure definitions and function
1504  * signatures. This doesn't mean that all callback functions must take no
1505  * parameters and return void. The required signature of a callback function
1506  * is determined by the context in which is used (e.g. the signal to which it
1507  * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
1508  */
1509 public alias extern(C) void function() GCallback;
1510 
1511 /**
1512  * A callback function used by the type system to finalize a class.
1513  * This function is rarely needed, as dynamically allocated class resources
1514  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
1515  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
1516  * structure of a static type is invalid, because classes of static types
1517  * will never be finalized (they are artificially kept alive when their
1518  * reference count drops to zero).
1519  *
1520  * Params:
1521  *     gClass = The #GTypeClass structure to finalize
1522  *     classData = The @class_data member supplied via the #GTypeInfo structure
1523  */
1524 public alias extern(C) void function(void* gClass, void* classData) GClassFinalizeFunc;
1525 
1526 /**
1527  * A callback function used by the type system to initialize the class
1528  * of a specific type. This function should initialize all static class
1529  * members.
1530  *
1531  * The initialization process of a class involves:
1532  *
1533  * - Copying common members from the parent class over to the
1534  * derived class structure.
1535  * - Zero initialization of the remaining members not copied
1536  * over from the parent class.
1537  * - Invocation of the GBaseInitFunc() initializers of all parent
1538  * types and the class' type.
1539  * - Invocation of the class' GClassInitFunc() initializer.
1540  *
1541  * Since derived classes are partially initialized through a memory copy
1542  * of the parent class, the general rule is that GBaseInitFunc() and
1543  * GBaseFinalizeFunc() should take care of necessary reinitialization
1544  * and release of those class members that were introduced by the type
1545  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
1546  * GClassInitFunc() should only care about initializing static
1547  * class members, while dynamic class members (such as allocated strings
1548  * or reference counted resources) are better handled by a GBaseInitFunc()
1549  * for this type, so proper initialization of the dynamic class members
1550  * is performed for class initialization of derived types as well.
1551  *
1552  * An example may help to correspond the intend of the different class
1553  * initializers:
1554  *
1555  * |[<!-- language="C" -->
1556  * typedef struct {
1557  * GObjectClass parent_class;
1558  * gint         static_integer;
1559  * gchar       *dynamic_string;
1560  * } TypeAClass;
1561  * static void
1562  * type_a_base_class_init (TypeAClass *class)
1563  * {
1564  * class->dynamic_string = g_strdup ("some string");
1565  * }
1566  * static void
1567  * type_a_base_class_finalize (TypeAClass *class)
1568  * {
1569  * g_free (class->dynamic_string);
1570  * }
1571  * static void
1572  * type_a_class_init (TypeAClass *class)
1573  * {
1574  * class->static_integer = 42;
1575  * }
1576  *
1577  * typedef struct {
1578  * TypeAClass   parent_class;
1579  * gfloat       static_float;
1580  * GString     *dynamic_gstring;
1581  * } TypeBClass;
1582  * static void
1583  * type_b_base_class_init (TypeBClass *class)
1584  * {
1585  * class->dynamic_gstring = g_string_new ("some other string");
1586  * }
1587  * static void
1588  * type_b_base_class_finalize (TypeBClass *class)
1589  * {
1590  * g_string_free (class->dynamic_gstring);
1591  * }
1592  * static void
1593  * type_b_class_init (TypeBClass *class)
1594  * {
1595  * class->static_float = 3.14159265358979323846;
1596  * }
1597  * ]|
1598  * Initialization of TypeBClass will first cause initialization of
1599  * TypeAClass (derived classes reference their parent classes, see
1600  * g_type_class_ref() on this).
1601  *
1602  * Initialization of TypeAClass roughly involves zero-initializing its fields,
1603  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
1604  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
1605  * type_a_class_init() to initialize its static members (static_integer).
1606  * The first step in the initialization process of TypeBClass is then
1607  * a plain memory copy of the contents of TypeAClass into TypeBClass and
1608  * zero-initialization of the remaining fields in TypeBClass.
1609  * The dynamic members of TypeAClass within TypeBClass now need
1610  * reinitialization which is performed by calling type_a_base_class_init()
1611  * with an argument of TypeBClass.
1612  *
1613  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
1614  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
1615  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
1616  * is called to complete the initialization process with the static members
1617  * (static_float).
1618  *
1619  * Corresponding finalization counter parts to the GBaseInitFunc() functions
1620  * have to be provided to release allocated resources at class finalization
1621  * time.
1622  *
1623  * Params:
1624  *     gClass = The #GTypeClass structure to initialize.
1625  *     classData = The @class_data member supplied via the #GTypeInfo structure.
1626  */
1627 public alias extern(C) void function(void* gClass, void* classData) GClassInitFunc;
1628 
1629 /**
1630  * The type used for marshaller functions.
1631  *
1632  * Params:
1633  *     closure = the #GClosure to which the marshaller belongs
1634  *     returnValue = a #GValue to store the return
1635  *         value. May be %NULL if the callback of @closure doesn't return a
1636  *         value.
1637  *     nParamValues = the length of the @param_values array
1638  *     paramValues = an array of
1639  *         #GValues holding the arguments on which to invoke the
1640  *         callback of @closure
1641  *     invocationHint = the invocation hint given as the
1642  *         last argument to g_closure_invoke()
1643  *     marshalData = additional data specified when
1644  *         registering the marshaller, see g_closure_set_marshal() and
1645  *         g_closure_set_meta_marshal()
1646  */
1647 public alias extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) GClosureMarshal;
1648 
1649 /**
1650  * The type used for the various notification callbacks which can be registered
1651  * on closures.
1652  *
1653  * Params:
1654  *     data = data specified when registering the notification callback
1655  *     closure = the #GClosure on which the notification is emitted
1656  */
1657 public alias extern(C) void function(void* data, GClosure* closure) GClosureNotify;
1658 
1659 /**
1660  * A callback function used by the type system to initialize a new
1661  * instance of a type. This function initializes all instance members and
1662  * allocates any resources required by it.
1663  *
1664  * Initialization of a derived instance involves calling all its parent
1665  * types instance initializers, so the class member of the instance
1666  * is altered during its initialization to always point to the class that
1667  * belongs to the type the current initializer was introduced for.
1668  *
1669  * The extended members of @instance are guaranteed to have been filled with
1670  * zeros before this function is called.
1671  *
1672  * Params:
1673  *     instanc = The instance to initialize
1674  *     gClass = The class of the type the instance is
1675  *         created for
1676  */
1677 public alias extern(C) void function(GTypeInstance* instanc, void* gClass) GInstanceInitFunc;
1678 
1679 /**
1680  * A callback function used by the type system to finalize an interface.
1681  * This function should destroy any internal data and release any resources
1682  * allocated by the corresponding GInterfaceInitFunc() function.
1683  *
1684  * Params:
1685  *     gIface = The interface structure to finalize
1686  *     ifaceData = The @interface_data supplied via the #GInterfaceInfo structure
1687  */
1688 public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceFinalizeFunc;
1689 
1690 /**
1691  * A callback function used by the type system to initialize a new
1692  * interface.  This function should initialize all internal data and
1693  * allocate any resources required by the interface.
1694  *
1695  * The members of @iface_data are guaranteed to have been filled with
1696  * zeros before this function is called.
1697  *
1698  * Params:
1699  *     gIface = The interface structure to initialize
1700  *     ifaceData = The @interface_data supplied via the #GInterfaceInfo structure
1701  */
1702 public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceInitFunc;
1703 
1704 /**
1705  * The type of the @finalize function of #GObjectClass.
1706  *
1707  * Params:
1708  *     object = the #GObject being finalized
1709  */
1710 public alias extern(C) void function(GObject* object) GObjectFinalizeFunc;
1711 
1712 /**
1713  * The type of the @get_property function of #GObjectClass.
1714  *
1715  * Params:
1716  *     object = a #GObject
1717  *     propertyId = the numeric id under which the property was registered with
1718  *         g_object_class_install_property().
1719  *     value = a #GValue to return the property value in
1720  *     pspec = the #GParamSpec describing the property
1721  */
1722 public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectGetPropertyFunc;
1723 
1724 /**
1725  * The type of the @set_property function of #GObjectClass.
1726  *
1727  * Params:
1728  *     object = a #GObject
1729  *     propertyId = the numeric id under which the property was registered with
1730  *         g_object_class_install_property().
1731  *     value = the new value for the property
1732  *     pspec = the #GParamSpec describing the property
1733  */
1734 public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectSetPropertyFunc;
1735 
1736 /**
1737  * The signal accumulator is a special callback function that can be used
1738  * to collect return values of the various callbacks that are called
1739  * during a signal emission. The signal accumulator is specified at signal
1740  * creation time, if it is left %NULL, no accumulation of callback return
1741  * values is performed. The return value of signal emissions is then the
1742  * value returned by the last callback.
1743  *
1744  * Params:
1745  *     ihint = Signal invocation hint, see #GSignalInvocationHint.
1746  *     returnAccu = Accumulator to collect callback return values in, this
1747  *         is the return value of the current signal emission.
1748  *     handlerReturn = A #GValue holding the return value of the signal handler.
1749  *     data = Callback data that was specified when creating the signal.
1750  *
1751  * Returns: The accumulator function returns whether the signal emission
1752  *     should be aborted. Returning %FALSE means to abort the
1753  *     current emission and %TRUE is returned for continuation.
1754  */
1755 public alias extern(C) int function(GSignalInvocationHint* ihint, GValue* returnAccu, GValue* handlerReturn, void* data) GSignalAccumulator;
1756 
1757 /**
1758  * A simple function pointer to get invoked when the signal is emitted. This
1759  * allows you to tie a hook to the signal type, so that it will trap all
1760  * emissions of that signal, from any object.
1761  *
1762  * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
1763  *
1764  * Params:
1765  *     ihint = Signal invocation hint, see #GSignalInvocationHint.
1766  *     nParamValues = the number of parameters to the function, including
1767  *         the instance on which the signal was emitted.
1768  *     paramValues = the instance on which
1769  *         the signal was emitted, followed by the parameters of the emission.
1770  *     data = user data associated with the hook.
1771  *
1772  * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
1773  *     hook is disconnected (and destroyed).
1774  */
1775 public alias extern(C) int function(GSignalInvocationHint* ihint, uint nParamValues, GValue* paramValues, void* data) GSignalEmissionHook;
1776 
1777 /**
1778  * A callback function used for notification when the state
1779  * of a toggle reference changes. See g_object_add_toggle_ref().
1780  *
1781  * Params:
1782  *     data = Callback data passed to g_object_add_toggle_ref()
1783  *     object = The object on which g_object_add_toggle_ref() was called.
1784  *     isLastRef = %TRUE if the toggle reference is now the
1785  *         last reference to the object. %FALSE if the toggle
1786  *         reference was the last reference and there are now other
1787  *         references.
1788  */
1789 public alias extern(C) void function(void* data, GObject* object, int isLastRef) GToggleNotify;
1790 
1791 /**
1792  * A callback function which is called when the reference count of a class
1793  * drops to zero. It may use g_type_class_ref() to prevent the class from
1794  * being freed. You should not call g_type_class_unref() from a
1795  * #GTypeClassCacheFunc function to prevent infinite recursion, use
1796  * g_type_class_unref_uncached() instead.
1797  *
1798  * The functions have to check the class id passed in to figure
1799  * whether they actually want to cache the class of this type, since all
1800  * classes are routed through the same #GTypeClassCacheFunc chain.
1801  *
1802  * Params:
1803  *     cacheData = data that was given to the g_type_add_class_cache_func() call
1804  *     gClass = The #GTypeClass structure which is
1805  *         unreferenced
1806  *
1807  * Returns: %TRUE to stop further #GTypeClassCacheFuncs from being
1808  *     called, %FALSE to continue
1809  */
1810 public alias extern(C) int function(void* cacheData, GTypeClass* gClass) GTypeClassCacheFunc;
1811 
1812 /**
1813  * A callback called after an interface vtable is initialized.
1814  * See g_type_add_interface_check().
1815  *
1816  * Params:
1817  *     checkData = data passed to g_type_add_interface_check()
1818  *     gIface = the interface that has been
1819  *         initialized
1820  *
1821  * Since: 2.4
1822  */
1823 public alias extern(C) void function(void* checkData, void* gIface) GTypeInterfaceCheckFunc;
1824 
1825 /**
1826  * The type of the @complete_interface_info function of #GTypePluginClass.
1827  *
1828  * Params:
1829  *     plugin = the #GTypePlugin
1830  *     instanceType = the #GType of an instantiable type to which the interface
1831  *         is added
1832  *     interfaceType = the #GType of the interface whose info is completed
1833  *     info = the #GInterfaceInfo to fill in
1834  */
1835 public alias extern(C) void function(GTypePlugin* plugin, GType instanceType, GType interfaceType, GInterfaceInfo* info) GTypePluginCompleteInterfaceInfo;
1836 
1837 /**
1838  * The type of the @complete_type_info function of #GTypePluginClass.
1839  *
1840  * Params:
1841  *     plugin = the #GTypePlugin
1842  *     gType = the #GType whose info is completed
1843  *     info = the #GTypeInfo struct to fill in
1844  *     valueTable = the #GTypeValueTable to fill in
1845  */
1846 public alias extern(C) void function(GTypePlugin* plugin, GType gType, GTypeInfo* info, GTypeValueTable* valueTable) GTypePluginCompleteTypeInfo;
1847 
1848 /**
1849  * The type of the @unuse_plugin function of #GTypePluginClass.
1850  *
1851  * Params:
1852  *     plugin = the #GTypePlugin whose use count should be decreased
1853  */
1854 public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUnuse;
1855 
1856 /**
1857  * The type of the @use_plugin function of #GTypePluginClass, which gets called
1858  * to increase the use count of @plugin.
1859  *
1860  * Params:
1861  *     plugin = the #GTypePlugin whose use count should be increased
1862  */
1863 public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUse;
1864 
1865 /**
1866  * This is the signature of va_list marshaller functions, an optional
1867  * marshaller that can be used in some situations to avoid
1868  * marshalling the signal argument into GValues.
1869  *
1870  * Params:
1871  *     closure = the #GClosure to which the marshaller belongs
1872  *     returnValue = a #GValue to store the return
1873  *         value. May be %NULL if the callback of @closure doesn't return a
1874  *         value.
1875  *     instanc = the instance on which the closure is
1876  *         invoked.
1877  *     args = va_list of arguments to be passed to the closure.
1878  *     marshalData = additional data specified when
1879  *         registering the marshaller, see g_closure_set_marshal() and
1880  *         g_closure_set_meta_marshal()
1881  *     nParams = the length of the @param_types array
1882  *     paramTypes = the #GType of each argument from
1883  *         @args.
1884  */
1885 public alias extern(C) void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) GVaClosureMarshal;
1886 
1887 /**
1888  * The type of value transformation functions which can be registered with
1889  * g_value_register_transform_func().
1890  *
1891  * Params:
1892  *     srcValue = Source value.
1893  *     destValue = Target value.
1894  */
1895 public alias extern(C) void function(GValue* srcValue, GValue* destValue) GValueTransform;
1896 
1897 /**
1898  * A #GWeakNotify function can be added to an object as a callback that gets
1899  * triggered when the object is finalized. Since the object is already being
1900  * finalized when the #GWeakNotify is called, there's not much you could do
1901  * with the object, apart from e.g. using its address as hash-index or the like.
1902  *
1903  * Params:
1904  *     data = data that was provided when the weak reference was established
1905  *     whereTheObjectWas = the object being finalized
1906  */
1907 public alias extern(C) void function(void* data, GObject* whereTheObjectWas) GWeakNotify;
1908 
1909 /**
1910  * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
1911  */
1912 enum PARAM_MASK = 255;
1913 alias G_PARAM_MASK = PARAM_MASK;
1914 
1915 /**
1916  * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
1917  *
1918  * Since 2.13.0
1919  */
1920 enum PARAM_STATIC_STRINGS = 0;
1921 alias G_PARAM_STATIC_STRINGS = PARAM_STATIC_STRINGS;
1922 
1923 /**
1924  * Minimum shift count to be used for user defined flags, to be stored in
1925  * #GParamSpec.flags. The maximum allowed is 10.
1926  */
1927 enum PARAM_USER_SHIFT = 8;
1928 alias G_PARAM_USER_SHIFT = PARAM_USER_SHIFT;
1929 
1930 /**
1931  * A mask for all #GSignalFlags bits.
1932  */
1933 enum SIGNAL_FLAGS_MASK = 511;
1934 alias G_SIGNAL_FLAGS_MASK = SIGNAL_FLAGS_MASK;
1935 
1936 /**
1937  * A mask for all #GSignalMatchType bits.
1938  */
1939 enum SIGNAL_MATCH_MASK = 63;
1940 alias G_SIGNAL_MATCH_MASK = SIGNAL_MATCH_MASK;
1941 
1942 /**
1943  * A bit in the type number that's supposed to be left untouched.
1944  */
1945 enum TYPE_FLAG_RESERVED_ID_BIT = 1;
1946 alias G_TYPE_FLAG_RESERVED_ID_BIT = TYPE_FLAG_RESERVED_ID_BIT;
1947 
1948 /**
1949  * An integer constant that represents the number of identifiers reserved
1950  * for types that are assigned at compile-time.
1951  */
1952 enum TYPE_FUNDAMENTAL_MAX = 255;
1953 alias G_TYPE_FUNDAMENTAL_MAX = TYPE_FUNDAMENTAL_MAX;
1954 
1955 /**
1956  * Shift value used in converting numbers to type IDs.
1957  */
1958 enum TYPE_FUNDAMENTAL_SHIFT = 2;
1959 alias G_TYPE_FUNDAMENTAL_SHIFT = TYPE_FUNDAMENTAL_SHIFT;
1960 
1961 /**
1962  * First fundamental type number to create a new fundamental type id with
1963  * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
1964  */
1965 enum TYPE_RESERVED_BSE_FIRST = 32;
1966 alias G_TYPE_RESERVED_BSE_FIRST = TYPE_RESERVED_BSE_FIRST;
1967 
1968 /**
1969  * Last fundamental type number reserved for BSE.
1970  */
1971 enum TYPE_RESERVED_BSE_LAST = 48;
1972 alias G_TYPE_RESERVED_BSE_LAST = TYPE_RESERVED_BSE_LAST;
1973 
1974 /**
1975  * First fundamental type number to create a new fundamental type id with
1976  * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
1977  */
1978 enum TYPE_RESERVED_GLIB_FIRST = 22;
1979 alias G_TYPE_RESERVED_GLIB_FIRST = TYPE_RESERVED_GLIB_FIRST;
1980 
1981 /**
1982  * Last fundamental type number reserved for GLib.
1983  */
1984 enum TYPE_RESERVED_GLIB_LAST = 31;
1985 alias G_TYPE_RESERVED_GLIB_LAST = TYPE_RESERVED_GLIB_LAST;
1986 
1987 /**
1988  * First available fundamental type number to create new fundamental
1989  * type id with G_TYPE_MAKE_FUNDAMENTAL().
1990  */
1991 enum TYPE_RESERVED_USER_FIRST = 49;
1992 alias G_TYPE_RESERVED_USER_FIRST = TYPE_RESERVED_USER_FIRST;
1993 
1994 /**
1995  * The maximal number of #GTypeCValues which can be collected for a
1996  * single #GValue.
1997  */
1998 enum VALUE_COLLECT_FORMAT_MAX_LENGTH = 8;
1999 alias G_VALUE_COLLECT_FORMAT_MAX_LENGTH = VALUE_COLLECT_FORMAT_MAX_LENGTH;
2000 
2001 /**
2002  * If passed to G_VALUE_COLLECT(), allocated data won't be copied
2003  * but used verbatim. This does not affect ref-counted types like
2004  * objects.
2005  */
2006 enum VALUE_NOCOPY_CONTENTS = 134217728;
2007 alias G_VALUE_NOCOPY_CONTENTS = VALUE_NOCOPY_CONTENTS;