alternative to assert
[gtkD.git] / src / glib / glibtypes.d
blob71de8052aa109b21192a7a9ab3c32aa4d1452638
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
23 module glib.glibtypes;
25 /* The GLib Basic Types */
26 public alias int gint;
27 public alias uint guint;
28 public alias int gboolean;
29 public alias void* gpointer;
30 public alias void* gconstpointer;
31 public alias char gchar;
32 public alias char guchar;
33 public alias short gshort;
34 public alias ushort gushort;
35 public alias int glong;
36 public alias uint gulong;
37 public alias byte gint8;
38 public alias byte guint8;
39 public alias short gint16;
40 public alias ushort guint16;
41 public alias int gint32;
42 public alias long gint64;
43 public alias uint guint32;
44 public alias ulong guint64;
45 public alias float gfloat;
46 public alias double gdouble;
47 public alias uint gsize;
48 public alias int gssize;
49 public alias void* va_list;
50 public alias dchar unichar;
51 public alias wchar unichar2;
52 //public alias dchar gunichar;
53 //public alias wchar gunichar2;
54 public alias int time_t;
57 const uint G_MAXUINT = 4294967295;
60 /**
61 * typedef int GPid;
62 * A type which is used to hold a process identification.
63 * On Unix, processes are identified by a process id (an
64 * integer), while Windows uses process handles (which are
65 * pointers).
67 public alias int GPid;
69 /**
70 * typedef guint32 gunichar;
71 * A type which can hold any UCS-4 character code.
73 public alias uint gunichar;
75 /**
76 * typedef guint16 gunichar2;
77 * A type which can hold any UTF-16 code
78 * point[3].
80 public alias ushort gunichar2;
82 /**
83 * typedef gint32 GTime;
84 * Simply a replacement for time_t. It has been deprected
85 * since it is not equivalent to time_t
86 * on 64-bit platforms with a 64-bit time_t.
87 * Unrelated to GTimer.
88 * Note that GTime is defined to always be a 32bit integer,
89 * unlike time_t which may be 64bit on some systems.
90 * Therefore, GTime will overflow in the year 2038, and
91 * you cannot use the address of a GTime variable as argument
92 * to the UNIX time() function. Instead, do the following:
93 * time_t ttime;
94 * GTime gtime;
95 * time (ttime);
96 * gtime = (GTime)ttime;
98 public alias int GTime;
101 * typedef guint8 GDateDay; /+* day of the month +/
102 * Integer representing a day of the month; between 1 and
103 * 31. G_DATE_BAD_DAY represents an invalid day of the month.
105 public alias byte GDateDay;
108 * typedef guint16 GDateYear;
109 * Integer representing a year; G_DATE_BAD_YEAR is the invalid
110 * value. The year must be 1 or higher; negative (BC) years are not
111 * allowed. The year is represented with four digits.
113 public alias ushort GDateYear;
116 * typedef guint32 GQuark;
117 * A GQuark is an integer which uniquely identifies a particular string.
119 public alias uint GQuark;
121 * Flags passed to g_module_open(). Note that these flags are
122 * not supported on all platforms.
123 * G_MODULE_BIND_LAZY
124 * specifies that symbols are only resolved when needed.
126 public enum GModuleFlags
128 BIND_LAZY = 1 << 0,
129 BIND_LOCAL = 1 << 1,
130 BIND_MASK = 0x03
132 alias GModuleFlags ModuleFlags;
135 * An enumeration specifying the base position for a g_io_channel_seek_position()
136 * operation.
137 * G_SEEK_CUR
138 * the current position in the file.
139 * G_SEEK_SET
140 * the start of the file.
141 * G_SEEK_END
142 * the end of the file.
144 public enum GSeekType
146 CUR,
147 SET,
150 alias GSeekType SeekType;
153 * Stati returned by most of the GIOFuncs functions.
154 * G_IO_STATUS_ERROR
155 * An error occurred.
156 * G_IO_STATUS_NORMAL
157 * Success.
158 * G_IO_STATUS_EOF
159 * End of file.
160 * G_IO_STATUS_AGAIN
161 * Resource temporarily unavailable.
163 public enum GIOStatus
165 ERROR,
166 NORMAL,
167 EOF,
168 AGAIN
170 alias GIOStatus IOStatus;
173 * Error codes returned by GIOChannel operations.
174 * G_IO_CHANNEL_ERROR_FBIG
175 * File too large.
176 * G_IO_CHANNEL_ERROR_INVAL
177 * Invalid argument.
178 * G_IO_CHANNEL_ERROR_IO
179 * IO error.
180 * G_IO_CHANNEL_ERROR_ISDIR
181 * File is a directory.
182 * G_IO_CHANNEL_ERROR_NOSPC
183 * No space left on device.
184 * G_IO_CHANNEL_ERROR_NXIO
185 * No such device or address.
186 * G_IO_CHANNEL_ERROR_OVERFLOW
187 * Value too large for defined datatype.
188 * G_IO_CHANNEL_ERROR_PIPE
189 * Broken pipe.
190 * G_IO_CHANNEL_ERROR_FAILED
191 * Some other error.
193 public enum GIOChannelError
195 /+* Derived from errno +/
196 G_IO_CHANNEL_ERROR_FBIG,
197 G_IO_CHANNEL_ERROR_INVAL,
198 G_IO_CHANNEL_ERROR_IO,
199 G_IO_CHANNEL_ERROR_ISDIR,
200 G_IO_CHANNEL_ERROR_NOSPC,
201 G_IO_CHANNEL_ERROR_NXIO,
202 G_IO_CHANNEL_ERROR_OVERFLOW,
203 G_IO_CHANNEL_ERROR_PIPE,
204 /+* Other +/
205 G_IO_CHANNEL_ERROR_FAILED
207 alias GIOChannelError IOChannelError;
210 * A bitwise combination representing a condition to watch for on an event
211 * source.
212 * G_IO_IN
213 * There is data to read.
214 * G_IO_OUT
215 * Data can be written (without blocking).
216 * G_IO_PRI
217 * There is urgent data to read.
218 * G_IO_ERR
219 * Error condition.
220 * G_IO_HUP
221 * Hung up (the connection has been broken, usually for pipes
223 public enum GIOCondition
225 IN =1,
226 OUT =4,
227 PRI =2,
228 ERR =8,
229 HUP =16,
230 NVAL =32
232 alias GIOCondition IOCondition;
235 * Specifies properties of a GIOChannel. Some of the flags can only
236 * be read with g_io_channel_get_flags(), but not changed with
237 * g_io_channel_set_flags().
238 * G_IO_FLAG_APPEND
239 * turns on append mode, corresponds to O_APPEND (see the
241 public enum GIOFlags
243 APPEND = 1 << 0,
244 NONBLOCK = 1 << 1,
245 IS_READABLE = 1 << 2, /+* Read only flag +/
246 IS_WRITEABLE = 1 << 3, /+* Read only flag +/
247 IS_SEEKABLE = 1 << 4, /+* Read only flag +/
248 MASK = (1 << 5) - 1,
249 GET_MASK = MASK,
250 SET_MASK = APPEND | NONBLOCK
252 alias GIOFlags IOFlags;
255 * GIOError is only used by the deprecated functions g_io_channel_read(),
256 * g_io_channel_write(), and g_io_channel_seek().
257 * G_IO_ERROR_NONE
258 * no error
259 * G_IO_ERROR_AGAIN
260 * an EAGAIN error occurred
261 * G_IO_ERROR_INVAL
262 * an EINVAL error occurred
263 * G_IO_ERROR_UNKNOWN
264 * another error occurred
266 public enum GIOError
268 NONE,
269 AGAIN,
270 INVAL,
271 UNKNOWN
273 alias GIOError IOError;
276 * Flags specifying the level of log messages.
278 public enum GLogLevelFlags
280 /+* log flags +/
281 G_LOG_FLAG_RECURSION = 1 << 0,
282 G_LOG_FLAG_FATAL = 1 << 1,
283 /+* GLib log levels +/
284 G_LOG_LEVEL_ERROR = 1 << 2, /+* always fatal +/
285 G_LOG_LEVEL_CRITICAL = 1 << 3,
286 G_LOG_LEVEL_WARNING = 1 << 4,
287 G_LOG_LEVEL_MESSAGE = 1 << 5,
288 G_LOG_LEVEL_INFO = 1 << 6,
289 G_LOG_LEVEL_DEBUG = 1 << 7,
290 G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL)
292 alias GLogLevelFlags LogLevelFlags;
295 * Error codes returned by character set conversion routines.
296 * G_CONVERT_ERROR_NO_CONVERSION
297 * Conversion between the requested character sets
298 * is not supported.
299 * G_CONVERT_ERROR_ILLEGAL_SEQUENCE
300 * Invalid byte sequence in conversion input.
301 * G_CONVERT_ERROR_FAILED
302 * Conversion failed for some reason.
303 * G_CONVERT_ERROR_PARTIAL_INPUT
304 * Partial character sequence at end of input.
305 * G_CONVERT_ERROR_BAD_URI
306 * URI is invalid.
307 * G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
308 * Pathname is not an absolute path.
310 public enum GConvertError
312 NO_CONVERSION,
313 ILLEGAL_SEQUENCE,
314 FAILED,
315 PARTIAL_INPUT,
316 BAD_URI,
317 NOT_ABSOLUTE_PATH
319 alias GConvertError ConvertError;
322 * These are the possible character classifications from the
323 * Unicode specification.
324 * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html.
325 * G_UNICODE_CONTROL
326 * General category "Other, Control" (Cc)
327 * G_UNICODE_FORMAT
328 * General category "Other, Format" (Cf)
329 * G_UNICODE_UNASSIGNED
330 * General category "Other, Not Assigned" (Cn)
331 * G_UNICODE_PRIVATE_USE
332 * General category "Other, Private Use" (Co)
333 * G_UNICODE_SURROGATE
334 * General category "Other, Surrogate" (Cs)
335 * G_UNICODE_LOWERCASE_LETTER
336 * General category "Letter, Lowercase" (Ll)
337 * G_UNICODE_MODIFIER_LETTER
338 * General category "Letter, Modifier" (Lm)
339 * G_UNICODE_OTHER_LETTER
340 * General category "Letter, Other" (Lo)
341 * G_UNICODE_TITLECASE_LETTER
342 * General category "Letter, Titlecase" (Lt)
343 * G_UNICODE_UPPERCASE_LETTER
344 * General category "Letter, Uppercase" (Lu)
345 * G_UNICODE_COMBINING_MARK
346 * General category "Mark, Spacing Combining" (Mc)
347 * G_UNICODE_ENCLOSING_MARK
348 * General category "Mark, Enclosing" (Me)
349 * G_UNICODE_NON_SPACING_MARK
350 * General category "Mark, Nonspacing" (Mn)
351 * G_UNICODE_DECIMAL_NUMBER
352 * General category "Number, Decimal Digit" (Nd)
353 * G_UNICODE_LETTER_NUMBER
354 * General category "Number, Letter" (Nl)
355 * G_UNICODE_OTHER_NUMBER
356 * General category "Number, Other" (No)
357 * G_UNICODE_CONNECT_PUNCTUATION
358 * General category "Punctuation, Connector" (Pc)
359 * G_UNICODE_DASH_PUNCTUATION
360 * General category "Punctuation, Dash" (Pd)
361 * G_UNICODE_CLOSE_PUNCTUATION
362 * General category "Punctuation, Close" (Pe)
363 * G_UNICODE_FINAL_PUNCTUATION
364 * General category "Punctuation, Final quote" (Pf)
365 * G_UNICODE_INITIAL_PUNCTUATION
366 * General category "Punctuation, Initial quote" (Pi)
367 * G_UNICODE_OTHER_PUNCTUATION
368 * General category "Punctuation, Other" (Po)
369 * G_UNICODE_OPEN_PUNCTUATION
370 * General category "Punctuation, Open" (Ps)
371 * G_UNICODE_CURRENCY_SYMBOL
372 * General category "Symbol, Currency" (Sc)
373 * G_UNICODE_MODIFIER_SYMBOL
374 * General category "Symbol, Modifier" (Sk)
375 * G_UNICODE_MATH_SYMBOL
376 * General category "Symbol, Math" (Sm)
377 * G_UNICODE_OTHER_SYMBOL
378 * General category "Symbol, Other" (So)
379 * G_UNICODE_LINE_SEPARATOR
380 * General category "Separator, Line" (Zl)
381 * G_UNICODE_PARAGRAPH_SEPARATOR
382 * General category "Separator, Paragraph" (Zp)
383 * G_UNICODE_SPACE_SEPARATOR
384 * General category "Separator, Space" (Zs)
386 public enum GUnicodeType
388 CONTROL,
389 FORMAT,
390 UNASSIGNED,
391 PRIVATE_USE,
392 SURROGATE,
393 LOWERCASE_LETTER,
394 MODIFIER_LETTER,
395 OTHER_LETTER,
396 TITLECASE_LETTER,
397 UPPERCASE_LETTER,
398 COMBINING_MARK,
399 ENCLOSING_MARK,
400 NON_SPACING_MARK,
401 DECIMAL_NUMBER,
402 LETTER_NUMBER,
403 OTHER_NUMBER,
404 CONNECT_PUNCTUATION,
405 DASH_PUNCTUATION,
406 CLOSE_PUNCTUATION,
407 FINAL_PUNCTUATION,
408 INITIAL_PUNCTUATION,
409 OTHER_PUNCTUATION,
410 OPEN_PUNCTUATION,
411 CURRENCY_SYMBOL,
412 MODIFIER_SYMBOL,
413 MATH_SYMBOL,
414 OTHER_SYMBOL,
415 LINE_SEPARATOR,
416 PARAGRAPH_SEPARATOR,
417 SPACE_SEPARATOR
419 alias GUnicodeType UnicodeType;
422 * These are the possible line break classifications.
423 * The five Hangul types were added in Unicode 4.1, so, has been
424 * introduced in GLib 2.10. Note that new types may be added in the future.
425 * Applications should be ready to handle unknown values.
426 * They may be regarded as G_UNICODE_BREAK_UNKNOWN.
427 * See http://www.unicode.org/unicode/reports/tr14/.
429 public enum GUnicodeBreakType
431 MANDATORY,
432 CARRIAGE_RETURN,
433 LINE_FEED,
434 COMBINING_MARK,
435 SURROGATE,
436 ZERO_WIDTH_SPACE,
437 INSEPARABLE,
438 NON_BREAKING_GLUE,
439 CONTINGENT,
440 SPACE,
441 AFTER,
442 BEFORE,
443 BEFORE_AND_AFTER,
444 HYPHEN,
445 NON_STARTER,
446 OPEN_PUNCTUATION,
447 CLOSE_PUNCTUATION,
448 QUOTATION,
449 EXCLAMATION,
450 IDEOGRAPHIC,
451 NUMERIC,
452 INFIX_SEPARATOR,
453 SYMBOL,
454 ALPHABETIC,
455 PREFIX,
456 POSTFIX,
457 COMPLEX_CONTEXT,
458 AMBIGUOUS,
459 UNKNOWN,
460 NEXT_LINE,
461 WORD_JOINER,
462 HANGUL_L_JAMO,
463 HANGUL_V_JAMO,
464 HANGUL_T_JAMO,
465 HANGUL_LV_SYLLABLE,
466 HANGUL_LVT_SYLLABLE
468 alias GUnicodeBreakType UnicodeBreakType;
471 * The GUnicodeScript enumeration identifies different writing
472 * systems. The values correspond to the names as defined in the
473 * Unicode standard. The enumeration has been added in GLib 2.14.
474 * Note that new types may be added in the future. Applications
475 * should be ready to handle unknown values.
476 * See Unicode Standard Annex
477 * 24: Script names.
478 * G_UNICODE_SCRIPT_INVALID_CODE
479 * a value never returned from g_unichar_get_script()
480 * G_UNICODE_SCRIPT_COMMON
482 public enum GUnicodeScript
484 INVALID_CODE = -1,
485 COMMON = 0, /+* Zyyy +/
486 INHERITED, /+* Qaai +/
487 ARABIC, /+* Arab +/
488 ARMENIAN, /+* Armn +/
489 BENGALI, /+* Beng +/
490 BOPOMOFO, /+* Bopo +/
491 CHEROKEE, /+* Cher +/
492 COPTIC, /+* Qaac +/
493 CYRILLIC, /+* Cyrl (Cyrs) +/
494 DESERET, /+* Dsrt +/
495 DEVANAGARI, /+* Deva +/
496 ETHIOPIC, /+* Ethi +/
497 GEORGIAN, /+* Geor (Geon, Geoa) +/
498 GOTHIC, /+* Goth +/
499 GREEK, /+* Grek +/
500 GUJARATI, /+* Gujr +/
501 GURMUKHI, /+* Guru +/
502 HAN, /+* Hani +/
503 HANGUL, /+* Hang +/
504 HEBREW, /+* Hebr +/
505 HIRAGANA, /+* Hira +/
506 KANNADA, /+* Knda +/
507 KATAKANA, /+* Kana +/
508 KHMER, /+* Khmr +/
509 LAO, /+* Laoo +/
510 LATIN, /+* Latn (Latf, Latg) +/
511 MALAYALAM, /+* Mlym +/
512 MONGOLIAN, /+* Mong +/
513 MYANMAR, /+* Mymr +/
514 OGHAM, /+* Ogam +/
515 OLD_ITALIC, /+* Ital +/
516 ORIYA, /+* Orya +/
517 RUNIC, /+* Runr +/
518 SINHALA, /+* Sinh +/
519 SYRIAC, /+* Syrc (Syrj, Syrn, Syre) +/
520 TAMIL, /+* Taml +/
521 TELUGU, /+* Telu +/
522 THAANA, /+* Thaa +/
523 THAI, /+* Thai +/
524 TIBETAN, /+* Tibt +/
525 CANADIAN_ABORIGINAL, /+* Cans +/
526 YI, /+* Yiii +/
527 TAGALOG, /+* Tglg +/
528 HANUNOO, /+* Hano +/
529 BUHID, /+* Buhd +/
530 TAGBANWA, /+* Tagb +/
531 /+* Unicode-4.0 additions +/
532 BRAILLE, /+* Brai +/
533 CYPRIOT, /+* Cprt +/
534 LIMBU, /+* Limb +/
535 OSMANYA, /+* Osma +/
536 SHAVIAN, /+* Shaw +/
537 LINEAR_B, /+* Linb +/
538 TAI_LE, /+* Tale +/
539 UGARITIC, /+* Ugar +/
540 /+* Unicode-4.1 additions +/
541 NEW_TAI_LUE, /+* Talu +/
542 BUGINESE, /+* Bugi +/
543 GLAGOLITIC, /+* Glag +/
544 TIFINAGH, /+* Tfng +/
545 SYLOTI_NAGRI, /+* Sylo +/
546 OLD_PERSIAN, /+* Xpeo +/
547 KHAROSHTHI, /+* Khar +/
548 /+* Unicode-5.0 additions +/
549 UNKNOWN, /+* Zzzz +/
550 BALINESE, /+* Bali +/
551 CUNEIFORM, /+* Xsux +/
552 PHOENICIAN, /+* Phnx +/
553 PHAGS_PA, /+* Phag +/
554 NKO /+* Nkoo +/
556 alias GUnicodeScript UnicodeScript;
559 * Defines how a Unicode string is transformed in a canonical
560 * form, standardizing such issues as whether a character with an accent is
561 * represented as a base character and combining accent or as a single precomposed
562 * character. Unicode strings should generally be normalized before comparing them.
563 * G_NORMALIZE_DEFAULT
564 * standardize differences that do not affect the
566 public enum GNormalizeMode
568 DEFAULT,
569 NFD = DEFAULT,
570 DEFAULT_COMPOSE,
571 NFC = DEFAULT_COMPOSE,
572 ALL,
573 NFKD = ALL,
574 ALL_COMPOSE,
575 NFKC = ALL_COMPOSE
577 alias GNormalizeMode NormalizeMode;
580 * This enumeration isn't used in the API, but may be useful if you need
581 * to mark a number as a day, month, or year.
582 * G_DATE_DAY
583 * a day
584 * G_DATE_MONTH
585 * a month
586 * G_DATE_YEAR
587 * a year
589 public enum GDateDMY
591 DAY = 0,
592 MONTH = 1,
593 YEAR = 2
595 alias GDateDMY DateDMY;
598 * Enumeration representing a month; values are G_DATE_JANUARY,
599 * G_DATE_FEBRUARY, etc. G_DATE_BAD_MONTH is the invalid value.
600 * G_DATE_BAD_MONTH
601 * invalid value.
602 * G_DATE_JANUARY
603 * January.
604 * G_DATE_FEBRUARY
605 * February.
606 * G_DATE_MARCH
607 * March.
608 * G_DATE_APRIL
609 * April.
610 * G_DATE_MAY
611 * May.
612 * G_DATE_JUNE
613 * June.
614 * G_DATE_JULY
615 * July.
616 * G_DATE_AUGUST
617 * August.
618 * G_DATE_SEPTEMBER
619 * September.
620 * G_DATE_OCTOBER
621 * October.
622 * G_DATE_NOVEMBER
623 * November.
624 * G_DATE_DECEMBER
625 * December.
627 public enum GDateMonth
629 BAD_MONTH = 0,
630 JANUARY = 1,
631 FEBRUARY = 2,
632 MARCH = 3,
633 APRIL = 4,
634 MAY = 5,
635 JUNE = 6,
636 JULY = 7,
637 AUGUST = 8,
638 SEPTEMBER = 9,
639 OCTOBER = 10,
640 NOVEMBER = 11,
641 DECEMBER = 12
643 alias GDateMonth DateMonth;
646 * Enumeration representing a day of the week; G_DATE_MONDAY,
647 * G_DATE_TUESDAY, etc. G_DATE_BAD_WEEKDAY is an invalid weekday.
648 * G_DATE_BAD_WEEKDAY
649 * invalid value.
650 * G_DATE_MONDAY
651 * Monday.
652 * G_DATE_TUESDAY
653 * Tuesday.
654 * G_DATE_WEDNESDAY
655 * Wednesday.
656 * G_DATE_THURSDAY
657 * Thursday.
658 * G_DATE_FRIDAY
659 * Friday.
660 * G_DATE_SATURDAY
661 * Saturday.
662 * G_DATE_SUNDAY
663 * Sunday.
665 public enum GDateWeekday
667 BAD_WEEKDAY = 0,
668 MONDAY = 1,
669 TUESDAY = 2,
670 WEDNESDAY = 3,
671 THURSDAY = 4,
672 FRIDAY = 5,
673 SATURDAY = 6,
674 SUNDAY = 7
676 alias GDateWeekday DateWeekday;
679 * The possible types of token returned from each g_scanner_get_next_token() call.
680 * G_TOKEN_EOF
681 * the end of the file.
682 * G_TOKEN_LEFT_PAREN
683 * a '(' character.
684 * G_TOKEN_LEFT_CURLY
685 * a '{' character.
686 * G_TOKEN_RIGHT_CURLY
687 * a '}' character.
689 public enum GTokenType
691 EOF = 0,
692 LEFT_PAREN = '(',
693 RIGHT_PAREN = ')',
694 LEFT_CURLY = '{',
695 RIGHT_CURLY = '}',
696 LEFT_BRACE = '[',
697 RIGHT_BRACE = ']',
698 EQUAL_SIGN = '=',
699 COMMA = ',',
700 NONE = 256,
701 ERROR,
702 CHAR,
703 BINARY,
704 OCTAL,
705 INT,
706 HEX,
707 FLOAT,
708 STRING,
709 SYMBOL,
710 IDENTIFIER,
711 IDENTIFIER_NULL,
712 COMMENT_SINGLE,
713 COMMENT_MULTI,
714 LAST
716 alias GTokenType TokenType;
719 * The possible errors, used in the v_error field
720 * of GTokenValue, when the token is a G_TOKEN_ERROR.
721 * G_ERR_UNKNOWN
722 * unknown error.
723 * G_ERR_UNEXP_EOF
724 * unexpected end of file.
725 * G_ERR_UNEXP_EOF_IN_STRING
726 * unterminated string constant.
727 * G_ERR_UNEXP_EOF_IN_COMMENT
728 * unterminated comment.
729 * G_ERR_NON_DIGIT_IN_CONST
730 * non-digit character in a number.
731 * G_ERR_DIGIT_RADIX
732 * digit beyond radix in a number.
733 * G_ERR_FLOAT_RADIX
734 * non-decimal floating point number.
735 * G_ERR_FLOAT_MALFORMED
736 * malformed floating point number.
738 public enum GErrorType
740 UNKNOWN,
741 UNEXP_EOF,
742 UNEXP_EOF_IN_STRING,
743 UNEXP_EOF_IN_COMMENT,
744 NON_DIGIT_IN_CONST,
745 DIGIT_RADIX,
746 FLOAT_RADIX,
747 FLOAT_MALFORMED
749 alias GErrorType ErrorType;
752 * Error codes returned by spawning processes.
753 * G_SPAWN_ERROR_FORK
754 * Fork failed due to lack of memory.
755 * G_SPAWN_ERROR_READ
756 * Read or select on pipes failed.
757 * G_SPAWN_ERROR_CHDIR
758 * Changing to working directory failed.
759 * G_SPAWN_ERROR_ACCES
760 * execv() returned EACCES.
761 * G_SPAWN_ERROR_PERM
762 * execv() returned EPERM.
763 * G_SPAWN_ERROR_2BIG
764 * execv() returned E2BIG.
765 * G_SPAWN_ERROR_NOEXEC
766 * execv() returned ENOEXEC.
767 * G_SPAWN_ERROR_NAMETOOLONG
768 * execv() returned ENAMETOOLONG.
769 * G_SPAWN_ERROR_NOENT
770 * execv() returned ENOENT.
771 * G_SPAWN_ERROR_NOMEM
772 * execv() returned ENOMEM.
773 * G_SPAWN_ERROR_NOTDIR
774 * execv() returned ENOTDIR.
775 * G_SPAWN_ERROR_LOOP
776 * execv() returned ELOOP.
777 * G_SPAWN_ERROR_TXTBUSY
778 * execv() returned ETXTBUSY.
779 * G_SPAWN_ERROR_IO
780 * execv() returned EIO.
781 * G_SPAWN_ERROR_NFILE
782 * execv() returned ENFILE.
783 * G_SPAWN_ERROR_MFILE
784 * execv() returned EMFILE.
785 * G_SPAWN_ERROR_INVAL
786 * execv() returned EINVAL.
787 * G_SPAWN_ERROR_ISDIR
788 * execv() returned EISDIR.
789 * G_SPAWN_ERROR_LIBBAD
790 * execv() returned ELIBBAD.
791 * G_SPAWN_ERROR_FAILED
792 * Some other fatal failure, error->message should explain.
794 public enum GSpawnError
796 FORK, /+* fork failed due to lack of memory +/
797 READ, /+* read or select on pipes failed +/
798 CHDIR, /+* changing to working dir failed +/
799 ACCES, /+* execv() returned EACCES +/
800 PERM, /+* execv() returned EPERM +/
801 TOO_BIG, /+* execv() returned E2BIG +/
802 NOEXEC, /+* execv() returned ENOEXEC +/
803 NAMETOOLONG, /+* "" "" ENAMETOOLONG +/
804 NOENT, /+* "" "" ENOENT +/
805 NOMEM, /+* "" "" ENOMEM +/
806 NOTDIR, /+* "" "" ENOTDIR +/
807 LOOP, /+* "" "" ELOOP +/
808 TXTBUSY, /+* "" "" ETXTBUSY +/
809 IO, /+* "" "" EIO +/
810 NFILE, /+* "" "" ENFILE +/
811 MFILE, /+* "" "" EMFLE +/
812 INVAL, /+* "" "" EINVAL +/
813 ISDIR, /+* "" "" EISDIR +/
814 LIBBAD, /+* "" "" ELIBBAD +/
815 FAILED /+* other fatal failure, error->message
816 * should explain
819 alias GSpawnError SpawnError;
822 * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
823 * G_SPAWN_LEAVE_DESCRIPTORS_OPEN
824 * the parent's open file descriptors will be
826 public enum GSpawnFlags
828 LEAVE_DESCRIPTORS_OPEN = 1 << 0,
829 DO_NOT_REAP_CHILD = 1 << 1,
830 /+* look for argv[0] inn the path i.e. use execvp() +/
831 SEARCH_PATH = 1 << 2,
832 /+* Dump output to /dev/null +/
833 STDOUT_TO_DEV_NULL = 1 << 3,
834 STDERR_TO_DEV_NULL = 1 << 4,
835 CHILD_INHERITS_STDIN = 1 << 5,
836 FILE_AND_ARGV_ZERO = 1 << 6
838 alias GSpawnFlags SpawnFlags;
841 * Values corresponding to errno codes returned from file operations
842 * on UNIX. Unlike errno codes, GFileError values are available on
843 * all systems, even Windows. The exact meaning of each code depends on what
844 * sort of file operation you were performing; the UNIX documentation
845 * gives more details. The following error code descriptions come
846 * from the GNU C Library manual, and are under the copyright
847 * of that manual.
848 * It's not very portable to make detailed assumptions about exactly
849 * which errors will be returned from a given operation. Some errors
850 * don't occur on some systems, etc., sometimes there are subtle
851 * differences in when a system will report a given error, etc.
852 * G_FILE_ERROR_EXIST
853 * Operation not permitted; only the owner of the
855 public enum GFileError
857 EXIST,
858 ISDIR,
859 ACCES,
860 NAMETOOLONG,
861 NOENT,
862 NOTDIR,
863 NXIO,
864 NODEV,
865 ROFS,
866 TXTBSY,
867 FAULT,
868 LOOP,
869 NOSPC,
870 NOMEM,
871 MFILE,
872 NFILE,
873 BADF,
874 INVAL,
875 PIPE,
876 AGAIN,
877 INTR,
879 PERM,
880 NOSYS,
881 FAILED
883 alias GFileError FileError;
886 * A test to perform on a file using g_file_test().
887 * G_FILE_TEST_IS_REGULAR
888 * TRUE if the file is a regular file (not a symlink or directory)
889 * G_FILE_TEST_IS_SYMLINK
890 * TRUE if the file is a symlink.
891 * G_FILE_TEST_IS_DIR
892 * TRUE if the file is a directory.
893 * G_FILE_TEST_IS_EXECUTABLE
894 * TRUE if the file is executable.
895 * G_FILE_TEST_EXISTS
896 * TRUE if the file exists. It may or may not be a regular file.
898 public enum GFileTest
900 IS_REGULAR = 1 << 0,
901 IS_SYMLINK = 1 << 1,
902 IS_DIR = 1 << 2,
903 IS_EXECUTABLE = 1 << 3,
904 EXISTS = 1 << 4
906 alias GFileTest FileTest;
909 * Error codes returned by shell functions.
910 * G_SHELL_ERROR_BAD_QUOTING
911 * Mismatched or otherwise mangled quoting.
912 * G_SHELL_ERROR_EMPTY_STRING
913 * String to be parsed was empty.
914 * G_SHELL_ERROR_FAILED
915 * Some other error.
917 public enum GShellError
919 /+* mismatched or otherwise mangled quoting +/
920 G_SHELL_ERROR_BAD_QUOTING,
921 /+* string to be parsed was empty +/
922 G_SHELL_ERROR_EMPTY_STRING,
923 G_SHELL_ERROR_FAILED
925 alias GShellError ShellError;
928 * Error codes returned by option parsing.
929 * G_OPTION_ERROR_UNKNOWN_OPTION
930 * An option was not known to the parser.
932 public enum GOptionError
934 UNKNOWN_OPTION,
935 BAD_VALUE,
936 FAILED
938 alias GOptionError OptionError;
941 * The GOptionArg enum values determine which type of extra argument the
942 * options expect to find. If an option expects an extra argument, it
943 * can be specified in several ways; with a short option:
944 * -x arg, with a long option: --name arg
945 * or combined in a single argument: --name=arg.
946 * G_OPTION_ARG_NONE
947 * No extra argument. This is useful for simple flags.
948 * G_OPTION_ARG_STRING
949 * The option takes a string argument.
950 * G_OPTION_ARG_INT
951 * The option takes an integer argument.
952 * G_OPTION_ARG_CALLBACK
953 * The option provides a callback to parse the
955 public enum GOptionArg
957 NONE,
958 STRING,
959 INT,
960 CALLBACK,
961 FILENAME,
962 STRING_ARRAY,
963 FILENAME_ARRAY,
964 DOUBLE,
965 INT64
967 alias GOptionArg OptionArg;
970 * Flags which modify individual options.
971 * G_OPTION_FLAG_HIDDEN
972 * The option doesn't appear in --help
974 public enum GOptionFlags
976 HIDDEN = 1 << 0,
977 IN_MAIN = 1 << 1,
978 REVERSE = 1 << 2,
979 NO_ARG = 1 << 3,
980 FILENAME = 1 << 4,
981 OPTIONAL_ARG = 1 << 5,
982 NOALIAS = 1 << 6
984 alias GOptionFlags OptionFlags;
987 * Error codes returned by markup parsing.
988 * G_MARKUP_ERROR_BAD_UTF8
989 * text being parsed was not valid UTF-8
990 * G_MARKUP_ERROR_EMPTY
991 * document contained nothing, or only whitespace
992 * G_MARKUP_ERROR_PARSE
993 * document was ill-formed
994 * G_MARKUP_ERROR_UNKNOWN_ELEMENT
995 * error should be set by GMarkupParser functions; element wasn't known
996 * G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE
997 * error should be set by GMarkupParser functions; attribute wasn't known
998 * G_MARKUP_ERROR_INVALID_CONTENT
999 * error should be set by GMarkupParser functions; something was wrong with contents of the document, e.g. invalid attribute value
1001 public enum GMarkupError
1003 BAD_UTF8,
1004 EMPTY,
1005 PARSE,
1006 /+* These three are primarily intended for specific GMarkupParser
1007 * implementations to set.
1009 UNKNOWN_ELEMENT,
1010 UNKNOWN_ATTRIBUTE,
1011 INVALID_CONTENT
1013 alias GMarkupError MarkupError;
1016 * Flags that affect the behaviour of the parser.
1017 * G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG
1018 * flag you should not use.
1019 * G_MARKUP_TREAT_CDATA_AS_TEXT
1020 * When this flag is set, CDATA marked
1022 public enum GMarkupParseFlags
1024 DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0,
1025 TREAT_CDATA_AS_TEXT = 1 << 1
1027 alias GMarkupParseFlags MarkupParseFlags;
1030 * Error codes returned by key file parsing.
1031 * G_KEY_FILE_ERROR_UNKNOWN_ENCODING
1032 * the text being parsed was in an unknown encoding
1033 * G_KEY_FILE_ERROR_PARSE
1034 * document was ill-formed
1035 * G_KEY_FILE_ERROR_NOT_FOUND
1036 * the file was not found
1037 * G_KEY_FILE_ERROR_KEY_NOT_FOUND
1038 * a requested key was not found
1039 * G_KEY_FILE_ERROR_GROUP_NOT_FOUND
1040 * a requested group was not found
1041 * G_KEY_FILE_ERROR_INVALID_VALUE
1042 * a value could not be parsed
1044 public enum GKeyFileError
1046 UNKNOWN_ENCODING,
1047 PARSE,
1048 NOT_FOUND,
1049 KEY_NOT_FOUND,
1050 GROUP_NOT_FOUND,
1051 INVALID_VALUE
1053 alias GKeyFileError KeyFileError;
1056 * Flags which influence the parsing.
1057 * G_KEY_FILE_NONE
1058 * No flags, default behaviour
1059 * G_KEY_FILE_KEEP_COMMENTS
1060 * Use this flag if you plan to write the (possibly modified)
1062 public enum GKeyFileFlags
1064 NONE = 0,
1065 KEEP_COMMENTS = 1 << 0,
1066 KEEP_TRANSLATIONS = 1 << 1
1068 alias GKeyFileFlags KeyFileFlags;
1071 * Specifies the type of traveral performed by g_tree_traverse(),
1072 * g_node_traverse() and g_node_find().
1073 * G_IN_ORDER
1074 * vists a node's left child first, then the node itself, then its
1076 public enum GTraverseType
1078 IN_ORDER,
1079 PRE_ORDER,
1080 POST_ORDER,
1081 LEVEL_ORDER
1083 alias GTraverseType TraverseType;
1086 * Specifies which nodes are visited during several of the tree functions,
1087 * including g_node_traverse() and g_node_find().
1088 * G_TRAVERSE_LEAVES
1089 * only leaf nodes should be visited. This name has been
1091 public enum GTraverseFlags
1093 LEAVES = 1 << 0,
1094 NON_LEAVES = 1 << 1,
1095 ALL = LEAVES | NON_LEAVES,
1096 MASK = 0x03,
1097 LEAFS = LEAVES,
1098 NON_LEAFS = NON_LEAVES
1100 alias GTraverseFlags TraverseFlags;
1104 * Main Gtk struct.
1105 * The GMainLoop struct is an opaque data type
1106 * representing the main event loop of a GLib or GTK+ application.
1108 public struct GMainLoop{}
1112 * The GMainContext struct is an opaque data type
1113 * representing a set of sources to be handled in a main loop.
1115 public struct GMainContext{}
1119 * gint fd;
1120 * the file descriptor to poll (or a HANDLE on Win32 platforms).
1121 * gushort events;
1122 * a bitwise combination of flags from GIOCondition, specifying which
1123 * events should be polled for. Typically for reading from a file descriptor
1124 * you would use G_IO_IN | G_IO_HUP | G_IO_ERR, and for writing you would use
1125 * G_IO_OUT | G_IO_ERR.
1126 * gushort revents;
1127 * a bitwise combination of flags from GIOCondition, returned from the
1128 * poll() function to indicate which events occurred.
1130 public struct GPollFD
1132 int fd;
1133 ushort events;
1134 ushort revents;
1139 * The GSource struct is an opaque data type representing
1140 * an event source.
1142 public struct GSource{}
1146 * The GSourceFuncs struct contains a table of functions used to handle
1147 * event sources in a generic manner.
1148 * prepare
1149 * Called before all the file descriptors are polled.
1150 * If the source can determine that it is ready here (without waiting for the
1151 * results of the poll() call) it should return TRUE.
1152 * It can also return a timeout_ value which should be the maximum timeout
1153 * (in milliseconds) which should be passed to the poll() call.
1154 * The actual timeout used will be -1 if all sources returned -1, or it will
1155 * be the minimum of all the timeout_ values returned which were >= 0.
1156 * check
1157 * Called after all the file descriptors are polled.
1158 * The source should return TRUE if it is ready to be dispatched.
1159 * Note that some time may have passed since the previous prepare function was
1160 * called, so the source should be checked again here.
1161 * dispatch
1162 * Called to dispatch the event source, after it has returned TRUE in
1163 * either its prepare or its check function. The dispatch function is
1164 * passed in a callback function and data. The callback function may be
1165 * NULL if the source was never connected to a callback using
1166 * g_source_set_callback(). The dispatch function should call the
1167 * callback function with user_data and whatever additional parameters are
1168 * needed for this type of event source.
1169 * finalize
1170 * Called when the source is finalized.
1171 * For idle sources, the prepare and check functions always return TRUE to
1172 * indicate that the source is always ready to be processed.
1173 * The prepare function also returns a timeout value of 0 to ensure that the
1174 * poll() call doesn't block (since that would be time
1175 * wasted which could have been spent running the idle function).
1176 * For timeout sources, the prepare and check functions both return TRUE if the
1177 * timeout interval has expired. The prepare function also returns a timeout
1178 * value to ensure that the poll() call doesn't block too
1179 * long and miss the next timeout.
1180 * For file descriptor sources, the prepare function typically returns FALSE,
1181 * since it must wait until poll() has been called before
1182 * it knows whether any events need to be processed. It sets the returned
1183 * timeout to -1 to indicate that it doesn't mind how long the
1184 * poll() call blocks.
1185 * In the check function, it tests the results of the poll()
1186 * call to see if the required condition has been met, and returns TRUE if so.
1188 public struct GSourceFuncs{}
1189 // int (*prepare) (GSource *source,
1190 // glib-The-Main-Event-Loop.html
1191 // int *timeout);
1192 // glib-The-Main-Event-Loop.html
1193 // int (*check) (GSource *source);
1194 // glib-The-Main-Event-Loop.html
1195 // int (*dispatch) (GSource *source,
1196 // glib-The-Main-Event-Loop.html
1197 // GSourceFunc callback,
1198 // glib-The-Main-Event-Loop.html
1199 // void* userData);
1200 // glib-The-Main-Event-Loop.html
1201 // void (*finalize) (GSource *source); /+* Can be NULL +/
1202 // glib-The-Main-Event-Loop.html
1203 // /+* For use by gSourceSetClosure +/
1204 // glib-The-Main-Event-Loop.html
1205 // GSourceFunc closureCallback;
1206 // glib-The-Main-Event-Loop.html
1207 // GSourceDummyMarshal closureMarshal; /+* Really is of type GClosureMarshal +/
1208 // glib-The-Main-Event-Loop.html
1212 * The GSourceCallbackFuncs struct contains
1213 * functions for managing callback objects.
1214 * ref()
1215 * Called when a reference is added to the callback object.
1216 * unref()
1217 * Called when a reference to the callback object is dropped.
1218 * get()
1219 * Called to extract the callback function and data from the callback object.
1221 public struct GSourceCallbackFuncs{}
1222 // void (*ref) (void* cbData);
1223 // glib-The-Main-Event-Loop.html
1224 // void (*unref) (void* cbData);
1225 // glib-The-Main-Event-Loop.html
1226 // void (*get) (void* cbData,
1227 // glib-The-Main-Event-Loop.html
1228 // GSource *source,
1229 // glib-The-Main-Event-Loop.html
1230 // GSourceFunc *func,
1231 // glib-The-Main-Event-Loop.html
1232 // void* *data);
1233 // glib-The-Main-Event-Loop.html
1237 * Main Gtk struct.
1238 * The GThreadPool struct represents a thread pool. It has six public
1239 * read-only members, but the underlying struct is bigger, so you must not copy
1240 * this struct.
1241 * GFuncfunc;
1242 * the function to execute in the threads of this pool
1243 * gpointeruser_data;
1244 * the user data for the threads of this pool
1245 * gbooleanexclusive;
1246 * are all threads exclusive to this pool
1248 public struct GThreadPool{}
1249 // GFunc func;
1250 // glib-Thread-Pools.html
1251 // void* userData;
1252 // glib-Thread-Pools.html
1253 // int exclusive;
1254 // glib-Thread-Pools.html
1258 * Main Gtk struct.
1259 * The GAsyncQueue struct is an opaque data structure, which represents
1260 * an asynchronous queue. It should only be accessed through the
1261 * g_async_queue_* functions.
1263 public struct GAsyncQueue{}
1267 * Main Gtk struct.
1268 * The GModule struct is an opaque data structure to represent a
1269 * Dynamically-Loaded Module.
1270 * It should only be accessed via the following functions.
1272 public struct GModule{}
1276 * A set of functions used to perform memory allocation. The same GMemVTable must
1277 * be used for all allocations in the same program; a call to g_mem_set_vtable(),
1278 * if it exists, should be prior to any use of GLib.
1279 * malloc()
1280 * function to use for allocating memory.
1281 * realloc()
1282 * function to use for reallocating memory.
1283 * free()
1284 * function to use to free memory.
1285 * calloc()
1286 * function to use for allocating zero-filled memory.
1287 * try_malloc()
1288 * function to use for allocating memory without a default error handler.
1289 * try_realloc()
1290 * function to use for reallocating memory without a default error handler.
1292 public struct GMemVTable{}
1293 // void* (*malloc) (uint nBytes);
1294 // glib-Memory-Allocation.html
1295 // void* (*realloc) (void* mem,
1296 // glib-Memory-Allocation.html
1297 // uint nBytes);
1298 // glib-Memory-Allocation.html
1299 // void (*free) (void* mem);
1300 // glib-Memory-Allocation.html
1301 // /+* optional; set to NULL if not used ! +/
1302 // glib-Memory-Allocation.html
1303 // void* (*calloc) (uint nBlocks,
1304 // glib-Memory-Allocation.html
1305 // uint nBlockBytes);
1306 // glib-Memory-Allocation.html
1307 // void* (*tryMalloc) (uint nBytes);
1308 // glib-Memory-Allocation.html
1309 // void* (*tryRealloc) (void* mem,
1310 // glib-Memory-Allocation.html
1311 // uint nBytes);
1312 // glib-Memory-Allocation.html
1316 * Main Gtk struct.
1317 * A data structure representing an IO Channel. The fields should be considered
1318 * private and should only be accessed with the following functions.
1320 public struct GIOChannel{}
1324 * A table of functions used to handle different types of GIOChannel in a
1325 * generic way.
1327 public struct GIOFuncs{}
1328 // GIOStatus (*ioRead) (GIOChannel *channel,
1329 // glib-IO-Channels.html
1330 // char *buf,
1331 // glib-IO-Channels.html
1332 // uint count,
1333 // glib-IO-Channels.html
1334 // uint *bytesRead,
1335 // glib-IO-Channels.html
1336 // GError **err);
1337 // glib-IO-Channels.html
1338 // GIOStatus (*ioWrite) (GIOChannel *channel,
1339 // glib-IO-Channels.html
1340 // char *buf,
1341 // glib-IO-Channels.html
1342 // uint count,
1343 // glib-IO-Channels.html
1344 // uint *bytesWritten,
1345 // glib-IO-Channels.html
1346 // GError **err);
1347 // glib-IO-Channels.html
1348 // GIOStatus (*ioSeek) (GIOChannel *channel,
1349 // glib-IO-Channels.html
1350 // long offset,
1351 // glib-IO-Channels.html
1352 // GSeekType type,
1353 // glib-IO-Channels.html
1354 // GError **err);
1355 // glib-IO-Channels.html
1356 // GIOStatus (*ioClose) (GIOChannel *channel,
1357 // glib-IO-Channels.html
1358 // GError **err);
1359 // glib-IO-Channels.html
1360 // GSource* (*ioCreateWatch) (GIOChannel *channel,
1361 // glib-IO-Channels.html
1362 // GIOCondition condition);
1363 // glib-IO-Channels.html
1364 // void (*ioFree) (GIOChannel *channel);
1365 // glib-IO-Channels.html
1366 // GIOStatus (*ioSetFlags) (GIOChannel *channel,
1367 // glib-IO-Channels.html
1368 // GIOFlags flags,
1369 // glib-IO-Channels.html
1370 // GError **err);
1371 // glib-IO-Channels.html
1372 // GIOFlags (*ioGetFlags) (GIOChannel *channel);
1373 // glib-IO-Channels.html
1377 * Main Gtk struct.
1378 * The GError structure contains
1379 * information about an error that has occurred.
1380 * GQuarkdomain;
1381 * error domain, e.g. G_FILE_ERROR.
1382 * gintcode;
1383 * error code, e.g. G_FILE_ERROR_NOENT.
1384 * gchar*message;
1385 * human-readable informative error message.
1387 public struct GError
1389 GQuark domain;
1390 int code;
1391 char *message;
1396 * The GIConv struct wraps an
1397 * iconv() conversion descriptor. It contains private data
1398 * and should only be accessed using the following functions.
1400 public struct GIConv{}
1404 * Represents a precise time, with seconds and microseconds.
1405 * Similar to the struct timeval returned by
1406 * the gettimeofday() UNIX call.
1407 * glongtv_sec;
1408 * seconds.
1409 * glongtv_usec;
1410 * microseconds.
1412 public struct GTimeVal
1414 int tvSec;
1415 int tvUsec;
1420 * Main Gtk struct.
1421 * Represents a day between January 1, Year 1 and a few thousand years in
1422 * the future. None of its members should be accessed directly. If the
1423 * GDate is obtained from g_date_new(), it will
1424 * be safe to mutate but invalid and thus not safe for calendrical computations.
1425 * If it's declared on the stack, it will contain garbage so must be
1426 * initialized with g_date_clear(). g_date_clear() makes the date invalid
1427 * but sane. An invalid date doesn't represent a day, it's "empty." A
1428 * date becomes valid after you set it to a Julian day or you set a day,
1429 * month, and year.
1430 * guintjulian_days:32;
1431 * the Julian representation of the date
1432 * guintjulian:1;
1433 * this bit is set if julian_days is valid
1434 * guintdmy:1;
1435 * this is set if day, month and year are valid
1436 * guintday:6;
1437 * the day of the day-month-year representation of the date, as
1439 public struct GDate{}
1440 // uint julianDays : 32; /+* julian days representation - we use a
1441 // glib-Date-and-Time-Functions.html
1442 // * bitfield hoping that 64 bit platforms
1443 // glib-Date-and-Time-Functions.html
1444 // * will pack this whole struct inn one big
1445 // glib-Date-and-Time-Functions.html
1446 // * int
1447 // glib-Date-and-Time-Functions.html
1448 // +/
1449 // glib-Date-and-Time-Functions.html
1450 // uint julian : 1; /+* julian is valid +/
1451 // glib-Date-and-Time-Functions.html
1452 // uint dmy : 1; /+* dmy is valid +/
1453 // glib-Date-and-Time-Functions.html
1454 // /+* DMY representation +/
1455 // glib-Date-and-Time-Functions.html
1456 // uint day : 6;
1457 // glib-Date-and-Time-Functions.html
1458 // uint month : 4;
1459 // glib-Date-and-Time-Functions.html
1460 // uint year : 16;
1461 // glib-Date-and-Time-Functions.html
1465 * Main Gtk struct.
1466 * The GRand struct is an opaque data structure. It should only be
1467 * accessed through the g_rand_* functions.
1469 public struct GRand{}
1473 * Associates a string with a bit flag.
1474 * Used in g_parse_debug_string().
1475 * gchar*key;
1476 * the string
1477 * guintvalue;
1478 * the flag
1480 public struct GDebugKey
1482 char *key;
1483 uint value;
1488 * Main Gtk struct.
1489 * The data structure representing a lexical scanner.
1490 * You should set input_name after creating
1491 * the scanner, since it is used by the default message handler when
1492 * displaying warnings and errors. If you are scanning a file, the file
1493 * name would be a good choice.
1494 * The user_data and
1495 * max_parse_errors fields are not used.
1496 * If you need to associate extra data with the scanner you can place them here.
1497 * If you want to use your own message handler you can set the
1498 * msg_handler field. The type of the message
1499 * handler function is declared by GScannerMsgFunc.
1501 public struct GScanner{}
1502 // /+* unused fields +/
1503 // glib-Lexical-Scanner.html
1504 // void* userData;
1505 // glib-Lexical-Scanner.html
1506 // uint maxParseErrors;
1507 // glib-Lexical-Scanner.html
1508 // /+* _Error() increments this field +/
1509 // glib-Lexical-Scanner.html
1510 // uint parseErrors;
1511 // glib-Lexical-Scanner.html
1512 // /+* name of input stream, featured by the defaulx message handler +/
1513 // glib-Lexical-Scanner.html
1514 // char *inputName;
1515 // glib-Lexical-Scanner.html
1516 // /+* quarked data +/
1517 // glib-Lexical-Scanner.html
1518 // GData *qdata;
1519 // glib-Lexical-Scanner.html
1520 // /+* link into the scanner configuration +/
1521 // glib-Lexical-Scanner.html
1522 // GScannerConfig *config;
1523 // glib-Lexical-Scanner.html
1524 // /+* fields filled inn after _GetNextToken() +/
1525 // glib-Lexical-Scanner.html
1526 // GTokenType token;
1527 // glib-Lexical-Scanner.html
1528 // GTokenValue value;
1529 // glib-Lexical-Scanner.html
1530 // uint line;
1531 // glib-Lexical-Scanner.html
1532 // uint position;
1533 // glib-Lexical-Scanner.html
1534 // /+* fields filled inn after _PeekNextToken() +/
1535 // glib-Lexical-Scanner.html
1536 // GTokenType nextToken;
1537 // glib-Lexical-Scanner.html
1538 // GTokenValue nextValue;
1539 // glib-Lexical-Scanner.html
1540 // uint nextLine;
1541 // glib-Lexical-Scanner.html
1542 // uint nextPosition;
1543 // glib-Lexical-Scanner.html
1544 // /+* to be considered private +/
1545 // glib-Lexical-Scanner.html
1546 // GHashTable *symbolTable;
1547 // glib-Lexical-Scanner.html
1548 // int inputFd;
1549 // glib-Lexical-Scanner.html
1550 // char *text;
1551 // glib-Lexical-Scanner.html
1552 // char *textEnd;
1553 // glib-Lexical-Scanner.html
1554 // char *buffer;
1555 // glib-Lexical-Scanner.html
1556 // uint scopeId;
1557 // glib-Lexical-Scanner.html
1558 // /+* handler funct for _Warn and _Error +/
1559 // glib-Lexical-Scanner.html
1560 // GScannerMsgFunc msgHandler;
1561 // glib-Lexical-Scanner.html
1565 * Specifies the GScanner settings.
1566 * cset_skip_characters specifies which characters
1567 * should be skipped by the scanner (the default is the whitespace characters:
1568 * space, tab, carriage-return and line-feed).
1569 * cset_identifier_first specifies the characters
1570 * which can start identifiers (the default is G_CSET_a_2_z, "_", and
1571 * G_CSET_A_2_Z).
1572 * cset_identifier_nth specifies the characters
1573 * which can be used in identifiers, after the first character (the default
1574 * is G_CSET_a_2_z, "_0123456789", G_CSET_A_2_Z, G_CSET_LATINS,
1575 * G_CSET_LATINC).
1576 * cpair_comment_single specifies the characters
1577 * at the start and end of single-line comments. The default is "#\n" which
1578 * means that single-line comments start with a '#' and continue until a '\n'
1579 * (end of line).
1580 * case_sensitive specifies if symbols are
1581 * case sensitive (the default is FALSE).
1582 * skip_comment_multi specifies if multi-line
1583 * comments are skipped and not returned as tokens (the default is TRUE).
1584 * skip_comment_single specifies if single-line
1585 * comments are skipped and not returned as tokens (the default is TRUE).
1586 * scan_comment_multi specifies if multi-line
1587 * comments are recognized (the default is TRUE).
1588 * scan_identifier specifies if identifiers
1589 * are recognized (the default is TRUE).
1590 * scan_identifier_1char specifies if single-character
1591 * identifiers are recognized (the default is FALSE).
1592 * scan_identifier_NULL specifies if
1593 * NULL is reported as G_TOKEN_IDENTIFIER_NULL.
1594 * (the default is FALSE).
1595 * scan_symbols specifies if symbols are
1596 * recognized (the default is TRUE).
1597 * scan_binary specifies if binary numbers
1598 * are recognized (the default is FALSE).
1599 * scan_octal specifies if octal numbers
1600 * are recognized (the default is TRUE).
1601 * scan_float specifies if floating point numbers
1602 * are recognized (the default is TRUE).
1603 * scan_hex specifies if hexadecimal numbers
1604 * are recognized (the default is TRUE).
1605 * scan_hex_dollar specifies if '$' is recognized
1606 * as a prefix for hexadecimal numbers (the default is FALSE).
1607 * scan_string_sq specifies if strings can be
1608 * enclosed in single quotes (the default is TRUE).
1609 * scan_string_dq specifies if strings can be
1610 * enclosed in double quotes (the default is TRUE).
1611 * numbers_2_int specifies if binary, octal and
1612 * hexadecimal numbers are reported as G_TOKEN_INT (the default is TRUE).
1613 * int_2_float specifies if all numbers are
1614 * reported as G_TOKEN_FLOAT (the default is FALSE).
1615 * identifier_2_string specifies if identifiers
1616 * are reported as strings (the default is FALSE).
1617 * char_2_token specifies if characters
1618 * are reported by setting token = ch or as G_TOKEN_CHAR
1619 * (the default is TRUE).
1620 * symbol_2_token specifies if symbols
1621 * are reported by setting token = v_symbol or as
1622 * G_TOKEN_SYMBOL (the default is FALSE).
1623 * scope_0_fallback specifies if a symbol
1624 * is searched for in the default scope in addition to the current scope
1625 * (the default is FALSE).
1627 public struct GScannerConfig{}
1628 // /+* Character sets
1629 // glib-Lexical-Scanner.html
1630 // +/
1631 // glib-Lexical-Scanner.html
1632 // char *csetSkipCharacters; /+* default: " \t\n" +/
1633 // glib-Lexical-Scanner.html
1634 // char *csetIdentifierFirst;
1635 // glib-Lexical-Scanner.html
1636 // char *csetIdentifierNth;
1637 // glib-Lexical-Scanner.html
1638 // char *cpairCommentSingle; /+* default: "#\n" +/
1639 // glib-Lexical-Scanner.html
1640 // /+* Should symbol lookup work case sensitive?
1641 // glib-Lexical-Scanner.html
1642 // +/
1643 // glib-Lexical-Scanner.html
1644 // uint caseSensitive : 1;
1645 // glib-Lexical-Scanner.html
1646 // /+* Boolean values to be adjusted "on the fly"
1647 // glib-Lexical-Scanner.html
1648 // * to configure scanning behaviour.
1649 // glib-Lexical-Scanner.html
1650 // +/
1651 // glib-Lexical-Scanner.html
1652 // uint skipCommentMulti : 1; /+* C like comment +/
1653 // glib-Lexical-Scanner.html
1654 // uint skipCommentSingle : 1; /+* single line comment +/
1655 // glib-Lexical-Scanner.html
1656 // uint scanCommentMulti : 1; /+* scan multi line comments? +/
1657 // glib-Lexical-Scanner.html
1658 // uint scanIdentifier : 1;
1659 // glib-Lexical-Scanner.html
1660 // uint scanIdentifier1char : 1;
1661 // glib-Lexical-Scanner.html
1662 // uint scanIdentifierNULL : 1;
1663 // glib-Lexical-Scanner.html
1664 // uint scanSymbols : 1;
1665 // glib-Lexical-Scanner.html
1666 // uint scanBinary : 1;
1667 // glib-Lexical-Scanner.html
1668 // uint scanOctal : 1;
1669 // glib-Lexical-Scanner.html
1670 // uint scanFloat : 1;
1671 // glib-Lexical-Scanner.html
1672 // uint scanHex : 1; /+* `0x0ff0' +/
1673 // glib-Lexical-Scanner.html
1674 // uint scanHexDollar : 1; /+* `$0ff0' +/
1675 // glib-Lexical-Scanner.html
1676 // uint scanStringSq : 1; /+* string: 'anything' +/
1677 // glib-Lexical-Scanner.html
1678 // uint scanStringDq : 1; /+* string: "\\-escapes!\n" +/
1679 // glib-Lexical-Scanner.html
1680 // uint numbers2_Int : 1; /+* bin, octal, hex => int +/
1681 // glib-Lexical-Scanner.html
1682 // uint int2_Float : 1; /+* int => G_TOKEN_FLOAT? +/
1683 // glib-Lexical-Scanner.html
1684 // uint identifier2_String : 1;
1685 // glib-Lexical-Scanner.html
1686 // uint char2_Token : 1; /+* return G_TOKEN_CHAR? +/
1687 // glib-Lexical-Scanner.html
1688 // uint symbol2_Token : 1;
1689 // glib-Lexical-Scanner.html
1690 // uint scope0_Fallback : 1; /+* try scope 0 on lookups? +/
1691 // glib-Lexical-Scanner.html
1692 // uint storeInt64 : 1; /+* use value.vInt64 rather than vInt +/
1693 // glib-Lexical-Scanner.html
1694 // uint paddingDummy;
1695 // glib-Lexical-Scanner.html
1699 * Main Gtk struct.
1700 * The data structure used for automatic completion.
1701 * GList*items;
1702 * list of target items (strings or data structures).
1703 * GCompletionFuncfunc;
1704 * function which is called to get the string associated with a target
1706 public struct GCompletion{}
1707 // GList* items;
1708 // glib-Automatic-String-Completion.html
1709 // GCompletionFunc func;
1710 // glib-Automatic-String-Completion.html
1711 // char* prefix;
1712 // glib-Automatic-String-Completion.html
1713 // GList* cache;
1714 // glib-Automatic-String-Completion.html
1715 // GCompletionStrncmpFunc strncmpFunc;
1716 // glib-Automatic-String-Completion.html
1720 * Main Gtk struct.
1721 * Opaque datatype that records a start time.
1723 public struct GTimer{}
1727 * An opaque structure representing an opened directory.
1729 public struct GDir{}
1733 * The GMappedFile represents a file mapping created with
1734 * g_mapped_file_new(). It has only private members and should
1735 * not be accessed directly.
1737 public struct GMappedFile{}
1741 * Main Gtk struct.
1742 * A GOptionContext struct defines which options
1743 * are accepted by the commandline option parser. The struct has only private
1744 * fields and should not be directly accessed.
1746 public struct GOptionContext{}
1750 * A GOptionEntry defines a single option.
1751 * To have an effect, they must be added to a GOptionGroup with
1752 * g_option_context_add_main_entries() or g_option_group_add_entries().
1753 * constgchar*long_name;
1754 * The long name of an option can be used to specify it
1756 public struct GOptionEntry{}
1757 // char *longName;
1758 // glib-Commandline-option-parser.html
1759 // char shortName;
1760 // glib-Commandline-option-parser.html
1761 // int flags;
1762 // glib-Commandline-option-parser.html
1763 // GOptionArg arg;
1764 // glib-Commandline-option-parser.html
1765 // void* argData;
1766 // glib-Commandline-option-parser.html
1767 // char *description;
1768 // glib-Commandline-option-parser.html
1769 // char *argDescription;
1770 // glib-Commandline-option-parser.html
1774 * A GOptionGroup struct defines the options in a single
1775 * group. The struct has only private fields and should not be directly accessed.
1776 * All options in a group share the same translation function. Libaries which
1777 * need to parse commandline options are expected to provide a function for
1778 * getting a GOptionGroup holding their options, which
1779 * the application can then add to its GOptionContext.
1781 public struct GOptionGroup{}
1785 * Main Gtk struct.
1786 * A GPatternSpec is the 'compiled' form of a pattern.
1787 * This structure is opaque and its fields cannot be accessed directly.
1789 public struct GPatternSpec{}
1793 * Main Gtk struct.
1794 * A parse context is used to parse a stream of bytes that you expect to
1795 * contain marked-up text. See g_markup_parse_context_new(),
1796 * GMarkupParser, and so on for more details.
1798 public struct GMarkupParseContext{}
1802 * Any of the fields in GMarkupParser can be NULL, in which case they
1803 * will be ignored. Except for the error function, any of these
1804 * callbacks can set an error; in particular the
1805 * G_MARKUP_ERROR_UNKNOWN_ELEMENT, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
1806 * and G_MARKUP_ERROR_INVALID_CONTENT errors are intended to be set
1807 * from these callbacks. If you set an error from a callback,
1808 * g_markup_parse_context_parse() will report that error back to its caller.
1809 * start_element()
1810 * Callback to invoke when the opening tag of an element
1812 public struct GMarkupParser{}
1813 // /+* Called for open tags <foo bar="baz"> +/
1814 // glib-Simple-XML-Subset-Parser.html
1815 // void (*startElement) (GMarkupParseContext *context,
1816 // glib-Simple-XML-Subset-Parser.html
1817 // char *elementName,
1818 // glib-Simple-XML-Subset-Parser.html
1819 // char **attributeNames,
1820 // glib-Simple-XML-Subset-Parser.html
1821 // char **attributeValues,
1822 // glib-Simple-XML-Subset-Parser.html
1823 // void* userData,
1824 // glib-Simple-XML-Subset-Parser.html
1825 // GError **error);
1826 // glib-Simple-XML-Subset-Parser.html
1827 // /+* Called for close tags </foo> +/
1828 // glib-Simple-XML-Subset-Parser.html
1829 // void (*endElement) (GMarkupParseContext *context,
1830 // glib-Simple-XML-Subset-Parser.html
1831 // char *elementName,
1832 // glib-Simple-XML-Subset-Parser.html
1833 // void* userData,
1834 // glib-Simple-XML-Subset-Parser.html
1835 // GError **error);
1836 // glib-Simple-XML-Subset-Parser.html
1837 // /+* Called for character data +/
1838 // glib-Simple-XML-Subset-Parser.html
1839 // /+* text is not nul-terminated +/
1840 // glib-Simple-XML-Subset-Parser.html
1841 // void (*text) (GMarkupParseContext *context,
1842 // glib-Simple-XML-Subset-Parser.html
1843 // char *text,
1844 // glib-Simple-XML-Subset-Parser.html
1845 // uint textLen,
1846 // glib-Simple-XML-Subset-Parser.html
1847 // void* userData,
1848 // glib-Simple-XML-Subset-Parser.html
1849 // GError **error);
1850 // glib-Simple-XML-Subset-Parser.html
1851 // /+* Called for strings that should be re-saved verbatim inn this same
1852 // glib-Simple-XML-Subset-Parser.html
1853 // * position, but are not otherwise interpretable. At the moment
1854 // glib-Simple-XML-Subset-Parser.html
1855 // * this includes comments and processing instructions.
1856 // glib-Simple-XML-Subset-Parser.html
1857 // +/
1858 // glib-Simple-XML-Subset-Parser.html
1859 // /+* text is not nul-terminated. +/
1860 // glib-Simple-XML-Subset-Parser.html
1861 // void (*passthrough) (GMarkupParseContext *context,
1862 // glib-Simple-XML-Subset-Parser.html
1863 // char *passthroughText,
1864 // glib-Simple-XML-Subset-Parser.html
1865 // uint textLen,
1866 // glib-Simple-XML-Subset-Parser.html
1867 // void* userData,
1868 // glib-Simple-XML-Subset-Parser.html
1869 // GError **error);
1870 // glib-Simple-XML-Subset-Parser.html
1871 // /+* Called on error, including one set by other
1872 // glib-Simple-XML-Subset-Parser.html
1873 // * methods inn the vtable. The GError should not be freed.
1874 // glib-Simple-XML-Subset-Parser.html
1875 // +/
1876 // glib-Simple-XML-Subset-Parser.html
1877 // void (*error) (GMarkupParseContext *context,
1878 // glib-Simple-XML-Subset-Parser.html
1879 // GError *error,
1880 // glib-Simple-XML-Subset-Parser.html
1881 // void* userData);
1882 // glib-Simple-XML-Subset-Parser.html
1886 * Main Gtk struct.
1887 * The GKeyFile struct contains only private fields
1888 * and should not be used directly.
1890 public struct GKeyFile{}
1894 * Main Gtk struct.
1895 * Warning
1896 * GMemChunk is deprecated and should not be used in newly-written code.
1897 * The GMemChunk struct is an opaque data structure representing a memory
1898 * chunk. It should be accessed only through the use of the following functions.
1900 public struct GMemChunk{}
1904 * Main Gtk struct.
1905 * The GList struct is used for each element in a doubly-linked list.
1906 * gpointerdata;
1907 * holds the element's data, which can be a pointer to any kind of data,
1909 public struct GList{}
1910 // void* data;
1911 // glib-Doubly-Linked-Lists.html
1912 // GList *next;
1913 // glib-Doubly-Linked-Lists.html
1914 // GList *prev;
1915 // glib-Doubly-Linked-Lists.html
1919 * Main Gtk struct.
1920 * The GSList struct is used for each element in the singly-linked list.
1921 * gpointerdata;
1922 * holds the element's data, which can be a pointer to any kind of data,
1924 public struct GSList{}
1925 // void* data;
1926 // glib-Singly-Linked-Lists.html
1927 // GSList *next;
1928 // glib-Singly-Linked-Lists.html
1932 * Main Gtk struct.
1933 * Contains the public fields of a Queue.
1934 * GList*head;
1935 * a pointer to the first element of the queue.
1936 * GList*tail;
1937 * a pointer to the last element of the queue.
1938 * guintlength;
1939 * the number of elements in the queue.
1941 public struct GQueue{}
1942 // GList *head;
1943 // glib-Double-ended-Queues.html
1944 // GList *tail;
1945 // glib-Double-ended-Queues.html
1946 // uint length;
1947 // glib-Double-ended-Queues.html
1951 * Main Gtk struct.
1952 * Each piece of memory that is pushed onto the stack
1953 * is cast to a GTrashStack*.
1954 * GTrashStack*next;
1955 * pointer to the previous element of the stack,
1956 * gets stored in the first sizeof (gpointer)
1957 * bytes of the element.
1959 public struct GTrashStack{}
1960 // GTrashStack *next;
1961 // glib-Trash-Stacks.html
1965 * Main Gtk struct.
1966 * The GHashTable struct is an opaque data structure to represent a
1967 * Hash Table.
1968 * It should only be accessed via the following functions.
1970 public struct GHashTable{}
1974 * Main Gtk struct.
1975 * The GString struct contains the public fields of a GString.
1976 * The str field points to the character data.
1977 * It may move as text is added.
1978 * The len field contains the length of the string,
1979 * not including the terminating nul byte.
1980 * The str field is nul-terminated and so can be used as an ordinary C
1981 * string. But it may be moved when text is appended or inserted into the
1982 * string.
1984 public struct GString
1986 char *str;
1987 uint len;
1988 uint allocatedLen;
1993 * Main Gtk struct.
1994 * An opaque data structure representing String Chunks.
1995 * It should only be accessed by using the following functions.
1997 public struct GStringChunk{}
2001 * Main Gtk struct.
2002 * Contains the public fields of an Array.
2003 * gchar*data;
2004 * a pointer to the element data. The data may be moved as elements are
2005 * added to the GArray.
2006 * guintlen;
2007 * the number of elements in the GArray.
2009 public struct GArray
2011 char *data;
2012 uint len;
2017 * Main Gtk struct.
2018 * Contains the public fields of a pointer array.
2019 * gpointer*pdata;
2020 * points to the array of pointers, which may be moved when the array grows.
2021 * guintlen;
2022 * number of pointers in the array.
2024 public struct GPtrArray
2026 void* *pdata;
2027 uint len;
2032 * Main Gtk struct.
2033 * The GByteArray struct allows access to the public fields of a GByteArray.
2034 * guint8*data;
2035 * a pointer to the element data. The data may be moved as elements are
2036 * added to the GByteArray.
2037 * guintlen;
2038 * the number of elements in the GByteArray.
2040 public struct GByteArray
2042 byte *data;
2043 uint len;
2048 * Main Gtk struct.
2049 * The GTree struct is an opaque data structure representing a
2050 * Balanced Binary Tree.
2051 * It should be accessed only by using the following functions.
2053 public struct GTree{}
2057 * Main Gtk struct.
2058 * The GNode struct represents one node in a
2059 * N-ary Tree.
2060 * The data field contains the actual data of the node.
2061 * The next and prev
2062 * fields point to the node's siblings (a sibling is another GNode with the
2063 * same parent).
2064 * The parent field points to the parent of the GNode,
2065 * or is NULL if the GNode is the root of the tree.
2066 * The children field points to the first child of the
2067 * GNode. The other children are accessed by using the
2068 * next pointer of each child.
2070 public struct GNode{}
2071 // void* data;
2072 // glib-N-ary-Trees.html
2073 // GNode *next;
2074 // glib-N-ary-Trees.html
2075 // GNode *prev;
2076 // glib-N-ary-Trees.html
2077 // GNode *parent;
2078 // glib-N-ary-Trees.html
2079 // GNode *children;
2080 // glib-N-ary-Trees.html
2084 * Main Gtk struct.
2085 * The GData struct is an opaque data structure to represent a
2086 * Keyed Data List.
2087 * It should only be accessed via the following functions.
2089 public struct GData{}
2093 * Main Gtk struct.
2094 * The GRelation struct is an opaque data structure to represent a
2095 * Relation.
2096 * It should only be accessed via the following functions.
2098 public struct GRelation{}
2102 * The GTuples struct is used to return records (or tuples) from the
2103 * GRelation by g_relation_select().
2104 * It only contains one public member - the number of records that matched.
2105 * To access the matched records, you must use g_tuples_index().
2106 * guintlen;
2107 * the number of records that matched.
2109 public struct GTuples
2111 uint len;
2116 * Main Gtk struct.
2117 * The GCache struct is an opaque data structure containing information about
2118 * a GCache. It should only be accessed via the following functions.
2120 public struct GCache{}
2124 * Main Gtk struct.
2125 * Warning
2126 * GAllocator is deprecated and should not be used in newly-written code.
2127 * The GAllocator struct contains private data. and
2128 * should only be accessed using the following functions.
2130 public struct GAllocator{}
2134 * Checks the version of the GLib library.
2135 * Returns TRUE if the version of the GLib header files is the same
2136 * as or newer than the passed-in version.
2137 * Example1.Checking the version of the GLib library
2138 * if (!GLIB_CHECK_VERSION (1, 2, 0))
2139 * g_error ("GLib version 1.2.0 or above is needed");
2140 * major:
2141 * the major version number.
2142 * minor:
2143 * the minor version number.
2144 * micro:
2145 * the micro version number.
2147 // TODO
2148 // #define GLIB_CHECK_VERSION(major,minor,micro)
2151 * Warning
2152 * 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.
2153 * Creates a new GMainLoop for the default main loop.
2154 * is_running:
2155 * set to TRUE to indicate that the loop is running. This is not
2156 * very important since calling g_main_run() will set this to TRUE anyway.
2157 * Returns:
2158 * a new GMainLoop.
2160 // TODO
2161 // #define g_main_new(is_running)
2164 * Warning
2165 * 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.
2166 * Frees the memory allocated for the GMainLoop.
2167 * loop:
2168 * a GMainLoop.
2170 // TODO
2171 // #define g_main_destroy(loop)
2174 * Warning
2175 * 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.
2176 * Runs a main loop until it stops running.
2177 * loop:
2178 * a GMainLoop.
2180 // TODO
2181 // #define g_main_run(loop)
2184 * Warning
2185 * 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.
2186 * Stops the GMainLoop. If g_main_run() was called to run the GMainLoop,
2187 * it will now return.
2188 * loop:
2189 * a GMainLoop.
2191 // TODO
2192 // #define g_main_quit(loop)
2195 * Warning
2196 * 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.
2197 * Checks if the main loop is running.
2198 * loop:
2199 * a GMainLoop.
2200 * Returns:
2201 * TRUE if the main loop is running.
2203 // TODO
2204 // #define g_main_is_running(loop)
2207 * Warning
2208 * 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.
2209 * Runs a single iteration for the default GMainContext.
2210 * may_block:
2211 * set to TRUE if it should block (i.e. wait) until an event source
2212 * becomes ready. It will return after an event source has been processed.
2213 * If set to FALSE it will return immediately if no event source is ready to be
2214 * processed.
2215 * Returns:
2216 * TRUE if more events are pending.
2218 // TODO
2219 // #define g_main_iteration(may_block)
2222 * Warning
2223 * g_main_pending has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_context_pending() instead.
2224 * Checks if any events are pending for the default GMainContext
2225 * (i.e. ready to be processed).
2226 * Returns:
2227 * TRUE if any events are pending.
2229 // TODO
2230 // #define g_main_pending()
2233 * Warning
2234 * 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() instead.
2235 * Sets the function to use for the handle polling of file descriptors
2236 * for the default main context.
2237 * func:
2238 * the function to call to poll all file descriptors.
2240 // TODO
2241 // #define g_main_set_poll_func(func)
2244 * Allocates n_structs elements of type struct_type.
2245 * The returned pointer is cast to a pointer to the given type.
2246 * If n_structs is 0 it returns NULL.
2247 * Since the returned pointer is already casted to the right type,
2248 * it is normally unnecessary to cast it explicitly, and doing
2249 * so might hide memory allocation errors.
2250 * struct_type:
2251 * the type of the elements to allocate.
2252 * n_structs:
2253 * the number of elements to allocate.
2254 * Returns:
2255 * a pointer to the allocated memory, cast to a pointer to struct_type.
2257 // TODO
2258 // #define g_new(struct_type, n_structs)
2261 * Allocates n_structs elements of type struct_type, initialized to 0's.
2262 * The returned pointer is cast to a pointer to the given type.
2263 * If n_structs is 0 it returns NULL.
2264 * Since the returned pointer is already casted to the right type,
2265 * it is normally unnecessary to cast it explicitly, and doing
2266 * so might hide memory allocation errors.
2267 * struct_type:
2268 * the type of the elements to allocate.
2269 * n_structs:
2270 * the number of elements to allocate.
2271 * Returns:
2272 * a pointer to the allocated memory, cast to a pointer to struct_type.
2274 // TODO
2275 // #define g_new0(struct_type, n_structs)
2278 * Reallocates the memory pointed to by mem, so that it now has space for
2279 * n_structs elements of type struct_type. It returns the new address of
2280 * the memory, which may have been moved.
2281 * struct_type:
2282 * the type of the elements to allocate.
2283 * mem:
2284 * the currently allocated memory.
2285 * n_structs:
2286 * the number of elements to allocate.
2287 * Returns:
2288 * a pointer to the new allocated memory, cast to a pointer to struct_type.
2290 // TODO
2291 // #define g_renew(struct_type, mem, n_structs)
2294 * Attempts to allocate n_structs elements of type struct_type, and returns
2295 * NULL on failure. Contrast with g_new(), which aborts the program on failure.
2296 * The returned pointer is cast to a pointer to the given type.
2297 * If n_structs is 0 it returns NULL.
2298 * struct_type:
2299 * the type of the elements to allocate.
2300 * n_structs:
2301 * the number of elements to allocate.
2302 * Returns:
2303 * a pointer to the allocated memory, cast to a pointer to struct_type.
2304 * Since 2.8
2306 // TODO
2307 // #define g_try_new(struct_type, n_structs)
2310 * Attempts to allocate n_structs elements of type struct_type, initialized
2311 * to 0's, and returns NULL on failure. Contrast with g_new0(), which aborts
2312 * the program on failure.
2313 * The returned pointer is cast to a pointer to the given type.
2314 * If n_counts is 0 it returns NULL.
2315 * struct_type:
2316 * the type of the elements to allocate.
2317 * n_structs:
2318 * the number of elements to allocate.
2319 * Returns:
2320 * a pointer to the allocated memory, cast to a pointer to struct_type.
2321 * Since 2.8
2323 // TODO
2324 // #define g_try_new0(struct_type, n_structs)
2327 * Attempts to reallocate the memory pointed to by mem, so that it now has
2328 * space for n_structs elements of type struct_type, and returns NULL on
2329 * failure. Contrast with g_renew(), which aborts the program on failure.
2330 * It returns the new address of the memory, which may have been moved.
2331 * struct_type:
2332 * the type of the elements to allocate.
2333 * mem:
2334 * the currently allocated memory.
2335 * n_structs:
2336 * the number of elements to allocate.
2337 * Returns:
2338 * a pointer to the new allocated memory, cast to a pointer to struct_type.
2339 * Since 2.8
2341 // TODO
2342 // #define g_try_renew(struct_type, mem, n_structs)
2345 * Allocates size bytes on the stack; these bytes will be freed when the current
2346 * stack frame is cleaned up. This macro essentially just wraps the
2347 * alloca() function present on most UNIX variants.
2348 * Thus it provides the same advantages and pitfalls as alloca():
2349 * + alloca() is very fast, as on most systems it's implemented by just adjusting
2350 * the stack pointer register.
2351 * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
2352 * blocks just build up and are released together at function end.
2353 * - Allocation sizes have to fit into the current stack frame. For instance in a
2354 * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
2355 * so be sparse with alloca() uses.
2356 * - Allocation failure due to insufficient stack space is not indicated with a NULL
2357 * return like e.g. with malloc(). Instead, most systems probably handle it the same
2358 * way as out of stack space situations from infinite function recursion, i.e.
2359 * with a segmentation fault.
2360 * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
2361 * Stack space allocated with alloca() in the same scope as a variable sized array
2362 * will be freed together with the variable sized array upon exit of that scope, and
2363 * not upon exit of the enclosing function scope.
2364 * size:
2365 * number of bytes to allocate.
2366 * Returns:
2367 * space for size bytes, allocated on the stack
2369 // TODO
2370 // #define g_alloca(size)
2373 * Wraps g_alloca() in a more typesafe manner.
2374 * struct_type:
2375 * Type of memory chunks to be allocated
2376 * n_structs:
2377 * Number of chunks to be allocated
2378 * Returns:
2379 * Pointer to stack space for n_structs chunks of type struct_type
2381 // TODO
2382 // #define g_newa(struct_type, n_structs)
2385 * Copies a block of memory len bytes long, from src to dest.
2386 * The source and destination areas may overlap.
2387 * In order to use this function, you must include
2388 * string.h yourself, because this macro will
2389 * typically simply resolve to memmove() and GLib does not include
2390 * string.h for you.
2391 * dest:
2392 * the destination address to copy the bytes to.
2393 * src:
2394 * the source address to copy the bytes from.
2395 * len:
2396 * the number of bytes to copy.
2398 // TODO
2399 // #define g_memmove(dest,src,len)
2402 * Returns from the current function if the expression is not true.
2403 * If the expression evaluates to FALSE, a critical message is logged and
2404 * the function returns. This can only be used in functions which do not return
2405 * a value.
2406 * expr:
2407 * the expression to check.
2409 // TODO
2410 // #define g_return_if_fail(expr)
2413 * Returns from the current function, returning the value val, if the expression
2414 * is not true.
2415 * If the expression evaluates to FALSE, a critical message is logged and
2416 * val is returned.
2417 * expr:
2418 * the expression to check.
2419 * val:
2420 * the value to return from the current function if the expression is not
2421 * true.
2423 // TODO
2424 // #define g_return_val_if_fail(expr,val)
2427 * Logs a critical message and returns from the current function.
2428 * This can only be used in functions which do not return a value.
2430 // TODO
2431 // #define g_return_if_reached()
2434 * Logs a critical message and returns val.
2435 * val:
2436 * the value to return from the current function.
2438 // TODO
2439 // #define g_return_val_if_reached(val)
2442 * Debugging macro to terminate the application if the assertion fails.
2443 * If the assertion fails (i.e. the expression is not true), an error message
2444 * is logged and the application is terminated.
2445 * The macro can be turned off in final releases of code by defining
2446 * G_DISABLE_ASSERT when compiling the application.
2447 * expr:
2448 * the expression to check.
2450 // TODO
2451 // #define g_assert(expr)
2454 * Debugging macro to terminate the application if it is ever reached.
2455 * If it is reached, an error message is logged and the application is terminated.
2456 * The macro can be turned off in final releases of code by defining
2457 * G_DISABLE_ASSERT when compiling the application.
2459 // TODO
2460 // #define g_assert_not_reached()
2463 * Inserts a breakpoint instruction into the code (on x86 machines only).
2465 // TODO
2466 // #define G_BREAKPOINT()
2469 * A convenience function/macro to log a normal message.
2470 * ...:
2471 * format string, followed by parameters to insert into the format string (as with printf())
2472 * ...:
2473 * ...:
2474 * ...:
2475 * ...:
2476 * ...:
2477 * ...:
2478 * ...:
2479 * ...:
2480 * ...:
2481 * ...:
2482 * ...:
2483 * ...:
2484 * ...:
2486 // TODO
2487 // #define g_message(...)
2490 * A convenience function/macro to log a warning message.
2491 * You can make warnings fatal at runtime by setting the G_DEBUG environment
2492 * variable (see Running GLib Applications).
2493 * ...:
2494 * format string, followed by parameters to insert into the format string (as with printf())
2495 * ...:
2496 * ...:
2497 * ...:
2498 * ...:
2499 * ...:
2500 * ...:
2501 * ...:
2502 * ...:
2503 * ...:
2504 * ...:
2505 * ...:
2506 * ...:
2507 * ...:
2509 // TODO
2510 // #define g_warning(...)
2513 * Logs a "critical warning" (G_LOG_LEVEL_CRITICAL). It's more or less
2514 * application-defined what constitutes a critical vs. a regular
2515 * warning. You could call g_log_set_always_fatal() to make critical
2516 * warnings exit the program, then use g_critical() for fatal errors, for
2517 * example.
2518 * You can also make critical warnings fatal at runtime by setting
2519 * the G_DEBUG environment variable (see
2520 * Running GLib Applications).
2521 * ...:
2522 * format string, followed by parameters to insert into the format string (as with printf())
2523 * ...:
2524 * ...:
2525 * ...:
2526 * ...:
2527 * ...:
2528 * ...:
2529 * ...:
2530 * ...:
2531 * ...:
2532 * ...:
2533 * ...:
2534 * ...:
2535 * ...:
2537 // TODO
2538 // #define g_critical(...)
2541 * A convenience function/macro to log an error message.
2542 * Error messages are always fatal, resulting in a call to
2543 * abort() to terminate the application.
2544 * This function will result in a core dump; don't use it for errors you
2545 * expect. Using this function indicates a bug in your program, i.e. an
2546 * assertion failure.
2547 * ...:
2548 * format string, followed by parameters to insert into the format string (as with printf())
2549 * ...:
2550 * ...:
2551 * ...:
2552 * ...:
2553 * ...:
2554 * ...:
2555 * ...:
2556 * ...:
2557 * ...:
2558 * ...:
2559 * ...:
2560 * ...:
2561 * ...:
2563 // TODO
2564 // #define g_error(...)
2567 * A convenience function/macro to log a debug message.
2568 * ...:
2569 * format string, followed by parameters to insert into the format string (as with printf())
2570 * ...:
2571 * ...:
2572 * ...:
2573 * ...:
2574 * ...:
2575 * ...:
2576 * ...:
2577 * ...:
2578 * ...:
2579 * ...:
2580 * ...:
2581 * ...:
2582 * ...:
2583 * Since 2.6
2585 // TODO
2586 // #define g_debug(...)
2589 * Removes leading and trailing whitespace from a string. See g_strchomp() and
2590 * g_strchug().
2591 * string:
2592 * a string to remove the leading and trailing whitespace from.
2594 // TODO
2595 // #define g_strstrip( string )
2598 * Skips to the next character in a UTF-8 string. The string must be
2599 * valid; this macro is as fast as possible, and has no error-checking.
2600 * You would use this macro to iterate over a string character by
2601 * character. The macro returns the start of the next UTF-8 character.
2602 * Before using this macro, use g_utf8_validate() to validate strings
2603 * that may contain invalid UTF-8.
2604 * p:
2605 * Pointer to the start of a valid UTF-8 character.
2607 // TODO
2608 // #define g_utf8_next_char(p)
2611 * Marks a string for translation, gets replaced with the translated string
2612 * at runtime.
2613 * String:
2614 * the string to be translated
2615 * Since 2.4
2617 // TODO
2618 // #define _(String)
2621 * Like _(), but applies g_strip_context() to the translation. This has the
2622 * advantage that the string can be adorned with a prefix to guarantee
2623 * uniqueness and provide context to the translator.
2624 * One use case given in the gettext manual is GUI translation, where one could
2625 * e.g. disambiguate two "Open" menu entries as "File|Open" and "Printer|Open".
2626 * Another use case is the string "Russian" which may have to be translated
2627 * differently depending on whether it's the name of a character set or a
2628 * language. This could be solved by using "charset|Russian" and
2629 * "language|Russian".
2630 * String:
2631 * the string to be translated, with a '|'-separated prefix which
2632 * must not be translated
2633 * Since 2.4
2635 // TODO
2636 // #define Q_(String)
2639 * Marks a string for translation, gets replaced with the untranslated string
2640 * at runtime. This is useful in situations where the translated strings can't
2641 * be directly used, e.g. in string array initializers.
2643 * static const char *messages[] = {
2644 * N_("some very meaningful message"),
2645 * N_("and another one")
2646 * };
2647 * const char *string;
2648 * ...
2649 * string
2650 * = index > 1 ? _("a default message") : gettext (messages[index]);
2651 * fputs (string);
2652 * ...
2654 * String:
2655 * the string to be translated
2656 * Since 2.4
2658 // TODO
2659 // #define N_(String)
2662 * Returns a random gboolean from rand_. This corresponds to a unbiased
2663 * coin toss.
2664 * rand_:
2665 * a GRand.
2666 * Returns:
2667 * a random gboolean.
2669 // TODO
2670 // #define g_rand_boolean(rand_)
2673 * Returns a random gboolean. This corresponds to a unbiased coin toss.
2674 * Returns:
2675 * a random gboolean.
2677 // TODO
2678 // #define g_random_boolean()
2681 * Warning
2682 * 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.
2683 * scanner:
2684 * a GScanner.
2686 // TODO
2687 // #define g_scanner_freeze_symbol_table(scanner)
2690 * Warning
2691 * 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.
2692 * scanner:
2693 * a GScanner.
2695 // TODO
2696 // #define g_scanner_thaw_symbol_table(scanner)
2699 * Warning
2700 * 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.
2701 * Adds a symbol to the default scope.
2702 * scanner:
2703 * a GScanner.
2704 * symbol:
2705 * the symbol to add.
2706 * value:
2707 * the value of the symbol.
2709 // TODO
2710 // #define g_scanner_add_symbol( scanner, symbol, value )
2713 * Warning
2714 * 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.
2715 * Removes a symbol from the default scope.
2716 * scanner:
2717 * a GScanner.
2718 * symbol:
2719 * the symbol to remove.
2721 // TODO
2722 // #define g_scanner_remove_symbol( scanner, symbol )
2725 * Warning
2726 * 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.
2727 * Calls a function for each symbol in the default scope.
2728 * scanner:
2729 * a GScanner.
2730 * func:
2731 * the function to call with each symbol.
2732 * data:
2733 * data to pass to the function.
2735 // TODO
2736 // #define g_scanner_foreach_symbol( scanner, func, data )
2739 * Provided for UNIX emulation on Windows; see documentation for pipe()
2740 * in any UNIX manual.
2741 * phandles:
2742 * file descriptors, the first one for reading, the second one for writing.
2744 // TODO
2745 // #define pipe(phandles) _pipe (phandles, 4096, _O_BINARY)
2748 * On Windows, this macro defines a DllMain() function
2749 * that stores the actual DLL name that the code being compiled will be
2750 * included in.
2751 * On non-Windows platforms, expands to nothing.
2752 * static:
2753 * empty or "static".
2754 * dll_name:
2755 * the name of the (pointer to the) char array where the DLL name
2756 * will be stored. If this is used, you must also include
2757 * windows.h. If you need a more complex DLL entry
2758 * point function, you cannot use this.
2760 // TODO
2761 // #define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
2764 * On Windows, this macro defines an expression which evaluates to TRUE
2765 * if the code is running on a version of Windows where the wide
2766 * character versions of the Win32 API functions, and the wide chaacter
2767 * versions of the C library functions work. (They are always present in
2768 * the DLLs, but don't work on Windows 9x and Me.)
2769 * On non-Windows platforms, it is not defined.
2770 * Since 2.6
2772 // TODO
2773 // #define G_WIN32_HAVE_WIDECHAR_API() TRUE
2776 * On Windows, this macro defines an expression which evaluates to TRUE
2777 * if the code is running on an NT-based Windows operating system.
2778 * On non-Windows platforms, it is not defined.
2779 * Since 2.6
2781 // TODO
2782 // #define G_WIN32_IS_NT_BASED() TRUE
2785 * A convenience macro to allocate a block of memory from the slice allocator.
2786 * It calls g_slice_alloc() with sizeof (type) and casts the returned pointer
2787 * to a pointer of the given type, avoiding a type cast in the source code.
2788 * Note that the underlying slice allocation mechanism can
2789 * be changed with the G_SLICE=always-malloc
2790 * environment variable.
2791 * type:
2792 * the type to allocate, typically a structure name
2793 * Returns:
2794 * a pointer to the allocated block, cast to a pointer to type.
2795 * Since 2.10
2797 // TODO
2798 // #define g_slice_new(type)
2801 * A convenience macro to allocate a block of memory from the slice allocator
2802 * and set the memory to 0. It calls g_slice_alloc0() with sizeof (type) and
2803 * casts the returned pointer to a pointer of the given type, avoiding a type
2804 * cast in the source code.
2805 * Note that the underlying slice allocation mechanism can
2806 * be changed with the G_SLICE=always-malloc
2807 * environment variable.
2808 * type:
2809 * the type to allocate, typically a structure name
2810 * Returns:
2811 * a pointer to the allocated block, cast to a pointer to type.
2812 * Since 2.10
2814 // TODO
2815 // #define g_slice_new0(type)
2818 * A convenience macro to free a block of memory that has been allocated
2819 * from the slice allocator. It calls g_slice_free1() using
2820 * sizeof (type) as the block size.
2821 * Note that the exact release behaviour can be changed with the
2822 * G_DEBUG=gc-friendly environment variable.
2823 * type:
2824 * the type of the block to free, typically a structure name
2825 * mem:
2826 * a pointer to the block to free
2827 * Since 2.10
2829 // TODO
2830 // #define g_slice_free(type, mem)
2833 * Frees a linked list of memory blocks of structure type type.
2834 * The memory blocks must be equal-sized, allocated via
2835 * g_slice_alloc() or g_slice_alloc0() and linked together by a
2836 * next pointer (similar to GSList). The name of the
2837 * next field in type is passed as third argument.
2838 * Note that the exact release behaviour can be changed with the
2839 * G_DEBUG=gc-friendly environment variable.
2840 * type:
2841 * the type of the mem_chain blocks
2842 * mem_chain:
2843 * a pointer to the first block of the chain
2844 * next:
2845 * the field name of the next pointer in type
2846 * Since 2.10
2847 * [5]
2848 * [Bonwick94] Jeff Bonwick, The slab allocator: An object-caching kernel
2849 * memory allocator. USENIX 1994, and
2850 * [Bonwick01] Bonwick and Jonathan Adams, Magazines and vmem: Extending the
2851 * slab allocator to many cpu's and arbitrary resources. USENIX 2001
2853 // TODO
2854 // #define g_slice_free_chain(type, mem_chain, next)
2857 * Warning
2858 * g_mem_chunk_create has been deprecated since version 2.10 and should not be used in newly-written code. Use the slice
2859 * allocator instead
2860 * A convenience macro for creating a new GMemChunk.
2861 * It calls g_mem_chunk_new(), using the given type to create the GMemChunk
2862 * name. The atom size is determined using sizeof(), and the
2863 * area size is calculated by multiplying the pre_alloc parameter with
2864 * the atom size.
2865 * type:
2866 * the type of the atoms, typically a structure name.
2867 * pre_alloc:
2868 * the number of atoms to store in each block of memory.
2869 * alloc_type:
2870 * the type of the GMemChunk.
2871 * G_ALLOC_AND_FREE is used if the atoms will be freed individually.
2872 * G_ALLOC_ONLY should be used if atoms will never be freed individually.
2873 * G_ALLOC_ONLY is quicker, since it does not need to track free atoms,
2874 * but it obviously wastes memory if you no longer need many of the atoms.
2875 * Returns:
2876 * the new GMemChunk.
2878 // TODO
2879 // #define g_mem_chunk_create(type, pre_alloc, alloc_type)
2882 * Warning
2883 * g_chunk_new has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_new() instead
2884 * A convenience macro to allocate an atom of memory from a GMemChunk.
2885 * It calls g_mem_chunk_alloc() and casts the returned atom to a pointer to
2886 * the given type, avoiding a type cast in the source code.
2887 * type:
2888 * the type of the GMemChunk atoms, typically a structure name.
2889 * chunk:
2890 * a GMemChunk.
2891 * Returns:
2892 * a pointer to the allocated atom, cast to a pointer to type.
2894 // TODO
2895 // #define g_chunk_new(type, chunk)
2898 * Warning
2899 * g_chunk_new0 has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_new0() instead
2900 * A convenience macro to allocate an atom of memory from a GMemChunk.
2901 * It calls g_mem_chunk_alloc0() and casts the returned atom to a pointer to
2902 * the given type, avoiding a type cast in the source code.
2903 * type:
2904 * the type of the GMemChunk atoms, typically a structure name.
2905 * chunk:
2906 * a GMemChunk.
2907 * Returns:
2908 * a pointer to the allocated atom, cast to a pointer to type.
2910 // TODO
2911 // #define g_chunk_new0(type, chunk)
2914 * Warning
2915 * g_chunk_free has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_free() instead
2916 * A convenience macro to free an atom of memory from a GMemChunk.
2917 * It simply switches the arguments and calls g_mem_chunk_free()
2918 * It is included simply to complement the other convenience macros, g_chunk_new()
2919 * and g_chunk_new0().
2920 * mem:
2921 * a pointer to the atom to be freed.
2922 * mem_chunk:
2923 * a GMemChunk.
2925 // TODO
2926 // #define g_chunk_free(mem, mem_chunk)
2929 * A convenience macro to gets the previous element in a GList.
2930 * list:
2931 * an element in a GList.
2932 * Returns:
2933 * the previous element, or NULL if there are no previous elements.
2935 // TODO
2936 // #define g_list_previous(list)
2939 * A convenience macro to gets the next element in a GList.
2940 * list:
2941 * an element in a GList.
2942 * Returns:
2943 * the next element, or NULL if there are no more elements.
2945 // TODO
2946 // #define g_list_next(list)
2949 * A convenience macro to gets the next element in a GSList.
2950 * slist:
2951 * an element in a GSList.
2952 * Returns:
2953 * the next element, or NULL if there are no more elements.
2955 // TODO
2956 // #define g_slist_next(slist)
2959 * Warning
2960 * g_hash_table_freeze is deprecated and should not be used in newly-written code.
2961 * This function is deprecated and will be removed in the next major
2962 * release of GLib. It does nothing.
2963 * hash_table:
2964 * a GHashTable
2966 // TODO
2967 // #define g_hash_table_freeze(hash_table)
2970 * Warning
2971 * g_hash_table_thaw is deprecated and should not be used in newly-written code.
2972 * This function is deprecated and will be removed in the next major
2973 * release of GLib. It does nothing.
2974 * hash_table:
2975 * a GHashTable
2977 // TODO
2978 // #define g_hash_table_thaw(hash_table)
2981 * Adds the value on to the end of the array.
2982 * The array will grow in size automatically if necessary.
2983 * Note
2984 * g_array_append_val() is a macro which uses a reference to the value
2985 * parameter v. This means that you cannot use it with literal values
2986 * such as "27". You must use variables.
2987 * a:
2988 * a GArray.
2989 * v:
2990 * the value to append to the GArray.
2991 * Returns:
2992 * the GArray.
2994 // TODO
2995 // #define g_array_append_val(a,v)
2998 * Adds the value on to the start of the array.
2999 * The array will grow in size automatically if necessary.
3000 * This operation is slower than g_array_append_val() since the existing elements
3001 * in the array have to be moved to make space for the new element.
3002 * Note
3003 * g_array_prepend_val() is a macro which uses a reference to the value
3004 * parameter v. This means that you cannot use it with literal values
3005 * such as "27". You must use variables.
3006 * a:
3007 * a GArray.
3008 * v:
3009 * the value to prepend to the GArray.
3010 * Returns:
3011 * the GArray.
3013 // TODO
3014 // #define g_array_prepend_val(a,v)
3017 * Inserts an element into an array at the given index.
3018 * Note
3019 * g_array_insert_val() is a macro which uses a reference to the value
3020 * parameter v. This means that you cannot use it with literal values
3021 * such as "27". You must use variables.
3022 * a:
3023 * a GArray.
3024 * i:
3025 * the index to place the element at.
3026 * v:
3027 * the value to insert into the array.
3028 * Returns:
3029 * the GArray.
3031 // TODO
3032 // #define g_array_insert_val(a,i,v)
3035 * Returns the element of a GArray at the given index.
3036 * The return value is cast to the given type.
3037 * Example6.Getting a pointer to an element in a GArray
3038 * EDayViewEvent *event;
3039 * /+* This gets a pointer to the 3rd element in the array of EDayViewEvent
3040 * structs. +/
3041 * event = g_array_index (events, EDayViewEvent, 3);
3042 * a:
3043 * a GArray.
3044 * t:
3045 * the type of the elements.
3046 * i:
3047 * the index of the element to return.
3048 * Returns:
3049 * the element of the GArray at the index given by i.
3051 // TODO
3052 // #define g_array_index(a,t,i)
3055 * Returns the pointer at the given index of the pointer array.
3056 * array:
3057 * a GPtrArray.
3058 * index_:
3059 * the index of the pointer to return.
3060 * Returns:
3061 * the pointer at the given index.
3063 // TODO
3064 // #define g_ptr_array_index(array,index_)
3067 * Inserts a GNode as the last child of the given parent.
3068 * parent:
3069 * the GNode to place the new GNode under.
3070 * node:
3071 * the GNode to insert.
3072 * Returns:
3073 * the inserted GNode.
3075 // TODO
3076 // #define g_node_append(parent, node)
3079 * Inserts a new GNode at the given position.
3080 * parent:
3081 * the GNode to place the new GNode under.
3082 * position:
3083 * the position to place the new GNode at.
3084 * If position is -1, the new GNode is inserted as the last child of parent.
3085 * data:
3086 * the data for the new GNode.
3087 * Returns:
3088 * the new GNode.
3090 // TODO
3091 // #define g_node_insert_data(parent, position, data)
3094 * Inserts a new GNode before the given sibling.
3095 * parent:
3096 * the GNode to place the new GNode under.
3097 * sibling:
3098 * the sibling GNode to place the new GNode before.
3099 * data:
3100 * the data for the new GNode.
3101 * Returns:
3102 * the new GNode.
3104 // TODO
3105 // #define g_node_insert_data_before(parent, sibling, data)
3108 * Inserts a new GNode as the last child of the given parent.
3109 * parent:
3110 * the GNode to place the new GNode under.
3111 * data:
3112 * the data for the new GNode.
3113 * Returns:
3114 * the new GNode.
3116 // TODO
3117 // #define g_node_append_data(parent, data)
3120 * Inserts a new GNode as the first child of the given parent.
3121 * parent:
3122 * the GNode to place the new GNode under.
3123 * data:
3124 * the data for the new GNode.
3125 * Returns:
3126 * the new GNode.
3128 // TODO
3129 // #define g_node_prepend_data(parent, data)
3132 * Gets the first child of a GNode.
3133 * node:
3134 * a GNode.
3135 * Returns:
3136 * the last child of node, or NULL if node is NULL or has no children.
3138 // TODO
3139 // #define g_node_first_child(node)
3142 * Gets the next sibling of a GNode.
3143 * node:
3144 * a GNode.
3145 * Returns:
3146 * the next sibling of node, or NULL if node is NULL.
3148 // TODO
3149 // #define g_node_next_sibling(node)
3152 * Gets the previous sibling of a GNode.
3153 * node:
3154 * a GNode.
3155 * Returns:
3156 * the previous sibling of node, or NULL if node is NULL.
3158 // TODO
3159 // #define g_node_prev_sibling(node)
3162 * Returns TRUE if a GNode is a leaf node.
3163 * node:
3164 * a GNode.
3165 * Returns:
3166 * TRUE if the GNode is a leaf node (i.e. it has no children).
3168 // TODO
3169 // #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
3172 * Returns TRUE if a GNode is the root of a tree.
3173 * node:
3174 * a GNode.
3175 * Returns:
3176 * TRUE if the GNode is the root of a tree (i.e. it has no parent
3177 * or siblings).
3179 // TODO
3180 // #define G_NODE_IS_ROOT(node)
3183 * Sets the data corresponding to the given GQuark id.
3184 * Any previous data with the same key is removed, and its
3185 * destroy function is called.
3186 * dl:
3187 * a datalist.
3188 * q:
3189 * the GQuark to identify the data element.
3190 * d:
3191 * the data element, or NULL to remove any previous element
3192 * corresponding to q.
3194 // TODO
3195 // #define g_datalist_id_set_data(dl, q, d)
3198 * Removes an element, using its GQuark identifier.
3199 * dl:
3200 * a datalist.
3201 * q:
3202 * the GQuark identifying the data element.
3204 // TODO
3205 // #define g_datalist_id_remove_data(dl, q)
3208 * Sets the data element corresponding to the given string identifier.
3209 * dl:
3210 * a datalist.
3211 * k:
3212 * the string to identify the data element.
3213 * d:
3214 * the data element, or NULL to remove any previous element
3215 * corresponding to k.
3217 // TODO
3218 // #define g_datalist_set_data(dl, k, d)
3221 * Sets the data element corresponding to the given string identifier, and the
3222 * function to be called when the data element is removed.
3223 * dl:
3224 * a datalist.
3225 * k:
3226 * the string to identify the data element.
3227 * d:
3228 * the data element, or NULL to remove any previous element corresponding to
3229 * k.
3230 * f:
3231 * the function to call when the data element is removed. This
3232 * function will be called with the data element and can be used to free any
3233 * memory allocated for it. If d is NULL, then f must also be NULL.
3235 // TODO
3236 // #define g_datalist_set_data_full(dl, k, d, f)
3239 * Gets a data element, using its string identifer.
3240 * This is slower than g_datalist_id_get_data() because the string is first
3241 * converted to a GQuark.
3242 * dl:
3243 * a datalist.
3244 * k:
3245 * the string identifying a data element.
3246 * Returns:
3247 * the data element, or NULL if it is not found.
3249 // TODO
3250 // #define g_datalist_get_data(dl, k)
3253 * Removes an element using its string identifier.
3254 * The data element's destroy function is called if it has been set.
3255 * dl:
3256 * a datalist.
3257 * k:
3258 * the string identifying the data element.
3260 // TODO
3261 // #define g_datalist_remove_data(dl, k)
3264 * Removes an element, without calling its destroy notifier.
3265 * dl:
3266 * a datalist.
3267 * k:
3268 * the string identifying the data element.
3270 // TODO
3271 // #define g_datalist_remove_no_notify(dl, k)
3274 * Sets the data element associated with the given GQuark id.
3275 * Any previous data with the same key is removed, and its destroy function
3276 * is called.
3277 * l:
3278 * the location identifying the dataset.
3279 * k:
3280 * the GQuark id to identify the data element.
3281 * d:
3282 * the data element.
3284 // TODO
3285 // #define g_dataset_id_set_data(l, k, d)
3288 * Removes a data element from a dataset.
3289 * The data element's destroy function is called if it has been set.
3290 * l:
3291 * the location identifying the dataset.
3292 * k:
3293 * the GQuark id identifying the data element.
3295 // TODO
3296 // #define g_dataset_id_remove_data(l, k)
3299 * Sets the data corresponding to the given string identifier.
3300 * l:
3301 * the location identifying the dataset.
3302 * k:
3303 * the string to identify the data element.
3304 * d:
3305 * the data element.
3307 // TODO
3308 // #define g_dataset_set_data(l, k, d)
3311 * Sets the data corresponding to the given string identifier, and the function
3312 * to call when the data element is destroyed.
3313 * l:
3314 * the location identifying the dataset.
3315 * k:
3316 * the string to identify the data element.
3317 * d:
3318 * the data element.
3319 * f:
3320 * the function to call when the data element is removed. This
3321 * function will be called with the data element and can be used to free any
3322 * memory allocated for it.
3324 // TODO
3325 // #define g_dataset_set_data_full(l, k, d, f)
3328 * Gets the data element corresponding to a string.
3329 * l:
3330 * the location identifying the dataset.
3331 * k:
3332 * the string identifying the data element.
3333 * Returns:
3334 * the data element corresponding to the string, or NULL if it is not
3335 * found.
3337 // TODO
3338 // #define g_dataset_get_data(l, k)
3341 * Removes a data element corresponding to a string.
3342 * Its destroy function is called if it has been set.
3343 * l:
3344 * the location identifying the dataset.
3345 * k:
3346 * the string identifying the data element.
3348 // TODO
3349 // #define g_dataset_remove_data(l, k)
3352 * Removes an element, without calling its destroy notifier.
3353 * l:
3354 * the location identifying the dataset.
3355 * k:
3356 * the string identifying the data element.
3358 // TODO
3359 // #define g_dataset_remove_no_notify(l, k)
3362 * Specifies the type of function passed to g_main_context_set_poll_func().
3363 * The semantics of the function should match those of the
3364 * poll() system call.
3365 * ufds:
3366 * an array of GPollFD elements.
3367 * nfsd:
3368 * the number of elements in ufds.
3369 * timeout_:
3370 * the maximum time to wait for an event of the file descriptors.
3371 * A negative value indicates an infinite timeout.
3372 * Returns:
3373 * the number of GPollFD elements which have events or errors reported,
3374 * or -1 if an error occurred.
3376 // gint (*GPollFunc) (GPollFD *ufds, guint nfsd, gint timeout_);
3377 public typedef extern(C) int function (GPollFD*, uint, int) GPollFunc;
3380 * The type of functions to be called when a child exists.
3381 * pid:
3382 * the process id of the child process
3383 * status:
3384 * Status information about the child process,
3385 * see waitpid(2) for more information about this field
3386 * data:
3387 * user data passed to g_child_watch_add()
3389 // void (*GChildWatchFunc) (GPid pid, gint status, gpointer data);
3390 public typedef extern(C) void function (GPid, int, void*) GChildWatchFunc;
3393 * This is just a placeholder for GClosureMarshal, which cannot be used here
3394 * for dependency reasons.
3396 // void (*GSourceDummyMarshal) (void);
3397 public typedef extern(C) void function () GSourceDummyMarshal;
3400 * Specifies the type of function passed to g_timeout_add(), g_timeout_add_full(),
3401 * g_idle_add(), and g_idle_add_full().
3402 * data:
3403 * data passed to the function, set when the source was created with one
3404 * of the above functions.
3405 * Returns:
3406 * it should return FALSE if the source should be removed.
3408 // gboolean (*GSourceFunc) (gpointer data);
3409 public typedef extern(C) int function (void*) GSourceFunc;
3412 * Specifies the type of the module initialization function.
3413 * If a module contains a function named g_module_check_init() it is called
3414 * automatically when the module is loaded. It is passed the GModule structure
3415 * and should return NULL on success or a string describing the initialization
3416 * error.
3417 * module:
3418 * the GModule corresponding to the module which has just been loaded.
3419 * Returns:
3420 * NULL on success, or a string describing the initialization error.
3422 // const gchar* (*GModuleCheckInit) (GModule *module);
3423 public typedef extern(C) char* function (GModule*) GModuleCheckInit;
3426 * Specifies the type of the module function called when it is unloaded.
3427 * If a module contains a function named g_module_unload() it is called
3428 * automatically when the module is unloaded.
3429 * It is passed the GModule structure.
3430 * module:
3431 * the GModule about to be unloaded.
3433 // void (*GModuleUnload) (GModule *module);
3434 public typedef extern(C) void function (GModule*) GModuleUnload;
3437 * Specifies the type of function passed to g_io_add_watch() or
3438 * g_io_add_watch_full(), which is called when the requested condition on a
3439 * GIOChannel is satisfied.
3440 * source:
3441 * the GIOChannel event source.
3442 * condition:
3443 * the condition which has been satisfied.
3444 * data:
3445 * user data set in g_io_add_watch() or g_io_add_watch_full().
3446 * Returns:
3447 * the function should return FALSE if the event source should be
3448 * removed.
3450 // gboolean (*GIOFunc) (GIOChannel *source, GIOCondition condition, gpointer data);
3451 public typedef extern(C) int function (GIOChannel*, GIOCondition, void*) GIOFunc;
3454 * Specifies the type of the print handler functions.
3455 * These are called with the complete formatted string to output.
3456 * string:
3457 * the message to be output.
3459 // void (*GPrintFunc) (const gchar *string);
3460 public typedef extern(C) void function (char[]) GPrintFunc;
3463 * Specifies the prototype of log handler functions.
3464 * log_domain:
3465 * the log domain of the message.
3466 * log_level:
3467 * the log level of the message (including the fatal and recursion
3468 * flags).
3469 * message:
3470 * the message to process.
3471 * user_data:
3472 * user data, set in g_log_set_handler().
3474 // void (*GLogFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data);
3475 public typedef extern(C) void function (char[], GLogLevelFlags, char[], void*) GLogFunc;
3478 * Declares a type of function which takes no arguments and has no return value.
3479 * It is used to specify the type function passed to g_atexit().
3481 // void (*GVoidFunc) (void);
3482 public typedef extern(C) void function () GVoidFunc;
3485 * Declares a type of function which takes an arbitrary data pointer argument
3486 * and has no return value. It is not currently used in GLib or GTK+.
3487 * data:
3488 * a data pointer.
3490 // void (*GFreeFunc) (gpointer data);
3491 public typedef extern(C) void function (void*) GFreeFunc;
3494 * Specifies the type of the message handler function.
3495 * scanner:
3496 * a GScanner.
3497 * message:
3498 * the message.
3499 * error:
3500 * TRUE if the message signals an error, FALSE if it
3501 * signals a warning.
3503 // void (*GScannerMsgFunc) (GScanner *scanner, gchar *message, gboolean error);
3504 public typedef extern(C) void function (GScanner*, char[], int) GScannerMsgFunc;
3507 * Specifies the type of the function passed to g_completion_new().
3508 * It should return the string corresponding to the given target item.
3509 * This is used when you use data structures as GCompletion items.
3510 * Param1:
3511 * the completion item.
3512 * Returns:
3513 * the string corresponding to the item.
3515 // gchar* (*GCompletionFunc) (gpointer );
3516 public typedef extern(C) char* function (void*) GCompletionFunc;
3519 * Specifies the type of the function passed to g_completion_set_compare().
3520 * This is used when you use strings as GCompletion items.
3521 * s1:
3522 * string to compare with s2.
3523 * s2:
3524 * string to compare with s1.
3525 * n:
3526 * maximal number of bytes to compare.
3527 * Returns:
3528 * an integer less than, equal to, or greater than zero if the
3529 * first n bytes of s1 is found, respectively, to be less than, to match,
3530 * or to be greater than the first n bytes of s2.
3532 // gint (*GCompletionStrncmpFunc) (const gchar *s1, const gchar *s2, gsize n);
3533 public typedef extern(C) int function (char[], char[], uint) GCompletionStrncmpFunc;
3536 * Specifies the type of the setup function passed to g_spawn_async(),
3537 * g_spawn_sync() and g_spawn_async_with_pipes(). On POSIX platforms it
3538 * is called in the child after GLib has performed all the setup it plans
3539 * to perform but before calling exec(). On POSIX
3540 * actions taken in this function will thus only affect the child, not
3541 * the parent.
3542 * On Windows the function is called in the parent. Its usefulness on
3543 * Windows is thus questionable. In many cases executing the child setup
3544 * function in the parent can have ill effects, and you should be very
3545 * careful when porting software to Windows that uses child setup
3546 * functions.
3547 * user_data:
3548 * user data to pass to the function.
3550 // void (*GSpawnChildSetupFunc) (gpointer user_data);
3551 public typedef extern(C) void function (void*) GSpawnChildSetupFunc;
3554 * The type of function to be passed as callback for G_OPTION_ARG_CALLBACK
3555 * options.
3556 * option_name:
3557 * The name of the option being parsed. This will be either a
3558 * single dash followed by a single letter (for a short name) or two dashes
3559 * followed by a long option name.
3560 * value:
3561 * The value to be parsed.
3562 * data:
3563 * User data added to the GOptionGroup containing the option when it
3564 * was created with g_option_group_new()
3565 * error:
3566 * A return location for errors. The error code G_OPTION_ERROR_FAILED
3567 * is intended to be used for errors in GOptionArgFunc callbacks.
3568 * Returns:
3569 * TRUE if the option was successfully parsed, FALSE if an error
3570 * occurred, in which case error should be set with g_set_error()
3572 // gboolean (*GOptionArgFunc) (const gchar *option_name, const gchar *value, gpointer data, GError **error);
3573 public typedef extern(C) int function (char[], char[], void*, GError**) GOptionArgFunc;
3576 * The type of functions which are used to translate user-visible
3577 * strings, for --help output.
3578 * str:
3579 * the untranslated string
3580 * data:
3581 * user data specified when installing the function, e.g.
3582 * in g_option_group_set_translate_func()
3583 * Returns:
3584 * a translation of the string for the current locale.
3585 * The returned string is owned by GLib and must not be freed.
3587 // const gchar* (*GTranslateFunc) (const gchar *str, gpointer data);
3588 public typedef extern(C) char* function (char[], void*) GTranslateFunc;
3591 * The type of function that can be called before and after parsing.
3592 * context:
3593 * The active GOptionContext
3594 * group:
3595 * The group to which the function belongs
3596 * data:
3597 * User data added to the GOptionGroup containing the option when it
3598 * was created with g_option_group_new()
3599 * error:
3600 * A return location for error details
3601 * Returns:
3602 * TRUE if the function completed successfully, FALSE if an error
3603 * occurred, in which case error should be set with g_set_error()
3605 // gboolean (*GOptionParseFunc) (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error);
3606 public typedef extern(C) int function (GOptionContext*, GOptionGroup*, void*, GError**) GOptionParseFunc;
3609 * The type of function to be used as callback when a parse error occurs.
3610 * context:
3611 * The active GOptionContext
3612 * group:
3613 * The group to which the function belongs
3614 * data:
3615 * User data added to the GOptionGroup containing the option when it
3616 * was created with g_option_group_new()
3617 * error:
3618 * The GError containing details about the parse error
3620 // void (*GOptionErrorFunc) (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error);
3621 public typedef extern(C) void function (GOptionContext*, GOptionGroup*, void*, GError**) GOptionErrorFunc;
3624 * Specifies the type of a comparison function used to compare two
3625 * values. The function should return a negative integer if the first
3626 * value comes before the second, 0 if they are equal, or a positive
3627 * integer if the first value comes after the second.
3628 * a:
3629 * a value.
3630 * b:
3631 * a value to compare with.
3632 * Returns:
3633 * negative value if a < b; zero if a = b; positive value
3634 * if a > b.
3636 // gint (*GCompareFunc) (gconstpointer a, gconstpointer b);
3637 public typedef extern(C) int function (void*, void*) GCompareFunc;
3640 * Specifies the type of a comparison function used to compare two
3641 * values. The function should return a negative integer if the first
3642 * value comes before the second, 0 if they are equal, or a positive
3643 * integer if the first value comes after the second.
3644 * a:
3645 * a value.
3646 * b:
3647 * a value to compare with.
3648 * user_data:
3649 * user data to pass to comparison function.
3650 * Returns:
3651 * negative value if a < b; zero if a = b; positive value
3652 * if a > b.
3654 // gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data);
3655 public typedef extern(C) int function (void*, void*, void*) GCompareDataFunc;
3658 * Specifies the type of functions passed to g_list_foreach() and
3659 * g_slist_foreach().
3660 * data:
3661 * the element's data.
3662 * user_data:
3663 * user data passed to g_list_foreach() or g_slist_foreach().
3665 // void (*GFunc) (gpointer data, gpointer user_data);
3666 public typedef extern(C) void function (void*, void*) GFunc;
3669 * Specifies the type of the hash function which is passed to
3670 * g_hash_table_new() when a GHashTable is created.
3671 * The function is passed a key and should return a guint hash value.
3672 * The functions g_direct_hash(), g_int_hash() and g_str_hash() provide
3673 * hash functions which can be used when the key is a gpointer, gint, and
3674 * gchar* respectively.
3675 * FIXME: Need more here.
3676 * The hash values should be evenly distributed over a fairly large range?
3677 * The modulus is taken with the hash table size (a prime number)
3678 * to find the 'bucket' to place each key into.
3679 * The function should also be very fast, since it is called for each key
3680 * lookup.
3681 * key:
3682 * a key.
3683 * Returns:
3684 * the hash value corresponding to the key.
3686 // guint (*GHashFunc) (gconstpointer key);
3687 public typedef extern(C) uint function (void*) GHashFunc;
3690 * Specifies the type of a function used to test two values for
3691 * equality. The function should return TRUE if both values are equal and
3692 * FALSE otherwise.
3693 * a:
3694 * a value.
3695 * b:
3696 * a value to compare with.
3697 * Returns:
3698 * TRUE if a = b; FALSE otherwise.
3700 // gboolean (*GEqualFunc) (gconstpointer a, gconstpointer b);
3701 public typedef extern(C) int function (void*, void*) GEqualFunc;
3704 * Specifies the type of the function passed to g_hash_table_foreach().
3705 * It is called with each key/value pair, together with the user_data parameter
3706 * which is passed to g_hash_table_foreach().
3707 * key:
3708 * a key.
3709 * value:
3710 * the value corresponding to the key.
3711 * user_data:
3712 * user data passed to g_hash_table_foreach().
3714 // void (*GHFunc) (gpointer key, gpointer value, gpointer user_data);
3715 public typedef extern(C) void function (void*, void*, void*) GHFunc;
3718 * Specifies the type of the function passed to g_hash_table_foreach_remove().
3719 * It is called with each key/value pair, together with the user_data parameter
3720 * passed to g_hash_table_foreach_remove().
3721 * It should return TRUE if the key/value pair should be removed from the
3722 * GHashTable.
3723 * key:
3724 * a key.
3725 * value:
3726 * the value associated with the key.
3727 * user_data:
3728 * user data passed to g_hash_table_remove().
3729 * Returns:
3730 * TRUE if the key/value pair should be removed from the GHashTable.
3732 // gboolean (*GHRFunc) (gpointer key, gpointer value, gpointer user_data);
3733 public typedef extern(C) int function (void*, void*, void*) GHRFunc;
3736 * Specifies the type of function passed to g_tree_traverse().
3737 * It is passed the key and value of each node, together with
3738 * the user_data parameter passed to g_tree_traverse().
3739 * If the function returns TRUE, the traversal is stopped.
3740 * key:
3741 * a key of a GTree node.
3742 * value:
3743 * the value corresponding to the key.
3744 * data:
3745 * user data passed to g_tree_traverse().
3746 * Returns:
3747 * TRUE to stop the traversal.
3749 // gboolean (*GTraverseFunc) (gpointer key, gpointer value, gpointer data);
3750 public typedef extern(C) int function (void*, void*, void*) GTraverseFunc;
3753 * A function of this signature is used to copy the node data when doing a deep-copy
3754 * of a tree.
3755 * src:
3756 * A pointer to the data which should be copied.
3757 * data:
3758 * Additional data.
3759 * Returns:
3760 * A pointer to the copy.
3761 * Since 2.4
3763 // gpointer (*GCopyFunc) (gconstpointer src, gpointer data);
3764 public typedef extern(C) void* function (void*, void*) GCopyFunc;
3767 * Specifies the type of function passed to g_node_traverse().
3768 * The function is called with each of the nodes visited, together with the
3769 * user data passed to g_node_traverse().
3770 * If the function returns TRUE, then the traversal is stopped.
3771 * node:
3772 * a GNode.
3773 * data:
3774 * user data passed to g_node_traverse().
3775 * Returns:
3776 * TRUE to stop the traversal.
3778 // gboolean (*GNodeTraverseFunc) (GNode *node, gpointer data);
3779 public typedef extern(C) int function (GNode*, void*) GNodeTraverseFunc;
3782 * Specifies the type of function passed to g_node_children_foreach().
3783 * The function is called with each child node, together with the user data
3784 * passed to g_node_children_foreach().
3785 * node:
3786 * a GNode.
3787 * data:
3788 * user data passed to g_node_children_foreach().
3790 // void (*GNodeForeachFunc) (GNode *node, gpointer data);
3791 public typedef extern(C) void function (GNode*, void*) GNodeForeachFunc;
3794 * Specifies the type of function which is called when a data element is
3795 * destroyed. It is passed the pointer to the data element and should free
3796 * any memory and resources allocated for it.
3797 * data:
3798 * the data element.
3800 // void (*GDestroyNotify) (gpointer data);
3801 public typedef extern(C) void function (void*) GDestroyNotify;
3804 * Specifies the type of function passed to g_dataset_foreach().
3805 * It is called with each GQuark id and associated data element,
3806 * together with the user_data parameter supplied to g_dataset_foreach().
3807 * key_id:
3808 * the GQuark id to identifying the data element.
3809 * data:
3810 * the data element.
3811 * user_data:
3812 * user data passed to g_dataset_foreach().
3814 // void (*GDataForeachFunc) (GQuark key_id, gpointer data, gpointer user_data);
3815 public typedef extern(C) void function (GQuark, void*, void*) GDataForeachFunc;
3818 * Specifies the type of the value_destroy_func and key_destroy_func functions
3819 * passed to g_cache_new().
3820 * The functions are passed a pointer to the GCache key or GCache value and
3821 * should free any memory and other resources associated with it.
3822 * value:
3823 * the GCache value to destroy.
3825 // void (*GCacheDestroyFunc) (gpointer value);
3826 public typedef extern(C) void function (void*) GCacheDestroyFunc;
3829 * Specifies the type of the key_dup_func function passed to g_cache_new().
3830 * The function is passed a key (not a value as the prototype implies) and
3831 * should return a duplicate of the key.
3832 * value:
3833 * the GCache key to destroy (not a GCache value as it seems).
3834 * Returns:
3835 * a copy of the GCache key.
3837 // gpointer (*GCacheDupFunc) (gpointer value);
3838 public typedef extern(C) void* function (void*) GCacheDupFunc;
3841 * Specifies the type of the value_new_func function passed to g_cache_new().
3842 * It is passed a GCache key and should create the value corresponding to the
3843 * key.
3844 * key:
3845 * a GCache key.
3846 * Returns:
3847 * a new GCache value corresponding to the key.
3849 // gpointer (*GCacheNewFunc) (gpointer key);
3850 public typedef extern(C) void* function (void*) GCacheNewFunc;
3852 * A union holding the value of the token.
3854 public struct GTokenValue
3856 union
3858 void* vSymbol;
3859 char *vIdentifier;
3860 uint vBinary;
3861 uint vOctal;
3862 uint vInt;
3863 ulong vInt64;
3864 double vFloat;
3865 uint vHex;
3866 char *vString;
3867 char *vComment;
3868 char vChar;
3869 uint vError;