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