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