File: APILookupGLib.txt

package info (click to toggle)
glib-d 2.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 252 kB
  • sloc: makefile: 5
file content (2098 lines) | stat: -rw-r--r-- 46,846 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
# This file is part of gtkD.
#
# gtkD is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# gtkD is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with gtkD; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

#############################################
### Definitions for wrapping Gtk+ ###########
#############################################

# must start with wrap
wrap: glib
file: GLib-2.0.gir
file: GModule-2.0.gir

addAliases: start
	public alias uint uid_t;
	public alias int pid_t;

	version( Windows )
	{
		alias int glong;
		alias uint gulong;
	}
	else version( X86_64 )
	{
		alias long glong;
		alias ulong gulong;
	}
	else
	{
		alias int glong;
		alias uint gulong;
	}

	version (Windows)
	{
		private import core.stdc.stdio;

		static if( !is(typeof(fdopen(0, null))) )
		{
			extern (C) FILE*  fdopen(int, char*);
		}
	}

	struct Scoped(T)
	{
		T payload;

		alias payload this;

		@disable this();
		@disable this(this);

		~this()
		{
			.destroy(payload);
		}
	}

	auto getScopedGobject(T, Args...)(auto ref Args args) if (is(T == class))
	{
		Scoped!(T) result = void;
		result.payload = new T(args);

		return result;
	}

	/**
	 * Get the length of a zero terminated array.
	 */
	size_t getArrayLength(T)(T* arr)
	{
		size_t len;

		for ( ; arr[len]; len++ ){}

		return len;
	}

	unittest
	{
		assert(getArrayLength("aaaaaaaaa\0".ptr) == 9);
	}

	Type* gMalloc(Type)()
	{
		import glib.c.functions;
		return cast(Type*)g_malloc0(Type.sizeof);
	}

	alias void* GIConv;
addAliases: end

addEnums: start

	enum GPriority
	{
		HIGH = -100,
		DEFAULT = 0,
		HIGH_IDLE = 100,
		DEFAULT_IDLE = 200,
		LOW = 300
	}

addEnums: end

noConstant: DIR_SEPARATOR
noConstant: DIR_SEPARATOR_S
noConstant: E
noConstant: LN10
noConstant: LN2
noConstant: LOG_2_BASE_10
noConstant: PI
noConstant: PI_2
noConstant: PI_4
noConstant: SEARCHPATH_SEPARATOR
noConstant: SEARCHPATH_SEPARATOR_S
noConstant: SQRT2
noConstant: VERSION_MIN_REQUIRED 

struct: Array
class: ArrayG

struct: Base64
move: base64_decode_step Base64 decode_step
move: base64_decode_inplace Base64 decode_inplace
noCode: decode_step
array: decode_inplace Return out_len
code: start
	/**
	 * Incrementally decode a sequence of binary data from its Base-64 stringified
	 * representation. By calling this function multiple times you can convert
	 * data in chunks to avoid having to have the full encoded data in memory.
	 *
	 * The output buffer must be large enough to fit all the data that will
	 * be written to it. Since base64 encodes 3 bytes in 4 chars you need
	 * at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero
	 * state).
	 *
	 * Params:
	 *     inn = binary input data
	 *     len = max length of @in data to decode
	 *     output = output buffer
	 *     state = Saved state between steps, initialize to 0
	 *     save = Saved state between steps, initialize to 0
	 *
	 * Return: The number of bytes of output that was written
	 *
	 * Since: 2.12
	 */
	public static size_t decodeStep(string inn, ref ubyte[] output, ref int state, ref uint save)
	{
		auto p = g_base64_decode_step(Str.toStringz(inn), cast(int)inn.length, cast(char*)output.ptr, &state, &save);

		return p;
	}
code: end

struct: BookmarkFile
out: load_from_data_dirs full_path
array: set_groups groups length

struct: ByteArray
class: ByteArray

struct: Bytes
noCode: new_take
noCode: new_static

struct: Checksum
noCode: get_digest
code: start
	/**
	 * Gets the digest from checksum as a raw binary vector and places it
	 * into buffer. The size of the digest depends on the type of checksum.
	 *
	 * Once this function has been called, the Checksum is closed and can
	 * no longer be updated with update().
	 *
	 * Params:
	 *     buffer = output buffer
	 *     digestLen = an inout parameter. The caller initializes it to the size of buffer.
	 *         After the call it contains the length of the digest.
	 *
	 * Since: 2.16
	 */
	public void getDigest(ref ubyte[] buffer)
	{
		size_t digestLen = buffer.length;

		g_checksum_get_digest(gChecksum, buffer.ptr, &digestLen);

		buffer = buffer[0 .. digestLen];
	}
code: end

struct: ConstructionException
namespace:
code: start
	class ConstructionException : Exception
	{
		this(string message)
		{
			super(message);
		}

		override string toString()
		{
			return "Construction failure, " ~ msg;
		}
	}
code: end

struct: DateTime
structWrap: gpointer DateTime
noCode: new_now_utc
noCode: new_now_local
noCode: new_from_unix_local
noCode: new_from_unix_utc
noCode: new_from_timeval_local
noCode: new_from_timeval_utc
noCode: new_local
noCode: new_utc
noCode: hash
code: start
	/**
	 * Creates a DateTime corresponding to the given Unix time t
	 * Unix time is the number of seconds that have elapsed since 1970-01-01
	 * 00:00:00 UTC, regardless of the local time offset.
	 *
	 * This call can fail (ConstructionException) if t represents a time outside
	 * of the supported range of GDateTime.
	 * You should release the return value by calling unref()
	 * when you are done with it
	 *
	 * Params:
	 *     t   = the Unix time
	 *     utc = If true use utc else use the local timezone.
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 *
	 * Since: 2.26
	 */
	public this (long t, bool utc = true)
	{
		GDateTime* p;

		if ( utc )
		{
			p = g_date_time_new_from_unix_utc(t);
		}
		else
		{
			p = g_date_time_new_from_unix_local(t);
		}

		if(p is null)
		{
			throw new ConstructionException("null returned by g_date_time_new_from_unix_local(t)");
		}
		this(cast(GDateTime*) p);
	}

	/**
	 * Creates a DateTime corresponding to the given TimeVal tv.
	 * The time contained in a TimeVal is always stored in the form of
	 * seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the
	 * local time offset.
	 *
	 * This call can fail (ConstructionException) if tv represents a time outside
	 * of the supported range of DateTime.
	 * You should release the return value by calling unref()
	 * when you are done with it.
	 *
	 * Params:
	 *     tv  = a GTimeVal
	 *     utc = If true use utc else use the local timezone.
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 *
	 * Since: 2.26
	 */
	public this (ref GTimeVal tv, bool utc = true)
	{
		GDateTime* p;

		if ( utc )
		{
			p = g_date_time_new_from_timeval_utc(&tv);
		}
		else
		{
			p = g_date_time_new_from_timeval_local(&tv);
		}

		if(p is null)
		{
			throw new ConstructionException("null returned by g_date_time_new_from_timeval_local((tv is null) ? null : tv.getTimeValStruct())");
		}
		this(cast(GDateTime*) p);
	}

	/** */
	override bool opEquals(Object rhs)
	{
		DateTime date = cast(DateTime)rhs;

		if ( date is null )
			return false;

		return equal(this, date) != 0;
	}

	/** */
	override int opCmp(Object rhs)
	{
		DateTime date = cast(DateTime)rhs;

		if ( date is null )
			return int.min;

		return compare(this, date);
	}

	/** */
	override nothrow @trusted hash_t toHash()
	{
		return hash();
	}

	/**
	 * Hashes datetime into a guint, suitable for use within GHashTable.
	 * Since 2.26
	 * Params:
	 * datetime = a GDateTime
	 * Returns: a guint containing the hash
	 */
	public nothrow @trusted uint hash()
	{
		try
		{
			return g_date_time_hash(gDateTime);
		}
		catch(Exception e)
		{
			return 0;
		}
	}
