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