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 module gtkc.glibtypes;
25 
26 /* The GLib Basic Types */
27 public alias int gint;
28 public alias uint guint;
29 public alias int gboolean;
30 public alias void* gpointer;
31 public alias void* gconstpointer;
32 public alias char gchar;
33 public alias char guchar;
34 public alias short gshort;
35 public alias ushort gushort;
36 public alias byte gint8;
37 public alias ubyte guint8;
38 public alias short gint16;
39 public alias ushort guint16;
40 public alias int gint32;
41 public alias long gint64;
42 public alias uint guint32;
43 public alias ulong guint64;
44 public alias float gfloat;
45 public alias double gdouble;
46 public alias size_t gsize;
47 public alias ptrdiff_t gssize;
48 public alias size_t guintptr;
49 public alias long goffset;
50 public alias void* va_list;
51 public alias dchar unichar;
52 public alias wchar unichar2;
53 public alias uint time_t;
54 public alias uint XID;
55 public alias uint uid_t;
56 public alias int pid_t;
57 
58 
59 version(Tango)
60 {
61 	//avoid some conflicts with other string aliases.
62 	static if( !is(string) )
63 	alias char[] string;
64 }
65 
66 version( Windows )
67 {
68 	alias int glong;
69 	alias uint gulong;
70 }
71 else version( X86_64 )
72 {
73 	alias long glong;
74 	alias ulong gulong;
75 }
76 else
77 {
78 	alias int glong;
79 	alias uint gulong;
80 }
81 
82 version(D_Version2)
83 {
84 	mixin("enum _shared = \"shared \";");
85 	mixin("enum gshared = \"__gshared \";");
86 	
87 	version( Windows )
88 	mixin("enum _utfPostfix = \"_utf8\";");
89 	else
90 	mixin("enum _utfPostfix = \"\";");
91 }
92 else
93 {
94 	const char[] _shared = "";
95 	const char[] gshared = "";
96 	
97 	version( Windows )
98 	const char[] _utfPostfix = "_utf8";
99 	else
100 	const char[] _utfPostfix = "";
101 }
102 
103 version (Windows)
104 {
105 	version(Tango)
106 	{
107 		private import tango.stdc.stdio;
108 		
109 		//Phobos defines this function in std.c.stdio
110 		extern (C) FILE*  fdopen(int, char*);
111 	}
112 	version(D_Version2)
113 	{
114 		private import core.stdc.stdio;
115 		
116 		static if( !is(typeof(fdopen(0, null))) )
117 		{
118 			extern (C) FILE*  fdopen(int, char*);
119 		}
120 	}
121 }
122 
123 const uint G_MAXUINT = 4294967295;
124 
125 
126 /**
127  * typedef int GPid;
128  * A type which is used to hold a process identification.
129  * On UNIX, processes are identified by a process id (an integer),
130  * while Windows uses process handles (which are pointers).
131  * GPid is used in GLib only for descendant processes spawned with
132  * the g_spawn functions.
133  */
134 public alias int GPid;
135 
136 /**
137  * typedef guint32 gunichar;
138  * A type which can hold any UTF-32 or UCS-4 character code,
139  * also known as a Unicode code point.
140  * If you want to produce the UTF-8 representation of a gunichar,
141  * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
142  * process.
143  * To print/scan values of this type as integer, use
144  * G_GINT32_MODIFIER and/or G_GUINT32_FORMAT.
145  * The notation to express a Unicode code point in running text is
146  * as a hexadecimal number with four to six digits and uppercase
147  * letters, prefixed by the string "U+". Leading zeros are omitted,
148  * unless the code point would have fewer than four hexadecimal digits.
149  * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
150  * in the U+-notation, use the format string "U+%04"G_GINT32_FORMAT"X".
151  * To scan, use the format string "U+%06"G_GINT32_FORMAT"X".
152  * $(DDOC_COMMENT example)
153  */
154 public alias uint gunichar;
155 
156 /**
157  * typedef guint16 gunichar2;
158  * A type which can hold any UTF-16 code
159  * point[4].
160  * To print/scan values of this type to/from text you need to convert
161  * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
162  * To print/scan values of this type as integer, use
163  * G_GINT16_MODIFIER and/or G_GUINT16_FORMAT.
164  */
165 public alias ushort gunichar2;
166 
167 /**
168  * typedef gint32 GTime;
169  * Simply a replacement for time_t. It has been deprecated
170  * since it is not equivalent to time_t
171  * on 64-bit platforms with a 64-bit time_t.
172  * Unrelated to GTimer.
173  * Note that GTime is defined to always be a 32bit integer,
174  * unlike time_t which may be 64bit on some systems.
175  * Therefore, GTime will overflow in the year 2038, and
176  * you cannot use the address of a GTime variable as argument
177  * to the UNIX time() function. Instead, do the following:
178  * $(DDOC_COMMENT example)
179  */
180 public alias int GTime;
181 
182 /**
183  * typedef guint8 GDateDay; /+* day of the month +/
184  * Integer representing a day of the month; between 1 and
185  * 31. G_DATE_BAD_DAY represents an invalid day of the month.
186  */
187 public alias ubyte GDateDay;
188 
189 /**
190  * typedef guint16 GDateYear;
191  * Integer representing a year; G_DATE_BAD_YEAR is the invalid
192  * value. The year must be 1 or higher; negative (BC) years are not
193  * allowed. The year is represented with four digits.
194  */
195 public alias ushort GDateYear;
196 
197 /**
198  * typedef gint64 GTimeSpan;
199  * A value representing an interval of time, in microseconds.
200  * Since 2.26
201  */
202 public alias long GTimeSpan;
203 
204 /**
205  * typedef guint32 GQuark;
206  * A GQuark is a non-zero integer which uniquely identifies a
207  * particular string. A GQuark value of zero is associated to NULL.
208  */
209 public alias uint GQuark;
210 
211 enum GPriority
212 {
213 	HIGH = -100,
214 	DEFAULT = 0,
215 	HIGH_IDLE = 100,
216 	DEFAULT_IDLE = 200,
217 	LOW = 300
218 }
219 
220 /**
221  * Flags passed to g_module_open().
222  * Note that these flags are not supported on all platforms.
223  * G_MODULE_BIND_LAZY
224  * specifies that symbols are only resolved when
225  *  needed. The default action is to bind all symbols when the module
226  *  is loaded.
227  * G_MODULE_BIND_LOCAL
228  * specifies that symbols in the module should
229  *  not be added to the global name space. The default action on most
230  *  platforms is to place symbols in the module in the global name space,
231  *  which may cause conflicts with existing symbols.
232  * G_MODULE_BIND_MASK
233  * mask for all flags.
234  */
235 public enum GModuleFlags
236 {
237 	BIND_LAZY = 1 << 0,
238 	BIND_LOCAL = 1 << 1,
239 	BIND_MASK = 0x03
240 }
241 alias GModuleFlags ModuleFlags;
242 
243 /**
244  * An enumeration specifying the base position for a
245  * g_io_channel_seek_position() operation.
246  * G_SEEK_CUR
247  * the current position in the file.
248  * G_SEEK_SET
249  * the start of the file.
250  * G_SEEK_END
251  * the end of the file.
252  */
253 public enum GSeekType
254 {
255 	CUR,
256 	SET,
257 	END
258 }
259 alias GSeekType SeekType;
260 
261 /**
262  * Stati returned by most of the GIOFuncs functions.
263  * G_IO_STATUS_ERROR
264  * An error occurred.
265  * G_IO_STATUS_NORMAL
266  * Success.
267  * G_IO_STATUS_EOF
268  * End of file.
269  * G_IO_STATUS_AGAIN
270  * Resource temporarily unavailable.
271  */
272 public enum GIOStatus
273 {
274 	ERROR,
275 	NORMAL,
276 	EOF,
277 	AGAIN
278 }
279 alias GIOStatus IOStatus;
280 
281 /**
282  * Error codes returned by GIOChannel operations.
283  * G_IO_CHANNEL_ERROR_FBIG
284  * File too large.
285  * G_IO_CHANNEL_ERROR_INVAL
286  * Invalid argument.
287  * G_IO_CHANNEL_ERROR_IO
288  * IO error.
289  * G_IO_CHANNEL_ERROR_ISDIR
290  * File is a directory.
291  * G_IO_CHANNEL_ERROR_NOSPC
292  * No space left on device.
293  * G_IO_CHANNEL_ERROR_NXIO
294  * No such device or address.
295  * G_IO_CHANNEL_ERROR_OVERFLOW
296  * Value too large for defined datatype.
297  * G_IO_CHANNEL_ERROR_PIPE
298  * Broken pipe.
299  * G_IO_CHANNEL_ERROR_FAILED
300  * Some other error.
301  */
302 public enum GIOChannelError
303 {
304 	FBIG,
305 	INVAL,
306 	IO,
307 	ISDIR,
308 	NOSPC,
309 	NXIO,
310 	OVERFLOW,
311 	PIPE,
312 	/+* Other +/
313 	FAILED
314 }
315 alias GIOChannelError IOChannelError;
316 
317 /**
318  * A bitwise combination representing a condition to watch for on an
319  * event source.
320  * G_IO_IN
321  * There is data to read.
322  * G_IO_OUT
323  * Data can be written (without blocking).
324  * G_IO_PRI
325  * There is urgent data to read.
326  * G_IO_ERR
327  * Error condition.
328  * G_IO_HUP
329  * Hung up (the connection has been broken, usually for
330  *  pipes and sockets).
331  * G_IO_NVAL
332  * Invalid request. The file descriptor is not open.
333  */
334 public enum GIOCondition
335 {
336 	IN = 1,
337 	OUT = 4,
338 	PRI = 2,
339 	ERR = 8,
340 	HUP = 16,
341 	NVAL = 32
342 }
343 alias GIOCondition IOCondition;
344 
345 /**
346  * Specifies properties of a GIOChannel. Some of the flags can only be
347  * read with g_io_channel_get_flags(), but not changed with
348  * g_io_channel_set_flags().
349  * G_IO_FLAG_APPEND
350  * turns on append mode, corresponds to O_APPEND
351  *  (see the documentation of the UNIX open()
352  *  syscall).
353  * G_IO_FLAG_NONBLOCK
354  * turns on nonblocking mode, corresponds to
355  *  O_NONBLOCK/O_NDELAY
356  *  (see the documentation of the UNIX open() syscall).
357  * G_IO_FLAG_IS_READABLE
358  * indicates that the io channel is readable.
359  *  This flag cannot be changed.
360  * G_IO_FLAG_IS_WRITABLE
361  * indicates that the io channel is writable.
362  *  This flag cannot be changed.
363  * G_IO_FLAG_IS_WRITEABLE
364  * G_IO_FLAG_IS_SEEKABLE
365  * indicates that the io channel is seekable,
366  *  i.e. that g_io_channel_seek_position() can
367  *  be used on it. This flag cannot be changed.
368  * G_IO_FLAG_MASK
369  * the mask that specifies all the valid flags.
370  * G_IO_FLAG_GET_MASK
371  * the mask of the flags that are returned from
372  *  g_io_channel_get_flags().
373  * G_IO_FLAG_SET_MASK
374  * the mask of the flags that the user can modify
375  *  with g_io_channel_set_flags().
376  */
377 public enum GIOFlags
378 {
379 	APPEND = 1 << 0,
380 	NONBLOCK = 1 << 1,
381 	IS_READABLE = 1 << 2, /+* Read only flag +/
382 	IS_WRITABLE = 1 << 3, /+* Read only flag +/
383 	IS_WRITEABLE = 1 << 3, /+* Misspelling inn 2.29.10 and earlier +/
384 	IS_SEEKABLE = 1 << 4, /+* Read only flag +/
385 	MASK = (1 << 5) - 1,
386 	GET_MASK = MASK,
387 	SET_MASK = APPEND | NONBLOCK
388 }
389 alias GIOFlags IOFlags;
390 
391 /**
392  * GIOError is only used by the deprecated functions
393  * g_io_channel_read(), g_io_channel_write(), and g_io_channel_seek().
394  * G_IO_ERROR_NONE
395  * no error
396  * G_IO_ERROR_AGAIN
397  * an EAGAIN error occurred
398  * G_IO_ERROR_INVAL
399  * an EINVAL error occurred
400  * G_IO_ERROR_UNKNOWN
401  * another error occurred
402  */
403 public enum GIOError
404 {
405 	NONE,
406 	AGAIN,
407 	INVAL,
408 	UNKNOWN
409 }
410 alias GIOError IOError;
411 
412 /**
413  * Flags specifying the level of log messages.
414  * It is possible to change how GLib treats messages of the various
415  * levels using g_log_set_handler() and g_log_set_fatal_mask().
416  * G_LOG_FLAG_RECURSION
417  * internal flag
418  * G_LOG_FLAG_FATAL
419  * internal flag
420  * G_LOG_LEVEL_ERROR
421  * log level for errors, see g_error().
422  *  This level is also used for messages produced by g_assert().
423  * G_LOG_LEVEL_CRITICAL
424  * log level for critical messages, see g_critical().
425  *  This level is also used for messages produced by g_return_if_fail()
426  *  and g_return_val_if_fail().
427  * G_LOG_LEVEL_WARNING
428  * log level for warnings, see g_warning()
429  * G_LOG_LEVEL_MESSAGE
430  * log level for messages, see g_message()
431  * G_LOG_LEVEL_INFO
432  * log level for informational messages
433  * G_LOG_LEVEL_DEBUG
434  * log level for debug messages, see g_debug()
435  * G_LOG_LEVEL_MASK
436  * a mask including all log levels
437  */
438 public enum GLogLevelFlags
439 {
440 	FLAG_RECURSION = 1 << 0,
441 	FLAG_FATAL = 1 << 1,
442 	/+* GLib log levels +/
443 	LEVEL_ERROR = 1 << 2, /+* always fatal +/
444 	LEVEL_CRITICAL = 1 << 3,
445 	LEVEL_WARNING = 1 << 4,
446 	LEVEL_MESSAGE = 1 << 5,
447 	LEVEL_INFO = 1 << 6,
448 	LEVEL_DEBUG = 1 << 7,
449 	LEVEL_MASK = ~(FLAG_RECURSION | FLAG_FATAL)
450 }
451 alias GLogLevelFlags LogLevelFlags;
452 
453 /**
454  * Error codes returned by character set conversion routines.
455  * G_CONVERT_ERROR_NO_CONVERSION
456  * Conversion between the requested character
457  *  sets is not supported.
458  * G_CONVERT_ERROR_ILLEGAL_SEQUENCE
459  * Invalid byte sequence in conversion input.
460  * G_CONVERT_ERROR_FAILED
461  * Conversion failed for some reason.
462  * G_CONVERT_ERROR_PARTIAL_INPUT
463  * Partial character sequence at end of input.
464  * G_CONVERT_ERROR_BAD_URI
465  * URI is invalid.
466  * G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
467  * Pathname is not an absolute path.
468  */
469 public enum GConvertError
470 {
471 	NO_CONVERSION,
472 	ILLEGAL_SEQUENCE,
473 	FAILED,
474 	PARTIAL_INPUT,
475 	BAD_URI,
476 	NOT_ABSOLUTE_PATH
477 }
478 alias GConvertError ConvertError;
479 
480 /**
481  * These are the possible character classifications from the
482  * Unicode specification.
483  * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html.
484  * G_UNICODE_CONTROL
485  * General category "Other, Control" (Cc)
486  * G_UNICODE_FORMAT
487  * General category "Other, Format" (Cf)
488  * G_UNICODE_UNASSIGNED
489  * General category "Other, Not Assigned" (Cn)
490  * G_UNICODE_PRIVATE_USE
491  * General category "Other, Private Use" (Co)
492  * G_UNICODE_SURROGATE
493  * General category "Other, Surrogate" (Cs)
494  * G_UNICODE_LOWERCASE_LETTER
495  * General category "Letter, Lowercase" (Ll)
496  * G_UNICODE_MODIFIER_LETTER
497  * General category "Letter, Modifier" (Lm)
498  * G_UNICODE_OTHER_LETTER
499  * General category "Letter, Other" (Lo)
500  * G_UNICODE_TITLECASE_LETTER
501  * General category "Letter, Titlecase" (Lt)
502  * G_UNICODE_UPPERCASE_LETTER
503  * General category "Letter, Uppercase" (Lu)
504  * G_UNICODE_SPACING_MARK
505  * General category "Mark, Spacing" (Mc)
506  * G_UNICODE_ENCLOSING_MARK
507  * General category "Mark, Enclosing" (Me)
508  * G_UNICODE_NON_SPACING_MARK
509  * General category "Mark, Nonspacing" (Mn)
510  * G_UNICODE_DECIMAL_NUMBER
511  * General category "Number, Decimal Digit" (Nd)
512  * G_UNICODE_LETTER_NUMBER
513  * General category "Number, Letter" (Nl)
514  * G_UNICODE_OTHER_NUMBER
515  * General category "Number, Other" (No)
516  * G_UNICODE_CONNECT_PUNCTUATION
517  * General category "Punctuation, Connector" (Pc)
518  * G_UNICODE_DASH_PUNCTUATION
519  * General category "Punctuation, Dash" (Pd)
520  * G_UNICODE_CLOSE_PUNCTUATION
521  * General category "Punctuation, Close" (Pe)
522  * G_UNICODE_FINAL_PUNCTUATION
523  * General category "Punctuation, Final quote" (Pf)
524  * G_UNICODE_INITIAL_PUNCTUATION
525  * General category "Punctuation, Initial quote" (Pi)
526  * G_UNICODE_OTHER_PUNCTUATION
527  * General category "Punctuation, Other" (Po)
528  * G_UNICODE_OPEN_PUNCTUATION
529  * General category "Punctuation, Open" (Ps)
530  * G_UNICODE_CURRENCY_SYMBOL
531  * General category "Symbol, Currency" (Sc)
532  * G_UNICODE_MODIFIER_SYMBOL
533  * General category "Symbol, Modifier" (Sk)
534  * G_UNICODE_MATH_SYMBOL
535  * General category "Symbol, Math" (Sm)
536  * G_UNICODE_OTHER_SYMBOL
537  * General category "Symbol, Other" (So)
538  * G_UNICODE_LINE_SEPARATOR
539  * General category "Separator, Line" (Zl)
540  * G_UNICODE_PARAGRAPH_SEPARATOR
541  * General category "Separator, Paragraph" (Zp)
542  * G_UNICODE_SPACE_SEPARATOR
543  * General category "Separator, Space" (Zs)
544  */
545 public enum GUnicodeType
546 {
547 	CONTROL,
548 	FORMAT,
549 	UNASSIGNED,
550 	PRIVATE_USE,
551 	SURROGATE,
552 	LOWERCASE_LETTER,
553 	MODIFIER_LETTER,
554 	OTHER_LETTER,
555 	TITLECASE_LETTER,
556 	UPPERCASE_LETTER,
557 	SPACING_MARK,
558 	ENCLOSING_MARK,
559 	NON_SPACING_MARK,
560 	DECIMAL_NUMBER,
561 	LETTER_NUMBER,
562 	OTHER_NUMBER,
563 	CONNECT_PUNCTUATION,
564 	DASH_PUNCTUATION,
565 	CLOSE_PUNCTUATION,
566 	FINAL_PUNCTUATION,
567 	INITIAL_PUNCTUATION,
568 	OTHER_PUNCTUATION,
569 	OPEN_PUNCTUATION,
570 	CURRENCY_SYMBOL,
571 	MODIFIER_SYMBOL,
572 	MATH_SYMBOL,
573 	OTHER_SYMBOL,
574 	LINE_SEPARATOR,
575 	PARAGRAPH_SEPARATOR,
576 	SPACE_SEPARATOR
577 }
578 alias GUnicodeType UnicodeType;
579 
580 /**
581  * These are the possible line break classifications.
582  * Since new unicode versions may add new types here, applications should be ready
583  * to handle unknown values. They may be regarded as G_UNICODE_BREAK_UNKNOWN.
584  * See http://www.unicode.org/unicode/reports/tr14/.
585  * G_UNICODE_BREAK_MANDATORY
586  * Mandatory Break (BK)
587  * G_UNICODE_BREAK_CARRIAGE_RETURN
588  * Carriage Return (CR)
589  * G_UNICODE_BREAK_LINE_FEED
590  * Line Feed (LF)
591  * G_UNICODE_BREAK_COMBINING_MARK
592  * Attached Characters and Combining Marks (CM)
593  * G_UNICODE_BREAK_SURROGATE
594  * Surrogates (SG)
595  * G_UNICODE_BREAK_ZERO_WIDTH_SPACE
596  * Zero Width Space (ZW)
597  * G_UNICODE_BREAK_INSEPARABLE
598  * Inseparable (IN)
599  * G_UNICODE_BREAK_NON_BREAKING_GLUE
600  * Non-breaking ("Glue") (GL)
601  * G_UNICODE_BREAK_CONTINGENT
602  * Contingent Break Opportunity (CB)
603  * G_UNICODE_BREAK_SPACE
604  * Space (SP)
605  * G_UNICODE_BREAK_AFTER
606  * Break Opportunity After (BA)
607  * G_UNICODE_BREAK_BEFORE
608  * Break Opportunity Before (BB)
609  * G_UNICODE_BREAK_BEFORE_AND_AFTER
610  * Break Opportunity Before and After (B2)
611  * G_UNICODE_BREAK_HYPHEN
612  * Hyphen (HY)
613  * G_UNICODE_BREAK_NON_STARTER
614  * Nonstarter (NS)
615  * G_UNICODE_BREAK_OPEN_PUNCTUATION
616  * Opening Punctuation (OP)
617  * G_UNICODE_BREAK_CLOSE_PUNCTUATION
618  * Closing Punctuation (CL)
619  * G_UNICODE_BREAK_QUOTATION
620  * Ambiguous Quotation (QU)
621  * G_UNICODE_BREAK_EXCLAMATION
622  * Exclamation/Interrogation (EX)
623  * G_UNICODE_BREAK_IDEOGRAPHIC
624  * Ideographic (ID)
625  * G_UNICODE_BREAK_NUMERIC
626  * Numeric (NU)
627  * G_UNICODE_BREAK_INFIX_SEPARATOR
628  * Infix Separator (Numeric) (IS)
629  * G_UNICODE_BREAK_SYMBOL
630  * Symbols Allowing Break After (SY)
631  * G_UNICODE_BREAK_ALPHABETIC
632  * Ordinary Alphabetic and Symbol Characters (AL)
633  * G_UNICODE_BREAK_PREFIX
634  * Prefix (Numeric) (PR)
635  * G_UNICODE_BREAK_POSTFIX
636  * Postfix (Numeric) (PO)
637  * G_UNICODE_BREAK_COMPLEX_CONTEXT
638  * Complex Content Dependent (South East Asian) (SA)
639  * G_UNICODE_BREAK_AMBIGUOUS
640  * Ambiguous (Alphabetic or Ideographic) (AI)
641  * G_UNICODE_BREAK_UNKNOWN
642  * Unknown (XX)
643  * G_UNICODE_BREAK_NEXT_LINE
644  * Next Line (NL)
645  * G_UNICODE_BREAK_WORD_JOINER
646  * Word Joiner (WJ)
647  * G_UNICODE_BREAK_HANGUL_L_JAMO
648  * Hangul L Jamo (JL)
649  * G_UNICODE_BREAK_HANGUL_V_JAMO
650  * Hangul V Jamo (JV)
651  * G_UNICODE_BREAK_HANGUL_T_JAMO
652  * Hangul T Jamo (JT)
653  * G_UNICODE_BREAK_HANGUL_LV_SYLLABLE
654  * Hangul LV Syllable (H2)
655  * G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE
656  * Hangul LVT Syllable (H3)
657  * G_UNICODE_BREAK_CLOSE_PARANTHESIS
658  * Closing Parenthesis (CP). Since 2.28
659  * G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER
660  * Conditional Japanese Starter (CJ). Since: 2.32
661  * G_UNICODE_BREAK_HEBREW_LETTER
662  * Hebrew Letter (HL). Since: 2.32
663  * G_UNICODE_BREAK_REGIONAL_INDICATOR
664  * Regional Indicator (RI). Since: 2.36
665  */
666 public enum GUnicodeBreakType
667 {
668 	MANDATORY,
669 	CARRIAGE_RETURN,
670 	LINE_FEED,
671 	COMBINING_MARK,
672 	SURROGATE,
673 	ZERO_WIDTH_SPACE,
674 	INSEPARABLE,
675 	NON_BREAKING_GLUE,
676 	CONTINGENT,
677 	SPACE,
678 	AFTER,
679 	BEFORE,
680 	BEFORE_AND_AFTER,
681 	HYPHEN,
682 	NON_STARTER,
683 	OPEN_PUNCTUATION,
684 	CLOSE_PUNCTUATION,
685 	QUOTATION,
686 	EXCLAMATION,
687 	IDEOGRAPHIC,
688 	NUMERIC,
689 	INFIX_SEPARATOR,
690 	SYMBOL,
691 	ALPHABETIC,
692 	PREFIX,
693 	POSTFIX,
694 	COMPLEX_CONTEXT,
695 	AMBIGUOUS,
696 	UNKNOWN,
697 	NEXT_LINE,
698 	WORD_JOINER,
699 	HANGUL_L_JAMO,
700 	HANGUL_V_JAMO,
701 	HANGUL_T_JAMO,
702 	HANGUL_LV_SYLLABLE,
703 	HANGUL_LVT_SYLLABLE,
704 	CLOSE_PARANTHESIS,
705 	CONDITIONAL_JAPANESE_STARTER,
706 	HEBREW_LETTER,
707 	REGIONAL_INDICATOR
708 }
709 alias GUnicodeBreakType UnicodeBreakType;
710 
711 /**
712  * The GUnicodeScript enumeration identifies different writing
713  * systems. The values correspond to the names as defined in the
714  * Unicode standard. The enumeration has been added in GLib 2.14,
715  * and is interchangeable with PangoScript.
716  * Note that new types may be added in the future. Applications
717  * should be ready to handle unknown values.
718  * See Unicode Standard Annex
719  * #24: Script names.
720  * G_UNICODE_SCRIPT_INVALID_CODE
721  *  a value never returned from g_unichar_get_script()
722  * G_UNICODE_SCRIPT_COMMON
723  * a character used by multiple different scripts
724  * G_UNICODE_SCRIPT_INHERITED
725  * a mark glyph that takes its script from the
726  * i base glyph to which it is attached
727  * G_UNICODE_SCRIPT_ARABIC
728  * Arabic
729  * G_UNICODE_SCRIPT_ARMENIAN
730  * Armenian
731  * G_UNICODE_SCRIPT_BENGALI
732  * Bengali
733  * G_UNICODE_SCRIPT_BOPOMOFO
734  * Bopomofo
735  * G_UNICODE_SCRIPT_CHEROKEE
736  * Cherokee
737  * G_UNICODE_SCRIPT_COPTIC
738  * Coptic
739  * G_UNICODE_SCRIPT_CYRILLIC
740  * Cyrillic
741  * G_UNICODE_SCRIPT_DESERET
742  * Deseret
743  * G_UNICODE_SCRIPT_DEVANAGARI
744  * Devanagari
745  * G_UNICODE_SCRIPT_ETHIOPIC
746  * Ethiopic
747  * G_UNICODE_SCRIPT_GEORGIAN
748  * Georgian
749  * G_UNICODE_SCRIPT_GOTHIC
750  * Gothic
751  * G_UNICODE_SCRIPT_GREEK
752  * Greek
753  * G_UNICODE_SCRIPT_GUJARATI
754  * Gujarati
755  * G_UNICODE_SCRIPT_GURMUKHI
756  * Gurmukhi
757  * G_UNICODE_SCRIPT_HAN
758  * Han
759  * G_UNICODE_SCRIPT_HANGUL
760  * Hangul
761  * G_UNICODE_SCRIPT_HEBREW
762  * Hebrew
763  * G_UNICODE_SCRIPT_HIRAGANA
764  * Hiragana
765  * G_UNICODE_SCRIPT_KANNADA
766  * Kannada
767  * G_UNICODE_SCRIPT_KATAKANA
768  * Katakana
769  * G_UNICODE_SCRIPT_KHMER
770  * Khmer
771  * G_UNICODE_SCRIPT_LAO
772  * Lao
773  * G_UNICODE_SCRIPT_LATIN
774  * Latin
775  * G_UNICODE_SCRIPT_MALAYALAM
776  * Malayalam
777  * G_UNICODE_SCRIPT_MONGOLIAN
778  * Mongolian
779  * G_UNICODE_SCRIPT_MYANMAR
780  * Myanmar
781  * G_UNICODE_SCRIPT_OGHAM
782  * Ogham
783  * G_UNICODE_SCRIPT_OLD_ITALIC
784  * Old Italic
785  * G_UNICODE_SCRIPT_ORIYA
786  * Oriya
787  * G_UNICODE_SCRIPT_RUNIC
788  * Runic
789  * G_UNICODE_SCRIPT_SINHALA
790  * Sinhala
791  * G_UNICODE_SCRIPT_SYRIAC
792  * Syriac
793  * G_UNICODE_SCRIPT_TAMIL
794  * Tamil
795  * G_UNICODE_SCRIPT_TELUGU
796  * Telugu
797  * G_UNICODE_SCRIPT_THAANA
798  * Thaana
799  * G_UNICODE_SCRIPT_THAI
800  * Thai
801  * G_UNICODE_SCRIPT_TIBETAN
802  * Tibetan
803  * G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL
804  *  Canadian Aboriginal
805  * G_UNICODE_SCRIPT_YI
806  * Yi
807  * G_UNICODE_SCRIPT_TAGALOG
808  * Tagalog
809  * G_UNICODE_SCRIPT_HANUNOO
810  * Hanunoo
811  * G_UNICODE_SCRIPT_BUHID
812  * Buhid
813  * G_UNICODE_SCRIPT_TAGBANWA
814  * Tagbanwa
815  * G_UNICODE_SCRIPT_BRAILLE
816  * Braille
817  * G_UNICODE_SCRIPT_CYPRIOT
818  * Cypriot
819  * G_UNICODE_SCRIPT_LIMBU
820  * Limbu
821  * G_UNICODE_SCRIPT_OSMANYA
822  * Osmanya
823  * G_UNICODE_SCRIPT_SHAVIAN
824  * Shavian
825  * G_UNICODE_SCRIPT_LINEAR_B
826  * Linear B
827  * G_UNICODE_SCRIPT_TAI_LE
828  * Tai Le
829  * G_UNICODE_SCRIPT_UGARITIC
830  * Ugaritic
831  * G_UNICODE_SCRIPT_NEW_TAI_LUE
832  *  New Tai Lue
833  * G_UNICODE_SCRIPT_BUGINESE
834  * Buginese
835  * G_UNICODE_SCRIPT_GLAGOLITIC
836  * Glagolitic
837  * G_UNICODE_SCRIPT_TIFINAGH
838  * Tifinagh
839  * G_UNICODE_SCRIPT_SYLOTI_NAGRI
840  *  Syloti Nagri
841  * G_UNICODE_SCRIPT_OLD_PERSIAN
842  *  Old Persian
843  * G_UNICODE_SCRIPT_KHAROSHTHI
844  * Kharoshthi
845  * G_UNICODE_SCRIPT_UNKNOWN
846  * an unassigned code point
847  * G_UNICODE_SCRIPT_BALINESE
848  * Balinese
849  * G_UNICODE_SCRIPT_CUNEIFORM
850  * Cuneiform
851  * G_UNICODE_SCRIPT_PHOENICIAN
852  * Phoenician
853  * G_UNICODE_SCRIPT_PHAGS_PA
854  * Phags-pa
855  * G_UNICODE_SCRIPT_NKO
856  * N'Ko
857  * G_UNICODE_SCRIPT_KAYAH_LI
858  * Kayah Li. Since 2.16.3
859  * G_UNICODE_SCRIPT_LEPCHA
860  * Lepcha. Since 2.16.3
861  * G_UNICODE_SCRIPT_REJANG
862  * Rejang. Since 2.16.3
863  * G_UNICODE_SCRIPT_SUNDANESE
864  * Sundanese. Since 2.16.3
865  * G_UNICODE_SCRIPT_SAURASHTRA
866  * Saurashtra. Since 2.16.3
867  * G_UNICODE_SCRIPT_CHAM
868  * Cham. Since 2.16.3
869  * G_UNICODE_SCRIPT_OL_CHIKI
870  * Ol Chiki. Since 2.16.3
871  * G_UNICODE_SCRIPT_VAI
872  * Vai. Since 2.16.3
873  * G_UNICODE_SCRIPT_CARIAN
874  * Carian. Since 2.16.3
875  * G_UNICODE_SCRIPT_LYCIAN
876  * Lycian. Since 2.16.3
877  * G_UNICODE_SCRIPT_LYDIAN
878  * Lydian. Since 2.16.3
879  * G_UNICODE_SCRIPT_AVESTAN
880  * Avestan. Since 2.26
881  * G_UNICODE_SCRIPT_BAMUM
882  * Bamum. Since 2.26
883  * G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS
884  *  Egyptian Hieroglpyhs. Since 2.26
885  * G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC
886  *  Imperial Aramaic. Since 2.26
887  * G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI
888  *  Inscriptional Pahlavi. Since 2.26
889  * G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN
890  *  Inscriptional Parthian. Since 2.26
891  * G_UNICODE_SCRIPT_JAVANESE
892  * Javanese. Since 2.26
893  * G_UNICODE_SCRIPT_KAITHI
894  * Kaithi. Since 2.26
895  * G_UNICODE_SCRIPT_LISU
896  * Lisu. Since 2.26
897  * G_UNICODE_SCRIPT_MEETEI_MAYEK
898  *  Meetei Mayek. Since 2.26
899  * G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN
900  *  Old South Arabian. Since 2.26
901  * G_UNICODE_SCRIPT_OLD_TURKIC
902  * Old Turkic. Since 2.28
903  * G_UNICODE_SCRIPT_SAMARITAN
904  * Samaritan. Since 2.26
905  * G_UNICODE_SCRIPT_TAI_THAM
906  * Tai Tham. Since 2.26
907  * G_UNICODE_SCRIPT_TAI_VIET
908  * Tai Viet. Since 2.26
909  * G_UNICODE_SCRIPT_BATAK
910  * Batak. Since 2.28
911  * G_UNICODE_SCRIPT_BRAHMI
912  * Brahmi. Since 2.28
913  * G_UNICODE_SCRIPT_MANDAIC
914  * Mandaic. Since 2.28
915  * G_UNICODE_SCRIPT_CHAKMA
916  * Chakma. Since: 2.32
917  * G_UNICODE_SCRIPT_MEROITIC_CURSIVE
918  * Meroitic Cursive. Since: 2.32
919  * G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS
920  * Meroitic Hieroglyphs. Since: 2.32
921  * G_UNICODE_SCRIPT_MIAO
922  * Miao. Since: 2.32
923  * G_UNICODE_SCRIPT_SHARADA
924  * Sharada. Since: 2.32
925  * G_UNICODE_SCRIPT_SORA_SOMPENG
926  * Sora Sompeng. Since: 2.32
927  * G_UNICODE_SCRIPT_TAKRI
928  * Takri. Since: 2.32
929  */
930 public enum GUnicodeScript
931 {
932 	INVALID_CODE = -1,
933 	COMMON = 0, /+* Zyyy +/
934 	INHERITED, /+* Zinh (Qaai) +/
935 	ARABIC, /+* Arab +/
936 	ARMENIAN, /+* Armn +/
937 	BENGALI, /+* Beng +/
938 	BOPOMOFO, /+* Bopo +/
939 	CHEROKEE, /+* Cher +/
940 	COPTIC, /+* Copt (Qaac) +/
941 	CYRILLIC, /+* Cyrl (Cyrs) +/
942 	DESERET, /+* Dsrt +/
943 	DEVANAGARI, /+* Deva +/
944 	ETHIOPIC, /+* Ethi +/
945 	GEORGIAN, /+* Geor (Geon, Geoa) +/
946 	GOTHIC, /+* Goth +/
947 	GREEK, /+* Grek +/
948 	GUJARATI, /+* Gujr +/
949 	GURMUKHI, /+* Guru +/
950 	HAN, /+* Hani +/
951 	HANGUL, /+* Hang +/
952 	HEBREW, /+* Hebr +/
953 	HIRAGANA, /+* Hira +/
954 	KANNADA, /+* Knda +/
955 	KATAKANA, /+* Kana +/
956 	KHMER, /+* Khmr +/
957 	LAO, /+* Laoo +/
958 	LATIN, /+* Latn (Latf, Latg) +/
959 	MALAYALAM, /+* Mlym +/
960 	MONGOLIAN, /+* Mong +/
961 	MYANMAR, /+* Mymr +/
962 	OGHAM, /+* Ogam +/
963 	OLD_ITALIC, /+* Ital +/
964 	ORIYA, /+* Orya +/
965 	RUNIC, /+* Runr +/
966 	SINHALA, /+* Sinh +/
967 	SYRIAC, /+* Syrc (Syrj, Syrn, Syre) +/
968 	TAMIL, /+* Taml +/
969 	TELUGU, /+* Telu +/
970 	THAANA, /+* Thaa +/
971 	THAI, /+* Thai +/
972 	TIBETAN, /+* Tibt +/
973 	CANADIAN_ABORIGINAL, /+* Cans +/
974 	YI, /+* Yiii +/
975 	TAGALOG, /+* Tglg +/
976 	HANUNOO, /+* Hano +/
977 	BUHID, /+* Buhd +/
978 	TAGBANWA, /+* Tagb +/
979 	/+* Unicode-4.0 additions +/
980 	BRAILLE, /+* Brai +/
981 	CYPRIOT, /+* Cprt +/
982 	LIMBU, /+* Limb +/
983 	OSMANYA, /+* Osma +/
984 	SHAVIAN, /+* Shaw +/
985 	LINEAR_B, /+* Linb +/
986 	TAI_LE, /+* Tale +/
987 	UGARITIC, /+* Ugar +/
988 	/+* Unicode-4.1 additions +/
989 	NEW_TAI_LUE, /+* Talu +/
990 	BUGINESE, /+* Bugi +/
991 	GLAGOLITIC, /+* Glag +/
992 	TIFINAGH, /+* Tfng +/
993 	SYLOTI_NAGRI, /+* Sylo +/
994 	OLD_PERSIAN, /+* Xpeo +/
995 	KHAROSHTHI, /+* Khar +/
996 	/+* Unicode-5.0 additions +/
997 	UNKNOWN, /+* Zzzz +/
998 	BALINESE, /+* Bali +/
999 	CUNEIFORM, /+* Xsux +/
1000 	PHOENICIAN, /+* Phnx +/
1001 	PHAGS_PA, /+* Phag +/
1002 	NKO, /+* Nkoo +/
1003 	/+* Unicode-5.1 additions +/
1004 	KAYAH_LI, /+* Kali +/
1005 	LEPCHA, /+* Lepc +/
1006 	REJANG, /+* Rjng +/
1007 	SUNDANESE, /+* Sund +/
1008 	SAURASHTRA, /+* Saur +/
1009 	CHAM, /+* Cham +/
1010 	OL_CHIKI, /+* Olck +/
1011 	VAI, /+* Vaii +/
1012 	CARIAN, /+* Cari +/
1013 	LYCIAN, /+* Lyci +/
1014 	LYDIAN, /+* Lydi +/
1015 	/+* Unicode-5.2 additions +/
1016 	AVESTAN, /+* Avst +/
1017 	BAMUM, /+* Bamu +/
1018 	EGYPTIAN_HIEROGLYPHS, /+* Egyp +/
1019 	IMPERIAL_ARAMAIC, /+* Armi +/
1020 	INSCRIPTIONAL_PAHLAVI, /+* Phli +/
1021 	INSCRIPTIONAL_PARTHIAN, /+* Prti +/
1022 	JAVANESE, /+* Java +/
1023 	KAITHI, /+* Kthi +/
1024 	LISU, /+* Lisu +/
1025 	MEETEI_MAYEK, /+* Mtei +/
1026 	OLD_SOUTH_ARABIAN, /+* Sarb +/
1027 	OLD_TURKIC, /+* Orkh +/
1028 	SAMARITAN, /+* Samr +/
1029 	TAI_THAM, /+* Lana +/
1030 	TAI_VIET, /+* Tavt +/
1031 	/+* Unicode-6.0 additions +/
1032 	BATAK, /+* Batk +/
1033 	BRAHMI, /+* Brah +/
1034 	MANDAIC, /+* Mand +/
1035 	/+* Unicode-6.1 additions +/
1036 	CHAKMA, /+* Cakm +/
1037 	MEROITIC_CURSIVE, /+* Merc +/
1038 	MEROITIC_HIEROGLYPHS, /+* Mero +/
1039 	MIAO, /+* Plrd +/
1040 	SHARADA, /+* Shrd +/
1041 	SORA_SOMPENG, /+* Sora +/
1042 	TAKRI /+* Takr +/
1043 }
1044 alias GUnicodeScript UnicodeScript;
1045 
1046 /**
1047  * Defines how a Unicode string is transformed in a canonical
1048  * form, standardizing such issues as whether a character with
1049  * an accent is represented as a base character and combining
1050  * accent or as a single precomposed character. Unicode strings
1051  * should generally be normalized before comparing them.
1052  * G_NORMALIZE_DEFAULT
1053  * standardize differences that do not affect the
1054  *  text content, such as the above-mentioned accent representation
1055  * G_NORMALIZE_NFD
1056  * another name for G_NORMALIZE_DEFAULT
1057  * G_NORMALIZE_DEFAULT_COMPOSE
1058  * like G_NORMALIZE_DEFAULT, but with
1059  *  composed forms rather than a maximally decomposed form
1060  * G_NORMALIZE_NFC
1061  * another name for G_NORMALIZE_DEFAULT_COMPOSE
1062  * G_NORMALIZE_ALL
1063  * beyond G_NORMALIZE_DEFAULT also standardize the
1064  *  "compatibility" characters in Unicode, such as SUPERSCRIPT THREE
1065  *  to the standard forms (in this case DIGIT THREE). Formatting
1066  *  information may be lost but for most text operations such
1067  *  characters should be considered the same
1068  * G_NORMALIZE_NFKD
1069  * another name for G_NORMALIZE_ALL
1070  * G_NORMALIZE_ALL_COMPOSE
1071  * like G_NORMALIZE_ALL, but with composed
1072  *  forms rather than a maximally decomposed form
1073  * G_NORMALIZE_NFKC
1074  * another name for G_NORMALIZE_ALL_COMPOSE
1075  */
1076 public enum GNormalizeMode
1077 {
1078 	DEFAULT,
1079 	NFD = DEFAULT,
1080 	DEFAULT_COMPOSE,
1081 	NFC = DEFAULT_COMPOSE,
1082 	ALL,
1083 	NFKD = ALL,
1084 	ALL_COMPOSE,
1085 	NFKC = ALL_COMPOSE
1086 }
1087 alias GNormalizeMode NormalizeMode;
1088 
1089 /**
1090  * The hashing algorithm to be used by GChecksum when performing the
1091  * digest of some data.
1092  * Note that the GChecksumType enumeration may be extended at a later
1093  * date to include new hashing algorithm types.
1094  * G_CHECKSUM_MD5
1095  * Use the MD5 hashing algorithm
1096  * G_CHECKSUM_SHA1
1097  * Use the SHA-1 hashing algorithm
1098  * G_CHECKSUM_SHA256
1099  * Use the SHA-256 hashing algorithm
1100  * G_CHECKSUM_SHA512
1101  * Use the SHA-512 hashing algorithm
1102  * Since 2.16
1103  */
1104 public enum GChecksumType
1105 {
1106 	MD5,
1107 	SHA1,
1108 	SHA256,
1109 	SHA512
1110 }
1111 alias GChecksumType ChecksumType;
1112 
1113 /**
1114  * This enumeration isn't used in the API, but may be useful if you need
1115  * to mark a number as a day, month, or year.
1116  * G_DATE_DAY
1117  * a day
1118  * G_DATE_MONTH
1119  * a month
1120  * G_DATE_YEAR
1121  * a year
1122  */
1123 public enum GDateDMY
1124 {
1125 	DAY = 0,
1126 	MONTH = 1,
1127 	YEAR = 2
1128 }
1129 alias GDateDMY DateDMY;
1130 
1131 /**
1132  * Enumeration representing a month; values are G_DATE_JANUARY,
1133  * G_DATE_FEBRUARY, etc. G_DATE_BAD_MONTH is the invalid value.
1134  * G_DATE_BAD_MONTH
1135  * invalid value
1136  * G_DATE_JANUARY
1137  * January
1138  * G_DATE_FEBRUARY
1139  * February
1140  * G_DATE_MARCH
1141  * March
1142  * G_DATE_APRIL
1143  * April
1144  * G_DATE_MAY
1145  * May
1146  * G_DATE_JUNE
1147  * June
1148  * G_DATE_JULY
1149  * July
1150  * G_DATE_AUGUST
1151  * August
1152  * G_DATE_SEPTEMBER
1153  * September
1154  * G_DATE_OCTOBER
1155  * October
1156  * G_DATE_NOVEMBER
1157  * November
1158  * G_DATE_DECEMBER
1159  * December
1160  */
1161 public enum GDateMonth
1162 {
1163 	BAD_MONTH = 0,
1164 	JANUARY = 1,
1165 	FEBRUARY = 2,
1166 	MARCH = 3,
1167 	APRIL = 4,
1168 	MAY = 5,
1169 	JUNE = 6,
1170 	JULY = 7,
1171 	AUGUST = 8,
1172 	SEPTEMBER = 9,
1173 	OCTOBER = 10,
1174 	NOVEMBER = 11,
1175 	DECEMBER = 12
1176 }
1177 alias GDateMonth DateMonth;
1178 
1179 /**
1180  * Enumeration representing a day of the week; G_DATE_MONDAY,
1181  * G_DATE_TUESDAY, etc. G_DATE_BAD_WEEKDAY is an invalid weekday.
1182  * G_DATE_BAD_WEEKDAY
1183  * invalid value
1184  * G_DATE_MONDAY
1185  * Monday
1186  * G_DATE_TUESDAY
1187  * Tuesday
1188  * G_DATE_WEDNESDAY
1189  * Wednesday
1190  * G_DATE_THURSDAY
1191  * Thursday
1192  * G_DATE_FRIDAY
1193  * Friday
1194  * G_DATE_SATURDAY
1195  * Saturday
1196  * G_DATE_SUNDAY
1197  * Sunday
1198  */
1199 public enum GDateWeekday
1200 {
1201 	BAD_WEEKDAY = 0,
1202 	MONDAY = 1,
1203 	TUESDAY = 2,
1204 	WEDNESDAY = 3,
1205 	THURSDAY = 4,
1206 	FRIDAY = 5,
1207 	SATURDAY = 6,
1208 	SUNDAY = 7
1209 }
1210 alias GDateWeekday DateWeekday;
1211 
1212 /**
1213  * Disambiguates a given time in two ways.
1214  * First, specifies if the given time is in universal or local time.
1215  * Second, if the time is in local time, specifies if it is local
1216  * standard time or local daylight time. This is important for the case
1217  * where the same local time occurs twice (during daylight savings time
1218  * transitions, for example).
1219  * G_TIME_TYPE_STANDARD
1220  * the time is in local standard time
1221  * G_TIME_TYPE_DAYLIGHT
1222  * the time is in local daylight time
1223  * G_TIME_TYPE_UNIVERSAL
1224  * the time is in UTC
1225  */
1226 public enum GTimeType
1227 {
1228 	TYPE_STANDARD,
1229 	TYPE_DAYLIGHT,
1230 	TYPE_UNIVERSAL
1231 }
1232 alias GTimeType TimeType;
1233 
1234 /**
1235  * These are logical ids for special directories which are defined
1236  * depending on the platform used. You should use g_get_user_special_dir()
1237  * to retrieve the full path associated to the logical id.
1238  * The GUserDirectory enumeration can be extended at later date. Not
1239  * every platform has a directory for every logical id in this
1240  * enumeration.
1241  * G_USER_DIRECTORY_DESKTOP
1242  * the user's Desktop directory
1243  * G_USER_DIRECTORY_DOCUMENTS
1244  * the user's Documents directory
1245  * G_USER_DIRECTORY_DOWNLOAD
1246  * the user's Downloads directory
1247  * G_USER_DIRECTORY_MUSIC
1248  * the user's Music directory
1249  * G_USER_DIRECTORY_PICTURES
1250  * the user's Pictures directory
1251  * G_USER_DIRECTORY_PUBLIC_SHARE
1252  * the user's shared directory
1253  * G_USER_DIRECTORY_TEMPLATES
1254  * the user's Templates directory
1255  * G_USER_DIRECTORY_VIDEOS
1256  * the user's Movies directory
1257  * G_USER_N_DIRECTORIES
1258  * the number of enum values
1259  * Since 2.14
1260  */
1261 public enum GUserDirectory
1262 {
1263 	DESKTOP,
1264 	DOCUMENTS,
1265 	DOWNLOAD,
1266 	MUSIC,
1267 	PICTURES,
1268 	PUBLIC_SHARE,
1269 	TEMPLATES,
1270 	VIDEOS,
1271 	G_USER_N_DIRECTORIES
1272 }
1273 alias GUserDirectory UserDirectory;
1274 
1275 /**
1276  * Flags to modify the format of the string returned by g_format_size_full().
1277  * G_FORMAT_SIZE_DEFAULT
1278  * behave the same as g_format_size()
1279  * G_FORMAT_SIZE_LONG_FORMAT
1280  * include the exact number of bytes as part
1281  *  of the returned string. For example, "45.6 kB (45,612 bytes)".
1282  * G_FORMAT_SIZE_IEC_UNITS
1283  * use IEC (base 1024) units with "KiB"-style
1284  *  suffixes. IEC units should only be used for reporting things with
1285  *  a strong "power of 2" basis, like RAM sizes or RAID stripe sizes.
1286  *  Network and storage sizes should be reported in the normal SI units.
1287  */
1288 public enum GFormatSizeFlags
1289 {
1290 	DEFAULT = 0,
1291 	LONG_FORMAT = 1 << 0,
1292 	IEC_UNITS = 1 << 1
1293 }
1294 alias GFormatSizeFlags FormatSizeFlags;
1295 
1296 /**
1297  * The possible types of token returned from each
1298  * g_scanner_get_next_token() call.
1299  * G_TOKEN_EOF
1300  * the end of the file
1301  * G_TOKEN_LEFT_PAREN
1302  * a '(' character
1303  * G_TOKEN_RIGHT_PAREN
1304  * a ')' character
1305  * G_TOKEN_LEFT_CURLY
1306  * a '{' character
1307  * G_TOKEN_RIGHT_CURLY
1308  * a '}' character
1309  */
1310 public enum GTokenType
1311 {
1312 	EOF = 0,
1313 	LEFT_PAREN = '(',
1314 	RIGHT_PAREN = ')',
1315 	LEFT_CURLY = '{',
1316 	RIGHT_CURLY = '}',
1317 	LEFT_BRACE = '[',
1318 	RIGHT_BRACE = ']',
1319 	EQUAL_SIGN = '=',
1320 	COMMA = ',',
1321 	NONE = 256,
1322 	ERROR,
1323 	CHAR,
1324 	BINARY,
1325 	OCTAL,
1326 	INT,
1327 	HEX,
1328 	FLOAT,
1329 	STRING,
1330 	SYMBOL,
1331 	IDENTIFIER,
1332 	IDENTIFIER_NULL,
1333 	COMMENT_SINGLE,
1334 	COMMENT_MULTI,
1335 	LAST
1336 }
1337 alias GTokenType TokenType;
1338 
1339 /**
1340  * The possible errors, used in the v_error field
1341  * of GTokenValue, when the token is a G_TOKEN_ERROR.
1342  * G_ERR_UNKNOWN
1343  * unknown error
1344  * G_ERR_UNEXP_EOF
1345  * unexpected end of file
1346  * G_ERR_UNEXP_EOF_IN_STRING
1347  * unterminated string constant
1348  * G_ERR_UNEXP_EOF_IN_COMMENT
1349  * unterminated comment
1350  * G_ERR_NON_DIGIT_IN_CONST
1351  * non-digit character in a number
1352  * G_ERR_DIGIT_RADIX
1353  * digit beyond radix in a number
1354  * G_ERR_FLOAT_RADIX
1355  * non-decimal floating point number
1356  * G_ERR_FLOAT_MALFORMED
1357  * malformed floating point number
1358  */
1359 public enum GErrorType
1360 {
1361 	UNKNOWN,
1362 	UNEXP_EOF,
1363 	UNEXP_EOF_IN_STRING,
1364 	UNEXP_EOF_IN_COMMENT,
1365 	NON_DIGIT_IN_CONST,
1366 	DIGIT_RADIX,
1367 	FLOAT_RADIX,
1368 	FLOAT_MALFORMED
1369 }
1370 alias GErrorType ErrorType;
1371 
1372 /**
1373  * Error codes returned by spawning processes.
1374  * G_SPAWN_ERROR_FORK
1375  * Fork failed due to lack of memory.
1376  * G_SPAWN_ERROR_READ
1377  * Read or select on pipes failed.
1378  * G_SPAWN_ERROR_CHDIR
1379  * Changing to working directory failed.
1380  * G_SPAWN_ERROR_ACCES
1381  * execv() returned EACCES
1382  * G_SPAWN_ERROR_PERM
1383  * execv() returned EPERM
1384  * G_SPAWN_ERROR_TOO_BIG
1385  * execv() returned E2BIG
1386  * G_SPAWN_ERROR_2BIG
1387  * deprecated alias for G_SPAWN_ERROR_TOO_BIG
1388  * G_SPAWN_ERROR_NOEXEC
1389  * execv() returned ENOEXEC
1390  * G_SPAWN_ERROR_NAMETOOLONG
1391  * execv() returned ENAMETOOLONG
1392  * G_SPAWN_ERROR_NOENT
1393  * execv() returned ENOENT
1394  * G_SPAWN_ERROR_NOMEM
1395  * execv() returned ENOMEM
1396  * G_SPAWN_ERROR_NOTDIR
1397  * execv() returned ENOTDIR
1398  * G_SPAWN_ERROR_LOOP
1399  * execv() returned ELOOP
1400  * G_SPAWN_ERROR_TXTBUSY
1401  * execv() returned ETXTBUSY
1402  * G_SPAWN_ERROR_IO
1403  * execv() returned EIO
1404  * G_SPAWN_ERROR_NFILE
1405  * execv() returned ENFILE
1406  * G_SPAWN_ERROR_MFILE
1407  * execv() returned EMFILE
1408  * G_SPAWN_ERROR_INVAL
1409  * execv() returned EINVAL
1410  * G_SPAWN_ERROR_ISDIR
1411  * execv() returned EISDIR
1412  * G_SPAWN_ERROR_LIBBAD
1413  * execv() returned ELIBBAD
1414  * G_SPAWN_ERROR_FAILED
1415  * Some other fatal failure,
1416  *  error->message should explain.
1417  */
1418 public enum GSpawnError
1419 {
1420 	FORK, /+* fork failed due to lack of memory +/
1421 	READ, /+* read or select on pipes failed +/
1422 	CHDIR, /+* changing to working dir failed +/
1423 	ACCES, /+* execv() returned EACCES +/
1424 	PERM, /+* execv() returned EPERM +/
1425 	TOO_BIG,/+* execv() returned E2BIG +/
1426 	
1427 	NOEXEC, /+* execv() returned ENOEXEC +/
1428 	NAMETOOLONG, /+* "" "" ENAMETOOLONG +/
1429 	NOENT, /+* "" "" ENOENT +/
1430 	NOMEM, /+* "" "" ENOMEM +/
1431 	NOTDIR, /+* "" "" ENOTDIR +/
1432 	LOOP, /+* "" "" ELOOP +/
1433 	TXTBUSY, /+* "" "" ETXTBUSY +/
1434 	IO, /+* "" "" EIO +/
1435 	NFILE, /+* "" "" ENFILE +/
1436 	MFILE, /+* "" "" EMFLE +/
1437 	INVAL, /+* "" "" EINVAL +/
1438 	ISDIR, /+* "" "" EISDIR +/
1439 	LIBBAD, /+* "" "" ELIBBAD +/
1440 	FAILED /+* other fatal failure, error->message
1441 	 * should explain
1442 	+/
1443 }
1444 alias GSpawnError SpawnError;
1445 
1446 /**
1447  * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
1448  * G_SPAWN_DEFAULT
1449  * no flags, default behaviour
1450  * G_SPAWN_LEAVE_DESCRIPTORS_OPEN
1451  * the parent's open file descriptors will be
1452  *  inherited by the child; otherwise all descriptors except stdin/stdout/stderr
1453  *  will be closed before calling exec() in the child.
1454  * G_SPAWN_DO_NOT_REAP_CHILD
1455  * the child will not be automatically reaped; you
1456  *  must use g_child_watch_add() yourself (or call waitpid()
1457  *  or handle SIGCHLD yourself), or the child will become a zombie.
1458  * G_SPAWN_SEARCH_PATH
1459  * argv[0] need not be an absolute path,
1460  *  it will be looked for in the user's PATH.
1461  * G_SPAWN_STDOUT_TO_DEV_NULL
1462  * the child's standard output will be discarded,
1463  *  instead of going to the same location as the parent's standard output.
1464  * G_SPAWN_STDERR_TO_DEV_NULL
1465  * the child's standard error will be discarded.
1466  * G_SPAWN_CHILD_INHERITS_STDIN
1467  * the child will inherit the parent's standard
1468  *  input (by default, the child's standard input is attached to
1469  *  /dev/null).
1470  * G_SPAWN_FILE_AND_ARGV_ZERO
1471  * the first element of argv is
1472  *  the file to execute, while the remaining elements are the actual argument
1473  *  vector to pass to the file. Normally g_spawn_async_with_pipes() uses
1474  *  argv[0] as the file to execute, and passes all of
1475  *  argv to the child.
1476  * G_SPAWN_SEARCH_PATH_FROM_ENVP
1477  * if argv[0] is not an abolute path,
1478  *  it will be looked for in the PATH from the passed child
1479  *  environment. Since: 2.34
1480  */
1481 public enum GSpawnFlags
1482 {
1483 	DEFAULT = 0,
1484 	LEAVE_DESCRIPTORS_OPEN = 1 << 0,
1485 	DO_NOT_REAP_CHILD = 1 << 1,
1486 	/+* look for argv[0] inn the path i.e. use execvp() +/
1487 	SEARCH_PATH = 1 << 2,
1488 	/+* Dump output to /dev/null +/
1489 	STDOUT_TO_DEV_NULL = 1 << 3,
1490 	STDERR_TO_DEV_NULL = 1 << 4,
1491 	CHILD_INHERITS_STDIN = 1 << 5,
1492 	FILE_AND_ARGV_ZERO = 1 << 6,
1493 	SEARCH_PATH_FROM_ENVP = 1 << 7
1494 }
1495 alias GSpawnFlags SpawnFlags;
1496 
1497 /**
1498  * Values corresponding to errno codes returned from file operations
1499  * on UNIX. Unlike errno codes, GFileError values are available on
1500  * all systems, even Windows. The exact meaning of each code depends
1501  * on what sort of file operation you were performing; the UNIX
1502  * documentation gives more details. The following error code descriptions
1503  * come from the GNU C Library manual, and are under the copyright
1504  * of that manual.
1505  * It's not very portable to make detailed assumptions about exactly
1506  * which errors will be returned from a given operation. Some errors
1507  * don't occur on some systems, etc., sometimes there are subtle
1508  * differences in when a system will report a given error, etc.
1509  * G_FILE_ERROR_EXIST
1510  * Operation not permitted; only the owner of
1511  *  the file (or other resource) or processes with special privileges
1512  *  can perform the operation.
1513  * G_FILE_ERROR_ISDIR
1514  * File is a directory; you cannot open a directory
1515  *  for writing, or create or remove hard links to it.
1516  * G_FILE_ERROR_ACCES
1517  * Permission denied; the file permissions do not
1518  *  allow the attempted operation.
1519  * G_FILE_ERROR_NAMETOOLONG
1520  * Filename too long.
1521  * G_FILE_ERROR_NOENT
1522  * No such file or directory. This is a "file
1523  *  doesn't exist" error for ordinary files that are referenced in
1524  *  contexts where they are expected to already exist.
1525  * G_FILE_ERROR_NOTDIR
1526  * A file that isn't a directory was specified when
1527  *  a directory is required.
1528  * G_FILE_ERROR_NXIO
1529  * No such device or address. The system tried to
1530  *  use the device represented by a file you specified, and it
1531  *  couldn't find the device. This can mean that the device file was
1532  *  installed incorrectly, or that the physical device is missing or
1533  *  not correctly attached to the computer.
1534  * G_FILE_ERROR_NODEV
1535  * The underlying file system of the specified file
1536  *  does not support memory mapping.
1537  * G_FILE_ERROR_ROFS
1538  * The directory containing the new link can't be
1539  *  modified because it's on a read-only file system.
1540  * G_FILE_ERROR_TXTBSY
1541  * Text file busy.
1542  * G_FILE_ERROR_FAULT
1543  * You passed in a pointer to bad memory.
1544  *  (GLib won't reliably return this, don't pass in pointers to bad
1545  *  memory.)
1546  * G_FILE_ERROR_LOOP
1547  * Too many levels of symbolic links were encountered
1548  *  in looking up a file name. This often indicates a cycle of symbolic
1549  *  links.
1550  * G_FILE_ERROR_NOSPC
1551  * No space left on device; write operation on a
1552  *  file failed because the disk is full.
1553  * G_FILE_ERROR_NOMEM
1554  * No memory available. The system cannot allocate
1555  *  more virtual memory because its capacity is full.
1556  * G_FILE_ERROR_MFILE
1557  * The current process has too many files open and
1558  *  can't open any more. Duplicate descriptors do count toward this
1559  *  limit.
1560  * G_FILE_ERROR_NFILE
1561  * There are too many distinct file openings in the
1562  *  entire system.
1563  * G_FILE_ERROR_BADF
1564  * Bad file descriptor; for example, I/O on a
1565  *  descriptor that has been closed or reading from a descriptor open
1566  *  only for writing (or vice versa).
1567  * G_FILE_ERROR_INVAL
1568  * Invalid argument. This is used to indicate
1569  *  various kinds of problems with passing the wrong argument to a
1570  *  library function.
1571  * G_FILE_ERROR_PIPE
1572  * Broken pipe; there is no process reading from the
1573  *  other end of a pipe. Every library function that returns this
1574  *  error code also generates a 'SIGPIPE' signal; this signal
1575  *  terminates the program if not handled or blocked. Thus, your
1576  *  program will never actually see this code unless it has handled
1577  *  or blocked 'SIGPIPE'.
1578  * G_FILE_ERROR_AGAIN
1579  * Resource temporarily unavailable; the call might
1580  *  work if you try again later.
1581  * G_FILE_ERROR_INTR
1582  * Interrupted function call; an asynchronous signal
1583  *  occurred and prevented completion of the call. When this
1584  *  happens, you should try the call again.
1585  * G_FILE_ERROR_IO
1586  * Input/output error; usually used for physical read
1587  *  or write errors. i.e. the disk or other physical device hardware
1588  *  is returning errors.
1589  * G_FILE_ERROR_PERM
1590  * Operation not permitted; only the owner of the
1591  *  file (or other resource) or processes with special privileges can
1592  *  perform the operation.
1593  * G_FILE_ERROR_NOSYS
1594  * Function not implemented; this indicates that
1595  *  the system is missing some functionality.
1596  * G_FILE_ERROR_FAILED
1597  * Does not correspond to a UNIX error code; this
1598  *  is the standard "failed for unspecified reason" error code present
1599  *  in all GError error code enumerations. Returned if no specific
1600  *  code applies.
1601  */
1602 public enum GFileError
1603 {
1604 	EXIST,
1605 	ISDIR,
1606 	ACCES,
1607 	NAMETOOLONG,
1608 	NOENT,
1609 	NOTDIR,
1610 	NXIO,
1611 	NODEV,
1612 	ROFS,
1613 	TXTBSY,
1614 	FAULT,
1615 	LOOP,
1616 	NOSPC,
1617 	NOMEM,
1618 	MFILE,
1619 	NFILE,
1620 	BADF,
1621 	INVAL,
1622 	PIPE,
1623 	AGAIN,
1624 	INTR,
1625 	IO,
1626 	PERM,
1627 	NOSYS,
1628 	FAILED
1629 }
1630 alias GFileError FileError;
1631 
1632 /**
1633  * A test to perform on a file using g_file_test().
1634  * G_FILE_TEST_IS_REGULAR
1635  * TRUE if the file is a regular file
1636  *  (not a directory). Note that this test will also return TRUE
1637  *  if the tested file is a symlink to a regular file.
1638  * G_FILE_TEST_IS_SYMLINK
1639  * TRUE if the file is a symlink.
1640  * G_FILE_TEST_IS_DIR
1641  * TRUE if the file is a directory.
1642  * G_FILE_TEST_IS_EXECUTABLE
1643  * TRUE if the file is executable.
1644  * G_FILE_TEST_EXISTS
1645  * TRUE if the file exists. It may or may not
1646  *  be a regular file.
1647  */
1648 public enum GFileTest
1649 {
1650 	IS_REGULAR = 1 << 0,
1651 	IS_SYMLINK = 1 << 1,
1652 	IS_DIR = 1 << 2,
1653 	IS_EXECUTABLE = 1 << 3,
1654 	EXISTS = 1 << 4
1655 }
1656 alias GFileTest FileTest;
1657 
1658 /**
1659  * Error codes returned by shell functions.
1660  * G_SHELL_ERROR_BAD_QUOTING
1661  * Mismatched or otherwise mangled quoting.
1662  * G_SHELL_ERROR_EMPTY_STRING
1663  * String to be parsed was empty.
1664  * G_SHELL_ERROR_FAILED
1665  * Some other error.
1666  */
1667 public enum GShellError
1668 {
1669 	BAD_QUOTING,
1670 	/+* string to be parsed was empty +/
1671 	EMPTY_STRING,
1672 	FAILED
1673 }
1674 alias GShellError ShellError;
1675 
1676 /**
1677  * Error codes returned by option parsing.
1678  * G_OPTION_ERROR_UNKNOWN_OPTION
1679  * An option was not known to the parser.
1680  *  This error will only be reported, if the parser hasn't been instructed
1681  *  to ignore unknown options, see g_option_context_set_ignore_unknown_options().
1682  * G_OPTION_ERROR_BAD_VALUE
1683  * A value couldn't be parsed.
1684  * G_OPTION_ERROR_FAILED
1685  * A GOptionArgFunc callback failed.
1686  */
1687 public enum GOptionError
1688 {
1689 	UNKNOWN_OPTION,
1690 	BAD_VALUE,
1691 	FAILED
1692 }
1693 alias GOptionError OptionError;
1694 
1695 /**
1696  * The GOptionArg enum values determine which type of extra argument the
1697  * options expect to find. If an option expects an extra argument, it
1698  * can be specified in several ways; with a short option:
1699  * -x arg, with a long option: --name arg
1700  * or combined in a single argument: --name=arg.
1701  * G_OPTION_ARG_NONE
1702  * No extra argument. This is useful for simple flags.
1703  * G_OPTION_ARG_STRING
1704  * The option takes a string argument.
1705  * G_OPTION_ARG_INT
1706  * The option takes an integer argument.
1707  * G_OPTION_ARG_CALLBACK
1708  * The option provides a callback to parse the
1709  *  extra argument.
1710  * G_OPTION_ARG_FILENAME
1711  * The option takes a filename as argument.
1712  * G_OPTION_ARG_STRING_ARRAY
1713  * The option takes a string argument, multiple
1714  *  uses of the option are collected into an array of strings.
1715  * G_OPTION_ARG_FILENAME_ARRAY
1716  * The option takes a filename as argument,
1717  *  multiple uses of the option are collected into an array of strings.
1718  * G_OPTION_ARG_DOUBLE
1719  * The option takes a double argument. The argument
1720  *  can be formatted either for the user's locale or for the "C" locale. Since 2.12
1721  * G_OPTION_ARG_INT64
1722  * The option takes a 64-bit integer. Like G_OPTION_ARG_INT
1723  *  but for larger numbers. The number can be in decimal base, or in hexadecimal
1724  *  (when prefixed with 0x, for example, 0xffffffff).
1725  *  Since 2.12
1726  */
1727 public enum GOptionArg
1728 {
1729 	NONE,
1730 	STRING,
1731 	INT,
1732 	CALLBACK,
1733 	FILENAME,
1734 	STRING_ARRAY,
1735 	FILENAME_ARRAY,
1736 	DOUBLE,
1737 	INT64
1738 }
1739 alias GOptionArg OptionArg;
1740 
1741 /**
1742  * Flags which modify individual options.
1743  * G_OPTION_FLAG_HIDDEN
1744  * The option doesn't appear in --help
1745  *  output.
1746  * G_OPTION_FLAG_IN_MAIN
1747  * The option appears in the main section of the
1748  *  --help output, even if it is defined in a group.
1749  * G_OPTION_FLAG_REVERSE
1750  * For options of the G_OPTION_ARG_NONE kind, this flag
1751  *  indicates that the sense of the option is reversed.
1752  * G_OPTION_FLAG_NO_ARG
1753  * For options of the G_OPTION_ARG_CALLBACK kind,
1754  *  this flag indicates that the callback does not take any argument
1755  *  (like a G_OPTION_ARG_NONE option). Since 2.8
1756  * G_OPTION_FLAG_FILENAME
1757  * For options of the G_OPTION_ARG_CALLBACK
1758  *  kind, this flag indicates that the argument should be passed to the
1759  *  callback in the GLib filename encoding rather than UTF-8. Since 2.8
1760  * G_OPTION_FLAG_OPTIONAL_ARG
1761  * For options of the G_OPTION_ARG_CALLBACK
1762  *  kind, this flag indicates that the argument supply is optional. If no argument
1763  *  is given then data of GOptionParseFunc will be set to NULL. Since 2.8
1764  * G_OPTION_FLAG_NOALIAS
1765  * This flag turns off the automatic conflict resolution
1766  *  which prefixes long option names with groupname- if
1767  *  there is a conflict. This option should only be used in situations where
1768  *  aliasing is necessary to model some legacy commandline interface. It is
1769  *  not safe to use this option, unless all option groups are under your
1770  *  direct control. Since 2.8.
1771  */
1772 public enum GOptionFlags
1773 {
1774 	HIDDEN = 1 << 0,
1775 	IN_MAIN = 1 << 1,
1776 	REVERSE = 1 << 2,
1777 	NO_ARG = 1 << 3,
1778 	FILENAME = 1 << 4,
1779 	OPTIONAL_ARG = 1 << 5,
1780 	NOALIAS = 1 << 6
1781 }
1782 alias GOptionFlags OptionFlags;
1783 
1784 /**
1785  * Error codes returned by regular expressions functions.
1786  * G_REGEX_ERROR_COMPILE
1787  * Compilation of the regular expression failed.
1788  * G_REGEX_ERROR_OPTIMIZE
1789  * Optimization of the regular expression failed.
1790  * G_REGEX_ERROR_REPLACE
1791  * Replacement failed due to an ill-formed replacement
1792  *  string.
1793  * G_REGEX_ERROR_MATCH
1794  * The match process failed.
1795  * G_REGEX_ERROR_INTERNAL
1796  * Internal error of the regular expression engine.
1797  *  Since 2.16
1798  * G_REGEX_ERROR_STRAY_BACKSLASH
1799  * "\\" at end of pattern. Since 2.16
1800  * G_REGEX_ERROR_MISSING_CONTROL_CHAR
1801  * "\\c" at end of pattern. Since 2.16
1802  * G_REGEX_ERROR_UNRECOGNIZED_ESCAPE
1803  * Unrecognized character follows "\\".
1804  *  Since 2.16
1805  * G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER
1806  * Numbers out of order in "{}"
1807  *  quantifier. Since 2.16
1808  * G_REGEX_ERROR_QUANTIFIER_TOO_BIG
1809  * Number too big in "{}" quantifier.
1810  *  Since 2.16
1811  * G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS
1812  * Missing terminating "]" for
1813  *  character class. Since 2.16
1814  * G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS
1815  * Invalid escape sequence
1816  *  in character class. Since 2.16
1817  * G_REGEX_ERROR_RANGE_OUT_OF_ORDER
1818  * Range out of order in character class.
1819  *  Since 2.16
1820  * G_REGEX_ERROR_NOTHING_TO_REPEAT
1821  * Nothing to repeat. Since 2.16
1822  * G_REGEX_ERROR_UNRECOGNIZED_CHARACTER
1823  * Unrecognized character after "(?",
1824  *  "(?<" or "(?P". Since 2.16
1825  * G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS
1826  * POSIX named classes are
1827  *  supported only within a class. Since 2.16
1828  * G_REGEX_ERROR_UNMATCHED_PARENTHESIS
1829  * Missing terminating ")" or ")"
1830  *  without opening "(". Since 2.16
1831  * G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE
1832  * Reference to non-existent
1833  *  subpattern. Since 2.16
1834  * G_REGEX_ERROR_UNTERMINATED_COMMENT
1835  * Missing terminating ")" after comment.
1836  *  Since 2.16
1837  * G_REGEX_ERROR_EXPRESSION_TOO_LARGE
1838  * Regular expression too large.
1839  *  Since 2.16
1840  * G_REGEX_ERROR_MEMORY_ERROR
1841  * Failed to get memory. Since 2.16
1842  * G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND
1843  * Lookbehind assertion is not
1844  *  fixed length. Since 2.16
1845  * G_REGEX_ERROR_MALFORMED_CONDITION
1846  * Malformed number or name after "(?(".
1847  *  Since 2.16
1848  * G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES
1849  * Conditional group contains
1850  *  more than two branches. Since 2.16
1851  * G_REGEX_ERROR_ASSERTION_EXPECTED
1852  * Assertion expected after "(?(".
1853  *  Since 2.16
1854  * G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME
1855  * Unknown POSIX class name.
1856  *  Since 2.16
1857  * G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED
1858  * POSIX collating
1859  *  elements are not supported. Since 2.16
1860  * G_REGEX_ERROR_HEX_CODE_TOO_LARGE
1861  * Character value in "\\x{...}" sequence
1862  *  is too large. Since 2.16
1863  * G_REGEX_ERROR_INVALID_CONDITION
1864  * Invalid condition "(?(0)". Since 2.16
1865  * G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND
1866  * \\C not allowed in
1867  *  lookbehind assertion. Since 2.16
1868  * G_REGEX_ERROR_INFINITE_LOOP
1869  * Recursive call could loop indefinitely.
1870  *  Since 2.16
1871  * G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR
1872  * Missing terminator
1873  *  in subpattern name. Since 2.16
1874  * G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME
1875  * Two named subpatterns have
1876  *  the same name. Since 2.16
1877  * G_REGEX_ERROR_MALFORMED_PROPERTY
1878  * Malformed "\\P" or "\\p" sequence.
1879  *  Since 2.16
1880  * G_REGEX_ERROR_UNKNOWN_PROPERTY
1881  * Unknown property name after "\\P" or
1882  *  "\\p". Since 2.16
1883  * G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG
1884  * Subpattern name is too long
1885  *  (maximum 32 characters). Since 2.16
1886  * G_REGEX_ERROR_TOO_MANY_SUBPATTERNS
1887  * Too many named subpatterns (maximum
1888  *  10,000). Since 2.16
1889  * G_REGEX_ERROR_INVALID_OCTAL_VALUE
1890  * Octal value is greater than "\\377".
1891  *  Since 2.16
1892  * G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE
1893  * "DEFINE" group contains more
1894  *  than one branch. Since 2.16
1895  * G_REGEX_ERROR_DEFINE_REPETION
1896  * Repeating a "DEFINE" group is not allowed.
1897  *  This error is never raised. Since: 2.16 Deprecated: 2.34
1898  * G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS
1899  * Inconsistent newline options.
1900  *  Since 2.16
1901  * G_REGEX_ERROR_MISSING_BACK_REFERENCE
1902  * "\\g" is not followed by a braced,
1903  *  angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16
1904  * G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE
1905  * relative reference must not be zero. Since: 2.34
1906  * G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN
1907  * the backtracing
1908  *  control verb used does not allow an argument. Since: 2.34
1909  * G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB
1910  * unknown backtracing
1911  *  control verb. Since: 2.34
1912  * G_REGEX_ERROR_NUMBER_TOO_BIG
1913  * number is too big in escape sequence. Since: 2.34
1914  * G_REGEX_ERROR_MISSING_SUBPATTERN_NAME
1915  * Missing subpattern name. Since: 2.34
1916  * G_REGEX_ERROR_MISSING_DIGIT
1917  * Missing digit. Since 2.34
1918  * G_REGEX_ERROR_INVALID_DATA_CHARACTER
1919  * In JavaScript compatibility mode,
1920  *  "[" is an invalid data character. Since: 2.34
1921  * G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME
1922  * different names for subpatterns of the
1923  *  same number are not allowed. Since: 2.34
1924  * G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED
1925  * the backtracing control
1926  *  verb requires an argument. Since: 2.34
1927  * G_REGEX_ERROR_INVALID_CONTROL_CHAR
1928  * "\\c" must be followed by an ASCII
1929  *  character. Since: 2.34
1930  * G_REGEX_ERROR_MISSING_NAME
1931  * "\\k" is not followed by a braced, angle-bracketed, or
1932  *  quoted name. Since: 2.34
1933  * G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS
1934  * "\\N" is not supported in a class. Since: 2.34
1935  * G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES
1936  * too many forward references. Since: 2.34
1937  * G_REGEX_ERROR_NAME_TOO_LONG
1938  * the name is too long in "(*MARK)", "(*PRUNE)",
1939  *  "(*SKIP)", or "(*THEN)". Since: 2.34
1940  * G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE
1941  * the character value in the \\u sequence is
1942  *  too large. Since: 2.34
1943  * Since 2.14
1944  */
1945 public enum GRegexError
1946 {
1947 	COMPILE,
1948 	OPTIMIZE,
1949 	REPLACE,
1950 	MATCH,
1951 	INTERNAL,
1952 	/+* These are the error codes from PCRE + 100 +/
1953 	STRAY_BACKSLASH = 101,
1954 	MISSING_CONTROL_CHAR = 102,
1955 	UNRECOGNIZED_ESCAPE = 103,
1956 	QUANTIFIERS_OUT_OF_ORDER = 104,
1957 	QUANTIFIER_TOO_BIG = 105,
1958 	UNTERMINATED_CHARACTER_CLASS = 106,
1959 	INVALID_ESCAPE_IN_CHARACTER_CLASS = 107,
1960 	RANGE_OUT_OF_ORDER = 108,
1961 	NOTHING_TO_REPEAT = 109,
1962 	UNRECOGNIZED_CHARACTER = 112,
1963 	POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113,
1964 	UNMATCHED_PARENTHESIS = 114,
1965 	INEXISTENT_SUBPATTERN_REFERENCE = 115,
1966 	UNTERMINATED_COMMENT = 118,
1967 	EXPRESSION_TOO_LARGE = 120,
1968 	MEMORY_ERROR = 121,
1969 	VARIABLE_LENGTH_LOOKBEHIND = 125,
1970 	MALFORMED_CONDITION = 126,
1971 	TOO_MANY_CONDITIONAL_BRANCHES = 127,
1972 	ASSERTION_EXPECTED = 128,
1973 	UNKNOWN_POSIX_CLASS_NAME = 130,
1974 	POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131,
1975 	HEX_CODE_TOO_LARGE = 134,
1976 	INVALID_CONDITION = 135,
1977 	SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136,
1978 	INFINITE_LOOP = 140,
1979 	MISSING_SUBPATTERN_NAME_TERMINATOR = 142,
1980 	DUPLICATE_SUBPATTERN_NAME = 143,
1981 	MALFORMED_PROPERTY = 146,
1982 	UNKNOWN_PROPERTY = 147,
1983 	SUBPATTERN_NAME_TOO_LONG = 148,
1984 	TOO_MANY_SUBPATTERNS = 149,
1985 	INVALID_OCTAL_VALUE = 151,
1986 	TOO_MANY_BRANCHES_IN_DEFINE = 154,
1987 	DEFINE_REPETION = 155,
1988 	INCONSISTENT_NEWLINE_OPTIONS = 156,
1989 	MISSING_BACK_REFERENCE = 157,
1990 	INVALID_RELATIVE_REFERENCE = 158,
1991 	BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159,
1992 	UNKNOWN_BACKTRACKING_CONTROL_VERB = 160,
1993 	NUMBER_TOO_BIG = 161,
1994 	MISSING_SUBPATTERN_NAME = 162,
1995 	MISSING_DIGIT = 163,
1996 	INVALID_DATA_CHARACTER = 164,
1997 	EXTRA_SUBPATTERN_NAME = 165,
1998 	BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166,
1999 	INVALID_CONTROL_CHAR = 168,
2000 	MISSING_NAME = 169,
2001 	NOT_SUPPORTED_IN_CLASS = 171,
2002 	TOO_MANY_FORWARD_REFERENCES = 172,
2003 	NAME_TOO_LONG = 175,
2004 	CHARACTER_VALUE_TOO_LARGE = 176
2005 }
2006 alias GRegexError RegexError;
2007 
2008 /**
2009  * Flags specifying compile-time options.
2010  * G_REGEX_CASELESS
2011  * Letters in the pattern match both upper- and
2012  *  lowercase letters. This option can be changed within a pattern
2013  *  by a "(?i)" option setting.
2014  * G_REGEX_MULTILINE
2015  * By default, GRegex treats the strings as consisting
2016  *  of a single line of characters (even if it actually contains
2017  *  newlines). The "start of line" metacharacter ("^") matches only
2018  *  at the start of the string, while the "end of line" metacharacter
2019  *  ("$") matches only at the end of the string, or before a terminating
2020  *  newline (unless G_REGEX_DOLLAR_ENDONLY is set). When
2021  *  G_REGEX_MULTILINE is set, the "start of line" and "end of line"
2022  *  constructs match immediately following or immediately before any
2023  *  newline in the string, respectively, as well as at the very start
2024  *  and end. This can be changed within a pattern by a "(?m)" option
2025  *  setting.
2026  * G_REGEX_DOTALL
2027  * A dot metacharater (".") in the pattern matches all
2028  *  characters, including newlines. Without it, newlines are excluded.
2029  *  This option can be changed within a pattern by a ("?s") option setting.
2030  * G_REGEX_EXTENDED
2031  * Whitespace data characters in the pattern are
2032  *  totally ignored except when escaped or inside a character class.
2033  *  Whitespace does not include the VT character (code 11). In addition,
2034  *  characters between an unescaped "#" outside a character class and
2035  *  the next newline character, inclusive, are also ignored. This can
2036  *  be changed within a pattern by a "(?x)" option setting.
2037  * G_REGEX_ANCHORED
2038  * The pattern is forced to be "anchored", that is,
2039  *  it is constrained to match only at the first matching point in the
2040  *  string that is being searched. This effect can also be achieved by
2041  *  appropriate constructs in the pattern itself such as the "^"
2042  *  metacharater.
2043  * G_REGEX_DOLLAR_ENDONLY
2044  * A dollar metacharacter ("$") in the pattern
2045  *  matches only at the end of the string. Without this option, a
2046  *  dollar also matches immediately before the final character if
2047  *  it is a newline (but not before any other newlines). This option
2048  *  is ignored if G_REGEX_MULTILINE is set.
2049  * G_REGEX_UNGREEDY
2050  * Inverts the "greediness" of the quantifiers so that
2051  *  they are not greedy by default, but become greedy if followed by "?".
2052  *  It can also be set by a "(?U)" option setting within the pattern.
2053  * G_REGEX_RAW
2054  * Usually strings must be valid UTF-8 strings, using this
2055  *  flag they are considered as a raw sequence of bytes.
2056  * G_REGEX_NO_AUTO_CAPTURE
2057  * Disables the use of numbered capturing
2058  *  parentheses in the pattern. Any opening parenthesis that is not
2059  *  followed by "?" behaves as if it were followed by "?:" but named
2060  *  parentheses can still be used for capturing (and they acquire numbers
2061  *  in the usual way).
2062  * G_REGEX_OPTIMIZE
2063  * Optimize the regular expression. If the pattern will
2064  *  be used many times, then it may be worth the effort to optimize it
2065  *  to improve the speed of matches.
2066  * G_REGEX_FIRSTLINE
2067  * Limits an unanchored pattern to match before (or at) the
2068  *  first newline. Since: 2.34
2069  * G_REGEX_DUPNAMES
2070  * Names used to identify capturing subpatterns need not
2071  *  be unique. This can be helpful for certain types of pattern when it
2072  *  is known that only one instance of the named subpattern can ever be
2073  *  matched.
2074  * G_REGEX_NEWLINE_CR
2075  * Usually any newline character or character sequence is
2076  *  recognized. If this option is set, the only recognized newline character
2077  *  is '\r'.
2078  * G_REGEX_NEWLINE_LF
2079  * Usually any newline character or character sequence is
2080  *  recognized. If this option is set, the only recognized newline character
2081  *  is '\n'.
2082  * G_REGEX_NEWLINE_CRLF
2083  * Usually any newline character or character sequence is
2084  *  recognized. If this option is set, the only recognized newline character
2085  *  sequence is '\r\n'.
2086  * G_REGEX_NEWLINE_ANYCRLF
2087  * Usually any newline character or character sequence
2088  *  is recognized. If this option is set, the only recognized newline character
2089  *  sequences are '\r', '\n', and '\r\n'. Since: 2.34
2090  * G_REGEX_BSR_ANYCRLF
2091  * Usually any newline character or character sequence
2092  *  is recognised. If this option is set, then "\R" only recognizes the newline
2093  *  characters '\r', '\n' and '\r\n'. Since: 2.34
2094  * G_REGEX_JAVASCRIPT_COMPAT
2095  * Changes behaviour so that it is compatible with
2096  *  JavaScript rather than PCRE. Since: 2.34
2097  * Since 2.14
2098  */
2099 public enum GRegexCompileFlags
2100 {
2101 	CASELESS = 1 << 0,
2102 	MULTILINE = 1 << 1,
2103 	DOTALL = 1 << 2,
2104 	EXTENDED = 1 << 3,
2105 	ANCHORED = 1 << 4,
2106 	DOLLAR_ENDONLY = 1 << 5,
2107 	UNGREEDY = 1 << 9,
2108 	RAW = 1 << 11,
2109 	NO_AUTO_CAPTURE = 1 << 12,
2110 	OPTIMIZE = 1 << 13,
2111 	FIRSTLINE = 1 << 18,
2112 	DUPNAMES = 1 << 19,
2113 	NEWLINE_CR = 1 << 20,
2114 	NEWLINE_LF = 1 << 21,
2115 	NEWLINE_CRLF = NEWLINE_CR | NEWLINE_LF,
2116 	NEWLINE_ANYCRLF = NEWLINE_CR | 1 << 22,
2117 	BSR_ANYCRLF = 1 << 23,
2118 	JAVASCRIPT_COMPAT = 1 << 25
2119 }
2120 alias GRegexCompileFlags RegexCompileFlags;
2121 
2122 /**
2123  * Flags specifying match-time options.
2124  * G_REGEX_MATCH_ANCHORED
2125  * The pattern is forced to be "anchored", that is,
2126  *  it is constrained to match only at the first matching point in the
2127  *  string that is being searched. This effect can also be achieved by
2128  *  appropriate constructs in the pattern itself such as the "^"
2129  *  metacharater.
2130  * G_REGEX_MATCH_NOTBOL
2131  * Specifies that first character of the string is
2132  *  not the beginning of a line, so the circumflex metacharacter should
2133  *  not match before it. Setting this without G_REGEX_MULTILINE (at
2134  *  compile time) causes circumflex never to match. This option affects
2135  *  only the behaviour of the circumflex metacharacter, it does not
2136  *  affect "\A".
2137  * G_REGEX_MATCH_NOTEOL
2138  * Specifies that the end of the subject string is
2139  *  not the end of a line, so the dollar metacharacter should not match
2140  *  it nor (except in multiline mode) a newline immediately before it.
2141  *  Setting this without G_REGEX_MULTILINE (at compile time) causes
2142  *  dollar never to match. This option affects only the behaviour of
2143  *  the dollar metacharacter, it does not affect "\Z" or "\z".
2144  * G_REGEX_MATCH_NOTEMPTY
2145  * An empty string is not considered to be a valid
2146  *  match if this option is set. If there are alternatives in the pattern,
2147  *  they are tried. If all the alternatives match the empty string, the
2148  *  entire match fails. For example, if the pattern "a?b?" is applied to
2149  *  a string not beginning with "a" or "b", it matches the empty string
2150  *  at the start of the string. With this flag set, this match is not
2151  *  valid, so GRegex searches further into the string for occurrences
2152  *  of "a" or "b".
2153  * G_REGEX_MATCH_PARTIAL
2154  * Turns on the partial matching feature, for more
2155  *  documentation on partial matching see g_match_info_is_partial_match().
2156  * G_REGEX_MATCH_NEWLINE_CR
2157  * Overrides the newline definition set when
2158  *  creating a new GRegex, setting the '\r' character as line terminator.
2159  * G_REGEX_MATCH_NEWLINE_LF
2160  * Overrides the newline definition set when
2161  *  creating a new GRegex, setting the '\n' character as line terminator.
2162  * G_REGEX_MATCH_NEWLINE_CRLF
2163  * Overrides the newline definition set when
2164  *  creating a new GRegex, setting the '\r\n' characters sequence as line terminator.
2165  * G_REGEX_MATCH_NEWLINE_ANY
2166  * Overrides the newline definition set when
2167  *  creating a new GRegex, any Unicode newline sequence
2168  *  is recognised as a newline. These are '\r', '\n' and '\rn', and the
2169  *  single characters U+000B LINE TABULATION, U+000C FORM FEED (FF),
2170  *  U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and
2171  *  U+2029 PARAGRAPH SEPARATOR.
2172  * G_REGEX_MATCH_NEWLINE_ANYCRLF
2173  * Overrides the newline definition set when
2174  *  creating a new GRegex; any '\r', '\n', or '\r\n' character sequence
2175  *  is recognized as a newline. Since: 2.34
2176  * G_REGEX_MATCH_BSR_ANYCRLF
2177  * Overrides the newline definition for "\R" set when
2178  *  creating a new GRegex; only '\r', '\n', or '\r\n' character sequences
2179  *  are recognized as a newline by "\R". Since: 2.34
2180  * G_REGEX_MATCH_BSR_ANY
2181  * Overrides the newline definition for "\R" set when
2182  *  creating a new GRegex; any Unicode newline character or character sequence
2183  *  are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the
2184  *  single characters U+000B LINE TABULATION, U+000C FORM FEED (FF),
2185  *  U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and
2186  *  U+2029 PARAGRAPH SEPARATOR. Since: 2.34
2187  * G_REGEX_MATCH_PARTIAL_SOFT
2188  * An alias for G_REGEX_MATCH_PARTIAL. Since: 2.34
2189  * G_REGEX_MATCH_PARTIAL_HARD
2190  * Turns on the partial matching feature. In contrast to
2191  *  to G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match
2192  *  is found, without continuing to search for a possible complete match. See
2193  *  g_match_info_is_partial_match() for more information. Since: 2.34
2194  * G_REGEX_MATCH_NOTEMPTY_ATSTART
2195  * Like G_REGEX_MATCH_NOTEMPTY, but only applied to
2196  *  the start of the matched string. For anchored
2197  *  patterns this can only happen for pattern containing "\K". Since: 2.34
2198  * Since 2.14
2199  */
2200 public enum GRegexMatchFlags
2201 {
2202 	ANCHORED = 1 << 4,
2203 	NOTBOL = 1 << 7,
2204 	NOTEOL = 1 << 8,
2205 	NOTEMPTY = 1 << 10,
2206 	PARTIAL = 1 << 15,
2207 	NEWLINE_CR = 1 << 20,
2208 	NEWLINE_LF = 1 << 21,
2209 	NEWLINE_CRLF = NEWLINE_CR | NEWLINE_LF,
2210 	NEWLINE_ANY = 1 << 22,
2211 	NEWLINE_ANYCRLF = NEWLINE_CR | NEWLINE_ANY,
2212 	BSR_ANYCRLF = 1 << 23,
2213 	BSR_ANY = 1 << 24,
2214 	PARTIAL_SOFT = PARTIAL,
2215 	PARTIAL_HARD = 1 << 27,
2216 	NOTEMPTY_ATSTART = 1 << 28
2217 }
2218 alias GRegexMatchFlags RegexMatchFlags;
2219 
2220 /**
2221  * Error codes returned by markup parsing.
2222  * G_MARKUP_ERROR_BAD_UTF8
2223  * text being parsed was not valid UTF-8
2224  * G_MARKUP_ERROR_EMPTY
2225  * document contained nothing, or only whitespace
2226  * G_MARKUP_ERROR_PARSE
2227  * document was ill-formed
2228  * G_MARKUP_ERROR_UNKNOWN_ELEMENT
2229  * error should be set by GMarkupParser
2230  *  functions; element wasn't known
2231  * G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE
2232  * error should be set by GMarkupParser
2233  *  functions; attribute wasn't known
2234  * G_MARKUP_ERROR_INVALID_CONTENT
2235  * error should be set by GMarkupParser
2236  *  functions; content was invalid
2237  * G_MARKUP_ERROR_MISSING_ATTRIBUTE
2238  * error should be set by GMarkupParser
2239  *  functions; a required attribute was missing
2240  */
2241 public enum GMarkupError
2242 {
2243 	BAD_UTF8,
2244 	EMPTY,
2245 	PARSE,
2246 	/+* The following are primarily intended for specific GMarkupParser
2247 	 * implementations to set.
2248 	+/
2249 	UNKNOWN_ELEMENT,
2250 	UNKNOWN_ATTRIBUTE,
2251 	INVALID_CONTENT,
2252 	MISSING_ATTRIBUTE
2253 }
2254 alias GMarkupError MarkupError;
2255 
2256 /**
2257  * Flags that affect the behaviour of the parser.
2258  * G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG
2259  * flag you should not use
2260  * G_MARKUP_TREAT_CDATA_AS_TEXT
2261  * When this flag is set, CDATA marked
2262  *  sections are not passed literally to the passthrough function of
2263  *  the parser. Instead, the content of the section (without the
2264  *  <![CDATA[ and ]]>) is
2265  *  passed to the text function. This flag was added in GLib 2.12
2266  * G_MARKUP_PREFIX_ERROR_POSITION
2267  * Normally errors caught by GMarkup
2268  *  itself have line/column information prefixed to them to let the
2269  *  caller know the location of the error. When this flag is set the
2270  *  location information is also prefixed to errors generated by the
2271  *  GMarkupParser implementation functions
2272  */
2273 public enum GMarkupParseFlags
2274 {
2275 	DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0,
2276 	TREAT_CDATA_AS_TEXT = 1 << 1,
2277 	PREFIX_ERROR_POSITION = 1 << 2
2278 }
2279 alias GMarkupParseFlags MarkupParseFlags;
2280 
2281 /**
2282  * A mixed enumerated type and flags field. You must specify one type
2283  * (string, strdup, boolean, tristate). Additionally, you may optionally
2284  * bitwise OR the type with the flag G_MARKUP_COLLECT_OPTIONAL.
2285  * It is likely that this enum will be extended in the future to
2286  * support other types.
2287  * G_MARKUP_COLLECT_INVALID
2288  * used to terminate the list of attributes
2289  *  to collect
2290  * G_MARKUP_COLLECT_STRING
2291  * collect the string pointer directly from
2292  *  the attribute_values[] array. Expects a parameter of type (const
2293  *  char **). If G_MARKUP_COLLECT_OPTIONAL is specified and the
2294  *  attribute isn't present then the pointer will be set to NULL
2295  * G_MARKUP_COLLECT_STRDUP
2296  * as with G_MARKUP_COLLECT_STRING, but
2297  *  expects a parameter of type (char **) and g_strdup()s the
2298  *  returned pointer. The pointer must be freed with g_free()
2299  * G_MARKUP_COLLECT_BOOLEAN
2300  * expects a parameter of type (gboolean *)
2301  *  and parses the attribute value as a boolean. Sets FALSE if the
2302  *  attribute isn't present. Valid boolean values consist of
2303  *  (case-insensitive) "false", "f", "no", "n", "0" and "true", "t",
2304  *  "yes", "y", "1"
2305  * G_MARKUP_COLLECT_TRISTATE
2306  * as with G_MARKUP_COLLECT_BOOLEAN, but
2307  *  in the case of a missing attribute a value is set that compares
2308  *  equal to neither FALSE nor TRUE G_MARKUP_COLLECT_OPTIONAL is
2309  *  implied
2310  * G_MARKUP_COLLECT_OPTIONAL
2311  * can be bitwise ORed with the other fields.
2312  *  If present, allows the attribute not to appear. A default value
2313  *  is set depending on what value type is used
2314  */
2315 public enum GMarkupCollectType
2316 {
2317 	INVALID,
2318 	STRING,
2319 	STRDUP,
2320 	BOOLEAN,
2321 	TRISTATE,
2322 	OPTIONAL = (1 << 16)
2323 }
2324 alias GMarkupCollectType MarkupCollectType;
2325 
2326 /**
2327  * Error codes returned by key file parsing.
2328  * G_KEY_FILE_ERROR_UNKNOWN_ENCODING
2329  * the text being parsed was in
2330  *  an unknown encoding
2331  * G_KEY_FILE_ERROR_PARSE
2332  * document was ill-formed
2333  * G_KEY_FILE_ERROR_NOT_FOUND
2334  * the file was not found
2335  * G_KEY_FILE_ERROR_KEY_NOT_FOUND
2336  * a requested key was not found
2337  * G_KEY_FILE_ERROR_GROUP_NOT_FOUND
2338  * a requested group was not found
2339  * G_KEY_FILE_ERROR_INVALID_VALUE
2340  * a value could not be parsed
2341  */
2342 public enum GKeyFileError
2343 {
2344 	UNKNOWN_ENCODING,
2345 	PARSE,
2346 	NOT_FOUND,
2347 	KEY_NOT_FOUND,
2348 	GROUP_NOT_FOUND,
2349 	INVALID_VALUE
2350 }
2351 alias GKeyFileError KeyFileError;
2352 
2353 /**
2354  * Flags which influence the parsing.
2355  * G_KEY_FILE_NONE
2356  * No flags, default behaviour
2357  * G_KEY_FILE_KEEP_COMMENTS
2358  * Use this flag if you plan to write the
2359  *  (possibly modified) contents of the key file back to a file;
2360  *  otherwise all comments will be lost when the key file is
2361  *  written back.
2362  * G_KEY_FILE_KEEP_TRANSLATIONS
2363  * Use this flag if you plan to write the
2364  *  (possibly modified) contents of the key file back to a file;
2365  *  otherwise only the translations for the current language will be
2366  *  written back.
2367  */
2368 public enum GKeyFileFlags
2369 {
2370 	NONE = 0,
2371 	KEEP_COMMENTS = 1 << 0,
2372 	KEEP_TRANSLATIONS = 1 << 1
2373 }
2374 alias GKeyFileFlags KeyFileFlags;
2375 
2376 /**
2377  * Error codes returned by bookmark file parsing.
2378  * G_BOOKMARK_FILE_ERROR_INVALID_URI
2379  * URI was ill-formed
2380  * G_BOOKMARK_FILE_ERROR_INVALID_VALUE
2381  * a requested field was not found
2382  * G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED
2383  * a requested application did
2384  *  not register a bookmark
2385  * G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
2386  * a requested URI was not found
2387  * G_BOOKMARK_FILE_ERROR_READ
2388  * document was ill formed
2389  * G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING
2390  * the text being parsed was
2391  *  in an unknown encoding
2392  * G_BOOKMARK_FILE_ERROR_WRITE
2393  * an error occurred while writing
2394  * G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND
2395  * requested file was not found
2396  */
2397 public enum GBookmarkFileError
2398 {
2399 	INVALID_URI,
2400 	INVALID_VALUE,
2401 	APP_NOT_REGISTERED,
2402 	URI_NOT_FOUND,
2403 	READ,
2404 	UNKNOWN_ENCODING,
2405 	WRITE,
2406 	FILE_NOT_FOUND
2407 }
2408 alias GBookmarkFileError BookmarkFileError;
2409 
2410 /**
2411  * Specifies the type of traveral performed by g_tree_traverse(),
2412  * g_node_traverse() and g_node_find().
2413  * G_IN_ORDER
2414  * vists a node's left child first, then the node itself,
2415  *  then its right child. This is the one to use if you
2416  *  want the output sorted according to the compare
2417  *  function.
2418  * G_PRE_ORDER
2419  * visits a node, then its children.
2420  * G_POST_ORDER
2421  * visits the node's children, then the node itself.
2422  * G_LEVEL_ORDER
2423  * is not implemented for Balanced Binary
2424  *  Trees. For N-ary Trees, it
2425  *  vists the root node first, then its children, then
2426  *  its grandchildren, and so on. Note that this is less
2427  *  efficient than the other orders.
2428  */
2429 public enum GTraverseType
2430 {
2431 	IN_ORDER,
2432 	PRE_ORDER,
2433 	POST_ORDER,
2434 	LEVEL_ORDER
2435 }
2436 alias GTraverseType TraverseType;
2437 
2438 /**
2439  * Specifies which nodes are visited during several of the tree
2440  * functions, including g_node_traverse() and g_node_find().
2441  * G_TRAVERSE_LEAVES
2442  * only leaf nodes should be visited. This name has
2443  *  been introduced in 2.6, for older version use
2444  *  G_TRAVERSE_LEAFS.
2445  * G_TRAVERSE_NON_LEAVES
2446  * only non-leaf nodes should be visited. This
2447  *  name has been introduced in 2.6, for older
2448  *  version use G_TRAVERSE_NON_LEAFS.
2449  * G_TRAVERSE_ALL
2450  * all nodes should be visited.
2451  * G_TRAVERSE_MASK
2452  * a mask of all traverse flags.
2453  * G_TRAVERSE_LEAFS
2454  * identical to G_TRAVERSE_LEAVES.
2455  * G_TRAVERSE_NON_LEAFS
2456  * identical to G_TRAVERSE_NON_LEAVES.
2457  */
2458 public enum GTraverseFlags
2459 {
2460 	LEAVES = 1 << 0,
2461 	NON_LEAVES = 1 << 1,
2462 	ALL = LEAVES | NON_LEAVES,
2463 	MASK = 0x03,
2464 	LEAFS = LEAVES,
2465 	NON_LEAFS = NON_LEAVES
2466 }
2467 alias GTraverseFlags TraverseFlags;
2468 
2469 /**
2470  * The range of possible top-level types of GVariant instances.
2471  * G_VARIANT_CLASS_BOOLEAN
2472  * The GVariant is a boolean.
2473  * G_VARIANT_CLASS_BYTE
2474  * The GVariant is a byte.
2475  * G_VARIANT_CLASS_INT16
2476  * The GVariant is a signed 16 bit integer.
2477  * G_VARIANT_CLASS_UINT16
2478  * The GVariant is an unsigned 16 bit integer.
2479  * G_VARIANT_CLASS_INT32
2480  * The GVariant is a signed 32 bit integer.
2481  * G_VARIANT_CLASS_UINT32
2482  * The GVariant is an unsigned 32 bit integer.
2483  * G_VARIANT_CLASS_INT64
2484  * The GVariant is a signed 64 bit integer.
2485  * G_VARIANT_CLASS_UINT64
2486  * The GVariant is an unsigned 64 bit integer.
2487  * G_VARIANT_CLASS_HANDLE
2488  * The GVariant is a file handle index.
2489  * G_VARIANT_CLASS_DOUBLE
2490  * The GVariant is a double precision floating
2491  *  point value.
2492  * G_VARIANT_CLASS_STRING
2493  * The GVariant is a normal string.
2494  * G_VARIANT_CLASS_OBJECT_PATH
2495  * The GVariant is a D-Bus object path
2496  *  string.
2497  * G_VARIANT_CLASS_SIGNATURE
2498  * The GVariant is a D-Bus signature string.
2499  * G_VARIANT_CLASS_VARIANT
2500  * The GVariant is a variant.
2501  * G_VARIANT_CLASS_MAYBE
2502  * The GVariant is a maybe-typed value.
2503  * G_VARIANT_CLASS_ARRAY
2504  * The GVariant is an array.
2505  * G_VARIANT_CLASS_TUPLE
2506  * The GVariant is a tuple.
2507  * G_VARIANT_CLASS_DICT_ENTRY
2508  * The GVariant is a dictionary entry.
2509  * Since 2.24
2510  */
2511 public enum GVariantClass
2512 {
2513 	BOOLEAN = 'b',
2514 	BYTE = 'y',
2515 	INT16 = 'n',
2516 	UINT16 = 'q',
2517 	INT32 = 'i',
2518 	UINT32 = 'u',
2519 	INT64 = 'x',
2520 	UINT64 = 't',
2521 	HANDLE = 'h',
2522 	DOUBLE = 'd',
2523 	STRING = 's',
2524 	OBJECT_PATH = 'o',
2525 	SIGNATURE = 'g',
2526 	VARIANT = 'v',
2527 	MAYBE = 'm',
2528 	ARRAY = 'a',
2529 	TUPLE = '(',
2530 	DICT_ENTRY = '{'
2531 }
2532 alias GVariantClass VariantClass;
2533 
2534 /**
2535  * Error codes returned by parsing text-format GVariants.
2536  * G_VARIANT_PARSE_ERROR_FAILED
2537  * generic error (unused)
2538  * G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED
2539  * a non-basic GVariantType was given where a basic type was expected
2540  * G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE
2541  * cannot infer the GVariantType
2542  * G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED
2543  * an indefinite GVariantType was given where a definite type was expected
2544  * G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END
2545  * extra data after parsing finished
2546  * G_VARIANT_PARSE_ERROR_INVALID_CHARACTER
2547  * invalid character in number or unicode escape
2548  * G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING
2549  * not a valid GVariant format string
2550  * G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH
2551  * not a valid object path
2552  * G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE
2553  * not a valid type signature
2554  * G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING
2555  * not a valid GVariant type string
2556  * G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE
2557  * could not find a common type for array entries
2558  * G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE
2559  * the numerical value is out of range of the given type
2560  * G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG
2561  * the numerical value is out of range for any type
2562  * G_VARIANT_PARSE_ERROR_TYPE_ERROR
2563  * cannot parse as variant of the specified type
2564  * G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN
2565  * an unexpected token was encountered
2566  * G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD
2567  * an unknown keyword was encountered
2568  * G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT
2569  * unterminated string constant
2570  * G_VARIANT_PARSE_ERROR_VALUE_EXPECTED
2571  * no value given
2572  */
2573 public enum GVariantParseError
2574 {
2575 	FAILED,
2576 	BASIC_TYPE_EXPECTED,
2577 	CANNOT_INFER_TYPE,
2578 	DEFINITE_TYPE_EXPECTED,
2579 	INPUT_NOT_AT_END,
2580 	INVALID_CHARACTER,
2581 	INVALID_FORMAT_STRING,
2582 	INVALID_OBJECT_PATH,
2583 	INVALID_SIGNATURE,
2584 	INVALID_TYPE_STRING,
2585 	NO_COMMON_TYPE,
2586 	NUMBER_OUT_OF_RANGE,
2587 	NUMBER_TOO_BIG,
2588 	TYPE_ERROR,
2589 	UNEXPECTED_TOKEN,
2590 	UNKNOWN_KEYWORD,
2591 	UNTERMINATED_STRING_CONSTANT,
2592 	VALUE_EXPECTED
2593 }
2594 alias GVariantParseError VariantParseError;
2595 
2596 public struct GSocketControlMessageClass{}
2597 public struct GInetSocketAddressClass{}
2598 
2599 /**
2600  * Main Gtk struct.
2601  * The GMainLoop struct is an opaque data type
2602  * representing the main event loop of a GLib or GTK+ application.
2603  */
2604 public struct GMainLoop{}
2605 
2606 
2607 /**
2608  * The GMainContext struct is an opaque data
2609  * type representing a set of sources to be handled in a main loop.
2610  */
2611 public struct GMainContext{}
2612 
2613 
2614 /**
2615  * Represents a file descriptor, which events to poll for, and which events
2616  * occurred.
2617  * gint64 fd;
2618  * the file descriptor to poll (or a HANDLE on Win32)
2619  * gint fd;
2620  * gushort events;
2621  * a bitwise combination from GIOCondition, specifying which
2622  * events should be polled for. Typically for reading from a file
2623  * descriptor you would use G_IO_IN | G_IO_HUP | G_IO_ERR, and
2624  * for writing you would use G_IO_OUT | G_IO_ERR.
2625  * gushort revents;
2626  * a bitwise combination of flags from GIOCondition, returned
2627  * from the poll() function to indicate which events occurred.
2628  */
2629 public struct GPollFD
2630 {
2631 	version(Win64)
2632 	{
2633 		long fd;
2634 	}
2635 	else
2636 	{
2637 		int fd;
2638 	}
2639 	ushort events;
2640 	ushort revents;
2641 }
2642 
2643 
2644 /**
2645  * The GSource struct is an opaque data type
2646  * representing an event source.
2647  */
2648 public struct GSource{}
2649 
2650 
2651 /**
2652  * The GSourceFuncs struct contains a table of
2653  * functions used to handle event sources in a generic manner.
2654  * For idle sources, the prepare and check functions always return TRUE
2655  * to indicate that the source is always ready to be processed. The prepare
2656  * function also returns a timeout value of 0 to ensure that the poll() call
2657  * doesn't block (since that would be time wasted which could have been spent
2658  * running the idle function).
2659  * For timeout sources, the prepare and check functions both return TRUE
2660  * if the timeout interval has expired. The prepare function also returns
2661  * a timeout value to ensure that the poll() call doesn't block too long
2662  * and miss the next timeout.
2663  * For file descriptor sources, the prepare function typically returns FALSE,
2664  * since it must wait until poll() has been called before it knows whether
2665  * any events need to be processed. It sets the returned timeout to -1 to
2666  * indicate that it doesn't mind how long the poll() call blocks. In the
2667  * check function, it tests the results of the poll() call to see if the
2668  * required condition has been met, and returns TRUE if so.
2669  * prepare ()
2670  * Called before all the file descriptors are polled. If the
2671  * source can determine that it is ready here (without waiting for the
2672  * results of the poll() call) it should return TRUE. It can also return
2673  * a timeout_ value which should be the maximum timeout (in milliseconds)
2674  * which should be passed to the poll() call. The actual timeout used will
2675  * be -1 if all sources returned -1, or it will be the minimum of all
2676  * the timeout_ values returned which were >= 0. Since 2.36 this may
2677  * be NULL, in which case the effect is as if the function always returns
2678  * FALSE with a timeout of -1. If prepare returns a
2679  * timeout and the source also has a 'ready time' set then the
2680  * nearer of the two will be used.
2681  * check ()
2682  * Called after all the file descriptors are polled. The source
2683  * should return TRUE if it is ready to be dispatched. Note that some
2684  * time may have passed since the previous prepare function was called,
2685  * so the source should be checked again here. Since 2.36 this may
2686  * be NULL, in which case the effect is as if the function always returns
2687  * FALSE.
2688  * dispatch ()
2689  * Called to dispatch the event source, after it has returned
2690  * TRUE in either its prepare or its check function. The dispatch
2691  * function is passed in a callback function and data. The callback
2692  * function may be NULL if the source was never connected to a callback
2693  * using g_source_set_callback(). The dispatch function should call the
2694  * callback function with user_data and whatever additional parameters
2695  * are needed for this type of event source.
2696  * finalize ()
2697  * Called when the source is finalized.
2698  */
2699 public struct GSourceFuncs
2700 {
2701 	extern(C) int function(GSource* source, int* timeout) prepare;
2702 	extern(C) int function(GSource* source) check;
2703 	extern(C) int function(GSource* source, GSourceFunc callback, void* userData) dispatch;
2704 	extern(C) void function(GSource* source) finalize; /+* Can be NULL +/
2705 }
2706 
2707 
2708 /**
2709  * The GSourceCallbackFuncs struct contains
2710  * functions for managing callback objects.
2711  * ref ()
2712  * Called when a reference is added to the callback object
2713  * unref ()
2714  * Called when a reference to the callback object is dropped
2715  * get ()
2716  * Called to extract the callback function and data from the
2717  * callback object.
2718  */
2719 public struct GSourceCallbackFuncs
2720 {
2721 	extern(C) void function(void* cbData) doref;
2722 	extern(C) void function(void* cbData) unref;
2723 	extern(C) void function(void* cbData, GSource* source, GSourceFunc* func, void** data) get;
2724 }
2725 
2726 
2727 /**
2728  * Main Gtk struct.
2729  * The GThreadPool struct represents a thread pool. It has three
2730  * public read-only members, but the underlying struct is bigger,
2731  * so you must not copy this struct.
2732  * GFunc func;
2733  * the function to execute in the threads of this pool
2734  * gpointer user_data;
2735  * the user data for the threads of this pool
2736  * gboolean exclusive;
2737  * are all threads exclusive to this pool
2738  */
2739 public struct GThreadPool
2740 {
2741 	GFunc func;
2742 	void* userData;
2743 	int exclusive;
2744 }
2745 
2746 
2747 /**
2748  * Main Gtk struct.
2749  * The GAsyncQueue struct is an opaque data structure which represents
2750  * an asynchronous queue. It should only be accessed through the
2751  * g_async_queue_* functions.
2752  */
2753 public struct GAsyncQueue{}
2754 
2755 
2756 /**
2757  * Main Gtk struct.
2758  * The GModule struct is an opaque data structure to represent a
2759  * Dynamically-Loaded
2760  * Module. It should only be accessed via the following functions.
2761  */
2762 public struct GModule{}
2763 
2764 
2765 /**
2766  * A set of functions used to perform memory allocation. The same GMemVTable must
2767  * be used for all allocations in the same program; a call to g_mem_set_vtable(),
2768  * if it exists, should be prior to any use of GLib.
2769  * malloc ()
2770  * function to use for allocating memory.
2771  * realloc ()
2772  * function to use for reallocating memory.
2773  * free ()
2774  * function to use to free memory.
2775  * calloc ()
2776  * function to use for allocating zero-filled memory.
2777  * try_malloc ()
2778  * function to use for allocating memory without a default error handler.
2779  * try_realloc ()
2780  * function to use for reallocating memory without a default error handler.
2781  */
2782 public struct GMemVTable
2783 {
2784 	extern(C) void* function(gsize nBytes) malloc;
2785 	extern(C) void* function(void* mem, gsize nBytes) realloc;
2786 	extern(C) void function(void* mem) free;
2787 	/+* optional; set to NULL if not used ! +/
2788 	extern(C) void* function(gsize nBlocks, gsize nBlockBytes) calloc;
2789 	extern(C) void* function(gsize nBytes) tryMalloc;
2790 	extern(C) void* function(void* mem, gsize nBytes) tryRealloc;
2791 }
2792 
2793 
2794 /**
2795  * Main Gtk struct.
2796  * A data structure representing an IO Channel. The fields should be
2797  * considered private and should only be accessed with the following
2798  * functions.
2799  */
2800 public struct GIOChannel{}
2801 
2802 
2803 /**
2804  * A table of functions used to handle different types of GIOChannel
2805  * in a generic way.
2806  * io_read ()
2807  * reads raw bytes from the channel. This is called from
2808  * various functions such as g_io_channel_read_chars() to
2809  * read raw bytes from the channel. Encoding and buffering
2810  * issues are dealt with at a higher level.
2811  * io_write ()
2812  * writes raw bytes to the channel. This is called from
2813  * various functions such as g_io_channel_write_chars() to
2814  * write raw bytes to the channel. Encoding and buffering
2815  * issues are dealt with at a higher level.
2816  * io_seek ()
2817  * (optional) seeks the channel. This is called from
2818  * g_io_channel_seek() on channels that support it.
2819  * io_close ()
2820  * closes the channel. This is called from
2821  * g_io_channel_close() after flushing the buffers.
2822  * io_create_watch ()
2823  * creates a watch on the channel. This call
2824  * corresponds directly to g_io_create_watch().
2825  * io_free ()
2826  * called from g_io_channel_unref() when the channel needs to
2827  * be freed. This function must free the memory associated
2828  * with the channel, including freeing the GIOChannel
2829  * structure itself. The channel buffers have been flushed
2830  * and possibly io_close has been called by the time this
2831  * function is called.
2832  * io_set_flags ()
2833  * sets the GIOFlags on the channel. This is called
2834  * from g_io_channel_set_flags() with all flags except
2835  * for G_IO_FLAG_APPEND and G_IO_FLAG_NONBLOCK masked
2836  * out.
2837  * io_get_flags ()
2838  * gets the GIOFlags for the channel. This function
2839  * need only return the G_IO_FLAG_APPEND and
2840  * G_IO_FLAG_NONBLOCK flags; g_io_channel_get_flags()
2841  * automatically adds the others as appropriate.
2842  */
2843 public struct GIOFuncs
2844 {
2845 	extern(C) GIOStatus function(GIOChannel* channel, char* buf, gsize count, gsize* bytesRead, GError** err) ioRead;
2846 	extern(C) GIOStatus function(GIOChannel* channel, char* buf, gsize count, gsize* bytesWritten, GError** err) ioWrite;
2847 	extern(C) GIOStatus function(GIOChannel* channel, long offset, GSeekType type, GError** err) ioSeek;
2848 	extern(C) GIOStatus function(GIOChannel* channel, GError** err) ioClose;
2849 	extern(C) GSource* function(GIOChannel* channel, GIOCondition condition) ioCreateWatch;
2850 	extern(C) void function(GIOChannel* channel) ioFree;
2851 	extern(C) GIOStatus function(GIOChannel* channel, GIOFlags flags, GError** err) ioSetFlags;
2852 	extern(C) GIOFlags function(GIOChannel* channel) ioGetFlags;
2853 }
2854 
2855 
2856 /**
2857  * Main Gtk struct.
2858  * The GError structure contains
2859  * information about an error that has occurred.
2860  * GQuark domain;
2861  * error domain, e.g. G_FILE_ERROR
2862  * gint code;
2863  * error code, e.g. G_FILE_ERROR_NOENT
2864  * gchar *message;
2865  * human-readable informative error message
2866  */
2867 public struct GError
2868 {
2869 	GQuark domain;
2870 	int code;
2871 	char *message;
2872 }
2873 
2874 
2875 public struct GIConv{}
2876 
2877 
2878 /**
2879  * Main Gtk struct.
2880  * An opaque structure representing a checksumming operation.
2881  * To create a new GChecksum, use g_checksum_new(). To free
2882  * a GChecksum, use g_checksum_free().
2883  * Since 2.16
2884  */
2885 public struct GChecksum{}
2886 
2887 
2888 /**
2889  * Main Gtk struct.
2890  * An opaque structure representing a HMAC operation.
2891  * To create a new GHmac, use g_hmac_new(). To free
2892  * a GHmac, use g_hmac_unref().
2893  * Since 2.30
2894  */
2895 public struct GHmac{}
2896 
2897 
2898 /**
2899  * Represents a precise time, with seconds and microseconds.
2900  * Similar to the struct timeval returned by
2901  * the gettimeofday() UNIX system call.
2902  * GLib is attempting to unify around the use of 64bit integers to
2903  * represent microsecond-precision time. As such, this type will be
2904  * removed from a future version of GLib.
2905  * glong tv_sec;
2906  * seconds
2907  * glong tv_usec;
2908  * microseconds
2909  */
2910 public struct GTimeVal
2911 {
2912 	glong tvSec;
2913 	glong tvUsec;
2914 }
2915 
2916 
2917 /**
2918  * Represents a day between January 1, Year 1 and a few thousand years in
2919  * the future. None of its members should be accessed directly. If the
2920  * GDate is obtained from g_date_new(), it will
2921  * be safe to mutate but invalid and thus not safe for calendrical
2922  * computations. If it's declared on the stack, it will contain garbage
2923  * so must be initialized with g_date_clear(). g_date_clear() makes the
2924  * date invalid but sane. An invalid date doesn't represent a day, it's
2925  * "empty." A date becomes valid after you set it to a Julian day or you
2926  * set a day, month, and year.
2927  * guint julian_days : 32;
2928  * the Julian representation of the date
2929  * guint julian : 1;
2930  * this bit is set if julian_days is valid
2931  * guint dmy : 1;
2932  * this is set if day, month and year are valid
2933  * guint day : 6;
2934  * the day of the day-month-year representation of the date,
2935  * as a number between 1 and 31
2936  * guint month : 4;
2937  * the day of the day-month-year representation of the date,
2938  * as a number between 1 and 12
2939  * guint year : 16;
2940  * the day of the day-month-year representation of the date
2941  */
2942 public struct GDate
2943 {
2944 	uint bitfield0;
2945 	//uint julianDays : 32;
2946 	/+* julian days representation - we use a
2947 	 * bitfield hoping that 64 bit platforms
2948 	 * will pack this whole struct inn one big
2949 	 * int
2950 	+/
2951 	uint bitfield1;
2952 	//uint julian : 1; /+* julian is valid +/
2953 	//uint dmy : 1; /+* dmy is valid +/
2954 	/+* DMY representation +/
2955 	//uint day : 6;
2956 	//uint month : 4;
2957 	//uint year : 16;
2958 }
2959 
2960 
2961 /**
2962  * Main Gtk struct.
2963  * GTimeZone is an opaque structure whose members cannot be accessed
2964  * directly.
2965  * Since 2.26
2966  */
2967 public struct GTimeZone{}
2968 
2969 
2970 /**
2971  * Main Gtk struct.
2972  * GDateTime is an opaque structure whose members
2973  * cannot be accessed directly.
2974  * Since 2.26
2975  */
2976 public struct GDateTime{}
2977 
2978 
2979 /**
2980  * Main Gtk struct.
2981  * The GRand struct is an opaque data structure. It should only be
2982  * accessed through the g_rand_* functions.
2983  */
2984 public struct GRand{}
2985 
2986 
2987 /**
2988  * Associates a string with a bit flag.
2989  * Used in g_parse_debug_string().
2990  * const gchar *key;
2991  * the string
2992  * guint value;
2993  * the flag
2994  */
2995 public struct GDebugKey
2996 {
2997 	char *key;
2998 	uint value;
2999 }
3000 
3001 
3002 /**
3003  * Main Gtk struct.
3004  * The data structure representing a lexical scanner.
3005  * You should set input_name after creating the scanner, since
3006  * it is used by the default message handler when displaying
3007  * warnings and errors. If you are scanning a file, the filename
3008  * would be a good choice.
3009  * The user_data and max_parse_errors fields are not used.
3010  * If you need to associate extra data with the scanner you
3011  * can place them here.
3012  * If you want to use your own message handler you can set the
3013  * msg_handler field. The type of the message handler function
3014  * is declared by GScannerMsgFunc.
3015  * gpointer user_data;
3016  * unused
3017  * guint max_parse_errors;
3018  * unused
3019  * guint parse_errors;
3020  * g_scanner_error() increments this field
3021  * const gchar *input_name;
3022  * name of input stream, featured by the default message handler
3023  * GData *qdata;
3024  * quarked data
3025  * GScannerConfig *config;
3026  * link into the scanner configuration
3027  * GTokenType token;
3028  * token parsed by the last g_scanner_get_next_token()
3029  * GTokenValue value;
3030  * value of the last token from g_scanner_get_next_token()
3031  * guint line;
3032  * line number of the last token from g_scanner_get_next_token()
3033  * guint position;
3034  * char number of the last token from g_scanner_get_next_token()
3035  * GTokenType next_token;
3036  * token parsed by the last g_scanner_peek_next_token()
3037  * GTokenValue next_value;
3038  * value of the last token from g_scanner_peek_next_token()
3039  * guint next_line;
3040  * line number of the last token from g_scanner_peek_next_token()
3041  * guint next_position;
3042  * char number of the last token from g_scanner_peek_next_token()
3043  * GScannerMsgFunc msg_handler;
3044  * handler function for _warn and _error
3045  */
3046 public struct GScanner
3047 {
3048 	/+* unused fields +/
3049 	void* userData;
3050 	uint maxParseErrors;
3051 	/+* error() increments this field +/
3052 	uint parseErrors;
3053 	/+* name of input stream, featured by the defaulx message handler +/
3054 	char *inputName;
3055 	/+* quarked data +/
3056 	GData *qdata;
3057 	/+* link into the scanner configuration +/
3058 	GScannerConfig *config;
3059 	/+* fields filled inn after getNextToken() +/
3060 	GTokenType token;
3061 	GTokenValue value;
3062 	uint line;
3063 	uint position;
3064 	/+* fields filled inn after peekNextToken() +/
3065 	GTokenType nextToken;
3066 	GTokenValue nextValue;
3067 	uint nextLine;
3068 	uint nextPosition;
3069 	/+* handler funct for _Warn and _Error +/
3070 	GScannerMsgFunc msgHandler;
3071 }
3072 
3073 
3074 /**
3075  * Specifies the GScanner parser configuration. Most settings can
3076  * be changed during the parsing phase and will affect the lexical
3077  * parsing of the next unpeeked token.
3078  * gchar *cset_skip_characters;
3079  * specifies which characters should be skipped
3080  * by the scanner (the default is the whitespace characters: space,
3081  * tab, carriage-return and line-feed).
3082  * gchar *cset_identifier_first;
3083  * specifies the characters which can start
3084  * identifiers (the default is G_CSET_a_2_z, "_", and G_CSET_A_2_Z).
3085  * gchar *cset_identifier_nth;
3086  * specifies the characters which can be used
3087  * in identifiers, after the first character (the default is
3088  * G_CSET_a_2_z, "_0123456789", G_CSET_A_2_Z, G_CSET_LATINS,
3089  * G_CSET_LATINC).
3090  * gchar *cpair_comment_single;
3091  * specifies the characters at the start and
3092  * end of single-line comments. The default is "#\n" which means
3093  * that single-line comments start with a '#' and continue until
3094  * a '\n' (end of line).
3095  * guint case_sensitive : 1;
3096  * specifies if symbols are case sensitive (the
3097  * default is FALSE).
3098  * guint skip_comment_multi : 1;
3099  * specifies if multi-line comments are skipped
3100  * and not returned as tokens (the default is TRUE).
3101  * guint skip_comment_single : 1;
3102  * specifies if single-line comments are skipped
3103  * and not returned as tokens (the default is TRUE).
3104  * guint scan_comment_multi : 1;
3105  * specifies if multi-line comments are recognized
3106  * (the default is TRUE).
3107  * guint scan_identifier : 1;
3108  * specifies if identifiers are recognized (the
3109  * default is TRUE).
3110  * guint scan_identifier_1char : 1;
3111  * specifies if single-character
3112  * identifiers are recognized (the default is FALSE).
3113  * guint scan_identifier_NULL : 1;
3114  * specifies if NULL is reported as
3115  * G_TOKEN_IDENTIFIER_NULL (the default is FALSE).
3116  * guint scan_symbols : 1;
3117  * specifies if symbols are recognized (the default
3118  * is TRUE).
3119  * guint scan_binary : 1;
3120  * specifies if binary numbers are recognized (the
3121  * default is FALSE).
3122  * guint scan_octal : 1;
3123  * specifies if octal numbers are recognized (the
3124  * default is TRUE).
3125  * guint scan_float : 1;
3126  * specifies if floating point numbers are recognized
3127  * (the default is TRUE).
3128  * guint scan_hex : 1;
3129  * specifies if hexadecimal numbers are recognized (the
3130  * default is TRUE).
3131  * guint scan_hex_dollar : 1;
3132  * specifies if '$' is recognized as a prefix for
3133  * hexadecimal numbers (the default is FALSE).
3134  * guint scan_string_sq : 1;
3135  * specifies if strings can be enclosed in single
3136  * quotes (the default is TRUE).
3137  * guint scan_string_dq : 1;
3138  * specifies if strings can be enclosed in double
3139  * quotes (the default is TRUE).
3140  * guint numbers_2_int : 1;
3141  * specifies if binary, octal and hexadecimal numbers
3142  * are reported as G_TOKEN_INT (the default is TRUE).
3143  * guint int_2_float : 1;
3144  * specifies if all numbers are reported as G_TOKEN_FLOAT
3145  * (the default is FALSE).
3146  * guint identifier_2_string : 1;
3147  * specifies if identifiers are reported as strings
3148  * (the default is FALSE).
3149  * guint char_2_token : 1;
3150  * specifies if characters are reported by setting
3151  * token = ch or as G_TOKEN_CHAR (the default
3152  * is TRUE).
3153  * guint symbol_2_token : 1;
3154  * specifies if symbols are reported by setting
3155  * token = v_symbol or as G_TOKEN_SYMBOL (the
3156  * default is FALSE).
3157  * guint scope_0_fallback : 1;
3158  * specifies if a symbol is searched for in the
3159  * default scope in addition to the current scope (the default is FALSE).
3160  * guint store_int64 : 1;
3161  * use value.v_int64 rather than v_int
3162  */
3163 public struct GScannerConfig
3164 {
3165 	/+* Character sets
3166 	+/
3167 	char *csetSkipCharacters; /+* default: " \t\n" +/
3168 	char *csetIdentifierFirst;
3169 	char *csetIdentifierNth;
3170 	char *cpairCommentSingle; /+* default: "#\n" +/
3171 	/+* Should symbol lookup work case sensitive?
3172 	+/
3173 	uint bitfield0;
3174 	//uint caseSensitive : 1;
3175 	/+* Boolean values to be adjusted "on the fly"
3176 	 * to configure scanning behaviour.
3177 	+/
3178 	//uint skipCommentMulti : 1; /+* C like comment +/
3179 	//uint skipCommentSingle : 1; /+* single line comment +/
3180 	//uint scanCommentMulti : 1; /+* scan multi line comments? +/
3181 	//uint scanIdentifier : 1;
3182 	//uint scanIdentifier1char : 1;
3183 	//uint scanIdentifierNULL : 1;
3184 	//uint scanSymbols : 1;
3185 	//uint scanBinary : 1;
3186 	//uint scanOctal : 1;
3187 	//uint scanFloat : 1;
3188 	//uint scanHex : 1; /+* '0x0ff0' +/
3189 	//uint scanHexDollar : 1; /+* '$0ff0' +/
3190 	//uint scanStringSq : 1; /+* string: 'anything' +/
3191 	//uint scanStringDq : 1; /+* string: "\\-escapes!\n" +/
3192 	//uint numbers2_Int : 1; /+* bin, octal, hex => int +/
3193 	//uint int2_Float : 1; /+* int => G_TOKEN_FLOAT? +/
3194 	//uint identifier2_String : 1;
3195 	//uint char2_Token : 1; /+* return G_TOKEN_CHAR? +/
3196 	//uint symbol2_Token : 1;
3197 	//uint scope0_Fallback : 1; /+* try scop 0 on lookups? +/
3198 	//uint storeInt64 : 1; /+* use value.vInt64 rather than vInt +/
3199 }
3200 
3201 
3202 /**
3203  * Main Gtk struct.
3204  * Opaque datatype that records a start time.
3205  */
3206 public struct GTimer{}
3207 
3208 
3209 /**
3210  * An opaque structure representing an opened directory.
3211  */
3212 public struct GDir{}
3213 
3214 
3215 /**
3216  * The GMappedFile represents a file mapping created with
3217  * g_mapped_file_new(). It has only private members and should
3218  * not be accessed directly.
3219  */
3220 public struct GMappedFile{}
3221 
3222 
3223 /**
3224  * A type corresponding to the appropriate struct type for the stat
3225  * system call, depending on the platform and/or compiler being used.
3226  * See g_stat() for more information.
3227  */
3228 public struct GStatBuf{}
3229 
3230 
3231 /**
3232  * Main Gtk struct.
3233  * A GOptionContext struct defines which options
3234  * are accepted by the commandline option parser. The struct has only private
3235  * fields and should not be directly accessed.
3236  */
3237 public struct GOptionContext{}
3238 
3239 
3240 /**
3241  * A GOptionEntry defines a single option.
3242  * To have an effect, they must be added to a GOptionGroup with
3243  * g_option_context_add_main_entries() or g_option_group_add_entries().
3244  * const gchar *long_name;
3245  * The long name of an option can be used to specify it
3246  * in a commandline as --long_name. Every
3247  * option must have a long name. To resolve conflicts if multiple
3248  * option groups contain the same long name, it is also possible to
3249  * specify the option as
3250  * --groupname-long_name.
3251  * gchar short_name;
3252  * If an option has a short name, it can be specified
3253  * -short_name in a commandline. short_name must be
3254  * a printable ASCII character different from '-', or zero if the option has no
3255  * short name.
3256  * gint flags;
3257  * Flags from GOptionFlags.
3258  * GOptionArg arg;
3259  * The type of the option, as a GOptionArg.
3260  * gpointer arg_data;
3261  * If the arg type is G_OPTION_ARG_CALLBACK, then arg_data must
3262  * point to a GOptionArgFunc callback function, which will be called to handle
3263  * the extra argument. Otherwise, arg_data is a pointer to a location to store
3264  * the value, the required type of the location depends on the arg type:
3265  * G_OPTION_ARG_NONE
3266  * gboolean
3267  * G_OPTION_ARG_STRING
3268  * gchar*
3269  * G_OPTION_ARG_INT
3270  * gint
3271  * G_OPTION_ARG_FILENAME
3272  * gchar*
3273  * G_OPTION_ARG_STRING_ARRAY
3274  * gchar**
3275  * G_OPTION_ARG_FILENAME_ARRAY
3276  * gchar**
3277  * G_OPTION_ARG_DOUBLE
3278  * gdouble
3279  * If arg type is G_OPTION_ARG_STRING or G_OPTION_ARG_FILENAME the location
3280  * will contain a newly allocated string if the option was given. That string
3281  * needs to be freed by the callee using g_free(). Likewise if arg type is
3282  * G_OPTION_ARG_STRING_ARRAY or G_OPTION_ARG_FILENAME_ARRAY, the data should
3283  * be freed using g_strfreev().
3284  * const gchar *description;
3285  * the description for the option in --help
3286  * output. The description is translated using the translate_func of the
3287  * group, see g_option_group_set_translation_domain().
3288  * const gchar *arg_description;
3289  * The placeholder to use for the extra argument parsed
3290  * by the option in --help
3291  * output. The arg_description is translated using the translate_func of the
3292  * group, see g_option_group_set_translation_domain().
3293  */
3294 public struct GOptionEntry
3295 {
3296 	char *longName;
3297 	char shortName;
3298 	int flags;
3299 	GOptionArg arg;
3300 	void* argData;
3301 	char *description;
3302 	char *argDescription;
3303 }
3304 
3305 
3306 /**
3307  * A GOptionGroup struct defines the options in a single
3308  * group. The struct has only private fields and should not be directly accessed.
3309  * All options in a group share the same translation function. Libraries which
3310  * need to parse commandline options are expected to provide a function for
3311  * getting a GOptionGroup holding their options, which
3312  * the application can then add to its GOptionContext.
3313  */
3314 public struct GOptionGroup{}
3315 
3316 
3317 /**
3318  * Main Gtk struct.
3319  * A GPatternSpec is the 'compiled' form of a
3320  * pattern. This structure is opaque and its fields cannot be accessed
3321  * directly.
3322  */
3323 public struct GPatternSpec{}
3324 
3325 
3326 /**
3327  * Main Gtk struct.
3328  * A GRegex is the "compiled" form of a regular expression pattern. This
3329  * structure is opaque and its fields cannot be accessed directly.
3330  * Since 2.14
3331  */
3332 public struct GRegex{}
3333 
3334 
3335 public struct GMatchInfo{}
3336 
3337 
3338 /**
3339  * Main Gtk struct.
3340  * A parse context is used to parse a stream of bytes that
3341  * you expect to contain marked-up text.
3342  * See g_markup_parse_context_new(), GMarkupParser, and so
3343  * on for more details.
3344  */
3345 public struct GMarkupParseContext{}
3346 
3347 
3348 /**
3349  * Any of the fields in GMarkupParser can be NULL, in which case they
3350  * will be ignored. Except for the error function, any of these callbacks
3351  * can set an error; in particular the G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3352  * G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and G_MARKUP_ERROR_INVALID_CONTENT
3353  * errors are intended to be set from these callbacks. If you set an error
3354  * from a callback, g_markup_parse_context_parse() will report that error
3355  * back to its caller.
3356  * start_element ()
3357  * Callback to invoke when the opening tag of an element
3358  * is seen.
3359  * end_element ()
3360  * Callback to invoke when the closing tag of an element
3361  * is seen. Note that this is also called for empty tags like
3362  * <empty/>.
3363  * text ()
3364  * Callback to invoke when some text is seen (text is always
3365  * inside an element). Note that the text of an element may be spread
3366  * over multiple calls of this function. If the
3367  * G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also
3368  * called for the content of CDATA marked sections.
3369  * passthrough ()
3370  * Callback to invoke for comments, processing instructions
3371  * and doctype declarations; if you're re-writing the parsed document,
3372  * write the passthrough text back out in the same position. If the
3373  * G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also
3374  * called for CDATA marked sections.
3375  * error ()
3376  * Callback to invoke when an error occurs.
3377  */
3378 public struct GMarkupParser
3379 {
3380 	/+* Called for open tags <foo bar="baz"> +/
3381 	extern(C) void function(GMarkupParseContext* context, char* elementName, char** attributeNames, char** attributeValues, void* userData, GError** error) startElement;
3382 	/+* Called for close tags </foo> +/
3383 	extern(C) void function(GMarkupParseContext* context, char* elementName, void* userData, GError** error) endElement;
3384 	/+* Called for character data +/
3385 	/+* text is not nul-terminated +/
3386 	extern(C) void function(GMarkupParseContext* context, char* text, gsize textLen, void* userData, GError** error) text;
3387 	/+* Called for strings that should be re-saved verbatim inn this same
3388 	 * position, but are not otherwise interpretable. At the moment
3389 	 * this includes comments and processing instructions.
3390 	+/
3391 	/+* text is not nul-terminated. +/
3392 	extern(C) void function(GMarkupParseContext* context, char* passthroughText, gsize textLen, void* userData, GError** error) passthrough;
3393 	/+* Called on error, including one set by other
3394 	 * methods inn the vtable. The GError should not be freed.
3395 	+/
3396 	extern(C) void function(GMarkupParseContext* context, GError* error, void* userData) error;
3397 }
3398 
3399 
3400 /**
3401  * Main Gtk struct.
3402  * The GKeyFile struct contains only private data
3403  * and should not be accessed directly.
3404  */
3405 public struct GKeyFile{}
3406 
3407 
3408 /**
3409  * Main Gtk struct.
3410  * The GBookmarkFile struct contains only
3411  * private data and should not be directly accessed.
3412  */
3413 public struct GBookmarkFile{}
3414 
3415 
3416 /**
3417  * Main Gtk struct.
3418  * The GList struct is used for each element in a doubly-linked list.
3419  * gpointer data;
3420  * holds the element's data, which can be a pointer to any kind
3421  * of data, or any integer value using the Type Conversion
3422  * Macros.
3423  * GList *next;
3424  * contains the link to the next element in the list.
3425  * GList *prev;
3426  * contains the link to the previous element in the list.
3427  */
3428 public struct GList
3429 {
3430 	void* data;
3431 	GList *next;
3432 	GList *prev;
3433 }
3434 
3435 
3436 /**
3437  * Main Gtk struct.
3438  * The GSList struct is used for each element in the singly-linked
3439  * list.
3440  * gpointer data;
3441  * holds the element's data, which can be a pointer to any kind
3442  * of data, or any integer value using the Type Conversion
3443  * Macros.
3444  * GSList *next;
3445  * contains the link to the next element in the list.
3446  */
3447 public struct GSList
3448 {
3449 	void* data;
3450 	GSList *next;
3451 }
3452 
3453 
3454 /**
3455  * Main Gtk struct.
3456  * Contains the public fields of a
3457  * Queue.
3458  * GList *head;
3459  * a pointer to the first element of the queue
3460  * GList *tail;
3461  * a pointer to the last element of the queue
3462  * guint length;
3463  * the number of elements in the queue
3464  */
3465 public struct GQueue
3466 {
3467 	GList *head;
3468 	GList *tail;
3469 	uint length;
3470 }
3471 
3472 
3473 /**
3474  * Main Gtk struct.
3475  * The GSequence struct is an opaque data type representing a
3476  * Sequence data type.
3477  */
3478 public struct GSequence{}
3479 
3480 
3481 /**
3482  * The GSequenceIter struct is an opaque data type representing an
3483  * iterator pointing into a GSequence.
3484  */
3485 public struct GSequenceIter{}
3486 
3487 
3488 /**
3489  * Main Gtk struct.
3490  * Each piece of memory that is pushed onto the stack
3491  * is cast to a GTrashStack*.
3492  * GTrashStack *next;
3493  * pointer to the previous element of the stack,
3494  * gets stored in the first sizeof (gpointer)
3495  * bytes of the element
3496  */
3497 public struct GTrashStack
3498 {
3499 	GTrashStack *next;
3500 }
3501 
3502 
3503 /**
3504  * Main Gtk struct.
3505  * The GHashTable struct is an opaque data structure to represent a
3506  * Hash Table. It should only be
3507  * accessed via the following functions.
3508  */
3509 public struct GHashTable{}
3510 
3511 
3512 /**
3513  * A GHashTableIter structure represents an iterator that can be used
3514  * to iterate over the elements of a GHashTable. GHashTableIter
3515  * structures are typically allocated on the stack and then initialized
3516  * with g_hash_table_iter_init().
3517  */
3518 public struct GHashTableIter{}
3519 
3520 
3521 /**
3522  * Main Gtk struct.
3523  * The GString struct contains the public fields of a GString.
3524  * gchar *str;
3525  * points to the character data. It may move as text is added.
3526  * The str field is null-terminated and so
3527  * can be used as an ordinary C string.
3528  * gsize len;
3529  * contains the length of the string, not including the
3530  * terminating nul byte.
3531  * gsize allocated_len;
3532  * the number of bytes that can be stored in the
3533  * string before it needs to be reallocated. May be larger than len.
3534  */
3535 public struct GString
3536 {
3537 	char *str;
3538 	gsize len;
3539 	gsize allocatedLen;
3540 }
3541 
3542 
3543 /**
3544  * Main Gtk struct.
3545  * An opaque data structure representing String Chunks.
3546  * It should only be accessed by using the following functions.
3547  */
3548 public struct GStringChunk{}
3549 
3550 
3551 /**
3552  * Main Gtk struct.
3553  * Contains the public fields of an Array.
3554  * gchar *data;
3555  * a pointer to the element data. The data may be moved as
3556  * elements are added to the GArray.
3557  * guint len;
3558  * the number of elements in the GArray not including the
3559  * possible terminating zero element.
3560  */
3561 public struct GArray
3562 {
3563 	char *data;
3564 	uint len;
3565 }
3566 
3567 
3568 /**
3569  * Main Gtk struct.
3570  * Contains the public fields of a pointer array.
3571  * gpointer *pdata;
3572  * points to the array of pointers, which may be moved when the
3573  * array grows.
3574  * guint len;
3575  * number of pointers in the array.
3576  */
3577 public struct GPtrArray
3578 {
3579 	void* *pdata;
3580 	uint len;
3581 }
3582 
3583 
3584 /**
3585  * Main Gtk struct.
3586  * The GByteArray struct allows access to the
3587  * public fields of a GByteArray.
3588  * guint8 *data;
3589  * a pointer to the element data. The data may be moved as
3590  * elements are added to the GByteArray.
3591  * guint len;
3592  * the number of elements in the GByteArray.
3593  */
3594 public struct GByteArray
3595 {
3596 	ubyte *data;
3597 	uint len;
3598 }
3599 
3600 
3601 /**
3602  * A simple refcounted data type representing an immutable byte sequence
3603  * from an unspecified origin.
3604  * The purpose of a GBytes is to keep the memory region that it holds
3605  * alive for as long as anyone holds a reference to the bytes. When
3606  * the last reference count is dropped, the memory is released. Multiple
3607  * unrelated callers can use byte data in the GBytes without coordinating
3608  * their activities, resting assured that the byte data will not change or
3609  * move while they hold a reference.
3610  * A GBytes can come from many different origins that may have
3611  * different procedures for freeing the memory region. Examples are
3612  * memory from g_malloc(), from memory slices, from a GMappedFile or
3613  * memory from other allocators.
3614  * GBytes work well as keys in GHashTable. Use g_bytes_equal() and
3615  * g_bytes_hash() as parameters to g_hash_table_new() or g_hash_table_new_full().
3616  * GBytes can also be used as keys in a GTree by passing the g_bytes_compare()
3617  * function to g_tree_new().
3618  * The data pointed to by this bytes must not be modified. For a mutable
3619  * array of bytes see GByteArray. Use g_bytes_unref_to_array() to create a
3620  * mutable array for a GBytes sequence. To create an immutable GBytes from
3621  * a mutable GByteArray, use the g_byte_array_free_to_bytes() function.
3622  * Since 2.32
3623  */
3624 public struct GBytes{}
3625 
3626 
3627 /**
3628  * Main Gtk struct.
3629  * The GTree struct is an opaque data
3630  * structure representing a Balanced Binary Tree. It
3631  * should be accessed only by using the following functions.
3632  */
3633 public struct GTree{}
3634 
3635 
3636 /**
3637  * Main Gtk struct.
3638  * The GNode struct represents one node in a
3639  * N-ary Tree. fields
3640  * gpointer data;
3641  * contains the actual data of the node.
3642  * GNode *next;
3643  * points to the node's next sibling (a sibling is another
3644  * GNode with the same parent).
3645  * GNode *prev;
3646  * points to the node's previous sibling.
3647  * GNode *parent;
3648  * points to the parent of the GNode, or is NULL if the
3649  * GNode is the root of the tree.
3650  * GNode *children;
3651  * points to the first child of the GNode. The other
3652  * children are accessed by using the next pointer of each
3653  * child.
3654  */
3655 public struct GNode
3656 {
3657 	void* data;
3658 	GNode *next;
3659 	GNode *prev;
3660 	GNode *parent;
3661 	GNode *children;
3662 }
3663 
3664 
3665 /**
3666  * Main Gtk struct.
3667  * The GData struct is an opaque data structure to represent a Keyed Data List. It should
3668  * only be accessed via the following functions.
3669  */
3670 public struct GData{}
3671 
3672 
3673 /**
3674  * Main Gtk struct.
3675  * A type in the GVariant type system.
3676  * Two types may not be compared by value; use g_variant_type_equal() or
3677  * g_variant_type_is_subtype_of(). May be copied using
3678  * g_variant_type_copy() and freed using g_variant_type_free().
3679  */
3680 public struct GVariantType{}
3681 
3682 
3683 /**
3684  * Main Gtk struct.
3685  * GVariant is an opaque data structure and can only be accessed
3686  * using the following functions.
3687  * Since 2.24
3688  */
3689 public struct GVariant{}
3690 
3691 
3692 /**
3693  * GVariantIter is an opaque data structure and can only be accessed
3694  * using the following functions.
3695  */
3696 public struct GVariantIter{}
3697 
3698 
3699 /**
3700  * A utility type for constructing container-type GVariant instances.
3701  * This is an opaque structure and may only be accessed using the
3702  * following functions.
3703  * GVariantBuilder is not threadsafe in any way. Do not attempt to
3704  * access it from more than one thread.
3705  */
3706 public struct GVariantBuilder{}
3707 
3708 
3709 /**
3710  * Main Gtk struct.
3711  * Warning
3712  * GCache has been deprecated since version 2.32 and should not be used in newly-written code. Use a GHashTable instead
3713  * The GCache struct is an opaque data structure containing
3714  * information about a GCache. It should only be accessed via the
3715  * following functions.
3716  */
3717 public struct GCache{}
3718 
3719 
3720 /**
3721  * Main Gtk struct.
3722  * The GRelation struct is an opaque data structure to represent a
3723  * Relation. It should
3724  * only be accessed via the following functions.
3725  */
3726 public struct GRelation{}
3727 
3728 
3729 /**
3730  * The GTuples struct is used to return records (or tuples) from the
3731  * GRelation by g_relation_select(). It only contains one public
3732  * member - the number of records that matched. To access the matched
3733  * records, you must use g_tuples_index().
3734  * guint len;
3735  * the number of records that matched.
3736  */
3737 public struct GTuples
3738 {
3739 	uint len;
3740 }
3741 
3742 
3743 /**
3744  * Main Gtk struct.
3745  * The data structure used for automatic completion.
3746  * GList *items;
3747  * list of target items (strings or data structures).
3748  * GCompletionFunc func;
3749  * function which is called to get the string associated with a
3750  * target item. It is NULL if the target items are strings.
3751  * gchar *prefix;
3752  * the last prefix passed to g_completion_complete() or
3753  * g_completion_complete_utf8().
3754  * GList *cache;
3755  * the list of items which begin with prefix.
3756  * GCompletionStrncmpFunc strncmp_func;
3757  * The function to use when comparing strings. Use
3758  * g_completion_set_compare() to modify this function.
3759  */
3760 public struct GCompletion
3761 {
3762 	GList* items;
3763 	GCompletionFunc func;
3764 	char* prefix;
3765 	GList* cache;
3766 	GCompletionStrncmpFunc strncmpFunc;
3767 }
3768 
3769 
3770 /*
3771  * Checks the version of the GLib library that is being compiled
3772  * against.
3773  * $(DDOC_COMMENT example)
3774  * See glib_check_version() for a runtime check.
3775  * major :
3776  * the major version to check for
3777  * minor :
3778  * the minor version to check for
3779  * micro :
3780  * the micro version to check for
3781  * Returns :
3782  * TRUE if the version of the GLib header files
3783  * is the same as or newer than the passed-in version.
3784  */
3785 // TODO
3786 // #define GLIB_CHECK_VERSION(major,minor,micro)
3787 
3788 /*
3789  * Warning
3790  * g_main_new has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_new() instead
3791  * Creates a new GMainLoop for th default main context.
3792  * is_running :
3793  * set to TRUE to indicate that the loop is running. This
3794  * is not very important since calling g_main_run() will set this
3795  * to TRUE anyway.
3796  * Returns :
3797  * a new GMainLoop
3798  */
3799 // TODO
3800 // #define g_main_new(is_running)
3801 
3802 /*
3803  * Warning
3804  * g_main_destroy has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_unref() instead
3805  * Frees the memory allocated for the GMainLoop.
3806  * loop :
3807  * a GMainLoop
3808  */
3809 // TODO
3810 // #define g_main_destroy(loop)
3811 
3812 /*
3813  * Warning
3814  * g_main_run has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_run() instead
3815  * Runs a main loop until it stops running.
3816  * loop :
3817  * a GMainLoop
3818  */
3819 // TODO
3820 // #define g_main_run(loop)
3821 
3822 /*
3823  * Warning
3824  * g_main_quit has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_quit() instead
3825  * Stops the GMainLoop.
3826  * If g_main_run() was called to run the GMainLoop, it will now return.
3827  * loop :
3828  * a GMainLoop
3829  */
3830 // TODO
3831 // #define g_main_quit(loop)
3832 
3833 /*
3834  * Warning
3835  * g_main_is_running has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_is_running() instead
3836  * Checks if the main loop is running.
3837  * loop :
3838  * a GMainLoop
3839  * Returns :
3840  * TRUE if the main loop is running
3841  */
3842 // TODO
3843 // #define g_main_is_running(loop)
3844 
3845 /*
3846  * Warning
3847  * g_main_iteration has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_context_iteration() instead.
3848  * Runs a single iteration for the default GMainContext.
3849  * may_block :
3850  * set to TRUE if it should block (i.e. wait) until an event
3851  * source becomes ready. It will return after an event source has been
3852  * processed. If set to FALSE it will return immediately if no event
3853  * source is ready to be processed.
3854  * Returns :
3855  * TRUE if more events are pending.
3856  */
3857 // TODO
3858 // #define g_main_iteration(may_block)
3859 
3860 /*
3861  * Warning
3862  * g_main_set_poll_func has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_context_set_poll_func() again
3863  * Sets the function to use for the handle polling of file descriptors
3864  * for the default main context.
3865  * func :
3866  * the function to call to poll all file descriptors
3867  */
3868 // TODO
3869 // #define g_main_set_poll_func(func)
3870 
3871 /*
3872  * Allocates n_structs elements of type struct_type.
3873  * The returned pointer is cast to a pointer to the given type.
3874  * If n_structs is 0 it returns NULL.
3875  * Care is taken to avoid overflow when calculating the size of the allocated block.
3876  * Since the returned pointer is already casted to the right type,
3877  * it is normally unnecessary to cast it explicitly, and doing
3878  * so might hide memory allocation errors.
3879  * struct_type :
3880  * the type of the elements to allocate
3881  * n_structs :
3882  * the number of elements to allocate
3883  * Returns :
3884  * a pointer to the allocated memory, cast to a pointer to struct_type
3885  */
3886 // TODO
3887 // #define g_new(struct_type, n_structs)
3888 
3889 /*
3890  * Allocates n_structs elements of type struct_type, initialized to 0's.
3891  * The returned pointer is cast to a pointer to the given type.
3892  * If n_structs is 0 it returns NULL.
3893  * Care is taken to avoid overflow when calculating the size of the allocated block.
3894  * Since the returned pointer is already casted to the right type,
3895  * it is normally unnecessary to cast it explicitly, and doing
3896  * so might hide memory allocation errors.
3897  * struct_type :
3898  * the type of the elements to allocate.
3899  * n_structs :
3900  * the number of elements to allocate.
3901  * Returns :
3902  * a pointer to the allocated memory, cast to a pointer to struct_type.
3903  */
3904 // TODO
3905 // #define g_new0(struct_type, n_structs)
3906 
3907 /*
3908  * Reallocates the memory pointed to by mem, so that it now has space for
3909  * n_structs elements of type struct_type. It returns the new address of
3910  * the memory, which may have been moved.
3911  * Care is taken to avoid overflow when calculating the size of the allocated block.
3912  * struct_type :
3913  * the type of the elements to allocate
3914  * mem :
3915  * the currently allocated memory
3916  * n_structs :
3917  * the number of elements to allocate
3918  * Returns :
3919  * a pointer to the new allocated memory, cast to a pointer to struct_type
3920  */
3921 // TODO
3922 // #define g_renew(struct_type, mem, n_structs)
3923 
3924 /*
3925  * Attempts to allocate n_structs elements of type struct_type, and returns
3926  * NULL on failure. Contrast with g_new(), which aborts the program on failure.
3927  * The returned pointer is cast to a pointer to the given type.
3928  * The function returns NULL when n_structs is 0 of if an overflow occurs.
3929  * struct_type :
3930  * the type of the elements to allocate
3931  * n_structs :
3932  * the number of elements to allocate
3933  * Returns :
3934  * a pointer to the allocated memory, cast to a pointer to struct_type
3935  * Since 2.8
3936  */
3937 // TODO
3938 // #define g_try_new(struct_type, n_structs)
3939 
3940 /*
3941  * Attempts to allocate n_structs elements of type struct_type, initialized
3942  * to 0's, and returns NULL on failure. Contrast with g_new0(), which aborts
3943  * the program on failure.
3944  * The returned pointer is cast to a pointer to the given type.
3945  * The function returns NULL when n_structs is 0 of if an overflow occurs.
3946  * struct_type :
3947  * the type of the elements to allocate
3948  * n_structs :
3949  * the number of elements to allocate
3950  * Returns :
3951  * a pointer to the allocated memory, cast to a pointer to struct_type
3952  * Since 2.8
3953  */
3954 // TODO
3955 // #define g_try_new0(struct_type, n_structs)
3956 
3957 /*
3958  * Attempts to reallocate the memory pointed to by mem, so that it now has
3959  * space for n_structs elements of type struct_type, and returns NULL on
3960  * failure. Contrast with g_renew(), which aborts the program on failure.
3961  * It returns the new address of the memory, which may have been moved.
3962  * The function returns NULL if an overflow occurs.
3963  * struct_type :
3964  * the type of the elements to allocate
3965  * mem :
3966  * the currently allocated memory
3967  * n_structs :
3968  * the number of elements to allocate
3969  * Returns :
3970  * a pointer to the new allocated memory, cast to a pointer to struct_type
3971  * Since 2.8
3972  */
3973 // TODO
3974 // #define g_try_renew(struct_type, mem, n_structs)
3975 
3976 /*
3977  * Allocates size bytes on the stack; these bytes will be freed when the current
3978  * stack frame is cleaned up. This macro essentially just wraps the alloca()
3979  * function present on most UNIX variants.
3980  * Thus it provides the same advantages and pitfalls as alloca():
3981  *  + alloca() is very fast, as on most systems it's implemented by just adjusting
3982  *  the stack pointer register.
3983  *  + It doesn't cause any memory fragmentation, within its scope, separate alloca()
3984  *  blocks just build up and are released together at function end.
3985  *  - Allocation sizes have to fit into the current stack frame. For instance in a
3986  *  threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
3987  *  so be sparse with alloca() uses.
3988  *  - Allocation failure due to insufficient stack space is not indicated with a NULL
3989  *  return like e.g. with malloc(). Instead, most systems probably handle it the same
3990  *  way as out of stack space situations from infinite function recursion, i.e.
3991  *  with a segmentation fault.
3992  *  - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
3993  *  Stack space allocated with alloca() in the same scope as a variable sized array
3994  *  will be freed together with the variable sized array upon exit of that scope, and
3995  *  not upon exit of the enclosing function scope.
3996  * size :
3997  * number of bytes to allocate.
3998  * Returns :
3999  * space for size bytes, allocated on the stack
4000  */
4001 // TODO
4002 // #define g_alloca(size)
4003 
4004 /*
4005  * Wraps g_alloca() in a more typesafe manner.
4006  * struct_type :
4007  * Type of memory chunks to be allocated
4008  * n_structs :
4009  * Number of chunks to be allocated
4010  * Returns :
4011  * Pointer to stack space for n_structs chunks of type struct_type
4012  */
4013 // TODO
4014 // #define g_newa(struct_type, n_structs)
4015 
4016 /*
4017  * Copies a block of memory len bytes long, from src to dest.
4018  * The source and destination areas may overlap.
4019  * In order to use this function, you must include
4020  * string.h yourself, because this macro will
4021  * typically simply resolve to memmove() and GLib does not include
4022  * string.h for you.
4023  * dest :
4024  * the destination address to copy the bytes to.
4025  * src :
4026  * the source address to copy the bytes from.
4027  * len :
4028  * the number of bytes to copy.
4029  */
4030 // TODO
4031 // #define g_memmove(dest,src,len)
4032 
4033 /*
4034  * A convenience macro to allocate a block of memory from the
4035  * slice allocator.
4036  * It calls g_slice_alloc() with sizeof (type)
4037  * and casts the returned pointer to a pointer of the given type,
4038  * avoiding a type cast in the source code.
4039  * Note that the underlying slice allocation mechanism can
4040  * be changed with the G_SLICE=always-malloc
4041  * environment variable.
4042  * type :
4043  * the type to allocate, typically a structure name
4044  * Returns :
4045  * a pointer to the allocated block, cast to a pointer to type
4046  * Since 2.10
4047  */
4048 // TODO
4049 // #define g_slice_new(type)
4050 
4051 /*
4052  * A convenience macro to allocate a block of memory from the
4053  * slice allocator and set the memory to 0.
4054  * It calls g_slice_alloc0() with sizeof (type)
4055  * and casts the returned pointer to a pointer of the given type,
4056  * avoiding a type cast in the source code.
4057  * Note that the underlying slice allocation mechanism can
4058  * be changed with the G_SLICE=always-malloc
4059  * environment variable.
4060  * type :
4061  * the type to allocate, typically a structure name
4062  * Since 2.10
4063  */
4064 // TODO
4065 // #define g_slice_new0(type)
4066 
4067 /*
4068  * A convenience macro to duplicate a block of memory using
4069  * the slice allocator.
4070  * It calls g_slice_copy() with sizeof (type)
4071  * and casts the returned pointer to a pointer of the given type,
4072  * avoiding a type cast in the source code.
4073  * Note that the underlying slice allocation mechanism can
4074  * be changed with the G_SLICE=always-malloc
4075  * environment variable.
4076  * type :
4077  * the type to duplicate, typically a structure name
4078  * mem :
4079  * the memory to copy into the allocated block
4080  * Returns :
4081  * a pointer to the allocated block, cast to a pointer to type
4082  * Since 2.14
4083  */
4084 // TODO
4085 // #define g_slice_dup(type, mem)
4086 
4087 /*
4088  * A convenience macro to free a block of memory that has
4089  * been allocated from the slice allocator.
4090  * It calls g_slice_free1() using sizeof (type)
4091  * as the block size.
4092  * Note that the exact release behaviour can be changed with the
4093  * G_DEBUG=gc-friendly environment
4094  * variable, also see G_SLICE for
4095  * related debugging options.
4096  * type :
4097  * the type of the block to free, typically a structure name
4098  * mem :
4099  * a pointer to the block to free
4100  * Since 2.10
4101  */
4102 // TODO
4103 // #define g_slice_free(type, mem)
4104 
4105 /*
4106  * Frees a linked list of memory blocks of structure type type.
4107  * The memory blocks must be equal-sized, allocated via
4108  * g_slice_alloc() or g_slice_alloc0() and linked together by
4109  * a next pointer (similar to GSList). The name of the
4110  * next field in type is passed as third argument.
4111  * Note that the exact release behaviour can be changed with the
4112  * G_DEBUG=gc-friendly environment
4113  * variable, also see G_SLICE for
4114  * related debugging options.
4115  * type :
4116  * the type of the mem_chain blocks
4117  * mem_chain :
4118  * a pointer to the first block of the chain
4119  * next :
4120  * the field name of the next pointer in type
4121  * Since 2.10
4122  * [1]
4123  * [Bonwick94] Jeff Bonwick, The slab allocator: An object-caching kernel
4124  * memory allocator. USENIX 1994, and
4125  * [Bonwick01] Bonwick and Jonathan Adams, Magazines and vmem: Extending the
4126  * slab allocator to many cpu's and arbitrary resources. USENIX 2001
4127  */
4128 // TODO
4129 // #define g_slice_free_chain(type, mem_chain, next)
4130 
4131 /*
4132  * Verifies that the expression evaluates to TRUE. If the expression
4133  * evaluates to FALSE, a critical message is logged and the current
4134  * function returns. This can only be used in functions which do not
4135  * return a value.
4136  * If G_DISABLE_CHECKS is defined then the check is not performed. You
4137  * should therefore not depend on any side effects of expr.
4138  * expr :
4139  * the expression to check
4140  */
4141 // TODO
4142 // #define g_return_if_fail(expr)
4143 
4144 /*
4145  * Verifies that the expression evaluates to TRUE. If the expression
4146  * evaluates to FALSE, a critical message is logged and val is
4147  * returned from the current function.
4148  * If G_DISABLE_CHECKS is defined then the check is not performed. You
4149  * should therefore not depend on any side effects of expr.
4150  * expr :
4151  * the expression to check
4152  * val :
4153  * the value to return from the current function
4154  * if the expression is not true
4155  */
4156 // TODO
4157 // #define g_return_val_if_fail(expr,val)
4158 
4159 /*
4160  * Logs a critical message and returns val.
4161  * val :
4162  * the value to return from the current function
4163  */
4164 // TODO
4165 // #define g_return_val_if_reached(val)
4166 
4167 /*
4168  * Logs a warning if the expression is not true.
4169  * expr :
4170  * the expression to check
4171  * Since 2.16
4172  */
4173 // TODO
4174 // #define g_warn_if_fail(expr)
4175 
4176 /*
4177  * A convenience function/macro to log a normal message.
4178  * ... :
4179  * format string, followed by parameters to insert
4180  * into the format string (as with printf())
4181  */
4182 // TODO
4183 // #define g_message(...)
4184 
4185 /*
4186  * A convenience function/macro to log a warning message.
4187  * You can make warnings fatal at runtime by setting the
4188  * G_DEBUG environment variable (see
4189  * Running GLib Applications).
4190  * ... :
4191  * format string, followed by parameters to insert
4192  * into the format string (as with printf())
4193  */
4194 // TODO
4195 // #define g_warning(...)
4196 
4197 /*
4198  * Logs a "critical warning" (G_LOG_LEVEL_CRITICAL).
4199  * It's more or less application-defined what constitutes
4200  * a critical vs. a regular warning. You could call
4201  * g_log_set_always_fatal() to make critical warnings exit
4202  * the program, then use g_critical() for fatal errors, for
4203  * example.
4204  * You can also make critical warnings fatal at runtime by
4205  * setting the G_DEBUG environment variable (see
4206  * Running GLib Applications).
4207  * ... :
4208  * format string, followed by parameters to insert
4209  * into the format string (as with printf())
4210  */
4211 // TODO
4212 // #define g_critical(...)
4213 
4214 /*
4215  * A convenience function/macro to log an error message.
4216  * Error messages are always fatal, resulting in a call to
4217  * abort() to terminate the application. This function will
4218  * result in a core dump; don't use it for errors you expect.
4219  * Using this function indicates a bug in your program, i.e.
4220  * an assertion failure.
4221  * ... :
4222  * format string, followed by parameters to insert
4223  * into the format string (as with printf())
4224  */
4225 // TODO
4226 // #define g_error(...)
4227 
4228 /*
4229  * A convenience function/macro to log a debug message.
4230  * ... :
4231  * format string, followed by parameters to insert
4232  * into the format string (as with printf())
4233  * Since 2.6
4234  */
4235 // TODO
4236 // #define g_debug(...)
4237 
4238 /*
4239  * Removes leading and trailing whitespace from a string.
4240  * See g_strchomp() and g_strchug().
4241  * string :
4242  * a string to remove the leading and trailing whitespace from
4243  * Returns :
4244  * string
4245  */
4246 // TODO
4247 // #define g_strstrip( string )
4248 
4249 /*
4250  * Skips to the next character in a UTF-8 string. The string must be
4251  * valid; this macro is as fast as possible, and has no error-checking.
4252  * You would use this macro to iterate over a string character by
4253  * character. The macro returns the start of the next UTF-8 character.
4254  * Before using this macro, use g_utf8_validate() to validate strings
4255  * that may contain invalid UTF-8.
4256  * p :
4257  * Pointer to the start of a valid UTF-8 character
4258  */
4259 // TODO
4260 // #define g_utf8_next_char(p)
4261 
4262 /*
4263  * Marks a string for translation, gets replaced with the translated string
4264  * at runtime.
4265  * String :
4266  * the string to be translated
4267  * Since 2.4
4268  */
4269 // TODO
4270 // #define _(String)
4271 
4272 /*
4273  * Like _(), but handles context in message ids. This has the advantage
4274  * that the string can be adorned with a prefix to guarantee uniqueness
4275  * and provide context to the translator.
4276  * One use case given in the gettext manual is GUI translation, where one
4277  * could e.g. disambiguate two "Open" menu entries as "File|Open" and
4278  * "Printer|Open". Another use case is the string "Russian" which may
4279  * have to be translated differently depending on whether it's the name
4280  * of a character set or a language. This could be solved by using
4281  * "charset|Russian" and "language|Russian".
4282  * See the C_() macro for a different way to mark up translatable strings
4283  * with context.
4284  * Note
4285  * If you are using the Q_() macro, you need to make sure
4286  * that you pass --keyword=Q_ to xgettext when extracting
4287  * messages. If you are using GNU gettext >= 0.15, you can also use
4288  * --keyword=Q_:1g to let xgettext split the context
4289  * string off into a msgctxt line in the po file.
4290  * String :
4291  * the string to be translated, with a '|'-separated prefix
4292  * which must not be translated
4293  * Returns :
4294  * the translated message
4295  * Since 2.4
4296  */
4297 // TODO
4298 // #define Q_(String)
4299 
4300 /*
4301  * Uses gettext to get the translation for String. Context is
4302  * used as a context. This is mainly useful for short strings which
4303  * may need different translations, depending on the context in which
4304  * they are used.
4305  * $(DDOC_COMMENT example)
4306  * Note
4307  * If you are using the C_() macro, you need to make sure
4308  * that you pass --keyword=C_:1c,2 to xgettext when
4309  * extracting messages. Note that this only works with GNU
4310  * gettext >= 0.15.
4311  * Context :
4312  * a message context, must be a string literal
4313  * String :
4314  * a message id, must be a string literal
4315  * Returns :
4316  * the translated message
4317  * Since 2.16
4318  */
4319 // TODO
4320 // #define C_(Context,String)
4321 
4322 /*
4323  * Only marks a string for translation. This is useful in situations
4324  * where the translated strings can't be directly used, e.g. in string
4325  * array initializers. To get the translated string, call gettext()
4326  * at runtime.
4327  * $(DDOC_COMMENT example)
4328  * String :
4329  * the string to be translated
4330  * Since 2.4
4331  */
4332 // TODO
4333 // #define N_(String)
4334 
4335 /*
4336  * Only marks a string for translation, with context.
4337  * This is useful in situations where the translated strings can't
4338  * be directly used, e.g. in string array initializers. To get the
4339  * translated string, you should call g_dpgettext2() at runtime.
4340  * $(DDOC_COMMENT example)
4341  * Note
4342  * If you are using the NC_() macro, you need to make sure
4343  * that you pass --keyword=NC_:1c,2 to xgettext when
4344  * extracting messages. Note that this only works with GNU gettext >= 0.15.
4345  * Intltool has support for the NC_() macro since version 0.40.1.
4346  * Context :
4347  * a message context, must be a string literal
4348  * String :
4349  * a message id, must be a string literal
4350  * Since 2.18
4351  */
4352 // TODO
4353 // #define NC_(Context, String)
4354 
4355 /*
4356  * Returns a random gboolean from rand_. This corresponds to a
4357  * unbiased coin toss.
4358  * rand_ :
4359  * a GRand.
4360  * Returns :
4361  * a random gboolean.
4362  */
4363 // TODO
4364 // #define g_rand_boolean(rand_)
4365 
4366 /*
4367  * Warning
4368  * g_scanner_add_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_add_symbol() instead.
4369  * Adds a symbol to the default scope.
4370  * scanner :
4371  * a GScanner
4372  * symbol :
4373  * the symbol to add
4374  * value :
4375  * the value of the symbol
4376  */
4377 // TODO
4378 // #define g_scanner_add_symbol( scanner, symbol, value )
4379 
4380 /*
4381  * Warning
4382  * g_scanner_remove_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_remove_symbol() instead.
4383  * Removes a symbol from the default scope.
4384  * scanner :
4385  * a GScanner
4386  * symbol :
4387  * the symbol to remove
4388  */
4389 // TODO
4390 // #define g_scanner_remove_symbol( scanner, symbol )
4391 
4392 /*
4393  * Warning
4394  * g_scanner_foreach_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_foreach_symbol() instead.
4395  * Calls a function for each symbol in the default scope.
4396  * scanner :
4397  * a GScanner
4398  * func :
4399  * the function to call with each symbol
4400  * data :
4401  * data to pass to the function
4402  */
4403 // TODO
4404 // #define g_scanner_foreach_symbol( scanner, func, data )
4405 
4406 /*
4407  * Warning
4408  * g_scanner_freeze_symbol_table has been deprecated since version 2.2 and should not be used in newly-written code. This macro does nothing.
4409  * There is no reason to use this macro, since it does nothing.
4410  * scanner :
4411  * a GScanner
4412  */
4413 // TODO
4414 // #define g_scanner_freeze_symbol_table(scanner)
4415 
4416 /*
4417  * Warning
4418  * g_scanner_thaw_symbol_table has been deprecated since version 2.2 and should not be used in newly-written code. This macro does nothing.
4419  * There is no reason to use this macro, since it does nothing.
4420  * scanner :
4421  * a GScanner
4422  */
4423 // TODO
4424 // #define g_scanner_thaw_symbol_table(scanner)
4425 
4426 /*
4427  */
4428 // TODO
4429 // # define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) Warning G_WIN32_DLLMAIN_FOR_DLL_NAME is deprecated and should not be used in newly-written code. On Windows, this macro defines a DllMain() function that stores the actual DLL name that the code being compiled will be included in. On non-Windows platforms, expands to nothing. static : empty or "static" dll_name : the name of the (pointer to the) char array where the DLL name will be stored. If this is used, you must also include windows.h. If you need a more complex DLL entry point function, you cannot use this
4430 
4431 /*
4432  * A convenience macro to get the previous element in a GList.
4433  * list :
4434  * an element in a GList.
4435  * Returns :
4436  * the previous element, or NULL if there are no previous
4437  * elements.
4438  */
4439 // TODO
4440 // #define g_list_previous(list)
4441 
4442 /*
4443  * A convenience macro to get the next element in a GList.
4444  * list :
4445  * an element in a GList.
4446  * Returns :
4447  * the next element, or NULL if there are no more elements.
4448  */
4449 // TODO
4450 // #define g_list_next(list)
4451 
4452 /*
4453  * A convenience macro to get the next element in a GSList.
4454  * slist :
4455  * an element in a GSList.
4456  * Returns :
4457  * the next element, or NULL if there are no more elements.
4458  */
4459 // TODO
4460 // #define g_slist_next(slist)
4461 
4462 /*
4463  * Warning
4464  * g_hash_table_freeze is deprecated and should not be used in newly-written code.
4465  * This function is deprecated and will be removed in the next major
4466  * release of GLib. It does nothing.
4467  * hash_table :
4468  * a GHashTable
4469  */
4470 // TODO
4471 // #define g_hash_table_freeze(hash_table)
4472 
4473 /*
4474  * Warning
4475  * g_hash_table_thaw is deprecated and should not be used in newly-written code.
4476  * This function is deprecated and will be removed in the next major
4477  * release of GLib. It does nothing.
4478  * hash_table :
4479  * a GHashTable
4480  */
4481 // TODO
4482 // #define g_hash_table_thaw(hash_table)
4483 
4484 /*
4485  * Adds the value on to the end of the array. The array will grow in
4486  * size automatically if necessary.
4487  * Note
4488  * g_array_append_val() is a macro which uses a reference
4489  * to the value parameter v. This means that you cannot use it with
4490  * literal values such as "27". You must use variables.
4491  * a :
4492  * a GArray.
4493  * v :
4494  * the value to append to the GArray.
4495  * Returns :
4496  * the GArray.
4497  */
4498 // TODO
4499 // #define g_array_append_val(a,v)
4500 
4501 /*
4502  * Adds the value on to the start of the array. The array will grow in
4503  * size automatically if necessary.
4504  * This operation is slower than g_array_append_val() since the
4505  * existing elements in the array have to be moved to make space for
4506  * the new element.
4507  * Note
4508  * g_array_prepend_val() is a macro which uses a reference
4509  * to the value parameter v. This means that you cannot use it with
4510  * literal values such as "27". You must use variables.
4511  * a :
4512  * a GArray.
4513  * v :
4514  * the value to prepend to the GArray.
4515  * Returns :
4516  * the GArray.
4517  */
4518 // TODO
4519 // #define g_array_prepend_val(a,v)
4520 
4521 /*
4522  * Inserts an element into an array at the given index.
4523  * Note
4524  * g_array_insert_val() is a macro which uses a reference
4525  * to the value parameter v. This means that you cannot use it with
4526  * literal values such as "27". You must use variables.
4527  * a :
4528  * a GArray.
4529  * i :
4530  * the index to place the element at.
4531  * v :
4532  * the value to insert into the array.
4533  * Returns :
4534  * the GArray.
4535  */
4536 // TODO
4537 // #define g_array_insert_val(a,i,v)
4538 
4539 /*
4540  * Returns the element of a GArray at the given index. The return
4541  * value is cast to the given type.
4542  * $(DDOC_COMMENT example)
4543  * a :
4544  * a GArray.
4545  * t :
4546  * the type of the elements.
4547  * i :
4548  * the index of the element to return.
4549  * Returns :
4550  * the element of the GArray at the index given by i.
4551  */
4552 // TODO
4553 // #define g_array_index(a,t,i)
4554 
4555 /*
4556  * Returns the pointer at the given index of the pointer array.
4557  * array :
4558  * a GPtrArray.
4559  * index_ :
4560  * the index of the pointer to return.
4561  * Returns :
4562  * the pointer at the given index.
4563  */
4564 // TODO
4565 // #define g_ptr_array_index(array,index_)
4566 
4567 /*
4568  * Inserts a GNode as the last child of the given parent.
4569  * parent :
4570  * the GNode to place the new GNode under
4571  * node :
4572  * the GNode to insert
4573  * Returns :
4574  * the inserted GNode
4575  */
4576 // TODO
4577 // #define g_node_append(parent, node)
4578 
4579 /*
4580  * Inserts a new GNode at the given position.
4581  * parent :
4582  * the GNode to place the new GNode under
4583  * position :
4584  * the position to place the new GNode at. If position is -1,
4585  * the new GNode is inserted as the last child of parent
4586  * data :
4587  * the data for the new GNode
4588  * Returns :
4589  * the new GNode
4590  */
4591 // TODO
4592 // #define g_node_insert_data(parent, position, data)
4593 
4594 /*
4595  * Inserts a new GNode after the given sibling.
4596  * parent :
4597  * the GNode to place the new GNode under
4598  * sibling :
4599  * the sibling GNode to place the new GNode after
4600  * data :
4601  * the data for the new GNode
4602  * Returns :
4603  * the new GNode
4604  */
4605 // TODO
4606 // #define g_node_insert_data_after(parent, sibling, data)
4607 
4608 /*
4609  * Inserts a new GNode before the given sibling.
4610  * parent :
4611  * the GNode to place the new GNode under
4612  * sibling :
4613  * the sibling GNode to place the new GNode before
4614  * data :
4615  * the data for the new GNode
4616  * Returns :
4617  * the new GNode
4618  */
4619 // TODO
4620 // #define g_node_insert_data_before(parent, sibling, data)
4621 
4622 /*
4623  * Inserts a new GNode as the last child of the given parent.
4624  * parent :
4625  * the GNode to place the new GNode under
4626  * data :
4627  * the data for the new GNode
4628  * Returns :
4629  * the new GNode
4630  */
4631 // TODO
4632 // #define g_node_append_data(parent, data)
4633 
4634 /*
4635  * Inserts a new GNode as the first child of the given parent.
4636  * parent :
4637  * the GNode to place the new GNode under
4638  * data :
4639  * the data for the new GNode
4640  * Returns :
4641  * the new GNode
4642  */
4643 // TODO
4644 // #define g_node_prepend_data(parent, data)
4645 
4646 /*
4647  * Gets the first child of a GNode.
4648  * node :
4649  * a GNode
4650  * Returns :
4651  * the first child of node, or NULL if node is NULL
4652  * or has no children
4653  */
4654 // TODO
4655 // #define g_node_first_child(node)
4656 
4657 /*
4658  * Gets the next sibling of a GNode.
4659  * node :
4660  * a GNode
4661  * Returns :
4662  * the next sibling of node, or NULL if node is the last node
4663  * or NULL
4664  */
4665 // TODO
4666 // #define g_node_next_sibling(node)
4667 
4668 /*
4669  * Gets the previous sibling of a GNode.
4670  * node :
4671  * a GNode
4672  * Returns :
4673  * the previous sibling of node, or NULL if node is the first
4674  * node or NULL
4675  */
4676 // TODO
4677 // #define g_node_prev_sibling(node)
4678 
4679 /*
4680  * Returns TRUE if a GNode is a leaf node.
4681  * node :
4682  * a GNode
4683  * Returns :
4684  * TRUE if the GNode is a leaf node
4685  * (i.e. it has no children)
4686  */
4687 // TODO
4688 // #define	 G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
4689 
4690 /*
4691  * Returns TRUE if a GNode is the root of a tree.
4692  * node :
4693  * a GNode
4694  * Returns :
4695  * TRUE if the GNode is the root of a tree
4696  * (i.e. it has no parent or siblings)
4697  */
4698 // TODO
4699 // #define G_NODE_IS_ROOT(node)
4700 
4701 /*
4702  * A convenience macro which defines a function returning the
4703  * GQuark for the name QN. The function will be named
4704  * q_n_quark().
4705  * Note that the quark name will be stringified automatically in the
4706  * macro, so you shouldn't use double quotes.
4707  * QN :
4708  * the name to return a GQuark for
4709  * q_n :
4710  * prefix for the function name
4711  * Since 2.34
4712  */
4713 // TODO
4714 // #define G_DEFINE_QUARK(QN, q_n)
4715 
4716 /*
4717  * Sets the data corresponding to the given GQuark id. Any previous
4718  * data with the same key is removed, and its destroy function is
4719  * called.
4720  * dl :
4721  * a datalist.
4722  * q :
4723  * the GQuark to identify the data element.
4724  * d :
4725  * the data element, or NULL to remove any previous element
4726  * corresponding to q. [allow-none]
4727  */
4728 // TODO
4729 // #define g_datalist_id_set_data(dl, q, d)
4730 
4731 /*
4732  * Removes an element, using its GQuark identifier.
4733  * dl :
4734  * a datalist.
4735  * q :
4736  * the GQuark identifying the data element.
4737  */
4738 // TODO
4739 // #define g_datalist_id_remove_data(dl, q)
4740 
4741 /*
4742  * Sets the data element corresponding to the given string identifier.
4743  * dl :
4744  * a datalist.
4745  * k :
4746  * the string to identify the data element.
4747  * d :
4748  * the data element, or NULL to remove any previous element
4749  * corresponding to k. [allow-none]
4750  */
4751 // TODO
4752 // #define g_datalist_set_data(dl, k, d)
4753 
4754 /*
4755  * Sets the data element corresponding to the given string identifier,
4756  * and the function to be called when the data element is removed.
4757  * dl :
4758  * a datalist.
4759  * k :
4760  * the string to identify the data element.
4761  * d :
4762  * the data element, or NULL to remove any previous element
4763  * corresponding to k. [allow-none]
4764  * f :
4765  * the function to call when the data element is removed. This
4766  * function will be called with the data element and can be used to
4767  * free any memory allocated for it. If d is NULL, then f must
4768  * also be NULL.
4769  */
4770 // TODO
4771 // #define g_datalist_set_data_full(dl, k, d, f)
4772 
4773 /*
4774  * Removes an element using its string identifier. The data element's
4775  * destroy function is called if it has been set.
4776  * dl :
4777  * a datalist.
4778  * k :
4779  * the string identifying the data element.
4780  */
4781 // TODO
4782 // #define g_datalist_remove_data(dl, k)
4783 
4784 /*
4785  * Removes an element, without calling its destroy notifier.
4786  * dl :
4787  * a datalist.
4788  * k :
4789  * the string identifying the data element.
4790  */
4791 // TODO
4792 // #define g_datalist_remove_no_notify(dl, k)
4793 
4794 /*
4795  * Sets the data element associated with the given GQuark id. Any
4796  * previous data with the same key is removed, and its destroy function
4797  * is called.
4798  * l :
4799  * the location identifying the dataset.
4800  * k :
4801  * the GQuark id to identify the data element.
4802  * d :
4803  * the data element.
4804  */
4805 // TODO
4806 // #define g_dataset_id_set_data(l, k, d)
4807 
4808 /*
4809  * Removes a data element from a dataset. The data element's destroy
4810  * function is called if it has been set.
4811  * l :
4812  * the location identifying the dataset.
4813  * k :
4814  * the GQuark id identifying the data element.
4815  */
4816 // TODO
4817 // #define g_dataset_id_remove_data(l, k)
4818 
4819 /*
4820  * Sets the data corresponding to the given string identifier.
4821  * l :
4822  * the location identifying the dataset.
4823  * k :
4824  * the string to identify the data element.
4825  * d :
4826  * the data element.
4827  */
4828 // TODO
4829 // #define g_dataset_set_data(l, k, d)
4830 
4831 /*
4832  * Sets the data corresponding to the given string identifier, and the
4833  * function to call when the data element is destroyed.
4834  * l :
4835  * the location identifying the dataset.
4836  * k :
4837  * the string to identify the data element.
4838  * d :
4839  * the data element.
4840  * f :
4841  * the function to call when the data element is removed. This
4842  * function will be called with the data element and can be used to
4843  * free any memory allocated for it.
4844  */
4845 // TODO
4846 // #define g_dataset_set_data_full(l, k, d, f)
4847 
4848 /*
4849  * Gets the data element corresponding to a string.
4850  * l :
4851  * the location identifying the dataset.
4852  * k :
4853  * the string identifying the data element.
4854  * Returns :
4855  * the data element corresponding to the string, or NULL if
4856  * it is not found.
4857  */
4858 // TODO
4859 // #define g_dataset_get_data(l, k)
4860 
4861 /*
4862  * Removes a data element corresponding to a string. Its destroy
4863  * function is called if it has been set.
4864  * l :
4865  * the location identifying the dataset.
4866  * k :
4867  * the string identifying the data element.
4868  */
4869 // TODO
4870 // #define g_dataset_remove_data(l, k)
4871 
4872 /*
4873  * Removes an element, without calling its destroy notifier.
4874  * l :
4875  * the location identifying the dataset.
4876  * k :
4877  * the string identifying the data element.
4878  */
4879 // TODO
4880 // #define g_dataset_remove_no_notify(l, k)
4881 
4882 /*
4883  */
4884 // TODO
4885 // # define G_VARIANT_TYPE(type_string) (g_variant_type_checked_ ((type_string))) Converts a string to a const GVariantType. Depending on the current debugging level, this function may perform a runtime check to ensure that string is a valid GVariant type string. It is always a programmer error to use this macro with an invalid type string. If in doubt, use g_variant_type_string_is_valid() to check if the string is valid. Since 2.24 type_string : a well-formed GVariantType type string
4886 
4887 /*
4888  * Specifies the type of function passed to g_main_context_set_poll_func().
4889  * The semantics of the function should match those of the poll() system call.
4890  * ufds :
4891  * an array of GPollFD elements
4892  * nfsd :
4893  * the number of elements in ufds
4894  * timeout_ :
4895  * the maximum time to wait for an event of the file descriptors.
4896  * A negative value indicates an infinite timeout.
4897  * Returns :
4898  * the number of GPollFD elements which have events or errors
4899  * reported, or -1 if an error occurred.
4900  */
4901 // gint (*GPollFunc) (GPollFD *ufds,  guint nfsd,  gint timeout_);
4902 public alias extern(C) int function(GPollFD* ufds, uint nfsd, int timeout) GPollFunc;
4903 
4904 /*
4905  * Prototype of a GChildWatchSource callback, called when a child
4906  * process has exited. To interpret status, see the documentation
4907  * for g_spawn_check_exit_status().
4908  * pid :
4909  * the process id of the child process
4910  * status :
4911  * Status information about the child process, encoded
4912  * in a platform-specific manner
4913  * user_data :
4914  * user data passed to g_child_watch_add()
4915  */
4916 // void (*GChildWatchFunc) (GPid pid,  gint status,  gpointer user_data);
4917 public alias extern(C) void function(GPid pid, int status, void* userData) GChildWatchFunc;
4918 
4919 /*
4920  * This is just a placeholder for GClosureMarshal,
4921  * which cannot be used here for dependency reasons.
4922  */
4923 // void (*GSourceDummyMarshal) (void);
4924 public alias extern(C) void function() GSourceDummyMarshal;
4925 
4926 /*
4927  * Specifies the type of function passed to g_timeout_add(),
4928  * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
4929  * user_data :
4930  * data passed to the function, set when the source was
4931  * created with one of the above functions
4932  * Returns :
4933  * FALSE if the source should be removed. G_SOURCE_CONTINUE and
4934  * G_SOURCE_REMOVE are more memorable names for the return value.
4935  */
4936 // gboolean (*GSourceFunc) (gpointer user_data);
4937 public alias extern(C) int function(void* userData) GSourceFunc;
4938 
4939 /*
4940  * Specifies the type of the module initialization function.
4941  * If a module contains a function named g_module_check_init() it is called
4942  * automatically when the module is loaded. It is passed the GModule structure
4943  * and should return NULL on success or a string describing the initialization
4944  * error.
4945  * module :
4946  * the GModule corresponding to the module which has just been loaded
4947  * Returns :
4948  * NULL on success, or a string describing the initialization error
4949  */
4950 // const gchar * (*GModuleCheckInit) (GModule *module);
4951 public alias extern(C) char * function(GModule* modul) GModuleCheckInit;
4952 
4953 /*
4954  * Specifies the type of the module function called when it is unloaded.
4955  * If a module contains a function named g_module_unload() it is called
4956  * automatically when the module is unloaded.
4957  * It is passed the GModule structure.
4958  * module :
4959  * the GModule about to be unloaded
4960  */
4961 // void (*GModuleUnload) (GModule *module);
4962 public alias extern(C) void function(GModule* modul) GModuleUnload;
4963 
4964 /*
4965  * Specifies the type of function passed to g_io_add_watch() or
4966  * g_io_add_watch_full(), which is called when the requested condition
4967  * on a GIOChannel is satisfied.
4968  * source :
4969  * the GIOChannel event source
4970  * condition :
4971  * the condition which has been satisfied
4972  * data :
4973  * user data set in g_io_add_watch() or g_io_add_watch_full()
4974  * Returns :
4975  * the function should return FALSE if the event source
4976  * should be removed
4977  */
4978 // gboolean (*GIOFunc) (GIOChannel *source,  GIOCondition condition,  gpointer data);
4979 public alias extern(C) int function(GIOChannel* source, GIOCondition condition, void* data) GIOFunc;
4980 
4981 /*
4982  * Specifies the type of the print handler functions.
4983  * These are called with the complete formatted string to output.
4984  * string :
4985  * the message to output
4986  */
4987 // void (*GPrintFunc) (const gchar *string);
4988 public alias extern(C) void function(char* string) GPrintFunc;
4989 
4990 /*
4991  * Specifies the prototype of log handler functions.
4992  * log_domain :
4993  * the log domain of the message
4994  * log_level :
4995  * the log level of the message (including the
4996  * fatal and recursion flags)
4997  * message :
4998  * the message to process
4999  * user_data :
5000  * user data, set in g_log_set_handler()
5001  */
5002 // void (*GLogFunc) (const gchar *log_domain,  GLogLevelFlags log_level,  const gchar *message,  gpointer user_data);
5003 public alias extern(C) void function(char* logDomain, GLogLevelFlags logLevel, char* message, void* userData) GLogFunc;
5004 
5005 /*
5006  * Warning
5007  * GVoidFunc is deprecated and should not be used in newly-written code.
5008  * Declares a type of function which takes no arguments
5009  * and has no return value. It is used to specify the type
5010  * function passed to g_atexit().
5011  */
5012 // void (*GVoidFunc) (void);
5013 public alias extern(C) void function() GVoidFunc;
5014 
5015 /*
5016  * Declares a type of function which takes an arbitrary
5017  * data pointer argument and has no return value. It is
5018  * not currently used in GLib or GTK+.
5019  * data :
5020  * a data pointer
5021  */
5022 // void (*GFreeFunc) (gpointer data);
5023 public alias extern(C) void function(void* data) GFreeFunc;
5024 
5025 /*
5026  * Specifies the type of the message handler function.
5027  * scanner :
5028  * a GScanner
5029  * message :
5030  * the message
5031  * error :
5032  * TRUE if the message signals an error,
5033  * FALSE if it signals a warning.
5034  */
5035 // void (*GScannerMsgFunc) (GScanner *scanner,  gchar *message,  gboolean error);
5036 public alias extern(C) void function(GScanner* scanner, char* message, int error) GScannerMsgFunc;
5037 
5038 /*
5039  * Specifies the type of the setup function passed to g_spawn_async(),
5040  * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
5041  * limited ways, be used to affect the child's execution.
5042  * On POSIX platforms, the function is called in the child after GLib
5043  * has performed all the setup it plans to perform, but before calling
5044  * exec(). Actions taken in this function will only affect the child,
5045  * not the parent.
5046  * On Windows, the function is called in the parent. Its usefulness on
5047  * Windows is thus questionable. In many cases executing the child setup
5048  * function in the parent can have ill effects, and you should be very
5049  * careful when porting software to Windows that uses child setup
5050  * functions.
5051  * However, even on POSIX, you are extremely limited in what you can
5052  * safely do from a GSpawnChildSetupFunc, because any mutexes that
5053  * were held by other threads in the parent process at the time of the
5054  * fork() will still be locked in the child process, and they will
5055  * never be unlocked (since the threads that held them don't exist in
5056  * the child). POSIX allows only async-signal-safe functions (see
5057  * signal(7))
5058  * to be called in the child between fork() and exec(), which
5059  * drastically limits the usefulness of child setup functions.
5060  * In particular, it is not safe to call any function which may
5061  * call malloc(), which includes POSIX functions such as setenv().
5062  * If you need to set up the child environment differently from
5063  * the parent, you should use g_get_environ(), g_environ_setenv(),
5064  * and g_environ_unsetenv(), and then pass the complete environment
5065  * list to the g_spawn... function.
5066  * user_data :
5067  * user data to pass to the function.
5068  */
5069 // void (*GSpawnChildSetupFunc) (gpointer user_data);
5070 public alias extern(C) void function(void* userData) GSpawnChildSetupFunc;
5071 
5072 /*
5073  * The type of function to be passed as callback for G_OPTION_ARG_CALLBACK
5074  * options.
5075  * option_name :
5076  * The name of the option being parsed. This will be either a
5077  * single dash followed by a single letter (for a short name) or two dashes
5078  * followed by a long option name.
5079  * value :
5080  * The value to be parsed.
5081  * data :
5082  * User data added to the GOptionGroup containing the option when it
5083  * was created with g_option_group_new()
5084  * error :
5085  * A return location for errors. The error code G_OPTION_ERROR_FAILED
5086  * is intended to be used for errors in GOptionArgFunc callbacks.
5087  * Returns :
5088  * TRUE if the option was successfully parsed, FALSE if an error
5089  * occurred, in which case error should be set with g_set_error()
5090  */
5091 // gboolean (*GOptionArgFunc) (const gchar *option_name,  const gchar *value,  gpointer data,  GError **error);
5092 public alias extern(C) int function(char* optionName, char* value, void* data, GError** error) GOptionArgFunc;
5093 
5094 /*
5095  * The type of functions which are used to translate user-visible
5096  * strings, for --help output.
5097  * str :
5098  * the untranslated string
5099  * data :
5100  * user data specified when installing the function, e.g.
5101  * in g_option_group_set_translate_func()
5102  * Returns :
5103  * a translation of the string for the current locale.
5104  * The returned string is owned by GLib and must not be freed.
5105  */
5106 // const gchar * (*GTranslateFunc) (const gchar *str,  gpointer data);
5107 public alias extern(C) char * function(char* str, void* data) GTranslateFunc;
5108 
5109 /*
5110  * The type of function that can be called before and after parsing.
5111  * context :
5112  * The active GOptionContext
5113  * group :
5114  * The group to which the function belongs
5115  * data :
5116  * User data added to the GOptionGroup containing the option when it
5117  * was created with g_option_group_new()
5118  * error :
5119  * A return location for error details
5120  * Returns :
5121  * TRUE if the function completed successfully, FALSE if an error
5122  * occurred, in which case error should be set with g_set_error()
5123  */
5124 // gboolean (*GOptionParseFunc) (GOptionContext *context,  GOptionGroup *group,  gpointer data,  GError **error);
5125 public alias extern(C) int function(GOptionContext* context, GOptionGroup* group, void* data, GError** error) GOptionParseFunc;
5126 
5127 /*
5128  * The type of function to be used as callback when a parse error occurs.
5129  * context :
5130  * The active GOptionContext
5131  * group :
5132  * The group to which the function belongs
5133  * data :
5134  * User data added to the GOptionGroup containing the option when it
5135  * was created with g_option_group_new()
5136  * error :
5137  * The GError containing details about the parse error
5138  */
5139 // void (*GOptionErrorFunc) (GOptionContext *context,  GOptionGroup *group,  gpointer data,  GError **error);
5140 public alias extern(C) void function(GOptionContext* context, GOptionGroup* group, void* data, GError** error) GOptionErrorFunc;
5141 
5142 /*
5143  * Specifies the type of the function passed to g_regex_replace_eval().
5144  * It is called for each occurrence of the pattern in the string passed
5145  * to g_regex_replace_eval(), and it should append the replacement to
5146  * result.
5147  * match_info :
5148  * the GMatchInfo generated by the match.
5149  * Use g_match_info_get_regex() and g_match_info_get_string() if you
5150  * need the GRegex or the matched string.
5151  * result :
5152  * a GString containing the new string
5153  * user_data :
5154  * user data passed to g_regex_replace_eval()
5155  * Returns :
5156  * FALSE to continue the replacement process, TRUE to stop it
5157  * Since 2.14
5158  */
5159 // gboolean (*GRegexEvalCallback) (const GMatchInfo *match_info,  GString *result,  gpointer user_data);
5160 public alias extern(C) int function(GMatchInfo* matchInfo, GString* result, void* userData) GRegexEvalCallback;
5161 
5162 /*
5163  * The type of functions to be called when a UNIX fd watch source
5164  * triggers.
5165  * fd :
5166  * the fd that triggered the event
5167  * condition :
5168  * the IO conditions reported on fd
5169  * user_data :
5170  * user data passed to g_unix_fd_add()
5171  * Returns :
5172  * FALSE if the source should be removed
5173  */
5174 // gboolean (*GUnixFDSourceFunc) (gint fd,  GIOCondition condition,  gpointer user_data);
5175 public alias extern(C) int function(int fd, GIOCondition condition, void* userData) GUnixFDSourceFunc;
5176 
5177 /*
5178  * Specifies the type of a comparison function used to compare two
5179  * values. The function should return a negative integer if the first
5180  * value comes before the second, 0 if they are equal, or a positive
5181  * integer if the first value comes after the second.
5182  * a :
5183  * a value.
5184  * b :
5185  * a value to compare with.
5186  * Returns :
5187  * negative value if a < b; zero if a = b; positive
5188  * value if a > b.
5189  */
5190 // gint (*GCompareFunc) (gconstpointer a,  gconstpointer b);
5191 public alias extern(C) int function(void* a, void* b) GCompareFunc;
5192 
5193 /*
5194  * Specifies the type of a comparison function used to compare two
5195  * values. The function should return a negative integer if the first
5196  * value comes before the second, 0 if they are equal, or a positive
5197  * integer if the first value comes after the second.
5198  * a :
5199  * a value.
5200  * b :
5201  * a value to compare with.
5202  * user_data :
5203  * user data to pass to comparison function.
5204  * Returns :
5205  * negative value if a < b; zero if a = b; positive
5206  * value if a > b.
5207  */
5208 // gint (*GCompareDataFunc) (gconstpointer a,  gconstpointer b,  gpointer user_data);
5209 public alias extern(C) int function(void* a, void* b, void* userData) GCompareDataFunc;
5210 
5211 /*
5212  * Specifies the type of functions passed to g_list_foreach() and
5213  * g_slist_foreach().
5214  * data :
5215  * the element's data.
5216  * user_data :
5217  * user data passed to g_list_foreach() or
5218  * g_slist_foreach().
5219  */
5220 // void (*GFunc) (gpointer data,  gpointer user_data);
5221 public alias extern(C) void function(void* data, void* userData) GFunc;
5222 
5223 /*
5224  * A GSequenceIterCompareFunc is a function used to compare iterators.
5225  * It must return zero if the iterators compare equal, a negative value
5226  * if a comes before b, and a positive value if b comes before a.
5227  * a :
5228  * a GSequenceIter
5229  * b :
5230  * a GSequenceIter
5231  * data :
5232  * user data
5233  * Returns :
5234  * zero if the iterators are equal, a negative value if a
5235  * comes before b, and a positive value if b comes before
5236  * a.
5237  */
5238 // gint (*GSequenceIterCompareFunc) (GSequenceIter *a,  GSequenceIter *b,  gpointer data);
5239 public alias extern(C) int function(GSequenceIter* a, GSequenceIter* b, void* data) GSequenceIterCompareFunc;
5240 
5241 /*
5242  * Specifies the type of the hash function which is passed to
5243  * g_hash_table_new() when a GHashTable is created.
5244  * The function is passed a key and should return a guint hash value.
5245  * The functions g_direct_hash(), g_int_hash() and g_str_hash() provide
5246  * hash functions which can be used when the key is a gpointer, gint*,
5247  * and gchar* respectively.
5248  * g_direct_hash() is also the appropriate hash function for keys
5249  * of the form GINT_TO_POINTER (n) (or similar macros).
5250  *  A good hash functions should produce
5251  * hash values that are evenly distributed over a fairly large range.
5252  * The modulus is taken with the hash table size (a prime number) to
5253  * find the 'bucket' to place each key into. The function should also
5254  * be very fast, since it is called for each key lookup.
5255  * Note that the hash functions provided by GLib have these qualities,
5256  * but are not particularly robust against manufactured keys that
5257  * cause hash collisions. Therefore, you should consider choosing
5258  * a more secure hash function when using a GHashTable with keys
5259  * that originate in untrusted data (such as HTTP requests).
5260  * Using g_str_hash() in that situation might make your application
5261  * vulerable to Algorithmic Complexity Attacks.
5262  * The key to choosing a good hash is unpredictability. Even
5263  * cryptographic hashes are very easy to find collisions for when the
5264  * remainder is taken modulo a somewhat predictable prime number. There
5265  * must be an element of randomness that an attacker is unable to guess.
5266  * key :
5267  * a key
5268  * Returns :
5269  * the hash value corresponding to the key
5270  */
5271 // guint (*GHashFunc) (gconstpointer key);
5272 public alias extern(C) uint function(void* key) GHashFunc;
5273 
5274 /*
5275  * Specifies the type of a function used to test two values for
5276  * equality. The function should return TRUE if both values are equal
5277  * and FALSE otherwise.
5278  * a :
5279  * a value
5280  * b :
5281  * a value to compare with
5282  * Returns :
5283  * TRUE if a = b; FALSE otherwise
5284  */
5285 // gboolean (*GEqualFunc) (gconstpointer a,  gconstpointer b);
5286 public alias extern(C) int function(void* a, void* b) GEqualFunc;
5287 
5288 /*
5289  * Specifies the type of the function passed to g_hash_table_foreach().
5290  * It is called with each key/value pair, together with the user_data
5291  * parameter which is passed to g_hash_table_foreach().
5292  * key :
5293  * a key
5294  * value :
5295  * the value corresponding to the key
5296  * user_data :
5297  * user data passed to g_hash_table_foreach()
5298  */
5299 // void (*GHFunc) (gpointer key,  gpointer value,  gpointer user_data);
5300 public alias extern(C) void function(void* key, void* value, void* userData) GHFunc;
5301 
5302 /*
5303  * Specifies the type of the function passed to
5304  * g_hash_table_foreach_remove(). It is called with each key/value
5305  * pair, together with the user_data parameter passed to
5306  * g_hash_table_foreach_remove(). It should return TRUE if the
5307  * key/value pair should be removed from the GHashTable.
5308  * key :
5309  * a key
5310  * value :
5311  * the value associated with the key
5312  * user_data :
5313  * user data passed to g_hash_table_remove()
5314  * Returns :
5315  * TRUE if the key/value pair should be removed from the
5316  * GHashTable
5317  */
5318 // gboolean (*GHRFunc) (gpointer key,  gpointer value,  gpointer user_data);
5319 public alias extern(C) int function(void* key, void* value, void* userData) GHRFunc;
5320 
5321 /*
5322  * Specifies the type of function passed to g_tree_traverse(). It is
5323  * passed the key and value of each node, together with the user_data
5324  * parameter passed to g_tree_traverse(). If the function returns
5325  * TRUE, the traversal is stopped.
5326  * key :
5327  * a key of a GTree node.
5328  * value :
5329  * the value corresponding to the key.
5330  * data :
5331  * user data passed to g_tree_traverse().
5332  * Returns :
5333  * TRUE to stop the traversal.
5334  */
5335 // gboolean (*GTraverseFunc) (gpointer key,  gpointer value,  gpointer data);
5336 public alias extern(C) int function(void* key, void* value, void* data) GTraverseFunc;
5337 
5338 /*
5339  * A function of this signature is used to copy the node data
5340  * when doing a deep-copy of a tree.
5341  * src :
5342  * A pointer to the data which should be copied
5343  * data :
5344  * Additional data
5345  * Returns :
5346  * A pointer to the copy
5347  * Since 2.4
5348  */
5349 // gpointer (*GCopyFunc) (gconstpointer src,  gpointer data);
5350 public alias extern(C) void* function(void* src, void* data) GCopyFunc;
5351 
5352 /*
5353  * Specifies the type of function passed to g_node_traverse(). The
5354  * function is called with each of the nodes visited, together with the
5355  * user data passed to g_node_traverse(). If the function returns
5356  * TRUE, then the traversal is stopped.
5357  * node :
5358  * a GNode.
5359  * data :
5360  * user data passed to g_node_traverse().
5361  * Returns :
5362  * TRUE to stop the traversal.
5363  */
5364 // gboolean (*GNodeTraverseFunc) (GNode *node,  gpointer data);
5365 public alias extern(C) int function(GNode* node, void* data) GNodeTraverseFunc;
5366 
5367 /*
5368  * Specifies the type of function passed to g_node_children_foreach().
5369  * The function is called with each child node, together with the user
5370  * data passed to g_node_children_foreach().
5371  * node :
5372  * a GNode.
5373  * data :
5374  * user data passed to g_node_children_foreach().
5375  */
5376 // void (*GNodeForeachFunc) (GNode *node,  gpointer data);
5377 public alias extern(C) void function(GNode* node, void* data) GNodeForeachFunc;
5378 
5379 /*
5380  * The type of functions that are used to 'duplicate' an object.
5381  * What this means depends on the context, it could just be
5382  * incrementing the reference count, if data is a ref-counted
5383  * object.
5384  * data :
5385  * the data to duplicate
5386  * user_data :
5387  * user data that was specified in g_datalist_id_dup_data()
5388  * Returns :
5389  * a duplicate of data
5390  */
5391 // gpointer (*GDuplicateFunc) (gpointer data,  gpointer user_data);
5392 public alias extern(C) void* function(void* data, void* userData) GDuplicateFunc;
5393 
5394 /*
5395  * Specifies the type of function which is called when a data element
5396  * is destroyed. It is passed the pointer to the data element and
5397  * should free any memory and resources allocated for it.
5398  * data :
5399  * the data element.
5400  */
5401 // void (*GDestroyNotify) (gpointer data);
5402 public alias extern(C) void function(void* data) GDestroyNotify;
5403 
5404 /*
5405  * Specifies the type of function passed to g_dataset_foreach(). It is
5406  * called with each GQuark id and associated data element, together
5407  * with the user_data parameter supplied to g_dataset_foreach().
5408  * key_id :
5409  * the GQuark id to identifying the data element.
5410  * data :
5411  * the data element.
5412  * user_data :
5413  * user data passed to g_dataset_foreach().
5414  */
5415 // void (*GDataForeachFunc) (GQuark key_id,  gpointer data,  gpointer user_data);
5416 public alias extern(C) void function(GQuark keyId, void* data, void* userData) GDataForeachFunc;
5417 
5418 /*
5419  * Specifies the type of the value_destroy_func and key_destroy_func
5420  * functions passed to g_cache_new(). The functions are passed a
5421  * pointer to the GCache key or GCache value and should free any
5422  * memory and other resources associated with it.
5423  * value :
5424  * the GCache value to destroy
5425  */
5426 // void (*GCacheDestroyFunc) (gpointer value);
5427 public alias extern(C) void function(void* value) GCacheDestroyFunc;
5428 
5429 /*
5430  * Specifies the type of the key_dup_func function passed to
5431  * g_cache_new(). The function is passed a key
5432  * (not a value as the prototype implies) and
5433  * should return a duplicate of the key.
5434  * value :
5435  * the GCache key to destroy (not a
5436  * GCache value as it seems)
5437  * Returns :
5438  * a copy of the GCache key
5439  */
5440 // gpointer (*GCacheDupFunc) (gpointer value);
5441 public alias extern(C) void* function(void* value) GCacheDupFunc;
5442 
5443 /*
5444  * Specifies the type of the value_new_func function passed to
5445  * g_cache_new(). It is passed a GCache key and should create the
5446  * value corresponding to the key.
5447  * key :
5448  * a GCache key
5449  * Returns :
5450  * a new GCache value corresponding to the key.
5451  */
5452 // gpointer (*GCacheNewFunc) (gpointer key);
5453 public alias extern(C) void* function(void* key) GCacheNewFunc;
5454 
5455 /*
5456  * Specifies the type of the function passed to g_completion_new(). It
5457  * should return the string corresponding to the given target item.
5458  * This is used when you use data structures as GCompletion items.
5459  * Param1 :
5460  * the completion item.
5461  * Returns :
5462  * the string corresponding to the item.
5463  */
5464 // gchar * (*GCompletionFunc) (gpointer Param1);
5465 public alias extern(C) char * function(void* Param1) GCompletionFunc;
5466 
5467 /*
5468  * Specifies the type of the function passed to
5469  * g_completion_set_compare(). This is used when you use strings as
5470  * GCompletion items.
5471  * s1 :
5472  * string to compare with s2.
5473  * s2 :
5474  * string to compare with s1.
5475  * n :
5476  * maximal number of bytes to compare.
5477  * Returns :
5478  * an integer less than, equal to, or greater than zero if
5479  * the first n bytes of s1 is found, respectively, to be
5480  * less than, to match, or to be greater than the first n
5481  * bytes of s2.
5482  */
5483 // gint (*GCompletionStrncmpFunc) (const gchar *s1,  const gchar *s2,  gsize n);
5484 public alias extern(C) int function(char* s1, char* s2, gsize n) GCompletionStrncmpFunc;
5485 /**
5486  * A union holding the value of the token.
5487  * gpointer v_symbol;
5488  * token symbol value
5489  * gchar *v_identifier;
5490  * token identifier value
5491  * gulong v_binary;
5492  * token binary integer value
5493  * gulong v_octal;
5494  * octal integer value
5495  * gulong v_int;
5496  * integer value
5497  * guint64 v_int64;
5498  * 64-bit integer value
5499  * gdouble v_float;
5500  * floating point value
5501  * gulong v_hex;
5502  * hex integer value
5503  * gchar *v_string;
5504  * string value
5505  * gchar *v_comment;
5506  * comment value
5507  * guchar v_char;
5508  * character value
5509  * guint v_error;
5510  * error value
5511  */
5512 public struct GTokenValue
5513 {
5514 	union
5515 	{
5516 		void* vSymbol;
5517 		char *vIdentifier;
5518 		gulong vBinary;
5519 		gulong vOctal;
5520 		gulong vInt;
5521 		ulong vInt64;
5522 		double vFloat;
5523 		gulong vHex;
5524 		char *vString;
5525 		char *vComment;
5526 		char vChar;
5527 		uint vError;
5528 	}
5529 }