code: end

struct: Dir
class: Directory

struct: Error
class: ErrorG
move: propagate_error Error
move: set_error_literal Error
out: set_error_literal err
out: propagate_error dest

struct: GException
namespace:
import: glib.ErrorG
import: glib.Str
code: start
	class GException : Exception
	{
		ErrorG error;

		this(ErrorG error)
		{
			super( Str.toString(error.getErrorGStruct().message) );
			this.error = error;
		}
	}
code: end

struct: GLib
namespace:
code: start
	static import glib.Version;
	deprecated("moves to the glib.Version module")
	alias glib.Version.Version Version;
code: end

struct: HashTable
class: HashTable

struct: Hmac
noCode: get_digest
move: compute_hmac_for_data Hmac
move: compute_hmac_for_string Hmac
move: compute_hmac_for_bytes Hmac
array: compute_hmac_for_data data length
array: compute_hmac_for_string str length
code: start
	/**
	 * Gets the digest from checksum as a raw binary array and places it
	 * into buffer. The size of the digest depends on the type of checksum.
	 *
	 * Once this function has been called, the Hmac is closed and can
	 * no longer be updated with update().
	 *
	 * Params:
	 *     buffer = output buffer
	 *
	 * Since: 2.30
	 */
	public void getDigest(ref ubyte[] buffer)
	{
		size_t digestLen = buffer.length;

		g_hmac_get_digest(gHmac, buffer.ptr, &digestLen);

		buffer = buffer[0 .. digestLen];
	}
code: end

struct: IConv
namespace:
noStruct: true
ref: iconv inbuf
out: iconv inbytes_left
array: iconv inbuf inbytes_left
ref: iconv outbuf
out: iconv outbytes_left
array: iconv outbuf outbytes_left

struct: Idle
class: Idle
cType:
code: start
	/** Holds all idle delegates */
	private bool delegate()[] idleListeners;
	/** Our idle ID */
	private uint idleID;
	/** The priority this class was instantiated with */
	private GPriority priority = GPriority.DEFAULT_IDLE;

	/**
	 * Creates a new idle cycle.
	 * Params:
	 *    	dlg = the delegate to be executed
	 *    	fireNow = When true the delegate will be executed emmidiatly
	 */
	this(bool delegate() dlg, bool fireNow=false)
	{
		if ( fireNow && !dlg() )
			return;

		idleListeners ~= dlg;
		idleID = g_idle_add_full(priority, cast(GSourceFunc)&idleCallback, cast(void*)this, cast(GDestroyNotify)&destroyIdleNotify);
	}

	/**
	 * Creates a new idle cycle.
	 * Params:
	 *    	dlg = the delegate to be executed
	 *      priority = Priority for the idle function
	 *    	fireNow = When true the delegate will be executed emmidiatly
	 */
	this(bool delegate() dlg, GPriority priority, bool fireNow=false)
	{
		this.priority = priority;

		if ( fireNow && !dlg() )
			return;

		idleListeners ~= dlg;
		idleID = g_idle_add_full(priority, cast(GSourceFunc)&idleCallback, cast(void*)this, cast(GDestroyNotify)&destroyIdleNotify);
	}

	/** */
	public void stop()
	{
		if ( idleID > 0 )
			g_source_remove(idleID);
	}

	/**
	 * Removes the idle from gtk
	 */
	~this()
	{
		stop();
	}

	/**
	 * Adds a new delegate to this idle cycle
	 * Params:
	 *    	dlg =
	 *    	fireNow =
	 */
	public void addListener(bool delegate() dlg, bool fireNow=false)
	{
		if ( fireNow && !dlg() )
			return;

		idleListeners ~= dlg;

		if ( idleID == 0 )
			idleID = g_idle_add_full(priority, cast(GSourceFunc)&idleCallback, cast(void*)this, cast(GDestroyNotify)&destroyIdleNotify);
	}

	/*
	 * Executes all delegates on the execution list
	 * Returns: false if the callback should be removed.
	 */
	extern(C) static bool idleCallback(Idle idle)
	{
		bool runAgain = false;
		int i = 0;

		while ( i<idle.idleListeners.length )
		{
			if ( !idle.idleListeners[i]() )
			{
				idle.idleListeners = idle.idleListeners[0..i] ~ idle.idleListeners[i+1..$];
			}
			else
			{
				runAgain = true;
				++i;
			}
		}

		return runAgain;
	}

	/*
	 * Reset the idle object when it's destroyed on the GTK side.
	 */
	extern(C) static void destroyIdleNotify(Idle idle)
	{
		idle.idleListeners.length = 0;
		idle.idleID = 0;
	}
code: end

struct: IOChannel
array: read_line str_return length
out: read_line_string terminator_pos
array: write_chars buf count

