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