2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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 gtkc
.gobjecttypes
;
26 public import gtkc
.glibtypes
;
59 * typedef gchar** GStrv;
60 * A C representable type name for G_TYPE_STRV.
62 * GParamSpecBoxed, g_param_spec_boxed()
64 public alias char** GStrv
;
67 * typedef gchar* gchararray;
68 * A C representable type name for G_TYPE_STRING.
70 public alias char* gchararray
;
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
80 public alias GClosureMarshal GSignalCMarshaller
;
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".
89 * G_TYPE_DEBUG_OBJECTS
90 * Print messages about object bookkeeping.
91 * G_TYPE_DEBUG_SIGNALS
92 * Print messages about signal emissions.
94 * Mask covering all debug flags.
96 public enum GTypeDebugFlags
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
112 VALUE_ABSTRACT
= (1 << 5)
114 alias GTypeFlags TypeFlags
;
117 * Bit masks used to check or determine specific characteristics of a
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
135 public enum GParamFlags
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.
155 public enum GSignalFlags
159 RUN_CLEANUP
= 1 << 2,
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()
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
193 alias GSignalMatchType SignalMatchType
;
196 * The connection flags are used to specify the behaviour of a signal's
199 * whether the handler should be called before or after the
201 public enum GConnectFlags
206 alias GConnectFlags ConnectFlags
;
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
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().
259 public struct GTypeInfo
{}
260 // /+* interface types, classed types, instantiated types +/
261 // gobject-Type-Information.html
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
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.
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.
364 * the GType value of the type.
365 * constgchar*type_name;
366 * the name of the type.
368 * the size of the class structure.
369 * guintinstance_size;
370 * the size of the instance structure.
372 public struct GTypeQuery
{}
374 // gobject-Type-Information.html
376 // gobject-Type-Information.html
378 // gobject-Type-Information.html
379 // uint instanceSize;
380 // gobject-Type-Information.html
385 * The GTypePlugin typedef is used as a placeholder
386 * for objects that implement the GTypePlugin
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;
405 // GTypePluginUnuse unusePlugin;
407 // GTypePluginCompleteTypeInfo completeTypeInfo;
409 // GTypePluginCompleteInterfaceInfo completeInterfaceInfo;
415 * The members of the GTypeModule structure should not
416 * be accessed directly, except for the name field.
418 * the name of the module
420 public struct GTypeModule
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;
432 * loads the module and registers one or more types using
434 public struct GTypeModuleClass
{}
435 // GObjectClass parentClass;
437 // int (* load) (GTypeModule *modul);
439 // void (* unload) (GTypeModule *modul);
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;
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
472 // gobject-The-Base-Object-Type.html
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
480 // gobject-The-Base-Object-Type.html
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
494 // gobject-The-Base-Object-Type.html
495 // GParamSpec **pspecs);
496 // gobject-The-Base-Object-Type.html
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
510 * the GParamSpec of the construct parameter
512 * the value to set the parameter to
514 public struct GObjectConstructParam
{}
515 // GParamSpec *pspec;
516 // gobject-The-Base-Object-Type.html
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().
527 * the parameter value
529 public struct GParameter
{}
531 // gobject-The-Base-Object-Type.html
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
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
553 * GTypeClassg_type_class;
556 * the smallest possible value.
558 * the largest possible value.
560 * the number of possible values.
562 * an array of GEnumValue structs describing the
565 public struct GEnumClass
{}
566 // GTypeClass gTypeClass;
567 // gobject-Enumeration-and-Flag-Types.html
569 // gobject-Enumeration-and-Flag-Types.html
571 // gobject-Enumeration-and-Flag-Types.html
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
581 * GTypeClassg_type_class;
584 * a mask covering all possible values.
586 * the number of possible values.
587 * GFlagsValue*values;
588 * an array of GFlagsValue structs describing the
591 public struct GFlagsClass
{}
592 // GTypeClass gTypeClass;
593 // gobject-Enumeration-and-Flag-Types.html
595 // gobject-Enumeration-and-Flag-Types.html
597 // gobject-Enumeration-and-Flag-Types.html
598 // GFlagsValue *values;
599 // gobject-Enumeration-and-Flag-Types.html
604 * A structure which contains a single enum value, it's name, and it's
608 * constgchar*value_name;
609 * the name of the value
610 * constgchar*value_nick;
611 * the nickname of the value
613 public struct GEnumValue
622 * A structure which contains a single flags value, it's name, and it's
626 * constgchar*value_name;
627 * the name of the value
628 * constgchar*value_nick;
629 * the nickname of the value
631 public struct GFlagsValue
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
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
658 public struct GParamSpecChar
{}
659 // GParamSpec parentInstance;
660 // gobject-Standard-Parameter-and-Value-Types.html
662 // gobject-Standard-Parameter-and-Value-Types.html
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
675 public struct GParamSpecUChar
{}
676 // GParamSpec parentInstance;
677 // gobject-Standard-Parameter-and-Value-Types.html
679 // gobject-Standard-Parameter-and-Value-Types.html
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
692 public struct GParamSpecInt
{}
693 // GParamSpec parentInstance;
694 // gobject-Standard-Parameter-and-Value-Types.html
696 // gobject-Standard-Parameter-and-Value-Types.html
698 // gobject-Standard-Parameter-and-Value-Types.html
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
709 public struct GParamSpecUInt
{}
710 // GParamSpec parentInstance;
711 // gobject-Standard-Parameter-and-Value-Types.html
713 // gobject-Standard-Parameter-and-Value-Types.html
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
726 public struct GParamSpecLong
{}
727 // GParamSpec parentInstance;
728 // gobject-Standard-Parameter-and-Value-Types.html
730 // gobject-Standard-Parameter-and-Value-Types.html
732 // gobject-Standard-Parameter-and-Value-Types.html
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
743 public struct GParamSpecULong
{}
744 // GParamSpec parentInstance;
745 // gobject-Standard-Parameter-and-Value-Types.html
747 // gobject-Standard-Parameter-and-Value-Types.html
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
760 public struct GParamSpecInt64
{}
761 // GParamSpec parentInstance;
762 // gobject-Standard-Parameter-and-Value-Types.html
764 // gobject-Standard-Parameter-and-Value-Types.html
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
777 public struct GParamSpecUInt64
{}
778 // GParamSpec parentInstance;
779 // gobject-Standard-Parameter-and-Value-Types.html
781 // gobject-Standard-Parameter-and-Value-Types.html
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
794 public struct GParamSpecFloat
{}
795 // GParamSpec parentInstance;
796 // gobject-Standard-Parameter-and-Value-Types.html
798 // gobject-Standard-Parameter-and-Value-Types.html
800 // gobject-Standard-Parameter-and-Value-Types.html
801 // float defaultValue;
802 // gobject-Standard-Parameter-and-Value-Types.html
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
813 public struct GParamSpecDouble
{}
814 // GParamSpec parentInstance;
815 // gobject-Standard-Parameter-and-Value-Types.html
817 // gobject-Standard-Parameter-and-Value-Types.html
819 // gobject-Standard-Parameter-and-Value-Types.html
820 // double defaultValue;
821 // gobject-Standard-Parameter-and-Value-Types.html
823 // gobject-Standard-Parameter-and-Value-Types.html
827 * A GParamSpec derived structure that contains the meta data for enum
829 * GParamSpecparent_instance;
830 * private GParamSpec portion
831 * GEnumClass*enum_class;
832 * the GEnumClass for the enum
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
841 // gobject-Standard-Parameter-and-Value-Types.html
845 * A GParamSpec derived structure that contains the meta data for flags
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
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
875 // gobject-Standard-Parameter-and-Value-Types.html
877 // gobject-Standard-Parameter-and-Value-Types.html
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
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.
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
975 // gobject-Standard-Parameter-and-Value-Types.html
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
986 public struct GParamSpec
{}
987 // GTypeInstance gTypeInstance;
988 // gobject-GParamSpec.html
990 // gobject-GParamSpec.html
991 // GParamFlags flags;
992 // gobject-GParamSpec.html
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;
1006 * the GValue type for this parameter
1008 * The instance finalization function (optional), should chain
1010 public struct GParamSpecClass
{}
1011 // GTypeClass gTypeClass;
1012 // gobject-GParamSpec.html
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
1022 // gobject-GParamSpec.html
1023 // int (*valueValidate) (GParamSpec *pspec,
1024 // gobject-GParamSpec.html
1026 // gobject-GParamSpec.html
1027 // int (*valuesCmp) (GParamSpec *pspec,
1028 // gobject-GParamSpec.html
1030 // gobject-GParamSpec.html
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.
1048 * Location of the instance initialization function (optional).
1050 * The GType of values conforming to this GParamSpec
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
1074 // gobject-GParamSpec.html
1075 // int (*valueValidate) (GParamSpec *pspec, /+* optional +/
1076 // gobject-GParamSpec.html
1078 // gobject-GParamSpec.html
1079 // int (*valuesCmp) (GParamSpec *pspec, /+* recommended +/
1080 // gobject-GParamSpec.html
1082 // gobject-GParamSpec.html
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
1093 public struct GParamSpecPool
{}
1097 * The GSignalInvocationHint structure is used to pass on additional information
1098 * to callbacks during a signal emission.
1101 public struct GSignalInvocationHint
{}
1103 // gobject-Signals.html
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.
1115 public struct GSignalQuery
{}
1117 // gobject-Signals.html
1118 // char *signalName;
1119 // gobject-Signals.html
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
1127 // gobject-Signals.html
1128 // GType *paramTypes; /+* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag +/
1129 // gobject-Signals.html
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
1141 //uint inMarshal : 1;
1146 * A GCClosure is a specialization of GClosure for C function callbacks.
1150 * the callback function
1152 public struct GCClosure
{}
1153 // GClosure closure;
1154 // gobject-Closures.html
1156 // gobject-Closures.html
1161 * A GValueArray contains an array of GValue elements.
1164 public struct GValueArray
{}
1166 // gobject-Value-arrays.html
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.
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
1186 * the fundamental type number.
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
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
1209 // #define G_TYPE_IS_DERIVED(type) ((type) > G_TYPE_FUNDAMENTAL_MAX)
1212 * Returns TRUE if type is a fundamental type.
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
1226 // #define G_TYPE_IS_VALUE_TYPE(type) (g_type_check_is_value_type (type))
1229 * Returns TRUE if type has a GTypeValueTable.
1234 // #define G_TYPE_HAS_VALUE_TABLE(type) (g_type_value_table_peek (type) != NULL)
1237 * Returns TRUE if type is a classed type.
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.
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.
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.
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).
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.
1289 * Location of a valid GTypeInstance structure.
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.
1298 * Location of a valid GTypeClass structure.
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.
1307 * Location of a valid GTypeInterface structure.
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.
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.
1321 * Location of the GTypeInstance structure.
1323 * The anchestor type of the class to be returned.
1325 * The corresponding C type of g_type.
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.
1334 * Location of the GTypeInstance structure.
1336 * The interface type to be returned.
1338 * The corresponding C type of g_type.
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.
1349 * the instance of a type deriving from private_type.
1351 * the type identifying which private data to retrieve.
1353 * The C type for the private structure.
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.
1364 * Location of a GTypeInstance structure.
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.
1375 * Location of a GTypeInstance structure.
1377 * The type to be returned.
1379 * The corresponding C type of g_type.
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.
1389 * Location of a GTypeInstance structure.
1391 * The type to be checked
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.
1402 * Location of a GTypeClass structure.
1404 * The type to be returned.
1406 * The corresponding C type of class structure of g_type.
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.
1416 * Location of a GTypeClass structure.
1418 * The type to be checked.
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
1426 * This macro should only be used in type implementations.
1431 // #define G_TYPE_CHECK_VALUE(value) (_G_TYPE_CHV ((value)))
1434 * Returns TRUE if value has been initialized to hold values
1436 * This macro should only be used in type implementations.
1440 * The type to be checked.
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.
1451 * The name of the new type, in Camel case.
1453 * The name of the new type, in lowercase, with words
1456 * The GType of the parent type.
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.
1468 * The name of the new type, in Camel case.
1470 * The name of the new type in lowercase, with words separated by '_'.
1472 * The GType of the parent type.
1474 * Custom code that gets inserted in the *_get_type() function.
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.
1485 * The name of the new type, in Camel case.
1487 * The name of the new type, in lowercase, with words
1490 * The GType of the parent type.
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.
1502 * The name of the new type, in Camel case.
1504 * The name of the new type, in lowercase, with words
1507 * The GType of the parent type.
1509 * Custom code that gets inserted in the @type_name_get_type() function.
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.
1522 * The GType of the interface to add
1524 * The interface init function
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,
1537 * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
1538 * gtk_gadget_gizmo_init));
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);
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,
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
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
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 * A convenience macro for dynamic type implementations, which declares a
1590 * class initialization function, an instance initialization function (see
1591 * GTypeInfo for information about these) and a static variable named
1592 * t_n_parent_class pointing to the parent class. Furthermore,
1593 * it defines a *_get_type() and a static
1594 * *_register_type() function for use in your
1596 * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
1598 * The name of the new type, in Camel case.
1600 * The name of the new type, in lowercase, with words
1603 * The GType of the parent type.
1607 // #define G_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) G_DEFINE_DYNAMIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
1610 * A more general version of G_DEFINE_DYNAMIC_TYPE() which
1611 * allows to specify GTypeFlags and custom code.
1612 * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
1616 * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
1617 * gtk_gadget_gizmo_init));
1619 * static void gtk_gadget_init (GtkGadget *self);
1620 * static void gtk_gadget_class_init (GtkGadgetClass *klass);
1621 * static void gtk_gadget_class_finalize (GtkGadgetClass *klass);
1622 * static gpointer gtk_gadget_parent_class = NULL;
1623 * static GType gtk_gadget_type_id = 0;
1624 * static void gtk_gadget_class_intern_init (gpointer klass)
1626 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
1627 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
1630 * gtk_gadget_get_type (void)
1632 * return gtk_gadget_type_id;
1635 * gtk_gadget_register_type (GTypeModule *type_module)
1637 * const GTypeInfo g_define_type_info = {
1638 * sizeof (GtkGadgetClass),
1639 * (GBaseInitFunc) NULL,
1640 * (GBaseFinalizeFunc) NULL,
1641 * (GClassInitFunc) gtk_gadget_class_intern_init,
1642 * (GClassFinalizeFunc) gtk_gadget_class_finalize,
1643 * NULL, /+* class_data +/
1644 * sizeof (GtkGadget),
1645 * 0, /+* n_preallocs +/
1646 * (GInstanceInitFunc) gtk_gadget_init,
1647 * NULL /+* value_table +/
1649 * gtk_gadget_type_id = g_type_module_register_type (type_module,
1652 * g_define_type_info,
1653 * (GTypeFlags) flags);
1655 * const GInterfaceInfo g_implement_interface_info = {
1656 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
1658 * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, g_implement_interface_info);
1662 * The name of the new type, in Camel case.
1664 * The name of the new type, in lowercase, with words
1667 * The GType of the parent type.
1669 * GTypeFlags to pass to g_type_register_static()
1671 * Custom code that gets inserted in the *_get_type() function.
1675 * The abstract type loader interface.
1677 * Portable mechanism for dynamically loaded modules.
1680 // #define G_DEFINE_DYNAMIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE)
1683 * Returns a boolean value of FALSE or TRUE indicating whether
1684 * the passed in type id is a G_TYPE_OBJECT or derived from it.
1686 * Type id to check for is a G_TYPE_OBJECT relationship.
1688 * FALSE or TRUE, indicating whether type is a G_TYPE_OBJECT.
1691 // #define G_TYPE_IS_OBJECT(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
1694 * Casts a GObject or derived pointer into a (GObject*) pointer.
1695 * Depending on the current debugging level, this function may invoke
1696 * certain runtime checks to identify invalid casts.
1698 * Object which is subject to casting.
1701 // #define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject))
1704 * Checks whether a valid GTypeInstance pointer is of type G_TYPE_OBJECT.
1706 * Instance to check for being a G_TYPE_OBJECT.
1709 // #define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT))
1712 * Casts a derived GObjectClass structure into a GObjectClass structure.
1714 * a valid GObjectClass
1717 // #define G_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass))
1720 * Checks whether class "is a" valid GObjectClass structure of type
1721 * G_TYPE_OBJECT or derived.
1726 // #define G_IS_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT))
1729 * Returns the class structure associated to a GObject instance.
1731 * a GObject instance.
1734 // #define G_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))
1737 * Return the type id of an object.
1739 * Object to return the type id for.
1741 * Type id of object.
1744 // #define G_OBJECT_TYPE(object) (G_TYPE_FROM_INSTANCE (object))
1747 * Returns the name of an object's type.
1749 * Object to return the type name for.
1751 * Type name of object. The string is owned by the type system and
1752 * should not be freed.
1755 // #define G_OBJECT_TYPE_NAME(object) (g_type_name (G_OBJECT_TYPE (object)))
1758 * Return the type id of a class structure.
1760 * a valid GObjectClass
1765 // #define G_OBJECT_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
1768 * Return the name of a class structure's type.
1770 * a valid GObjectClass
1772 * Type name of class. The string is owned by the type system and
1773 * should not be freed.
1776 // #define G_OBJECT_CLASS_NAME(class) (g_type_name (G_OBJECT_CLASS_TYPE (class)))
1779 * This macros should be used to emit a standard warning about unexpected
1780 * properties in set_property() and get_property() implementations.
1782 * the GObject on which set_property() or get_property() was called
1784 * the numeric id of the property
1786 * the GParamSpec of the property
1788 * The "notify" signal
1789 * void user_function (GObject *gobject,
1791 * gpointer user_data) : Run First / No Recursion / Has Details / Action / No Hooks
1792 * The notify signal is emitted on an object when one of its properties
1793 * has been changed. Note that getting this signal doesn't guarantee that the
1794 * value of the property has actually changed, it may also be emitted when
1795 * the setter for the property is called to reinstate the previous value.
1796 * This signal is typically used to obtain change notification for a
1797 * single property, by specifying the property name as a detail in the
1798 * g_signal_connect() call, like this:
1799 * g_signal_connect (text_view->buffer, "notify::paste-target-list",
1800 * G_CALLBACK (gtk_text_view_target_list_notify),
1802 * It is important to note that you must use
1803 * canonical parameter names as
1804 * detail strings for the notify signal.
1806 * the GParamSpec of the property which changed
1808 * the object which received the signal.
1810 * user data set when the signal handler was connected.
1812 * GParamSpecObject, g_param_spec_object()
1815 // #define G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec)
1818 * Returns the type identifier from a given GEnumClass structure.
1823 // #define G_ENUM_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
1826 * Returns the static type name from a given GEnumClass structure.
1831 // #define G_ENUM_CLASS_TYPE_NAME(class) (g_type_name (G_ENUM_CLASS_TYPE (class)))
1834 * Returns whether type "is a" G_TYPE_ENUM.
1839 // #define G_TYPE_IS_ENUM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_ENUM)
1842 * Casts a derived GEnumClass structure into a GEnumClass structure.
1844 * a valid GEnumClass
1847 // #define G_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_ENUM, GEnumClass))
1850 * Checks whether class "is a" valid GEnumClass structure of type G_TYPE_ENUM
1856 // #define G_IS_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_ENUM))
1859 * Returns whether type "is a" G_TYPE_FLAGS.
1864 // #define G_TYPE_IS_FLAGS(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_FLAGS)
1867 * Casts a derived GFlagsClass structure into a GFlagsClass structure.
1869 * a valid GFlagsClass
1872 // #define G_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_FLAGS, GFlagsClass))
1875 * Checks whether class "is a" valid GFlagsClass structure of type G_TYPE_FLAGS
1881 // #define G_IS_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_FLAGS))
1884 * Returns the type identifier from a given GFlagsClass structure.
1889 // #define G_FLAGS_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
1892 * Returns the static type name from a given GFlagsClass structure.
1897 // #define G_FLAGS_CLASS_TYPE_NAME(class) (g_type_name (G_FLAGS_CLASS_TYPE (class)))
1900 * Returns TRUE if value holds (or contains) a value of type.
1901 * This macro will also check for value != NULL and issue a
1902 * warning if the check fails.
1904 * A GValue structure.
1909 // #define G_VALUE_HOLDS(value,type) (G_TYPE_CHECK_VALUE_TYPE ((value), (type)))
1912 * Returns the type identifier of value.
1914 * A GValue structure.
1917 // #define G_VALUE_TYPE(value) (((GValue*) (value))->g_type)
1920 * Returns the type name of value.
1922 * A GValue structure.
1925 // #define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value)))
1928 * Return whether the passed in type ID can be used for g_value_init().
1929 * That is, this macro checks whether this type provides an implementation
1930 * of the GTypeValueTable functions required for a type to create a GValue of.
1934 * Whether type is suitable as a GValue type.
1937 // #define G_TYPE_IS_VALUE(type) (g_type_check_is_value_type (type))
1940 * Returns TRUE if type is an abstract value type. An abstract value type
1941 * introduces a value table, but can't be used for g_value_init() and is normally
1942 * used as an abstract base type for derived value types.
1947 // #define G_TYPE_IS_VALUE_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_VALUE_ABSTRACT))
1950 * Returns TRUE if value is a valid and initialized GValue structure.
1952 * A GValue structure.
1955 // #define G_IS_VALUE(value) (G_TYPE_CHECK_VALUE (value))
1958 * Return whether the given GParamSpec is of type G_TYPE_PARAM_BOOLEAN.
1960 * a valid GParamSpec instance
1963 // #define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
1966 * Cast a GParamSpec instance into a GParamSpecBoolean.
1968 * a valid GParamSpec instance
1971 // #define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
1974 * Return whether the given GValue can hold values of type G_TYPE_BOOLEAN.
1976 * a valid GValue structure
1979 // #define G_VALUE_HOLDS_BOOLEAN(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN))
1982 * Return whether the given GParamSpec is of type G_TYPE_PARAM_CHAR.
1984 * a valid GParamSpec instance
1987 // #define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
1990 * Cast a GParamSpec instance into a GParamSpecChar.
1992 * a valid GParamSpec instance
1995 // #define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
1998 * Return whether the given GValue can hold values of type G_TYPE_CHAR.
2000 * a valid GValue structure
2003 // #define G_VALUE_HOLDS_CHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR))
2006 * Return whether the given GParamSpec is of type G_TYPE_PARAM_UCHAR.
2008 * a valid GParamSpec instance
2011 // #define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
2014 * Cast a GParamSpec instance into a GParamSpecUChar.
2016 * a valid GParamSpec instance
2019 // #define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
2022 * Return whether the given GValue can hold values of type G_TYPE_UCHAR.
2024 * a valid GValue structure
2027 // #define G_VALUE_HOLDS_UCHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR))
2030 * Return whether the given GParamSpec is of type G_TYPE_PARAM_INT.
2032 * a valid GParamSpec instance
2035 // #define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
2038 * Cast a GParamSpec instance into a GParamSpecInt.
2040 * a valid GParamSpec instance
2043 // #define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
2046 * Return whether the given GValue can hold values of type G_TYPE_INT.
2048 * a valid GValue structure
2051 // #define G_VALUE_HOLDS_INT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT))
2054 * Return whether the given GParamSpec is of type G_TYPE_PARAM_UINT.
2056 * a valid GParamSpec instance
2059 // #define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
2062 * Cast a GParamSpec instance into a GParamSpecUInt.
2064 * a valid GParamSpec instance
2067 // #define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
2070 * Return whether the given GValue can hold values of type G_TYPE_UINT.
2072 * a valid GValue structure
2075 // #define G_VALUE_HOLDS_UINT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT))
2078 * Return whether the given GParamSpec is of type G_TYPE_PARAM_LONG.
2080 * a valid GParamSpec instance
2083 // #define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
2086 * Cast a GParamSpec instance into a GParamSpecLong.
2088 * a valid GParamSpec instance
2091 // #define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
2094 * Return whether the given GValue can hold values of type G_TYPE_LONG.
2096 * a valid GValue structure
2099 // #define G_VALUE_HOLDS_LONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_LONG))
2102 * Return whether the given GParamSpec is of type G_TYPE_PARAM_ULONG.
2104 * a valid GParamSpec instance
2107 // #define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
2110 * Cast a GParamSpec instance into a GParamSpecULong.
2112 * a valid GParamSpec instance
2115 // #define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
2118 * Return whether the given GValue can hold values of type G_TYPE_ULONG.
2120 * a valid GValue structure
2123 // #define G_VALUE_HOLDS_ULONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ULONG))
2126 * Return whether the given GParamSpec is of type G_TYPE_PARAM_INT64.
2128 * a valid GParamSpec instance
2131 // #define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
2134 * Cast a GParamSpec instance into a GParamSpecInt64.
2136 * a valid GParamSpec instance
2139 // #define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
2142 * Return whether the given GValue can hold values of type G_TYPE_INT64.
2144 * a valid GValue structure
2147 // #define G_VALUE_HOLDS_INT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT64))
2150 * Return whether the given GParamSpec is of type G_TYPE_PARAM_UINT64.
2152 * a valid GParamSpec instance
2155 // #define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
2158 * Cast a GParamSpec instance into a GParamSpecUInt64.
2160 * a valid GParamSpec instance
2163 // #define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
2166 * Return whether the given GValue can hold values of type G_TYPE_UINT64.
2168 * a valid GValue structure
2171 // #define G_VALUE_HOLDS_UINT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT64))
2174 * Return whether the given GParamSpec is of type G_TYPE_PARAM_FLOAT.
2176 * a valid GParamSpec instance
2179 // #define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
2182 * Cast a GParamSpec instance into a GParamSpecFloat.
2184 * a valid GParamSpec instance
2187 // #define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
2190 * Return whether the given GValue can hold values of type G_TYPE_FLOAT.
2192 * a valid GValue structure
2195 // #define G_VALUE_HOLDS_FLOAT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT))
2198 * Return whether the given GParamSpec is of type G_TYPE_PARAM_DOUBLE.
2200 * a valid GParamSpec instance
2203 // #define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
2206 * Cast a GParamSpec instance into a GParamSpecDouble.
2208 * a valid GParamSpec instance
2211 // #define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
2214 * Return whether the given GValue can hold values of type G_TYPE_DOUBLE.
2216 * a valid GValue structure
2219 // #define G_VALUE_HOLDS_DOUBLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_DOUBLE))
2222 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_ENUM.
2224 * a valid GParamSpec instance
2227 // #define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
2230 * Cast a GParamSpec instance into a GParamSpecEnum.
2232 * a valid GParamSpec instance
2235 // #define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
2238 * Return whether the given GValue can hold values derived from type G_TYPE_ENUM.
2240 * a valid GValue structure
2243 // #define G_VALUE_HOLDS_ENUM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ENUM))
2246 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_FLAGS.
2248 * a valid GParamSpec instance
2251 // #define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
2254 * Cast a GParamSpec instance into a GParamSpecFlags.
2256 * a valid GParamSpec instance
2259 // #define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
2262 * Returns whether the given GValue can hold values derived from type G_TYPE_FLAGS.
2264 * a valid GValue structure
2267 // #define G_VALUE_HOLDS_FLAGS(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLAGS))
2270 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_STRING.
2272 * a valid GParamSpec instance
2275 // #define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
2278 * Casts a GParamSpec instance into a GParamSpecString.
2280 * a valid GParamSpec instance
2283 // #define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
2286 * Return whether the given GValue can hold values of type G_TYPE_STRING.
2288 * a valid GValue structure
2291 // #define G_VALUE_HOLDS_STRING(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_STRING))
2294 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_PARAM.
2296 * a valid GParamSpec instance
2299 // #define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
2302 * Casts a GParamSpec instance into a GParamSpecParam.
2304 * a valid GParamSpec instance
2307 // #define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
2310 * Return whether the given GValue can hold values derived from type G_TYPE_PARAM.
2312 * a valid GValue structure
2315 // #define G_VALUE_HOLDS_PARAM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))
2318 * Return whether the given GParamSpec is of type G_TYPE_PARAM_BOXED.
2320 * a valid GParamSpec instance
2323 // #define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
2326 * Cast a GParamSpec instance into a GParamSpecBoxed.
2328 * a valid GParamSpec instance
2331 // #define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
2334 * Return whether the given GValue can hold values derived from type G_TYPE_BOXED.
2336 * a valid GValue structure
2339 // #define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED))
2342 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_POINTER.
2344 * a valid GParamSpec instance
2347 // #define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
2350 * Casts a GParamSpec instance into a GParamSpecPointer.
2352 * a valid GParamSpec instance
2355 // #define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
2358 * Return whether the given GValue can hold values of type G_TYPE_POINTER.
2360 * a valid GValue structure
2363 // #define G_VALUE_HOLDS_POINTER(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_POINTER))
2366 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_OBJECT.
2368 * a valid GParamSpec instance
2371 // #define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
2374 * Casts a GParamSpec instance into a GParamSpecObject.
2376 * a valid GParamSpec instance
2379 // #define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
2382 * Return whether the given GValue can hold values derived from type G_TYPE_OBJECT.
2384 * a valid GValue structure
2387 // #define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT))
2390 * Return whether the given GParamSpec is of type G_TYPE_PARAM_UNICHAR.
2392 * a valid GParamSpec instance
2395 // #define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
2398 * Cast a GParamSpec instance into a GParamSpecUnichar.
2400 * a valid GParamSpec instance
2403 // #define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
2406 * Return whether the given GParamSpec is of type G_TYPE_PARAM_VALUE_ARRAY.
2408 * a valid GParamSpec instance
2411 // #define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
2414 * Cast a GParamSpec instance into a GParamSpecValueArray.
2416 * a valid GParamSpec instance
2419 // #define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
2422 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_OVERRIDE.
2428 // #define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
2431 * Casts a GParamSpec into a GParamSpecOverride.
2437 // #define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
2440 * Returns whether the given GParamSpec is of type G_TYPE_PARAM_GTYPE.
2446 // #define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
2449 * Casts a GParamSpec into a GParamSpecGType.
2455 // #define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
2458 * Returns whether the given GValue can hold values of type G_TYPE_GTYPE.
2460 * a valid GValue structure
2464 // #define G_VALUE_HOLDS_GTYPE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE))
2467 * Returns whether type "is a" G_TYPE_PARAM.
2472 // #define G_TYPE_IS_PARAM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
2475 * Casts a derived GParamSpec object (e.g. of type GParamSpecInt) into
2476 * a GParamSpec object.
2478 * a valid GParamSpec
2481 // #define G_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
2484 * Checks whether pspec "is a" valid GParamSpec structure of type G_TYPE_PARAM
2490 // #define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM))
2493 * Casts a derived GParamSpecClass structure into a GParamSpecClass structure.
2495 * a valid GParamSpecClass
2498 // #define G_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
2501 * Checks whether pclass "is a" valid GParamSpecClass structure of type
2502 * G_TYPE_PARAM or derived.
2507 // #define G_IS_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
2510 * Retrieves the GParamSpecClass of a GParamSpec.
2512 * a valid GParamSpec
2515 // #define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
2518 * Retrieves the GType of this pspec.
2520 * a valid GParamSpec
2523 // #define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec))
2526 * Retrieves the GType name of this pspec.
2528 * a valid GParamSpec
2531 // #define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
2534 * Retrieves the GType to initialize a GValue for this parameter.
2536 * a valid GParamSpec
2539 // #define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type)
2542 * Connects a GCallback function to a signal for a particular object.
2543 * The handler will be called before the default handler of the signal.
2545 * the instance to connect to.
2547 * a string of the form "signal-name::detail".
2549 * the GCallback to connect.
2551 * data to pass to c_handler calls.
2556 // #define g_signal_connect(instance, detailed_signal, c_handler, data)
2559 * Connects a GCallback function to a signal for a particular object.
2560 * The handler will be called after the default handler of the signal.
2562 * the instance to connect to.
2564 * a string of the form "signal-name::detail".
2566 * the GCallback to connect.
2568 * data to pass to c_handler calls.
2573 // #define g_signal_connect_after(instance, detailed_signal, c_handler, data)
2576 * Connects a GCallback function to a signal for a particular object.
2577 * The instance on which the signal is emitted and data will be swapped when
2578 * calling the handler.
2580 * the instance to connect to.
2582 * a string of the form "signal-name::detail".
2584 * the GCallback to connect.
2586 * data to pass to c_handler calls.
2591 // #define g_signal_connect_swapped(instance, detailed_signal, c_handler, data)
2594 * Blocks all handlers on an instance that match func and data.
2596 * The instance to block handlers from.
2598 * The C closure callback of the handlers (useless for non-C closures).
2600 * The closure data of the handlers' closures.
2602 * The number of handlers that got blocked.
2605 // #define g_signal_handlers_block_by_func(instance, func, data)
2608 * Unblocks all handlers on an instance that match func and data.
2610 * The instance to unblock handlers from.
2612 * The C closure callback of the handlers (useless for non-C closures).
2614 * The closure data of the handlers' closures.
2616 * The number of handlers that got unblocked.
2619 // #define g_signal_handlers_unblock_by_func(instance, func, data)
2622 * Disconnects all handlers on an instance that match func and data.
2624 * The instance to remove handlers from.
2626 * The C closure callback of the handlers (useless for non-C closures).
2628 * The closure data of the handlers' closures.
2630 * The number of handlers that got disconnected.
2633 // #define g_signal_handlers_disconnect_by_func(instance, func, data)
2636 * Returns TRUE if a GClosureMarshal marshaller has not yet been set on
2637 * closure. See g_closure_set_marshal().
2642 // #define G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL)
2645 * Returns the total number of notifiers connected with the closure cl.
2646 * The count includes the meta marshaller, the finalize and invalidate notifiers
2647 * and the marshal guards. Note that each guard counts as two notifiers.
2648 * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
2649 * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
2654 // #define G_CLOSURE_N_NOTIFIERS(cl)
2657 * Returns whether the user data of the GCClosure should be passed as the
2658 * first parameter to the callback. See g_cclosure_new_swap().
2663 // #define G_CCLOSURE_SWAP_DATA(cclosure) (((GClosure*) (closure))->derivative_flag)
2666 * Cast a function pointer to a GCallback.
2668 * a function pointer.
2671 // #define G_CALLBACK(f) ((GCallback) (f))
2674 * A callback function used by the type system to do base initialization
2675 * of the class structures of derived types. It is called as part of the
2676 * initialization process of all derived classes and should reallocate
2677 * or reset all dynamic class members copied over from the parent class.
2678 * For example, class members (such as strings) that are not sufficiently
2679 * handled by a plain memory copy of the parent class into the derived class
2680 * have to be altered. See GClassInitFunc() for a discussion of the class
2681 * intialization process.
2683 * The GTypeClass structure to initialize.
2685 // void (*GBaseInitFunc) (gpointer g_class);
2686 public typedef extern(C
) void function (void*) GBaseInitFunc
;
2689 * A callback function used by the type system to finalize those portions
2690 * of a derived types class structure that were setup from the corresponding
2691 * GBaseInitFunc() function. Class finalization basically works the inverse
2692 * way in which class intialization is performed.
2693 * See GClassInitFunc() for a discussion of the class intialization process.
2695 * The GTypeClass structure to finalize.
2697 // void (*GBaseFinalizeFunc) (gpointer g_class);
2698 public typedef extern(C
) void function (void*) GBaseFinalizeFunc
;
2701 * A callback function used by the type system to initialize the class
2702 * of a specific type. This function should initialize all static class
2704 * The initialization process of a class involves:
2705 * 1 - Copying common members from the parent class over to the
2706 * derived class structure.
2707 * 2 - Zero initialization of the remaining members not copied
2708 * over from the parent class.
2709 * 3 - Invocation of the GBaseInitFunc() initializers of all parent
2710 * types and the class' type.
2711 * 4 - Invocation of the class' GClassInitFunc() initializer.
2712 * Since derived classes are partially initialized through a memory copy
2713 * of the parent class, the general rule is that GBaseInitFunc() and
2714 * GBaseFinalizeFunc() should take care of necessary reinitialization
2715 * and release of those class members that were introduced by the type
2716 * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
2717 * GClassInitFunc() should only care about initializing static
2718 * class members, while dynamic class members (such as allocated strings
2719 * or reference counted resources) are better handled by a GBaseInitFunc()
2720 * for this type, so proper initialization of the dynamic class members
2721 * is performed for class initialization of derived types as well.
2722 * An example may help to correspond the intend of the different class
2725 * GObjectClass parent_class;
2726 * gint static_integer;
2727 * gchar *dynamic_string;
2730 * type_a_base_class_init (TypeAClass *class)
2732 * class->dynamic_string = g_strdup ("some string");
2735 * type_a_base_class_finalize (TypeAClass *class)
2737 * g_free (class->dynamic_string);
2740 * type_a_class_init (TypeAClass *class)
2742 * class->static_integer = 42;
2745 * TypeAClass parent_class;
2746 * gfloat static_float;
2747 * GString *dynamic_gstring;
2750 * type_b_base_class_init (TypeBClass *class)
2752 * class->dynamic_gstring = g_string_new ("some other string");
2755 * type_b_base_class_finalize (TypeBClass *class)
2757 * g_string_free (class->dynamic_gstring);
2760 * type_b_class_init (TypeBClass *class)
2762 * class->static_float = 3.14159265358979323846;
2764 * Initialization of TypeBClass will first cause initialization of
2765 * TypeAClass (derived classes reference their parent classes, see
2766 * g_type_class_ref() on this).
2767 * Initialization of TypeAClass roughly involves zero-initializing its fields,
2768 * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
2769 * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
2770 * type_a_class_init() to initialize its static members (static_integer).
2771 * The first step in the initialization process of TypeBClass is then
2772 * a plain memory copy of the contents of TypeAClass into TypeBClass and
2773 * zero-initialization of the remaining fields in TypeBClass.
2774 * The dynamic members of TypeAClass within TypeBClass now need
2775 * reinitialization which is performed by calling type_a_base_class_init()
2776 * with an argument of TypeBClass.
2777 * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
2778 * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
2779 * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
2780 * is called to complete the initialization process with the static members
2782 * Corresponding finalization counter parts to the GBaseInitFunc() functions
2783 * have to be provided to release allocated resources at class finalization
2786 * The GTypeClass structure to initialize.
2788 * The class_data member supplied via the GTypeInfo structure.
2790 // void (*GClassInitFunc) (gpointer g_class, gpointer class_data);
2791 public typedef extern(C
) void function (void*, void*) GClassInitFunc
;
2794 * A callback function used by the type system to finalize a class.
2795 * This function is rarely needed, as dynamically allocated class resources
2796 * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
2797 * Also, specification of a GClassFinalizeFunc() in the GTypeInfo
2798 * structure of a static type is invalid, because classes of static types
2799 * will never be finalized (they are artificially kept alive when their
2800 * reference count drops to zero).
2802 * The GTypeClass structure to finalize.
2804 * The class_data member supplied via the GTypeInfo structure.
2806 // void (*GClassFinalizeFunc) (gpointer g_class, gpointer class_data);
2807 public typedef extern(C
) void function (void*, void*) GClassFinalizeFunc
;
2810 * A callback function used by the type system to initialize a new
2811 * instance of a type. This function initializes all instance members and
2812 * allocates any resources required by it.
2813 * Initialization of a derived instance involves calling all its parent
2814 * types instance initializers, so the class member of the instance
2815 * is altered during its initialization to always point to the class that
2816 * belongs to the type the current initializer was introduced for.
2818 * The instance to initialize.
2820 * The class of the type the instance is created for.
2822 // void (*GInstanceInitFunc) (GTypeInstance *instance, gpointer g_class);
2823 public typedef extern(C
) void function (GTypeInstance
*, void*) GInstanceInitFunc
;
2826 * A callback function used by the type system to initialize a new
2827 * interface. This function should initialize all internal data and
2828 * allocate any resources required by the interface.
2830 * The interface structure to initialize.
2832 * The class_data supplied via the GTypeInfo structure.
2834 // void (*GInterfaceInitFunc) (gpointer g_iface, gpointer iface_data);
2835 public typedef extern(C
) void function (void*, void*) GInterfaceInitFunc
;
2838 * A callback function used by the type system to finalize an interface.
2839 * This function should destroy any internal data and release any resources
2840 * allocated by the corresponding GInterfaceInitFunc() function.
2842 * The interface structure to finalize.
2844 * The class_data supplied via the GTypeInfo structure.
2846 // void (*GInterfaceFinalizeFunc) (gpointer g_iface, gpointer iface_data);
2847 public typedef extern(C
) void function (void*, void*) GInterfaceFinalizeFunc
;
2850 * A callback function which is called when the reference count of a class
2851 * drops to zero. It may use g_type_class_ref() to prevent the class from
2852 * being freed. You should not call g_type_class_unref() from a
2853 * GTypeClassCacheFunc function to prevent infinite recursion, use
2854 * g_type_class_unref_uncached() instead.
2855 * The functions have to check the class id passed in to figure
2856 * whether they actually want to cache the class of this type, since all
2857 * classes are routed through the same GTypeClassCacheFunc chain.
2859 * data that was given to the g_type_add_class_cache_func() call
2861 * The GTypeClass structure which is unreferenced
2863 * TRUE to stop further GTypeClassCacheFuncs from being
2864 * called, FALSE to continue.
2866 // gboolean (*GTypeClassCacheFunc) (gpointer cache_data, GTypeClass *g_class);
2867 public typedef extern(C
) int function (void*, GTypeClass
*) GTypeClassCacheFunc
;
2870 * A callback called after an interface vtable is initialized.
2871 * See g_type_add_interface_check().
2873 * data passed to g_type_add_interface_check().
2875 * the interface that has been initialized
2878 // void (*GTypeInterfaceCheckFunc) (gpointer check_data, gpointer g_iface);
2879 public typedef extern(C
) void function (void*, void*) GTypeInterfaceCheckFunc
;
2882 * The type of the use_plugin function of GTypePluginClass, which gets called
2883 * to increase the use count of plugin.
2885 * the GTypePlugin whose use count should be increased
2887 // void (*GTypePluginUse) (GTypePlugin *plugin);
2888 public typedef extern(C
) void function (GTypePlugin
*) GTypePluginUse
;
2891 * The type of the unuse_plugin function of GTypePluginClass.
2893 * the GTypePlugin whose use count should be decreased
2895 // void (*GTypePluginUnuse) (GTypePlugin *plugin);
2896 public typedef extern(C
) void function (GTypePlugin
*) GTypePluginUnuse
;
2899 * The type of the complete_type_info function of GTypePluginClass.
2903 * the GType whose info is completed
2905 * the GTypeInfo struct to fill in
2907 * the GTypeValueTable to fill in
2909 // void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin, GType g_type, GTypeInfo *info, GTypeValueTable *value_table);
2910 public typedef extern(C
) void function (GTypePlugin
*, GType
, GTypeInfo
*, GTypeValueTable
*) GTypePluginCompleteTypeInfo
;
2913 * The type of the complete_interface_info function of GTypePluginClass.
2917 * the GType of an instantiable type to which the interface
2920 * the GType of the interface whose info is completed
2922 * the GInterfaceInfo to fill in
2924 // void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin, GType instance_type, GType interface_type, GInterfaceInfo *info);
2925 public typedef extern(C
) void function (GTypePlugin
*, GType
, GType
, GInterfaceInfo
*) GTypePluginCompleteInterfaceInfo
;
2928 * The type of the get_property function of GObjectClass.
2932 * the numeric id under which the property was registered with
2933 * g_object_class_install_property().
2935 * a GValue to return the property value in
2937 * the GParamSpec describing the property
2939 // void (*GObjectGetPropertyFunc) (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
2940 public typedef extern(C
) void function (GObject
*, uint, GValue
*, GParamSpec
*) GObjectGetPropertyFunc
;
2943 * The type of the set_property function of GObjectClass.
2947 * the numeric id under which the property was registered with
2948 * g_object_class_install_property().
2950 * the new value for the property
2952 * the GParamSpec describing the property
2954 // void (*GObjectSetPropertyFunc) (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
2955 public typedef extern(C
) void function (GObject
*, uint, GValue
*, GParamSpec
*) GObjectSetPropertyFunc
;
2958 * The type of the finalize function of GObjectClass.
2960 * the GObject being finalized
2962 // void (*GObjectFinalizeFunc) (GObject *object);
2963 public typedef extern(C
) void function (GObject
*) GObjectFinalizeFunc
;
2966 * A GWeakNotify function can be added to an object as a callback that gets
2967 * triggered when the object is finalized. Since the object is already being
2968 * finalized when the GWeakNotify is called, there's not much you could do
2969 * with the object, apart from e.g. using its adress as hash-index or the like.
2971 * data that was provided when the weak reference was established
2972 * where_the_object_was:
2973 * the object being finalized
2975 // void (*GWeakNotify) (gpointer data, GObject *where_the_object_was);
2976 public typedef extern(C
) void function (void*, GObject
*) GWeakNotify
;
2979 * A callback function used for notification when the state
2980 * of a toggle reference changes. See g_object_add_toggle_ref().
2982 * Callback data passed to g_object_add_toggle_ref()
2984 * The object on which g_object_add_toggle_ref() was called.
2986 * TRUE if the toggle reference is now the
2987 * last reference to the object. FALSE if the toggle
2988 * reference was the last reference and there are now other
2991 // void (*GToggleNotify) (gpointer data, GObject *object, gboolean is_last_ref);
2992 public typedef extern(C
) void function (void*, GObject
*, int) GToggleNotify
;
2995 * This function is provided by the user and should produce a copy of the passed
2996 * in boxed structure.
2998 * The boxed structure to be copied.
3000 * The newly created copy of the boxed structure.
3002 // gpointer (*GBoxedCopyFunc) (gpointer boxed);
3003 public typedef extern(C
) void* function (void*) GBoxedCopyFunc
;
3006 * This function is provided by the user and should free the boxed
3009 * The boxed structure to be freed.
3011 // void (*GBoxedFreeFunc) (gpointer boxed);
3012 public typedef extern(C
) void function (void*) GBoxedFreeFunc
;
3015 * The type of value transformation functions which can be registered with
3016 * g_value_register_transform_func().
3022 // void (*GValueTransform) (const GValue *src_value, GValue *dest_value);
3023 public typedef extern(C
) void function (GValue
*, GValue
*) GValueTransform
;
3026 * The signal accumulator is a special callback function that can be used
3027 * to collect return values of the various callbacks that are called
3028 * during a signal emission. The signal accumulator is specified at signal
3029 * creation time, if it is left NULL, no accumulation of callback return
3030 * values is performed. The return value of signal emissions is then the
3031 * value returned by the last callback.
3033 * Signal invocation hint, see GSignalInvocationHint.
3035 * Accumulator to collect callback return values in, this
3036 * is the return value of the current signal emission.
3038 * A GValue holding the return value of the signal handler.
3040 * Callback data that was specified when creating the signal.
3042 * The accumulator function returns whether the signal emission
3043 * should be aborted. Returning FALSE means to abort the
3044 * current emission and TRUE is returned for continuation.
3046 // gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint, GValue *return_accu, const GValue *handler_return, gpointer data);
3047 public typedef extern(C
) int function (GSignalInvocationHint
*, GValue
*, GValue
*, void*) GSignalAccumulator
;
3050 * A simple function pointer to get invoked when the signal is emitted. This
3051 * allows you to tie a hook to the signal type, so that it will trap all
3052 * emissions of that signal, from any object.
3053 * You may not attach these to signals created with the G_SIGNAL_NO_HOOKS flag.
3055 * Signal invocation hint, see GSignalInvocationHint.
3057 * the number of parameters to the function, including
3058 * the instance on which the signal was emitted.
3060 * the instance on which the signal was emitted, followed by the
3061 * parameters of the emission.
3063 * user data associated with the hook.
3065 * whether it wants to stay connected. If it returns FALSE, the signal
3066 * hook is disconnected (and destroyed).
3068 // gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, gpointer data);
3069 public typedef extern(C
) int function (GSignalInvocationHint
*, uint, GValue
*, void*) GSignalEmissionHook
;
3072 * The type used for callback functions in structure definitions and function
3073 * signatures. This doesn't mean that all callback functions must take no
3074 * parameters and return void. The required signature of a callback function
3075 * is determined by the context in which is used (e.g. the signal to which it
3076 * is connected). Use G_CALLBACK() to cast the callback function to a GCallback.
3078 // void (*GCallback) (void);
3079 public typedef extern(C
) void function () GCallback
;
3082 * The type used for marshaller functions.
3084 * the GClosure to which the marshaller belongs
3086 * a GValue to store the return value. May be NULL if the
3087 * callback of closure doesn't return a value.
3089 * the length of the param_values array
3091 * an array of GValues holding the arguments on
3092 * which to invoke the callback of closure
3094 * the invocation hint given as the the last argument
3095 * to g_closure_invoke()
3097 * additional data specified when registering the marshaller,
3098 * see g_closure_set_marshal() and g_closure_set_meta_marshal()
3100 // void (*GClosureMarshal) (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data);
3101 public typedef extern(C
) void function (GClosure
*, GValue
*, uint, GValue
*, void*, void*) GClosureMarshal
;
3104 * The type used for the various notification callbacks which can be registered
3107 * data specified when registering the notification callback
3109 * the GClosure on which the notification is emitted
3111 // void (*GClosureNotify) (gpointer data, GClosure *closure);
3112 public typedef extern(C
) void function (void*, GClosure
*) GClosureNotify
;