struct: List
class: ListG
import: gobject.ObjectG
import: glib.Str
code: start
  	/** */
	@property void* data()
	{
		return gList.data;
	}

  	/**
	 * get the next element
	 * Returns: the next element, or NULL if there are no more elements.
	 */
	@property ListG next()
	{
		if ( gList.next is null )
		{
			return null;
		}

		return new ListG(gList.next);
	}

	/**
	 * get the previous element
	 * Returns: the previous element, or NULL if there are no more elements.
	 */
	@property ListG previous()
	{
		if ( gList.prev is null )
		{
			return null;
		}

		return new ListG(gList.prev);
	}

	/**
	 * Turn the list into a D array of the desiered type.
	 * Type T wraps should match the type of the data.
	 */
	public T[] toArray(T, TC = getCType!T)()
		if ( is(T == class) )
	{
		T[] arr = new T[length()];
		ListG list = this;
		size_t count;

		while(list !is null && count < arr.length)
		{
			arr[count] = ObjectG.getDObject!(T)(cast(TC)list.data);
			list = list.next();
			count++;
		}

		return arr;
	}

	/** Ditto */
	public T[] toArray(T)()
		if ( is ( T == string ) )
	{
		T[] arr = new T[length()];
		ListG list = this;
		size_t count;

		while(list !is null && count < arr.length)
		{
			arr[count] = Str.toString(cast(char*)list.data);
			list = list.next();
			count++;
		}

		return arr;
	}

	private template getCType(T)
	{
		static if ( is(T == class) )
			alias getCType = typeof(T.tupleof[0]);
		else
			alias getCType = void*;
	}

	unittest
	{
		import gobject.Value;

		auto list = new ListG(null);
		list = list.append(new Value(0).getValueStruct());
		list = list.append(new Value(1).getValueStruct());
		auto arr = list.toArray!Value();

		assert(arr[0].getInt() == 0);
		assert(arr[1].getInt() == 1);

		list = new ListG(null);
		list = list.append(cast(void*)"test\0".ptr);
		list = list.append(cast(void*)"test2\0".ptr);

		assert(["test", "test2"] == list.toArray!string());
	}
code: end

struct: MainContext
in: query fds
in: query n_fds

struct: MarkupParseContext
class: SimpleXML

struct: MemorySlice
namespace:
code: start
	public T* sliceNew(T)()
	{
		// We cant use sliceAlloc for the GLib array types.
		// the actual array structs are larger than the ones used in the API.
		static if ( is( T == GArray ) )
			return g_array_new(false, false, 1);
		else static if ( is( T == GByteArray ) )
			return g_byte_array_new();
		else static if ( is( T == GPtrArray ) )
			return g_ptr_array_new();
		else
			return cast(T*)g_slice_alloc0(T.sizeof);
	}
	
	public T* sliceAlloc(T)()
	{
		return cast(T*)g_slice_alloc0(T.sizeof);
	}

	public T* sliceDup(T)(T* memBlock)
	{
		return cast(T*)g_slice_copy(T.sizeof, memBlock);
	}
 
	public void sliceFree(T)(T* memBlock)
 	{
 		 g_slice_free1(T.sizeof, memBlock);
 	}
code: end

struct: Module
in: symbol symbol

struct: PatternSpec
class: Pattern

struct: PtrArray
class: PtrArray
code: start
	/**
	 * Number of pointers in the array
	 */
	public uint len() pure
	{
		return gPtrArray.len;
	}

	/**
	 * Returns the pointer at the given index of the pointer array.
	 *
	 * This does not perform bounds checking on the given index, so
	 * you are responsible for checking it against the array length.
	 */
	public void* index(uint idx)
	{
		return (gPtrArray.pdata)[idx];
	}
code: end

struct: Queue
class: QueueG

struct: Rand
class: RandG
alias: double randDouble
alias: int randInt
array: new_with_seed_array seed seed_length

struct: Scanner
class: ScannerG

struct: SList
class: ListSG
import: gobject.ObjectG
import: glib.Str
code: start
  	/** */
	@property void* data()
	{
		return gSList.data;
	}

  	/**
	 * get the next element
	 * Returns: the next element, or NULL if there are no more elements.
	 */
	@property ListSG next()
	{
		if ( gSList.next is null )
		{
			return null;
		}

		return new ListSG(gSList.next);
	}

	/**
	 * Turn the list into a D array of the desiered type.
	 * Type T wraps should match the type of the data.
	 */
	public T[] toArray(T, TC = getCType!T)()
		if ( is(T == class) )
	{
		T[] arr = new T[length()];
		ListSG list = this;
		size_t count;

		while(list !is null && count < arr.length)
		{
			arr[count] = ObjectG.getDObject!(T)(cast(TC)list.data);
			list = list.next();
			count++;
		}

		return arr;
	}

	/** Ditto */
	public T[] toArray(T)()
		if ( is ( T == string ) )
	{
		T[] arr = new T[length()];
		ListSG list = this;
		size_t count;

		while(list !is null && count < arr.length)
		{
			arr[count] = Str.toString(cast(char*)list.data);
			list = list.next();
			count++;
		}

		return arr;
	}

	private template getCType(T)
	{
		static if ( is(T == class) )
			alias getCType = typeof(T.tupleof[0]);
		else
			alias getCType = void*;
	}

	unittest
	{
		import gobject.Value;

		auto list = new ListSG(null);
		list = list.append(new Value(0).getValueStruct());
		list = list.append(new Value(1).getValueStruct());
		auto arr = list.toArray!Value();

		assert(arr[0].getInt() == 0);
		assert(arr[1].getInt() == 1);

		list = new ListSG(null);
		list = list.append(cast(void*)"test\0".ptr);
		list = list.append(cast(void*)"test2\0".ptr);

		assert(["test", "test2"] == list.toArray!string());
	}
code: end

