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