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