struct: Spawn
class: Spawn
cType:
import: core.thread
import: core.stdc.string
import: core.stdc.stdio
import: std.string
import: std.traits
#noCode: spawn_async_with_pipes
code: start
	//we need fdopen.
	version(Posix)
	{
		private import core.sys.posix.stdio;
	}
	//fdopen for Windows is defined in glib.c.types.

	string workingDirectory = ".";
	string[] argv;
	string[] envp;
	GSpawnFlags flags = SpawnFlags.SEARCH_PATH;
	GSpawnChildSetupFunc childSetup;
	void* userData;
	GPid childPid;
	FILE* standardInput;
	FILE* standardOutput;
	FILE* standardError;
	GError* error;
	int stdIn;
	int stdOut;
	int stdErr;

	// for commandLineSync
	int exitStatus;
	char* strOutput;
	char* strError;

	alias bool delegate(Spawn) ChildWatch;
	ChildWatch externalWatch;

	/**
	 * Creates a Spawn for execution.
	 */
	public this(string program, string[] envp=null)
	{
		argv ~= program;
		this.envp = envp;
	}

	/**
	 * Creates a Spawn for execution.
	 */
	public this(string[] program, string[] envp=null)
	{
		argv = program;
		this.envp = envp;
	}

	/**
	 * Adds a delegate to be notified on the end of the child process.
	 * Params:
	 *    	dlg =
	 */
	public void addChildWatch(ChildWatch dlg)
	{
		externalWatch = dlg;
	}

	/**
	 * Closes all open streams and child process.
	 */
	public void close()
	{
		if (stdIn != 0 )
		{
			fclose(standardInput);
			stdIn = 0;
		}
		if (stdOut != 0 )
		{
			fclose(standardOutput);
			stdOut = 0;
		}
		if (stdErr != 0 )
		{
			fclose(standardError);
			stdErr = 0;
		}
		static if ( isPointer!(GPid) )
		{
			if ( childPid !is null )
			{
				closePid(childPid);
				childPid = null;
			}
		}
		else
		{
			if ( childPid != 0 )
			{
				closePid(childPid);
				childPid = 0;
			}
		}
	}

	/**
	 * Adds a parameter to the execution program
	 */
	public void addParm(string parm)
	{
		argv ~= parm;
	}

	/**
	 * Gets the last error message
	 */
	public string getLastError()
	{
		if ( error != null )
		{
			return Str.toString(error.message);
		}
		return "";
	}

	/**
	 * Executes the prepared process
	 */
	public int execAsyncWithPipes(
		ChildWatch externalWatch = null,
		bool delegate(string) readOutput = null,
		bool delegate(string) readError = null )
	{
		int result = g_spawn_async_with_pipes(
		Str.toStringz(workingDirectory),
		Str.toStringzArray(argv),
		Str.toStringzArray(envp),
		flags,
		childSetup,
		userData,
		&childPid,
		&stdIn,
		&stdOut,
		&stdErr,
		&error
		);

		if ( result != 0 )
		{
			this.externalWatch = externalWatch;
			g_child_watch_add(childPid, cast(GChildWatchFunc)(&childWatchCallback), cast(void*)this);
			standardInput = fdopen(stdIn, Str.toStringz("w"));
			standardOutput = fdopen(stdOut, Str.toStringz("r"));
			standardError = fdopen(stdErr, Str.toStringz("r"));

			if ( readOutput !is null )
			{
				(new ReadFile(standardOutput, readOutput)).start();
			}
			if ( readError !is null )
			{
				(new ReadFile(standardError, readError)).start();
			}
		}

		return result;
	}

	class ReadFile : Thread
	{
		bool delegate(string) read;
		FILE* file;

		int lineCount;

		this(FILE* file, bool delegate (string) read )
		{
			this.file = file;
			this.read = read;

			super(&run);
		}

		public void run()
		{
			string line = readLine(file);
			while( line !is null )
			{
				++lineCount;
				if ( read !is null )
				{
					read(line);
				}
				line = readLine(file);
			}
		}
	}

	private string readLine(FILE* stream, int max=4096)
	{
		if ( feof(stream) )
		{
			if ( externalWatch !is null )
			{
				externalWatch(this);
			}
			return null;
		}
		string line;
		line.length = max+1;
		char* lineP = fgets(Str.toStringz(line), max, stream);
		if ( lineP is null )
		{
			return "";
		}
		size_t l = strlen(line.ptr);
		if ( l > 0 ) --l;

		return line[0..l];
	}

	extern(C) static void childWatchCallback(int pid, int status, Spawn spawn)
	{
		//writefln("Spawn.childWatchCallback %s %s", pid, status);
		spawn.exitStatus = status;
		if ( spawn.externalWatch !is null )
		{
			spawn.externalWatch(spawn);
		}
		spawn.close();
	}


	public bool endOfOutput()
	{
		if ( standardOutput is null ) return true;
		return feof(standardOutput) != 0;
	}

	public bool endOfError()
	{
		if ( standardError is null ) return true;
		return feof(standardError) != 0;
	}

	string getOutputString()
	{
		return Str.toString(strOutput);
	}

	string getErrorString()
	{
		return Str.toString(strError);
	}

	int getExitStatus()
	{
		return exitStatus;
	}

	/**
	 * Executes a command synchronasly and
	 * optionally calls delegates for sysout, syserr and end of job
	 *
	 */
	public int commandLineSync(
		ChildWatch externalWatch = null,
		bool delegate(string) readOutput = null,
		bool delegate(string) readError = null )
	{
		string commandLine;
		foreach ( int count, string arg; argv)
		{
			if ( count > 0 )
			{
				commandLine ~= ' ';
			}
			commandLine ~= arg;
		}
		int status = g_spawn_command_line_sync(
			Str.toStringz(commandLine),
			&strOutput,
			&strError,
			&exitStatus,
			&error);
		if ( readOutput != null )
		{
			foreach ( string line ; splitLines(Str.toString(strOutput)) )
			{
				readOutput(line);
			}
		}
		if ( readError != null )
		{
			foreach ( string line ; splitLines(Str.toString(strError)) )
			{
				readError(line);
			}
		}
		if ( externalWatch != null )
		{
			externalWatch(this);
		}
		return status;
	}
code: end

