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 	extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) marshal;
410 	void* data;
411 	GClosureNotifyData* notifiers;
412 }
413 
414 struct GClosureNotifyData
415 {
416 	void* data;
417 	GClosureNotify notify;
418 }
419 
420 /**
421  * The class of an enumeration type holds information about its
422  * possible values.
423  */
424 struct GEnumClass
425 {
426 	/**
427 	 * the parent class
428 	 */
429 	GTypeClass gTypeClass;
430 	/**
431 	 * the smallest possible value.
432 	 */
433 	int minimum;
434 	/**
435 	 * the largest possible value.
436 	 */
437 	int maximum;
438 	/**
439 	 * the number of possible values.
440 	 */
441 	uint nValues;
442 	/**
443 	 * an array of #GEnumValue structs describing the
444 	 * individual values.
445 	 */
446 	GEnumValue* values;
447 }
448 
449 /**
450  * A structure which contains a single enum value, its name, and its
451  * nickname.
452  */
453 struct GEnumValue
454 {
455 	/**
456 	 * the enum value
457 	 */
458 	int value;
459 	/**
460 	 * the name of the value
461 	 */
462 	const(char)* valueName;
463 	/**
464 	 * the nickname of the value
465 	 */
466 	const(char)* valueNick;
467 }
468 
469 /**
470  * The class of a flags type holds information about its
471  * possible values.
472  */
473 struct GFlagsClass
474 {
475 	/**
476 	 * the parent class
477 	 */
478 	GTypeClass gTypeClass;
479 	/**
480 	 * a mask covering all possible values.
481 	 */
482 	uint mask;
483 	/**
484 	 * the number of possible values.
485 	 */
486 	uint nValues;
487 	/**
488 	 * an array of #GFlagsValue structs describing the
489 	 * individual values.
490 	 */
491 	GFlagsValue* values;
492 }
493 
494 /**
495  * A structure which contains a single flags value, its name, and its
496  * nickname.
497  */
498 struct GFlagsValue
499 {
500 	/**
501 	 * the flags value
502 	 */
503 	uint value;
504 	/**
505 	 * the name of the value
506 	 */
507 	const(char)* valueName;
508 	/**
509 	 * the nickname of the value
510 	 */
511 	const(char)* valueNick;
512 }
513 
514 /**
515  * A structure that provides information to the type system which is
516  * used specifically for managing interface types.
517  */
518 struct GInterfaceInfo
519 {
520 	/**
521 	 * location of the interface initialization function
522 	 */
523 	GInterfaceInitFunc interfaceInit;
524 	/**
525 	 * location of the interface finalization function
526 	 */
527 	GInterfaceFinalizeFunc interfaceFinalize;
528 	/**
529 	 * user-supplied data passed to the interface init/finalize functions
530 	 */
531 	void* interfaceData;
532 }
533 
534 struct GObject
535 {
536 	GTypeInstance gTypeInstance;
537 	uint refCount;
538 	GData* qdata;
539 }
540 
541 struct GObjectClass
542 {
543 	/**
544 	 * the parent class
545 	 */
546 	GTypeClass gTypeClass;
547 	GSList* constructProperties;
548 	extern(C) GObject* function(GType type, uint nConstructProperties, GObjectConstructParam* constructProperties) constructor;
549 	extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) setProperty;
550 	extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) getProperty;
551 	extern(C) void function(GObject* object) dispose;
552 	extern(C) void function(GObject* object) finalize;
553 	extern(C) void function(GObject* object, uint nPspecs, GParamSpec** pspecs) dispatchPropertiesChanged;
554 	extern(C) void function(GObject* object, GParamSpec* pspec) notify;
555 	extern(C) void function(GObject* object) constructed;
556 	size_t flags;
557 	void*[6] pdummy;
558 }
559 
560 /**
561  * The GObjectConstructParam struct is an auxiliary
562  * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
563  * a #GObjectClass.
564  */
565 struct GObjectConstructParam
566 {
567 	/**
568 	 * the #GParamSpec of the construct parameter
569 	 */
570 	GParamSpec* pspec;
571 	/**
572 	 * the value to set the parameter to
573 	 */
574 	GValue* value;
575 }
576 
577 struct GParamSpec
578 {
579 	/**
580 	 * private #GTypeInstance portion
581 	 */
582 	GTypeInstance gTypeInstance;
583 	/**
584 	 * name of this parameter: always an interned string
585 	 */
586 	const(char)* name;
587 	/**
588 	 * #GParamFlags flags for this parameter
589 	 */
590 	GParamFlags flags;
591 	/**
592 	 * the #GValue type for this parameter
593 	 */
594 	GType valueType;
595 	/**
596 	 * #GType type that uses (introduces) this parameter
597 	 */
598 	GType ownerType;
599 	char* Nick;
600 	char* Blurb;
601 	GData* qdata;
602 	uint refCount;
603 	uint paramId;
604 }
605 
606 struct GParamSpecBoolean
607 {
608 	/**
609 	 * private #GParamSpec portion
610 	 */
611 	GParamSpec parentInstance;
612 	/**
613 	 * default value for the property specified
614 	 */
615 	bool defaultValue;
616 }
617 
618 struct GParamSpecBoxed
619 {
620 	/**
621 	 * private #GParamSpec portion
622 	 */
623 	GParamSpec parentInstance;
624 }
625 
626 struct GParamSpecChar
627 {
628 	/**
629 	 * private #GParamSpec portion
630 	 */
631 	GParamSpec parentInstance;
632 	/**
633 	 * minimum value for the property specified
634 	 */
635 	byte minimum;
636 	/**
637 	 * maximum value for the property specified
638 	 */
639 	byte maximum;
640 	/**
641 	 * default value for the property specified
642 	 */
643 	byte defaultValue;
644 }
645 
646 /**
647  * The class structure for the GParamSpec type.
648  * Normally, GParamSpec classes are filled by
649  * g_param_type_register_static().
650  */
651 struct GParamSpecClass
652 {
653 	/**
654 	 * the parent class
655 	 */
656 	GTypeClass gTypeClass;
657 	/**
658 	 * the #GValue type for this parameter
659 	 */
660 	GType valueType;
661 	extern(C) void function(GParamSpec* pspec) finalize;
662 	extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault;
663 	extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate;
664 	extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp;
665 	void*[4] dummy;
666 }
667 
668 struct GParamSpecDouble
669 {
670 	/**
671 	 * private #GParamSpec portion
672 	 */
673 	GParamSpec parentInstance;
674 	/**
675 	 * minimum value for the property specified
676 	 */
677 	double minimum;
678 	/**
679 	 * maximum value for the property specified
680 	 */
681 	double maximum;
682 	/**
683 	 * default value for the property specified
684 	 */
685 	double defaultValue;
686 	/**
687 	 * values closer than @epsilon will be considered identical
688 	 * by g_param_values_cmp(); the default value is 1e-90.
689 	 */
690 	double epsilon;
691 }
692 
693 struct GParamSpecEnum
694 {
695 	/**
696 	 * private #GParamSpec portion
697 	 */
698 	GParamSpec parentInstance;
699 	/**
700 	 * the #GEnumClass for the enum
701 	 */
702 	GEnumClass* enumClass;
703 	/**
704 	 * default value for the property specified
705 	 */
706 	int defaultValue;
707 }
708 
709 struct GParamSpecFlags
710 {
711 	/**
712 	 * private #GParamSpec portion
713 	 */
714 	GParamSpec parentInstance;
715 	/**
716 	 * the #GFlagsClass for the flags
717 	 */
718 	GFlagsClass* flagsClass;
719 	/**
720 	 * default value for the property specified
721 	 */
722 	uint defaultValue;
723 }
724 
725 struct GParamSpecFloat
726 {
727 	/**
728 	 * private #GParamSpec portion
729 	 */
730 	GParamSpec parentInstance;
731 	/**
732 	 * minimum value for the property specified
733 	 */
734 	float minimum;
735 	/**
736 	 * maximum value for the property specified
737 	 */
738 	float maximum;
739 	/**
740 	 * default value for the property specified
741 	 */
742 	float defaultValue;
743 	/**
744 	 * values closer than @epsilon will be considered identical
745 	 * by g_param_values_cmp(); the default value is 1e-30.
746 	 */
747 	float epsilon;
748 }
749 
750 struct GParamSpecGType
751 {
752 	/**
753 	 * private #GParamSpec portion
754 	 */
755 	GParamSpec parentInstance;
756 	/**
757 	 * a #GType whose subtypes can occur as values
758 	 */
759 	GType isAType;
760 }
761 
762 struct GParamSpecInt
763 {
764 	/**
765 	 * private #GParamSpec portion
766 	 */
767 	GParamSpec parentInstance;
768 	/**
769 	 * minimum value for the property specified
770 	 */
771 	int minimum;
772 	/**
773 	 * maximum value for the property specified
774 	 */
775 	int maximum;
776 	/**
777 	 * default value for the property specified
778 	 */
779 	int defaultValue;
780 }
781 
782 struct GParamSpecInt64
783 {
784 	/**
785 	 * private #GParamSpec portion
786 	 */
787 	GParamSpec parentInstance;
788 	/**
789 	 * minimum value for the property specified
790 	 */
791 	long minimum;
792 	/**
793 	 * maximum value for the property specified
794 	 */
795 	long maximum;
796 	/**
797 	 * default value for the property specified
798 	 */
799 	long defaultValue;
800 }
801 
802 struct GParamSpecLong
803 {
804 	/**
805 	 * private #GParamSpec portion
806 	 */
807 	GParamSpec parentInstance;
808 	/**
809 	 * minimum value for the property specified
810 	 */
811 	glong minimum;
812 	/**
813 	 * maximum value for the property specified
814 	 */
815 	glong maximum;
816 	/**
817 	 * default value for the property specified
818 	 */
819 	glong defaultValue;
820 }
821 
822 struct GParamSpecObject
823 {
824 	/**
825 	 * private #GParamSpec portion
826 	 */
827 	GParamSpec parentInstance;
828 }
829 
830 struct GParamSpecOverride
831 {
832 	GParamSpec parentInstance;
833 	GParamSpec* overridden;
834 }
835 
836 struct GParamSpecParam
837 {
838 	/**
839 	 * private #GParamSpec portion
840 	 */
841 	GParamSpec parentInstance;
842 }
843 
844 struct GParamSpecPointer
845 {
846 	/**
847 	 * private #GParamSpec portion
848 	 */
849 	GParamSpec parentInstance;
850 }
851 
852 struct GParamSpecPool;
853 
854 struct GParamSpecString
855 {
856 	/**
857 	 * private #GParamSpec portion
858 	 */
859 	GParamSpec parentInstance;
860 	/**
861 	 * default value for the property specified
862 	 */
863 	char* defaultValue;
864 	/**
865 	 * a string containing the allowed values for the first byte
866 	 */
867 	char* csetFirst;
868 	/**
869 	 * a string containing the allowed values for the subsequent bytes
870 	 */
871 	char* csetNth;
872 	/**
873 	 * the replacement byte for bytes which don't match @cset_first or @cset_nth.
874 	 */
875 	char substitutor;
876 	import std.bitmanip: bitfields;
877 	mixin(bitfields!(
878 		uint, "nullFoldIfEmpty", 1,
879 		uint, "ensureNonNull", 1,
880 		uint, "", 30
881 	));
882 }
883 
884 /**
885  * This structure is used to provide the type system with the information
886  * required to initialize and destruct (finalize) a parameter's class and
887  * instances thereof.
888  * The initialized structure is passed to the g_param_type_register_static()
889  * The type system will perform a deep copy of this structure, so its memory
890  * does not need to be persistent across invocation of
891  * g_param_type_register_static().
892  */
893 struct GParamSpecTypeInfo
894 {
895 	/**
896 	 * Size of the instance (object) structure.
897 	 */
898 	ushort instanceSize;
899 	/**
900 	 * 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.
901 	 */
902 	ushort nPreallocs;
903 	extern(C) void function(GParamSpec* pspec) instanceInit;
904 	/**
905 	 * The #GType of values conforming to this #GParamSpec
906 	 */
907 	GType valueType;
908 	extern(C) void function(GParamSpec* pspec) finalize;
909 	extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault;
910 	extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate;
911 	extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp;
912 }
913 
914 struct GParamSpecUChar
915 {
916 	/**
917 	 * private #GParamSpec portion
918 	 */
919 	GParamSpec parentInstance;
920 	/**
921 	 * minimum value for the property specified
922 	 */
923 	ubyte minimum;
924 	/**
925 	 * maximum value for the property specified
926 	 */
927 	ubyte maximum;
928 	/**
929 	 * default value for the property specified
930 	 */
931 	ubyte defaultValue;
932 }
933 
934 struct GParamSpecUInt
935 {
936 	/**
937 	 * private #GParamSpec portion
938 	 */
939 	GParamSpec parentInstance;
940 	/**
941 	 * minimum value for the property specified
942 	 */
943 	uint minimum;
944 	/**
945 	 * maximum value for the property specified
946 	 */
947 	uint maximum;
948 	/**
949 	 * default value for the property specified
950 	 */
951 	uint defaultValue;
952 }
953 
954 struct GParamSpecUInt64
955 {
956 	/**
957 	 * private #GParamSpec portion
958 	 */
959 	GParamSpec parentInstance;
960 	/**
961 	 * minimum value for the property specified
962 	 */
963 	ulong minimum;
964 	/**
965 	 * maximum value for the property specified
966 	 */
967 	ulong maximum;
968 	/**
969 	 * default value for the property specified
970 	 */
971 	ulong defaultValue;
972 }
973 
974 struct GParamSpecULong
975 {
976 	/**
977 	 * private #GParamSpec portion
978 	 */
979 	GParamSpec parentInstance;
980 	/**
981 	 * minimum value for the property specified
982 	 */
983 	gulong minimum;
984 	/**
985 	 * maximum value for the property specified
986 	 */
987 	gulong maximum;
988 	/**
989 	 * default value for the property specified
990 	 */
991 	gulong defaultValue;
992 }
993 
994 struct GParamSpecUnichar
995 {
996 	/**
997 	 * private #GParamSpec portion
998 	 */
999 	GParamSpec parentInstance;
1000 	/**
1001 	 * default value for the property specified
1002 	 */
1003 	dchar defaultValue;
1004 }
1005 
1006 struct GParamSpecValueArray
1007 {
1008 	/**
1009 	 * private #GParamSpec portion
1010 	 */
1011 	GParamSpec parentInstance;
1012 	/**
1013 	 * a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
1014 	 */
1015 	GParamSpec* elementSpec;
1016 	/**
1017 	 * if greater than 0, arrays of this property will always have this many elements
1018 	 */
1019 	uint fixedNElements;
1020 }
1021 
1022 struct GParamSpecVariant
1023 {
1024 	/**
1025 	 * private #GParamSpec portion
1026 	 */
1027 	GParamSpec parentInstance;
1028 	/**
1029 	 * a #GVariantType, or %NULL
1030 	 */
1031 	GVariantType* type;
1032 	/**
1033 	 * a #GVariant, or %NULL
1034 	 */
1035 	GVariant* defaultValue;
1036 	void*[4] padding;
1037 }
1038 
1039 /**
1040  * The GParameter struct is an auxiliary structure used
1041  * to hand parameter name/value pairs to g_object_newv().
1042  */
1043 struct GParameter
1044 {
1045 	/**
1046 	 * the parameter name
1047 	 */
1048 	const(char)* name;
1049 	/**
1050 	 * the parameter value
1051 	 */
1052 	GValue value;
1053 }
1054 
1055 /**
1056  * The #GSignalInvocationHint structure is used to pass on additional information
1057  * to callbacks during a signal emission.
1058  */
1059 struct GSignalInvocationHint
1060 {
1061 	/**
1062 	 * The signal id of the signal invoking the callback
1063 	 */
1064 	uint signalId;
1065 	/**
1066 	 * The detail passed on for this emission
1067 	 */
1068 	GQuark detail;
1069 	/**
1070 	 * The stage the signal emission is currently in, this
1071 	 * field will contain one of %G_SIGNAL_RUN_FIRST,
1072 	 * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
1073 	 */
1074 	GSignalFlags runType;
1075 }
1076 
1077 /**
1078  * A structure holding in-depth information for a specific signal. It is
1079  * filled in by the g_signal_query() function.
1080  */
1081 struct GSignalQuery
1082 {
1083 	/**
1084 	 * The signal id of the signal being queried, or 0 if the
1085 	 * signal to be queried was unknown.
1086 	 */
1087 	uint signalId;
1088 	/**
1089 	 * The signal name.
1090 	 */
1091 	const(char)* signalName;
1092 	/**
1093 	 * The interface/instance type that this signal can be emitted for.
1094 	 */
1095 	GType itype;
1096 	/**
1097 	 * The signal flags as passed in to g_signal_new().
1098 	 */
1099 	GSignalFlags signalFlags;
1100 	/**
1101 	 * The return type for user callbacks.
1102 	 */
1103 	GType returnType;
1104 	/**
1105 	 * The number of parameters that user callbacks take.
1106 	 */
1107 	uint nParams;
1108 	/**
1109 	 * The individual parameter types for
1110 	 * user callbacks, note that the effective callback signature is:
1111 	 * |[<!-- language="C" -->
1112 	 * @return_type callback (#gpointer     data1,
1113 	 * [param_types param_names,]
1114 	 * gpointer     data2);
1115 	 * ]|
1116 	 */
1117 	GType* paramTypes;
1118 }
1119 
1120 /**
1121  * A union holding one collected value.
1122  */
1123 struct GTypeCValue
1124 {
1125 	union
1126 	{
1127 		/**
1128 		 * the field for holding integer values
1129 		 */
1130 		int vInt;
1131 		/**
1132 		 * the field for holding long integer values
1133 		 */
1134 		glong vLong;
1135 		/**
1136 		 * the field for holding 64 bit integer values
1137 		 */
1138 		long vInt64;
1139 		/**
1140 		 * the field for holding floating point values
1141 		 */
1142 		double vDouble;
1143 		/**
1144 		 * the field for holding pointers
1145 		 */
1146 		void* vPointer;
1147 	}
1148 }
1149 
1150 struct GTypeClass
1151 {
1152 	GType gType;
1153 }
1154 
1155 /**
1156  * A structure that provides information to the type system which is
1157  * used specifically for managing fundamental types.
1158  */
1159 struct GTypeFundamentalInfo
1160 {
1161 	/**
1162 	 * #GTypeFundamentalFlags describing the characteristics of the fundamental type
1163 	 */
1164 	GTypeFundamentalFlags typeFlags;
1165 }
1166 
1167 /**
1168  * This structure is used to provide the type system with the information
1169  * required to initialize and destruct (finalize) a type's class and
1170  * its instances.
1171  *
1172  * The initialized structure is passed to the g_type_register_static() function
1173  * (or is copied into the provided #GTypeInfo structure in the
1174  * g_type_plugin_complete_type_info()). The type system will perform a deep
1175  * copy of this structure, so its memory does not need to be persistent
1176  * across invocation of g_type_register_static().
1177  */
1178 struct GTypeInfo
1179 {
1180 	/**
1181 	 * Size of the class structure (required for interface, classed and instantiatable types)
1182 	 */
1183 	ushort classSize;
1184 	/**
1185 	 * Location of the base initialization function (optional)
1186 	 */
1187 	GBaseInitFunc baseInit;
1188 	/**
1189 	 * Location of the base finalization function (optional)
1190 	 */
1191 	GBaseFinalizeFunc baseFinalize;
1192 	/**
1193 	 * Location of the class initialization function for
1194 	 * classed and instantiatable types. Location of the default vtable
1195 	 * inititalization function for interface types. (optional) This function
1196 	 * is used both to fill in virtual functions in the class or default vtable,
1197 	 * and to do type-specific setup such as registering signals and object
1198 	 * properties.
1199 	 */
1200 	GClassInitFunc classInit;
1201 	/**
1202 	 * Location of the class finalization function for
1203 	 * classed and instantiatable types. Location of the default vtable
1204 	 * finalization function for interface types. (optional)
1205 	 */
1206 	GClassFinalizeFunc classFinalize;
1207 	/**
1208 	 * User-supplied data passed to the class init/finalize functions
1209 	 */
1210 	void* classData;
1211 	/**
1212 	 * Size of the instance (object) structure (required for instantiatable types only)
1213 	 */
1214 	ushort instanceSize;
1215 	/**
1216 	 * 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.
1217 	 */
1218 	ushort nPreallocs;
1219 	/**
1220 	 * Location of the instance initialization function (optional, for instantiatable types only)
1221 	 */
1222 	GInstanceInitFunc instanceInit;
1223 	/**
1224 	 * A #GTypeValueTable function table for generic handling of GValues
1225 	 * of this type (usually only useful for fundamental types)
1226 	 */
1227 	GTypeValueTable* valueTable;
1228 }
1229 
1230 struct GTypeInstance
1231 {
1232 	GTypeClass* gClass;
1233 }
1234 
1235 struct GTypeInterface
1236 {
1237 	GType gType;
1238 	GType gInstanceType;
1239 }
1240 
1241 struct GTypeModule
1242 {
1243 	GObject parentInstance;
1244 	uint useCount;
1245 	GSList* typeInfos;
1246 	GSList* interfaceInfos;
1247 	/**
1248 	 * the name of the module
1249 	 */
1250 	char* name;
1251 }
1252 
1253 /**
1254  * In order to implement dynamic loading of types based on #GTypeModule,
1255  * the @load and @unload functions in #GTypeModuleClass must be implemented.
1256  */
1257 struct GTypeModuleClass
1258 {
1259 	/**
1260 	 * the parent class
1261 	 */
1262 	GObjectClass parentClass;
1263 	extern(C) int function(GTypeModule* modul) load;
1264 	extern(C) void function(GTypeModule* modul) unload;
1265 	extern(C) void function() reserved1;
1266 	extern(C) void function() reserved2;
1267 	extern(C) void function() reserved3;
1268 	extern(C) void function() reserved4;
1269 }
1270 
1271 struct GTypePlugin;
1272 
1273 /**
1274  * The #GTypePlugin interface is used by the type system in order to handle
1275  * the lifecycle of dynamically loaded types.
1276  */
1277 struct GTypePluginClass
1278 {
1279 	GTypeInterface baseIface;
1280 	/**
1281 	 * Increases the use count of the plugin.
1282 	 */
1283 	GTypePluginUse usePlugin;
1284 	/**
1285 	 * Decreases the use count of the plugin.
1286 	 */
1287 	GTypePluginUnuse unusePlugin;
1288 	/**
1289 	 * Fills in the #GTypeInfo and
1290 	 * #GTypeValueTable structs for the type. The structs are initialized
1291 	 * with `memset(s, 0, sizeof (s))` before calling this function.
1292 	 */
1293 	GTypePluginCompleteTypeInfo completeTypeInfo;
1294 	/**
1295 	 * Fills in missing parts of the #GInterfaceInfo
1296 	 * for the interface. The structs is initialized with
1297 	 * `memset(s, 0, sizeof (s))` before calling this function.
1298 	 */
1299 	GTypePluginCompleteInterfaceInfo completeInterfaceInfo;
1300 }
1301 
1302 /**
1303  * A structure holding information for a specific type.
1304  * It is filled in by the g_type_query() function.
1305  */
1306 struct GTypeQuery
1307 {
1308 	/**
1309 	 * the #GType value of the type
1310 	 */
1311 	GType type;
1312 	/**
1313 	 * the name of the type
1314 	 */
1315 	const(char)* typeName;
1316 	/**
1317 	 * the size of the class structure
1318 	 */
1319 	uint classSize;
1320 	/**
1321 	 * the size of the instance structure
1322 	 */
1323 	uint instanceSize;
1324 }
1325 
1326 /**
1327  * The #GTypeValueTable provides the functions required by the #GValue
1328  * implementation, to serve as a container for values of a type.
1329  */
1330 struct GTypeValueTable
1331 {
1332 	extern(C) void function(GValue* value) valueInit;
1333 	extern(C) void function(GValue* value) valueFree;
1334 	extern(C) void function(GValue* srcValue, GValue* destValue) valueCopy;
1335 	extern(C) void* function(GValue* value) valuePeekPointer;
1336 	/**
1337 	 * A string format describing how to collect the contents of
1338 	 * this value bit-by-bit. Each character in the format represents
1339 	 * an argument to be collected, and the characters themselves indicate
1340 	 * the type of the argument. Currently supported arguments are:
1341 	 * - 'i' - Integers. passed as collect_values[].v_int.
1342 	 * - 'l' - Longs. passed as collect_values[].v_long.
1343 	 * - 'd' - Doubles. passed as collect_values[].v_double.
1344 	 * - 'p' - Pointers. passed as collect_values[].v_pointer.
1345 	 * It should be noted that for variable argument list construction,
1346 	 * ANSI C promotes every type smaller than an integer to an int, and
1347 	 * floats to doubles. So for collection of short int or char, 'i'
1348 	 * needs to be used, and for collection of floats 'd'.
1349 	 */
1350 	const(char)* collectFormat;
1351 	extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) collectValue;
1352 	/**
1353 	 * Format description of the arguments to collect for @lcopy_value,
1354 	 * analogous to @collect_format. Usually, @lcopy_format string consists
1355 	 * only of 'p's to provide lcopy_value() with pointers to storage locations.
1356 	 */
1357 	const(char)* lcopyFormat;
1358 	extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) lcopyValue;
1359 }
1360 
1361 struct GValue
1362 {
1363 	GType gType;
1364 	ValueDataUnion[2] data;
1365 }
1366 
1367 struct GValueArray
1368 {
1369 	/**
1370 	 * number of values contained in the array
1371 	 */
1372 	uint nValues;
1373 	/**
1374 	 * array of values
1375 	 */
1376 	GValue* values;
1377 	uint nPrealloced;
1378 }
1379 
1380 struct GWeakRef
1381 {
1382 	union Priv
1383 	{
1384 		void* p;
1385 	}
1386 	Priv priv;
1387 }
1388 
1389 struct ValueDataUnion
1390 {
1391 	union
1392 	{
1393 		int vInt;
1394 		uint vUint;
1395 		glong vLong;
1396 		gulong vUlong;
1397 		long vInt64;
1398 		ulong vUint64;
1399 		float vFloat;
1400 		double vDouble;
1401 		void* vPointer;
1402 	}
1403 }
1404 
1405 /**
1406  * A callback function used by the type system to finalize those portions
1407  * of a derived types class structure that were setup from the corresponding
1408  * GBaseInitFunc() function. Class finalization basically works the inverse
1409  * way in which class intialization is performed.
1410  * See GClassInitFunc() for a discussion of the class intialization process.
1411  *
1412  * Params:
1413  *     gClass = The #GTypeClass structure to finalize
1414  */
1415 public alias extern(C) void function(void* gClass) GBaseFinalizeFunc;
1416 
1417 /**
1418  * A callback function used by the type system to do base initialization
1419  * of the class structures of derived types. It is called as part of the
1420  * initialization process of all derived classes and should reallocate
1421  * or reset all dynamic class members copied over from the parent class.
1422  * For example, class members (such as strings) that are not sufficiently
1423  * handled by a plain memory copy of the parent class into the derived class
1424  * have to be altered. See GClassInitFunc() for a discussion of the class
1425  * intialization process.
1426  *
1427  * Params:
1428  *     gClass = The #GTypeClass structure to initialize
1429  */
1430 public alias extern(C) void function(void* gClass) GBaseInitFunc;
1431 
1432 /**
1433  * A function to be called to transform @from_value to @to_value. If
1434  * this is the @transform_to function of a binding, then @from_value
1435  * is the @source_property on the @source object, and @to_value is the
1436  * @target_property on the @target object. If this is the
1437  * @transform_from function of a %G_BINDING_BIDIRECTIONAL binding,
1438  * then those roles are reversed.
1439  *
1440  * Params:
1441  *     binding = a #GBinding
1442  *     fromValue = the #GValue containing the value to transform
1443  *     toValue = the #GValue in which to store the transformed value
1444  *     userData = data passed to the transform function
1445  *
1446  * Return: %TRUE if the transformation was successful, and %FALSE
1447  *     otherwise
1448  *
1449  * Since: 2.26
1450  */
1451 public alias extern(C) int function(GBinding* binding, GValue* fromValue, GValue* toValue, void* userData) GBindingTransformFunc;
1452 
1453 /**
1454  * This function is provided by the user and should produce a copy
1455  * of the passed in boxed structure.
1456  *
1457  * Params:
1458  *     boxed = The boxed structure to be copied.
1459  *
1460  * Return: The newly created copy of the boxed structure.
1461  */
1462 public alias extern(C) void* function(void* boxed) GBoxedCopyFunc;
1463 
1464 /**
1465  * This function is provided by the user and should free the boxed
1466  * structure passed.
1467  *
1468  * Params:
1469  *     boxed = The boxed structure to be freed.
1470  */
1471 public alias extern(C) void function(void* boxed) GBoxedFreeFunc;
1472 
1473 /**
1474  * The type used for callback functions in structure definitions and function
1475  * signatures. This doesn't mean that all callback functions must take no
1476  * parameters and return void. The required signature of a callback function
1477  * is determined by the context in which is used (e.g. the signal to which it
1478  * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
1479  */
1480 public alias extern(C) void function() GCallback;
1481 
1482 /**
1483  * A callback function used by the type system to finalize a class.
1484  * This function is rarely needed, as dynamically allocated class resources
1485  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
1486  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
1487  * structure of a static type is invalid, because classes of static types
1488  * will never be finalized (they are artificially kept alive when their
1489  * reference count drops to zero).
1490  *
1491  * Params:
1492  *     gClass = The #GTypeClass structure to finalize
1493  *     classData = The @class_data member supplied via the #GTypeInfo structure
1494  */
1495 public alias extern(C) void function(void* gClass, void* classData) GClassFinalizeFunc;
1496 
1497 /**
1498  * A callback function used by the type system to initialize the class
1499  * of a specific type. This function should initialize all static class
1500  * members.
1501  *
1502  * The initialization process of a class involves:
1503  *
1504  * - Copying common members from the parent class over to the
1505  * derived class structure.
1506  * - Zero initialization of the remaining members not copied
1507  * over from the parent class.
1508  * - Invocation of the GBaseInitFunc() initializers of all parent
1509  * types and the class' type.
1510  * - Invocation of the class' GClassInitFunc() initializer.
1511  *
1512  * Since derived classes are partially initialized through a memory copy
1513  * of the parent class, the general rule is that GBaseInitFunc() and
1514  * GBaseFinalizeFunc() should take care of necessary reinitialization
1515  * and release of those class members that were introduced by the type
1516  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
1517  * GClassInitFunc() should only care about initializing static
1518  * class members, while dynamic class members (such as allocated strings
1519  * or reference counted resources) are better handled by a GBaseInitFunc()
1520  * for this type, so proper initialization of the dynamic class members
1521  * is performed for class initialization of derived types as well.
1522  *
1523  * An example may help to correspond the intend of the different class
1524  * initializers:
1525  *
1526  * |[<!-- language="C" -->
1527  * typedef struct {
1528  * GObjectClass parent_class;
1529  * gint         static_integer;
1530  * gchar       *dynamic_string;
1531  * } TypeAClass;
1532  * static void
1533  * type_a_base_class_init (TypeAClass *class)
1534  * {
1535  * class->dynamic_string = g_strdup ("some string");
1536  * }
1537  * static void
1538  * type_a_base_class_finalize (TypeAClass *class)
1539  * {
1540  * g_free (class->dynamic_string);
1541  * }
1542  * static void
1543  * type_a_class_init (TypeAClass *class)
1544  * {
1545  * class->static_integer = 42;
1546  * }
1547  *
1548  * typedef struct {
1549  * TypeAClass   parent_class;
1550  * gfloat       static_float;
1551  * GString     *dynamic_gstring;
1552  * } TypeBClass;
1553  * static void
1554  * type_b_base_class_init (TypeBClass *class)
1555  * {
1556  * class->dynamic_gstring = g_string_new ("some other string");
1557  * }
1558  * static void
1559  * type_b_base_class_finalize (TypeBClass *class)
1560  * {
1561  * g_string_free (class->dynamic_gstring);
1562  * }
1563  * static void
1564  * type_b_class_init (TypeBClass *class)
1565  * {
1566  * class->static_float = 3.14159265358979323846;
1567  * }
1568  * ]|
1569  * Initialization of TypeBClass will first cause initialization of
1570  * TypeAClass (derived classes reference their parent classes, see
1571  * g_type_class_ref() on this).
1572  *
1573  * Initialization of TypeAClass roughly involves zero-initializing its fields,
1574  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
1575  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
1576  * type_a_class_init() to initialize its static members (static_integer).
1577  * The first step in the initialization process of TypeBClass is then
1578  * a plain memory copy of the contents of TypeAClass into TypeBClass and
1579  * zero-initialization of the remaining fields in TypeBClass.
1580  * The dynamic members of TypeAClass within TypeBClass now need
1581  * reinitialization which is performed by calling type_a_base_class_init()
1582  * with an argument of TypeBClass.
1583  *
1584  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
1585  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
1586  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
1587  * is called to complete the initialization process with the static members
1588  * (static_float).
1589  *
1590  * Corresponding finalization counter parts to the GBaseInitFunc() functions
1591  * have to be provided to release allocated resources at class finalization
1592  * time.
1593  *
1594  * Params:
1595  *     gClass = The #GTypeClass structure to initialize.
1596  *     classData = The @class_data member supplied via the #GTypeInfo structure.
1597  */
1598 public alias extern(C) void function(void* gClass, void* classData) GClassInitFunc;
1599 
1600 /**
1601  * The type used for marshaller functions.
1602  *
1603  * Params:
1604  *     closure = the #GClosure to which the marshaller belongs
1605  *     returnValue = a #GValue to store the return
1606  *         value. May be %NULL if the callback of @closure doesn't return a
1607  *         value.
1608  *     nParamValues = the length of the @param_values array
1609  *     paramValues = an array of
1610  *         #GValues holding the arguments on which to invoke the
1611  *         callback of @closure
1612  *     invocationHint = the invocation hint given as the
1613  *         last argument to g_closure_invoke()
1614  *     marshalData = additional data specified when
1615  *         registering the marshaller, see g_closure_set_marshal() and
1616  *         g_closure_set_meta_marshal()
1617  */
1618 public alias extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) GClosureMarshal;
1619 
1620 /**
1621  * The type used for the various notification callbacks which can be registered
1622  * on closures.
1623  *
1624  * Params:
1625  *     data = data specified when registering the notification callback
1626  *     closure = the #GClosure on which the notification is emitted
1627  */
1628 public alias extern(C) void function(void* data, GClosure* closure) GClosureNotify;
1629 
1630 /**
1631  * A callback function used by the type system to initialize a new
1632  * instance of a type. This function initializes all instance members and
1633  * allocates any resources required by it.
1634  *
1635  * Initialization of a derived instance involves calling all its parent
1636  * types instance initializers, so the class member of the instance
1637  * is altered during its initialization to always point to the class that
1638  * belongs to the type the current initializer was introduced for.
1639  *
1640  * The extended members of @instance are guaranteed to have been filled with
1641  * zeros before this function is called.
1642  *
1643  * Params:
1644  *     instanc = The instance to initialize
1645  *     gClass = The class of the type the instance is created for
1646  */
1647 public alias extern(C) void function(GTypeInstance* instanc, void* gClass) GInstanceInitFunc;
1648 
1649 /**
1650  * A callback function used by the type system to finalize an interface.
1651  * This function should destroy any internal data and release any resources
1652  * allocated by the corresponding GInterfaceInitFunc() function.
1653  *
1654  * Params:
1655  *     gIface = The interface structure to finalize
1656  *     ifaceData = The @interface_data supplied via the #GInterfaceInfo structure
1657  */
1658 public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceFinalizeFunc;
1659 
1660 /**
1661  * A callback function used by the type system to initialize a new
1662  * interface.  This function should initialize all internal data and
1663  * allocate any resources required by the interface.
1664  *
1665  * The members of @iface_data are guaranteed to have been filled with
1666  * zeros before this function is called.
1667  *
1668  * Params:
1669  *     gIface = The interface structure to initialize
1670  *     ifaceData = The @interface_data supplied via the #GInterfaceInfo structure
1671  */
1672 public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceInitFunc;
1673 
1674 /**
1675  * The type of the @finalize function of #GObjectClass.
1676  *
1677  * Params:
1678  *     object = the #GObject being finalized
1679  */
1680 public alias extern(C) void function(GObject* object) GObjectFinalizeFunc;
1681 
1682 /**
1683  * The type of the @get_property function of #GObjectClass.
1684  *
1685  * Params:
1686  *     object = a #GObject
1687  *     propertyId = the numeric id under which the property was registered with
1688  *         g_object_class_install_property().
1689  *     value = a #GValue to return the property value in
1690  *     pspec = the #GParamSpec describing the property
1691  */
1692 public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectGetPropertyFunc;
1693 
1694 /**
1695  * The type of the @set_property function of #GObjectClass.
1696  *
1697  * Params:
1698  *     object = a #GObject
1699  *     propertyId = the numeric id under which the property was registered with
1700  *         g_object_class_install_property().
1701  *     value = the new value for the property
1702  *     pspec = the #GParamSpec describing the property
1703  */
1704 public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectSetPropertyFunc;
1705 
1706 /**
1707  * The signal accumulator is a special callback function that can be used
1708  * to collect return values of the various callbacks that are called
1709  * during a signal emission. The signal accumulator is specified at signal
1710  * creation time, if it is left %NULL, no accumulation of callback return
1711  * values is performed. The return value of signal emissions is then the
1712  * value returned by the last callback.
1713  *
1714  * Params:
1715  *     ihint = Signal invocation hint, see #GSignalInvocationHint.
1716  *     returnAccu = Accumulator to collect callback return values in, this
1717  *         is the return value of the current signal emission.
1718  *     handlerReturn = A #GValue holding the return value of the signal handler.
1719  *     data = Callback data that was specified when creating the signal.
1720  *
1721  * Return: The accumulator function returns whether the signal emission
1722  *     should be aborted. Returning %FALSE means to abort the
1723  *     current emission and %TRUE is returned for continuation.
1724  */
1725 public alias extern(C) int function(GSignalInvocationHint* ihint, GValue* returnAccu, GValue* handlerReturn, void* data) GSignalAccumulator;
1726 
1727 /**
1728  * A simple function pointer to get invoked when the signal is emitted. This
1729  * allows you to tie a hook to the signal type, so that it will trap all
1730  * emissions of that signal, from any object.
1731  *
1732  * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
1733  *
1734  * Params:
1735  *     ihint = Signal invocation hint, see #GSignalInvocationHint.
1736  *     nParamValues = the number of parameters to the function, including
1737  *         the instance on which the signal was emitted.
1738  *     paramValues = the instance on which
1739  *         the signal was emitted, followed by the parameters of the emission.
1740  *     data = user data associated with the hook.
1741  *
1742  * Return: whether it wants to stay connected. If it returns %FALSE, the signal
1743  *     hook is disconnected (and destroyed).
1744  */
1745 public alias extern(C) int function(GSignalInvocationHint* ihint, uint nParamValues, GValue* paramValues, void* data) GSignalEmissionHook;
1746 
1747 /**
1748  * A callback function used for notification when the state
1749  * of a toggle reference changes. See g_object_add_toggle_ref().
1750  *
1751  * Params:
1752  *     data = Callback data passed to g_object_add_toggle_ref()
1753  *     object = The object on which g_object_add_toggle_ref() was called.
1754  *     isLastRef = %TRUE if the toggle reference is now the
1755  *         last reference to the object. %FALSE if the toggle
1756  *         reference was the last reference and there are now other
1757  *         references.
1758  */
1759 public alias extern(C) void function(void* data, GObject* object, int isLastRef) GToggleNotify;
1760 
1761 /**
1762  * A callback function which is called when the reference count of a class
1763  * drops to zero. It may use g_type_class_ref() to prevent the class from
1764  * being freed. You should not call g_type_class_unref() from a
1765  * #GTypeClassCacheFunc function to prevent infinite recursion, use
1766  * g_type_class_unref_uncached() instead.
1767  *
1768  * The functions have to check the class id passed in to figure
1769  * whether they actually want to cache the class of this type, since all
1770  * classes are routed through the same #GTypeClassCacheFunc chain.
1771  *
1772  * Params:
1773  *     cacheData = data that was given to the g_type_add_class_cache_func() call
1774  *     gClass = The #GTypeClass structure which is unreferenced
1775  *
1776  * Return: %TRUE to stop further #GTypeClassCacheFuncs from being
1777  *     called, %FALSE to continue
1778  */
1779 public alias extern(C) int function(void* cacheData, GTypeClass* gClass) GTypeClassCacheFunc;
1780 
1781 /**
1782  * A callback called after an interface vtable is initialized.
1783  * See g_type_add_interface_check().
1784  *
1785  * Params:
1786  *     checkData = data passed to g_type_add_interface_check()
1787  *     gIface = the interface that has been initialized
1788  *
1789  * Since: 2.4
1790  */
1791 public alias extern(C) void function(void* checkData, void* gIface) GTypeInterfaceCheckFunc;
1792 
1793 /**
1794  * The type of the @complete_interface_info function of #GTypePluginClass.
1795  *
1796  * Params:
1797  *     plugin = the #GTypePlugin
1798  *     instanceType = the #GType of an instantiable type to which the interface
1799  *         is added
1800  *     interfaceType = the #GType of the interface whose info is completed
1801  *     info = the #GInterfaceInfo to fill in
1802  */
1803 public alias extern(C) void function(GTypePlugin* plugin, GType instanceType, GType interfaceType, GInterfaceInfo* info) GTypePluginCompleteInterfaceInfo;
1804 
1805 /**
1806  * The type of the @complete_type_info function of #GTypePluginClass.
1807  *
1808  * Params:
1809  *     plugin = the #GTypePlugin
1810  *     gType = the #GType whose info is completed
1811  *     info = the #GTypeInfo struct to fill in
1812  *     valueTable = the #GTypeValueTable to fill in
1813  */
1814 public alias extern(C) void function(GTypePlugin* plugin, GType gType, GTypeInfo* info, GTypeValueTable* valueTable) GTypePluginCompleteTypeInfo;
1815 
1816 /**
1817  * The type of the @unuse_plugin function of #GTypePluginClass.
1818  *
1819  * Params:
1820  *     plugin = the #GTypePlugin whose use count should be decreased
1821  */
1822 public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUnuse;
1823 
1824 /**
1825  * The type of the @use_plugin function of #GTypePluginClass, which gets called
1826  * to increase the use count of @plugin.
1827  *
1828  * Params:
1829  *     plugin = the #GTypePlugin whose use count should be increased
1830  */
1831 public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUse;
1832 
1833 /**
1834  * This is the signature of va_list marshaller functions, an optional
1835  * marshaller that can be used in some situations to avoid
1836  * marshalling the signal argument into GValues.
1837  *
1838  * Params:
1839  *     closure = the #GClosure to which the marshaller belongs
1840  *     returnValue = a #GValue to store the return
1841  *         value. May be %NULL if the callback of @closure doesn't return a
1842  *         value.
1843  *     instanc = the instance on which the closure is invoked.
1844  *     args = va_list of arguments to be passed to the closure.
1845  *     marshalData = additional data specified when
1846  *         registering the marshaller, see g_closure_set_marshal() and
1847  *         g_closure_set_meta_marshal()
1848  *     nParams = the length of the @param_types array
1849  *     paramTypes = the #GType of each argument from
1850  *         @args.
1851  */
1852 public alias extern(C) void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) GVaClosureMarshal;
1853 
1854 /**
1855  * The type of value transformation functions which can be registered with
1856  * g_value_register_transform_func().
1857  *
1858  * Params:
1859  *     srcValue = Source value.
1860  *     destValue = Target value.
1861  */
1862 public alias extern(C) void function(GValue* srcValue, GValue* destValue) GValueTransform;
1863 
1864 /**
1865  * A #GWeakNotify function can be added to an object as a callback that gets
1866  * triggered when the object is finalized. Since the object is already being
1867  * finalized when the #GWeakNotify is called, there's not much you could do
1868  * with the object, apart from e.g. using its address as hash-index or the like.
1869  *
1870  * Params:
1871  *     data = data that was provided when the weak reference was established
1872  *     whereTheObjectWas = the object being finalized
1873  */
1874 public alias extern(C) void function(void* data, GObject* whereTheObjectWas) GWeakNotify;