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