struct: Str
import: core.stdc.stdio
import: core.stdc.string
import: gobject.c.types
code: start
	/*
	 * Convert C-style 0 terminated string s to char[] string.
	 * copied from phobos
	 */
	public static string toString(const(char)* s, size_t len = 0) pure
	{
		if ( s is null )
			return cast(string)null;

		if ( len == 0 )
			len = strlen(s);

		return s[0 .. len].idup;
	}

	/*
	 * Convert array of chars s[] to a C-style 0 terminated string.
	 * copied from phobos
	 */
	public static char* toStringz(string s) pure
	{
		if ( s is null ) return null;
		char[] copy;

		if (s.length == 0)
		{
			copy = "\0".dup;
		}
		else
		{
			// Need to make a copy
			copy = new char[s.length + 1];
			copy[0..s.length] = s[];
			copy[s.length] = 0;
		}

		return copy.ptr;
	}

	/** */
	public static char** toStringzArray(string[] args) pure
	{
		if ( args is null )
		{
			return null;
		}
		char** argv = (new char*[args.length + 1]).ptr;
		int argc = 0;
		foreach (string p; args)
		{
			argv[argc++] = cast(char*)(p.dup~'\0');
		}
		argv[argc] = null;

		return argv;
	}

	/** */
	public static char*** toStringzArray(string[][] args) pure
	{
		if ( args is null )
		{
			return null;
		}
		char**[] argv = new char**[args.length + 1];
		int argc = 0;
		foreach( string[] p; args )
		{
			argv[argc++] = toStringzArray(p);
		}
		argv[argc] = null;

		return argv.ptr;
	}

	/** */
	public static string[] toStringArray(const(char*)* args) pure
	{
		if ( args is null )
		{
			return null;
		}
		string[] argv;

		while ( *args !is null )
		{
			argv ~= toString(*args);
			args++;
		}

		return argv;
	}

	/** */
	public static string[] toStringArray(const(char*)* args, size_t len) pure
	{
		string[] argv = new string[len];

		for ( int i; i < len; i++ )
		{
			argv[i] = toString(args[i]);
		}

		return argv;
	}

	/** */
	public static string[][] toStringArray(char*** args) pure
	{
		string[][] argv;

		if ( args is null )
		{
			return null;
		}

		while ( *args !is null )
		{
			argv ~= toStringArray(*args);
			args++;
		}

		return argv;
	}

	/** */
	public static void freeString(char* str)
	{
		g_free(str);
	}

	/** */
	public static void freeStringArray(char** str)
	{
		g_strfreev(str);
	}

	/** */
	public static void freeStringArray(char*** str)
	{
		while ( *str !is null )
		{
			g_strfreev(*str);
			str++;
		}

		g_free(str);
	}
code: end

struct: String
class: StringG

struct: Thread
noCode: new

struct: Timeout
class: Timeout
cType:
code: start
	/** Holds all idle delegates */
	private bool delegate()[] timeoutListeners;
	/** Our timeout ID */
	private uint timeoutID;


	/**
	 * Creates a new timeout cycle with the default priority, GPriority.DEFAULT.
	 *
	 * Note that timeout functions may be delayed, due to the processing of other
	 * event sources. Thus they should not be relied on for precise timing.
	 * After each call to the timeout function, the time of the next timeout is
	 * recalculated based on the current time and the given interval
	 * (it does not try to 'catch up' time lost in delays).
	 * Params:
	 *    	interval = 	the timeout in milieconds
	 *    	delegate() = 	the delegate to be executed
	 *    	fireNow = 	When true the delegate will be executed emmidiatly
	 */
	this(uint interval, bool delegate() dlg, bool fireNow=false)
	{
		if ( fireNow && !dlg() )
			return;

		timeoutListeners ~= dlg;
		timeoutID = g_timeout_add_full(GPriority.DEFAULT, interval, cast(GSourceFunc)&timeoutCallback, cast(void*)this, cast(GDestroyNotify)&destroyTimeoutNotify);
	}

	/**
	 * Creates a new timeout cycle.
	 * Params:
	 *    	interval = 	the timeout in milieconds
	 *    	delegate() = 	the delegate to be executed
	 *      priority = Priority for the timeout function
	 *    	fireNow = 	When true the delegate will be executed emmidiatly
	 */
	this(uint interval, bool delegate() dlg, GPriority priority, bool fireNow=false)
	{
		if ( fireNow && !dlg() )
			return;

		timeoutListeners ~= dlg;
		timeoutID = g_timeout_add_full(priority, interval, cast(GSourceFunc)&timeoutCallback, cast(void*)this, cast(GDestroyNotify)&destroyTimeoutNotify);
	}

	/**
	 * Creates a new timeout cycle with the default priority, GPriority.DEFAULT.
	 * Params:
	 *    	delegate() = 	the delegate to be executed
	 *      seconds = interval in seconds.
	 *    	fireNow = 	When true the delegate will be executed emmidiatly
	 */
	this(bool delegate() dlg, uint seconds, bool fireNow=false)
	{
		if ( fireNow && !dlg() )
			return;

		timeoutListeners ~= dlg;
		timeoutID = g_timeout_add_seconds_full(GPriority.DEFAULT, seconds, cast(GSourceFunc)&timeoutCallback, cast(void*)this, cast(GDestroyNotify)&destroyTimeoutNotify);
	}

	/**
	 * Creates a new timeout cycle.
	 * Params:
	 *    	delegate() = 	the delegate to be executed
	 *      seconds = interval in seconds.
	 *      priority = Priority for the timeout function
	 *    	fireNow = 	When true the delegate will be executed emmidiatly
	 */
	this(bool delegate() dlg, uint seconds, GPriority priority, bool fireNow=false)
	{
		if ( fireNow && !dlg() )
			return;

		timeoutListeners ~= dlg;
		timeoutID = g_timeout_add_seconds_full(priority, seconds, cast(GSourceFunc)&timeoutCallback, cast(void*)this, cast(GDestroyNotify)&destroyTimeoutNotify);
	}

	/** Removes the timeout from gtk */
	public void stop()
	{
		if ( timeoutID > 0 )
		{
			g_source_remove(timeoutID);
		}
	}

	/**
	 * Removes the timeout from gtk
	 */
	~this()
	{
		stop();
	}

	/**
	 * Adds a new delegate to this timeout cycle
	 * Params:
	 *    	dlg =
	 *    	fireNow =
	 */
	public void addListener(bool delegate() dlg, bool fireNow=false)
	{
		if ( fireNow && !dlg() )
			return;

		timeoutListeners ~= dlg;
	}

	/**
	 * The callback execution from glib
	 * Params:
	 *    	timeout =
	 * Returns:
	 */
	extern(C) static bool timeoutCallback(Timeout timeout)
	{
		bool runAgain = false;
		int i = 0;

		while ( i<timeout.timeoutListeners.length )
		{
			if ( !timeout.timeoutListeners[i]() )
			{
				timeout.timeoutListeners = timeout.timeoutListeners[0..i] ~ timeout.timeoutListeners[i+1..$];
			}
			else
			{
				runAgain = true;
				++i;
			}
		}

		return runAgain;
	}

	/*
	 * Reset the timeout object when it's destroyed on the GTK side.
	 */
	extern(C) static void destroyTimeoutNotify(Timeout timeout)
	{
		timeout.timeoutListeners.length = 0;
		timeout.timeoutID = 0;
	}
code: end

struct: TimeZone
noCode: new_local
noCode: new_utc

struct: Tree
class: BBTree

