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 glib.c.types; 26 27 public alias uint uid_t; 28 public alias int pid_t; 29 30 version( Windows ) 31 { 32 alias int glong; 33 alias uint gulong; 34 } 35 else version( X86_64 ) 36 { 37 alias long glong; 38 alias ulong gulong; 39 } 40 else 41 { 42 alias int glong; 43 alias uint gulong; 44 } 45 46 version (Windows) 47 { 48 private import core.stdc.stdio; 49 50 static if( !is(typeof(fdopen(0, null))) ) 51 { 52 extern (C) FILE* fdopen(int, char*); 53 } 54 } 55 56 struct Scoped(T) 57 { 58 T payload; 59 60 alias payload this; 61 62 @disable this(); 63 @disable this(this); 64 65 ~this() 66 { 67 .destroy(payload); 68 } 69 } 70 71 auto getScopedGobject(T, Args...)(auto ref Args args) if (is(T == class)) 72 { 73 Scoped!(T) result = void; 74 result.payload = new T(args); 75 76 return result; 77 } 78 79 /** 80 * Get the length of a zero terminated array. 81 */ 82 size_t getArrayLength(T)(T* arr) 83 { 84 size_t len; 85 86 for ( ; arr[len]; len++ ){} 87 88 return len; 89 } 90 91 unittest 92 { 93 assert(getArrayLength("aaaaaaaaa\0".ptr) == 9); 94 } 95 96 Type* gMalloc(Type)() 97 { 98 import glib.c.functions; 99 return cast(Type*)g_malloc0(Type.sizeof); 100 } 101 102 alias void* GIConv; 103 104 /** 105 * Integer representing a day of the month; between 1 and 31. 106 * #G_DATE_BAD_DAY represents an invalid day of the month. 107 */ 108 public alias ubyte GDateDay; 109 110 /** 111 * Integer representing a year; #G_DATE_BAD_YEAR is the invalid 112 * value. The year must be 1 or higher; negative (BC) years are not 113 * allowed. The year is represented with four digits. 114 */ 115 public alias ushort GDateYear; 116 117 /** 118 * Opaque type. See g_mutex_locker_new() for details. 119 */ 120 public alias void GMutexLocker; 121 122 /** 123 * A type which is used to hold a process identification. 124 * 125 * On UNIX, processes are identified by a process id (an integer), 126 * while Windows uses process handles (which are pointers). 127 * 128 * GPid is used in GLib only for descendant processes spawned with 129 * the g_spawn functions. 130 */ 131 public alias int GPid; 132 133 /** 134 * A GQuark is a non-zero integer which uniquely identifies a 135 * particular string. A GQuark value of zero is associated to %NULL. 136 */ 137 public alias uint GQuark; 138 139 /** 140 * Opaque type. See g_rec_mutex_locker_new() for details. 141 */ 142 public alias void GRecMutexLocker; 143 144 /** 145 * A typedef for a reference-counted string. A pointer to a #GRefString can be 146 * treated like a standard `char*` array by all code, but can additionally have 147 * `g_ref_string_*()` methods called on it. `g_ref_string_*()` methods cannot be 148 * called on `char*` arrays not allocated using g_ref_string_new(). 149 * 150 * If using #GRefString with autocleanups, g_autoptr() must be used rather than 151 * g_autofree(), so that the reference counting metadata is also freed. 152 */ 153 public alias char GRefString; 154 155 /** 156 * A typedef alias for gchar**. This is mostly useful when used together with 157 * g_auto(). 158 */ 159 public alias char** GStrv; 160 161 /** 162 * Simply a replacement for time_t. It has been deprecated 163 * since it is not equivalent to time_t on 64-bit platforms 164 * with a 64-bit time_t. Unrelated to #GTimer. 165 * 166 * Note that #GTime is defined to always be a 32-bit integer, 167 * unlike time_t which may be 64-bit on some systems. Therefore, 168 * #GTime will overflow in the year 2038, and you cannot use the 169 * address of a #GTime variable as argument to the UNIX time() 170 * function. 171 * 172 * Instead, do the following: 173 * |[<!-- language="C" --> 174 * time_t ttime; 175 * GTime gtime; 176 * 177 * time (&ttime); 178 * gtime = (GTime)ttime; 179 * ]| 180 */ 181 public alias int GTime; 182 183 /** 184 * A value representing an interval of time, in microseconds. 185 */ 186 public alias long GTimeSpan; 187 188 enum GPriority 189 { 190 HIGH = -100, 191 DEFAULT = 0, 192 HIGH_IDLE = 100, 193 DEFAULT_IDLE = 200, 194 LOW = 300 195 } 196 197 198 public enum GAsciiType 199 { 200 ALNUM = 1, 201 ALPHA = 2, 202 CNTRL = 4, 203 DIGIT = 8, 204 GRAPH = 16, 205 LOWER = 32, 206 PRINT = 64, 207 PUNCT = 128, 208 SPACE = 256, 209 UPPER = 512, 210 XDIGIT = 1024, 211 } 212 alias GAsciiType AsciiType; 213 214 /** 215 * Error codes returned by bookmark file parsing. 216 */ 217 public enum GBookmarkFileError 218 { 219 /** 220 * URI was ill-formed 221 */ 222 INVALID_URI = 0, 223 /** 224 * a requested field was not found 225 */ 226 INVALID_VALUE = 1, 227 /** 228 * a requested application did 229 * not register a bookmark 230 */ 231 APP_NOT_REGISTERED = 2, 232 /** 233 * a requested URI was not found 234 */ 235 URI_NOT_FOUND = 3, 236 /** 237 * document was ill formed 238 */ 239 READ = 4, 240 /** 241 * the text being parsed was 242 * in an unknown encoding 243 */ 244 UNKNOWN_ENCODING = 5, 245 /** 246 * an error occurred while writing 247 */ 248 WRITE = 6, 249 /** 250 * requested file was not found 251 */ 252 FILE_NOT_FOUND = 7, 253 } 254 alias GBookmarkFileError BookmarkFileError; 255 256 /** 257 * The hashing algorithm to be used by #GChecksum when performing the 258 * digest of some data. 259 * 260 * Note that the #GChecksumType enumeration may be extended at a later 261 * date to include new hashing algorithm types. 262 * 263 * Since: 2.16 264 */ 265 public enum GChecksumType 266 { 267 /** 268 * Use the MD5 hashing algorithm 269 */ 270 MD5 = 0, 271 /** 272 * Use the SHA-1 hashing algorithm 273 */ 274 SHA1 = 1, 275 /** 276 * Use the SHA-256 hashing algorithm 277 */ 278 SHA256 = 2, 279 /** 280 * Use the SHA-512 hashing algorithm (Since: 2.36) 281 */ 282 SHA512 = 3, 283 /** 284 * Use the SHA-384 hashing algorithm (Since: 2.51) 285 */ 286 SHA384 = 4, 287 } 288 alias GChecksumType ChecksumType; 289 290 /** 291 * Error codes returned by character set conversion routines. 292 */ 293 public enum GConvertError 294 { 295 /** 296 * Conversion between the requested character 297 * sets is not supported. 298 */ 299 NO_CONVERSION = 0, 300 /** 301 * Invalid byte sequence in conversion input; 302 * or the character sequence could not be represented in the target 303 * character set. 304 */ 305 ILLEGAL_SEQUENCE = 1, 306 /** 307 * Conversion failed for some reason. 308 */ 309 FAILED = 2, 310 /** 311 * Partial character sequence at end of input. 312 */ 313 PARTIAL_INPUT = 3, 314 /** 315 * URI is invalid. 316 */ 317 BAD_URI = 4, 318 /** 319 * Pathname is not an absolute path. 320 */ 321 NOT_ABSOLUTE_PATH = 5, 322 /** 323 * No memory available. Since: 2.40 324 */ 325 NO_MEMORY = 6, 326 /** 327 * An embedded NUL character is present in 328 * conversion output where a NUL-terminated string is expected. 329 * Since: 2.56 330 */ 331 EMBEDDED_NUL = 7, 332 } 333 alias GConvertError ConvertError; 334 335 /** 336 * This enumeration isn't used in the API, but may be useful if you need 337 * to mark a number as a day, month, or year. 338 */ 339 public enum GDateDMY 340 { 341 /** 342 * a day 343 */ 344 DAY = 0, 345 /** 346 * a month 347 */ 348 MONTH = 1, 349 /** 350 * a year 351 */ 352 YEAR = 2, 353 } 354 alias GDateDMY DateDMY; 355 356 /** 357 * Enumeration representing a month; values are #G_DATE_JANUARY, 358 * #G_DATE_FEBRUARY, etc. #G_DATE_BAD_MONTH is the invalid value. 359 */ 360 public enum GDateMonth 361 { 362 /** 363 * invalid value 364 */ 365 BAD_MONTH = 0, 366 /** 367 * January 368 */ 369 JANUARY = 1, 370 /** 371 * February 372 */ 373 FEBRUARY = 2, 374 /** 375 * March 376 */ 377 MARCH = 3, 378 /** 379 * April 380 */ 381 APRIL = 4, 382 /** 383 * May 384 */ 385 MAY = 5, 386 /** 387 * June 388 */ 389 JUNE = 6, 390 /** 391 * July 392 */ 393 JULY = 7, 394 /** 395 * August 396 */ 397 AUGUST = 8, 398 /** 399 * September 400 */ 401 SEPTEMBER = 9, 402 /** 403 * October 404 */ 405 OCTOBER = 10, 406 /** 407 * November 408 */ 409 NOVEMBER = 11, 410 /** 411 * December 412 */ 413 DECEMBER = 12, 414 } 415 alias GDateMonth DateMonth; 416 417 /** 418 * Enumeration representing a day of the week; #G_DATE_MONDAY, 419 * #G_DATE_TUESDAY, etc. #G_DATE_BAD_WEEKDAY is an invalid weekday. 420 */ 421 public enum GDateWeekday 422 { 423 /** 424 * invalid value 425 */ 426 BAD_WEEKDAY = 0, 427 /** 428 * Monday 429 */ 430 MONDAY = 1, 431 /** 432 * Tuesday 433 */ 434 TUESDAY = 2, 435 /** 436 * Wednesday 437 */ 438 WEDNESDAY = 3, 439 /** 440 * Thursday 441 */ 442 THURSDAY = 4, 443 /** 444 * Friday 445 */ 446 FRIDAY = 5, 447 /** 448 * Saturday 449 */ 450 SATURDAY = 6, 451 /** 452 * Sunday 453 */ 454 SUNDAY = 7, 455 } 456 alias GDateWeekday DateWeekday; 457 458 /** 459 * The possible errors, used in the @v_error field 460 * of #GTokenValue, when the token is a %G_TOKEN_ERROR. 461 */ 462 public enum GErrorType 463 { 464 /** 465 * unknown error 466 */ 467 UNKNOWN = 0, 468 /** 469 * unexpected end of file 470 */ 471 UNEXP_EOF = 1, 472 /** 473 * unterminated string constant 474 */ 475 UNEXP_EOF_IN_STRING = 2, 476 /** 477 * unterminated comment 478 */ 479 UNEXP_EOF_IN_COMMENT = 3, 480 /** 481 * non-digit character in a number 482 */ 483 NON_DIGIT_IN_CONST = 4, 484 /** 485 * digit beyond radix in a number 486 */ 487 DIGIT_RADIX = 5, 488 /** 489 * non-decimal floating point number 490 */ 491 FLOAT_RADIX = 6, 492 /** 493 * malformed floating point number 494 */ 495 FLOAT_MALFORMED = 7, 496 } 497 alias GErrorType ErrorType; 498 499 /** 500 * Values corresponding to @errno codes returned from file operations 501 * on UNIX. Unlike @errno codes, GFileError values are available on 502 * all systems, even Windows. The exact meaning of each code depends 503 * on what sort of file operation you were performing; the UNIX 504 * documentation gives more details. The following error code descriptions 505 * come from the GNU C Library manual, and are under the copyright 506 * of that manual. 507 * 508 * It's not very portable to make detailed assumptions about exactly 509 * which errors will be returned from a given operation. Some errors 510 * don't occur on some systems, etc., sometimes there are subtle 511 * differences in when a system will report a given error, etc. 512 */ 513 public enum GFileError 514 { 515 /** 516 * Operation not permitted; only the owner of 517 * the file (or other resource) or processes with special privileges 518 * can perform the operation. 519 */ 520 EXIST = 0, 521 /** 522 * File is a directory; you cannot open a directory 523 * for writing, or create or remove hard links to it. 524 */ 525 ISDIR = 1, 526 /** 527 * Permission denied; the file permissions do not 528 * allow the attempted operation. 529 */ 530 ACCES = 2, 531 /** 532 * Filename too long. 533 */ 534 NAMETOOLONG = 3, 535 /** 536 * No such file or directory. This is a "file 537 * doesn't exist" error for ordinary files that are referenced in 538 * contexts where they are expected to already exist. 539 */ 540 NOENT = 4, 541 /** 542 * A file that isn't a directory was specified when 543 * a directory is required. 544 */ 545 NOTDIR = 5, 546 /** 547 * No such device or address. The system tried to 548 * use the device represented by a file you specified, and it 549 * couldn't find the device. This can mean that the device file was 550 * installed incorrectly, or that the physical device is missing or 551 * not correctly attached to the computer. 552 */ 553 NXIO = 6, 554 /** 555 * The underlying file system of the specified file 556 * does not support memory mapping. 557 */ 558 NODEV = 7, 559 /** 560 * The directory containing the new link can't be 561 * modified because it's on a read-only file system. 562 */ 563 ROFS = 8, 564 /** 565 * Text file busy. 566 */ 567 TXTBSY = 9, 568 /** 569 * You passed in a pointer to bad memory. 570 * (GLib won't reliably return this, don't pass in pointers to bad 571 * memory.) 572 */ 573 FAULT = 10, 574 /** 575 * Too many levels of symbolic links were encountered 576 * in looking up a file name. This often indicates a cycle of symbolic 577 * links. 578 */ 579 LOOP = 11, 580 /** 581 * No space left on device; write operation on a 582 * file failed because the disk is full. 583 */ 584 NOSPC = 12, 585 /** 586 * No memory available. The system cannot allocate 587 * more virtual memory because its capacity is full. 588 */ 589 NOMEM = 13, 590 /** 591 * The current process has too many files open and 592 * can't open any more. Duplicate descriptors do count toward this 593 * limit. 594 */ 595 MFILE = 14, 596 /** 597 * There are too many distinct file openings in the 598 * entire system. 599 */ 600 NFILE = 15, 601 /** 602 * Bad file descriptor; for example, I/O on a 603 * descriptor that has been closed or reading from a descriptor open 604 * only for writing (or vice versa). 605 */ 606 BADF = 16, 607 /** 608 * Invalid argument. This is used to indicate 609 * various kinds of problems with passing the wrong argument to a 610 * library function. 611 */ 612 INVAL = 17, 613 /** 614 * Broken pipe; there is no process reading from the 615 * other end of a pipe. Every library function that returns this 616 * error code also generates a 'SIGPIPE' signal; this signal 617 * terminates the program if not handled or blocked. Thus, your 618 * program will never actually see this code unless it has handled 619 * or blocked 'SIGPIPE'. 620 */ 621 PIPE = 18, 622 /** 623 * Resource temporarily unavailable; the call might 624 * work if you try again later. 625 */ 626 AGAIN = 19, 627 /** 628 * Interrupted function call; an asynchronous signal 629 * occurred and prevented completion of the call. When this 630 * happens, you should try the call again. 631 */ 632 INTR = 20, 633 /** 634 * Input/output error; usually used for physical read 635 * or write errors. i.e. the disk or other physical device hardware 636 * is returning errors. 637 */ 638 IO = 21, 639 /** 640 * Operation not permitted; only the owner of the 641 * file (or other resource) or processes with special privileges can 642 * perform the operation. 643 */ 644 PERM = 22, 645 /** 646 * Function not implemented; this indicates that 647 * the system is missing some functionality. 648 */ 649 NOSYS = 23, 650 /** 651 * Does not correspond to a UNIX error code; this 652 * is the standard "failed for unspecified reason" error code present 653 * in all #GError error code enumerations. Returned if no specific 654 * code applies. 655 */ 656 FAILED = 24, 657 } 658 alias GFileError FileError; 659 660 /** 661 * A test to perform on a file using g_file_test(). 662 */ 663 public enum GFileTest 664 { 665 /** 666 * %TRUE if the file is a regular file 667 * (not a directory). Note that this test will also return %TRUE 668 * if the tested file is a symlink to a regular file. 669 */ 670 IS_REGULAR = 1, 671 /** 672 * %TRUE if the file is a symlink. 673 */ 674 IS_SYMLINK = 2, 675 /** 676 * %TRUE if the file is a directory. 677 */ 678 IS_DIR = 4, 679 /** 680 * %TRUE if the file is executable. 681 */ 682 IS_EXECUTABLE = 8, 683 /** 684 * %TRUE if the file exists. It may or may not 685 * be a regular file. 686 */ 687 EXISTS = 16, 688 } 689 alias GFileTest FileTest; 690 691 /** 692 * Flags to modify the format of the string returned by g_format_size_full(). 693 */ 694 public enum GFormatSizeFlags 695 { 696 /** 697 * behave the same as g_format_size() 698 */ 699 DEFAULT = 0, 700 /** 701 * include the exact number of bytes as part 702 * of the returned string. For example, "45.6 kB (45,612 bytes)". 703 */ 704 LONG_FORMAT = 1, 705 /** 706 * use IEC (base 1024) units with "KiB"-style 707 * suffixes. IEC units should only be used for reporting things with 708 * a strong "power of 2" basis, like RAM sizes or RAID stripe sizes. 709 * Network and storage sizes should be reported in the normal SI units. 710 */ 711 IEC_UNITS = 2, 712 /** 713 * set the size as a quantity in bits, rather than 714 * bytes, and return units in bits. For example, ‘Mb’ rather than ‘MB’. 715 */ 716 BITS = 4, 717 } 718 alias GFormatSizeFlags FormatSizeFlags; 719 720 /** 721 * Flags used internally in the #GHook implementation. 722 */ 723 public enum GHookFlagMask 724 { 725 /** 726 * set if the hook has not been destroyed 727 */ 728 ACTIVE = 1, 729 /** 730 * set if the hook is currently being run 731 */ 732 IN_CALL = 2, 733 /** 734 * A mask covering all bits reserved for 735 * hook flags; see %G_HOOK_FLAG_USER_SHIFT 736 */ 737 MASK = 15, 738 } 739 alias GHookFlagMask HookFlagMask; 740 741 /** 742 * Error codes returned by #GIOChannel operations. 743 */ 744 public enum GIOChannelError 745 { 746 /** 747 * File too large. 748 */ 749 FBIG = 0, 750 /** 751 * Invalid argument. 752 */ 753 INVAL = 1, 754 /** 755 * IO error. 756 */ 757 IO = 2, 758 /** 759 * File is a directory. 760 */ 761 ISDIR = 3, 762 /** 763 * No space left on device. 764 */ 765 NOSPC = 4, 766 /** 767 * No such device or address. 768 */ 769 NXIO = 5, 770 /** 771 * Value too large for defined datatype. 772 */ 773 OVERFLOW = 6, 774 /** 775 * Broken pipe. 776 */ 777 PIPE = 7, 778 /** 779 * Some other error. 780 */ 781 FAILED = 8, 782 } 783 alias GIOChannelError IOChannelError; 784 785 /** 786 * A bitwise combination representing a condition to watch for on an 787 * event source. 788 */ 789 public enum GIOCondition 790 { 791 /** 792 * There is data to read. 793 */ 794 IN = 1, 795 /** 796 * Data can be written (without blocking). 797 */ 798 OUT = 4, 799 /** 800 * There is urgent data to read. 801 */ 802 PRI = 2, 803 /** 804 * Error condition. 805 */ 806 ERR = 8, 807 /** 808 * Hung up (the connection has been broken, usually for 809 * pipes and sockets). 810 */ 811 HUP = 16, 812 /** 813 * Invalid request. The file descriptor is not open. 814 */ 815 NVAL = 32, 816 } 817 alias GIOCondition IOCondition; 818 819 /** 820 * #GIOError is only used by the deprecated functions 821 * g_io_channel_read(), g_io_channel_write(), and g_io_channel_seek(). 822 */ 823 public enum GIOError 824 { 825 /** 826 * no error 827 */ 828 NONE = 0, 829 /** 830 * an EAGAIN error occurred 831 */ 832 AGAIN = 1, 833 /** 834 * an EINVAL error occurred 835 */ 836 INVAL = 2, 837 /** 838 * another error occurred 839 */ 840 UNKNOWN = 3, 841 } 842 alias GIOError IOError; 843 844 /** 845 * Specifies properties of a #GIOChannel. Some of the flags can only be 846 * read with g_io_channel_get_flags(), but not changed with 847 * g_io_channel_set_flags(). 848 */ 849 public enum GIOFlags 850 { 851 /** 852 * turns on append mode, corresponds to %O_APPEND 853 * (see the documentation of the UNIX open() syscall) 854 */ 855 APPEND = 1, 856 /** 857 * turns on nonblocking mode, corresponds to 858 * %O_NONBLOCK/%O_NDELAY (see the documentation of the UNIX open() 859 * syscall) 860 */ 861 NONBLOCK = 2, 862 /** 863 * indicates that the io channel is readable. 864 * This flag cannot be changed. 865 */ 866 IS_READABLE = 4, 867 /** 868 * indicates that the io channel is writable. 869 * This flag cannot be changed. 870 */ 871 IS_WRITABLE = 8, 872 /** 873 * a misspelled version of @G_IO_FLAG_IS_WRITABLE 874 * that existed before the spelling was fixed in GLib 2.30. It is kept 875 * here for compatibility reasons. Deprecated since 2.30 876 */ 877 IS_WRITEABLE = 8, 878 /** 879 * indicates that the io channel is seekable, 880 * i.e. that g_io_channel_seek_position() can be used on it. 881 * This flag cannot be changed. 882 */ 883 IS_SEEKABLE = 16, 884 /** 885 * the mask that specifies all the valid flags. 886 */ 887 MASK = 31, 888 /** 889 * the mask of the flags that are returned from 890 * g_io_channel_get_flags() 891 */ 892 GET_MASK = 31, 893 /** 894 * the mask of the flags that the user can modify 895 * with g_io_channel_set_flags() 896 */ 897 SET_MASK = 3, 898 } 899 alias GIOFlags IOFlags; 900 901 /** 902 * Stati returned by most of the #GIOFuncs functions. 903 */ 904 public enum GIOStatus 905 { 906 /** 907 * An error occurred. 908 */ 909 ERROR = 0, 910 /** 911 * Success. 912 */ 913 NORMAL = 1, 914 /** 915 * End of file. 916 */ 917 EOF = 2, 918 /** 919 * Resource temporarily unavailable. 920 */ 921 AGAIN = 3, 922 } 923 alias GIOStatus IOStatus; 924 925 /** 926 * Error codes returned by key file parsing. 927 */ 928 public enum GKeyFileError 929 { 930 /** 931 * the text being parsed was in 932 * an unknown encoding 933 */ 934 UNKNOWN_ENCODING = 0, 935 /** 936 * document was ill-formed 937 */ 938 PARSE = 1, 939 /** 940 * the file was not found 941 */ 942 NOT_FOUND = 2, 943 /** 944 * a requested key was not found 945 */ 946 KEY_NOT_FOUND = 3, 947 /** 948 * a requested group was not found 949 */ 950 GROUP_NOT_FOUND = 4, 951 /** 952 * a value could not be parsed 953 */ 954 INVALID_VALUE = 5, 955 } 956 alias GKeyFileError KeyFileError; 957 958 /** 959 * Flags which influence the parsing. 960 */ 961 public enum GKeyFileFlags 962 { 963 /** 964 * No flags, default behaviour 965 */ 966 NONE = 0, 967 /** 968 * Use this flag if you plan to write the 969 * (possibly modified) contents of the key file back to a file; 970 * otherwise all comments will be lost when the key file is 971 * written back. 972 */ 973 KEEP_COMMENTS = 1, 974 /** 975 * Use this flag if you plan to write the 976 * (possibly modified) contents of the key file back to a file; 977 * otherwise only the translations for the current language will be 978 * written back. 979 */ 980 KEEP_TRANSLATIONS = 2, 981 } 982 alias GKeyFileFlags KeyFileFlags; 983 984 /** 985 * Flags specifying the level of log messages. 986 * 987 * It is possible to change how GLib treats messages of the various 988 * levels using g_log_set_handler() and g_log_set_fatal_mask(). 989 */ 990 public enum GLogLevelFlags 991 { 992 /** 993 * internal flag 994 */ 995 FLAG_RECURSION = 1, 996 /** 997 * internal flag 998 */ 999 FLAG_FATAL = 2, 1000 /** 1001 * log level for errors, see g_error(). 1002 * This level is also used for messages produced by g_assert(). 1003 */ 1004 LEVEL_ERROR = 4, 1005 /** 1006 * log level for critical warning messages, see 1007 * g_critical(). 1008 * This level is also used for messages produced by g_return_if_fail() 1009 * and g_return_val_if_fail(). 1010 */ 1011 LEVEL_CRITICAL = 8, 1012 /** 1013 * log level for warnings, see g_warning() 1014 */ 1015 LEVEL_WARNING = 16, 1016 /** 1017 * log level for messages, see g_message() 1018 */ 1019 LEVEL_MESSAGE = 32, 1020 /** 1021 * log level for informational messages, see g_info() 1022 */ 1023 LEVEL_INFO = 64, 1024 /** 1025 * log level for debug messages, see g_debug() 1026 */ 1027 LEVEL_DEBUG = 128, 1028 /** 1029 * a mask including all log levels 1030 */ 1031 LEVEL_MASK = -4, 1032 } 1033 alias GLogLevelFlags LogLevelFlags; 1034 1035 /** 1036 * Return values from #GLogWriterFuncs to indicate whether the given log entry 1037 * was successfully handled by the writer, or whether there was an error in 1038 * handling it (and hence a fallback writer should be used). 1039 * 1040 * If a #GLogWriterFunc ignores a log entry, it should return 1041 * %G_LOG_WRITER_HANDLED. 1042 * 1043 * Since: 2.50 1044 */ 1045 public enum GLogWriterOutput 1046 { 1047 /** 1048 * Log writer has handled the log entry. 1049 */ 1050 HANDLED = 1, 1051 /** 1052 * Log writer could not handle the log entry. 1053 */ 1054 UNHANDLED = 0, 1055 } 1056 alias GLogWriterOutput LogWriterOutput; 1057 1058 /** 1059 * A mixed enumerated type and flags field. You must specify one type 1060 * (string, strdup, boolean, tristate). Additionally, you may optionally 1061 * bitwise OR the type with the flag %G_MARKUP_COLLECT_OPTIONAL. 1062 * 1063 * It is likely that this enum will be extended in the future to 1064 * support other types. 1065 */ 1066 public enum GMarkupCollectType 1067 { 1068 /** 1069 * used to terminate the list of attributes 1070 * to collect 1071 */ 1072 INVALID = 0, 1073 /** 1074 * collect the string pointer directly from 1075 * the attribute_values[] array. Expects a parameter of type (const 1076 * char **). If %G_MARKUP_COLLECT_OPTIONAL is specified and the 1077 * attribute isn't present then the pointer will be set to %NULL 1078 */ 1079 STRING = 1, 1080 /** 1081 * as with %G_MARKUP_COLLECT_STRING, but 1082 * expects a parameter of type (char **) and g_strdup()s the 1083 * returned pointer. The pointer must be freed with g_free() 1084 */ 1085 STRDUP = 2, 1086 /** 1087 * expects a parameter of type (gboolean *) 1088 * and parses the attribute value as a boolean. Sets %FALSE if the 1089 * attribute isn't present. Valid boolean values consist of 1090 * (case-insensitive) "false", "f", "no", "n", "0" and "true", "t", 1091 * "yes", "y", "1" 1092 */ 1093 BOOLEAN = 3, 1094 /** 1095 * as with %G_MARKUP_COLLECT_BOOLEAN, but 1096 * in the case of a missing attribute a value is set that compares 1097 * equal to neither %FALSE nor %TRUE G_MARKUP_COLLECT_OPTIONAL is 1098 * implied 1099 */ 1100 TRISTATE = 4, 1101 /** 1102 * can be bitwise ORed with the other fields. 1103 * If present, allows the attribute not to appear. A default value 1104 * is set depending on what value type is used 1105 */ 1106 OPTIONAL = 65536, 1107 } 1108 alias GMarkupCollectType MarkupCollectType; 1109 1110 /** 1111 * Error codes returned by markup parsing. 1112 */ 1113 public enum GMarkupError 1114 { 1115 /** 1116 * text being parsed was not valid UTF-8 1117 */ 1118 BAD_UTF8 = 0, 1119 /** 1120 * document contained nothing, or only whitespace 1121 */ 1122 EMPTY = 1, 1123 /** 1124 * document was ill-formed 1125 */ 1126 PARSE = 2, 1127 /** 1128 * error should be set by #GMarkupParser 1129 * functions; element wasn't known 1130 */ 1131 UNKNOWN_ELEMENT = 3, 1132 /** 1133 * error should be set by #GMarkupParser 1134 * functions; attribute wasn't known 1135 */ 1136 UNKNOWN_ATTRIBUTE = 4, 1137 /** 1138 * error should be set by #GMarkupParser 1139 * functions; content was invalid 1140 */ 1141 INVALID_CONTENT = 5, 1142 /** 1143 * error should be set by #GMarkupParser 1144 * functions; a required attribute was missing 1145 */ 1146 MISSING_ATTRIBUTE = 6, 1147 } 1148 alias GMarkupError MarkupError; 1149 1150 /** 1151 * Flags that affect the behaviour of the parser. 1152 */ 1153 public enum GMarkupParseFlags 1154 { 1155 /** 1156 * flag you should not use 1157 */ 1158 DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1, 1159 /** 1160 * When this flag is set, CDATA marked 1161 * sections are not passed literally to the @passthrough function of 1162 * the parser. Instead, the content of the section (without the 1163 * `<![CDATA[` and `]]>`) is 1164 * passed to the @text function. This flag was added in GLib 2.12 1165 */ 1166 TREAT_CDATA_AS_TEXT = 2, 1167 /** 1168 * Normally errors caught by GMarkup 1169 * itself have line/column information prefixed to them to let the 1170 * caller know the location of the error. When this flag is set the 1171 * location information is also prefixed to errors generated by the 1172 * #GMarkupParser implementation functions 1173 */ 1174 PREFIX_ERROR_POSITION = 4, 1175 /** 1176 * Ignore (don't report) qualified 1177 * attributes and tags, along with their contents. A qualified 1178 * attribute or tag is one that contains ':' in its name (ie: is in 1179 * another namespace). Since: 2.40. 1180 */ 1181 IGNORE_QUALIFIED = 8, 1182 } 1183 alias GMarkupParseFlags MarkupParseFlags; 1184 1185 /** 1186 * Defines how a Unicode string is transformed in a canonical 1187 * form, standardizing such issues as whether a character with 1188 * an accent is represented as a base character and combining 1189 * accent or as a single precomposed character. Unicode strings 1190 * should generally be normalized before comparing them. 1191 */ 1192 public enum GNormalizeMode 1193 { 1194 /** 1195 * standardize differences that do not affect the 1196 * text content, such as the above-mentioned accent representation 1197 */ 1198 DEFAULT = 0, 1199 /** 1200 * another name for %G_NORMALIZE_DEFAULT 1201 */ 1202 NFD = 0, 1203 /** 1204 * like %G_NORMALIZE_DEFAULT, but with 1205 * composed forms rather than a maximally decomposed form 1206 */ 1207 DEFAULT_COMPOSE = 1, 1208 /** 1209 * another name for %G_NORMALIZE_DEFAULT_COMPOSE 1210 */ 1211 NFC = 1, 1212 /** 1213 * beyond %G_NORMALIZE_DEFAULT also standardize the 1214 * "compatibility" characters in Unicode, such as SUPERSCRIPT THREE 1215 * to the standard forms (in this case DIGIT THREE). Formatting 1216 * information may be lost but for most text operations such 1217 * characters should be considered the same 1218 */ 1219 ALL = 2, 1220 /** 1221 * another name for %G_NORMALIZE_ALL 1222 */ 1223 NFKD = 2, 1224 /** 1225 * like %G_NORMALIZE_ALL, but with composed 1226 * forms rather than a maximally decomposed form 1227 */ 1228 ALL_COMPOSE = 3, 1229 /** 1230 * another name for %G_NORMALIZE_ALL_COMPOSE 1231 */ 1232 NFKC = 3, 1233 } 1234 alias GNormalizeMode NormalizeMode; 1235 1236 /** 1237 * Error codes returned by functions converting a string to a number. 1238 * 1239 * Since: 2.54 1240 */ 1241 public enum GNumberParserError 1242 { 1243 /** 1244 * String was not a valid number. 1245 */ 1246 INVALID = 0, 1247 /** 1248 * String was a number, but out of bounds. 1249 */ 1250 OUT_OF_BOUNDS = 1, 1251 } 1252 alias GNumberParserError NumberParserError; 1253 1254 /** 1255 * The possible statuses of a one-time initialization function 1256 * controlled by a #GOnce struct. 1257 * 1258 * Since: 2.4 1259 */ 1260 public enum GOnceStatus 1261 { 1262 /** 1263 * the function has not been called yet. 1264 */ 1265 NOTCALLED = 0, 1266 /** 1267 * the function call is currently in progress. 1268 */ 1269 PROGRESS = 1, 1270 /** 1271 * the function has been called. 1272 */ 1273 READY = 2, 1274 } 1275 alias GOnceStatus OnceStatus; 1276 1277 /** 1278 * The #GOptionArg enum values determine which type of extra argument the 1279 * options expect to find. If an option expects an extra argument, it can 1280 * be specified in several ways; with a short option: `-x arg`, with a long 1281 * option: `--name arg` or combined in a single argument: `--name=arg`. 1282 */ 1283 public enum GOptionArg 1284 { 1285 /** 1286 * No extra argument. This is useful for simple flags. 1287 */ 1288 NONE = 0, 1289 /** 1290 * The option takes a string argument. 1291 */ 1292 STRING = 1, 1293 /** 1294 * The option takes an integer argument. 1295 */ 1296 INT = 2, 1297 /** 1298 * The option provides a callback (of type 1299 * #GOptionArgFunc) to parse the extra argument. 1300 */ 1301 CALLBACK = 3, 1302 /** 1303 * The option takes a filename as argument. 1304 */ 1305 FILENAME = 4, 1306 /** 1307 * The option takes a string argument, multiple 1308 * uses of the option are collected into an array of strings. 1309 */ 1310 STRING_ARRAY = 5, 1311 /** 1312 * The option takes a filename as argument, 1313 * multiple uses of the option are collected into an array of strings. 1314 */ 1315 FILENAME_ARRAY = 6, 1316 /** 1317 * The option takes a double argument. The argument 1318 * can be formatted either for the user's locale or for the "C" locale. 1319 * Since 2.12 1320 */ 1321 DOUBLE = 7, 1322 /** 1323 * The option takes a 64-bit integer. Like 1324 * %G_OPTION_ARG_INT but for larger numbers. The number can be in 1325 * decimal base, or in hexadecimal (when prefixed with `0x`, for 1326 * example, `0xffffffff`). Since 2.12 1327 */ 1328 INT64 = 8, 1329 } 1330 alias GOptionArg OptionArg; 1331 1332 /** 1333 * Error codes returned by option parsing. 1334 */ 1335 public enum GOptionError 1336 { 1337 /** 1338 * An option was not known to the parser. 1339 * This error will only be reported, if the parser hasn't been instructed 1340 * to ignore unknown options, see g_option_context_set_ignore_unknown_options(). 1341 */ 1342 UNKNOWN_OPTION = 0, 1343 /** 1344 * A value couldn't be parsed. 1345 */ 1346 BAD_VALUE = 1, 1347 /** 1348 * A #GOptionArgFunc callback failed. 1349 */ 1350 FAILED = 2, 1351 } 1352 alias GOptionError OptionError; 1353 1354 /** 1355 * Flags which modify individual options. 1356 */ 1357 public enum GOptionFlags 1358 { 1359 /** 1360 * No flags. Since: 2.42. 1361 */ 1362 NONE = 0, 1363 /** 1364 * The option doesn't appear in `--help` output. 1365 */ 1366 HIDDEN = 1, 1367 /** 1368 * The option appears in the main section of the 1369 * `--help` output, even if it is defined in a group. 1370 */ 1371 IN_MAIN = 2, 1372 /** 1373 * For options of the %G_OPTION_ARG_NONE kind, this 1374 * flag indicates that the sense of the option is reversed. 1375 */ 1376 REVERSE = 4, 1377 /** 1378 * For options of the %G_OPTION_ARG_CALLBACK kind, 1379 * this flag indicates that the callback does not take any argument 1380 * (like a %G_OPTION_ARG_NONE option). Since 2.8 1381 */ 1382 NO_ARG = 8, 1383 /** 1384 * For options of the %G_OPTION_ARG_CALLBACK 1385 * kind, this flag indicates that the argument should be passed to the 1386 * callback in the GLib filename encoding rather than UTF-8. Since 2.8 1387 */ 1388 FILENAME = 16, 1389 /** 1390 * For options of the %G_OPTION_ARG_CALLBACK 1391 * kind, this flag indicates that the argument supply is optional. 1392 * If no argument is given then data of %GOptionParseFunc will be 1393 * set to NULL. Since 2.8 1394 */ 1395 OPTIONAL_ARG = 32, 1396 /** 1397 * This flag turns off the automatic conflict 1398 * resolution which prefixes long option names with `groupname-` if 1399 * there is a conflict. This option should only be used in situations 1400 * where aliasing is necessary to model some legacy commandline interface. 1401 * It is not safe to use this option, unless all option groups are under 1402 * your direct control. Since 2.8. 1403 */ 1404 NOALIAS = 64, 1405 } 1406 alias GOptionFlags OptionFlags; 1407 1408 /** 1409 * Flags specifying compile-time options. 1410 * 1411 * Since: 2.14 1412 */ 1413 public enum GRegexCompileFlags 1414 { 1415 /** 1416 * Letters in the pattern match both upper- and 1417 * lowercase letters. This option can be changed within a pattern 1418 * by a "(?i)" option setting. 1419 */ 1420 CASELESS = 1, 1421 /** 1422 * By default, GRegex treats the strings as consisting 1423 * of a single line of characters (even if it actually contains 1424 * newlines). The "start of line" metacharacter ("^") matches only 1425 * at the start of the string, while the "end of line" metacharacter 1426 * ("$") matches only at the end of the string, or before a terminating 1427 * newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When 1428 * #G_REGEX_MULTILINE is set, the "start of line" and "end of line" 1429 * constructs match immediately following or immediately before any 1430 * newline in the string, respectively, as well as at the very start 1431 * and end. This can be changed within a pattern by a "(?m)" option 1432 * setting. 1433 */ 1434 MULTILINE = 2, 1435 /** 1436 * A dot metacharacter (".") in the pattern matches all 1437 * characters, including newlines. Without it, newlines are excluded. 1438 * This option can be changed within a pattern by a ("?s") option setting. 1439 */ 1440 DOTALL = 4, 1441 /** 1442 * Whitespace data characters in the pattern are 1443 * totally ignored except when escaped or inside a character class. 1444 * Whitespace does not include the VT character (code 11). In addition, 1445 * characters between an unescaped "#" outside a character class and 1446 * the next newline character, inclusive, are also ignored. This can 1447 * be changed within a pattern by a "(?x)" option setting. 1448 */ 1449 EXTENDED = 8, 1450 /** 1451 * The pattern is forced to be "anchored", that is, 1452 * it is constrained to match only at the first matching point in the 1453 * string that is being searched. This effect can also be achieved by 1454 * appropriate constructs in the pattern itself such as the "^" 1455 * metacharacter. 1456 */ 1457 ANCHORED = 16, 1458 /** 1459 * A dollar metacharacter ("$") in the pattern 1460 * matches only at the end of the string. Without this option, a 1461 * dollar also matches immediately before the final character if 1462 * it is a newline (but not before any other newlines). This option 1463 * is ignored if #G_REGEX_MULTILINE is set. 1464 */ 1465 DOLLAR_ENDONLY = 32, 1466 /** 1467 * Inverts the "greediness" of the quantifiers so that 1468 * they are not greedy by default, but become greedy if followed by "?". 1469 * It can also be set by a "(?U)" option setting within the pattern. 1470 */ 1471 UNGREEDY = 512, 1472 /** 1473 * Usually strings must be valid UTF-8 strings, using this 1474 * flag they are considered as a raw sequence of bytes. 1475 */ 1476 RAW = 2048, 1477 /** 1478 * Disables the use of numbered capturing 1479 * parentheses in the pattern. Any opening parenthesis that is not 1480 * followed by "?" behaves as if it were followed by "?:" but named 1481 * parentheses can still be used for capturing (and they acquire numbers 1482 * in the usual way). 1483 */ 1484 NO_AUTO_CAPTURE = 4096, 1485 /** 1486 * Optimize the regular expression. If the pattern will 1487 * be used many times, then it may be worth the effort to optimize it 1488 * to improve the speed of matches. 1489 */ 1490 OPTIMIZE = 8192, 1491 /** 1492 * Limits an unanchored pattern to match before (or at) the 1493 * first newline. Since: 2.34 1494 */ 1495 FIRSTLINE = 262144, 1496 /** 1497 * Names used to identify capturing subpatterns need not 1498 * be unique. This can be helpful for certain types of pattern when it 1499 * is known that only one instance of the named subpattern can ever be 1500 * matched. 1501 */ 1502 DUPNAMES = 524288, 1503 /** 1504 * Usually any newline character or character sequence is 1505 * recognized. If this option is set, the only recognized newline character 1506 * is '\r'. 1507 */ 1508 NEWLINE_CR = 1048576, 1509 /** 1510 * Usually any newline character or character sequence is 1511 * recognized. If this option is set, the only recognized newline character 1512 * is '\n'. 1513 */ 1514 NEWLINE_LF = 2097152, 1515 /** 1516 * Usually any newline character or character sequence is 1517 * recognized. If this option is set, the only recognized newline character 1518 * sequence is '\r\n'. 1519 */ 1520 NEWLINE_CRLF = 3145728, 1521 /** 1522 * Usually any newline character or character sequence 1523 * is recognized. If this option is set, the only recognized newline character 1524 * sequences are '\r', '\n', and '\r\n'. Since: 2.34 1525 */ 1526 NEWLINE_ANYCRLF = 5242880, 1527 /** 1528 * Usually any newline character or character sequence 1529 * is recognised. If this option is set, then "\R" only recognizes the newline 1530 * characters '\r', '\n' and '\r\n'. Since: 2.34 1531 */ 1532 BSR_ANYCRLF = 8388608, 1533 /** 1534 * Changes behaviour so that it is compatible with 1535 * JavaScript rather than PCRE. Since: 2.34 1536 */ 1537 JAVASCRIPT_COMPAT = 33554432, 1538 } 1539 alias GRegexCompileFlags RegexCompileFlags; 1540 1541 /** 1542 * Error codes returned by regular expressions functions. 1543 * 1544 * Since: 2.14 1545 */ 1546 public enum GRegexError 1547 { 1548 /** 1549 * Compilation of the regular expression failed. 1550 */ 1551 COMPILE = 0, 1552 /** 1553 * Optimization of the regular expression failed. 1554 */ 1555 OPTIMIZE = 1, 1556 /** 1557 * Replacement failed due to an ill-formed replacement 1558 * string. 1559 */ 1560 REPLACE = 2, 1561 /** 1562 * The match process failed. 1563 */ 1564 MATCH = 3, 1565 /** 1566 * Internal error of the regular expression engine. 1567 * Since 2.16 1568 */ 1569 INTERNAL = 4, 1570 /** 1571 * "\\" at end of pattern. Since 2.16 1572 */ 1573 STRAY_BACKSLASH = 101, 1574 /** 1575 * "\\c" at end of pattern. Since 2.16 1576 */ 1577 MISSING_CONTROL_CHAR = 102, 1578 /** 1579 * Unrecognized character follows "\\". 1580 * Since 2.16 1581 */ 1582 UNRECOGNIZED_ESCAPE = 103, 1583 /** 1584 * Numbers out of order in "{}" 1585 * quantifier. Since 2.16 1586 */ 1587 QUANTIFIERS_OUT_OF_ORDER = 104, 1588 /** 1589 * Number too big in "{}" quantifier. 1590 * Since 2.16 1591 */ 1592 QUANTIFIER_TOO_BIG = 105, 1593 /** 1594 * Missing terminating "]" for 1595 * character class. Since 2.16 1596 */ 1597 UNTERMINATED_CHARACTER_CLASS = 106, 1598 /** 1599 * Invalid escape sequence 1600 * in character class. Since 2.16 1601 */ 1602 INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, 1603 /** 1604 * Range out of order in character class. 1605 * Since 2.16 1606 */ 1607 RANGE_OUT_OF_ORDER = 108, 1608 /** 1609 * Nothing to repeat. Since 2.16 1610 */ 1611 NOTHING_TO_REPEAT = 109, 1612 /** 1613 * Unrecognized character after "(?", 1614 * "(?<" or "(?P". Since 2.16 1615 */ 1616 UNRECOGNIZED_CHARACTER = 112, 1617 /** 1618 * POSIX named classes are 1619 * supported only within a class. Since 2.16 1620 */ 1621 POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, 1622 /** 1623 * Missing terminating ")" or ")" 1624 * without opening "(". Since 2.16 1625 */ 1626 UNMATCHED_PARENTHESIS = 114, 1627 /** 1628 * Reference to non-existent 1629 * subpattern. Since 2.16 1630 */ 1631 INEXISTENT_SUBPATTERN_REFERENCE = 115, 1632 /** 1633 * Missing terminating ")" after comment. 1634 * Since 2.16 1635 */ 1636 UNTERMINATED_COMMENT = 118, 1637 /** 1638 * Regular expression too large. 1639 * Since 2.16 1640 */ 1641 EXPRESSION_TOO_LARGE = 120, 1642 /** 1643 * Failed to get memory. Since 2.16 1644 */ 1645 MEMORY_ERROR = 121, 1646 /** 1647 * Lookbehind assertion is not 1648 * fixed length. Since 2.16 1649 */ 1650 VARIABLE_LENGTH_LOOKBEHIND = 125, 1651 /** 1652 * Malformed number or name after "(?(". 1653 * Since 2.16 1654 */ 1655 MALFORMED_CONDITION = 126, 1656 /** 1657 * Conditional group contains 1658 * more than two branches. Since 2.16 1659 */ 1660 TOO_MANY_CONDITIONAL_BRANCHES = 127, 1661 /** 1662 * Assertion expected after "(?(". 1663 * Since 2.16 1664 */ 1665 ASSERTION_EXPECTED = 128, 1666 /** 1667 * Unknown POSIX class name. 1668 * Since 2.16 1669 */ 1670 UNKNOWN_POSIX_CLASS_NAME = 130, 1671 /** 1672 * POSIX collating 1673 * elements are not supported. Since 2.16 1674 */ 1675 POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, 1676 /** 1677 * Character value in "\\x{...}" sequence 1678 * is too large. Since 2.16 1679 */ 1680 HEX_CODE_TOO_LARGE = 134, 1681 /** 1682 * Invalid condition "(?(0)". Since 2.16 1683 */ 1684 INVALID_CONDITION = 135, 1685 /** 1686 * \\C not allowed in 1687 * lookbehind assertion. Since 2.16 1688 */ 1689 SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, 1690 /** 1691 * Recursive call could loop indefinitely. 1692 * Since 2.16 1693 */ 1694 INFINITE_LOOP = 140, 1695 /** 1696 * Missing terminator 1697 * in subpattern name. Since 2.16 1698 */ 1699 MISSING_SUBPATTERN_NAME_TERMINATOR = 142, 1700 /** 1701 * Two named subpatterns have 1702 * the same name. Since 2.16 1703 */ 1704 DUPLICATE_SUBPATTERN_NAME = 143, 1705 /** 1706 * Malformed "\\P" or "\\p" sequence. 1707 * Since 2.16 1708 */ 1709 MALFORMED_PROPERTY = 146, 1710 /** 1711 * Unknown property name after "\\P" or 1712 * "\\p". Since 2.16 1713 */ 1714 UNKNOWN_PROPERTY = 147, 1715 /** 1716 * Subpattern name is too long 1717 * (maximum 32 characters). Since 2.16 1718 */ 1719 SUBPATTERN_NAME_TOO_LONG = 148, 1720 /** 1721 * Too many named subpatterns (maximum 1722 * 10,000). Since 2.16 1723 */ 1724 TOO_MANY_SUBPATTERNS = 149, 1725 /** 1726 * Octal value is greater than "\\377". 1727 * Since 2.16 1728 */ 1729 INVALID_OCTAL_VALUE = 151, 1730 /** 1731 * "DEFINE" group contains more 1732 * than one branch. Since 2.16 1733 */ 1734 TOO_MANY_BRANCHES_IN_DEFINE = 154, 1735 /** 1736 * Repeating a "DEFINE" group is not allowed. 1737 * This error is never raised. Since: 2.16 Deprecated: 2.34 1738 */ 1739 DEFINE_REPETION = 155, 1740 /** 1741 * Inconsistent newline options. 1742 * Since 2.16 1743 */ 1744 INCONSISTENT_NEWLINE_OPTIONS = 156, 1745 /** 1746 * "\\g" is not followed by a braced, 1747 * angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16 1748 */ 1749 MISSING_BACK_REFERENCE = 157, 1750 /** 1751 * relative reference must not be zero. Since: 2.34 1752 */ 1753 INVALID_RELATIVE_REFERENCE = 158, 1754 /** 1755 * the backtracing 1756 * control verb used does not allow an argument. Since: 2.34 1757 */ 1758 BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159, 1759 /** 1760 * unknown backtracing 1761 * control verb. Since: 2.34 1762 */ 1763 UNKNOWN_BACKTRACKING_CONTROL_VERB = 160, 1764 /** 1765 * number is too big in escape sequence. Since: 2.34 1766 */ 1767 NUMBER_TOO_BIG = 161, 1768 /** 1769 * Missing subpattern name. Since: 2.34 1770 */ 1771 MISSING_SUBPATTERN_NAME = 162, 1772 /** 1773 * Missing digit. Since 2.34 1774 */ 1775 MISSING_DIGIT = 163, 1776 /** 1777 * In JavaScript compatibility mode, 1778 * "[" is an invalid data character. Since: 2.34 1779 */ 1780 INVALID_DATA_CHARACTER = 164, 1781 /** 1782 * different names for subpatterns of the 1783 * same number are not allowed. Since: 2.34 1784 */ 1785 EXTRA_SUBPATTERN_NAME = 165, 1786 /** 1787 * the backtracing control 1788 * verb requires an argument. Since: 2.34 1789 */ 1790 BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166, 1791 /** 1792 * "\\c" must be followed by an ASCII 1793 * character. Since: 2.34 1794 */ 1795 INVALID_CONTROL_CHAR = 168, 1796 /** 1797 * "\\k" is not followed by a braced, angle-bracketed, or 1798 * quoted name. Since: 2.34 1799 */ 1800 MISSING_NAME = 169, 1801 /** 1802 * "\\N" is not supported in a class. Since: 2.34 1803 */ 1804 NOT_SUPPORTED_IN_CLASS = 171, 1805 /** 1806 * too many forward references. Since: 2.34 1807 */ 1808 TOO_MANY_FORWARD_REFERENCES = 172, 1809 /** 1810 * the name is too long in "(*MARK)", "(*PRUNE)", 1811 * "(*SKIP)", or "(*THEN)". Since: 2.34 1812 */ 1813 NAME_TOO_LONG = 175, 1814 /** 1815 * the character value in the \\u sequence is 1816 * too large. Since: 2.34 1817 */ 1818 CHARACTER_VALUE_TOO_LARGE = 176, 1819 } 1820 alias GRegexError RegexError; 1821 1822 /** 1823 * Flags specifying match-time options. 1824 * 1825 * Since: 2.14 1826 */ 1827 public enum GRegexMatchFlags 1828 { 1829 /** 1830 * The pattern is forced to be "anchored", that is, 1831 * it is constrained to match only at the first matching point in the 1832 * string that is being searched. This effect can also be achieved by 1833 * appropriate constructs in the pattern itself such as the "^" 1834 * metacharacter. 1835 */ 1836 ANCHORED = 16, 1837 /** 1838 * Specifies that first character of the string is 1839 * not the beginning of a line, so the circumflex metacharacter should 1840 * not match before it. Setting this without #G_REGEX_MULTILINE (at 1841 * compile time) causes circumflex never to match. This option affects 1842 * only the behaviour of the circumflex metacharacter, it does not 1843 * affect "\A". 1844 */ 1845 NOTBOL = 128, 1846 /** 1847 * Specifies that the end of the subject string is 1848 * not the end of a line, so the dollar metacharacter should not match 1849 * it nor (except in multiline mode) a newline immediately before it. 1850 * Setting this without #G_REGEX_MULTILINE (at compile time) causes 1851 * dollar never to match. This option affects only the behaviour of 1852 * the dollar metacharacter, it does not affect "\Z" or "\z". 1853 */ 1854 NOTEOL = 256, 1855 /** 1856 * An empty string is not considered to be a valid 1857 * match if this option is set. If there are alternatives in the pattern, 1858 * they are tried. If all the alternatives match the empty string, the 1859 * entire match fails. For example, if the pattern "a?b?" is applied to 1860 * a string not beginning with "a" or "b", it matches the empty string 1861 * at the start of the string. With this flag set, this match is not 1862 * valid, so GRegex searches further into the string for occurrences 1863 * of "a" or "b". 1864 */ 1865 NOTEMPTY = 1024, 1866 /** 1867 * Turns on the partial matching feature, for more 1868 * documentation on partial matching see g_match_info_is_partial_match(). 1869 */ 1870 PARTIAL = 32768, 1871 /** 1872 * Overrides the newline definition set when 1873 * creating a new #GRegex, setting the '\r' character as line terminator. 1874 */ 1875 NEWLINE_CR = 1048576, 1876 /** 1877 * Overrides the newline definition set when 1878 * creating a new #GRegex, setting the '\n' character as line terminator. 1879 */ 1880 NEWLINE_LF = 2097152, 1881 /** 1882 * Overrides the newline definition set when 1883 * creating a new #GRegex, setting the '\r\n' characters sequence as line terminator. 1884 */ 1885 NEWLINE_CRLF = 3145728, 1886 /** 1887 * Overrides the newline definition set when 1888 * creating a new #GRegex, any Unicode newline sequence 1889 * is recognised as a newline. These are '\r', '\n' and '\rn', and the 1890 * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), 1891 * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and 1892 * U+2029 PARAGRAPH SEPARATOR. 1893 */ 1894 NEWLINE_ANY = 4194304, 1895 /** 1896 * Overrides the newline definition set when 1897 * creating a new #GRegex; any '\r', '\n', or '\r\n' character sequence 1898 * is recognized as a newline. Since: 2.34 1899 */ 1900 NEWLINE_ANYCRLF = 5242880, 1901 /** 1902 * Overrides the newline definition for "\R" set when 1903 * creating a new #GRegex; only '\r', '\n', or '\r\n' character sequences 1904 * are recognized as a newline by "\R". Since: 2.34 1905 */ 1906 BSR_ANYCRLF = 8388608, 1907 /** 1908 * Overrides the newline definition for "\R" set when 1909 * creating a new #GRegex; any Unicode newline character or character sequence 1910 * are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the 1911 * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), 1912 * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and 1913 * U+2029 PARAGRAPH SEPARATOR. Since: 2.34 1914 */ 1915 BSR_ANY = 16777216, 1916 /** 1917 * An alias for #G_REGEX_MATCH_PARTIAL. Since: 2.34 1918 */ 1919 PARTIAL_SOFT = 32768, 1920 /** 1921 * Turns on the partial matching feature. In contrast to 1922 * to #G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match 1923 * is found, without continuing to search for a possible complete match. See 1924 * g_match_info_is_partial_match() for more information. Since: 2.34 1925 */ 1926 PARTIAL_HARD = 134217728, 1927 /** 1928 * Like #G_REGEX_MATCH_NOTEMPTY, but only applied to 1929 * the start of the matched string. For anchored 1930 * patterns this can only happen for pattern containing "\K". Since: 2.34 1931 */ 1932 NOTEMPTY_ATSTART = 268435456, 1933 } 1934 alias GRegexMatchFlags RegexMatchFlags; 1935 1936 /** 1937 * An enumeration specifying the base position for a 1938 * g_io_channel_seek_position() operation. 1939 */ 1940 public enum GSeekType 1941 { 1942 /** 1943 * the current position in the file. 1944 */ 1945 CUR = 0, 1946 /** 1947 * the start of the file. 1948 */ 1949 SET = 1, 1950 /** 1951 * the end of the file. 1952 */ 1953 END = 2, 1954 } 1955 alias GSeekType SeekType; 1956 1957 /** 1958 * Error codes returned by shell functions. 1959 */ 1960 public enum GShellError 1961 { 1962 /** 1963 * Mismatched or otherwise mangled quoting. 1964 */ 1965 BAD_QUOTING = 0, 1966 /** 1967 * String to be parsed was empty. 1968 */ 1969 EMPTY_STRING = 1, 1970 /** 1971 * Some other error. 1972 */ 1973 FAILED = 2, 1974 } 1975 alias GShellError ShellError; 1976 1977 public enum GSliceConfig 1978 { 1979 ALWAYS_MALLOC = 1, 1980 BYPASS_MAGAZINES = 2, 1981 WORKING_SET_MSECS = 3, 1982 COLOR_INCREMENT = 4, 1983 CHUNK_SIZES = 5, 1984 CONTENTION_COUNTER = 6, 1985 } 1986 alias GSliceConfig SliceConfig; 1987 1988 /** 1989 * Error codes returned by spawning processes. 1990 */ 1991 public enum GSpawnError 1992 { 1993 /** 1994 * Fork failed due to lack of memory. 1995 */ 1996 FORK = 0, 1997 /** 1998 * Read or select on pipes failed. 1999 */ 2000 READ = 1, 2001 /** 2002 * Changing to working directory failed. 2003 */ 2004 CHDIR = 2, 2005 /** 2006 * execv() returned `EACCES` 2007 */ 2008 ACCES = 3, 2009 /** 2010 * execv() returned `EPERM` 2011 */ 2012 PERM = 4, 2013 /** 2014 * execv() returned `E2BIG` 2015 */ 2016 TOO_BIG = 5, 2017 /** 2018 * execv() returned `ENOEXEC` 2019 */ 2020 NOEXEC = 6, 2021 /** 2022 * execv() returned `ENAMETOOLONG` 2023 */ 2024 NAMETOOLONG = 7, 2025 /** 2026 * execv() returned `ENOENT` 2027 */ 2028 NOENT = 8, 2029 /** 2030 * execv() returned `ENOMEM` 2031 */ 2032 NOMEM = 9, 2033 /** 2034 * execv() returned `ENOTDIR` 2035 */ 2036 NOTDIR = 10, 2037 /** 2038 * execv() returned `ELOOP` 2039 */ 2040 LOOP = 11, 2041 /** 2042 * execv() returned `ETXTBUSY` 2043 */ 2044 TXTBUSY = 12, 2045 /** 2046 * execv() returned `EIO` 2047 */ 2048 IO = 13, 2049 /** 2050 * execv() returned `ENFILE` 2051 */ 2052 NFILE = 14, 2053 /** 2054 * execv() returned `EMFILE` 2055 */ 2056 MFILE = 15, 2057 /** 2058 * execv() returned `EINVAL` 2059 */ 2060 INVAL = 16, 2061 /** 2062 * execv() returned `EISDIR` 2063 */ 2064 ISDIR = 17, 2065 /** 2066 * execv() returned `ELIBBAD` 2067 */ 2068 LIBBAD = 18, 2069 /** 2070 * Some other fatal failure, 2071 * `error->message` should explain. 2072 */ 2073 FAILED = 19, 2074 } 2075 alias GSpawnError SpawnError; 2076 2077 /** 2078 * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). 2079 */ 2080 public enum GSpawnFlags 2081 { 2082 /** 2083 * no flags, default behaviour 2084 */ 2085 DEFAULT = 0, 2086 /** 2087 * the parent's open file descriptors will 2088 * be inherited by the child; otherwise all descriptors except stdin, 2089 * stdout and stderr will be closed before calling exec() in the child. 2090 */ 2091 LEAVE_DESCRIPTORS_OPEN = 1, 2092 /** 2093 * the child will not be automatically reaped; 2094 * you must use g_child_watch_add() yourself (or call waitpid() or handle 2095 * `SIGCHLD` yourself), or the child will become a zombie. 2096 */ 2097 DO_NOT_REAP_CHILD = 2, 2098 /** 2099 * `argv[0]` need not be an absolute path, it will be 2100 * looked for in the user's `PATH`. 2101 */ 2102 SEARCH_PATH = 4, 2103 /** 2104 * the child's standard output will be discarded, 2105 * instead of going to the same location as the parent's standard output. 2106 */ 2107 STDOUT_TO_DEV_NULL = 8, 2108 /** 2109 * the child's standard error will be discarded. 2110 */ 2111 STDERR_TO_DEV_NULL = 16, 2112 /** 2113 * the child will inherit the parent's standard 2114 * input (by default, the child's standard input is attached to `/dev/null`). 2115 */ 2116 CHILD_INHERITS_STDIN = 32, 2117 /** 2118 * the first element of `argv` is the file to 2119 * execute, while the remaining elements are the actual argument vector 2120 * to pass to the file. Normally g_spawn_async_with_pipes() uses `argv[0]` 2121 * as the file to execute, and passes all of `argv` to the child. 2122 */ 2123 FILE_AND_ARGV_ZERO = 64, 2124 /** 2125 * if `argv[0]` is not an abolute path, 2126 * it will be looked for in the `PATH` from the passed child environment. 2127 * Since: 2.34 2128 */ 2129 SEARCH_PATH_FROM_ENVP = 128, 2130 /** 2131 * create all pipes with the `O_CLOEXEC` flag set. 2132 * Since: 2.40 2133 */ 2134 CLOEXEC_PIPES = 256, 2135 } 2136 alias GSpawnFlags SpawnFlags; 2137 2138 /** 2139 * The type of file to return the filename for, when used with 2140 * g_test_build_filename(). 2141 * 2142 * These two options correspond rather directly to the 'dist' and 2143 * 'built' terminology that automake uses and are explicitly used to 2144 * distinguish between the 'srcdir' and 'builddir' being separate. All 2145 * files in your project should either be dist (in the 2146 * `EXTRA_DIST` or `dist_schema_DATA` 2147 * sense, in which case they will always be in the srcdir) or built (in 2148 * the `BUILT_SOURCES` sense, in which case they will 2149 * always be in the builddir). 2150 * 2151 * Note: as a general rule of automake, files that are generated only as 2152 * part of the build-from-git process (but then are distributed with the 2153 * tarball) always go in srcdir (even if doing a srcdir != builddir 2154 * build from git) and are considered as distributed files. 2155 * 2156 * Since: 2.38 2157 */ 2158 public enum GTestFileType 2159 { 2160 /** 2161 * a file that was included in the distribution tarball 2162 */ 2163 DIST = 0, 2164 /** 2165 * a file that was built on the compiling machine 2166 */ 2167 BUILT = 1, 2168 } 2169 alias GTestFileType TestFileType; 2170 2171 public enum GTestLogType 2172 { 2173 NONE = 0, 2174 ERROR = 1, 2175 START_BINARY = 2, 2176 LIST_CASE = 3, 2177 SKIP_CASE = 4, 2178 START_CASE = 5, 2179 STOP_CASE = 6, 2180 MIN_RESULT = 7, 2181 MAX_RESULT = 8, 2182 MESSAGE = 9, 2183 START_SUITE = 10, 2184 STOP_SUITE = 11, 2185 } 2186 alias GTestLogType TestLogType; 2187 2188 public enum GTestResult 2189 { 2190 SUCCESS = 0, 2191 SKIPPED = 1, 2192 FAILURE = 2, 2193 INCOMPLETE = 3, 2194 } 2195 alias GTestResult TestResult; 2196 2197 /** 2198 * Flags to pass to g_test_trap_subprocess() to control input and output. 2199 * 2200 * Note that in contrast with g_test_trap_fork(), the default is to 2201 * not show stdout and stderr. 2202 */ 2203 public enum GTestSubprocessFlags 2204 { 2205 /** 2206 * If this flag is given, the child 2207 * process will inherit the parent's stdin. Otherwise, the child's 2208 * stdin is redirected to `/dev/null`. 2209 */ 2210 STDIN = 1, 2211 /** 2212 * If this flag is given, the child 2213 * process will inherit the parent's stdout. Otherwise, the child's 2214 * stdout will not be visible, but it will be captured to allow 2215 * later tests with g_test_trap_assert_stdout(). 2216 */ 2217 STDOUT = 2, 2218 /** 2219 * If this flag is given, the child 2220 * process will inherit the parent's stderr. Otherwise, the child's 2221 * stderr will not be visible, but it will be captured to allow 2222 * later tests with g_test_trap_assert_stderr(). 2223 */ 2224 STDERR = 4, 2225 } 2226 alias GTestSubprocessFlags TestSubprocessFlags; 2227 2228 /** 2229 * Test traps are guards around forked tests. 2230 * These flags determine what traps to set. 2231 * 2232 * Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(), 2233 * which is deprecated. g_test_trap_subprocess() uses 2234 * #GTestSubprocessFlags. 2235 */ 2236 public enum GTestTrapFlags 2237 { 2238 /** 2239 * Redirect stdout of the test child to 2240 * `/dev/null` so it cannot be observed on the console during test 2241 * runs. The actual output is still captured though to allow later 2242 * tests with g_test_trap_assert_stdout(). 2243 */ 2244 SILENCE_STDOUT = 128, 2245 /** 2246 * Redirect stderr of the test child to 2247 * `/dev/null` so it cannot be observed on the console during test 2248 * runs. The actual output is still captured though to allow later 2249 * tests with g_test_trap_assert_stderr(). 2250 */ 2251 SILENCE_STDERR = 256, 2252 /** 2253 * If this flag is given, stdin of the 2254 * child process is shared with stdin of its parent process. 2255 * It is redirected to `/dev/null` otherwise. 2256 */ 2257 INHERIT_STDIN = 512, 2258 } 2259 alias GTestTrapFlags TestTrapFlags; 2260 2261 /** 2262 * Possible errors of thread related functions. 2263 */ 2264 public enum GThreadError 2265 { 2266 /** 2267 * a thread couldn't be created due to resource 2268 * shortage. Try again later. 2269 */ 2270 THREAD_ERROR_AGAIN = 0, 2271 } 2272 alias GThreadError ThreadError; 2273 2274 /** 2275 * Disambiguates a given time in two ways. 2276 * 2277 * First, specifies if the given time is in universal or local time. 2278 * 2279 * Second, if the time is in local time, specifies if it is local 2280 * standard time or local daylight time. This is important for the case 2281 * where the same local time occurs twice (during daylight savings time 2282 * transitions, for example). 2283 */ 2284 public enum GTimeType 2285 { 2286 /** 2287 * the time is in local standard time 2288 */ 2289 STANDARD = 0, 2290 /** 2291 * the time is in local daylight time 2292 */ 2293 DAYLIGHT = 1, 2294 /** 2295 * the time is in UTC 2296 */ 2297 UNIVERSAL = 2, 2298 } 2299 alias GTimeType TimeType; 2300 2301 /** 2302 * The possible types of token returned from each 2303 * g_scanner_get_next_token() call. 2304 */ 2305 public enum GTokenType 2306 { 2307 /** 2308 * the end of the file 2309 */ 2310 EOF = 0, 2311 /** 2312 * a '(' character 2313 */ 2314 LEFT_PAREN = 40, 2315 /** 2316 * a ')' character 2317 */ 2318 RIGHT_PAREN = 41, 2319 /** 2320 * a '{' character 2321 */ 2322 LEFT_CURLY = 123, 2323 /** 2324 * a '}' character 2325 */ 2326 RIGHT_CURLY = 125, 2327 /** 2328 * a '[' character 2329 */ 2330 LEFT_BRACE = 91, 2331 /** 2332 * a ']' character 2333 */ 2334 RIGHT_BRACE = 93, 2335 /** 2336 * a '=' character 2337 */ 2338 EQUAL_SIGN = 61, 2339 /** 2340 * a ',' character 2341 */ 2342 COMMA = 44, 2343 /** 2344 * not a token 2345 */ 2346 NONE = 256, 2347 /** 2348 * an error occurred 2349 */ 2350 ERROR = 257, 2351 /** 2352 * a character 2353 */ 2354 CHAR = 258, 2355 /** 2356 * a binary integer 2357 */ 2358 BINARY = 259, 2359 /** 2360 * an octal integer 2361 */ 2362 OCTAL = 260, 2363 /** 2364 * an integer 2365 */ 2366 INT = 261, 2367 /** 2368 * a hex integer 2369 */ 2370 HEX = 262, 2371 /** 2372 * a floating point number 2373 */ 2374 FLOAT = 263, 2375 /** 2376 * a string 2377 */ 2378 STRING = 264, 2379 /** 2380 * a symbol 2381 */ 2382 SYMBOL = 265, 2383 /** 2384 * an identifier 2385 */ 2386 IDENTIFIER = 266, 2387 /** 2388 * a null identifier 2389 */ 2390 IDENTIFIER_NULL = 267, 2391 /** 2392 * one line comment 2393 */ 2394 COMMENT_SINGLE = 268, 2395 /** 2396 * multi line comment 2397 */ 2398 COMMENT_MULTI = 269, 2399 } 2400 alias GTokenType TokenType; 2401 2402 /** 2403 * Specifies which nodes are visited during several of the tree 2404 * functions, including g_node_traverse() and g_node_find(). 2405 */ 2406 public enum GTraverseFlags 2407 { 2408 /** 2409 * only leaf nodes should be visited. This name has 2410 * been introduced in 2.6, for older version use 2411 * %G_TRAVERSE_LEAFS. 2412 */ 2413 LEAVES = 1, 2414 /** 2415 * only non-leaf nodes should be visited. This 2416 * name has been introduced in 2.6, for older 2417 * version use %G_TRAVERSE_NON_LEAFS. 2418 */ 2419 NON_LEAVES = 2, 2420 /** 2421 * all nodes should be visited. 2422 */ 2423 ALL = 3, 2424 /** 2425 * a mask of all traverse flags. 2426 */ 2427 MASK = 3, 2428 /** 2429 * identical to %G_TRAVERSE_LEAVES. 2430 */ 2431 LEAFS = 1, 2432 /** 2433 * identical to %G_TRAVERSE_NON_LEAVES. 2434 */ 2435 NON_LEAFS = 2, 2436 } 2437 alias GTraverseFlags TraverseFlags; 2438 2439 /** 2440 * Specifies the type of traveral performed by g_tree_traverse(), 2441 * g_node_traverse() and g_node_find(). The different orders are 2442 * illustrated here: 2443 * - In order: A, B, C, D, E, F, G, H, I 2444 * ![](Sorted_binary_tree_inorder.svg) 2445 * - Pre order: F, B, A, D, C, E, G, I, H 2446 * ![](Sorted_binary_tree_preorder.svg) 2447 * - Post order: A, C, E, D, B, H, I, G, F 2448 * ![](Sorted_binary_tree_postorder.svg) 2449 * - Level order: F, B, G, A, D, I, C, E, H 2450 * ![](Sorted_binary_tree_breadth-first_traversal.svg) 2451 */ 2452 public enum GTraverseType 2453 { 2454 /** 2455 * vists a node's left child first, then the node itself, 2456 * then its right child. This is the one to use if you 2457 * want the output sorted according to the compare 2458 * function. 2459 */ 2460 IN_ORDER = 0, 2461 /** 2462 * visits a node, then its children. 2463 */ 2464 PRE_ORDER = 1, 2465 /** 2466 * visits the node's children, then the node itself. 2467 */ 2468 POST_ORDER = 2, 2469 /** 2470 * is not implemented for 2471 * [balanced binary trees][glib-Balanced-Binary-Trees]. 2472 * For [n-ary trees][glib-N-ary-Trees], it 2473 * vists the root node first, then its children, then 2474 * its grandchildren, and so on. Note that this is less 2475 * efficient than the other orders. 2476 */ 2477 LEVEL_ORDER = 3, 2478 } 2479 alias GTraverseType TraverseType; 2480 2481 /** 2482 * These are the possible line break classifications. 2483 * 2484 * Since new unicode versions may add new types here, applications should be ready 2485 * to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN. 2486 * 2487 * See [Unicode Line Breaking Algorithm](http://www.unicode.org/unicode/reports/tr14/). 2488 */ 2489 public enum GUnicodeBreakType 2490 { 2491 /** 2492 * Mandatory Break (BK) 2493 */ 2494 MANDATORY = 0, 2495 /** 2496 * Carriage Return (CR) 2497 */ 2498 CARRIAGE_RETURN = 1, 2499 /** 2500 * Line Feed (LF) 2501 */ 2502 LINE_FEED = 2, 2503 /** 2504 * Attached Characters and Combining Marks (CM) 2505 */ 2506 COMBINING_MARK = 3, 2507 /** 2508 * Surrogates (SG) 2509 */ 2510 SURROGATE = 4, 2511 /** 2512 * Zero Width Space (ZW) 2513 */ 2514 ZERO_WIDTH_SPACE = 5, 2515 /** 2516 * Inseparable (IN) 2517 */ 2518 INSEPARABLE = 6, 2519 /** 2520 * Non-breaking ("Glue") (GL) 2521 */ 2522 NON_BREAKING_GLUE = 7, 2523 /** 2524 * Contingent Break Opportunity (CB) 2525 */ 2526 CONTINGENT = 8, 2527 /** 2528 * Space (SP) 2529 */ 2530 SPACE = 9, 2531 /** 2532 * Break Opportunity After (BA) 2533 */ 2534 AFTER = 10, 2535 /** 2536 * Break Opportunity Before (BB) 2537 */ 2538 BEFORE = 11, 2539 /** 2540 * Break Opportunity Before and After (B2) 2541 */ 2542 BEFORE_AND_AFTER = 12, 2543 /** 2544 * Hyphen (HY) 2545 */ 2546 HYPHEN = 13, 2547 /** 2548 * Nonstarter (NS) 2549 */ 2550 NON_STARTER = 14, 2551 /** 2552 * Opening Punctuation (OP) 2553 */ 2554 OPEN_PUNCTUATION = 15, 2555 /** 2556 * Closing Punctuation (CL) 2557 */ 2558 CLOSE_PUNCTUATION = 16, 2559 /** 2560 * Ambiguous Quotation (QU) 2561 */ 2562 QUOTATION = 17, 2563 /** 2564 * Exclamation/Interrogation (EX) 2565 */ 2566 EXCLAMATION = 18, 2567 /** 2568 * Ideographic (ID) 2569 */ 2570 IDEOGRAPHIC = 19, 2571 /** 2572 * Numeric (NU) 2573 */ 2574 NUMERIC = 20, 2575 /** 2576 * Infix Separator (Numeric) (IS) 2577 */ 2578 INFIX_SEPARATOR = 21, 2579 /** 2580 * Symbols Allowing Break After (SY) 2581 */ 2582 SYMBOL = 22, 2583 /** 2584 * Ordinary Alphabetic and Symbol Characters (AL) 2585 */ 2586 ALPHABETIC = 23, 2587 /** 2588 * Prefix (Numeric) (PR) 2589 */ 2590 PREFIX = 24, 2591 /** 2592 * Postfix (Numeric) (PO) 2593 */ 2594 POSTFIX = 25, 2595 /** 2596 * Complex Content Dependent (South East Asian) (SA) 2597 */ 2598 COMPLEX_CONTEXT = 26, 2599 /** 2600 * Ambiguous (Alphabetic or Ideographic) (AI) 2601 */ 2602 AMBIGUOUS = 27, 2603 /** 2604 * Unknown (XX) 2605 */ 2606 UNKNOWN = 28, 2607 /** 2608 * Next Line (NL) 2609 */ 2610 NEXT_LINE = 29, 2611 /** 2612 * Word Joiner (WJ) 2613 */ 2614 WORD_JOINER = 30, 2615 /** 2616 * Hangul L Jamo (JL) 2617 */ 2618 HANGUL_L_JAMO = 31, 2619 /** 2620 * Hangul V Jamo (JV) 2621 */ 2622 HANGUL_V_JAMO = 32, 2623 /** 2624 * Hangul T Jamo (JT) 2625 */ 2626 HANGUL_T_JAMO = 33, 2627 /** 2628 * Hangul LV Syllable (H2) 2629 */ 2630 HANGUL_LV_SYLLABLE = 34, 2631 /** 2632 * Hangul LVT Syllable (H3) 2633 */ 2634 HANGUL_LVT_SYLLABLE = 35, 2635 /** 2636 * Closing Parenthesis (CP). Since 2.28 2637 */ 2638 CLOSE_PARANTHESIS = 36, 2639 /** 2640 * Conditional Japanese Starter (CJ). Since: 2.32 2641 */ 2642 CONDITIONAL_JAPANESE_STARTER = 37, 2643 /** 2644 * Hebrew Letter (HL). Since: 2.32 2645 */ 2646 HEBREW_LETTER = 38, 2647 /** 2648 * Regional Indicator (RI). Since: 2.36 2649 */ 2650 REGIONAL_INDICATOR = 39, 2651 /** 2652 * Emoji Base (EB). Since: 2.50 2653 */ 2654 EMOJI_BASE = 40, 2655 /** 2656 * Emoji Modifier (EM). Since: 2.50 2657 */ 2658 EMOJI_MODIFIER = 41, 2659 /** 2660 * Zero Width Joiner (ZWJ). Since: 2.50 2661 */ 2662 ZERO_WIDTH_JOINER = 42, 2663 } 2664 alias GUnicodeBreakType UnicodeBreakType; 2665 2666 /** 2667 * The #GUnicodeScript enumeration identifies different writing 2668 * systems. The values correspond to the names as defined in the 2669 * Unicode standard. The enumeration has been added in GLib 2.14, 2670 * and is interchangeable with #PangoScript. 2671 * 2672 * Note that new types may be added in the future. Applications 2673 * should be ready to handle unknown values. 2674 * See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr24/). 2675 */ 2676 public enum GUnicodeScript 2677 { 2678 /** 2679 * a value never returned from g_unichar_get_script() 2680 */ 2681 INVALID_CODE = -1, 2682 /** 2683 * a character used by multiple different scripts 2684 */ 2685 COMMON = 0, 2686 /** 2687 * a mark glyph that takes its script from the 2688 * base glyph to which it is attached 2689 */ 2690 INHERITED = 1, 2691 /** 2692 * Arabic 2693 */ 2694 ARABIC = 2, 2695 /** 2696 * Armenian 2697 */ 2698 ARMENIAN = 3, 2699 /** 2700 * Bengali 2701 */ 2702 BENGALI = 4, 2703 /** 2704 * Bopomofo 2705 */ 2706 BOPOMOFO = 5, 2707 /** 2708 * Cherokee 2709 */ 2710 CHEROKEE = 6, 2711 /** 2712 * Coptic 2713 */ 2714 COPTIC = 7, 2715 /** 2716 * Cyrillic 2717 */ 2718 CYRILLIC = 8, 2719 /** 2720 * Deseret 2721 */ 2722 DESERET = 9, 2723 /** 2724 * Devanagari 2725 */ 2726 DEVANAGARI = 10, 2727 /** 2728 * Ethiopic 2729 */ 2730 ETHIOPIC = 11, 2731 /** 2732 * Georgian 2733 */ 2734 GEORGIAN = 12, 2735 /** 2736 * Gothic 2737 */ 2738 GOTHIC = 13, 2739 /** 2740 * Greek 2741 */ 2742 GREEK = 14, 2743 /** 2744 * Gujarati 2745 */ 2746 GUJARATI = 15, 2747 /** 2748 * Gurmukhi 2749 */ 2750 GURMUKHI = 16, 2751 /** 2752 * Han 2753 */ 2754 HAN = 17, 2755 /** 2756 * Hangul 2757 */ 2758 HANGUL = 18, 2759 /** 2760 * Hebrew 2761 */ 2762 HEBREW = 19, 2763 /** 2764 * Hiragana 2765 */ 2766 HIRAGANA = 20, 2767 /** 2768 * Kannada 2769 */ 2770 KANNADA = 21, 2771 /** 2772 * Katakana 2773 */ 2774 KATAKANA = 22, 2775 /** 2776 * Khmer 2777 */ 2778 KHMER = 23, 2779 /** 2780 * Lao 2781 */ 2782 LAO = 24, 2783 /** 2784 * Latin 2785 */ 2786 LATIN = 25, 2787 /** 2788 * Malayalam 2789 */ 2790 MALAYALAM = 26, 2791 /** 2792 * Mongolian 2793 */ 2794 MONGOLIAN = 27, 2795 /** 2796 * Myanmar 2797 */ 2798 MYANMAR = 28, 2799 /** 2800 * Ogham 2801 */ 2802 OGHAM = 29, 2803 /** 2804 * Old Italic 2805 */ 2806 OLD_ITALIC = 30, 2807 /** 2808 * Oriya 2809 */ 2810 ORIYA = 31, 2811 /** 2812 * Runic 2813 */ 2814 RUNIC = 32, 2815 /** 2816 * Sinhala 2817 */ 2818 SINHALA = 33, 2819 /** 2820 * Syriac 2821 */ 2822 SYRIAC = 34, 2823 /** 2824 * Tamil 2825 */ 2826 TAMIL = 35, 2827 /** 2828 * Telugu 2829 */ 2830 TELUGU = 36, 2831 /** 2832 * Thaana 2833 */ 2834 THAANA = 37, 2835 /** 2836 * Thai 2837 */ 2838 THAI = 38, 2839 /** 2840 * Tibetan 2841 */ 2842 TIBETAN = 39, 2843 /** 2844 * Canadian Aboriginal 2845 */ 2846 CANADIAN_ABORIGINAL = 40, 2847 /** 2848 * Yi 2849 */ 2850 YI = 41, 2851 /** 2852 * Tagalog 2853 */ 2854 TAGALOG = 42, 2855 /** 2856 * Hanunoo 2857 */ 2858 HANUNOO = 43, 2859 /** 2860 * Buhid 2861 */ 2862 BUHID = 44, 2863 /** 2864 * Tagbanwa 2865 */ 2866 TAGBANWA = 45, 2867 /** 2868 * Braille 2869 */ 2870 BRAILLE = 46, 2871 /** 2872 * Cypriot 2873 */ 2874 CYPRIOT = 47, 2875 /** 2876 * Limbu 2877 */ 2878 LIMBU = 48, 2879 /** 2880 * Osmanya 2881 */ 2882 OSMANYA = 49, 2883 /** 2884 * Shavian 2885 */ 2886 SHAVIAN = 50, 2887 /** 2888 * Linear B 2889 */ 2890 LINEAR_B = 51, 2891 /** 2892 * Tai Le 2893 */ 2894 TAI_LE = 52, 2895 /** 2896 * Ugaritic 2897 */ 2898 UGARITIC = 53, 2899 /** 2900 * New Tai Lue 2901 */ 2902 NEW_TAI_LUE = 54, 2903 /** 2904 * Buginese 2905 */ 2906 BUGINESE = 55, 2907 /** 2908 * Glagolitic 2909 */ 2910 GLAGOLITIC = 56, 2911 /** 2912 * Tifinagh 2913 */ 2914 TIFINAGH = 57, 2915 /** 2916 * Syloti Nagri 2917 */ 2918 SYLOTI_NAGRI = 58, 2919 /** 2920 * Old Persian 2921 */ 2922 OLD_PERSIAN = 59, 2923 /** 2924 * Kharoshthi 2925 */ 2926 KHAROSHTHI = 60, 2927 /** 2928 * an unassigned code point 2929 */ 2930 UNKNOWN = 61, 2931 /** 2932 * Balinese 2933 */ 2934 BALINESE = 62, 2935 /** 2936 * Cuneiform 2937 */ 2938 CUNEIFORM = 63, 2939 /** 2940 * Phoenician 2941 */ 2942 PHOENICIAN = 64, 2943 /** 2944 * Phags-pa 2945 */ 2946 PHAGS_PA = 65, 2947 /** 2948 * N'Ko 2949 */ 2950 NKO = 66, 2951 /** 2952 * Kayah Li. Since 2.16.3 2953 */ 2954 KAYAH_LI = 67, 2955 /** 2956 * Lepcha. Since 2.16.3 2957 */ 2958 LEPCHA = 68, 2959 /** 2960 * Rejang. Since 2.16.3 2961 */ 2962 REJANG = 69, 2963 /** 2964 * Sundanese. Since 2.16.3 2965 */ 2966 SUNDANESE = 70, 2967 /** 2968 * Saurashtra. Since 2.16.3 2969 */ 2970 SAURASHTRA = 71, 2971 /** 2972 * Cham. Since 2.16.3 2973 */ 2974 CHAM = 72, 2975 /** 2976 * Ol Chiki. Since 2.16.3 2977 */ 2978 OL_CHIKI = 73, 2979 /** 2980 * Vai. Since 2.16.3 2981 */ 2982 VAI = 74, 2983 /** 2984 * Carian. Since 2.16.3 2985 */ 2986 CARIAN = 75, 2987 /** 2988 * Lycian. Since 2.16.3 2989 */ 2990 LYCIAN = 76, 2991 /** 2992 * Lydian. Since 2.16.3 2993 */ 2994 LYDIAN = 77, 2995 /** 2996 * Avestan. Since 2.26 2997 */ 2998 AVESTAN = 78, 2999 /** 3000 * Bamum. Since 2.26 3001 */ 3002 BAMUM = 79, 3003 /** 3004 * Egyptian Hieroglpyhs. Since 2.26 3005 */ 3006 EGYPTIAN_HIEROGLYPHS = 80, 3007 /** 3008 * Imperial Aramaic. Since 2.26 3009 */ 3010 IMPERIAL_ARAMAIC = 81, 3011 /** 3012 * Inscriptional Pahlavi. Since 2.26 3013 */ 3014 INSCRIPTIONAL_PAHLAVI = 82, 3015 /** 3016 * Inscriptional Parthian. Since 2.26 3017 */ 3018 INSCRIPTIONAL_PARTHIAN = 83, 3019 /** 3020 * Javanese. Since 2.26 3021 */ 3022 JAVANESE = 84, 3023 /** 3024 * Kaithi. Since 2.26 3025 */ 3026 KAITHI = 85, 3027 /** 3028 * Lisu. Since 2.26 3029 */ 3030 LISU = 86, 3031 /** 3032 * Meetei Mayek. Since 2.26 3033 */ 3034 MEETEI_MAYEK = 87, 3035 /** 3036 * Old South Arabian. Since 2.26 3037 */ 3038 OLD_SOUTH_ARABIAN = 88, 3039 /** 3040 * Old Turkic. Since 2.28 3041 */ 3042 OLD_TURKIC = 89, 3043 /** 3044 * Samaritan. Since 2.26 3045 */ 3046 SAMARITAN = 90, 3047 /** 3048 * Tai Tham. Since 2.26 3049 */ 3050 TAI_THAM = 91, 3051 /** 3052 * Tai Viet. Since 2.26 3053 */ 3054 TAI_VIET = 92, 3055 /** 3056 * Batak. Since 2.28 3057 */ 3058 BATAK = 93, 3059 /** 3060 * Brahmi. Since 2.28 3061 */ 3062 BRAHMI = 94, 3063 /** 3064 * Mandaic. Since 2.28 3065 */ 3066 MANDAIC = 95, 3067 /** 3068 * Chakma. Since: 2.32 3069 */ 3070 CHAKMA = 96, 3071 /** 3072 * Meroitic Cursive. Since: 2.32 3073 */ 3074 MEROITIC_CURSIVE = 97, 3075 /** 3076 * Meroitic Hieroglyphs. Since: 2.32 3077 */ 3078 MEROITIC_HIEROGLYPHS = 98, 3079 /** 3080 * Miao. Since: 2.32 3081 */ 3082 MIAO = 99, 3083 /** 3084 * Sharada. Since: 2.32 3085 */ 3086 SHARADA = 100, 3087 /** 3088 * Sora Sompeng. Since: 2.32 3089 */ 3090 SORA_SOMPENG = 101, 3091 /** 3092 * Takri. Since: 2.32 3093 */ 3094 TAKRI = 102, 3095 /** 3096 * Bassa. Since: 2.42 3097 */ 3098 BASSA_VAH = 103, 3099 /** 3100 * Caucasian Albanian. Since: 2.42 3101 */ 3102 CAUCASIAN_ALBANIAN = 104, 3103 /** 3104 * Duployan. Since: 2.42 3105 */ 3106 DUPLOYAN = 105, 3107 /** 3108 * Elbasan. Since: 2.42 3109 */ 3110 ELBASAN = 106, 3111 /** 3112 * Grantha. Since: 2.42 3113 */ 3114 GRANTHA = 107, 3115 /** 3116 * Kjohki. Since: 2.42 3117 */ 3118 KHOJKI = 108, 3119 /** 3120 * Khudawadi, Sindhi. Since: 2.42 3121 */ 3122 KHUDAWADI = 109, 3123 /** 3124 * Linear A. Since: 2.42 3125 */ 3126 LINEAR_A = 110, 3127 /** 3128 * Mahajani. Since: 2.42 3129 */ 3130 MAHAJANI = 111, 3131 /** 3132 * Manichaean. Since: 2.42 3133 */ 3134 MANICHAEAN = 112, 3135 /** 3136 * Mende Kikakui. Since: 2.42 3137 */ 3138 MENDE_KIKAKUI = 113, 3139 /** 3140 * Modi. Since: 2.42 3141 */ 3142 MODI = 114, 3143 /** 3144 * Mro. Since: 2.42 3145 */ 3146 MRO = 115, 3147 /** 3148 * Nabataean. Since: 2.42 3149 */ 3150 NABATAEAN = 116, 3151 /** 3152 * Old North Arabian. Since: 2.42 3153 */ 3154 OLD_NORTH_ARABIAN = 117, 3155 /** 3156 * Old Permic. Since: 2.42 3157 */ 3158 OLD_PERMIC = 118, 3159 /** 3160 * Pahawh Hmong. Since: 2.42 3161 */ 3162 PAHAWH_HMONG = 119, 3163 /** 3164 * Palmyrene. Since: 2.42 3165 */ 3166 PALMYRENE = 120, 3167 /** 3168 * Pau Cin Hau. Since: 2.42 3169 */ 3170 PAU_CIN_HAU = 121, 3171 /** 3172 * Psalter Pahlavi. Since: 2.42 3173 */ 3174 PSALTER_PAHLAVI = 122, 3175 /** 3176 * Siddham. Since: 2.42 3177 */ 3178 SIDDHAM = 123, 3179 /** 3180 * Tirhuta. Since: 2.42 3181 */ 3182 TIRHUTA = 124, 3183 /** 3184 * Warang Citi. Since: 2.42 3185 */ 3186 WARANG_CITI = 125, 3187 /** 3188 * Ahom. Since: 2.48 3189 */ 3190 AHOM = 126, 3191 /** 3192 * Anatolian Hieroglyphs. Since: 2.48 3193 */ 3194 ANATOLIAN_HIEROGLYPHS = 127, 3195 /** 3196 * Hatran. Since: 2.48 3197 */ 3198 HATRAN = 128, 3199 /** 3200 * Multani. Since: 2.48 3201 */ 3202 MULTANI = 129, 3203 /** 3204 * Old Hungarian. Since: 2.48 3205 */ 3206 OLD_HUNGARIAN = 130, 3207 /** 3208 * Signwriting. Since: 2.48 3209 */ 3210 SIGNWRITING = 131, 3211 /** 3212 * Adlam. Since: 2.50 3213 */ 3214 ADLAM = 132, 3215 /** 3216 * Bhaiksuki. Since: 2.50 3217 */ 3218 BHAIKSUKI = 133, 3219 /** 3220 * Marchen. Since: 2.50 3221 */ 3222 MARCHEN = 134, 3223 /** 3224 * Newa. Since: 2.50 3225 */ 3226 NEWA = 135, 3227 /** 3228 * Osage. Since: 2.50 3229 */ 3230 OSAGE = 136, 3231 /** 3232 * Tangut. Since: 2.50 3233 */ 3234 TANGUT = 137, 3235 /** 3236 * Masaram Gondi. Since: 2.54 3237 */ 3238 MASARAM_GONDI = 138, 3239 /** 3240 * Nushu. Since: 2.54 3241 */ 3242 NUSHU = 139, 3243 /** 3244 * Soyombo. Since: 2.54 3245 */ 3246 SOYOMBO = 140, 3247 /** 3248 * Zanabazar Square. Since: 2.54 3249 */ 3250 ZANABAZAR_SQUARE = 141, 3251 /** 3252 * Dogra. Since: 2.58 3253 */ 3254 DOGRA = 142, 3255 /** 3256 * Gunjala Gondi. Since: 2.58 3257 */ 3258 GUNJALA_GONDI = 143, 3259 /** 3260 * Hanifi Rohingya. Since: 2.58 3261 */ 3262 HANIFI_ROHINGYA = 144, 3263 /** 3264 * Makasar. Since: 2.58 3265 */ 3266 MAKASAR = 145, 3267 /** 3268 * Medefaidrin. Since: 2.58 3269 */ 3270 MEDEFAIDRIN = 146, 3271 /** 3272 * Old Sogdian. Since: 2.58 3273 */ 3274 OLD_SOGDIAN = 147, 3275 /** 3276 * Sogdian. Since: 2.58 3277 */ 3278 SOGDIAN = 148, 3279 } 3280 alias GUnicodeScript UnicodeScript; 3281 3282 /** 3283 * These are the possible character classifications from the 3284 * Unicode specification. 3285 * See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values). 3286 */ 3287 public enum GUnicodeType 3288 { 3289 /** 3290 * General category "Other, Control" (Cc) 3291 */ 3292 CONTROL = 0, 3293 /** 3294 * General category "Other, Format" (Cf) 3295 */ 3296 FORMAT = 1, 3297 /** 3298 * General category "Other, Not Assigned" (Cn) 3299 */ 3300 UNASSIGNED = 2, 3301 /** 3302 * General category "Other, Private Use" (Co) 3303 */ 3304 PRIVATE_USE = 3, 3305 /** 3306 * General category "Other, Surrogate" (Cs) 3307 */ 3308 SURROGATE = 4, 3309 /** 3310 * General category "Letter, Lowercase" (Ll) 3311 */ 3312 LOWERCASE_LETTER = 5, 3313 /** 3314 * General category "Letter, Modifier" (Lm) 3315 */ 3316 MODIFIER_LETTER = 6, 3317 /** 3318 * General category "Letter, Other" (Lo) 3319 */ 3320 OTHER_LETTER = 7, 3321 /** 3322 * General category "Letter, Titlecase" (Lt) 3323 */ 3324 TITLECASE_LETTER = 8, 3325 /** 3326 * General category "Letter, Uppercase" (Lu) 3327 */ 3328 UPPERCASE_LETTER = 9, 3329 /** 3330 * General category "Mark, Spacing" (Mc) 3331 */ 3332 SPACING_MARK = 10, 3333 /** 3334 * General category "Mark, Enclosing" (Me) 3335 */ 3336 ENCLOSING_MARK = 11, 3337 /** 3338 * General category "Mark, Nonspacing" (Mn) 3339 */ 3340 NON_SPACING_MARK = 12, 3341 /** 3342 * General category "Number, Decimal Digit" (Nd) 3343 */ 3344 DECIMAL_NUMBER = 13, 3345 /** 3346 * General category "Number, Letter" (Nl) 3347 */ 3348 LETTER_NUMBER = 14, 3349 /** 3350 * General category "Number, Other" (No) 3351 */ 3352 OTHER_NUMBER = 15, 3353 /** 3354 * General category "Punctuation, Connector" (Pc) 3355 */ 3356 CONNECT_PUNCTUATION = 16, 3357 /** 3358 * General category "Punctuation, Dash" (Pd) 3359 */ 3360 DASH_PUNCTUATION = 17, 3361 /** 3362 * General category "Punctuation, Close" (Pe) 3363 */ 3364 CLOSE_PUNCTUATION = 18, 3365 /** 3366 * General category "Punctuation, Final quote" (Pf) 3367 */ 3368 FINAL_PUNCTUATION = 19, 3369 /** 3370 * General category "Punctuation, Initial quote" (Pi) 3371 */ 3372 INITIAL_PUNCTUATION = 20, 3373 /** 3374 * General category "Punctuation, Other" (Po) 3375 */ 3376 OTHER_PUNCTUATION = 21, 3377 /** 3378 * General category "Punctuation, Open" (Ps) 3379 */ 3380 OPEN_PUNCTUATION = 22, 3381 /** 3382 * General category "Symbol, Currency" (Sc) 3383 */ 3384 CURRENCY_SYMBOL = 23, 3385 /** 3386 * General category "Symbol, Modifier" (Sk) 3387 */ 3388 MODIFIER_SYMBOL = 24, 3389 /** 3390 * General category "Symbol, Math" (Sm) 3391 */ 3392 MATH_SYMBOL = 25, 3393 /** 3394 * General category "Symbol, Other" (So) 3395 */ 3396 OTHER_SYMBOL = 26, 3397 /** 3398 * General category "Separator, Line" (Zl) 3399 */ 3400 LINE_SEPARATOR = 27, 3401 /** 3402 * General category "Separator, Paragraph" (Zp) 3403 */ 3404 PARAGRAPH_SEPARATOR = 28, 3405 /** 3406 * General category "Separator, Space" (Zs) 3407 */ 3408 SPACE_SEPARATOR = 29, 3409 } 3410 alias GUnicodeType UnicodeType; 3411 3412 /** 3413 * These are logical ids for special directories which are defined 3414 * depending on the platform used. You should use g_get_user_special_dir() 3415 * to retrieve the full path associated to the logical id. 3416 * 3417 * The #GUserDirectory enumeration can be extended at later date. Not 3418 * every platform has a directory for every logical id in this 3419 * enumeration. 3420 * 3421 * Since: 2.14 3422 */ 3423 public enum GUserDirectory 3424 { 3425 /** 3426 * the user's Desktop directory 3427 */ 3428 DIRECTORY_DESKTOP = 0, 3429 /** 3430 * the user's Documents directory 3431 */ 3432 DIRECTORY_DOCUMENTS = 1, 3433 /** 3434 * the user's Downloads directory 3435 */ 3436 DIRECTORY_DOWNLOAD = 2, 3437 /** 3438 * the user's Music directory 3439 */ 3440 DIRECTORY_MUSIC = 3, 3441 /** 3442 * the user's Pictures directory 3443 */ 3444 DIRECTORY_PICTURES = 4, 3445 /** 3446 * the user's shared directory 3447 */ 3448 DIRECTORY_PUBLIC_SHARE = 5, 3449 /** 3450 * the user's Templates directory 3451 */ 3452 DIRECTORY_TEMPLATES = 6, 3453 /** 3454 * the user's Movies directory 3455 */ 3456 DIRECTORY_VIDEOS = 7, 3457 /** 3458 * the number of enum values 3459 */ 3460 N_DIRECTORIES = 8, 3461 } 3462 alias GUserDirectory UserDirectory; 3463 3464 /** 3465 * The range of possible top-level types of #GVariant instances. 3466 * 3467 * Since: 2.24 3468 */ 3469 public enum GVariantClass 3470 { 3471 /** 3472 * The #GVariant is a boolean. 3473 */ 3474 BOOLEAN = 98, 3475 /** 3476 * The #GVariant is a byte. 3477 */ 3478 BYTE = 121, 3479 /** 3480 * The #GVariant is a signed 16 bit integer. 3481 */ 3482 INT16 = 110, 3483 /** 3484 * The #GVariant is an unsigned 16 bit integer. 3485 */ 3486 UINT16 = 113, 3487 /** 3488 * The #GVariant is a signed 32 bit integer. 3489 */ 3490 INT32 = 105, 3491 /** 3492 * The #GVariant is an unsigned 32 bit integer. 3493 */ 3494 UINT32 = 117, 3495 /** 3496 * The #GVariant is a signed 64 bit integer. 3497 */ 3498 INT64 = 120, 3499 /** 3500 * The #GVariant is an unsigned 64 bit integer. 3501 */ 3502 UINT64 = 116, 3503 /** 3504 * The #GVariant is a file handle index. 3505 */ 3506 HANDLE = 104, 3507 /** 3508 * The #GVariant is a double precision floating 3509 * point value. 3510 */ 3511 DOUBLE = 100, 3512 /** 3513 * The #GVariant is a normal string. 3514 */ 3515 STRING = 115, 3516 /** 3517 * The #GVariant is a D-Bus object path 3518 * string. 3519 */ 3520 OBJECT_PATH = 111, 3521 /** 3522 * The #GVariant is a D-Bus signature string. 3523 */ 3524 SIGNATURE = 103, 3525 /** 3526 * The #GVariant is a variant. 3527 */ 3528 VARIANT = 118, 3529 /** 3530 * The #GVariant is a maybe-typed value. 3531 */ 3532 MAYBE = 109, 3533 /** 3534 * The #GVariant is an array. 3535 */ 3536 ARRAY = 97, 3537 /** 3538 * The #GVariant is a tuple. 3539 */ 3540 TUPLE = 40, 3541 /** 3542 * The #GVariant is a dictionary entry. 3543 */ 3544 DICT_ENTRY = 123, 3545 } 3546 alias GVariantClass VariantClass; 3547 3548 /** 3549 * Error codes returned by parsing text-format GVariants. 3550 */ 3551 public enum GVariantParseError 3552 { 3553 /** 3554 * generic error (unused) 3555 */ 3556 FAILED = 0, 3557 /** 3558 * a non-basic #GVariantType was given where a basic type was expected 3559 */ 3560 BASIC_TYPE_EXPECTED = 1, 3561 /** 3562 * cannot infer the #GVariantType 3563 */ 3564 CANNOT_INFER_TYPE = 2, 3565 /** 3566 * an indefinite #GVariantType was given where a definite type was expected 3567 */ 3568 DEFINITE_TYPE_EXPECTED = 3, 3569 /** 3570 * extra data after parsing finished 3571 */ 3572 INPUT_NOT_AT_END = 4, 3573 /** 3574 * invalid character in number or unicode escape 3575 */ 3576 INVALID_CHARACTER = 5, 3577 /** 3578 * not a valid #GVariant format string 3579 */ 3580 INVALID_FORMAT_STRING = 6, 3581 /** 3582 * not a valid object path 3583 */ 3584 INVALID_OBJECT_PATH = 7, 3585 /** 3586 * not a valid type signature 3587 */ 3588 INVALID_SIGNATURE = 8, 3589 /** 3590 * not a valid #GVariant type string 3591 */ 3592 INVALID_TYPE_STRING = 9, 3593 /** 3594 * could not find a common type for array entries 3595 */ 3596 NO_COMMON_TYPE = 10, 3597 /** 3598 * the numerical value is out of range of the given type 3599 */ 3600 NUMBER_OUT_OF_RANGE = 11, 3601 /** 3602 * the numerical value is out of range for any type 3603 */ 3604 NUMBER_TOO_BIG = 12, 3605 /** 3606 * cannot parse as variant of the specified type 3607 */ 3608 TYPE_ERROR = 13, 3609 /** 3610 * an unexpected token was encountered 3611 */ 3612 UNEXPECTED_TOKEN = 14, 3613 /** 3614 * an unknown keyword was encountered 3615 */ 3616 UNKNOWN_KEYWORD = 15, 3617 /** 3618 * unterminated string constant 3619 */ 3620 UNTERMINATED_STRING_CONSTANT = 16, 3621 /** 3622 * no value given 3623 */ 3624 VALUE_EXPECTED = 17, 3625 } 3626 alias GVariantParseError VariantParseError; 3627 3628 /** 3629 * Flags passed to g_module_open(). 3630 * Note that these flags are not supported on all platforms. 3631 */ 3632 public enum GModuleFlags 3633 { 3634 /** 3635 * specifies that symbols are only resolved when 3636 * needed. The default action is to bind all symbols when the module 3637 * is loaded. 3638 */ 3639 LAZY = 1, 3640 /** 3641 * specifies that symbols in the module should 3642 * not be added to the global name space. The default action on most 3643 * platforms is to place symbols in the module in the global name space, 3644 * which may cause conflicts with existing symbols. 3645 */ 3646 LOCAL = 2, 3647 /** 3648 * mask for all flags. 3649 */ 3650 MASK = 3, 3651 } 3652 alias GModuleFlags ModuleFlags; 3653 3654 /** 3655 * Contains the public fields of a GArray. 3656 */ 3657 struct GArray 3658 { 3659 /** 3660 * a pointer to the element data. The data may be moved as 3661 * elements are added to the #GArray. 3662 */ 3663 char* data; 3664 /** 3665 * the number of elements in the #GArray not including the 3666 * possible terminating zero element. 3667 */ 3668 uint len; 3669 } 3670 3671 struct GAsyncQueue; 3672 3673 struct GBookmarkFile; 3674 3675 /** 3676 * Contains the public fields of a GByteArray. 3677 */ 3678 struct GByteArray 3679 { 3680 /** 3681 * a pointer to the element data. The data may be moved as 3682 * elements are added to the #GByteArray 3683 */ 3684 ubyte* data; 3685 /** 3686 * the number of elements in the #GByteArray 3687 */ 3688 uint len; 3689 } 3690 3691 struct GBytes; 3692 3693 struct GChecksum; 3694 3695 struct GCond 3696 { 3697 void* p; 3698 uint[2] i; 3699 } 3700 3701 /** 3702 * The #GData struct is an opaque data structure to represent a 3703 * [Keyed Data List][glib-Keyed-Data-Lists]. It should only be 3704 * accessed via the following functions. 3705 */ 3706 struct GData; 3707 3708 struct GDate 3709 { 3710 import std.bitmanip: bitfields; 3711 mixin(bitfields!( 3712 uint, "julianDays", 32, 3713 uint, "julian", 1, 3714 uint, "dmy", 1, 3715 uint, "day", 6, 3716 uint, "month", 4, 3717 uint, "year", 16, 3718 uint, "", 4 3719 )); 3720 } 3721 3722 struct GDateTime; 3723 3724 /** 3725 * Associates a string with a bit flag. 3726 * Used in g_parse_debug_string(). 3727 */ 3728 struct GDebugKey 3729 { 3730 /** 3731 * the string 3732 */ 3733 const(char)* key; 3734 /** 3735 * the flag 3736 */ 3737 uint value; 3738 } 3739 3740 struct GDir; 3741 3742 /** 3743 * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign, 3744 * mantissa and exponent of IEEE floats and doubles. These unions are defined 3745 * as appropriate for a given platform. IEEE floats and doubles are supported 3746 * (used for storage) by at least Intel, PPC and Sparc. 3747 */ 3748 struct GDoubleIEEE754 3749 { 3750 union 3751 { 3752 /** 3753 * the double value 3754 */ 3755 double vDouble; 3756 struct Mpn 3757 { 3758 import std.bitmanip: bitfields; 3759 mixin(bitfields!( 3760 uint, "mantissaLow", 32, 3761 uint, "mantissaHigh", 20, 3762 uint, "biasedExponent", 11, 3763 uint, "sign", 1 3764 )); 3765 } 3766 Mpn mpn; 3767 } 3768 } 3769 3770 struct GError 3771 { 3772 /** 3773 * error domain, e.g. #G_FILE_ERROR 3774 */ 3775 GQuark domain; 3776 /** 3777 * error code, e.g. %G_FILE_ERROR_NOENT 3778 */ 3779 int code; 3780 /** 3781 * human-readable informative error message 3782 */ 3783 char* message; 3784 } 3785 3786 /** 3787 * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign, 3788 * mantissa and exponent of IEEE floats and doubles. These unions are defined 3789 * as appropriate for a given platform. IEEE floats and doubles are supported 3790 * (used for storage) by at least Intel, PPC and Sparc. 3791 */ 3792 struct GFloatIEEE754 3793 { 3794 union 3795 { 3796 /** 3797 * the double value 3798 */ 3799 float vFloat; 3800 struct Mpn 3801 { 3802 import std.bitmanip: bitfields; 3803 mixin(bitfields!( 3804 uint, "mantissa", 23, 3805 uint, "biasedExponent", 8, 3806 uint, "sign", 1 3807 )); 3808 } 3809 Mpn mpn; 3810 } 3811 } 3812 3813 /** 3814 * The #GHashTable struct is an opaque data structure to represent a 3815 * [Hash Table][glib-Hash-Tables]. It should only be accessed via the 3816 * following functions. 3817 */ 3818 struct GHashTable; 3819 3820 struct GHashTableIter 3821 { 3822 void* dummy1; 3823 void* dummy2; 3824 void* dummy3; 3825 int dummy4; 3826 bool dummy5; 3827 void* dummy6; 3828 } 3829 3830 struct GHmac; 3831 3832 struct GHook 3833 { 3834 /** 3835 * data which is passed to func when this hook is invoked 3836 */ 3837 void* data; 3838 /** 3839 * pointer to the next hook in the list 3840 */ 3841 GHook* next; 3842 /** 3843 * pointer to the previous hook in the list 3844 */ 3845 GHook* prev; 3846 /** 3847 * the reference count of this hook 3848 */ 3849 uint refCount; 3850 /** 3851 * the id of this hook, which is unique within its list 3852 */ 3853 gulong hookId; 3854 /** 3855 * flags which are set for this hook. See #GHookFlagMask for 3856 * predefined flags 3857 */ 3858 uint flags; 3859 /** 3860 * the function to call when this hook is invoked. The possible 3861 * signatures for this function are #GHookFunc and #GHookCheckFunc 3862 */ 3863 void* func; 3864 /** 3865 * the default @finalize_hook function of a #GHookList calls 3866 * this member of the hook that is being finalized 3867 */ 3868 GDestroyNotify destroy; 3869 } 3870 3871 struct GHookList 3872 { 3873 /** 3874 * the next free #GHook id 3875 */ 3876 gulong seqId; 3877 import std.bitmanip: bitfields; 3878 mixin(bitfields!( 3879 uint, "hookSize", 16, 3880 uint, "isSetup", 1, 3881 uint, "", 15 3882 )); 3883 /** 3884 * the first #GHook element in the list 3885 */ 3886 GHook* hooks; 3887 /** 3888 * unused 3889 */ 3890 void* dummy3; 3891 /** 3892 * the function to call to finalize a #GHook element. 3893 * The default behaviour is to call the hooks @destroy function 3894 */ 3895 GHookFinalizeFunc finalizeHook; 3896 /** 3897 * unused 3898 */ 3899 void*[2] dummy; 3900 } 3901 3902 struct GIOChannel 3903 { 3904 int refCount; 3905 GIOFuncs* funcs; 3906 char* encoding; 3907 GIConv readCd; 3908 GIConv writeCd; 3909 char* lineTerm; 3910 uint lineTermLen; 3911 size_t bufSize; 3912 GString* readBuf; 3913 GString* encodedReadBuf; 3914 GString* writeBuf; 3915 char[6] partialWriteBuf; 3916 import std.bitmanip: bitfields; 3917 mixin(bitfields!( 3918 uint, "useBuffer", 1, 3919 uint, "doEncode", 1, 3920 uint, "closeOnUnref", 1, 3921 uint, "isReadable", 1, 3922 uint, "isWriteable", 1, 3923 uint, "isSeekable", 1, 3924 uint, "", 26 3925 )); 3926 void* reserved1; 3927 void* reserved2; 3928 } 3929 3930 /** 3931 * A table of functions used to handle different types of #GIOChannel 3932 * in a generic way. 3933 */ 3934 struct GIOFuncs 3935 { 3936 /** */ 3937 extern(C) GIOStatus function(GIOChannel* channel, char* buf, size_t count, size_t* bytesRead, GError** err) ioRead; 3938 /** */ 3939 extern(C) GIOStatus function(GIOChannel* channel, const(char)* buf, size_t count, size_t* bytesWritten, GError** err) ioWrite; 3940 /** */ 3941 extern(C) GIOStatus function(GIOChannel* channel, long offset, GSeekType type, GError** err) ioSeek; 3942 /** */ 3943 extern(C) GIOStatus function(GIOChannel* channel, GError** err) ioClose; 3944 /** */ 3945 extern(C) GSource* function(GIOChannel* channel, GIOCondition condition) ioCreateWatch; 3946 /** */ 3947 extern(C) void function(GIOChannel* channel) ioFree; 3948 /** */ 3949 extern(C) GIOStatus function(GIOChannel* channel, GIOFlags flags, GError** err) ioSetFlags; 3950 /** */ 3951 extern(C) GIOFlags function(GIOChannel* channel) ioGetFlags; 3952 } 3953 3954 struct GKeyFile; 3955 3956 /** 3957 * The #GList struct is used for each element in a doubly-linked list. 3958 */ 3959 struct GList 3960 { 3961 /** 3962 * holds the element's data, which can be a pointer to any kind 3963 * of data, or any integer value using the 3964 * [Type Conversion Macros][glib-Type-Conversion-Macros] 3965 */ 3966 void* data; 3967 /** 3968 * contains the link to the next element in the list 3969 */ 3970 GList* next; 3971 /** 3972 * contains the link to the previous element in the list 3973 */ 3974 GList* prev; 3975 } 3976 3977 /** 3978 * Structure representing a single field in a structured log entry. See 3979 * g_log_structured() for details. 3980 * 3981 * Log fields may contain arbitrary values, including binary with embedded nul 3982 * bytes. If the field contains a string, the string must be UTF-8 encoded and 3983 * have a trailing nul byte. Otherwise, @length must be set to a non-negative 3984 * value. 3985 * 3986 * Since: 2.50 3987 */ 3988 struct GLogField 3989 { 3990 /** 3991 * field name (UTF-8 string) 3992 */ 3993 const(char)* key; 3994 /** 3995 * field value (arbitrary bytes) 3996 */ 3997 void* value; 3998 /** 3999 * length of @value, in bytes, or -1 if it is nul-terminated 4000 */ 4001 ptrdiff_t length; 4002 } 4003 4004 struct GMainContext; 4005 4006 struct GMainLoop; 4007 4008 struct GMappedFile; 4009 4010 struct GMarkupParseContext; 4011 4012 /** 4013 * Any of the fields in #GMarkupParser can be %NULL, in which case they 4014 * will be ignored. Except for the @error function, any of these callbacks 4015 * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT, 4016 * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT 4017 * errors are intended to be set from these callbacks. If you set an error 4018 * from a callback, g_markup_parse_context_parse() will report that error 4019 * back to its caller. 4020 */ 4021 struct GMarkupParser 4022 { 4023 /** */ 4024 extern(C) void function(GMarkupParseContext* context, const(char)* elementName, char** attributeNames, char** attributeValues, void* userData, GError** err) startElement; 4025 /** */ 4026 extern(C) void function(GMarkupParseContext* context, const(char)* elementName, void* userData, GError** err) endElement; 4027 /** */ 4028 extern(C) void function(GMarkupParseContext* context, const(char)* text, size_t textLen, void* userData, GError** err) text; 4029 /** */ 4030 extern(C) void function(GMarkupParseContext* context, const(char)* passthroughText, size_t textLen, void* userData, GError** err) passthrough; 4031 /** */ 4032 extern(C) void function(GMarkupParseContext* context, GError* error, void* userData) error; 4033 } 4034 4035 struct GMatchInfo; 4036 4037 /** 4038 * A set of functions used to perform memory allocation. The same #GMemVTable must 4039 * be used for all allocations in the same program; a call to g_mem_set_vtable(), 4040 * if it exists, should be prior to any use of GLib. 4041 * 4042 * This functions related to this has been deprecated in 2.46, and no longer work. 4043 */ 4044 struct GMemVTable 4045 { 4046 /** */ 4047 extern(C) void* function(size_t nBytes) malloc; 4048 /** */ 4049 extern(C) void* function(void* mem, size_t nBytes) realloc; 4050 /** */ 4051 extern(C) void function(void* mem) free; 4052 /** */ 4053 extern(C) void* function(size_t nBlocks, size_t nBlockBytes) calloc; 4054 /** */ 4055 extern(C) void* function(size_t nBytes) tryMalloc; 4056 /** */ 4057 extern(C) void* function(void* mem, size_t nBytes) tryRealloc; 4058 } 4059 4060 struct GMutex 4061 { 4062 union 4063 { 4064 void* p; 4065 uint[2] i; 4066 } 4067 } 4068 4069 struct GNode 4070 { 4071 /** 4072 * contains the actual data of the node. 4073 */ 4074 void* data; 4075 /** 4076 * points to the node's next sibling (a sibling is another 4077 * #GNode with the same parent). 4078 */ 4079 GNode* next; 4080 /** 4081 * points to the node's previous sibling. 4082 */ 4083 GNode* prev; 4084 /** 4085 * points to the parent of the #GNode, or is %NULL if the 4086 * #GNode is the root of the tree. 4087 */ 4088 GNode* parent; 4089 /** 4090 * points to the first child of the #GNode. The other 4091 * children are accessed by using the @next pointer of each 4092 * child. 4093 */ 4094 GNode* children; 4095 } 4096 4097 struct GOnce 4098 { 4099 /** 4100 * the status of the #GOnce 4101 */ 4102 GOnceStatus status; 4103 /** 4104 * the value returned by the call to the function, if @status 4105 * is %G_ONCE_STATUS_READY 4106 */ 4107 void* retval; 4108 } 4109 4110 struct GOptionContext; 4111 4112 /** 4113 * A GOptionEntry struct defines a single option. To have an effect, they 4114 * must be added to a #GOptionGroup with g_option_context_add_main_entries() 4115 * or g_option_group_add_entries(). 4116 */ 4117 struct GOptionEntry 4118 { 4119 /** 4120 * The long name of an option can be used to specify it 4121 * in a commandline as `--long_name`. Every option must have a 4122 * long name. To resolve conflicts if multiple option groups contain 4123 * the same long name, it is also possible to specify the option as 4124 * `--groupname-long_name`. 4125 */ 4126 const(char)* longName; 4127 /** 4128 * If an option has a short name, it can be specified 4129 * `-short_name` in a commandline. @short_name must be a printable 4130 * ASCII character different from '-', or zero if the option has no 4131 * short name. 4132 */ 4133 char shortName; 4134 /** 4135 * Flags from #GOptionFlags 4136 */ 4137 int flags; 4138 /** 4139 * The type of the option, as a #GOptionArg 4140 */ 4141 GOptionArg arg; 4142 /** 4143 * If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data 4144 * must point to a #GOptionArgFunc callback function, which will be 4145 * called to handle the extra argument. Otherwise, @arg_data is a 4146 * pointer to a location to store the value, the required type of 4147 * the location depends on the @arg type: 4148 * - %G_OPTION_ARG_NONE: %gboolean 4149 * - %G_OPTION_ARG_STRING: %gchar* 4150 * - %G_OPTION_ARG_INT: %gint 4151 * - %G_OPTION_ARG_FILENAME: %gchar* 4152 * - %G_OPTION_ARG_STRING_ARRAY: %gchar** 4153 * - %G_OPTION_ARG_FILENAME_ARRAY: %gchar** 4154 * - %G_OPTION_ARG_DOUBLE: %gdouble 4155 * If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME, 4156 * the location will contain a newly allocated string if the option 4157 * was given. That string needs to be freed by the callee using g_free(). 4158 * Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or 4159 * %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev(). 4160 */ 4161 void* argData; 4162 /** 4163 * the description for the option in `--help` 4164 * output. The @description is translated using the @translate_func 4165 * of the group, see g_option_group_set_translation_domain(). 4166 */ 4167 const(char)* description; 4168 /** 4169 * The placeholder to use for the extra argument parsed 4170 * by the option in `--help` output. The @arg_description is translated 4171 * using the @translate_func of the group, see 4172 * g_option_group_set_translation_domain(). 4173 */ 4174 const(char)* argDescription; 4175 } 4176 4177 struct GOptionGroup; 4178 4179 struct GPatternSpec; 4180 4181 /** 4182 * Represents a file descriptor, which events to poll for, and which events 4183 * occurred. 4184 */ 4185 struct GPollFD 4186 { 4187 /** 4188 * the file descriptor to poll (or a HANDLE on Win32) 4189 */ 4190 int fd; 4191 /** 4192 * a bitwise combination from #GIOCondition, specifying which 4193 * events should be polled for. Typically for reading from a file 4194 * descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and 4195 * for writing you would use %G_IO_OUT | %G_IO_ERR. 4196 */ 4197 ushort events; 4198 /** 4199 * a bitwise combination of flags from #GIOCondition, returned 4200 * from the poll() function to indicate which events occurred. 4201 */ 4202 ushort revents; 4203 } 4204 4205 struct GPrivate 4206 { 4207 void* p; 4208 GDestroyNotify notify; 4209 void*[2] future; 4210 } 4211 4212 /** 4213 * Contains the public fields of a pointer array. 4214 */ 4215 struct GPtrArray 4216 { 4217 /** 4218 * points to the array of pointers, which may be moved when the 4219 * array grows 4220 */ 4221 void** pdata; 4222 /** 4223 * number of pointers in the array 4224 */ 4225 uint len; 4226 } 4227 4228 struct GQueue 4229 { 4230 /** 4231 * a pointer to the first element of the queue 4232 */ 4233 GList* head; 4234 /** 4235 * a pointer to the last element of the queue 4236 */ 4237 GList* tail; 4238 /** 4239 * the number of elements in the queue 4240 */ 4241 uint length; 4242 } 4243 4244 struct GRWLock 4245 { 4246 void* p; 4247 uint[2] i; 4248 } 4249 4250 struct GRand; 4251 4252 struct GRecMutex 4253 { 4254 void* p; 4255 uint[2] i; 4256 } 4257 4258 struct GRegex; 4259 4260 /** 4261 * The #GSList struct is used for each element in the singly-linked 4262 * list. 4263 */ 4264 struct GSList 4265 { 4266 /** 4267 * holds the element's data, which can be a pointer to any kind 4268 * of data, or any integer value using the 4269 * [Type Conversion Macros][glib-Type-Conversion-Macros] 4270 */ 4271 void* data; 4272 /** 4273 * contains the link to the next element in the list. 4274 */ 4275 GSList* next; 4276 } 4277 4278 struct GScanner 4279 { 4280 /** 4281 * unused 4282 */ 4283 void* userData; 4284 /** 4285 * unused 4286 */ 4287 uint maxParseErrors; 4288 /** 4289 * g_scanner_error() increments this field 4290 */ 4291 uint parseErrors; 4292 /** 4293 * name of input stream, featured by the default message handler 4294 */ 4295 const(char)* inputName; 4296 /** 4297 * quarked data 4298 */ 4299 GData* qdata; 4300 /** 4301 * link into the scanner configuration 4302 */ 4303 GScannerConfig* config; 4304 /** 4305 * token parsed by the last g_scanner_get_next_token() 4306 */ 4307 GTokenType token; 4308 /** 4309 * value of the last token from g_scanner_get_next_token() 4310 */ 4311 GTokenValue value; 4312 /** 4313 * line number of the last token from g_scanner_get_next_token() 4314 */ 4315 uint line; 4316 /** 4317 * char number of the last token from g_scanner_get_next_token() 4318 */ 4319 uint position; 4320 /** 4321 * token parsed by the last g_scanner_peek_next_token() 4322 */ 4323 GTokenType nextToken; 4324 /** 4325 * value of the last token from g_scanner_peek_next_token() 4326 */ 4327 GTokenValue nextValue; 4328 /** 4329 * line number of the last token from g_scanner_peek_next_token() 4330 */ 4331 uint nextLine; 4332 /** 4333 * char number of the last token from g_scanner_peek_next_token() 4334 */ 4335 uint nextPosition; 4336 GHashTable* symbolTable; 4337 int inputFd; 4338 const(char)* text; 4339 const(char)* textEnd; 4340 char* buffer; 4341 uint scopeId; 4342 /** 4343 * handler function for _warn and _error 4344 */ 4345 GScannerMsgFunc msgHandler; 4346 } 4347 4348 /** 4349 * Specifies the #GScanner parser configuration. Most settings can 4350 * be changed during the parsing phase and will affect the lexical 4351 * parsing of the next unpeeked token. 4352 */ 4353 struct GScannerConfig 4354 { 4355 /** 4356 * specifies which characters should be skipped 4357 * by the scanner (the default is the whitespace characters: space, 4358 * tab, carriage-return and line-feed). 4359 */ 4360 char* csetSkipCharacters; 4361 /** 4362 * specifies the characters which can start 4363 * identifiers (the default is #G_CSET_a_2_z, "_", and #G_CSET_A_2_Z). 4364 */ 4365 char* csetIdentifierFirst; 4366 /** 4367 * specifies the characters which can be used 4368 * in identifiers, after the first character (the default is 4369 * #G_CSET_a_2_z, "_0123456789", #G_CSET_A_2_Z, #G_CSET_LATINS, 4370 * #G_CSET_LATINC). 4371 */ 4372 char* csetIdentifierNth; 4373 /** 4374 * specifies the characters at the start and 4375 * end of single-line comments. The default is "#\n" which means 4376 * that single-line comments start with a '#' and continue until 4377 * a '\n' (end of line). 4378 */ 4379 char* cpairCommentSingle; 4380 import std.bitmanip: bitfields; 4381 mixin(bitfields!( 4382 uint, "caseSensitive", 1, 4383 uint, "skipCommentMulti", 1, 4384 uint, "skipCommentSingle", 1, 4385 uint, "scanCommentMulti", 1, 4386 uint, "scanIdentifier", 1, 4387 uint, "scanIdentifier1char", 1, 4388 uint, "scanIdentifierNULL", 1, 4389 uint, "scanSymbols", 1, 4390 uint, "scanBinary", 1, 4391 uint, "scanOctal", 1, 4392 uint, "scanFloat", 1, 4393 uint, "scanHex", 1, 4394 uint, "scanHexDollar", 1, 4395 uint, "scanStringSq", 1, 4396 uint, "scanStringDq", 1, 4397 uint, "numbers2Int", 1, 4398 uint, "int2Float", 1, 4399 uint, "identifier2String", 1, 4400 uint, "char2Token", 1, 4401 uint, "symbol2Token", 1, 4402 uint, "scope0Fallback", 1, 4403 uint, "storeInt64", 1, 4404 uint, "", 10 4405 )); 4406 uint paddingDummy; 4407 } 4408 4409 struct GSequence; 4410 4411 struct GSequenceIter; 4412 4413 struct GSource 4414 { 4415 void* callbackData; 4416 GSourceCallbackFuncs* callbackFuncs; 4417 GSourceFuncs* sourceFuncs; 4418 uint refCount; 4419 GMainContext* context; 4420 int priority; 4421 uint flags; 4422 uint sourceId; 4423 GSList* pollFds; 4424 GSource* prev; 4425 GSource* next; 4426 char* name; 4427 GSourcePrivate* priv; 4428 } 4429 4430 /** 4431 * The `GSourceCallbackFuncs` struct contains 4432 * functions for managing callback objects. 4433 */ 4434 struct GSourceCallbackFuncs 4435 { 4436 /** */ 4437 extern(C) void function(void* cbData) ref_; 4438 /** */ 4439 extern(C) void function(void* cbData) unref; 4440 /** */ 4441 extern(C) void function(void* cbData, GSource* source, GSourceFunc* func, void** data) get; 4442 } 4443 4444 /** 4445 * The `GSourceFuncs` struct contains a table of 4446 * functions used to handle event sources in a generic manner. 4447 * 4448 * For idle sources, the prepare and check functions always return %TRUE 4449 * to indicate that the source is always ready to be processed. The prepare 4450 * function also returns a timeout value of 0 to ensure that the poll() call 4451 * doesn't block (since that would be time wasted which could have been spent 4452 * running the idle function). 4453 * 4454 * For timeout sources, the prepare and check functions both return %TRUE 4455 * if the timeout interval has expired. The prepare function also returns 4456 * a timeout value to ensure that the poll() call doesn't block too long 4457 * and miss the next timeout. 4458 * 4459 * For file descriptor sources, the prepare function typically returns %FALSE, 4460 * since it must wait until poll() has been called before it knows whether 4461 * any events need to be processed. It sets the returned timeout to -1 to 4462 * indicate that it doesn't mind how long the poll() call blocks. In the 4463 * check function, it tests the results of the poll() call to see if the 4464 * required condition has been met, and returns %TRUE if so. 4465 */ 4466 struct GSourceFuncs 4467 { 4468 /** */ 4469 extern(C) int function(GSource* source, int* timeout) prepare; 4470 /** */ 4471 extern(C) int function(GSource* source) check; 4472 /** */ 4473 extern(C) int function(GSource* source, GSourceFunc callback, void* userData) dispatch; 4474 /** */ 4475 extern(C) void function(GSource* source) finalize; 4476 GSourceFunc closureCallback; 4477 GSourceDummyMarshal closureMarshal; 4478 } 4479 4480 struct GSourcePrivate; 4481 4482 /** 4483 * A type corresponding to the appropriate struct type for the stat() 4484 * system call, depending on the platform and/or compiler being used. 4485 * 4486 * See g_stat() for more information. 4487 */ 4488 struct GStatBuf; 4489 4490 struct GString 4491 { 4492 /** 4493 * points to the character data. It may move as text is added. 4494 * The @str field is null-terminated and so 4495 * can be used as an ordinary C string. 4496 */ 4497 char* str; 4498 /** 4499 * contains the length of the string, not including the 4500 * terminating nul byte. 4501 */ 4502 size_t len; 4503 /** 4504 * the number of bytes that can be stored in the 4505 * string before it needs to be reallocated. May be larger than @len. 4506 */ 4507 size_t allocatedLen; 4508 } 4509 4510 struct GStringChunk; 4511 4512 /** 4513 * An opaque structure representing a test case. 4514 */ 4515 struct GTestCase; 4516 4517 struct GTestConfig 4518 { 4519 bool testInitialized; 4520 bool testQuick; 4521 bool testPerf; 4522 bool testVerbose; 4523 bool testQuiet; 4524 bool testUndefined; 4525 } 4526 4527 struct GTestLogBuffer 4528 { 4529 GString* data; 4530 GSList* msgs; 4531 } 4532 4533 struct GTestLogMsg 4534 { 4535 GTestLogType logType; 4536 uint nStrings; 4537 char** strings; 4538 uint nNums; 4539 real nums; 4540 } 4541 4542 struct GTestSuite; 4543 4544 struct GThread; 4545 4546 struct GThreadPool 4547 { 4548 /** 4549 * the function to execute in the threads of this pool 4550 */ 4551 GFunc func; 4552 /** 4553 * the user data for the threads of this pool 4554 */ 4555 void* userData; 4556 /** 4557 * are all threads exclusive to this pool 4558 */ 4559 bool exclusive; 4560 } 4561 4562 struct GTimeVal 4563 { 4564 /** 4565 * seconds 4566 */ 4567 glong tvSec; 4568 /** 4569 * microseconds 4570 */ 4571 glong tvUsec; 4572 } 4573 4574 struct GTimeZone; 4575 4576 struct GTimer; 4577 4578 /** 4579 * A union holding the value of the token. 4580 */ 4581 struct GTokenValue 4582 { 4583 union 4584 { 4585 /** 4586 * token symbol value 4587 */ 4588 void* vSymbol; 4589 /** 4590 * token identifier value 4591 */ 4592 char* vIdentifier; 4593 /** 4594 * token binary integer value 4595 */ 4596 gulong vBinary; 4597 /** 4598 * octal integer value 4599 */ 4600 gulong vOctal; 4601 /** 4602 * integer value 4603 */ 4604 gulong vInt; 4605 /** 4606 * 64-bit integer value 4607 */ 4608 ulong vInt64; 4609 /** 4610 * floating point value 4611 */ 4612 double vFloat; 4613 /** 4614 * hex integer value 4615 */ 4616 gulong vHex; 4617 /** 4618 * string value 4619 */ 4620 char* vString; 4621 /** 4622 * comment value 4623 */ 4624 char* vComment; 4625 /** 4626 * character value 4627 */ 4628 char vChar; 4629 /** 4630 * error value 4631 */ 4632 uint vError; 4633 } 4634 } 4635 4636 /** 4637 * Each piece of memory that is pushed onto the stack 4638 * is cast to a GTrashStack*. 4639 * 4640 * Deprecated: #GTrashStack is deprecated without replacement 4641 */ 4642 struct GTrashStack 4643 { 4644 /** 4645 * pointer to the previous element of the stack, 4646 * gets stored in the first `sizeof (gpointer)` 4647 * bytes of the element 4648 */ 4649 GTrashStack* next; 4650 } 4651 4652 struct GTree; 4653 4654 struct GVariant; 4655 4656 struct GVariantBuilder 4657 { 4658 union U 4659 { 4660 struct S 4661 { 4662 size_t partialMagic; 4663 GVariantType* type; 4664 size_t[14] y; 4665 } 4666 S s; 4667 size_t[16] x; 4668 } 4669 U u; 4670 } 4671 4672 struct GVariantDict 4673 { 4674 union U 4675 { 4676 struct S 4677 { 4678 GVariant* asv; 4679 size_t partialMagic; 4680 size_t[14] y; 4681 } 4682 S s; 4683 size_t[16] x; 4684 } 4685 U u; 4686 } 4687 4688 struct GVariantIter 4689 { 4690 size_t[16] x; 4691 } 4692 4693 struct GVariantType; 4694 4695 struct GModule; 4696 4697 /** 4698 * Prototype of a #GChildWatchSource callback, called when a child 4699 * process has exited. To interpret @status, see the documentation 4700 * for g_spawn_check_exit_status(). 4701 * 4702 * Params: 4703 * pid = the process id of the child process 4704 * status = Status information about the child process, encoded 4705 * in a platform-specific manner 4706 * userData = user data passed to g_child_watch_add() 4707 */ 4708 public alias extern(C) void function(GPid pid, int status, void* userData) GChildWatchFunc; 4709 4710 /** 4711 * Specifies the type of function passed to g_clear_handle_id(). 4712 * The implementation is expected to free the resource identified 4713 * by @handle_id; for instance, if @handle_id is a #GSource ID, 4714 * g_source_remove() can be used. 4715 * 4716 * Params: 4717 * handleId = the handle ID to clear 4718 * 4719 * Since: 2.56 4720 */ 4721 public alias extern(C) void function(uint handleId) GClearHandleFunc; 4722 4723 /** 4724 * Specifies the type of a comparison function used to compare two 4725 * values. The function should return a negative integer if the first 4726 * value comes before the second, 0 if they are equal, or a positive 4727 * integer if the first value comes after the second. 4728 * 4729 * Params: 4730 * a = a value 4731 * b = a value to compare with 4732 * userData = user data 4733 * 4734 * Returns: negative value if @a < @b; zero if @a = @b; positive 4735 * value if @a > @b 4736 */ 4737 public alias extern(C) int function(void* a, void* b, void* userData) GCompareDataFunc; 4738 4739 /** 4740 * Specifies the type of a comparison function used to compare two 4741 * values. The function should return a negative integer if the first 4742 * value comes before the second, 0 if they are equal, or a positive 4743 * integer if the first value comes after the second. 4744 * 4745 * Params: 4746 * a = a value 4747 * b = a value to compare with 4748 * 4749 * Returns: negative value if @a < @b; zero if @a = @b; positive 4750 * value if @a > @b 4751 */ 4752 public alias extern(C) int function(void* a, void* b) GCompareFunc; 4753 4754 /** 4755 * A function of this signature is used to copy the node data 4756 * when doing a deep-copy of a tree. 4757 * 4758 * Params: 4759 * src = A pointer to the data which should be copied 4760 * data = Additional data 4761 * 4762 * Returns: A pointer to the copy 4763 * 4764 * Since: 2.4 4765 */ 4766 public alias extern(C) void* function(void* src, void* data) GCopyFunc; 4767 4768 /** 4769 * Specifies the type of function passed to g_dataset_foreach(). It is 4770 * called with each #GQuark id and associated data element, together 4771 * with the @user_data parameter supplied to g_dataset_foreach(). 4772 * 4773 * Params: 4774 * keyId = the #GQuark id to identifying the data element. 4775 * data = the data element. 4776 * userData = user data passed to g_dataset_foreach(). 4777 */ 4778 public alias extern(C) void function(GQuark keyId, void* data, void* userData) GDataForeachFunc; 4779 4780 /** 4781 * Specifies the type of function which is called when a data element 4782 * is destroyed. It is passed the pointer to the data element and 4783 * should free any memory and resources allocated for it. 4784 * 4785 * Params: 4786 * data = the data element. 4787 */ 4788 public alias extern(C) void function(void* data) GDestroyNotify; 4789 4790 /** 4791 * The type of functions that are used to 'duplicate' an object. 4792 * What this means depends on the context, it could just be 4793 * incrementing the reference count, if @data is a ref-counted 4794 * object. 4795 * 4796 * Params: 4797 * data = the data to duplicate 4798 * userData = user data that was specified in 4799 * g_datalist_id_dup_data() 4800 * 4801 * Returns: a duplicate of data 4802 */ 4803 public alias extern(C) void* function(void* data, void* userData) GDuplicateFunc; 4804 4805 /** 4806 * Specifies the type of a function used to test two values for 4807 * equality. The function should return %TRUE if both values are equal 4808 * and %FALSE otherwise. 4809 * 4810 * Params: 4811 * a = a value 4812 * b = a value to compare with 4813 * 4814 * Returns: %TRUE if @a = @b; %FALSE otherwise 4815 */ 4816 public alias extern(C) int function(void* a, void* b) GEqualFunc; 4817 4818 /** 4819 * Declares a type of function which takes an arbitrary 4820 * data pointer argument and has no return value. It is 4821 * not currently used in GLib or GTK+. 4822 * 4823 * Params: 4824 * data = a data pointer 4825 */ 4826 public alias extern(C) void function(void* data) GFreeFunc; 4827 4828 /** 4829 * Specifies the type of functions passed to g_list_foreach() and 4830 * g_slist_foreach(). 4831 * 4832 * Params: 4833 * data = the element's data 4834 * userData = user data passed to g_list_foreach() or g_slist_foreach() 4835 */ 4836 public alias extern(C) void function(void* data, void* userData) GFunc; 4837 4838 /** 4839 * Specifies the type of the function passed to g_hash_table_foreach(). 4840 * It is called with each key/value pair, together with the @user_data 4841 * parameter which is passed to g_hash_table_foreach(). 4842 * 4843 * Params: 4844 * key = a key 4845 * value = the value corresponding to the key 4846 * userData = user data passed to g_hash_table_foreach() 4847 */ 4848 public alias extern(C) void function(void* key, void* value, void* userData) GHFunc; 4849 4850 /** 4851 * Specifies the type of the function passed to 4852 * g_hash_table_foreach_remove(). It is called with each key/value 4853 * pair, together with the @user_data parameter passed to 4854 * g_hash_table_foreach_remove(). It should return %TRUE if the 4855 * key/value pair should be removed from the #GHashTable. 4856 * 4857 * Params: 4858 * key = a key 4859 * value = the value associated with the key 4860 * userData = user data passed to g_hash_table_remove() 4861 * 4862 * Returns: %TRUE if the key/value pair should be removed from the 4863 * #GHashTable 4864 */ 4865 public alias extern(C) int function(void* key, void* value, void* userData) GHRFunc; 4866 4867 /** 4868 * Specifies the type of the hash function which is passed to 4869 * g_hash_table_new() when a #GHashTable is created. 4870 * 4871 * The function is passed a key and should return a #guint hash value. 4872 * The functions g_direct_hash(), g_int_hash() and g_str_hash() provide 4873 * hash functions which can be used when the key is a #gpointer, #gint*, 4874 * and #gchar* respectively. 4875 * 4876 * g_direct_hash() is also the appropriate hash function for keys 4877 * of the form `GINT_TO_POINTER (n)` (or similar macros). 4878 * 4879 * A good hash functions should produce 4880 * hash values that are evenly distributed over a fairly large range. 4881 * The modulus is taken with the hash table size (a prime number) to 4882 * find the 'bucket' to place each key into. The function should also 4883 * be very fast, since it is called for each key lookup. 4884 * 4885 * Note that the hash functions provided by GLib have these qualities, 4886 * but are not particularly robust against manufactured keys that 4887 * cause hash collisions. Therefore, you should consider choosing 4888 * a more secure hash function when using a GHashTable with keys 4889 * that originate in untrusted data (such as HTTP requests). 4890 * Using g_str_hash() in that situation might make your application 4891 * vulerable to 4892 * [Algorithmic Complexity Attacks](https://lwn.net/Articles/474912/). 4893 * 4894 * The key to choosing a good hash is unpredictability. Even 4895 * cryptographic hashes are very easy to find collisions for when the 4896 * remainder is taken modulo a somewhat predictable prime number. There 4897 * must be an element of randomness that an attacker is unable to guess. 4898 * 4899 * Params: 4900 * key = a key 4901 * 4902 * Returns: the hash value corresponding to the key 4903 */ 4904 public alias extern(C) uint function(void* key) GHashFunc; 4905 4906 /** 4907 * Defines the type of a hook function that can be invoked 4908 * by g_hook_list_invoke_check(). 4909 * 4910 * Params: 4911 * data = the data field of the #GHook is passed to the hook function here 4912 * 4913 * Returns: %FALSE if the #GHook should be destroyed 4914 */ 4915 public alias extern(C) int function(void* data) GHookCheckFunc; 4916 4917 /** 4918 * Defines the type of function used by g_hook_list_marshal_check(). 4919 * 4920 * Params: 4921 * hook = a #GHook 4922 * marshalData = user data 4923 * 4924 * Returns: %FALSE if @hook should be destroyed 4925 */ 4926 public alias extern(C) int function(GHook* hook, void* marshalData) GHookCheckMarshaller; 4927 4928 /** 4929 * Defines the type of function used to compare #GHook elements in 4930 * g_hook_insert_sorted(). 4931 * 4932 * Params: 4933 * newHook = the #GHook being inserted 4934 * sibling = the #GHook to compare with @new_hook 4935 * 4936 * Returns: a value <= 0 if @new_hook should be before @sibling 4937 */ 4938 public alias extern(C) int function(GHook* newHook, GHook* sibling) GHookCompareFunc; 4939 4940 /** 4941 * Defines the type of function to be called when a hook in a 4942 * list of hooks gets finalized. 4943 * 4944 * Params: 4945 * hookList = a #GHookList 4946 * hook = the hook in @hook_list that gets finalized 4947 */ 4948 public alias extern(C) void function(GHookList* hookList, GHook* hook) GHookFinalizeFunc; 4949 4950 /** 4951 * Defines the type of the function passed to g_hook_find(). 4952 * 4953 * Params: 4954 * hook = a #GHook 4955 * data = user data passed to g_hook_find_func() 4956 * 4957 * Returns: %TRUE if the required #GHook has been found 4958 */ 4959 public alias extern(C) int function(GHook* hook, void* data) GHookFindFunc; 4960 4961 /** 4962 * Defines the type of a hook function that can be invoked 4963 * by g_hook_list_invoke(). 4964 * 4965 * Params: 4966 * data = the data field of the #GHook is passed to the hook function here 4967 */ 4968 public alias extern(C) void function(void* data) GHookFunc; 4969 4970 /** 4971 * Defines the type of function used by g_hook_list_marshal(). 4972 * 4973 * Params: 4974 * hook = a #GHook 4975 * marshalData = user data 4976 */ 4977 public alias extern(C) void function(GHook* hook, void* marshalData) GHookMarshaller; 4978 4979 /** 4980 * Specifies the type of function passed to g_io_add_watch() or 4981 * g_io_add_watch_full(), which is called when the requested condition 4982 * on a #GIOChannel is satisfied. 4983 * 4984 * Params: 4985 * source = the #GIOChannel event source 4986 * condition = the condition which has been satisfied 4987 * data = user data set in g_io_add_watch() or g_io_add_watch_full() 4988 * 4989 * Returns: the function should return %FALSE if the event source 4990 * should be removed 4991 */ 4992 public alias extern(C) int function(GIOChannel* source, GIOCondition condition, void* data) GIOFunc; 4993 4994 /** 4995 * Specifies the prototype of log handler functions. 4996 * 4997 * The default log handler, g_log_default_handler(), automatically appends a 4998 * new-line character to @message when printing it. It is advised that any 4999 * custom log handler functions behave similarly, so that logging calls in user 5000 * code do not need modifying to add a new-line character to the message if the 5001 * log handler is changed. 5002 * 5003 * This is not used if structured logging is enabled; see 5004 * [Using Structured Logging][using-structured-logging]. 5005 * 5006 * Params: 5007 * logDomain = the log domain of the message 5008 * logLevel = the log level of the message (including the 5009 * fatal and recursion flags) 5010 * message = the message to process 5011 * userData = user data, set in g_log_set_handler() 5012 */ 5013 public alias extern(C) void function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* message, void* userData) GLogFunc; 5014 5015 /** 5016 * Writer function for log entries. A log entry is a collection of one or more 5017 * #GLogFields, using the standard [field names from journal 5018 * specification](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html). 5019 * See g_log_structured() for more information. 5020 * 5021 * Writer functions must ignore fields which they do not recognise, unless they 5022 * can write arbitrary binary output, as field values may be arbitrary binary. 5023 * 5024 * @log_level is guaranteed to be included in @fields as the `PRIORITY` field, 5025 * but is provided separately for convenience of deciding whether or where to 5026 * output the log entry. 5027 * 5028 * Writer functions should return %G_LOG_WRITER_HANDLED if they handled the log 5029 * message successfully or if they deliberately ignored it. If there was an 5030 * error handling the message (for example, if the writer function is meant to 5031 * send messages to a remote logging server and there is a network error), it 5032 * should return %G_LOG_WRITER_UNHANDLED. This allows writer functions to be 5033 * chained and fall back to simpler handlers in case of failure. 5034 * 5035 * Params: 5036 * logLevel = log level of the message 5037 * fields = fields forming the message 5038 * nFields = number of @fields 5039 * userData = user data passed to g_log_set_writer_func() 5040 * 5041 * Returns: %G_LOG_WRITER_HANDLED if the log entry was handled successfully; 5042 * %G_LOG_WRITER_UNHANDLED otherwise 5043 * 5044 * Since: 2.50 5045 */ 5046 public alias extern(C) GLogWriterOutput function(GLogLevelFlags logLevel, GLogField* fields, size_t nFields, void* userData) GLogWriterFunc; 5047 5048 /** 5049 * Specifies the type of function passed to g_node_children_foreach(). 5050 * The function is called with each child node, together with the user 5051 * data passed to g_node_children_foreach(). 5052 * 5053 * Params: 5054 * node = a #GNode. 5055 * data = user data passed to g_node_children_foreach(). 5056 */ 5057 public alias extern(C) void function(GNode* node, void* data) GNodeForeachFunc; 5058 5059 /** 5060 * Specifies the type of function passed to g_node_traverse(). The 5061 * function is called with each of the nodes visited, together with the 5062 * user data passed to g_node_traverse(). If the function returns 5063 * %TRUE, then the traversal is stopped. 5064 * 5065 * Params: 5066 * node = a #GNode. 5067 * data = user data passed to g_node_traverse(). 5068 * 5069 * Returns: %TRUE to stop the traversal. 5070 */ 5071 public alias extern(C) int function(GNode* node, void* data) GNodeTraverseFunc; 5072 5073 /** 5074 * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK 5075 * options. 5076 * 5077 * Params: 5078 * optionName = The name of the option being parsed. This will be either a 5079 * single dash followed by a single letter (for a short name) or two dashes 5080 * followed by a long option name. 5081 * value = The value to be parsed. 5082 * data = User data added to the #GOptionGroup containing the option when it 5083 * was created with g_option_group_new() 5084 * 5085 * Returns: %TRUE if the option was successfully parsed, %FALSE if an error 5086 * occurred, in which case @error should be set with g_set_error() 5087 * 5088 * Throws: GException on failure. 5089 */ 5090 public alias extern(C) int function(const(char)* optionName, const(char)* value, void* data, GError** err) GOptionArgFunc; 5091 5092 /** 5093 * The type of function to be used as callback when a parse error occurs. 5094 * 5095 * Params: 5096 * context = The active #GOptionContext 5097 * group = The group to which the function belongs 5098 * data = User data added to the #GOptionGroup containing the option when it 5099 * was created with g_option_group_new() 5100 * 5101 * Throws: GException on failure. 5102 */ 5103 public alias extern(C) void function(GOptionContext* context, GOptionGroup* group, void* data, GError** err) GOptionErrorFunc; 5104 5105 /** 5106 * The type of function that can be called before and after parsing. 5107 * 5108 * Params: 5109 * context = The active #GOptionContext 5110 * group = The group to which the function belongs 5111 * data = User data added to the #GOptionGroup containing the option when it 5112 * was created with g_option_group_new() 5113 * 5114 * Returns: %TRUE if the function completed successfully, %FALSE if an error 5115 * occurred, in which case @error should be set with g_set_error() 5116 * 5117 * Throws: GException on failure. 5118 */ 5119 public alias extern(C) int function(GOptionContext* context, GOptionGroup* group, void* data, GError** err) GOptionParseFunc; 5120 5121 /** 5122 * Specifies the type of function passed to g_main_context_set_poll_func(). 5123 * The semantics of the function should match those of the poll() system call. 5124 * 5125 * Params: 5126 * ufds = an array of #GPollFD elements 5127 * nfsd = the number of elements in @ufds 5128 * timeout = the maximum time to wait for an event of the file descriptors. 5129 * A negative value indicates an infinite timeout. 5130 * 5131 * Returns: the number of #GPollFD elements which have events or errors 5132 * reported, or -1 if an error occurred. 5133 */ 5134 public alias extern(C) int function(GPollFD* ufds, uint nfsd, int timeout) GPollFunc; 5135 5136 /** 5137 * Specifies the type of the print handler functions. 5138 * These are called with the complete formatted string to output. 5139 * 5140 * Params: 5141 * string_ = the message to output 5142 */ 5143 public alias extern(C) void function(const(char)* string_) GPrintFunc; 5144 5145 /** 5146 * Specifies the type of the function passed to g_regex_replace_eval(). 5147 * It is called for each occurrence of the pattern in the string passed 5148 * to g_regex_replace_eval(), and it should append the replacement to 5149 * @result. 5150 * 5151 * Params: 5152 * matchInfo = the #GMatchInfo generated by the match. 5153 * Use g_match_info_get_regex() and g_match_info_get_string() if you 5154 * need the #GRegex or the matched string. 5155 * result = a #GString containing the new string 5156 * userData = user data passed to g_regex_replace_eval() 5157 * 5158 * Returns: %FALSE to continue the replacement process, %TRUE to stop it 5159 * 5160 * Since: 2.14 5161 */ 5162 public alias extern(C) int function(GMatchInfo* matchInfo, GString* result, void* userData) GRegexEvalCallback; 5163 5164 /** 5165 * Specifies the type of the message handler function. 5166 * 5167 * Params: 5168 * scanner = a #GScanner 5169 * message = the message 5170 * error = %TRUE if the message signals an error, 5171 * %FALSE if it signals a warning. 5172 */ 5173 public alias extern(C) void function(GScanner* scanner, char* message, int error) GScannerMsgFunc; 5174 5175 /** 5176 * A #GSequenceIterCompareFunc is a function used to compare iterators. 5177 * It must return zero if the iterators compare equal, a negative value 5178 * if @a comes before @b, and a positive value if @b comes before @a. 5179 * 5180 * Params: 5181 * a = a #GSequenceIter 5182 * b = a #GSequenceIter 5183 * data = user data 5184 * 5185 * Returns: zero if the iterators are equal, a negative value if @a 5186 * comes before @b, and a positive value if @b comes before @a. 5187 */ 5188 public alias extern(C) int function(GSequenceIter* a, GSequenceIter* b, void* data) GSequenceIterCompareFunc; 5189 5190 /** 5191 * This is just a placeholder for #GClosureMarshal, 5192 * which cannot be used here for dependency reasons. 5193 */ 5194 public alias extern(C) void function() GSourceDummyMarshal; 5195 5196 /** 5197 * Specifies the type of function passed to g_timeout_add(), 5198 * g_timeout_add_full(), g_idle_add(), and g_idle_add_full(). 5199 * 5200 * When calling g_source_set_callback(), you may need to cast a function of a 5201 * different type to this type. Use G_SOURCE_FUNC() to avoid warnings about 5202 * incompatible function types. 5203 * 5204 * Params: 5205 * userData = data passed to the function, set when the source was 5206 * created with one of the above functions 5207 * 5208 * Returns: %FALSE if the source should be removed. #G_SOURCE_CONTINUE and 5209 * #G_SOURCE_REMOVE are more memorable names for the return value. 5210 */ 5211 public alias extern(C) int function(void* userData) GSourceFunc; 5212 5213 /** 5214 * Specifies the type of the setup function passed to g_spawn_async(), 5215 * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very 5216 * limited ways, be used to affect the child's execution. 5217 * 5218 * On POSIX platforms, the function is called in the child after GLib 5219 * has performed all the setup it plans to perform, but before calling 5220 * exec(). Actions taken in this function will only affect the child, 5221 * not the parent. 5222 * 5223 * On Windows, the function is called in the parent. Its usefulness on 5224 * Windows is thus questionable. In many cases executing the child setup 5225 * function in the parent can have ill effects, and you should be very 5226 * careful when porting software to Windows that uses child setup 5227 * functions. 5228 * 5229 * However, even on POSIX, you are extremely limited in what you can 5230 * safely do from a #GSpawnChildSetupFunc, because any mutexes that were 5231 * held by other threads in the parent process at the time of the fork() 5232 * will still be locked in the child process, and they will never be 5233 * unlocked (since the threads that held them don't exist in the child). 5234 * POSIX allows only async-signal-safe functions (see signal(7)) to be 5235 * called in the child between fork() and exec(), which drastically limits 5236 * the usefulness of child setup functions. 5237 * 5238 * In particular, it is not safe to call any function which may 5239 * call malloc(), which includes POSIX functions such as setenv(). 5240 * If you need to set up the child environment differently from 5241 * the parent, you should use g_get_environ(), g_environ_setenv(), 5242 * and g_environ_unsetenv(), and then pass the complete environment 5243 * list to the `g_spawn...` function. 5244 * 5245 * Params: 5246 * userData = user data to pass to the function. 5247 */ 5248 public alias extern(C) void function(void* userData) GSpawnChildSetupFunc; 5249 5250 /** 5251 * The type used for test case functions that take an extra pointer 5252 * argument. 5253 * 5254 * Params: 5255 * userData = the data provided when registering the test 5256 * 5257 * Since: 2.28 5258 */ 5259 public alias extern(C) void function(void* userData) GTestDataFunc; 5260 5261 /** 5262 * The type used for functions that operate on test fixtures. This is 5263 * used for the fixture setup and teardown functions as well as for the 5264 * testcases themselves. 5265 * 5266 * @user_data is a pointer to the data that was given when registering 5267 * the test case. 5268 * 5269 * @fixture will be a pointer to the area of memory allocated by the 5270 * test framework, of the size requested. If the requested size was 5271 * zero then @fixture will be equal to @user_data. 5272 * 5273 * Params: 5274 * fixture = the test fixture 5275 * userData = the data provided when registering the test 5276 * 5277 * Since: 2.28 5278 */ 5279 public alias extern(C) void function(void* fixture, void* userData) GTestFixtureFunc; 5280 5281 /** 5282 * The type used for test case functions. 5283 * 5284 * Since: 2.28 5285 */ 5286 public alias extern(C) void function() GTestFunc; 5287 5288 /** 5289 * Specifies the prototype of fatal log handler functions. 5290 * 5291 * Params: 5292 * logDomain = the log domain of the message 5293 * logLevel = the log level of the message (including the fatal and recursion flags) 5294 * message = the message to process 5295 * userData = user data, set in g_test_log_set_fatal_handler() 5296 * 5297 * Returns: %TRUE if the program should abort, %FALSE otherwise 5298 * 5299 * Since: 2.22 5300 */ 5301 public alias extern(C) int function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* message, void* userData) GTestLogFatalFunc; 5302 5303 /** 5304 * Specifies the type of the @func functions passed to g_thread_new() 5305 * or g_thread_try_new(). 5306 * 5307 * Params: 5308 * data = data passed to the thread 5309 * 5310 * Returns: the return value of the thread 5311 */ 5312 public alias extern(C) void* function(void* data) GThreadFunc; 5313 5314 /** 5315 * The type of functions which are used to translate user-visible 5316 * strings, for <option>--help</option> output. 5317 * 5318 * Params: 5319 * str = the untranslated string 5320 * data = user data specified when installing the function, e.g. 5321 * in g_option_group_set_translate_func() 5322 * 5323 * Returns: a translation of the string for the current locale. 5324 * The returned string is owned by GLib and must not be freed. 5325 */ 5326 public alias extern(C) const(char)* function(const(char)* str, void* data) GTranslateFunc; 5327 5328 /** 5329 * Specifies the type of function passed to g_tree_traverse(). It is 5330 * passed the key and value of each node, together with the @user_data 5331 * parameter passed to g_tree_traverse(). If the function returns 5332 * %TRUE, the traversal is stopped. 5333 * 5334 * Params: 5335 * key = a key of a #GTree node 5336 * value = the value corresponding to the key 5337 * data = user data passed to g_tree_traverse() 5338 * 5339 * Returns: %TRUE to stop the traversal 5340 */ 5341 public alias extern(C) int function(void* key, void* value, void* data) GTraverseFunc; 5342 5343 /** 5344 * The type of functions to be called when a UNIX fd watch source 5345 * triggers. 5346 * 5347 * Params: 5348 * fd = the fd that triggered the event 5349 * condition = the IO conditions reported on @fd 5350 * userData = user data passed to g_unix_fd_add() 5351 * 5352 * Returns: %FALSE if the source should be removed 5353 */ 5354 public alias extern(C) int function(int fd, GIOCondition condition, void* userData) GUnixFDSourceFunc; 5355 5356 /** 5357 * Declares a type of function which takes no arguments 5358 * and has no return value. It is used to specify the type 5359 * function passed to g_atexit(). 5360 */ 5361 public alias extern(C) void function() GVoidFunc; 5362 5363 /** 5364 * Specifies the type of the module initialization function. 5365 * If a module contains a function named g_module_check_init() it is called 5366 * automatically when the module is loaded. It is passed the #GModule structure 5367 * and should return %NULL on success or a string describing the initialization 5368 * error. 5369 * 5370 * Params: 5371 * module_ = the #GModule corresponding to the module which has just been loaded 5372 * 5373 * Returns: %NULL on success, or a string describing the initialization error 5374 */ 5375 public alias extern(C) const(char)* function(GModule* module_) GModuleCheckInit; 5376 5377 /** 5378 * Specifies the type of the module function called when it is unloaded. 5379 * If a module contains a function named g_module_unload() it is called 5380 * automatically when the module is unloaded. 5381 * It is passed the #GModule structure. 5382 * 5383 * Params: 5384 * module_ = the #GModule about to be unloaded 5385 */ 5386 public alias extern(C) void function(GModule* module_) GModuleUnload; 5387 5388 enum ANALYZER_ANALYZING = 1; 5389 alias G_ANALYZER_ANALYZING = ANALYZER_ANALYZING; 5390 5391 /** 5392 * A good size for a buffer to be passed into g_ascii_dtostr(). 5393 * It is guaranteed to be enough for all output of that function 5394 * on systems with 64bit IEEE-compatible doubles. 5395 * 5396 * The typical usage would be something like: 5397 * |[<!-- language="C" --> 5398 * char buf[G_ASCII_DTOSTR_BUF_SIZE]; 5399 * 5400 * fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value)); 5401 * ]| 5402 */ 5403 enum ASCII_DTOSTR_BUF_SIZE = 39; 5404 alias G_ASCII_DTOSTR_BUF_SIZE = ASCII_DTOSTR_BUF_SIZE; 5405 5406 /** 5407 * Specifies one of the possible types of byte order. 5408 * See #G_BYTE_ORDER. 5409 */ 5410 enum BIG_ENDIAN = 4321; 5411 alias G_BIG_ENDIAN = BIG_ENDIAN; 5412 5413 /** 5414 * The set of uppercase ASCII alphabet characters. 5415 * Used for specifying valid identifier characters 5416 * in #GScannerConfig. 5417 */ 5418 enum CSET_A_2_Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 5419 alias G_CSET_A_2_Z = CSET_A_2_Z; 5420 5421 /** 5422 * The set of ASCII digits. 5423 * Used for specifying valid identifier characters 5424 * in #GScannerConfig. 5425 */ 5426 enum CSET_DIGITS = "0123456789"; 5427 alias G_CSET_DIGITS = CSET_DIGITS; 5428 5429 /** 5430 * The set of lowercase ASCII alphabet characters. 5431 * Used for specifying valid identifier characters 5432 * in #GScannerConfig. 5433 */ 5434 enum CSET_a_2_z = "abcdefghijklmnopqrstuvwxyz"; 5435 alias G_CSET_a_2_z = CSET_a_2_z; 5436 5437 /** 5438 * A bitmask that restricts the possible flags passed to 5439 * g_datalist_set_flags(). Passing a flags value where 5440 * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error. 5441 */ 5442 enum DATALIST_FLAGS_MASK = 3; 5443 alias G_DATALIST_FLAGS_MASK = DATALIST_FLAGS_MASK; 5444 5445 /** 5446 * Represents an invalid #GDateDay. 5447 */ 5448 enum DATE_BAD_DAY = 0; 5449 alias G_DATE_BAD_DAY = DATE_BAD_DAY; 5450 5451 /** 5452 * Represents an invalid Julian day number. 5453 */ 5454 enum DATE_BAD_JULIAN = 0; 5455 alias G_DATE_BAD_JULIAN = DATE_BAD_JULIAN; 5456 5457 /** 5458 * Represents an invalid year. 5459 */ 5460 enum DATE_BAD_YEAR = 0; 5461 alias G_DATE_BAD_YEAR = DATE_BAD_YEAR; 5462 5463 /** 5464 * This is the platform dependent conversion specifier for scanning and 5465 * printing values of type #gint16. It is a string literal, but doesn't 5466 * include the percent-sign, such that you can add precision and length 5467 * modifiers between percent-sign and conversion specifier. 5468 * 5469 * |[<!-- language="C" --> 5470 * gint16 in; 5471 * gint32 out; 5472 * sscanf ("42", "%" G_GINT16_FORMAT, &in) 5473 * out = in * 1000; 5474 * g_print ("%" G_GINT32_FORMAT, out); 5475 * ]| 5476 */ 5477 enum GINT16_FORMAT = "hi"; 5478 alias G_GINT16_FORMAT = GINT16_FORMAT; 5479 5480 /** 5481 * The platform dependent length modifier for conversion specifiers 5482 * for scanning and printing values of type #gint16 or #guint16. It 5483 * is a string literal, but doesn't include the percent-sign, such 5484 * that you can add precision and length modifiers between percent-sign 5485 * and conversion specifier and append a conversion specifier. 5486 * 5487 * The following example prints "0x7b"; 5488 * |[<!-- language="C" --> 5489 * gint16 value = 123; 5490 * g_print ("%#" G_GINT16_MODIFIER "x", value); 5491 * ]| 5492 */ 5493 enum GINT16_MODIFIER = "h"; 5494 alias G_GINT16_MODIFIER = GINT16_MODIFIER; 5495 5496 /** 5497 * This is the platform dependent conversion specifier for scanning 5498 * and printing values of type #gint32. See also #G_GINT16_FORMAT. 5499 */ 5500 enum GINT32_FORMAT = "i"; 5501 alias G_GINT32_FORMAT = GINT32_FORMAT; 5502 5503 /** 5504 * The platform dependent length modifier for conversion specifiers 5505 * for scanning and printing values of type #gint32 or #guint32. It 5506 * is a string literal. See also #G_GINT16_MODIFIER. 5507 */ 5508 enum GINT32_MODIFIER = ""; 5509 alias G_GINT32_MODIFIER = GINT32_MODIFIER; 5510 5511 /** 5512 * This is the platform dependent conversion specifier for scanning 5513 * and printing values of type #gint64. See also #G_GINT16_FORMAT. 5514 * 5515 * Some platforms do not support scanning and printing 64-bit integers, 5516 * even though the types are supported. On such platforms %G_GINT64_FORMAT 5517 * is not defined. Note that scanf() may not support 64-bit integers, even 5518 * if %G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() 5519 * is not recommended for parsing anyway; consider using g_ascii_strtoull() 5520 * instead. 5521 */ 5522 enum GINT64_FORMAT = "li"; 5523 alias G_GINT64_FORMAT = GINT64_FORMAT; 5524 5525 /** 5526 * The platform dependent length modifier for conversion specifiers 5527 * for scanning and printing values of type #gint64 or #guint64. 5528 * It is a string literal. 5529 * 5530 * Some platforms do not support printing 64-bit integers, even 5531 * though the types are supported. On such platforms %G_GINT64_MODIFIER 5532 * is not defined. 5533 */ 5534 enum GINT64_MODIFIER = "l"; 5535 alias G_GINT64_MODIFIER = GINT64_MODIFIER; 5536 5537 /** 5538 * This is the platform dependent conversion specifier for scanning 5539 * and printing values of type #gintptr. 5540 */ 5541 enum GINTPTR_FORMAT = "li"; 5542 alias G_GINTPTR_FORMAT = GINTPTR_FORMAT; 5543 5544 /** 5545 * The platform dependent length modifier for conversion specifiers 5546 * for scanning and printing values of type #gintptr or #guintptr. 5547 * It is a string literal. 5548 */ 5549 enum GINTPTR_MODIFIER = "l"; 5550 alias G_GINTPTR_MODIFIER = GINTPTR_MODIFIER; 5551 5552 /** 5553 * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc 5554 * version 2.x. Don't use it. 5555 * 5556 * Deprecated: Use G_STRFUNC() instead 5557 */ 5558 enum GNUC_FUNCTION = ""; 5559 alias G_GNUC_FUNCTION = GNUC_FUNCTION; 5560 5561 /** 5562 * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ 5563 * on gcc version 2.x. Don't use it. 5564 * 5565 * Deprecated: Use G_STRFUNC() instead 5566 */ 5567 enum GNUC_PRETTY_FUNCTION = ""; 5568 alias G_GNUC_PRETTY_FUNCTION = GNUC_PRETTY_FUNCTION; 5569 5570 /** 5571 * This is the platform dependent conversion specifier for scanning 5572 * and printing values of type #gsize. See also #G_GINT16_FORMAT. 5573 */ 5574 enum GSIZE_FORMAT = "lu"; 5575 alias G_GSIZE_FORMAT = GSIZE_FORMAT; 5576 5577 /** 5578 * The platform dependent length modifier for conversion specifiers 5579 * for scanning and printing values of type #gsize. It 5580 * is a string literal. 5581 */ 5582 enum GSIZE_MODIFIER = "l"; 5583 alias G_GSIZE_MODIFIER = GSIZE_MODIFIER; 5584 5585 /** 5586 * This is the platform dependent conversion specifier for scanning 5587 * and printing values of type #gssize. See also #G_GINT16_FORMAT. 5588 */ 5589 enum GSSIZE_FORMAT = "li"; 5590 alias G_GSSIZE_FORMAT = GSSIZE_FORMAT; 5591 5592 /** 5593 * The platform dependent length modifier for conversion specifiers 5594 * for scanning and printing values of type #gssize. It 5595 * is a string literal. 5596 */ 5597 enum GSSIZE_MODIFIER = "l"; 5598 alias G_GSSIZE_MODIFIER = GSSIZE_MODIFIER; 5599 5600 /** 5601 * This is the platform dependent conversion specifier for scanning 5602 * and printing values of type #guint16. See also #G_GINT16_FORMAT 5603 */ 5604 enum GUINT16_FORMAT = "hu"; 5605 alias G_GUINT16_FORMAT = GUINT16_FORMAT; 5606 5607 /** 5608 * This is the platform dependent conversion specifier for scanning 5609 * and printing values of type #guint32. See also #G_GINT16_FORMAT. 5610 */ 5611 enum GUINT32_FORMAT = "u"; 5612 alias G_GUINT32_FORMAT = GUINT32_FORMAT; 5613 5614 /** 5615 * This is the platform dependent conversion specifier for scanning 5616 * and printing values of type #guint64. See also #G_GINT16_FORMAT. 5617 * 5618 * Some platforms do not support scanning and printing 64-bit integers, 5619 * even though the types are supported. On such platforms %G_GUINT64_FORMAT 5620 * is not defined. Note that scanf() may not support 64-bit integers, even 5621 * if %G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() 5622 * is not recommended for parsing anyway; consider using g_ascii_strtoull() 5623 * instead. 5624 */ 5625 enum GUINT64_FORMAT = "lu"; 5626 alias G_GUINT64_FORMAT = GUINT64_FORMAT; 5627 5628 /** 5629 * This is the platform dependent conversion specifier 5630 * for scanning and printing values of type #guintptr. 5631 */ 5632 enum GUINTPTR_FORMAT = "lu"; 5633 alias G_GUINTPTR_FORMAT = GUINTPTR_FORMAT; 5634 5635 enum HAVE_GINT64 = 1; 5636 alias G_HAVE_GINT64 = HAVE_GINT64; 5637 5638 enum HAVE_GNUC_VARARGS = 1; 5639 alias G_HAVE_GNUC_VARARGS = HAVE_GNUC_VARARGS; 5640 5641 /** 5642 * Defined to 1 if gcc-style visibility handling is supported. 5643 */ 5644 enum HAVE_GNUC_VISIBILITY = 1; 5645 alias G_HAVE_GNUC_VISIBILITY = HAVE_GNUC_VISIBILITY; 5646 5647 enum HAVE_GROWING_STACK = 0; 5648 alias G_HAVE_GROWING_STACK = HAVE_GROWING_STACK; 5649 5650 enum HAVE_ISO_VARARGS = 1; 5651 alias G_HAVE_ISO_VARARGS = HAVE_ISO_VARARGS; 5652 5653 /** 5654 * The position of the first bit which is not reserved for internal 5655 * use be the #GHook implementation, i.e. 5656 * `1 << G_HOOK_FLAG_USER_SHIFT` is the first 5657 * bit which can be used for application-defined flags. 5658 */ 5659 enum HOOK_FLAG_USER_SHIFT = 4; 5660 alias G_HOOK_FLAG_USER_SHIFT = HOOK_FLAG_USER_SHIFT; 5661 5662 /** 5663 * The bias by which exponents in double-precision floats are offset. 5664 */ 5665 enum IEEE754_DOUBLE_BIAS = 1023; 5666 alias G_IEEE754_DOUBLE_BIAS = IEEE754_DOUBLE_BIAS; 5667 5668 /** 5669 * The bias by which exponents in single-precision floats are offset. 5670 */ 5671 enum IEEE754_FLOAT_BIAS = 127; 5672 alias G_IEEE754_FLOAT_BIAS = IEEE754_FLOAT_BIAS; 5673 5674 /** 5675 * The name of the main group of a desktop entry file, as defined in the 5676 * [Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec). 5677 * Consult the specification for more 5678 * details about the meanings of the keys below. 5679 */ 5680 enum KEY_FILE_DESKTOP_GROUP = "Desktop Entry"; 5681 alias G_KEY_FILE_DESKTOP_GROUP = KEY_FILE_DESKTOP_GROUP; 5682 5683 /** 5684 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string list 5685 * giving the available application actions. 5686 */ 5687 enum KEY_FILE_DESKTOP_KEY_ACTIONS = "Actions"; 5688 alias G_KEY_FILE_DESKTOP_KEY_ACTIONS = KEY_FILE_DESKTOP_KEY_ACTIONS; 5689 5690 /** 5691 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list 5692 * of strings giving the categories in which the desktop entry 5693 * should be shown in a menu. 5694 */ 5695 enum KEY_FILE_DESKTOP_KEY_CATEGORIES = "Categories"; 5696 alias G_KEY_FILE_DESKTOP_KEY_CATEGORIES = KEY_FILE_DESKTOP_KEY_CATEGORIES; 5697 5698 /** 5699 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized 5700 * string giving the tooltip for the desktop entry. 5701 */ 5702 enum KEY_FILE_DESKTOP_KEY_COMMENT = "Comment"; 5703 alias G_KEY_FILE_DESKTOP_KEY_COMMENT = KEY_FILE_DESKTOP_KEY_COMMENT; 5704 5705 /** 5706 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean set to true 5707 * if the application is D-Bus activatable. 5708 */ 5709 enum KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = "DBusActivatable"; 5710 alias G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE; 5711 5712 /** 5713 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string 5714 * giving the command line to execute. It is only valid for desktop 5715 * entries with the `Application` type. 5716 */ 5717 enum KEY_FILE_DESKTOP_KEY_EXEC = "Exec"; 5718 alias G_KEY_FILE_DESKTOP_KEY_EXEC = KEY_FILE_DESKTOP_KEY_EXEC; 5719 5720 /** 5721 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized 5722 * string giving the generic name of the desktop entry. 5723 */ 5724 enum KEY_FILE_DESKTOP_KEY_GENERIC_NAME = "GenericName"; 5725 alias G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME = KEY_FILE_DESKTOP_KEY_GENERIC_NAME; 5726 5727 /** 5728 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 5729 * stating whether the desktop entry has been deleted by the user. 5730 */ 5731 enum KEY_FILE_DESKTOP_KEY_HIDDEN = "Hidden"; 5732 alias G_KEY_FILE_DESKTOP_KEY_HIDDEN = KEY_FILE_DESKTOP_KEY_HIDDEN; 5733 5734 /** 5735 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized 5736 * string giving the name of the icon to be displayed for the desktop 5737 * entry. 5738 */ 5739 enum KEY_FILE_DESKTOP_KEY_ICON = "Icon"; 5740 alias G_KEY_FILE_DESKTOP_KEY_ICON = KEY_FILE_DESKTOP_KEY_ICON; 5741 5742 /** 5743 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list 5744 * of strings giving the MIME types supported by this desktop entry. 5745 */ 5746 enum KEY_FILE_DESKTOP_KEY_MIME_TYPE = "MimeType"; 5747 alias G_KEY_FILE_DESKTOP_KEY_MIME_TYPE = KEY_FILE_DESKTOP_KEY_MIME_TYPE; 5748 5749 /** 5750 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized 5751 * string giving the specific name of the desktop entry. 5752 */ 5753 enum KEY_FILE_DESKTOP_KEY_NAME = "Name"; 5754 alias G_KEY_FILE_DESKTOP_KEY_NAME = KEY_FILE_DESKTOP_KEY_NAME; 5755 5756 /** 5757 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of 5758 * strings identifying the environments that should not display the 5759 * desktop entry. 5760 */ 5761 enum KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = "NotShowIn"; 5762 alias G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN; 5763 5764 /** 5765 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 5766 * stating whether the desktop entry should be shown in menus. 5767 */ 5768 enum KEY_FILE_DESKTOP_KEY_NO_DISPLAY = "NoDisplay"; 5769 alias G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY = KEY_FILE_DESKTOP_KEY_NO_DISPLAY; 5770 5771 /** 5772 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of 5773 * strings identifying the environments that should display the 5774 * desktop entry. 5775 */ 5776 enum KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = "OnlyShowIn"; 5777 alias G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN; 5778 5779 /** 5780 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string 5781 * containing the working directory to run the program in. It is only 5782 * valid for desktop entries with the `Application` type. 5783 */ 5784 enum KEY_FILE_DESKTOP_KEY_PATH = "Path"; 5785 alias G_KEY_FILE_DESKTOP_KEY_PATH = KEY_FILE_DESKTOP_KEY_PATH; 5786 5787 /** 5788 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 5789 * stating whether the application supports the 5790 * [Startup Notification Protocol Specification](http://www.freedesktop.org/Standards/startup-notification-spec). 5791 */ 5792 enum KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = "StartupNotify"; 5793 alias G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY; 5794 5795 /** 5796 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is string 5797 * identifying the WM class or name hint of a window that the application 5798 * will create, which can be used to emulate Startup Notification with 5799 * older applications. 5800 */ 5801 enum KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = "StartupWMClass"; 5802 alias G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS; 5803 5804 /** 5805 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 5806 * stating whether the program should be run in a terminal window. 5807 * It is only valid for desktop entries with the 5808 * `Application` type. 5809 */ 5810 enum KEY_FILE_DESKTOP_KEY_TERMINAL = "Terminal"; 5811 alias G_KEY_FILE_DESKTOP_KEY_TERMINAL = KEY_FILE_DESKTOP_KEY_TERMINAL; 5812 5813 /** 5814 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string 5815 * giving the file name of a binary on disk used to determine if the 5816 * program is actually installed. It is only valid for desktop entries 5817 * with the `Application` type. 5818 */ 5819 enum KEY_FILE_DESKTOP_KEY_TRY_EXEC = "TryExec"; 5820 alias G_KEY_FILE_DESKTOP_KEY_TRY_EXEC = KEY_FILE_DESKTOP_KEY_TRY_EXEC; 5821 5822 /** 5823 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string 5824 * giving the type of the desktop entry. Usually 5825 * #G_KEY_FILE_DESKTOP_TYPE_APPLICATION, 5826 * #G_KEY_FILE_DESKTOP_TYPE_LINK, or 5827 * #G_KEY_FILE_DESKTOP_TYPE_DIRECTORY. 5828 */ 5829 enum KEY_FILE_DESKTOP_KEY_TYPE = "Type"; 5830 alias G_KEY_FILE_DESKTOP_KEY_TYPE = KEY_FILE_DESKTOP_KEY_TYPE; 5831 5832 /** 5833 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string 5834 * giving the URL to access. It is only valid for desktop entries 5835 * with the `Link` type. 5836 */ 5837 enum KEY_FILE_DESKTOP_KEY_URL = "URL"; 5838 alias G_KEY_FILE_DESKTOP_KEY_URL = KEY_FILE_DESKTOP_KEY_URL; 5839 5840 /** 5841 * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string 5842 * giving the version of the Desktop Entry Specification used for 5843 * the desktop entry file. 5844 */ 5845 enum KEY_FILE_DESKTOP_KEY_VERSION = "Version"; 5846 alias G_KEY_FILE_DESKTOP_KEY_VERSION = KEY_FILE_DESKTOP_KEY_VERSION; 5847 5848 /** 5849 * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop 5850 * entries representing applications. 5851 */ 5852 enum KEY_FILE_DESKTOP_TYPE_APPLICATION = "Application"; 5853 alias G_KEY_FILE_DESKTOP_TYPE_APPLICATION = KEY_FILE_DESKTOP_TYPE_APPLICATION; 5854 5855 /** 5856 * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop 5857 * entries representing directories. 5858 */ 5859 enum KEY_FILE_DESKTOP_TYPE_DIRECTORY = "Directory"; 5860 alias G_KEY_FILE_DESKTOP_TYPE_DIRECTORY = KEY_FILE_DESKTOP_TYPE_DIRECTORY; 5861 5862 /** 5863 * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop 5864 * entries representing links to documents. 5865 */ 5866 enum KEY_FILE_DESKTOP_TYPE_LINK = "Link"; 5867 alias G_KEY_FILE_DESKTOP_TYPE_LINK = KEY_FILE_DESKTOP_TYPE_LINK; 5868 5869 /** 5870 * Specifies one of the possible types of byte order. 5871 * See #G_BYTE_ORDER. 5872 */ 5873 enum LITTLE_ENDIAN = 1234; 5874 alias G_LITTLE_ENDIAN = LITTLE_ENDIAN; 5875 5876 /** 5877 * Defines the log domain. See [Log Domains](#log-domains). 5878 * 5879 * Libraries should define this so that any messages 5880 * which they log can be differentiated from messages from other 5881 * libraries and application code. But be careful not to define 5882 * it in any public header files. 5883 * 5884 * Log domains must be unique, and it is recommended that they are the 5885 * application or library name, optionally followed by a hyphen and a sub-domain 5886 * name. For example, `bloatpad` or `bloatpad-io`. 5887 * 5888 * If undefined, it defaults to the default %NULL (or `""`) log domain; this is 5889 * not advisable, as it cannot be filtered against using the `G_MESSAGES_DEBUG` 5890 * environment variable. 5891 * 5892 * For example, GTK+ uses this in its `Makefile.am`: 5893 * |[ 5894 * AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gtk\" 5895 * ]| 5896 * 5897 * Applications can choose to leave it as the default %NULL (or `""`) 5898 * domain. However, defining the domain offers the same advantages as 5899 * above. 5900 */ 5901 enum LOG_DOMAIN = 0; 5902 alias G_LOG_DOMAIN = LOG_DOMAIN; 5903 5904 /** 5905 * GLib log levels that are considered fatal by default. 5906 * 5907 * This is not used if structured logging is enabled; see 5908 * [Using Structured Logging][using-structured-logging]. 5909 */ 5910 enum LOG_FATAL_MASK = 5; 5911 alias G_LOG_FATAL_MASK = LOG_FATAL_MASK; 5912 5913 /** 5914 * Log levels below 1<<G_LOG_LEVEL_USER_SHIFT are used by GLib. 5915 * Higher bits can be used for user-defined log levels. 5916 */ 5917 enum LOG_LEVEL_USER_SHIFT = 8; 5918 alias G_LOG_LEVEL_USER_SHIFT = LOG_LEVEL_USER_SHIFT; 5919 5920 /** 5921 * The major version number of the GLib library. 5922 * 5923 * Like #glib_major_version, but from the headers used at 5924 * application compile time, rather than from the library 5925 * linked against at application run time. 5926 */ 5927 enum MAJOR_VERSION = 2; 5928 alias GLIB_MAJOR_VERSION = MAJOR_VERSION; 5929 5930 /** 5931 * The maximum value which can be held in a #gint16. 5932 */ 5933 enum MAXINT16 = 32767; 5934 alias G_MAXINT16 = MAXINT16; 5935 5936 /** 5937 * The maximum value which can be held in a #gint32. 5938 */ 5939 enum MAXINT32 = 2147483647; 5940 alias G_MAXINT32 = MAXINT32; 5941 5942 /** 5943 * The maximum value which can be held in a #gint64. 5944 */ 5945 enum MAXINT64 = 9223372036854775807UL; 5946 alias G_MAXINT64 = MAXINT64; 5947 5948 /** 5949 * The maximum value which can be held in a #gint8. 5950 */ 5951 enum MAXINT8 = 127; 5952 alias G_MAXINT8 = MAXINT8; 5953 5954 /** 5955 * The maximum value which can be held in a #guint16. 5956 */ 5957 enum MAXUINT16 = 65535; 5958 alias G_MAXUINT16 = MAXUINT16; 5959 5960 /** 5961 * The maximum value which can be held in a #guint32. 5962 */ 5963 enum MAXUINT32 = 4294967295; 5964 alias G_MAXUINT32 = MAXUINT32; 5965 5966 /** 5967 * The maximum value which can be held in a #guint64. 5968 */ 5969 enum MAXUINT64 = 18446744073709551615UL; 5970 alias G_MAXUINT64 = MAXUINT64; 5971 5972 /** 5973 * The maximum value which can be held in a #guint8. 5974 */ 5975 enum MAXUINT8 = 255; 5976 alias G_MAXUINT8 = MAXUINT8; 5977 5978 /** 5979 * The micro version number of the GLib library. 5980 * 5981 * Like #gtk_micro_version, but from the headers used at 5982 * application compile time, rather than from the library 5983 * linked against at application run time. 5984 */ 5985 enum MICRO_VERSION = 0; 5986 alias GLIB_MICRO_VERSION = MICRO_VERSION; 5987 5988 /** 5989 * The minimum value which can be held in a #gint16. 5990 */ 5991 enum MININT16 = -32768; 5992 alias G_MININT16 = MININT16; 5993 5994 /** 5995 * The minimum value which can be held in a #gint32. 5996 */ 5997 enum MININT32 = -2147483648; 5998 alias G_MININT32 = MININT32; 5999 6000 /** 6001 * The minimum value which can be held in a #gint64. 6002 */ 6003 enum MININT64 = -9223372036854775808UL; 6004 alias G_MININT64 = MININT64; 6005 6006 /** 6007 * The minimum value which can be held in a #gint8. 6008 */ 6009 enum MININT8 = -128; 6010 alias G_MININT8 = MININT8; 6011 6012 /** 6013 * The minor version number of the GLib library. 6014 * 6015 * Like #gtk_minor_version, but from the headers used at 6016 * application compile time, rather than from the library 6017 * linked against at application run time. 6018 */ 6019 enum MINOR_VERSION = 60; 6020 alias GLIB_MINOR_VERSION = MINOR_VERSION; 6021 6022 enum MODULE_SUFFIX = "so"; 6023 alias G_MODULE_SUFFIX = MODULE_SUFFIX; 6024 6025 /** 6026 * If a long option in the main group has this name, it is not treated as a 6027 * regular option. Instead it collects all non-option arguments which would 6028 * otherwise be left in `argv`. The option must be of type 6029 * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY 6030 * or %G_OPTION_ARG_FILENAME_ARRAY. 6031 * 6032 * 6033 * Using #G_OPTION_REMAINING instead of simply scanning `argv` 6034 * for leftover arguments has the advantage that GOption takes care of 6035 * necessary encoding conversions for strings or filenames. 6036 */ 6037 enum OPTION_REMAINING = ""; 6038 alias G_OPTION_REMAINING = OPTION_REMAINING; 6039 6040 /** 6041 * Specifies one of the possible types of byte order 6042 * (currently unused). See #G_BYTE_ORDER. 6043 */ 6044 enum PDP_ENDIAN = 3412; 6045 alias G_PDP_ENDIAN = PDP_ENDIAN; 6046 6047 /** 6048 * A format specifier that can be used in printf()-style format strings 6049 * when printing a #GPid. 6050 */ 6051 enum PID_FORMAT = "i"; 6052 alias G_PID_FORMAT = PID_FORMAT; 6053 6054 /** 6055 * A format specifier that can be used in printf()-style format strings 6056 * when printing the @fd member of a #GPollFD. 6057 */ 6058 enum POLLFD_FORMAT = "%d"; 6059 alias G_POLLFD_FORMAT = POLLFD_FORMAT; 6060 6061 /** 6062 * Use this for default priority event sources. 6063 * 6064 * In GLib this priority is used when adding timeout functions 6065 * with g_timeout_add(). In GDK this priority is used for events 6066 * from the X server. 6067 */ 6068 enum PRIORITY_DEFAULT = 0; 6069 alias G_PRIORITY_DEFAULT = PRIORITY_DEFAULT; 6070 6071 /** 6072 * Use this for default priority idle functions. 6073 * 6074 * In GLib this priority is used when adding idle functions with 6075 * g_idle_add(). 6076 */ 6077 enum PRIORITY_DEFAULT_IDLE = 200; 6078 alias G_PRIORITY_DEFAULT_IDLE = PRIORITY_DEFAULT_IDLE; 6079 6080 /** 6081 * Use this for high priority event sources. 6082 * 6083 * It is not used within GLib or GTK+. 6084 */ 6085 enum PRIORITY_HIGH = -100; 6086 alias G_PRIORITY_HIGH = PRIORITY_HIGH; 6087 6088 /** 6089 * Use this for high priority idle functions. 6090 * 6091 * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations, 6092 * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is 6093 * done to ensure that any pending resizes are processed before any 6094 * pending redraws, so that widgets are not redrawn twice unnecessarily.) 6095 */ 6096 enum PRIORITY_HIGH_IDLE = 100; 6097 alias G_PRIORITY_HIGH_IDLE = PRIORITY_HIGH_IDLE; 6098 6099 /** 6100 * Use this for very low priority background tasks. 6101 * 6102 * It is not used within GLib or GTK+. 6103 */ 6104 enum PRIORITY_LOW = 300; 6105 alias G_PRIORITY_LOW = PRIORITY_LOW; 6106 6107 enum SIZEOF_LONG = 8; 6108 alias GLIB_SIZEOF_LONG = SIZEOF_LONG; 6109 6110 enum SIZEOF_SIZE_T = 8; 6111 alias GLIB_SIZEOF_SIZE_T = SIZEOF_SIZE_T; 6112 6113 enum SIZEOF_SSIZE_T = 8; 6114 alias GLIB_SIZEOF_SSIZE_T = SIZEOF_SSIZE_T; 6115 6116 enum SIZEOF_VOID_P = 8; 6117 alias GLIB_SIZEOF_VOID_P = SIZEOF_VOID_P; 6118 6119 /** 6120 * Use this macro as the return value of a #GSourceFunc to leave 6121 * the #GSource in the main loop. 6122 */ 6123 enum SOURCE_CONTINUE = true; 6124 alias G_SOURCE_CONTINUE = SOURCE_CONTINUE; 6125 6126 /** 6127 * Use this macro as the return value of a #GSourceFunc to remove 6128 * the #GSource from the main loop. 6129 */ 6130 enum SOURCE_REMOVE = false; 6131 alias G_SOURCE_REMOVE = SOURCE_REMOVE; 6132 6133 /** 6134 * The standard delimiters, used in g_strdelimit(). 6135 */ 6136 enum STR_DELIMITERS = "_-|> <."; 6137 alias G_STR_DELIMITERS = STR_DELIMITERS; 6138 6139 enum SYSDEF_AF_INET = 2; 6140 alias GLIB_SYSDEF_AF_INET = SYSDEF_AF_INET; 6141 6142 enum SYSDEF_AF_INET6 = 10; 6143 alias GLIB_SYSDEF_AF_INET6 = SYSDEF_AF_INET6; 6144 6145 enum SYSDEF_AF_UNIX = 1; 6146 alias GLIB_SYSDEF_AF_UNIX = SYSDEF_AF_UNIX; 6147 6148 enum SYSDEF_MSG_DONTROUTE = 4; 6149 alias GLIB_SYSDEF_MSG_DONTROUTE = SYSDEF_MSG_DONTROUTE; 6150 6151 enum SYSDEF_MSG_OOB = 1; 6152 alias GLIB_SYSDEF_MSG_OOB = SYSDEF_MSG_OOB; 6153 6154 enum SYSDEF_MSG_PEEK = 2; 6155 alias GLIB_SYSDEF_MSG_PEEK = SYSDEF_MSG_PEEK; 6156 6157 /** 6158 * Creates a unique temporary directory for each unit test and uses 6159 * g_set_user_dirs() to set XDG directories to point into subdirectories of it 6160 * for the duration of the unit test. The directory tree is cleaned up after the 6161 * test finishes successfully. Note that this doesn’t take effect until 6162 * g_test_run() is called, so calls to (for example) g_get_user_home_dir() will 6163 * return the system-wide value when made in a test program’s main() function. 6164 * 6165 * The following functions will return subdirectories of the temporary directory 6166 * when this option is used. The specific subdirectory paths in use are not 6167 * guaranteed to be stable API — always use a getter function to retrieve them. 6168 * 6169 * - g_get_home_dir() 6170 * - g_get_user_cache_dir() 6171 * - g_get_system_config_dirs() 6172 * - g_get_user_config_dir() 6173 * - g_get_system_data_dirs() 6174 * - g_get_user_data_dir() 6175 * - g_get_user_runtime_dir() 6176 * 6177 * The subdirectories may not be created by the test harness; as with normal 6178 * calls to functions like g_get_user_cache_dir(), the caller must be prepared 6179 * to create the directory if it doesn’t exist. 6180 */ 6181 enum TEST_OPTION_ISOLATE_DIRS = "isolate_dirs"; 6182 alias G_TEST_OPTION_ISOLATE_DIRS = TEST_OPTION_ISOLATE_DIRS; 6183 6184 /** 6185 * Evaluates to a time span of one day. 6186 */ 6187 enum TIME_SPAN_DAY = 86400000000UL; 6188 alias G_TIME_SPAN_DAY = TIME_SPAN_DAY; 6189 6190 /** 6191 * Evaluates to a time span of one hour. 6192 */ 6193 enum TIME_SPAN_HOUR = 3600000000UL; 6194 alias G_TIME_SPAN_HOUR = TIME_SPAN_HOUR; 6195 6196 /** 6197 * Evaluates to a time span of one millisecond. 6198 */ 6199 enum TIME_SPAN_MILLISECOND = 1000UL; 6200 alias G_TIME_SPAN_MILLISECOND = TIME_SPAN_MILLISECOND; 6201 6202 /** 6203 * Evaluates to a time span of one minute. 6204 */ 6205 enum TIME_SPAN_MINUTE = 60000000UL; 6206 alias G_TIME_SPAN_MINUTE = TIME_SPAN_MINUTE; 6207 6208 /** 6209 * Evaluates to a time span of one second. 6210 */ 6211 enum TIME_SPAN_SECOND = 1000000UL; 6212 alias G_TIME_SPAN_SECOND = TIME_SPAN_SECOND; 6213 6214 /** 6215 * The maximum length (in codepoints) of a compatibility or canonical 6216 * decomposition of a single Unicode character. 6217 * 6218 * This is as defined by Unicode 6.1. 6219 */ 6220 enum UNICHAR_MAX_DECOMPOSITION_LENGTH = 18; 6221 alias G_UNICHAR_MAX_DECOMPOSITION_LENGTH = UNICHAR_MAX_DECOMPOSITION_LENGTH; 6222 6223 /** 6224 * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@". 6225 */ 6226 enum URI_RESERVED_CHARS_GENERIC_DELIMITERS = ":/?#[]@"; 6227 alias G_URI_RESERVED_CHARS_GENERIC_DELIMITERS = URI_RESERVED_CHARS_GENERIC_DELIMITERS; 6228 6229 /** 6230 * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=". 6231 */ 6232 enum URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS = "!$&'()*+,;="; 6233 alias G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS = URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS; 6234 6235 /** 6236 * Number of microseconds in one second (1 million). 6237 * This macro is provided for code readability. 6238 */ 6239 enum USEC_PER_SEC = 1000000; 6240 alias G_USEC_PER_SEC = USEC_PER_SEC; 6241 6242 enum VA_COPY_AS_ARRAY = 1; 6243 alias G_VA_COPY_AS_ARRAY = VA_COPY_AS_ARRAY; 6244 6245 enum WIN32_MSG_HANDLE = 19981206; 6246 alias G_WIN32_MSG_HANDLE = WIN32_MSG_HANDLE;