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