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