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