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