I've no idea here...
[gtkD.git] / src / gobject / gobjecttypes.d
blob0d3541217c55f8a73bc0ec46b581f00f5e13833a
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
23 module gobject.gobjecttypes;
26 public import glib.glibtypes;
30 // G_TYPE_*
31 enum GType
33 INVALID = 0<<2,
34 NONE = 1<<2,
35 INTERFACE = 2<<2,
36 CHAR = 3<<2,
37 UCHAR = 4<<2,
38 BOOLEAN = 5<<2,
39 INT = 6<<2,
40 UINT = 7<<2,
41 LONG = 8<<2,
42 ULONG = 9<<2,
43 INT64 = 10<<2,
44 UINT64 = 11<<2,
45 ENUM = 12<<2,
46 FLAGS = 13<<2,
47 FLOAT = 14<<2,
48 DOUBLE = 15<<2,
49 STRING = 16<<2,
50 POINTER = 17<<2,
51 BOXED = 18<<2,
52 PARAM = 19<<2,
53 OBJECT = 20<<2,
58 /**
59 * typedef gchar** GStrv;
60 * A C representable type name for G_TYPE_STRV.
61 * See Also
62 * GParamSpecBoxed, g_param_spec_boxed()
64 public alias char** GStrv;
66 /**
67 * typedef gchar* gchararray;
68 * A C representable type name for G_TYPE_STRING.
70 public alias char* gchararray;
72 /**
73 * typedef GClosureMarshal GSignalCMarshaller;
74 * This is the signature of marshaller functions, required to marshall
75 * arrays of parameter values to signal emissions into C language callback
76 * invocations. It is merely an alias to GClosureMarshal since the GClosure
77 * mechanism takes over responsibility of actual function invocation for the
78 * signal system.
80 public alias GClosureMarshal GSignalCMarshaller;
81 /**
82 * The GTypeDebugFlags enumeration values can be passed to
83 * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
84 * Note that the messages can also be triggered by setting the
85 * GOBJECT_DEBUG environment variable to a ':'-separated list of
86 * "objects" and "signals".
87 * G_TYPE_DEBUG_NONE
88 * Print no messages.
89 * G_TYPE_DEBUG_OBJECTS
90 * Print messages about object bookkeeping.
91 * G_TYPE_DEBUG_SIGNALS
92 * Print messages about signal emissions.
93 * G_TYPE_DEBUG_MASK
94 * Mask covering all debug flags.
96 public enum GTypeDebugFlags
98 NONE = 0,
99 OBJECTS = 1 << 0,
100 SIGNALS = 1 << 1,
101 MASK = 0x03
103 alias GTypeDebugFlags TypeDebugFlags;
106 * Bit masks used to check or determine characteristics of a type.
107 * G_TYPE_FLAG_ABSTRACT
109 public enum GTypeFlags
111 ABSTRACT = (1 << 4),
112 VALUE_ABSTRACT = (1 << 5)
114 alias GTypeFlags TypeFlags;
117 * Bit masks used to check or determine specific characteristics of a
118 * fundamental type.
119 * G_TYPE_FLAG_CLASSED
121 public enum GTypeFundamentalFlags
123 FLAG_CLASSED = (1 << 0),
124 FLAG_INSTANTIATABLE = (1 << 1),
125 FLAG_DERIVABLE = (1 << 2),
126 FLAG_DEEP_DERIVABLE = (1 << 3)
128 alias GTypeFundamentalFlags TypeFundamentalFlags;
131 * Through the GParamFlags flag values, certain aspects of parameters
132 * can be configured.
133 * G_PARAM_READABLE
135 public enum GParamFlags
137 READABLE = 1 << 0,
138 WRITABLE = 1 << 1,
139 CONSTRUCT = 1 << 2,
140 CONSTRUCT_ONLY = 1 << 3,
141 LAX_VALIDATION = 1 << 4,
142 STATIC_NAME = 1 << 5,
143 PRIVATE = STATIC_NAME,
144 STATIC_NICK = 1 << 6,
145 STATIC_BLURB = 1 << 7
147 alias GParamFlags ParamFlags;
150 * The signal flags are used to specify a signal's behaviour, the overall
151 * signal description outlines how especially the RUN flags control the
152 * stages of a signal emission.
153 * G_SIGNAL_RUN_FIRST
155 public enum GSignalFlags
157 RUN_FIRST = 1 << 0,
158 RUN_LAST = 1 << 1,
159 RUN_CLEANUP = 1 << 2,
160 NO_RECURSE = 1 << 3,
161 DETAILED = 1 << 4,
162 ACTION = 1 << 5,
163 NO_HOOKS = 1 << 6
165 alias GSignalFlags SignalFlags;
168 * The match types specify what g_signal_handlers_block_matched(),
169 * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
170 * match signals by.
171 * G_SIGNAL_MATCH_ID
172 * The signal id must be equal.
173 * G_SIGNAL_MATCH_DETAIL
174 * The signal detail be equal.
175 * G_SIGNAL_MATCH_CLOSURE
176 * The closure must be the same.
177 * G_SIGNAL_MATCH_FUNC
178 * The C closure callback must be the same.
179 * G_SIGNAL_MATCH_DATA
180 * The closure data must be the same.
181 * G_SIGNAL_MATCH_UNBLOCKED
182 * Only unblocked signals may matched.
184 public enum GSignalMatchType
186 ID = 1 << 0,
187 DETAIL = 1 << 1,
188 CLOSURE = 1 << 2,
189 FUNC = 1 << 3,
190 DATA = 1 << 4,
191 UNBLOCKED = 1 << 5
193 alias GSignalMatchType SignalMatchType;
196 * The connection flags are used to specify the behaviour of a signal's
197 * connection.
198 * G_CONNECT_AFTER
199 * whether the handler should be called before or after the
201 public enum GConnectFlags
203 AFTER = 1 << 0,
204 SWAPPED = 1 << 1
206 alias GConnectFlags ConnectFlags;
208 struct GValue
210 align(4)
212 GType g_type;
213 union Data
215 gint v_int;
216 guint v_uint;
217 glong v_long;
218 gulong v_ulong;
219 gint64 v_int64;
220 guint64 v_uint64;
221 gfloat v_float;
222 gdouble v_double;
223 gpointer v_pointer;
226 Data data1;
227 Data data2;
231 * An opaque structure used as the base of all interface types.
233 public struct GTypeInterface{}
237 * An opaque structure used as the base of all type instances.
239 public struct GTypeInstance{}
243 * An opaque structure used as the base of all classes.
245 public struct GTypeClass{}
249 * This structure is used to provide the type system with the information
250 * required to initialize and destruct (finalize) a type's class and
251 * its instances.
252 * The initialized structure is passed to the g_type_register_static() function
253 * (or is copied into the provided GTypeInfo structure in the
254 * g_type_plugin_complete_type_info()). The type system will perform a deep
255 * copy of this structure, so its memory does not need to be persistent
256 * across invocation of g_type_register_static().
257 * guint16class_size;
259 public struct GTypeInfo{}
260 // /+* interface types, classed types, instantiated types +/
261 // gobject-Type-Information.html
262 // ushort classSize;
263 // gobject-Type-Information.html
264 // GBaseInitFunc baseInit;
265 // gobject-Type-Information.html
266 // GBaseFinalizeFunc baseFinalize;
267 // gobject-Type-Information.html
268 // /+* interface types, classed types, instantiated types +/
269 // gobject-Type-Information.html
270 // GClassInitFunc classInit;
271 // gobject-Type-Information.html
272 // GClassFinalizeFunc classFinalize;
273 // gobject-Type-Information.html
274 // void* classData;
275 // gobject-Type-Information.html
276 // /+* instantiated types +/
277 // gobject-Type-Information.html
278 // ushort instanceSize;
279 // gobject-Type-Information.html
280 // ushort nPreallocs;
281 // gobject-Type-Information.html
282 // GInstanceInitFunc instanceInit;
283 // gobject-Type-Information.html
284 // /+* value handling +/
285 // gobject-Type-Information.html
286 // GTypeValueTable *valueTable;
287 // gobject-Type-Information.html
291 * A structure that provides information to the type system which is
292 * used specifically for managing fundamental types.
293 * GTypeFundamentalFlagstype_flags;
294 * GTypeFundamentalFlags describing the characteristics of the fundamental type
296 public struct GTypeFundamentalInfo{}
297 // GTypeFundamentalFlags typeFlags;
298 // gobject-Type-Information.html
302 * A structure that provides information to the type system which is
303 * used specifically for managing interface types.
304 * GInterfaceInitFuncinterface_init;
305 * location of the interface initialization function
306 * GInterfaceFinalizeFuncinterface_finalize;
307 * location of the interface finalization function
308 * gpointerinterface_data;
309 * user-supplied data passed to the interface init/finalize functions
311 public struct GInterfaceInfo{}
312 // GInterfaceInitFunc interfaceInit;
313 // gobject-Type-Information.html
314 // GInterfaceFinalizeFunc interfaceFinalize;
315 // gobject-Type-Information.html
316 // void* interfaceData;
317 // gobject-Type-Information.html
321 * The GTypeValueTable provides the functions required by the GValue implementation,
322 * to serve as a container for values of a type.
323 * value_init()
325 public struct GTypeValueTable{}
326 // void (*valueInit) (GValue *value);
327 // gobject-Type-Information.html
328 // void (*valueFree) (GValue *value);
329 // gobject-Type-Information.html
330 // void (*valueCopy) ( GValue *srcValue,
331 // gobject-Type-Information.html
332 // GValue *destValue);
333 // gobject-Type-Information.html
334 // /+* varargs functionality (optional) +/
335 // gobject-Type-Information.html
336 // void* (*valuePeekPointer) ( GValue *value);
337 // gobject-Type-Information.html
338 // char *collectFormat;
339 // gobject-Type-Information.html
340 // char* (*collectValue) (GValue *value,
341 // gobject-Type-Information.html
342 // uint nCollectValues,
343 // gobject-Type-Information.html
344 // GTypeCValue *collectValues,
345 // gobject-Type-Information.html
346 // uint collectFlags);
347 // gobject-Type-Information.html
348 // char *lcopyFormat;
349 // gobject-Type-Information.html
350 // char* (*lcopyValue) ( GValue *value,
351 // gobject-Type-Information.html
352 // uint nCollectValues,
353 // gobject-Type-Information.html
354 // GTypeCValue *collectValues,
355 // gobject-Type-Information.html
356 // uint collectFlags);
357 // gobject-Type-Information.html
361 * A structure holding information for a specific type. It is
362 * filled in by the g_type_query() function.
363 * GTypetype;
364 * the GType value of the type.
365 * constgchar*type_name;
366 * the name of the type.
367 * guintclass_size;
368 * the size of the class structure.
369 * guintinstance_size;
370 * the size of the instance structure.
372 public struct GTypeQuery{}
373 // GType type;
374 // gobject-Type-Information.html
375 // char *typeName;
376 // gobject-Type-Information.html
377 // uint classSize;
378 // gobject-Type-Information.html
379 // uint instanceSize;
380 // gobject-Type-Information.html
384 * Main Gtk struct.
385 * The GTypePlugin typedef is used as a placeholder
386 * for objects that implement the GTypePlugin
387 * interface.
389 public struct GTypePlugin{}
393 * The GTypePlugin interface is used by the type system in order to handle
394 * the lifecycle of dynamically loaded types.
395 * GTypePluginUseuse_plugin;
396 * Increases the use count of the plugin.
397 * GTypePluginUnuseunuse_plugin;
398 * Decreases the use count of the plugin.
399 * GTypePluginCompleteTypeInfocomplete_type_info;
400 * Fills in the GTypeInfo and
402 public struct GTypePluginClass{}
403 // GTypePluginUse usePlugin;
404 // GTypePlugin.html
405 // GTypePluginUnuse unusePlugin;
406 // GTypePlugin.html
407 // GTypePluginCompleteTypeInfo completeTypeInfo;
408 // GTypePlugin.html
409 // GTypePluginCompleteInterfaceInfo completeInterfaceInfo;
410 // GTypePlugin.html
414 * Main Gtk struct.
415 * The members of the GTypeModule structure should not
416 * be accessed directly, except for the name field.
417 * gchar*name;
418 * the name of the module
420 public struct GTypeModule
422 char *name;
427 * In order to implement dynamic loading of types based on GTypeModule,
428 * the load and unload functions in GTypeModuleClass must be implemented.
429 * GObjectClassparent_class;
430 * the parent class
431 * load()
432 * loads the module and registers one or more types using
434 public struct GTypeModuleClass{}
435 // GObjectClass parentClass;
436 // GTypeModule.html
437 // int (* load) (GTypeModule *modul);
438 // GTypeModule.html
439 // void (* unload) (GTypeModule *modul);
440 // GTypeModule.html
444 * Main Gtk struct.
445 * All the fields in the GObject structure are private
446 * to the GObject implementation and should never be accessed directly.
448 public struct GObject{}
452 * The class structure for the GObject type.
453 * Example4.Implementing singletons using a constructor
454 * static MySingleton *the_singleton = NULL;
455 * static GObject*
456 * my_singleton_constructor (GType type,
458 public struct GObjectClass{}
459 // GTypeClass gTypeClass;
460 // gobject-The-Base-Object-Type.html
461 // /+* overridable methods +/
462 // gobject-The-Base-Object-Type.html
463 // GObject* (*constructor) (GType type,
464 // gobject-The-Base-Object-Type.html
465 // uint nConstructProperties,
466 // gobject-The-Base-Object-Type.html
467 // GObjectConstructParam *constructProperties);
468 // gobject-The-Base-Object-Type.html
469 // void (*setProperty) (GObject *object,
470 // gobject-The-Base-Object-Type.html
471 // uint propertyId,
472 // gobject-The-Base-Object-Type.html
473 // GValue *value,
474 // gobject-The-Base-Object-Type.html
475 // GParamSpec *pspec);
476 // gobject-The-Base-Object-Type.html
477 // void (*getProperty) (GObject *object,
478 // gobject-The-Base-Object-Type.html
479 // uint propertyId,
480 // gobject-The-Base-Object-Type.html
481 // GValue *value,
482 // gobject-The-Base-Object-Type.html
483 // GParamSpec *pspec);
484 // gobject-The-Base-Object-Type.html
485 // void (*dispose) (GObject *object);
486 // gobject-The-Base-Object-Type.html
487 // void (*finalize) (GObject *object);
488 // gobject-The-Base-Object-Type.html
489 // /+* seldomly overidden +/
490 // gobject-The-Base-Object-Type.html
491 // void (*dispatchPropertiesChanged) (GObject *object,
492 // gobject-The-Base-Object-Type.html
493 // uint nPspecs,
494 // gobject-The-Base-Object-Type.html
495 // GParamSpec **pspecs);
496 // gobject-The-Base-Object-Type.html
497 // /+* signals +/
498 // gobject-The-Base-Object-Type.html
499 // void (*notify) (GObject *object,
500 // gobject-The-Base-Object-Type.html
501 // GParamSpec *pspec);
502 // gobject-The-Base-Object-Type.html
506 * The GObjectConstructParam struct is an auxiliary
507 * structure used to hand GParamSpec/GValue pairs to the constructor of
508 * a GObjectClass.
509 * GParamSpec*pspec;
510 * the GParamSpec of the construct parameter
511 * GValue*value;
512 * the value to set the parameter to
514 public struct GObjectConstructParam{}
515 // GParamSpec *pspec;
516 // gobject-The-Base-Object-Type.html
517 // GValue *value;
518 // gobject-The-Base-Object-Type.html
522 * The GParameter struct is an auxiliary structure used
523 * to hand parameter name/value pairs to g_object_newv().
524 * constgchar*name;
525 * the parameter name
526 * GValuevalue;
527 * the parameter value
529 public struct GParameter{}
530 // char *name;
531 // gobject-The-Base-Object-Type.html
532 // GValue value;
533 // gobject-The-Base-Object-Type.html
537 * All the fields in the GInitiallyUnowned structure
538 * are private to the GInitiallyUnowned implementation and should never be
539 * accessed directly.
541 public struct GInitiallyUnowned{}
545 * The class structure for the GInitiallyUnowned type.
547 public struct GInitiallyUnownedClass{}
551 * The class of an enumeration type holds information about its
552 * possible values.
553 * GTypeClassg_type_class;
554 * the parent class
555 * gintminimum;
556 * the smallest possible value.
557 * gintmaximum;
558 * the largest possible value.
559 * guintn_values;
560 * the number of possible values.
561 * GEnumValue*values;
562 * an array of GEnumValue structs describing the
563 * individual values.
565 public struct GEnumClass{}
566 // GTypeClass gTypeClass;
567 // gobject-Enumeration-and-Flag-Types.html
568 // int minimum;
569 // gobject-Enumeration-and-Flag-Types.html
570 // int maximum;
571 // gobject-Enumeration-and-Flag-Types.html
572 // uint nValues;
573 // gobject-Enumeration-and-Flag-Types.html
574 // GEnumValue *values;
575 // gobject-Enumeration-and-Flag-Types.html
579 * The class of a flags type holds information about its
580 * possible values.
581 * GTypeClassg_type_class;
582 * the parent class
583 * guintmask;
584 * a mask covering all possible values.
585 * guintn_values;
586 * the number of possible values.
587 * GFlagsValue*values;
588 * an array of GFlagsValue structs describing the
589 * individual values.
591 public struct GFlagsClass{}
592 // GTypeClass gTypeClass;
593 // gobject-Enumeration-and-Flag-Types.html
594 // uint mask;
595 // gobject-Enumeration-and-Flag-Types.html
596 // uint nValues;
597 // gobject-Enumeration-and-Flag-Types.html
598 // GFlagsValue *values;
599 // gobject-Enumeration-and-Flag-Types.html
603 * Main Gtk struct.
604 * A structure which contains a single enum value, it's name, and it's
605 * nickname.
606 * gintvalue;
607 * the enum value
608 * constgchar*value_name;
609 * the name of the value
610 * constgchar*value_nick;
611 * the nickname of the value
613 public struct GEnumValue
615 int value;
616 char *valueName;
617 char *valueNick;
622 * A structure which contains a single flags value, it's name, and it's
623 * nickname.
624 * guintvalue;
625 * the flags value
626 * constgchar*value_name;
627 * the name of the value
628 * constgchar*value_nick;
629 * the nickname of the value
631 public struct GFlagsValue
633 uint value;
634 char *valueName;
635 char *valueNick;
640 * A GParamSpec derived structure that contains the meta data for boolean properties.
641 * GParamSpecparent_instance;
642 * private GParamSpec portion
643 * gbooleandefault_value;
645 public struct GParamSpecBoolean{}
646 // GParamSpec parentInstance;
647 // gobject-Standard-Parameter-and-Value-Types.html
648 // int defaultValue;
649 // gobject-Standard-Parameter-and-Value-Types.html
653 * A GParamSpec derived structure that contains the meta data for character properties.
654 * GParamSpecparent_instance;
655 * private GParamSpec portion
656 * gint8minimum;
658 public struct GParamSpecChar{}
659 // GParamSpec parentInstance;
660 // gobject-Standard-Parameter-and-Value-Types.html
661 // byte minimum;
662 // gobject-Standard-Parameter-and-Value-Types.html
663 // byte maximum;
664 // gobject-Standard-Parameter-and-Value-Types.html
665 // byte defaultValue;
666 // gobject-Standard-Parameter-and-Value-Types.html
670 * A GParamSpec derived structure that contains the meta data for unsigned character properties.
671 * GParamSpecparent_instance;
672 * private GParamSpec portion
673 * guint8minimum;
675 public struct GParamSpecUChar{}
676 // GParamSpec parentInstance;
677 // gobject-Standard-Parameter-and-Value-Types.html
678 // byte minimum;
679 // gobject-Standard-Parameter-and-Value-Types.html
680 // byte maximum;
681 // gobject-Standard-Parameter-and-Value-Types.html
682 // byte defaultValue;
683 // gobject-Standard-Parameter-and-Value-Types.html
687 * A GParamSpec derived structure that contains the meta data for integer properties.
688 * GParamSpecparent_instance;
689 * private GParamSpec portion
690 * gintminimum;
692 public struct GParamSpecInt{}
693 // GParamSpec parentInstance;
694 // gobject-Standard-Parameter-and-Value-Types.html
695 // int minimum;
696 // gobject-Standard-Parameter-and-Value-Types.html
697 // int maximum;
698 // gobject-Standard-Parameter-and-Value-Types.html
699 // int defaultValue;
700 // gobject-Standard-Parameter-and-Value-Types.html
704 * A GParamSpec derived structure that contains the meta data for unsigned integer properties.
705 * GParamSpecparent_instance;
706 * private GParamSpec portion
707 * guintminimum;
709 public struct GParamSpecUInt{}
710 // GParamSpec parentInstance;
711 // gobject-Standard-Parameter-and-Value-Types.html
712 // uint minimum;
713 // gobject-Standard-Parameter-and-Value-Types.html
714 // uint maximum;
715 // gobject-Standard-Parameter-and-Value-Types.html
716 // uint defaultValue;
717 // gobject-Standard-Parameter-and-Value-Types.html
721 * A GParamSpec derived structure that contains the meta data for long integer properties.
722 * GParamSpecparent_instance;
723 * private GParamSpec portion
724 * glongminimum;
726 public struct GParamSpecLong{}
727 // GParamSpec parentInstance;
728 // gobject-Standard-Parameter-and-Value-Types.html
729 // int minimum;
730 // gobject-Standard-Parameter-and-Value-Types.html
731 // int maximum;
732 // gobject-Standard-Parameter-and-Value-Types.html
733 // int defaultValue;
734 // gobject-Standard-Parameter-and-Value-Types.html
738 * A GParamSpec derived structure that contains the meta data for unsigned long integer properties.
739 * GParamSpecparent_instance;
740 * private GParamSpec portion
741 * gulongminimum;
743 public struct GParamSpecULong{}
744 // GParamSpec parentInstance;
745 // gobject-Standard-Parameter-and-Value-Types.html
746 // uint minimum;
747 // gobject-Standard-Parameter-and-Value-Types.html
748 // uint maximum;
749 // gobject-Standard-Parameter-and-Value-Types.html
750 // uint defaultValue;
751 // gobject-Standard-Parameter-and-Value-Types.html
755 * A GParamSpec derived structure that contains the meta data for 64bit integer properties.
756 * GParamSpecparent_instance;
757 * private GParamSpec portion
758 * gint64minimum;
760 public struct GParamSpecInt64{}
761 // GParamSpec parentInstance;
762 // gobject-Standard-Parameter-and-Value-Types.html
763 // long minimum;
764 // gobject-Standard-Parameter-and-Value-Types.html
765 // long maximum;
766 // gobject-Standard-Parameter-and-Value-Types.html
767 // long defaultValue;
768 // gobject-Standard-Parameter-and-Value-Types.html
772 * A GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
773 * GParamSpecparent_instance;
774 * private GParamSpec portion
775 * guint64minimum;
777 public struct GParamSpecUInt64{}
778 // GParamSpec parentInstance;
779 // gobject-Standard-Parameter-and-Value-Types.html
780 // ulong minimum;
781 // gobject-Standard-Parameter-and-Value-Types.html
782 // ulong maximum;
783 // gobject-Standard-Parameter-and-Value-Types.html
784 // ulong defaultValue;
785 // gobject-Standard-Parameter-and-Value-Types.html
789 * A GParamSpec derived structure that contains the meta data for float properties.
790 * GParamSpecparent_instance;
791 * private GParamSpec portion
792 * gfloatminimum;
794 public struct GParamSpecFloat{}
795 // GParamSpec parentInstance;
796 // gobject-Standard-Parameter-and-Value-Types.html
797 // float minimum;
798 // gobject-Standard-Parameter-and-Value-Types.html
799 // float maximum;
800 // gobject-Standard-Parameter-and-Value-Types.html
801 // float defaultValue;
802 // gobject-Standard-Parameter-and-Value-Types.html
803 // float epsilon;
804 // gobject-Standard-Parameter-and-Value-Types.html
808 * A GParamSpec derived structure that contains the meta data for double properties.
809 * GParamSpecparent_instance;
810 * private GParamSpec portion
811 * gdoubleminimum;
813 public struct GParamSpecDouble{}
814 // GParamSpec parentInstance;
815 // gobject-Standard-Parameter-and-Value-Types.html
816 // double minimum;
817 // gobject-Standard-Parameter-and-Value-Types.html
818 // double maximum;
819 // gobject-Standard-Parameter-and-Value-Types.html
820 // double defaultValue;
821 // gobject-Standard-Parameter-and-Value-Types.html
822 // double epsilon;
823 // gobject-Standard-Parameter-and-Value-Types.html
827 * A GParamSpec derived structure that contains the meta data for enum
828 * properties.
829 * GParamSpecparent_instance;
830 * private GParamSpec portion
831 * GEnumClass*enum_class;
832 * the GEnumClass for the enum
833 * gintdefault_value;
835 public struct GParamSpecEnum{}
836 // GParamSpec parentInstance;
837 // gobject-Standard-Parameter-and-Value-Types.html
838 // GEnumClass *enumClass;
839 // gobject-Standard-Parameter-and-Value-Types.html
840 // int defaultValue;
841 // gobject-Standard-Parameter-and-Value-Types.html
845 * A GParamSpec derived structure that contains the meta data for flags
846 * properties.
847 * GParamSpecparent_instance;
848 * private GParamSpec portion
849 * GFlagsClass*flags_class;
850 * the GFlagsClass for the flags
851 * guintdefault_value;
853 public struct GParamSpecFlags{}
854 // GParamSpec parentInstance;
855 // gobject-Standard-Parameter-and-Value-Types.html
856 // GFlagsClass *flagsClass;
857 // gobject-Standard-Parameter-and-Value-Types.html
858 // uint defaultValue;
859 // gobject-Standard-Parameter-and-Value-Types.html
863 * A GParamSpec derived structure that contains the meta data for string
864 * properties.
865 * GParamSpecparent_instance;
866 * private GParamSpec portion
867 * gchar*default_value;
869 public struct GParamSpecString{}
870 // GParamSpec parentInstance;
871 // gobject-Standard-Parameter-and-Value-Types.html
872 // char *defaultValue;
873 // gobject-Standard-Parameter-and-Value-Types.html
874 // char *csetFirst;
875 // gobject-Standard-Parameter-and-Value-Types.html
876 // char *csetNth;
877 // gobject-Standard-Parameter-and-Value-Types.html
878 // char substitutor;
879 // gobject-Standard-Parameter-and-Value-Types.html
880 // uint nullFoldIfEmpty : 1;
881 // gobject-Standard-Parameter-and-Value-Types.html
882 // uint ensureNonNull : 1;
883 // gobject-Standard-Parameter-and-Value-Types.html
887 * A GParamSpec derived structure that contains the meta data for G_TYPE_PARAM
888 * properties.
889 * GParamSpecparent_instance;
890 * private GParamSpec portion
892 public struct GParamSpecParam{}
893 // GParamSpec parentInstance;
894 // gobject-Standard-Parameter-and-Value-Types.html
898 * A GParamSpec derived structure that contains the meta data for boxed properties.
899 * GParamSpecparent_instance;
900 * private GParamSpec portion
902 public struct GParamSpecBoxed{}
903 // GParamSpec parentInstance;
904 // gobject-Standard-Parameter-and-Value-Types.html
908 * A GParamSpec derived structure that contains the meta data for pointer properties.
909 * GParamSpecparent_instance;
910 * private GParamSpec portion
912 public struct GParamSpecPointer{}
913 // GParamSpec parentInstance;
914 // gobject-Standard-Parameter-and-Value-Types.html
918 * A GParamSpec derived structure that contains the meta data for object properties.
919 * GParamSpecparent_instance;
920 * private GParamSpec portion
922 public struct GParamSpecObject{}
923 // GParamSpec parentInstance;
924 // gobject-Standard-Parameter-and-Value-Types.html
928 * A GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
929 * GParamSpecparent_instance;
930 * private GParamSpec portion
931 * gunichardefault_value;
933 public struct GParamSpecUnichar{}
934 // GParamSpec parentInstance;
935 // gobject-Standard-Parameter-and-Value-Types.html
936 // gunichar defaultValue;
937 // gobject-Standard-Parameter-and-Value-Types.html
941 * A GParamSpec derived structure that contains the meta data for GValueArray properties.
942 * GParamSpecparent_instance;
944 public struct GParamSpecValueArray{}
945 // GParamSpec parentInstance;
946 // gobject-Standard-Parameter-and-Value-Types.html
947 // GParamSpec *elementSpec;
948 // gobject-Standard-Parameter-and-Value-Types.html
949 // uint fixedNElements;
950 // gobject-Standard-Parameter-and-Value-Types.html
954 * This is a type of GParamSpec type that simply redirects operations to
955 * another paramspec. All operations other than getting or
956 * setting the value are redirected, including accessing the nick and
957 * blurb, validating a value, and so forth. See
958 * g_param_spec_get_redirect_target() for retrieving the overidden
959 * property. GParamSpecOverride is used in implementing
960 * g_object_class_override_property(), and will not be directly useful
961 * unless you are implementing a new base type similar to GObject.
962 * Since 2.4
964 public struct GParamSpecOverride{}
968 * A GParamSpec derived structure that contains the meta data for GType properties.
969 * GParamSpecparent_instance;
971 public struct GParamSpecGType{}
972 // GParamSpec parentInstance;
973 // gobject-Standard-Parameter-and-Value-Types.html
974 // GType isAType;
975 // gobject-Standard-Parameter-and-Value-Types.html
979 * Main Gtk struct.
980 * All fields of the GParamSpec struct are private and
981 * should not be used directly, except for the following:
982 * GTypeInstanceg_type_instance;
983 * private GTypeInstance portion
984 * gchar*name;
986 public struct GParamSpec{}
987 // GTypeInstance gTypeInstance;
988 // gobject-GParamSpec.html
989 // char *name;
990 // gobject-GParamSpec.html
991 // GParamFlags flags;
992 // gobject-GParamSpec.html
993 // GType valueType;
994 // gobject-GParamSpec.html
995 // GType ownerType; /+* class or interface using this property +/
996 // gobject-GParamSpec.html
1000 * The class structure for the GParamSpec type.
1001 * Normally, GParamSpec classes are filled by
1002 * g_param_type_register_static().
1003 * GTypeClassg_type_class;
1004 * the parent class
1005 * GTypevalue_type;
1006 * the GValue type for this parameter
1007 * finalize()
1008 * The instance finalization function (optional), should chain
1010 public struct GParamSpecClass{}
1011 // GTypeClass gTypeClass;
1012 // gobject-GParamSpec.html
1013 // GType valueType;
1014 // gobject-GParamSpec.html
1015 // void (*finalize) (GParamSpec *pspec);
1016 // gobject-GParamSpec.html
1017 // /+* GParam methods +/
1018 // gobject-GParamSpec.html
1019 // void (*valueSetDefault) (GParamSpec *pspec,
1020 // gobject-GParamSpec.html
1021 // GValue *value);
1022 // gobject-GParamSpec.html
1023 // int (*valueValidate) (GParamSpec *pspec,
1024 // gobject-GParamSpec.html
1025 // GValue *value);
1026 // gobject-GParamSpec.html
1027 // int (*valuesCmp) (GParamSpec *pspec,
1028 // gobject-GParamSpec.html
1029 // GValue *value1,
1030 // gobject-GParamSpec.html
1031 // GValue *value2);
1032 // gobject-GParamSpec.html
1036 * This structure is used to provide the type system with the information
1037 * required to initialize and destruct (finalize) a parameter's class and
1038 * instances thereof.
1039 * The initialized structure is passed to the g_param_type_register_static()
1040 * The type system will perform a deep copy of this structure, so it's memory
1041 * does not need to be persistent across invocation of
1042 * g_param_type_register_static().
1043 * guint16instance_size;
1044 * Size of the instance (object) structure.
1045 * guint16n_preallocs;
1046 * Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the slice allocator now.
1047 * instance_init()
1048 * Location of the instance initialization function (optional).
1049 * GTypevalue_type;
1050 * The GType of values conforming to this GParamSpec
1051 * finalize()
1052 * The instance finalization function (optional).
1053 * value_set_default()
1054 * Resets a value to the default value for pspec
1056 public struct GParamSpecTypeInfo{}
1057 // /+* type system portion +/
1058 // gobject-GParamSpec.html
1059 // ushort instanceSize; /+* obligatory +/
1060 // gobject-GParamSpec.html
1061 // ushort nPreallocs; /+* optional +/
1062 // gobject-GParamSpec.html
1063 // void (*instanceInit) (GParamSpec *pspec); /+* optional +/
1064 // gobject-GParamSpec.html
1065 // /+* class portion +/
1066 // gobject-GParamSpec.html
1067 // GType valueType; /+* obligatory +/
1068 // gobject-GParamSpec.html
1069 // void (*finalize) (GParamSpec *pspec); /+* optional +/
1070 // gobject-GParamSpec.html
1071 // void (*valueSetDefault) (GParamSpec *pspec, /+* recommended +/
1072 // gobject-GParamSpec.html
1073 // GValue *value);
1074 // gobject-GParamSpec.html
1075 // int (*valueValidate) (GParamSpec *pspec, /+* optional +/
1076 // gobject-GParamSpec.html
1077 // GValue *value);
1078 // gobject-GParamSpec.html
1079 // int (*valuesCmp) (GParamSpec *pspec, /+* recommended +/
1080 // gobject-GParamSpec.html
1081 // GValue *value1,
1082 // gobject-GParamSpec.html
1083 // GValue *value2);
1084 // gobject-GParamSpec.html
1088 * A GParamSpecPool maintains a collection of GParamSpecs which can be
1089 * quickly accessed by owner and name. The implementation of the GObject property
1090 * system uses such a pool to store the GParamSpecs of the properties all object
1091 * types.
1093 public struct GParamSpecPool{}
1097 * The GSignalInvocationHint structure is used to pass on additional information
1098 * to callbacks during a signal emission.
1099 * guintsignal_id;
1101 public struct GSignalInvocationHint{}
1102 // uint signalId;
1103 // gobject-Signals.html
1104 // GQuark detail;
1105 // gobject-Signals.html
1106 // GSignalFlags runType;
1107 // gobject-Signals.html
1111 * A structure holding in-depth information for a specific signal. It is
1112 * filled in by the g_signal_query() function.
1113 * guintsignal_id;
1115 public struct GSignalQuery{}
1116 // uint signalId;
1117 // gobject-Signals.html
1118 // char *signalName;
1119 // gobject-Signals.html
1120 // GType itype;
1121 // gobject-Signals.html
1122 // GSignalFlags signalFlags;
1123 // gobject-Signals.html
1124 // GType returnType; /+* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag +/
1125 // gobject-Signals.html
1126 // uint nParams;
1127 // gobject-Signals.html
1128 // GType *paramTypes; /+* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag +/
1129 // gobject-Signals.html
1133 * Main Gtk struct.
1134 * A GClosure represents a callback supplied by the programmer.
1135 * volatile guintin_marshal:1;
1136 * Indicates whether the closure is currently being invoked with
1138 public struct GClosure
1140 uint bitfield;
1141 //uint inMarshal : 1;
1146 * A GCClosure is a specialization of GClosure for C function callbacks.
1147 * GClosureclosure;
1148 * the GClosure
1149 * gpointercallback;
1150 * the callback function
1152 public struct GCClosure{}
1153 // GClosure closure;
1154 // gobject-Closures.html
1155 // void* callback;
1156 // gobject-Closures.html
1160 * Main Gtk struct.
1161 * A GValueArray contains an array of GValue elements.
1162 * guintn_values;
1164 public struct GValueArray{}
1165 // uint nValues;
1166 // gobject-Value-arrays.html
1167 // GValue *values;
1168 // gobject-Value-arrays.html
1172 * Returns the fundamental type which is the ancestor of type.
1173 * Fundamental types are types that serve as ultimate bases for the derived types,
1174 * thus they are the roots of distinct inheritance hierarchies.
1175 * type:
1176 * A GType value.
1178 // TODO
1179 // #define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type))
1182 * Returns the type ID for the fundamental type number x.
1183 * Use g_type_fundamental_next() instead of this macro to create new fundamental
1184 * types.
1185 * x:
1186 * the fundamental type number.
1188 // TODO
1189 // #define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT))
1192 * Returns TRUE if type is an abstract type. An abstract type can not be
1193 * instantiated and is normally used as an abstract base class for
1194 * derived classes.
1195 * type:
1196 * A GType value.
1198 // TODO
1199 // #define G_TYPE_IS_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT))
1202 * Returns TRUE if type is derived (or in object-oriented terminology:
1203 * inherited) from another type (this holds true for all non-fundamental
1204 * types).
1205 * type:
1206 * A GType value.
1208 // TODO
1209 // #define G_TYPE_IS_DERIVED(type) ((type) > G_TYPE_FUNDAMENTAL_MAX)
1212 * Returns TRUE if type is a fundamental type.
1213 * type:
1214 * A GType value.
1216 // TODO
1217 // #define G_TYPE_IS_FUNDAMENTAL(type) ((type) <= G_TYPE_FUNDAMENTAL_MAX)
1220 * Returns TRUE if type is a value type and can be used with
1221 * g_value_init().
1222 * type:
1223 * A GType value.
1225 // TODO
1226 // #define G_TYPE_IS_VALUE_TYPE(type) (g_type_check_is_value_type (type))
1229 * Returns TRUE if type has a GTypeValueTable.
1230 * type:
1231 * A GType value.
1233 // TODO
1234 // #define G_TYPE_HAS_VALUE_TABLE(type) (g_type_value_table_peek (type) != NULL)
1237 * Returns TRUE if type is a classed type.
1238 * type:
1239 * A GType value.
1241 // TODO
1242 // #define G_TYPE_IS_CLASSED(type) (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
1245 * Returns TRUE if type can be instantiated. Instantiation is the
1246 * process of creating an instance (object) of this type.
1247 * type:
1248 * A GType value.
1250 // TODO
1251 // #define G_TYPE_IS_INSTANTIATABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
1254 * Returns TRUE if type is a derivable type. A derivable type can
1255 * be used as the base class of a flat (single-level) class hierarchy.
1256 * type:
1257 * A GType value.
1259 // TODO
1260 // #define G_TYPE_IS_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE))
1263 * Returns TRUE if type is a deep derivable type. A deep derivable type
1264 * can be used as the base class of a deep (multi-level) class hierarchy.
1265 * type:
1266 * A GType value.
1268 // TODO
1269 // #define G_TYPE_IS_DEEP_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE))
1272 * Returns TRUE if type is an interface type.
1273 * An interface type provides a pure API, the implementation
1274 * of which is provided by another type (which is then said to conform
1275 * to the interface). GLib interfaces are somewhat analogous to Java
1276 * interfaces and C++ classes containing only pure virtual functions,
1277 * with the difference that GType interfaces are not derivable (but see
1278 * g_type_interface_add_prerequisite() for an alternative).
1279 * type:
1280 * A GType value.
1282 // TODO
1283 // #define G_TYPE_IS_INTERFACE(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
1286 * Returns the type identifier from a given instance structure.
1287 * This macro should only be used in type implementations.
1288 * instance:
1289 * Location of a valid GTypeInstance structure.
1291 // TODO
1292 // #define G_TYPE_FROM_INSTANCE(instance) (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class))
1295 * Returns the type identifier from a given class structure.
1296 * This macro should only be used in type implementations.
1297 * g_class:
1298 * Location of a valid GTypeClass structure.
1300 // TODO
1301 // #define G_TYPE_FROM_CLASS(g_class) (((GTypeClass*) (g_class))->g_type)
1304 * Returns the type identifier from a given interface structure.
1305 * This macro should only be used in type implementations.
1306 * g_iface:
1307 * Location of a valid GTypeInterface structure.
1309 // TODO
1310 // #define G_TYPE_FROM_INTERFACE(g_iface) (((GTypeInterface*) (g_iface))->g_type)
1313 * Returns the class structure of a given instance, casted
1314 * to a specified ancestor type g_type of the instance.
1315 * Warning
1316 * Note
1317 * that while calling a GInstanceInitFunc(), the class pointer gets
1318 * modified, so it might not always return the expected pointer.
1319 * This macro should only be used in type implementations.
1320 * instance:
1321 * Location of the GTypeInstance structure.
1322 * g_type:
1323 * The anchestor type of the class to be returned.
1324 * c_type:
1325 * The corresponding C type of g_type.
1327 // TODO
1328 // #define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type))
1331 * Returns the interface structure for interface g_type of a given instance.
1332 * This macro should only be used in type implementations.
1333 * instance:
1334 * Location of the GTypeInstance structure.
1335 * g_type:
1336 * The interface type to be returned.
1337 * c_type:
1338 * The corresponding C type of g_type.
1340 // TODO
1341 // #define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
1344 * Gets the private structure for a particular type.
1345 * The private structure must have been registered in the
1346 * class_init function with g_type_class_add_private().
1347 * This macro should only be used in type implementations.
1348 * instance:
1349 * the instance of a type deriving from private_type.
1350 * g_type:
1351 * the type identifying which private data to retrieve.
1352 * c_type:
1353 * The C type for the private structure.
1354 * Since 2.4
1356 // TODO
1357 // #define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
1360 * Returns TRUE if instance is a valid GTypeInstance structure,
1361 * otherwise emits a warning and returns FALSE.
1362 * This macro should only be used in type implementations.
1363 * instance:
1364 * Location of a GTypeInstance structure.
1366 // TODO
1367 // #define G_TYPE_CHECK_INSTANCE(instance) (_G_TYPE_CHI ((GTypeInstance*) (instance)))
1370 * Checks that instance is an instance of the type identified by g_type
1371 * and emits a warning if this is not the case. Returns instance casted
1372 * to a pointer to c_type.
1373 * This macro should only be used in type implementations.
1374 * instance:
1375 * Location of a GTypeInstance structure.
1376 * g_type:
1377 * The type to be returned.
1378 * c_type:
1379 * The corresponding C type of g_type.
1381 // TODO
1382 // #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
1385 * Returns TRUE if instance is an instance of the type identified by g_type.
1386 * Otherwise emits a warning and returns FALSE.
1387 * This macro should only be used in type implementations.
1388 * instance:
1389 * Location of a GTypeInstance structure.
1390 * g_type:
1391 * The type to be checked
1393 // TODO
1394 // #define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type) (_G_TYPE_CIT ((instance), (g_type)))
1397 * Checks that g_class is a class structure of the type identified by g_type
1398 * and emits a warning if this is not the case. Returns g_class casted
1399 * to a pointer to c_type.
1400 * This macro should only be used in type implementations.
1401 * g_class:
1402 * Location of a GTypeClass structure.
1403 * g_type:
1404 * The type to be returned.
1405 * c_type:
1406 * The corresponding C type of class structure of g_type.
1408 // TODO
1409 // #define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type) (_G_TYPE_CCC ((g_class), (g_type), c_type))
1412 * Returns TRUE if g_class is a class structure of the type identified by
1413 * g_type. Otherwise emits a warning and returns FALSE.
1414 * This macro should only be used in type implementations.
1415 * g_class:
1416 * Location of a GTypeClass structure.
1417 * g_type:
1418 * The type to be checked.
1420 // TODO
1421 // #define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type) (_G_TYPE_CCT ((g_class), (g_type)))
1424 * Returns TRUE if value has been initialized to hold values
1425 * of a value type.
1426 * This macro should only be used in type implementations.
1427 * value:
1428 * a GValue
1430 // TODO
1431 // #define G_TYPE_CHECK_VALUE(value) (_G_TYPE_CHV ((value)))
1434 * Returns TRUE if value has been initialized to hold values
1435 * of type g_type.
1436 * This macro should only be used in type implementations.
1437 * value:
1438 * a GValue
1439 * g_type:
1440 * The type to be checked.
1442 // TODO
1443 // #define G_TYPE_CHECK_VALUE_TYPE(value, g_type) (_G_TYPE_CVH ((value), (g_type)))
1446 * A convenience macro for type implementations, which declares a
1447 * class initialization function, an instance initialization function (see GTypeInfo for information about
1448 * these) and a static variable named t_n_parent_class pointing to the parent class. Furthermore, it defines
1449 * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
1450 * TN:
1451 * The name of the new type, in Camel case.
1452 * t_n:
1453 * The name of the new type, in lowercase, with words
1454 * separated by '_'.
1455 * T_P:
1456 * The GType of the parent type.
1457 * Since 2.4
1459 // TODO
1460 // #define G_DEFINE_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
1463 * A convenience macro for type implementations.
1464 * Similar to G_DEFINE_TYPE(), but allows to insert custom code into the
1465 * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
1466 * See G_DEFINE_TYPE_EXTENDED() for an example.
1467 * TN:
1468 * The name of the new type, in Camel case.
1469 * t_n:
1470 * The name of the new type in lowercase, with words separated by '_'.
1471 * T_P:
1472 * The GType of the parent type.
1473 * _C_:
1474 * Custom code that gets inserted in the *_get_type() function.
1475 * Since 2.4
1477 // TODO
1478 // #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
1481 * A convenience macro for type implementations.
1482 * Similar to G_DEFINE_TYPE(), but defines an abstract type.
1483 * See G_DEFINE_TYPE_EXTENDED() for an example.
1484 * TN:
1485 * The name of the new type, in Camel case.
1486 * t_n:
1487 * The name of the new type, in lowercase, with words
1488 * separated by '_'.
1489 * T_P:
1490 * The GType of the parent type.
1491 * Since 2.4
1493 // TODO
1494 // #define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
1497 * A convenience macro for type implementations.
1498 * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows to
1499 * insert custom code into the *_get_type() function, e.g. interface implementations
1500 * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
1501 * TN:
1502 * The name of the new type, in Camel case.
1503 * t_n:
1504 * The name of the new type, in lowercase, with words
1505 * separated by '_'.
1506 * T_P:
1507 * The GType of the parent type.
1508 * _C_:
1509 * Custom code that gets inserted in the @type_name_get_type() function.
1510 * Since 2.4
1512 // TODO
1513 // #define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
1516 * A convenience macro to ease interface addition in the _C_ section
1517 * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
1518 * See G_DEFINE_TYPE_EXTENDED() for an example.
1519 * Note that this macro can only be used together with the G_DEFINE_TYPE_*
1520 * macros, since it depends on variable names from those macros.
1521 * TYPE_IFACE:
1522 * The GType of the interface to add
1523 * iface_init:
1524 * The interface init function
1525 * Since 2.4
1527 // TODO
1528 // #define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)
1531 * The most general convenience macro for type implementations, on which
1532 * G_DEFINE_TYPE(), etc are based.
1533 * G_DEFINE_TYPE_EXTENDED (GtkGadget,
1534 * gtk_gadget,
1535 * GTK_TYPE_WIDGET,
1536 * 0,
1537 * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
1538 * gtk_gadget_gizmo_init));
1539 * expands to
1540 * static void gtk_gadget_init (GtkGadget *self);
1541 * static void gtk_gadget_class_init (GtkGadgetClass *klass);
1542 * static gpointer gtk_gadget_parent_class = NULL;
1543 * static void gtk_gadget_class_intern_init (gpointer klass)
1545 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
1546 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
1548 * GType
1549 * gtk_gadget_get_type (void)
1551 * static GType g_define_type_id = 0;
1552 * if (G_UNLIKELY (g_define_type_id == 0))
1554 * static const GTypeInfo g_define_type_info = {
1555 * sizeof (GtkGadgetClass),
1556 * (GBaseInitFunc) NULL,
1557 * (GBaseFinalizeFunc) NULL,
1558 * (GClassInitFunc) gtk_gadget_class_intern_init,
1559 * (GClassFinalizeFunc) NULL,
1560 * NULL, /+* class_data +/
1561 * sizeof (GtkGadget),
1562 * 0, /+* n_preallocs +/
1563 * (GInstanceInitFunc) gtk_gadget_init,
1564 * };
1565 * g_define_type_id = g_type_register_static (GTK_TYPE_WIDGET, "GtkGadget", g_define_type_info, 0);
1567 * static const GInterfaceInfo g_implement_interface_info = {
1568 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
1569 * };
1570 * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, g_implement_interface_info);
1573 * return g_define_type_id;
1575 * The only pieces which have to be manually provided are the definitions of the
1576 * instance and class structure and the definitions of the instance and class
1577 * init functions.
1578 * TN:
1579 * t_n:
1580 * T_P:
1581 * _f_:
1582 * _C_:
1583 * Since 2.4
1585 // TODO
1586 // #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
1589 * Returns a boolean value of FALSE or TRUE indicating whether
1590 * the passed in type id is a G_TYPE_OBJECT or derived from it.
1591 * type:
1592 * Type id to check for is a G_TYPE_OBJECT relationship.
1593 * Returns:
1594 * FALSE or TRUE, indicating whether type is a G_TYPE_OBJECT.
1596 // TODO
1597 // #define G_TYPE_IS_OBJECT(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
1600 * Casts a GObject or derived pointer into a (GObject*) pointer.
1601 * Depending on the current debugging level, this function may invoke
1602 * certain runtime checks to identify invalid casts.
1603 * object:
1604 * Object which is subject to casting.
1606 // TODO
1607 // #define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject))
1610 * Checks whether a valid GTypeInstance pointer is of type G_TYPE_OBJECT.
1611 * object:
1612 * Instance to check for being a G_TYPE_OBJECT.
1614 // TODO
1615 // #define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT))
1618 * Casts a derived GObjectClass structure into a GObjectClass structure.
1619 * class:
1620 * a valid GObjectClass
1622 // TODO
1623 // #define G_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass))
1626 * Checks whether class "is a" valid GObjectClass structure of type
1627 * G_TYPE_OBJECT or derived.
1628 * class:
1629 * a GObjectClass
1631 // TODO
1632 // #define G_IS_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT))
1635 * Returns the class structure associated to a GObject instance.
1636 * object:
1637 * a GObject instance.
1639 // TODO
1640 // #define G_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))
1643 * Return the type id of an object.
1644 * object:
1645 * Object to return the type id for.
1646 * Returns:
1647 * Type id of object.
1649 // TODO
1650 // #define G_OBJECT_TYPE(object) (G_TYPE_FROM_INSTANCE (object))
1653 * Returns the name of an object's type.
1654 * object:
1655 * Object to return the type name for.
1656 * Returns:
1657 * Type name of object. The string is owned by the type system and
1658 * should not be freed.
1660 // TODO
1661 // #define G_OBJECT_TYPE_NAME(object) (g_type_name (G_OBJECT_TYPE (object)))
1664 * Return the type id of a class structure.
1665 * class:
1666 * a valid GObjectClass
1667 * Returns:
1668 * Type id of class.
1670 // TODO
1671 // #define G_OBJECT_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
1674 * Return the name of a class structure's type.
1675 * class:
1676 * a valid GObjectClass
1677 * Returns:
1678 * Type name of class. The string is owned by the type system and
1679 * should not be freed.
1681 // TODO
1682 // #define G_OBJECT_CLASS_NAME(class) (g_type_name (G_OBJECT_CLASS_TYPE (class)))
1685 * This macros should be used to emit a standard warning about unexpected
1686 * properties in set_property() and get_property() implementations.
1687 * object:
1688 * the GObject on which set_property() or get_property() was called
1689 * property_id:
1690 * the numeric id of the property
1691 * pspec:
1692 * the GParamSpec of the property
1693 * Signal Details
1694 * The "notify" signal
1695 * void user_function (GObject *gobject,
1696 * GParamSpec *arg1,
1697 * gpointer user_data) : Run first / No recursion / Has details / Action / No hooks
1698 * The notify signal is emitted on an object when one of its properties
1699 * has been changed. Note that getting this signal doesn't guarantee that the
1700 * value of the property has actually changed, it may also be emitted when
1701 * the setter for the property is called to reinstate the previous value.
1702 * pspec:
1703 * the GParamSpec of the property which changed
1704 * gobject:
1705 * the object which received the signal.
1706 * user_data:
1707 * user data set when the signal handler was connected.
1708 * See Also
1709 * GParamSpecObject, g_param_spec_object()
1711 // TODO
1712 // #define G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec)
1715 * Returns the type identifier from a given GEnumClass structure.
1716 * class:
1717 * a GEnumClass
1719 // TODO
1720 // #define G_ENUM_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
1723 * Returns the static type name from a given GEnumClass structure.
1724 * class:
1725 * a GEnumClass
1727 // TODO
1728 // #define G_ENUM_CLASS_TYPE_NAME(class) (g_type_name (G_ENUM_CLASS_TYPE (class)))
1731 * Returns whether type "is a" G_TYPE_ENUM.
1732 * type:
1733 * a GType ID.
1735 // TODO
1736 // #define G_TYPE_IS_ENUM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_ENUM)
1739 * Casts a derived GEnumClass structure into a GEnumClass structure.
1740 * class:
1741 * a valid GEnumClass
1743 // TODO
1744 // #define G_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_ENUM, GEnumClass))
1747 * Checks whether class "is a" valid GEnumClass structure of type G_TYPE_ENUM
1748 * or derived.
1749 * class:
1750 * a GEnumClass
1752 // TODO
1753 // #define G_IS_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_ENUM))
1756 * Returns whether type "is a" G_TYPE_FLAGS.
1757 * type:
1758 * a GType ID.
1760 // TODO
1761 // #define G_TYPE_IS_FLAGS(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_FLAGS)
1764 * Casts a derived GFlagsClass structure into a GFlagsClass structure.
1765 * class:
1766 * a valid GFlagsClass
1768 // TODO
1769 // #define G_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_FLAGS, GFlagsClass))
1772 * Checks whether class "is a" valid GFlagsClass structure of type G_TYPE_FLAGS
1773 * or derived.
1774 * class:
1775 * a GFlagsClass
1777 // TODO
1778 // #define G_IS_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_FLAGS))
1781 * Returns the type identifier from a given GFlagsClass structure.
1782 * class:
1783 * a GFlagsClass
1785 // TODO
1786 // #define G_FLAGS_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
1789 * Returns the static type name from a given GFlagsClass structure.
1790 * class:
1791 * a GFlagsClass
1793 // TODO
1794 // #define G_FLAGS_CLASS_TYPE_NAME(class) (g_type_name (G_FLAGS_CLASS_TYPE (class)))
1797 * Returns TRUE if value holds (or contains) a value of type.
1798 * This macro will also check for value != NULL and issue a
1799 * warning if the check fails.
1800 * value:
1801 * A GValue structure.
1802 * type:
1803 * A GType value.
1805 // TODO
1806 // #define G_VALUE_HOLDS(value,type) (G_TYPE_CHECK_VALUE_TYPE ((value), (type)))
1809 * Returns the type identifier of value.
1810 * value:
1811 * A GValue structure.
1813 // TODO
1814 // #define G_VALUE_TYPE(value) (((GValue*) (value))->g_type)
1817 * Returns the type name of value.
1818 * value:
1819 * A GValue structure.
1821 // TODO
1822 // #define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value)))
1825 * Return whether the passed in type ID can be used for g_value_init().
1826 * That is, this macro checks whether this type provides an implementation
1827 * of the GTypeValueTable functions required for a type to create a GValue of.
1828 * type:
1829 * A GType value.
1830 * Returns:
1831 * Whether type is suitable as a GValue type.
1833 // TODO
1834 // #define G_TYPE_IS_VALUE(type) (g_type_check_is_value_type (type))
1837 * Returns TRUE if type is an abstract value type. An abstract value type
1838 * introduces a value table, but can't be used for g_value_init() and is normally
1839 * used as an abstract base type for derived value types.
1840 * type:
1841 * A GType value.
1843 // TODO
1844 // #define G_TYPE_IS_VALUE_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_VALUE_ABSTRACT))
1847 * Returns TRUE if value is a valid and initialized GValue structure.
1848 * value:
1849 * A GValue structure.
1851 // TODO
1852 // #define G_IS_VALUE(value) (G_TYPE_CHECK_VALUE (value))
1855 * Return whether the given GParamSpec is of type G_TYPE_PARAM_BOOLEAN.
1856 * pspec:
1857 * a valid GParamSpec instance
1859 // TODO
1860 // #define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
1863 * Cast a GParamSpec instance into a GParamSpecBoolean.
1864 * pspec:
1865 * a valid GParamSpec instance
1867 // TODO
1868 // #define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
1871 * Return whether the given GValue can hold values of type G_TYPE_BOOLEAN.
1872 * value:
1873 * a valid GValue structure
1875 // TODO
1876 // #define G_VALUE_HOLDS_BOOLEAN(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN))
1879 * Return whether the given GParamSpec is of type G_TYPE_PARAM_CHAR.
1880 * pspec:
1881 * a valid GParamSpec instance
1883 // TODO
1884 // #define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
1887 * Cast a GParamSpec instance into a GParamSpecChar.
1888 * pspec:
1889 * a valid GParamSpec instance
1891 // TODO
1892 // #define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
1895 * Return whether the given GValue can hold values of type G_TYPE_CHAR.
1896 * value:
1897 * a valid GValue structure
1899 // TODO
1900 // #define G_VALUE_HOLDS_CHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR))
1903 * Return whether the given GParamSpec is of type G_TYPE_PARAM_UCHAR.
1904 * pspec:
1905 * a valid GParamSpec instance
1907 // TODO
1908 // #define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
1911 * Cast a GParamSpec instance into a GParamSpecUChar.
1912 * pspec:
1913 * a valid GParamSpec instance
1915 // TODO
1916 // #define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
1919 * Return whether the given GValue can hold values of type G_TYPE_UCHAR.
1920 * value:
1921 * a valid GValue structure
1923 // TODO
1924 // #define G_VALUE_HOLDS_UCHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR))
1927 * Return whether the given GParamSpec is of type G_TYPE_PARAM_INT.
1928 * pspec:
1929 * a valid GParamSpec instance
1931 // TODO
1932 // #define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
1935 * Cast a GParamSpec instance into a GParamSpecInt.
1936 * pspec:
1937 * a valid GParamSpec instance
1939 // TODO
1940 // #define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
1943 * Return whether the given GValue can hold values of type G_TYPE_INT.
1944 * value:
1945 * a valid GValue structure
1947 // TODO
1948 // #define G_VALUE_HOLDS_INT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT))
1951 * Return whether the given GParamSpec is of type G_TYPE_PARAM_UINT.
1952 * pspec:
1953 * a valid GParamSpec instance
1955 // TODO
1956 // #define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
1959 * Cast a GParamSpec instance into a GParamSpecUInt.
1960 * pspec:
1961 * a valid GParamSpec instance
1963 // TODO
1964 // #define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
1967 * Return whether the given GValue can hold values of type G_TYPE_UINT.
1968 * value:
1969 * a valid GValue structure
1971 // TODO
1972 // #define G_VALUE_HOLDS_UINT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT))
1975 * Return whether the given GParamSpec is of type G_TYPE_PARAM_LONG.
1976 * pspec:
1977 * a valid GParamSpec instance
1979 // TODO
1980 // #define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
1983 * Cast a GParamSpec instance into a GParamSpecLong.
1984 * pspec:
1985 * a valid GParamSpec instance
1987 // TODO
1988 // #define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
1991 * Return whether the given GValue can hold values of type G_TYPE_LONG.
1992 * value:
1993 * a valid GValue structure
1995 // TODO
1996 // #define G_VALUE_HOLDS_LONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_LONG))
1999 * Return whether the given GParamSpec is of type G_TYPE_PARAM_ULONG.
2000 * pspec:
2001 * a valid GParamSpec instance
2003 // TODO
2004 // #define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
2007 * Cast a GParamSpec instance into a GParamSpecULong.
2008 * pspec:
2009 * a valid GParamSpec instance
2011 // TODO
2012 // #define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
2015 * Return whether the given GValue can hold values of type G_TYPE_ULONG.
2016 * value:
2017 * a valid GValue structure
2019 // TODO
2020 // #define G_VALUE_HOLDS_ULONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ULONG))
2023 * Return whether the given GParamSpec is of type G_TYPE_PARAM_INT64.
2024 * pspec:
2025 * a valid GParamSpec instance
2027 // TODO
2028 // #define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
2031 * Cast a GParamSpec instance into a GParamSpecInt64.
2032 * pspec:
2033 * a valid GParamSpec instance
2035 // TODO
2036 // #define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
2039 * Return whether the given GValue can hold values of type G_TYPE_INT64.
2040 * value:
2041 * a valid GValue structure
2043 // TODO
2044 // #define G_VALUE_HOLDS_INT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT64))
2047 * Return whether the given GParamSpec is of type G_TYPE_PARAM_UINT64.
2048 * pspec:
2049 * a valid GParamSpec instance
2051 // TODO
2052 // #define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
2055 * Cast a GParamSpec instance into a GParamSpecUInt64.
2056 * pspec:
2057 * a valid GParamSpec instance
2059 // TODO
2060 // #define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
2063 * Return whether the given GValue can hold values of type G_TYPE_UINT64.
2064 * value:
2065 * a valid GValue structure
2067 // TODO
2068 // #define G_VALUE_HOLDS_UINT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT64))
2071 * Return whether the given GParamSpec is of type G_TYPE_PARAM_FLOAT.
2072 * pspec:
2073 * a valid GParamSpec instance
2075 // TODO
2076 // #define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
2079 * Cast a GParamSpec instance into a GParamSpecFloat.
2080 * pspec:
2081 * a valid GParamSpec instance
2083 // TODO
2084 // #define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
2087 * Return whether the given GValue can hold values of type G_TYPE_FLOAT.
2088 * value:
2089 * a valid GValue structure
2091 // TODO
2092 // #define G_VALUE_HOLDS_FLOAT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT))
2095 * Return whether the given GParamSpec is of type G_TYPE_PARAM_DOUBLE.
2096 * pspec:
2097 * a valid GParamSpec instance
2099 // TODO
2100 // #define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
2103 * Cast a GParamSpec instance into a GParamSpecDouble.
2104 * pspec:
2105 * a valid GParamSpec instance
2107 // TODO
2108 // #define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
2111 * Return whether the given GValue can hold values of type G_TYPE_DOUBLE.
2112 * value:
2113 * a valid GValue structure
2115 // TODO
2116 // #define G_VALUE_HOLDS_DOUBLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_DOUBLE))
2119 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_ENUM.
2120 * pspec:
2121 * a valid GParamSpec instance
2123 // TODO
2124 // #define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
2127 * Cast a GParamSpec instance into a GParamSpecEnum.
2128 * pspec:
2129 * a valid GParamSpec instance
2131 // TODO
2132 // #define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
2135 * Return whether the given GValue can hold values derived from type G_TYPE_ENUM.
2136 * value:
2137 * a valid GValue structure
2139 // TODO
2140 // #define G_VALUE_HOLDS_ENUM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ENUM))
2143 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_FLAGS.
2144 * pspec:
2145 * a valid GParamSpec instance
2147 // TODO
2148 // #define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
2151 * Cast a GParamSpec instance into a GParamSpecFlags.
2152 * pspec:
2153 * a valid GParamSpec instance
2155 // TODO
2156 // #define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
2159 * Returns whether the given GValue can hold values derived from type G_TYPE_FLAGS.
2160 * value:
2161 * a valid GValue structure
2163 // TODO
2164 // #define G_VALUE_HOLDS_FLAGS(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLAGS))
2167 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_STRING.
2168 * pspec:
2169 * a valid GParamSpec instance
2171 // TODO
2172 // #define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
2175 * Casts a GParamSpec instance into a GParamSpecString.
2176 * pspec:
2177 * a valid GParamSpec instance
2179 // TODO
2180 // #define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
2183 * Return whether the given GValue can hold values of type G_TYPE_STRING.
2184 * value:
2185 * a valid GValue structure
2187 // TODO
2188 // #define G_VALUE_HOLDS_STRING(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_STRING))
2191 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_PARAM.
2192 * pspec:
2193 * a valid GParamSpec instance
2195 // TODO
2196 // #define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
2199 * Casts a GParamSpec instance into a GParamSpecParam.
2200 * pspec:
2201 * a valid GParamSpec instance
2203 // TODO
2204 // #define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
2207 * Return whether the given GValue can hold values derived from type G_TYPE_PARAM.
2208 * value:
2209 * a valid GValue structure
2211 // TODO
2212 // #define G_VALUE_HOLDS_PARAM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))
2215 * Return whether the given GParamSpec is of type G_TYPE_PARAM_BOXED.
2216 * pspec:
2217 * a valid GParamSpec instance
2219 // TODO
2220 // #define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
2223 * Cast a GParamSpec instance into a GParamSpecBoxed.
2224 * pspec:
2225 * a valid GParamSpec instance
2227 // TODO
2228 // #define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
2231 * Return whether the given GValue can hold values derived from type G_TYPE_BOXED.
2232 * value:
2233 * a valid GValue structure
2235 // TODO
2236 // #define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED))
2239 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_POINTER.
2240 * pspec:
2241 * a valid GParamSpec instance
2243 // TODO
2244 // #define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
2247 * Casts a GParamSpec instance into a GParamSpecPointer.
2248 * pspec:
2249 * a valid GParamSpec instance
2251 // TODO
2252 // #define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
2255 * Return whether the given GValue can hold values of type G_TYPE_POINTER.
2256 * value:
2257 * a valid GValue structure
2259 // TODO
2260 // #define G_VALUE_HOLDS_POINTER(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_POINTER))
2263 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_OBJECT.
2264 * pspec:
2265 * a valid GParamSpec instance
2267 // TODO
2268 // #define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
2271 * Casts a GParamSpec instance into a GParamSpecObject.
2272 * pspec:
2273 * a valid GParamSpec instance
2275 // TODO
2276 // #define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
2279 * Return whether the given GValue can hold values derived from type G_TYPE_OBJECT.
2280 * value:
2281 * a valid GValue structure
2283 // TODO
2284 // #define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT))
2287 * Return whether the given GParamSpec is of type G_TYPE_PARAM_UNICHAR.
2288 * pspec:
2289 * a valid GParamSpec instance
2291 // TODO
2292 // #define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
2295 * Cast a GParamSpec instance into a GParamSpecUnichar.
2296 * pspec:
2297 * a valid GParamSpec instance
2299 // TODO
2300 // #define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
2303 * Return whether the given GParamSpec is of type G_TYPE_PARAM_VALUE_ARRAY.
2304 * pspec:
2305 * a valid GParamSpec instance
2307 // TODO
2308 // #define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
2311 * Cast a GParamSpec instance into a GParamSpecValueArray.
2312 * pspec:
2313 * a valid GParamSpec instance
2315 // TODO
2316 // #define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
2319 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_OVERRIDE.
2320 * pspec:
2321 * a GParamSpec
2322 * Since 2.4
2324 // TODO
2325 // #define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
2328 * Casts a GParamSpec into a GParamSpecOverride.
2329 * pspec:
2330 * a GParamSpec
2331 * Since 2.4
2333 // TODO
2334 // #define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
2337 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_GTYPE.
2338 * pspec:
2339 * a GParamSpec
2340 * Since 2.10
2342 // TODO
2343 // #define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
2346 * Casts a GParamSpec into a GParamSpecGType.
2347 * pspec:
2348 * a GParamSpec
2349 * Since 2.10
2351 // TODO
2352 // #define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
2355 * Returns whether the given GValue can hold values of type G_TYPE_GTYPE.
2356 * value:
2357 * a valid GValue structure
2358 * Since 2.12
2360 // TODO
2361 // #define G_VALUE_HOLDS_GTYPE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE))
2364 * Returns whether type "is a" G_TYPE_PARAM.
2365 * type:
2366 * a GType ID
2368 // TODO
2369 // #define G_TYPE_IS_PARAM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
2372 * Casts a derived GParamSpec object (e.g. of type GParamSpecInt) into
2373 * a GParamSpec object.
2374 * pspec:
2375 * a valid GParamSpec
2377 // TODO
2378 // #define G_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
2381 * Checks whether pspec "is a" valid GParamSpec structure of type G_TYPE_PARAM
2382 * or derived.
2383 * pspec:
2384 * a GParamSpec
2386 // TODO
2387 // #define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM))
2390 * Casts a derived GParamSpecClass structure into a GParamSpecClass structure.
2391 * pclass:
2392 * a valid GParamSpecClass
2394 // TODO
2395 // #define G_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
2398 * Checks whether pclass "is a" valid GParamSpecClass structure of type
2399 * G_TYPE_PARAM or derived.
2400 * pclass:
2401 * a GParamSpecClass
2403 // TODO
2404 // #define G_IS_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
2407 * Retrieves the GParamSpecClass of a GParamSpec.
2408 * pspec:
2409 * a valid GParamSpec
2411 // TODO
2412 // #define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
2415 * Retrieves the GType of this pspec.
2416 * pspec:
2417 * a valid GParamSpec
2419 // TODO
2420 // #define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec))
2423 * Retrieves the GType name of this pspec.
2424 * pspec:
2425 * a valid GParamSpec
2427 // TODO
2428 // #define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
2431 * Retrieves the GType to initialize a GValue for this parameter.
2432 * pspec:
2433 * a valid GParamSpec
2435 // TODO
2436 // #define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type)
2439 * Connects a GCallback function to a signal for a particular object.
2440 * The handler will be called before the default handler of the signal.
2441 * instance:
2442 * the instance to connect to.
2443 * detailed_signal:
2444 * a string of the form "signal-name::detail".
2445 * c_handler:
2446 * the GCallback to connect.
2447 * data:
2448 * data to pass to c_handler calls.
2449 * Returns:
2450 * the handler id
2452 // TODO
2453 // #define g_signal_connect(instance, detailed_signal, c_handler, data)
2456 * Connects a GCallback function to a signal for a particular object.
2457 * The handler will be called after the default handler of the signal.
2458 * instance:
2459 * the instance to connect to.
2460 * detailed_signal:
2461 * a string of the form "signal-name::detail".
2462 * c_handler:
2463 * the GCallback to connect.
2464 * data:
2465 * data to pass to c_handler calls.
2466 * Returns:
2467 * the handler id
2469 // TODO
2470 // #define g_signal_connect_after(instance, detailed_signal, c_handler, data)
2473 * Connects a GCallback function to a signal for a particular object.
2474 * The instance on which the signal is emitted and data will be swapped when
2475 * calling the handler.
2476 * instance:
2477 * the instance to connect to.
2478 * detailed_signal:
2479 * a string of the form "signal-name::detail".
2480 * c_handler:
2481 * the GCallback to connect.
2482 * data:
2483 * data to pass to c_handler calls.
2484 * Returns:
2485 * the handler id
2487 // TODO
2488 // #define g_signal_connect_swapped(instance, detailed_signal, c_handler, data)
2491 * Blocks all handlers on an instance that match func and data.
2492 * instance:
2493 * The instance to block handlers from.
2494 * func:
2495 * The C closure callback of the handlers (useless for non-C closures).
2496 * data:
2497 * The closure data of the handlers' closures.
2498 * Returns:
2499 * The number of handlers that got blocked.
2501 // TODO
2502 // #define g_signal_handlers_block_by_func(instance, func, data)
2505 * Unblocks all handlers on an instance that match func and data.
2506 * instance:
2507 * The instance to unblock handlers from.
2508 * func:
2509 * The C closure callback of the handlers (useless for non-C closures).
2510 * data:
2511 * The closure data of the handlers' closures.
2512 * Returns:
2513 * The number of handlers that got unblocked.
2515 // TODO
2516 // #define g_signal_handlers_unblock_by_func(instance, func, data)
2519 * Disconnects all handlers on an instance that match func and data.
2520 * instance:
2521 * The instance to remove handlers from.
2522 * func:
2523 * The C closure callback of the handlers (useless for non-C closures).
2524 * data:
2525 * The closure data of the handlers' closures.
2526 * Returns:
2527 * The number of handlers that got disconnected.
2529 // TODO
2530 // #define g_signal_handlers_disconnect_by_func(instance, func, data)
2533 * Returns TRUE if a GClosureMarshal marshaller has not yet been set on
2534 * closure. See g_closure_set_marshal().
2535 * closure:
2536 * a GClosure
2538 // TODO
2539 // #define G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL)
2542 * Returns the total number of notifiers connected with the closure cl.
2543 * The count includes the meta marshaller, the finalize and invalidate notifiers
2544 * and the marshal guards. Note that each guard counts as two notifiers.
2545 * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
2546 * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
2547 * cl:
2548 * a GClosure
2550 // TODO
2551 // #define G_CLOSURE_N_NOTIFIERS(cl)
2554 * Returns whether the user data of the GCClosure should be passed as the
2555 * first parameter to the callback. See g_cclosure_new_swap().
2556 * cclosure:
2557 * a GCClosure
2559 // TODO
2560 // #define G_CCLOSURE_SWAP_DATA(cclosure) (((GClosure*) (closure))->derivative_flag)
2563 * Cast a function pointer to a GCallback.
2564 * f:
2565 * a function pointer.
2567 // TODO
2568 // #define G_CALLBACK(f) ((GCallback) (f))
2571 * A callback function used by the type system to do base initialization
2572 * of the class structures of derived types. It is called as part of the
2573 * initialization process of all derived classes and should reallocate
2574 * or reset all dynamic class members copied over from the parent class.
2575 * For example, class members (such as strings) that are not sufficiently
2576 * handled by a plain memory copy of the parent class into the derived class
2577 * have to be altered. See GClassInitFunc() for a discussion of the class
2578 * intialization process.
2579 * g_class:
2580 * The GTypeClass structure to initialize.
2582 // void (*GBaseInitFunc) (gpointer g_class);
2583 public typedef extern(C) void function (void*) GBaseInitFunc;
2586 * A callback function used by the type system to finalize those portions
2587 * of a derived types class structure that were setup from the corresponding
2588 * GBaseInitFunc() function. Class finalization basically works the inverse
2589 * way in which class intialization is performed.
2590 * See GClassInitFunc() for a discussion of the class intialization process.
2591 * g_class:
2592 * The GTypeClass structure to finalize.
2594 // void (*GBaseFinalizeFunc) (gpointer g_class);
2595 public typedef extern(C) void function (void*) GBaseFinalizeFunc;
2598 * A callback function used by the type system to initialize the class
2599 * of a specific type. This function should initialize all static class
2600 * members.
2601 * The initialization process of a class involves:
2602 * 1 - Copying common members from the parent class over to the
2603 * derived class structure.
2604 * 2 - Zero initialization of the remaining members not copied
2605 * over from the parent class.
2606 * 3 - Invocation of the GBaseInitFunc() initializers of all parent
2607 * types and the class' type.
2608 * 4 - Invocation of the class' GClassInitFunc() initializer.
2609 * Since derived classes are partially initialized through a memory copy
2610 * of the parent class, the general rule is that GBaseInitFunc() and
2611 * GBaseFinalizeFunc() should take care of necessary reinitialization
2612 * and release of those class members that were introduced by the type
2613 * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
2614 * GClassInitFunc() should only care about initializing static
2615 * class members, while dynamic class members (such as allocated strings
2616 * or reference counted resources) are better handled by a GBaseInitFunc()
2617 * for this type, so proper initialization of the dynamic class members
2618 * is performed for class initialization of derived types as well.
2619 * An example may help to correspond the intend of the different class
2620 * initializers:
2621 * typedef struct {
2622 * GObjectClass parent_class;
2623 * gint static_integer;
2624 * gchar *dynamic_string;
2625 * } TypeAClass;
2626 * static void
2627 * type_a_base_class_init (TypeAClass *class)
2629 * class->dynamic_string = g_strdup ("some string");
2631 * static void
2632 * type_a_base_class_finalize (TypeAClass *class)
2634 * g_free (class->dynamic_string);
2636 * static void
2637 * type_a_class_init (TypeAClass *class)
2639 * class->static_integer = 42;
2641 * typedef struct {
2642 * TypeAClass parent_class;
2643 * gfloat static_float;
2644 * GString *dynamic_gstring;
2645 * } TypeBClass;
2646 * static void
2647 * type_b_base_class_init (TypeBClass *class)
2649 * class->dynamic_gstring = g_string_new ("some other string");
2651 * static void
2652 * type_b_base_class_finalize (TypeBClass *class)
2654 * g_string_free (class->dynamic_gstring);
2656 * static void
2657 * type_b_class_init (TypeBClass *class)
2659 * class->static_float = 3.14159265358979323846;
2661 * Initialization of TypeBClass will first cause initialization of
2662 * TypeAClass (derived classes reference their parent classes, see
2663 * g_type_class_ref() on this).
2664 * Initialization of TypeAClass roughly involves zero-initializing its fields,
2665 * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
2666 * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
2667 * type_a_class_init() to initialize its static members (static_integer).
2668 * The first step in the initialization process of TypeBClass is then
2669 * a plain memory copy of the contents of TypeAClass into TypeBClass and
2670 * zero-initialization of the remaining fields in TypeBClass.
2671 * The dynamic members of TypeAClass within TypeBClass now need
2672 * reinitialization which is performed by calling type_a_base_class_init()
2673 * with an argument of TypeBClass.
2674 * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
2675 * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
2676 * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
2677 * is called to complete the initialization process with the static members
2678 * (static_float).
2679 * Corresponding finalization counter parts to the GBaseInitFunc() functions
2680 * have to be provided to release allocated resources at class finalization
2681 * time.
2682 * g_class:
2683 * The GTypeClass structure to initialize.
2684 * class_data:
2685 * The class_data member supplied via the GTypeInfo structure.
2687 // void (*GClassInitFunc) (gpointer g_class, gpointer class_data);
2688 public typedef extern(C) void function (void*, void*) GClassInitFunc;
2691 * A callback function used by the type system to finalize a class.
2692 * This function is rarely needed, as dynamically allocated class resources
2693 * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
2694 * Also, specification of a GClassFinalizeFunc() in the GTypeInfo
2695 * structure of a static type is invalid, because classes of static types
2696 * will never be finalized (they are artificially kept alive when their
2697 * reference count drops to zero).
2698 * g_class:
2699 * The GTypeClass structure to finalize.
2700 * class_data:
2701 * The class_data member supplied via the GTypeInfo structure.
2703 // void (*GClassFinalizeFunc) (gpointer g_class, gpointer class_data);
2704 public typedef extern(C) void function (void*, void*) GClassFinalizeFunc;
2707 * A callback function used by the type system to initialize a new
2708 * instance of a type. This function initializes all instance members and
2709 * allocates any resources required by it.
2710 * Initialization of a derived instance involves calling all its parent
2711 * types instance initializers, so the class member of the instance
2712 * is altered during its initialization to always point to the class that
2713 * belongs to the type the current initializer was introduced for.
2714 * instance:
2715 * The instance to initialize.
2716 * g_class:
2717 * The class of the type the instance is created for.
2719 // void (*GInstanceInitFunc) (GTypeInstance *instance, gpointer g_class);
2720 public typedef extern(C) void function (GTypeInstance*, void*) GInstanceInitFunc;
2723 * A callback function used by the type system to initialize a new
2724 * interface. This function should initialize all internal data and
2725 * allocate any resources required by the interface.
2726 * g_iface:
2727 * The interface structure to initialize.
2728 * iface_data:
2729 * The class_data supplied via the GTypeInfo structure.
2731 // void (*GInterfaceInitFunc) (gpointer g_iface, gpointer iface_data);
2732 public typedef extern(C) void function (void*, void*) GInterfaceInitFunc;
2735 * A callback function used by the type system to finalize an interface.
2736 * This function should destroy any internal data and release any resources
2737 * allocated by the corresponding GInterfaceInitFunc() function.
2738 * g_iface:
2739 * The interface structure to finalize.
2740 * iface_data:
2741 * The class_data supplied via the GTypeInfo structure.
2743 // void (*GInterfaceFinalizeFunc) (gpointer g_iface, gpointer iface_data);
2744 public typedef extern(C) void function (void*, void*) GInterfaceFinalizeFunc;
2747 * A callback function which is called when the reference count of a class
2748 * drops to zero. It may use g_type_class_ref() to prevent the class from
2749 * being freed. You should not call g_type_class_unref() from a
2750 * GTypeClassCacheFunc function to prevent infinite recursion, use
2751 * g_type_class_unref_uncached() instead.
2752 * The functions have to check the class id passed in to figure
2753 * whether they actually want to cache the class of this type, since all
2754 * classes are routed through the same GTypeClassCacheFunc chain.
2755 * cache_data:
2756 * data that was given to the g_type_add_class_cache_func() call
2757 * g_class:
2758 * The GTypeClass structure which is unreferenced
2759 * Returns:
2760 * TRUE to stop further GTypeClassCacheFuncs from being
2761 * called, FALSE to continue.
2763 // gboolean (*GTypeClassCacheFunc) (gpointer cache_data, GTypeClass *g_class);
2764 public typedef extern(C) int function (void*, GTypeClass*) GTypeClassCacheFunc;
2767 * A callback called after an interface vtable is initialized.
2768 * See g_type_add_interface_check().
2769 * check_data:
2770 * data passed to g_type_add_interface_check().
2771 * g_iface:
2772 * the interface that has been initialized
2773 * Since 2.4
2775 // void (*GTypeInterfaceCheckFunc) (gpointer check_data, gpointer g_iface);
2776 public typedef extern(C) void function (void*, void*) GTypeInterfaceCheckFunc;
2779 * The type of the use_plugin function of GTypePluginClass, which gets called
2780 * to increase the use count of plugin.
2781 * plugin:
2782 * the GTypePlugin whose use count should be increased
2784 // void (*GTypePluginUse) (GTypePlugin *plugin);
2785 public typedef extern(C) void function (GTypePlugin*) GTypePluginUse;
2788 * The type of the unuse_plugin function of GTypePluginClass.
2789 * plugin:
2790 * the GTypePlugin whose use count should be decreased
2792 // void (*GTypePluginUnuse) (GTypePlugin *plugin);
2793 public typedef extern(C) void function (GTypePlugin*) GTypePluginUnuse;
2796 * The type of the complete_type_info function of GTypePluginClass.
2797 * plugin:
2798 * the GTypePlugin
2799 * g_type:
2800 * the GType whose info is completed
2801 * info:
2802 * the GTypeInfo struct to fill in
2803 * value_table:
2804 * the GTypeValueTable to fill in
2806 // void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin, GType g_type, GTypeInfo *info, GTypeValueTable *value_table);
2807 public typedef extern(C) void function (GTypePlugin*, GType, GTypeInfo*, GTypeValueTable*) GTypePluginCompleteTypeInfo;
2810 * The type of the complete_interface_info function of GTypePluginClass.
2811 * plugin:
2812 * the GTypePlugin
2813 * instance_type:
2814 * the GType of an instantiable type to which the interface
2815 * is added
2816 * interface_type:
2817 * the GType of the interface whose info is completed
2818 * info:
2819 * the GInterfaceInfo to fill in
2821 // void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin, GType instance_type, GType interface_type, GInterfaceInfo *info);
2822 public typedef extern(C) void function (GTypePlugin*, GType, GType, GInterfaceInfo*) GTypePluginCompleteInterfaceInfo;
2825 * The type of the get_property function of GObjectClass.
2826 * object:
2827 * a GObject
2828 * property_id:
2829 * the numeric id under which the property was registered with
2830 * g_object_class_install_property().
2831 * value:
2832 * a GValue to return the property value in
2833 * pspec:
2834 * the GParamSpec describing the property
2836 // void (*GObjectGetPropertyFunc) (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
2837 public typedef extern(C) void function (GObject*, uint, GValue*, GParamSpec*) GObjectGetPropertyFunc;
2840 * The type of the set_property function of GObjectClass.
2841 * object:
2842 * a GObject
2843 * property_id:
2844 * the numeric id under which the property was registered with
2845 * g_object_class_install_property().
2846 * value:
2847 * the new value for the property
2848 * pspec:
2849 * the GParamSpec describing the property
2851 // void (*GObjectSetPropertyFunc) (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
2852 public typedef extern(C) void function (GObject*, uint, GValue*, GParamSpec*) GObjectSetPropertyFunc;
2855 * The type of the finalize function of GObjectClass.
2856 * object:
2857 * the GObject being finalized
2859 // void (*GObjectFinalizeFunc) (GObject *object);
2860 public typedef extern(C) void function (GObject*) GObjectFinalizeFunc;
2863 * A GWeakNotify function can be added to an object as a callback that gets
2864 * triggered when the object is finalized. Since the object is already being
2865 * finalized when the GWeakNotify is called, there's not much you could do
2866 * with the object, apart from e.g. using its adress as hash-index or the like.
2867 * data:
2868 * data that was provided when the weak reference was established
2869 * where_the_object_was:
2870 * the object being finalized
2872 // void (*GWeakNotify) (gpointer data, GObject *where_the_object_was);
2873 public typedef extern(C) void function (void*, GObject*) GWeakNotify;
2876 * A callback function used for notification when the state
2877 * of a toggle reference changes. See g_object_add_toggle_ref().
2878 * data:
2879 * Callback data passed to g_object_add_toggle_ref()
2880 * object:
2881 * The object on which g_object_add_toggle_ref() was called.
2882 * is_last_ref:
2883 * TRUE if the toggle reference is now the
2884 * last reference to the object. FALSE if the toggle
2885 * reference was the last reference and there are now other
2886 * references.
2888 // void (*GToggleNotify) (gpointer data, GObject *object, gboolean is_last_ref);
2889 public typedef extern(C) void function (void*, GObject*, int) GToggleNotify;
2892 * This function is provided by the user and should produce a copy of the passed
2893 * in boxed structure.
2894 * boxed:
2895 * The boxed structure to be copied.
2896 * Returns:
2897 * The newly created copy of the boxed structure.
2899 // gpointer (*GBoxedCopyFunc) (gpointer boxed);
2900 public typedef extern(C) void* function (void*) GBoxedCopyFunc;
2903 * This function is provided by the user and should free the boxed
2904 * structure passed.
2905 * boxed:
2906 * The boxed structure to be freed.
2908 // void (*GBoxedFreeFunc) (gpointer boxed);
2909 public typedef extern(C) void function (void*) GBoxedFreeFunc;
2912 * The type of value transformation functions which can be registered with
2913 * g_value_register_transform_func().
2914 * src_value:
2915 * Source value.
2916 * dest_value:
2917 * Target value.
2919 // void (*GValueTransform) (const GValue *src_value, GValue *dest_value);
2920 public typedef extern(C) void function (GValue*, GValue*) GValueTransform;
2923 * The signal accumulator is a special callback function that can be used
2924 * to collect return values of the various callbacks that are called
2925 * during a signal emission. The signal accumulator is specified at signal
2926 * creation time, if it is left NULL, no accumulation of callback return
2927 * values is performed. The return value of signal emissions is then the
2928 * value returned by the last callback.
2929 * ihint:
2930 * Signal invocation hint, see GSignalInvocationHint.
2931 * return_accu:
2932 * Accumulator to collect callback return values in, this
2933 * is the return value of the current signal emission.
2934 * handler_return:
2935 * A GValue holding the return value of the signal handler.
2936 * data:
2937 * Callback data that was specified when creating the signal.
2938 * Returns:
2939 * The accumulator function returns whether the signal emission
2940 * should be aborted. Returning FALSE means to abort the
2941 * current emission and TRUE is returned for continuation.
2943 // gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint, GValue *return_accu, const GValue *handler_return, gpointer data);
2944 public typedef extern(C) int function (GSignalInvocationHint*, GValue*, GValue*, void*) GSignalAccumulator;
2947 * A simple function pointer to get invoked when the signal is emitted. This
2948 * allows you to tie a hook to the signal type, so that it will trap all
2949 * emissions of that signal, from any object.
2950 * You may not attach these to signals created with the G_SIGNAL_NO_HOOKS flag.
2951 * ihint:
2952 * Signal invocation hint, see GSignalInvocationHint.
2953 * n_param_values:
2954 * the number of parameters to the function, including
2955 * the instance on which the signal was emitted.
2956 * param_values:
2957 * the instance on which the signal was emitted, followed by the
2958 * parameters of the emission.
2959 * data:
2960 * user data associated with the hook.
2961 * Returns:
2962 * whether it wants to stay connected. If it returns FALSE, the signal
2963 * hook is disconnected (and destroyed).
2965 // gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, gpointer data);
2966 public typedef extern(C) int function (GSignalInvocationHint*, uint, GValue*, void*) GSignalEmissionHook;
2969 * The type used for callback functions in structure definitions and function
2970 * signatures. This doesn't mean that all callback functions must take no
2971 * parameters and return void. The required signature of a callback function
2972 * is determined by the context in which is used (e.g. the signal to which it
2973 * is connected). Use G_CALLBACK() to cast the callback function to a GCallback.
2975 // void (*GCallback) (void);
2976 public typedef extern(C) void function () GCallback;
2979 * The type used for marshaller functions.
2980 * closure:
2981 * the GClosure to which the marshaller belongs
2982 * return_value:
2983 * a GValue to store the return value. May be NULL if the
2984 * callback of closure doesn't return a value.
2985 * n_param_values:
2986 * the length of the param_values array
2987 * param_values:
2988 * an array of GValues holding the arguments on
2989 * which to invoke the callback of closure
2990 * invocation_hint:
2991 * the invocation hint given as the the last argument
2992 * to g_closure_invoke()
2993 * marshal_data:
2994 * additional data specified when registering the marshaller,
2995 * see g_closure_set_marshal() and g_closure_set_meta_marshal()
2997 // void (*GClosureMarshal) (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data);
2998 public typedef extern(C) void function (GClosure*, GValue*, uint, GValue*, void*, void*) GClosureMarshal;
3001 * The type used for the various notification callbacks which can be registered
3002 * on closures.
3003 * data:
3004 * data specified when registering the notification callback
3005 * closure:
3006 * the GClosure on which the notification is emitted
3008 // void (*GClosureNotify) (gpointer data, GClosure *closure);
3009 public typedef extern(C) void function (void*, GClosure*) GClosureNotify;