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