struct: Util
move: build_filenamev Util
move: build_pathv Util
noCode: build_filenamev
noCode: build_pathv
code: start
	/**
	 * Behaves exactly like g_build_filename(), but takes the path elements
	 * as a string array, instead of varargs. This function is mainly
	 * meant for language bindings.
	 *
	 * Params:
	 *     args = strings containing the path elements.
	 *
	 * Return: a newly-allocated string that must be freed with g_free().
	 *
	 * Since: 2.8
	 */
	public static string buildFilename(string[] firstElement ... )
	{
		return Str.toString(g_build_filenamev(Str.toStringzArray(firstElement)));
	}

	/**
	 * Behaves exactly like g_build_path(), but takes the path elements
	 * as a string array, instead of varargs. This function is mainly
	 * meant for language bindings.
	 *
	 * Params:
	 *     separator = a string used to separator the elements of the path.
	 *     args = strings containing the path elements.
	 *
	 * Return: a newly-allocated string that must be freed with g_free().
	 *
	 * Since: 2.8
	 */
	public static string buildPath(string separator, string[] firstElement ... )
	{
		return Str.toString(g_build_pathv(Str.toStringz(separator), Str.toStringzArray(firstElement)));
	}
code: end

struct: Variant
noCode: new_bytestring_array
noCode: new_object_path
noCode: new_signature
noCode: new_objv
noCode: new_bytestring
noCode: new_handle
noCode: new_take_string
code: start
	/**
	 * Creates a DBus object path GVariant with the contents of string.
	 * string must be a valid DBus object path.
	 * Use Variant.isObjectPath() if you're not sure.
	 *
	 * Since: 2.24
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Variant fromObjectPath(string path)
	{
		auto p = g_variant_new_object_path(Str.toStringz(path));
		if(p is null)
		{
			throw new ConstructionException("null returned by g_variant_new_object_path");
		}
		return new Variant(cast(GVariant*) p);
	}

	/**
	 * Creates a DBus type signature GVariant with the contents of string.
	 * string must be a valid DBus type signature.
	 * Use Variant.isSignature() if you're not sure.
	 *
	 * Since: 2.24
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Variant fromSignature(string signature)
	{
		auto p = g_variant_new_signature(Str.toStringz(signature));
		if(p is null)
		{
			throw new ConstructionException("null returned by g_variant_new_signature");
		}
		return new Variant(cast(GVariant*) p);
	}

	/**
	 * Creates an array-of-bytes GVariant with the contents of string.
	 * This function is just like new Variant(string) except that the string
	 * need not be valid utf8.
	 *
	 * The nul terminator character at the end of the string is stored in
	 * the array.
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Variant fromByteString(string byteString)
	{
		auto p = g_variant_new_bytestring(Str.toStringz(byteString));
		if(p is null)
		{
			throw new ConstructionException("null returned by g_variant_new_bytestring");
		}
		return new Variant(cast(GVariant*) p);
	}

	/**
	 * Constructs an array of object paths Variant from the given array
	 * of strings.
	 *
	 * Each string must be a valid Variant object path.
	 *
	 * Since: 2.30
	 *
	 * Params:
	 *     strv   = an array of strings.
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Variant fromObjv(string[] strv)
	{
		// GVariant * g_variant_new_objv (const gchar * const *strv,  gssize length);
		auto p = g_variant_new_objv(Str.toStringzArray(strv), strv.length);
		if(p is null)
		{
			throw new ConstructionException("null returned by g_variant_new_objv(strv, length)");
		}
		return new Variant(cast(GVariant*) p);
	}

	/**
	 * Constructs an array of bytestring GVariant from the given array of
	 * strings. If length is -1 then strv is null-terminated.
	 *
	 * Since: 2.26
	 *
	 * Params:
	 *     strv   = an array of strings.
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Variant fromByteStringArray(string[] strv)
	{
		auto p = g_variant_new_bytestring_array(Str.toStringzArray(strv), strv.length);
		if(p is null)
		{
			throw new ConstructionException("null returned by g_variant_new_bytestring_array(strv, length)");
		}
		return new Variant(cast(GVariant*) p);
	}
code: end

struct: VariantType
noCode: new_maybe
code: start
	/**
	 * Constructs the type corresponding to a maybe instance containing
	 * type type or Nothing.
	 *
	 * It is appropriate to call free() on the return value.
	 *
	 * Params:
	 *     element = a VariantType
	 *
	 * Return: a new maybe VariantType
	 *
	 *     Since 2.24
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static VariantType newMaybe(VariantType element)
	{
		auto p = g_variant_type_new_maybe((element is null) ? null : element.getVariantTypeStruct());

		if(p is null)
		{
			throw new ConstructionException("null returned by new_maybe");
		}

		return new VariantType(cast(GVariantType*) p);
	}
code: end

struct:

move: atomic_int_add Atomic int_add
move: atomic_int_and Atomic int_and
move: atomic_int_compare_and_exchange Atomic int_compare_and_exchange
move: atomic_int_dec_and_test Atomic int_dec_and_test
move: atomic_int_exchange_and_add Atomic int_exchange_and_add
move: atomic_int_get Atomic int_get
move: atomic_int_inc Atomic int_inc
move: atomic_int_or Atomic int_or
move: atomic_int_set Atomic int_set
move: atomic_int_xor Atomic int_xor
move: atomic_pointer_add Atomic pointer_add
move: atomic_pointer_and Atomic pointer_and
move: atomic_pointer_compare_and_exchange Atomic pointer_compare_and_exchange
move: atomic_pointer_get Atomic pointer_get
move: atomic_pointer_or Atomic pointer_or
move: atomic_pointer_set Atomic pointer_set
move: atomic_pointer_xor Atomic pointer_xor

move: base64_decode Base64 decode
move: base64_encode Base64 encode
move: base64_encode_close Base64 encode_close
move: base64_encode_step Base64 encode_step

move: convert CharacterSet
move: convert_error_quark CharacterSet
move: convert_with_fallback CharacterSet
move: convert_with_iconv CharacterSet
move: filename_display_basename CharacterSet
move: filename_display_name CharacterSet
move: filename_from_utf8 CharacterSet
move: filename_to_utf8 CharacterSet
move: get_charset CharacterSet
move: get_codeset CharacterSet
move: get_filename_charsets CharacterSet
move: locale_from_utf8 CharacterSet
move: locale_to_utf8 CharacterSet

move: child_watch_add Child
move: child_watch_add_full Child
move: child_watch_source_new Child

move: compute_checksum_for_bytes Checksum
move: compute_checksum_for_data Checksum
move: compute_checksum_for_string Checksum

move: datalist_clear DataList clear
move: datalist_foreach DataList foreach
move: datalist_get_data DataList get_data
move: datalist_get_flags DataList get_flags
move: datalist_id_dup_data DataList id_dup_data
move: datalist_id_get_data DataList id_get_data
move: datalist_id_remove_no_notify DataList id_remove_no_notify
move: datalist_id_replace_data DataList id_replace_data
move: datalist_id_set_data_full DataList id_set_data_full
move: datalist_init DataList init
move: datalist_set_flags DataList set_flags
move: datalist_unset_flags DataList unset_flags

move: dataset_destroy DataSet destroy
move: dataset_foreach DataSet foreach
move: dataset_id_get_data DataSet id_get_data
move: dataset_id_remove_no_notify DataSet id_remove_no_notify
move: dataset_id_set_data_full DataSet id_set_data_full

#move: clear_error Error
move: prefix_error Error
move: propagate_prefixed_error Error
move: set_error Error

move: access FileUtils
move: chdir FileUtils
move: close FileUtils
move: file_error_from_errno FileUtils
move: file_error_quark FileUtils
move: file_get_contents FileUtils
move: file_open_tmp FileUtils
move: file_read_link FileUtils
move: file_set_contents FileUtils
move: file_test FileUtils
move: mkdir_with_parents FileUtils
move: mkdtemp FileUtils
move: mkdtemp_full FileUtils
move: mkstemp FileUtils
move: mkstemp_full FileUtils
move: rmdir FileUtils
move: unlink FileUtils

move: direct_equal HashTable
move: direct_hash HashTable
move: double_equal HashTable
move: double_hash HashTable
move: int64_equal HashTable
move: int64_hash HashTable
move: int_equal HashTable
move: int_hash HashTable
move: str_equal HashTable
move: str_hash HashTable

move: hostname_is_ascii_encoded Hostname is_ascii_encoded
move: hostname_is_ip_address Hostname is_ip_address
move: hostname_is_non_ascii Hostname is_non_ascii
move: hostname_to_ascii Hostname to_ascii
move: hostname_to_unicode Hostname to_unicode

move: idle_add Idle add
move: idle_add_full Idle add_full
move: idle_remove_by_data Idle remove_by_data
move: idle_source_new Idle source_new

move: dcgettext Internationalization
move: dgettext Internationalization
move: dngettext Internationalization
move: dpgettext Internationalization
move: dpgettext2 Internationalization
move: get_language_names Internationalization
move: get_locale_variants Internationalization
move: strip_context Internationalization

move: io_add_watch IOChannel
move: io_add_watch_full IOChannel
move: io_create_watch IOChannel

move: main_current_source MainLoop
move: main_depth MainLoop
move: poll MainLoop

move: markup_collect_attributes MarkupParseContext
move: markup_error_quark MarkupParseContext
move: markup_escape_text MarkupParseContext
move: markup_printf_escaped MarkupParseContext
move: markup_vprintf_escaped MarkupParseContext

move: clear_pointer Memory
move: free Memory
move: malloc Memory
move: malloc0 Memory
move: malloc0_n Memory
move: malloc_n Memory
move: mem_is_system_malloc Memory
move: mem_profile Memory
move: mem_set_vtable Memory
move: memdup Memory
move: realloc Memory
move: realloc_n Memory
move: try_malloc Memory
move: try_malloc0 Memory
move: try_malloc0_n Memory
move: try_malloc_n Memory
move: try_realloc Memory
move: try_realloc_n Memory

move: slice_alloc MemorySlice
move: slice_alloc0 MemorySlice
move: slice_copy MemorySlice
move: slice_free1 MemorySlice
move: slice_free_chain_with_offset MemorySlice
move: slice_get_config MemorySlice
move: slice_get_config_state MemorySlice
move: slice_set_config MemorySlice

move: log MessageLog
move: log_default_handler MessageLog
move: log_remove_handler MessageLog
move: log_set_always_fatal MessageLog
move: log_set_default_handler MessageLog
move: log_set_fatal_mask MessageLog
move: log_set_handler MessageLog
move: log_set_handler_full MessageLog
move: logv MessageLog

move: on_error_query Messages
move: on_error_stack_trace Messages
move: print Messages
move: printerr Messages
move: set_print_handler Messages
move: set_printerr_handler Messages

move: option_error_quark OptionContext

move: pattern_match PatternSpec
move: pattern_match_simple PatternSpec
move: pattern_match_string PatternSpec

move: intern_static_string Quark
move: intern_string Quark
move: quark_from_static_string Quark
move: quark_from_string Quark
move: quark_to_string Quark
move: quark_try_string Quark

move: random_double Rand
move: random_double_range Rand
move: random_int Rand
move: random_int_range Rand
move: random_set_seed Rand

move: shell_error_quark ShellUtils
move: shell_parse_argv ShellUtils
move: shell_quote ShellUtils
move: shell_unquote ShellUtils

move: spawn_async Spawn async
move: spawn_async_with_pipes Spawn async_with_pipes
move: spawn_check_exit_status Spawn check_exit_status
move: spawn_close_pid Spawn close_pid
move: spawn_command_line_async Spawn command_line_async
move: spawn_command_line_sync Spawn command_line_sync
move: spawn_error_quark Spawn error_quark
move: spawn_exit_error_quark Spawn exit_error_quark
move: spawn_sync Spawn sync

struct: Spawn
noCode: async_with_pipes

move: ascii_digit_value Str
move: ascii_dtostr Str
move: ascii_formatd Str
move: ascii_strcasecmp Str
move: ascii_strdown Str
move: ascii_strncasecmp Str
move: ascii_strtod Str
move: ascii_strtoll Str
move: ascii_strtoull Str
move: ascii_strup Str
move: ascii_tolower Str
move: ascii_toupper Str
move: ascii_xdigit_value Str
move: printf Str
move: printf_string_upper_bound Str
move: snprintf Str
move: sprintf Str
move: stpcpy Str
move: str_has_prefix Str has_prefix
move: str_has_suffix Str has_suffix
move: str_is_ascii Str is_ascii
move: str_match_string Str match_string
move: str_to_ascii Str to_ascii
move: str_tokenize_and_fold Str tokenize_and_fold
move: strcanon Str
move: strcasecmp Str
move: strchomp Str
move: strchug Str
move: strcmp0 Str
move: strcompress Str
move: strconcat Str
move: strdelimit Str
move: strdown Str
move: strdup Str
move: strdup_printf Str
move: strdup_vprintf Str
move: strdupv Str
move: strerror Str
move: strescape Str
move: strfreev Str
move: strjoin Str
move: strjoinv Str
move: strlcat Str
move: strlcpy Str
move: strncasecmp Str
move: strndup Str
move: strnfill Str
move: strreverse Str
move: strrstr Str
move: strrstr_len Str
move: strsignal Str
move: strsplit Str
move: strsplit_set Str
move: strstr_len Str
move: strtod Str
move: strup Str
move: strv_get_type Str
move: strv_length Str
move: strv_contains Str
move: vasprintf Str
move: vprintf Str
move: vsnprintf Str
move: vsprintf Str

version !OSX: start
	move: fprintf Str
	move: vfprintf Str
version: end

version 2.54: start
	move: ascii_string_to_signed Str
	move: ascii_string_to_unsigned Str
version: end

move: string_new String
move: string_new_len String
move: string_sized_new String

move: bit_lock Thread
move: bit_trylock Thread
move: bit_unlock Thread
move: get_num_processors Thread
move: pointer_bit_lock Thread
move: pointer_bit_trylock Thread
move: pointer_bit_unlock Thread

move: timeout_add Timeout add
move: timeout_add_full Timeout add_full
move: timeout_add_seconds Timeout add_seconds
move: timeout_add_seconds_full Timeout add_seconds_full
move: timeout_source_new Timeout source_new
move: timeout_source_new_seconds Timeout source_new_seconds

move: get_current_time TimeVal
move: get_monotonic_time TimeVal
move: get_real_time TimeVal
move: usleep TimeVal

move: ucs4_to_utf16 Unicode
move: ucs4_to_utf8 Unicode
move: unichar_break_type Unicode
move: unichar_combining_class Unicode
move: unichar_compose Unicode
move: unichar_decompose Unicode
move: unichar_digit_value Unicode
move: unichar_fully_decompose Unicode
move: unichar_get_mirror_char Unicode
move: unichar_get_script Unicode
move: unichar_isalnum Unicode
move: unichar_isalpha Unicode
move: unichar_iscntrl Unicode
move: unichar_isdefined Unicode
move: unichar_isdigit Unicode
move: unichar_isgraph Unicode
move: unichar_islower Unicode
move: unichar_ismark Unicode
move: unichar_isprint Unicode
move: unichar_ispunct Unicode
move: unichar_isspace Unicode
move: unichar_istitle Unicode
move: unichar_isupper Unicode
move: unichar_iswide Unicode
move: unichar_iswide_cjk Unicode
move: unichar_isxdigit Unicode
move: unichar_iszerowidth Unicode
move: unichar_to_utf8 Unicode
move: unichar_tolower Unicode
move: unichar_totitle Unicode
move: unichar_toupper Unicode
move: unichar_type Unicode
move: unichar_validate Unicode
move: unichar_xdigit_value Unicode
move: unicode_canonical_decomposition Unicode
move: unicode_canonical_ordering Unicode
move: unicode_script_from_iso15924 Unicode
move: unicode_script_to_iso15924 Unicode
move: utf16_to_ucs4 Unicode
move: utf16_to_utf8 Unicode
move: utf8_casefold Unicode
move: utf8_collate Unicode
move: utf8_collate_key Unicode
move: utf8_collate_key_for_filename Unicode
move: utf8_find_next_char Unicode
move: utf8_find_prev_char Unicode
move: utf8_get_char Unicode
move: utf8_get_char_validated Unicode
move: utf8_normalize Unicode
move: utf8_offset_to_pointer Unicode
move: utf8_pointer_to_offset Unicode
move: utf8_prev_char Unicode
move: utf8_strchr Unicode
move: utf8_strdown Unicode
move: utf8_strlen Unicode
move: utf8_strncpy Unicode
move: utf8_strrchr Unicode
move: utf8_strreverse Unicode
move: utf8_strup Unicode
move: utf8_substring Unicode
move: utf8_to_ucs4 Unicode
move: utf8_to_ucs4_fast Unicode
move: utf8_to_utf16 Unicode
move: utf8_validate Unicode
version 2.52: move: utf8_make_valid Unicode

version !Windows: start
	move: unix_error_quark UnixUtils error_quark
	move: unix_fd_add UnixUtils fd_add
	move: unix_fd_add_full UnixUtils fd_add_full
	move: unix_fd_source_new UnixUtils fd_source_new
	move: unix_open_pipe UnixUtils open_pipe
	move: unix_set_fd_nonblocking UnixUtils set_fd_nonblocking
	move: unix_signal_add UnixUtils signal_add
	move: unix_signal_add_full UnixUtils signal_add_full
	move: unix_signal_source_new UnixUtils signal_source_new
version: end

move: filename_from_uri URI
move: filename_to_uri URI
move: uri_escape_string URI
move: uri_list_extract_uris URI
move: uri_parse_scheme URI
move: uri_unescape_segment URI
move: uri_unescape_string URI

version 2.52: start
	move: uuid_string_is_valid Uuid string_is_valid
	move: uuid_string_random Uuid string_random
version: end

move: atexit Util
move: basename Util
move: bit_nth_lsf Util
move: bit_nth_msf Util
move: bit_storage Util
move: build_path Util
move: environ_getenv Util
move: environ_setenv Util
move: environ_unsetenv Util
move: find_program_in_path Util
move: format_size Util
move: format_size_for_display Util
move: format_size_full Util
move: get_application_name Util
move: get_environ Util
move: get_current_dir Util
move: get_home_dir Util
move: get_host_name Util
move: get_prgname Util
move: get_real_name Util
move: get_system_config_dirs Util
move: get_system_data_dirs Util
move: get_tmp_dir Util
move: get_user_cache_dir Util
move: get_user_config_dir Util
move: get_user_data_dir Util
move: get_user_name Util
move: get_user_runtime_dir Util
move: get_user_special_dir Util
move: getenv Util
move: listenv Util
move: nullify_pointer Util
move: parse_debug_string Util
move: path_get_basename Util
move: path_get_dirname Util
move: path_is_absolute Util
move: path_skip_root Util
move: qsort_with_data Util
move: reload_user_special_dirs_cache Util
move: set_application_name Util
move: set_prgname Util
move: setenv Util
move: spaced_primes_closest Util
move: unsetenv Util

move: check_version Version