File: binding.xml

package info (click to toggle)
libgtkada 3.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,696 kB
  • ctags: 1,395
  • sloc: ada: 58,715; xml: 7,349; python: 4,090; ansic: 1,562; makefile: 304; objc: 154; sh: 130; perl: 70
file content (7936 lines) | stat: -rw-r--r-- 309,627 bytes parent folder | download
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
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
<?xml version="1.0"?>

<!--  This file overrides parts of the .gir files. -->

<GIR xmlns:gir="http://www.gtk.org/introspection/core/1.0"
     xmlns:c="http://www.gtk.org/introspection/c/1.0">

   <!-- ################################################
        Gdk.Device
        ################################################-->

   <package id="GdkDevice">
      <enum ctype="GdkDeviceType" />
      <list ada="Device_List" ctype="GdkDevice"/>
      <method id="::changed" bind="False" /> <!-- elaboration circularity -->
      <method id="gdk_device_get_axis" bind="False" /><!-- need support for array of gdoubles -->
      <method id="gdk_device_get_axis_value" bind="False" /><!-- need support for array of gdoubles -->
      <method id="gdk_device_get_history" bind="False" /><!-- need support for array of Gdk_Time_Coord -->
      <method id="gdk_device_free_history" bind="False" /><!-- no need while we don't bind get_history -->
      <method id="gdk_device_grab_info_libgtk_only" bind="False" /><!-- not part of library -->
      <method id="gdk_device_get_key" return="" bind="False"/><!-- pending L118-010 -->
      <method id="gdk_device_get_window_at_position" bind="False"/><!-- below -->
      <method id="gdk_device_get_position" bind="False"/><!-- pending resolution of a problem with generating the stub object -->
      <method id="gdk_device_list_axes" bind="False"/><!-- no support for atom lists -->
      <method id="gdk_device_list_slave_devices" bind="False"/><!-- no support
      for Gdk_Device_Type_Master lists -->

      <extra>
         <spec>
   procedure Get_Window_At_Position
      (Self   : not null access Gdk_Device_Record;
       Win_X  : out Gint;
       Win_Y  : out Gint;
       Window : out Gdk.Gdk_Window);
   --  Obtains the window underneath Device, returning the location of the
   --  device in Win_X and Win_Y. Returns null if the window tree under Device
   --  is not known to GDK (for example, belongs to another application).
   --  As a slave device coordinates are those of its master pointer, This
   --  function may not be called on devices of type
   --  Gdk.Device.Gdk_Device_Type_Slave, unless there is an ongoing grab on
   --  them, see Gdk.Device.Grab.
   --  Since: gtk+ 3.0
   --  "win_x": return location for the X coordinate of the device location,
   --  relative to the window origin, or null.
   --  "win_y": return location for the Y coordinate of the device location,
   --  relative to the window origin, or null.

   procedure Set_Device
      (Event   : Gdk.Event.Gdk_Event;
       Device  : not null access Gdk_Device_Record);
   --  Sets the device for Event to Device. The event must
   --  have been allocated by GTK+, for instance, by gdk_event_copy().

   procedure Set_Source_Device
      (Event   : Gdk.Event.Gdk_Event;
       Device  : not null access Gdk_Device_Record);
   --  Sets the slave device for Event to Device.
   --  The event must have been allocated by GTK+,
   --  for instance by gdk_event_copy().
         </spec>
         <body>
   procedure Set_Source_Device
      (Event  : Gdk.Event.Gdk_Event;
       Device : not null access Gdk_Device_Record)
   is
      procedure Internal (Event : Gdk.Event.Gdk_Event; D : System.Address);
      pragma Import (C, Internal, "gdk_event_set_source_device");
   begin
      Internal (Event, Get_Object (Device));
   end Set_Source_Device;

   procedure Set_Device
      (Event  : Gdk.Event.Gdk_Event;
       Device : not null access Gdk_Device_Record)
   is
      procedure Internal (Event : Gdk.Event.Gdk_Event; D : System.Address);
      pragma Import (C, Internal, "gdk_event_set_device");
   begin
      Internal (Event, Get_Object (Device));
   end Set_Device;

   procedure Get_Window_At_Position
      (Self   : not null access Gdk_Device_Record;
       Win_X  : out Gint;
       Win_Y  : out Gint;
       Window : out Gdk.Gdk_Window)
   is
      function Internal
         (Self      : System.Address;
          Acc_Win_X : access Gint;
          Acc_Win_Y : access Gint) return Gdk.Gdk_Window;
      pragma Import (C, Internal, "gdk_device_get_window_at_position");
      Acc_Win_X  : aliased Gint;
      Acc_Win_Y  : aliased Gint;
   begin
      Window := Internal (Get_Object (Self), Acc_Win_X'Access, Acc_Win_Y'Access);
      Win_X := Acc_Win_X;
      Win_Y := Acc_Win_Y;
   end Get_Window_At_Position;
         </body>
      </extra>
   </package>

   <!-- ################################################
        Gdk.Drag_Contexts
        ################################################-->

   <package id="GdkDragContext">
      <enum ctype="GdkDragAction" prefix="GDK_"/>
      <enum ctype="GdkDragProtocol" prefix="GDK_"/>
      <method id="gdk_drag_context_list_targets" bind="False"/><!-- not supposed to be used by applications -->
   </package>

   <!-- ################################################
        Gdk.Screen
        ################################################-->

   <package id="GdkScreen">
     <doc group="Gdk, the low-level API"/>
     <parameter name="self" ada="Screen"/>
     <method id="gdk_screen_get_setting" bind="False" />
     <method id="::composited-changed" bind="False" /> <!-- elaboration circularity -->
     <method id="::monitors-changed" bind="False" /> <!-- elaboration circularity -->
     <method id="::size-changed" bind="False" /> <!-- elaboration circularity -->

     <method id="gdk_screen_get_toplevel_windows" return="WindowList" bind="False"/>  <!--  circular dep -->
     <method id="gdk_screen_get_window_stack" return="WindowList" bind="False"/> <!-- circular dep with GdkWindow-->
     <method id="gdk_screen_list_visuals" return="WindowList" bind="False"/> <!-- circular dep with GdkWindow-->
     <extra>
       <with_spec pkg="Gdk.Types" />
       <spec>
   -------------
   -- Display --
   -------------
   --  These subprograms should really be in gdk-display.ads to match what is
   --  done for gtk+ itself, but that would create dependency circularities.
   --  Ada 2005 has support for these, but we want GtkAda to build with Ada95
   --  compilers.

   function Get_Screen
     (Display    : access Gdk.Display.Gdk_Display_Record'Class;
      Screen_Num : Glib.Gint)
      return Gdk_Screen;
   --  Returns a screen object for one of the screens of the display.

   function Get_Default_Screen
     (Display : access Gdk.Display.Gdk_Display_Record'Class) return Gdk_Screen;
   --  Get the default Gdk_Screen for display.

   procedure Get_Pointer
     (Display : access Gdk.Display.Gdk_Display_Record'Class;
      Screen  : out Gdk_Screen;
      X       : out Glib.Gint;
      Y       : out Glib.Gint;
      Mask    : out Gdk.Types.Gdk_Modifier_Type);
   --  Gets the current location of the pointer and the current modifier
   --  mask for a given display.
   --  (X, Y) are coordinates relative to the root window on the display

   procedure Warp_Pointer
     (Display : access Gdk.Display.Gdk_Display_Record'Class;
      Screen  : access Gdk_Screen_Record;
      X       : Glib.Gint;
      Y       : Glib.Gint);
   --  Warps the pointer of display to the point x,y on the screen screen,
   --  unless the pointer is confined to a window by a grab, in which case it
   --  will be moved as far as allowed by the grab. Warping the pointer creates
   --  events as if the user had moved the mouse instantaneously to the
   --  destination.
   --
   --  Note that the pointer should normally be under the control of the user.
   --  This function was added to cover some rare use cases like keyboard
   --  navigation support for the color picker in the GtkColorSelectionDialog.
       </spec>
       <body>
   function Get_Screen
     (Display    : access Gdk_Display_Record'Class;
      Screen_Num : Gint)
      return Gdk_Screen
   is
      function Internal
        (Display    : System.Address;
         Screen_Num : Gint)
         return System.Address;
      pragma Import (C, Internal, "gdk_display_get_screen");
      --  External binding: gdk_display_get_screen
      Stub : Gdk_Screen_Record;
   begin
      return Gdk_Screen
        (Get_User_Data
          (Internal (Get_Object (Display), Screen_Num), Stub));
   end Get_Screen;

   function Get_Default_Screen
     (Display : access Gdk_Display_Record'Class)
      return Gdk_Screen
   is
      function Internal
        (Display : System.Address)
         return System.Address;
      pragma Import (C, Internal, "gdk_display_get_default_screen");
      --  External binding: gdk_display_get_default_screen
      Stub : Gdk_Screen_Record;
   begin
      return Gdk_Screen
        (Get_User_Data
          (Internal (Get_Object (Display)), Stub));
   end Get_Default_Screen;

   procedure Get_Pointer
     (Display : access Gdk_Display_Record'Class;
      Screen  : out Gdk_Screen;
      X       : out Gint;
      Y       : out Gint;
      Mask    : out Gdk_Modifier_Type)
   is
      procedure Internal
        (Display : System.Address;
         Screen  : out System.Address;
         X       : out Gint;
         Y       : out Gint;
         Mask    : out Gdk_Modifier_Type);
      pragma Import (C, Internal, "gdk_display_get_pointer");
      --  External binding: gdk_display_get_pointer

      S    : System.Address;
      Stub : Gdk_Screen_Record;

   begin
      Internal (Get_Object (Display), S, X, Y, Mask);
      Screen := Gdk_Screen (Get_User_Data (S, Stub));
   end Get_Pointer;

   procedure Warp_Pointer
     (Display : access Gdk.Display.Gdk_Display_Record'Class;
      Screen  : access Gdk_Screen_Record;
      X       : Glib.Gint;
      Y       : Glib.Gint)
   is
      procedure Internal (D, S : System.Address; X, Y : Gint);
      pragma Import (C, Internal, "gdk_display_warp_pointer");
      --  External binding: gdk_display_warp_pointer
   begin
      Internal (Get_Object (Display), Get_Object (Screen), X, Y);
   end Warp_Pointer;
       </body>
     </extra>
   </package>

   <!-- ################################################
        Gtk.Aspect_Frame
        ################################################-->

   <package id="GtkAspectFrame">
     <doc testgtk="create_frame.adb" group="Layout Containers"/>
     <parameter name="self" ada="Aspect_Frame"/>
     <method id="gtk_aspect_frame_new">
       <parameter name="label" default='""' allow-none="1"/>
     </method>
   </package>

   <!-- ###################################################
        Gtk.Button
        ###################################################-->

   <package id="GtkButton">
      <doc screenshot="gtk-button" group="Buttons and Toggles"
           testgtk="create_buttons.adb"/>
      <parameter name="self" ada="Button"/>
      <method id="gtk_button_new" bind="False"/>
      <method id="gtk_button_new_with_label" ada="Gtk_New" >
         <parameter name="label" default='""' allow-none="1"/>
      </method>
   </package>

   <!-- ###################################################
        Gtk.Cell_Area
        ###################################################-->

   <package id="GtkCellArea">
      <doc group="Layout Containers"/>
      <method id="gtk_cell_area_cell_get_valist" bind="False"/><!-- va_list -->
      <method id="gtk_cell_area_cell_set_valist" bind="False"/><!-- va_list -->
      <method id="gtk_cell_area_add_with_properties" bind="False"/><!-- varargs-->
      <method id="gtk_cell_area_cell_get" bind="False"/><!-- varargs-->
      <method id="gtk_cell_area_cell_set" bind="False"/><!-- varargs-->
      <method id="gtk_cell_area_get_cell_allocation">
         <parameter name="cell_area" direction="access" />
         <parameter name="allocation" direction="access" />
      </method>
      <method id="gtk_cell_area_get_focus_siblings" return="ObjectList"/>
      <method id="gtk_cell_area_get_cell_at_position" bind="False"/>
      <!-- bound manually below -->
      <extra>
        <spec>
   function Get_Area
      (Context : access Gtk_Cell_Area_Context_Record)
       return Gtk.Cell_Area.Gtk_Cell_Area;
   --  Fetches the Gtk.Cell_Area.Gtk_Cell_Area this Context was created by.
   --  This is generally unneeded by layouting widgets; however it is important
   --  for the context implementation itself to fetch information about the
   --  area it is being used for.
   --  For instance at GtkCellAreaContextClass.allocate time its important to
   --  know details about any cell spacing that the Gtk.Cell_Area.Gtk_Cell_Area
   --  is configured with in order to compute a proper allocation.
   --  Since: gtk+ 3.0

   function Get_Area
      (Cell_Layout : Gtk_Cell_Layout) return Gtk.Cell_Area.Gtk_Cell_Area;
   --  Returns the underlying Gtk.Cell_Area.Gtk_Cell_Area which might be
   --  Cell_Layout if called on a Gtk.Cell_Area.Gtk_Cell_Area or might be null
   --  if no Gtk.Cell_Area.Gtk_Cell_Area is used by Cell_Layout.
   --  Since: gtk+ 3.0

   procedure Get_Cell_At_Position
      (Self       : access Gtk_Cell_Area_Record;
       Context    : access Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record'Class;
       Widget     : access Gtk.Widget.Gtk_Widget_Record'Class;
       Cell_Area  : Gdk.Rectangle.Gdk_Rectangle;
       X          : Gint;
       Y          : Gint;
       Alloc_Area : out Gdk.Rectangle.Gdk_Rectangle;
       Renderer   : out Gtk.Cell_Renderer.Gtk_Cell_Renderer);
   --  Gets the Gtk.Cell_Renderer.Gtk_Cell_Renderer at X and Y coordinates
   --  inside Area and optionally returns the full cell allocation for it
   --  inside Cell_Area.
   --  Since: gtk+ 3.0
   --  "context": the Gtk.Cell_Area_Context.Gtk_Cell_Area_Context used to hold
   --  sizes for Area.
   --  "widget": the Gtk.Widget.Gtk_Widget that Area is rendering on
   --  "cell_area": the whole allocated area for Area in Widget for this row
   --  "x": the x position
   --  "y": the y position
   --  "alloc_area": where to store the inner allocated area of the returned
   --  cell renderer, or null.
   --  "renderer": the rendered that was found.
        </spec>
        <body>
   --------------
   -- Get_Area --
   --------------

   function Get_Area
      (Context : access Gtk_Cell_Area_Context_Record)
       return Gtk.Cell_Area.Gtk_Cell_Area
   is
      function Internal (Context : System.Address) return System.Address;
      pragma Import (C, Internal, "gtk_cell_area_context_get_area");
      Stub_Gtk_Cell_Area : Gtk.Cell_Area.Gtk_Cell_Area_Record;
   begin
      return Gtk.Cell_Area.Gtk_Cell_Area
        (Get_User_Data (Internal (Get_Object (Context)), Stub_Gtk_Cell_Area));
   end Get_Area;

   --------------
   -- Get_Area --
   --------------

   function Get_Area
      (Cell_Layout : Gtk_Cell_Layout) return Gtk.Cell_Area.Gtk_Cell_Area
   is
      function Internal
         (Cell_Layout : Gtk_Cell_Layout) return System.Address;
      pragma Import (C, Internal, "gtk_cell_layout_get_area");
      Stub_Gtk_Cell_Area : Gtk.Cell_Area.Gtk_Cell_Area_Record;
   begin
      return Gtk.Cell_Area.Gtk_Cell_Area (Get_User_Data (Internal (Cell_Layout), Stub_Gtk_Cell_Area));
   end Get_Area;

   --------------------------
   -- Get_Cell_At_Position --
   --------------------------

   procedure Get_Cell_At_Position
      (Self       : access Gtk_Cell_Area_Record;
       Context    : access Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record'Class;
       Widget     : access Gtk.Widget.Gtk_Widget_Record'Class;
       Cell_Area  : Gdk.Rectangle.Gdk_Rectangle;
       X          : Gint;
       Y          : Gint;
       Alloc_Area : out Gdk.Rectangle.Gdk_Rectangle;
       Renderer   : out Gtk.Cell_Renderer.Gtk_Cell_Renderer)
   is
      function Internal
         (Self           : System.Address;
          Context        : System.Address;
          Widget         : System.Address;
          Cell_Area      : Gdk.Rectangle.Gdk_Rectangle;
          X              : Gint;
          Y              : Gint;
          Acc_Alloc_Area : access Gdk.Rectangle.Gdk_Rectangle)
          return System.Address;
      pragma Import (C, Internal, "gtk_cell_area_get_cell_at_position");
      Acc_Alloc_Area         : aliased Gdk.Rectangle.Gdk_Rectangle;
      Stub_Gtk_Cell_Renderer : Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record;
      Tmp_Return             : System.Address;
   begin
      Tmp_Return := Internal
        (Get_Object (Self), Get_Object (Context), Get_Object (Widget),
         Cell_Area, X, Y, Acc_Alloc_Area'Access);
      Alloc_Area := Acc_Alloc_Area;
      Renderer := Gtk.Cell_Renderer.Gtk_Cell_Renderer
        (Get_User_Data (Tmp_Return, Stub_Gtk_Cell_Renderer));
   end Get_Cell_At_Position;
        </body>
      </extra>
   </package>

   <!-- ###################################################
        Gtk.Cell_Area_Context
        ###################################################-->

   <package id="GtkCellAreaContext">
      <doc group="Layout Containers"/>
      <method id="gtk_cell_area_context_get_area" bind="False"/>
      <!-- in Gtk.Cell_Area -->
   </package>

   <!-- ################################################
        Gtk.Color_Selection
        ################################################-->

   <package id="GtkColorSelection">
      <doc testgtk="create_color_selection.adb"
           screenshot="gtk-colorsel"
           group="Drawing">
A Gtk_Color_Selection widget is a complex dialog that allows the user
to select a color based either on its (Red, Green, Blue) or its
(Hue, Saturation, Value).
An additional field is provided to select the opacity of the color (this
is usually called the alpha channel).

See Gtk.Color_Selection_Dialog for a version of this widget that comes with
its own dialog.

See Gtk.Extra.Color_Combo for a different way to select colors.
      </doc>
     <parameter name="self" ada="Colorsel"/>

     <!-- Bound manually below -->
     <method id="gtk_color_selection_palette_from_string" bind="False"/>
     <method id="gtk_color_selection_palette_to_string" bind="False"/>

     <extra>
        <spec>
   type Gtk_Color_Selection_Change_Palette_With_Screen_Func is access procedure
      (Screen   : System.Address;  --  Convert to Gdk_Screen with Get_User_Data
       Colors   : Gdk.Color.Gdk_Color_Unconstrained_Array;
       N_Colors : Gint);
   pragma Convention (C, Gtk_Color_Selection_Change_Palette_With_Screen_Func);
   --  This function should save the new palette contents, and update the
   --  Gtk_Settings property "gtk-color-palette" so all Gtk_Color_Selection
   --  widgets will be modified, including the current one. For instance, you
   --  would do:
   --    Set_String_Property
   --      (Get_Default, Gtk_Color_Palette, Palette_To_String (Colors), "Foo");

   function Palette_From_String
     (Str : String) return Gdk.Color.Gdk_Color_Array;
   --  Parses a color palette string. This string is a colon-separated list of
   --  color names readable by Gdk.Color.Parse.
   --  An empty array is returned if Str couldn't be parsed

   function Palette_To_String
     (Colors   : Gdk.Color.Gdk_Color_Array) return String;
   --  Encodes a palette as a string, useful for persistent storage.
        </spec>

        <with_body pkg="Gtkada.C"/>
        <with_body pkg="Interfaces.C.Strings"/>

        <body>
   package Color_Arrays is new Gtkada.C.Unbounded_Arrays
     (Gdk.Color.Gdk_Color, Gdk.Color.Null_Color, Natural,
      Gdk.Color.Gdk_Color_Array);

   function Palette_From_String (Str : String) return Gdk_Color_Array is
      use Color_Arrays;
      function Internal
        (Str : String;
         Colors : access Unbounded_Array_Access; N : access Gint)
         return Gboolean;
      pragma Import (C, Internal, "gtk_color_selection_palette_from_string");

      N      : aliased Gint;
      Output : aliased Unbounded_Array_Access;
   begin
      if Internal (Str &amp; ASCII.NUL, Output'Access, N'Access) = 0 then
         Output := null;
      end if;

      declare
         Result : constant Gdk_Color_Array := To_Array (Output, Integer (N));
      begin
         G_Free (Output);
         return Result;
      end;
   end Palette_From_String;

   function Palette_To_String (Colors : Gdk_Color_Array) return String is
      function Internal
        (Colors   : System.Address;
         N_Colors : Gint)
         return Interfaces.C.Strings.chars_ptr;
      pragma Import (C, Internal, "gtk_color_selection_palette_to_string");
      Str : chars_ptr;
   begin
      if Colors'Length = 0 then
         return "";
      else
         Str := Internal (Colors (Colors'First)'Address, Colors'Length);
         declare
            Result : constant String := Value (Str);
         begin
            Free (Str);
            return Result;
         end;
      end if;
   end Palette_To_String;
       </body>
     </extra>
   </package>

   <!-- ################################################
        Gtk.Color_Selection_Dialog
        ################################################-->

   <package id="GtkColorSelectionDialog">
      <doc group="Drawing">
The Gtk_Color_Selection_Dialog provides a standard dialog which allows the
user to select a color much like the Gtk_File_Selection provides a standard
dialog for file selection.
      </doc>
     <parameter name="self" ada="Color_Selection_Dialog"/>
     <method id="gtk_color_selection_dialog_get_color_selection"
         return="GtkColorSelection">
     </method>
   </package>

   <!-- ################################################
        Gtk.Combo_Box
        ################################################-->

   <package id="GtkComboBox">
     <doc group="Numeric/Text Data Entry"/>
     <parameter name="self" ada="Combo_Box"/>
     <method id="gtk_combo_box_popup_for_device" bind="False" />
     <method id="gtk_combo_box_get_popup_accessible" bind="False" />
     <method id="gtk_combo_box_get_active_iter" bind="False"/> <!-- below-->
     <extra>

         <with_body pkg="Gtk.GEntry" />
        <spec>
   function Get_Active_Iter
     (Combo_Box : not null access Gtk_Combo_Box_Record)
      return Gtk.Tree_Model.Gtk_Tree_Iter;
   --  Return the currently active iter

   function Get_Active_Text
     (Combo_Box : not null access Gtk_Combo_Box_Record)
      return UTF8_String;
   --  Return the text present in the entry if it has one, or the empty string

        </spec>
        <body>
   function Get_Active_Iter
     (Combo_Box : not null access Gtk_Combo_Box_Record) return Gtk_Tree_Iter
   is
      function Internal
        (Combo_Box : System.Address;
         Iter      : System.Address)
         return Gboolean;
      pragma Import (C, Internal, "gtk_combo_box_get_active_iter");
      Iter : aliased Gtk_Tree_Iter;
      Tmp  : constant Gboolean := Internal
        (Get_Object (Combo_Box), Iter'Address);
   begin
      if Tmp /= 0 then
         return Iter;
      else
         return Null_Iter;
      end if;
   end Get_Active_Iter;

   function Get_Active_Text
     (Combo_Box : not null access Gtk_Combo_Box_Record)
      return UTF8_String is
   begin
      if not Combo_Box.Get_Has_Entry then
         return "";
      end if;

      return Gtk_Entry (Combo_Box.Get_Child).Get_Text;
   end Get_Active_Text;

        </body>
     </extra>
   </package>

   <!-- ################################################
        Gtk.Combo_Box_Text
        ################################################-->

   <package id="GtkComboBoxText">
     <doc group="Numeric/Text Data Entry"/>
   </package>

   <!-- ################################################
        Gtk.EventBox
        ################################################-->

   <package id="GtkEventBox">
     <doc group="Layout Containers"/>
     <parameter name="self" ada="Event_Box"/>
     <method id="gtk_event_box_new">
         <doc>
Create a new box.

The box's child can then be set using the Gtk.Container.Add function.
         </doc>
     </method>
   </package>


   <!-- ################################################
        Gtk.Font_Selection
        ################################################-->

   <package id="GtkFontSelection">
      <doc testgtk="create_font_selection.adb"
           screenshot="gtk-fontsel"
           group="Selectors">
This widget provides a nice way for the user of your application to
select fonts.
It first searches on your system for the list of fonts available, and
displays a set of boxes to select them based on their name, their
weight, their size, etc.
This widget is provided in two forms, one widget that can be embedded
in any container, a Gtk_Font_Selection, whereas the other one comes
directly in its own separate window (to be popped up as a dialog).

Some filters can be applied to the widget, when you want the user to
select only a font only among a specific subset (like bitmap or
true-type fonts for instance).
There are two kinds of filters: a base filter, set in your application
and that the user can not change; a user filter that can be modified
interactively by the user.
      </doc>
     <parameter name="self" ada="Fontsel"/>
     <method id="gtk_font_selection_get_family" bind="False"/>
     <method id="gtk_font_selection_get_face" bind="False"/>
   </package>

   <!-- ################################################
        Gtk.Font_Selection_Dialog
        ################################################-->

   <package id="GtkFontSelectionDialog">
      <doc testgtk="create_font_selection.adb"
           screenshot="gtk-fontsel"
           group="Selectors">
This widget provides a dialog for selecting a font.
See also Gtk.Font_Selection.
      </doc>
     <parameter name="self" ada="Dialog"/>
   </package>

   <!-- ###################################################
        Gtk.Frame
        ###################################################-->
   <package id="GtkFrame">
      <doc screenshot="gtk-frame" testgtk="create_frame.adb"
           group="Ornaments">
This is a very convenient widget to visually group related widgets (like
groups of buttons for instance), possibly with a title to explain the
purpose of this group.

A Gtk_Frame has only one child, so you have to put a container like for
instance a Gtk_Box inside if you want the frame to surround multiple
widgets.
      </doc>
      <parameter name="self" ada="Frame"/>

      <method id="gtk_frame_new">
         <parameter name="label" default='""' allow-none="1"/>
      </method>
   </package>

   <!-- ################################################
        Gtk.Label
        ################################################-->

   <package id="GtkLabel">
      <doc screenshot="gtk-label" testgtk="create_label.adb"
           group="Display widgets"/>
      <parameter name="self" ada="Label"/>
      <method id="gtk_label_new">
         <parameter name="str" default='""'/>
      </method>
      <method id="gtk_label_get" bind="false"/>
      <method id="gtk_label_select_region">
         <parameter name="start_offset" default="-1"/>
         <parameter name="end_offset" default="-1"/>
      </method>
      <method id="gtk_label_get_selection_bounds"
         return_as_param="Has_Selection"/>
      <method id="gtk_label_set_pattern">
         <doc>
Change the underlines pattern.

Pattern is a simple string made of underscore and space characters,
matching the ones in the string. GtkAda will underline every letter
that matches an underscore.

An empty string disables the underlines.

example: If the text is FooBarBaz and the Pattern is "___   ___"
then both "Foo" and "Baz" will be underlined, but not "Bar".
         </doc>
      </method>
   </package>

   <!-- ###################################################
        Gtk.Notebook
        ###################################################-->

   <package id="GtkNotebook">
      <enum ctype="GtkNotebookTab"/>
      <doc screenshot="gtk-notebook" group="Layout containers"
           testgtk="create_notebook.adb"/>
      <parameter name="self" ada="Notebook"/>
      <method id="gtk_notebook_set_scrollable">
         <parameter name="scrollable" default="True" />
      </method>
      <method id="gtk_notebook_set_tab_reorderable">
         <parameter name="reorderable" default="True" />
      </method>
      <method id="gtk_notebook_set_current_page">
         <parameter name="page_num" default="-1" />
      </method>
      <method id="gtk_notebook_set_show_border">
         <parameter name="show_border" default="True" />
      </method>
      <method id="gtk_notebook_append_page_menu" return="void" />
      <method id="gtk_notebook_set_show_tabs">
         <parameter name="show_tabs" default="True" />
      </method>
      <method id="gtk_notebook_set_tab_detachable">
         <parameter name="detachable" default="True" />
      </method>
      <extra>
        <spec>
   procedure Append_Page
     (Notebook  : access Gtk_Notebook_Record;
      Child     : access Gtk.Widget.Gtk_Widget_Record'Class);
   procedure Append_Page
     (Notebook  : access Gtk_Notebook_Record;
      Child     : access Gtk.Widget.Gtk_Widget_Record'Class;
      Tab_Label : access Gtk.Widget.Gtk_Widget_Record'Class);
   procedure Prepend_Page
     (Notebook  : access Gtk_Notebook_Record;
      Child     : access Gtk.Widget.Gtk_Widget_Record'Class;
      Tab_Label : access Gtk.Widget.Gtk_Widget_Record'Class);
   --  Convenience functions, same as above but discarding the return value.
        </spec>
        <body>
   procedure Append_Page
     (Notebook  : access Gtk_Notebook_Record;
      Child     : access Gtk.Widget.Gtk_Widget_Record'Class)
   is
      Ignored : Gint;
      pragma Unreferenced (Ignored);
   begin
      Ignored := Append_Page (Notebook, Child, null);
   end Append_Page;

   procedure Append_Page
     (Notebook  : access Gtk_Notebook_Record;
      Child     : access Gtk.Widget.Gtk_Widget_Record'Class;
      Tab_Label : access Gtk.Widget.Gtk_Widget_Record'Class)
   is
      Ignored : Gint;
      pragma Unreferenced (Ignored);
   begin
      Ignored := Append_Page (Notebook, Child, Tab_Label);
   end Append_Page;

   procedure Prepend_Page
     (Notebook  : access Gtk_Notebook_Record;
      Child     : access Gtk.Widget.Gtk_Widget_Record'Class;
      Tab_Label : access Gtk.Widget.Gtk_Widget_Record'Class)
   is
      Ignored : Gint;
      pragma Unreferenced (Ignored);
   begin
      Ignored := Append_Page (Notebook, Child, Tab_Label);
   end Prepend_Page;
        </body>
      </extra>
   </package>

   <!-- ################################################
        Gtk.Paned
        ################################################-->

   <package id="GtkPaned">
      <doc screenshot="gtk-paned" testgtk="create_paned.adb"
           group="Layout container"/>
      <parameter name="self" ada="Paned"/>
      <method id="gtk_paned_pack1">
         <parameter name="self" ada="Paned"/>
         <parameter name="resize" default="False" />
         <parameter name="shrink" default="True" />
         <doc>
Add a child to the top or left pane.
You can not change dynamically the attributes Resize and Shrink.
Instead, you have to remove the child from the container, and put it
back with the new value of the attributes. You should also first
call Glib.Object.Ref on the child so as to be sure it is not destroyed
when you remove it, and Glib.Object.Unref it at the end. See the
example in testgtk/ in the GtkAda distribution.
         </doc>
      </method>
      <method id="gtk_paned_pack2">
         <parameter name="self" ada="Paned"/>
         <parameter name="resize" default="False" />
         <parameter name="shrink" default="False" />
      </method>
      <method id="gtk_paned_add1">
         <parameter name="self" ada="Paned"/>
         <doc>
Add the first child of the container.
The child will be displayed either in the top or in the left pane,
depending on the orientation of the container.
This is equivalent to using the Pack1 procedure with its default parameters.
         </doc>
      </method>
      <method id="gtk_paned_add2">
         <parameter name="self" ada="Paned"/>
         <doc>
Add the second child of the container.
It will be displayed in the bottom or right pane, depending on the
container's orientation.
This is equivalent to using Pack2 with its default parameters.
         </doc>
      </method>
   </package>

   <package id="GtkVPaned" into="GtkPaned">
      <type name="Gtk_Vpaned" subtype="true"/>
      <parameter name="self" ada="Paned"/>
      <method id="gtk_vpaned_new" ada="Gtk_New_Vpaned">
         <doc>The children will be displayed one on top of the other</doc>
      </method>
      <method id="gtk_vpaned_get_type" ada="Get_Type_Vpaned" />
   </package>

   <package id="GtkHPaned" into="GtkPaned">
      <type name="Gtk_Hpaned" subtype="true"/>
      <parameter name="self" ada="Paned"/>
      <method id="gtk_hpaned_new" ada="Gtk_New_Hpaned">
         <doc>The children will be displayed next to each other</doc>
      </method>
      <method id="gtk_hpaned_get_type" ada="Get_Type_Hpaned" />
   </package>


   <!-- ################################################
        Gtk.Box, Gtk.Vbox, Gtk.Hbox
        ################################################-->
   <package id="GtkBox">
      <doc screenshot="gtk-box" testgtk="create_box.adb"
           group="Layout containers">
See the testgtk example in the GtkAda distribution to see concrete examples
on how all the parameters for the boxes work.
      </doc>
      <method id="gtk_box_pack_start">
         <parameter name="self" ada="In_Box"/>
         <parameter name="expand" default="True"/>
         <parameter name="fill" default="True"/>
         <parameter name="padding" default="0"/>
      </method>
      <method id="gtk_box_pack_end">
         <parameter name="self" ada="In_Box"/>
         <parameter name="expand" default="True"/>
         <parameter name="fill" default="True"/>
         <parameter name="padding" default="0"/>
      </method>
      <parameter name="self" ada="Box"/>

      <extra>
         <gir:method c:identifier="ada_box_get_child" name="Get_Child"
                     version="GtkAda 1.0">
            <gir:doc>Return the Num-th child of the box, or null if there is no such child</gir:doc>
            <gir:return-value>
               <gir:type name="GtkWidget" c:type="GtkWidget*"/>
            </gir:return-value>
            <gir:parameters>
               <gir:parameter name="num">
                  <gir:type name="Gint" c:type="gint"/>
               </gir:parameter>
            </gir:parameters>
         </gir:method>
      </extra>
   </package>

   <package id="GtkVBox" into="GtkBox">
      <type name="Gtk_Vbox" subtype="true"/>
      <method id="gtk_vbox_new" ada="Gtk_New_Vbox">
         <parameter name="homogeneous" default="False"/>
         <parameter name="spacing" default="0"/>
      </method>
      <parameter name="self" ada="Box"/>
      <method id="gtk_vbox_get_type" ada="Get_Vbox_Type" />
   </package>

   <package id="GtkHBox" into="GtkBox">
      <type name="Gtk_Hbox" subtype="true"/>
      <method id="gtk_hbox_new" ada="Gtk_New_Hbox" >
         <parameter name="homogeneous" default="False"/>
         <parameter name="spacing" default="0"/>
      </method>
      <parameter name="self" ada="Box"/>
      <method id="gtk_hbox_get_type" ada="Get_Hbox_Type" />
   </package>

   <package id="GtkScale">
      <doc group="Numeric/Text Data Entry" screenshot="gtk-scale.png"/>
      <parameter name="self" ada="Scale"/>
   </package>
   <package id="GtkVScale" into="GtkScale">
      <parameter name="self" ada="Scale"/>
      <type name="Gtk_Vscale" subtype="true"/>
      <method id="gtk_vscale_new" ada="Gtk_New_Vscale">
         <parameter name="adjustment" default="null"/>
      </method>
      <method id="gtk_vscale_new_with_range" ada="Gtk_New_Vscale"/>
      <method id="gtk_vscale_get_type" ada="Vscale_Get_Type" />
   </package>
   <package id="GtkHScale" into="GtkScale">
      <parameter name="self" ada="Scale"/>
      <type name="Gtk_Hscale" subtype="true"/>
      <method id="gtk_hscale_new" ada="Gtk_New_Hscale">
         <parameter name="adjustment" default="null"/>
      </method>
      <method id="gtk_hscale_new_with_range" ada="Gtk_New_Hscale"/>
      <method id="gtk_hscale_get_type" ada="Hscale_Get_Type" />
   </package>

   <package id="GtkArrow">
      <doc screenshot="gtk-arrow" testgtk="create_arrow.adb"/>
      <parameter name="self" ada="Arrow"/>
   </package>

   <package id="GtkClipboard">
      <parameter name="self" ada="Clipboard"/>
      <method id="gtk_clipboard_get">
         <parameter name="selection" default="Gdk.Types.Gdk_None"/>
      </method>
      <method id="gtk_clipboard_get_for_display">
         <parameter name="selection" default="Gdk.Types.Gdk_None"/>
      </method>
      <method id="gtk_clipboard_request_rich_text">
         <parameter name="buffer" ctype="GObject*"/>
      </method>
      <method id="gtk_clipboard_wait_is_rich_text_available">
         <parameter name="buffer" ctype="GObject*"/>
      </method>
      <method id="gtk_clipboard_set_can_store">
         <parameter name="targets" type="Gtk.Target_List.Target_Entry_Array"/>
      </method>
      <method id="gtk_clipboard_set_text">
         <parameter name="text" ctype="char*"/>
         <parameter name="len" default="-1" ada=""/>
      </method>

      <method id="gtk_clipboard_set_with_data" bind="false" /> <!-- low-level -->
      <method id="gtk_clipboard_set_with_owner" bind="false" /> <!-- low-level -->
      <method id="gtk_clipboard_wait_for_rich_text" bind="false" /> <!--  Returns an array, not practical -->
      <method id="gtk_clipboard_wait_for_targets" bind="false" /> <!-- bound manually below -->
      <extra>
         <spec>
   function Wait_For_Targets
     (Clipboard : not null access Gtk_Clipboard_Record)
     return Gdk.Types.Gdk_Atom_Array;
   --  Returns a list of targets that are present on the clipboard, or an empty
   --  array if there aren't any targets available.
   --  This function waits for the data to be received using the main
   --  loop, so events, timeouts, etc, may be dispatched during the wait.
         </spec>
         <with_body pkg="Gtkada.C" />
         <body>
    package Atom_Arrays is new Gtkada.C.Unbounded_Arrays
     (Gdk.Types.Gdk_Atom, Gdk.Types.Gdk_None,
      Natural, Gdk.Types.Gdk_Atom_Array);

   ----------------------
   -- Wait_For_Targets --
   ----------------------

   function Wait_For_Targets
     (Clipboard : not null access Gtk_Clipboard_Record)
     return Gdk.Types.Gdk_Atom_Array
   is
      use Atom_Arrays;
      function Internal
        (Clipboard : System.Address;
         Targets   : access Unbounded_Array_Access;
         N_Targets : access Gint) return Gboolean;
      pragma Import (C, Internal, "gtk_clipboard_wait_for_targets");

      Output    : aliased Unbounded_Array_Access;
      N_Targets : aliased Gint;
   begin
      if Internal
        (Get_Object (Clipboard),
         Output'Unchecked_Access,
         N_Targets'Unchecked_Access) = 0
      then
         G_Free (Output);
         Output := null;
      end if;

      declare
         Result : constant Gdk_Atom_Array :=
           To_Array (Output, Integer (N_Targets));
      begin
         if Output /= null then
            G_Free (Output);
         end if;

         return Result;
      end;
   end Wait_For_Targets;
         </body>
      </extra>
   </package>

   <!-- #######################################################
        ## Gtk.Viewport
        #######################################################-->

   <package id="GtkViewport">
      <doc group="Scrolling"/>
      <parameter name="self" ada="Viewport"/>
      <method id="gtk_viewport_new">
         <parameter name="hadjustment" default="null"/>
         <parameter name="vadjustment" default="null"/>
      </method>

      <!-- These are now inherited from the Scrollable interface -->
      <method id="gtk_viewport_get_hadjustment" bind="false"/>
      <method id="gtk_viewport_get_vadjustment" bind="false"/>
      <method id="gtk_viewport_set_hadjustment" bind="false"/>
      <method id="gtk_viewport_set_vadjustment" bind="false"/>
   </package>

   <!-- #######################################################
        ## Gtk.Pixmap
        #######################################################-->

   <package id="GtkPixmap">
      <doc group="Obsolescent widgets"/>
      <parameter name="self" ada="Pixmap"/>
      <parameter name="pixmap" ada="Val"/>
      <method id="gtk_pixmap_set_build_insensitive">
         <doc>Whether the pixmap should be grayed out, as is done for insensitive widgets that do not accept user interaction</doc>
      </method>

      <extra>
         <with_spec pkg="Gtk.Widget" />
         <with_spec pkg="Gtk.Window" />
         <with_spec pkg="Gtkada.Types" />
         <with_body pkg="Interfaces.C.Strings" />
         <with_body pkg="Gdk.Color" />
         <spec>
   function Create_Pixmap
     (Filename : String;
      Window   : access Gtk.Window.Gtk_Window_Record'Class) return Gtk_Pixmap;
      --  Create a pixmap given a window and a filename

   function Create_Pixmap
     (Data     : Gtkada.Types.Chars_Ptr_Array;
      Window   : access Gtk.Window.Gtk_Window_Record'Class) return Gtk_Pixmap;
   --  Create a pixmap given a window and a buffer.
            </spec>
            <body>
   Dummy_Pixmap : constant Gtkada.Types.chars_ptr_array :=
     (New_String ("1 1 1 1"),
      New_String ("c None"),
      New_String (" "));
   --  This is a dummy pixmap we use when a pixmap can't be found.

   function Create_Pixmap
     (Filename : String;
      Window   : access Gtk.Window.Gtk_Window_Record'Class) return Gtk_Pixmap
   is
      Gdkpixmap : Gdk.Pixmap.Gdk_Pixmap;
      Mask      : Gdk.Bitmap.Gdk_Bitmap;
      Pixmap    : Gtk_Pixmap;

      use Gtk.Widget;
      use Gtk.Window;

   begin
      if not Realized_Is_Set (Window) then
         Gtk.Window.Realize (Window);
      end if;

      if Filename = "" then
         Gdk.Pixmap.Create_From_Xpm_D
           (Gdkpixmap, Get_Window (Window), Mask,
            Gdk.Color.Null_Color, Dummy_Pixmap);
      else
         Gdk.Pixmap.Create_From_Xpm
           (Gdkpixmap, Get_Window (Window), Mask,
            Gdk.Color.Null_Color, Filename);
      end if;

      Gtk_New (Pixmap, Gdkpixmap, Mask);
      return Pixmap;
   end Create_Pixmap;

   function Create_Pixmap
     (Data   : Gtkada.Types.Chars_Ptr_Array;
      Window : access Gtk.Window.Gtk_Window_Record'Class) return Gtk_Pixmap
   is
      Gdkpixmap : Gdk.Pixmap.Gdk_Pixmap;
      Mask      : Gdk.Bitmap.Gdk_Bitmap;
      Pixmap    : Gtk_Pixmap;

      use Gtk.Widget;
      use Gtk.Window;

   begin
      if not Realized_Is_Set (Window) then
         Gtk.Window.Realize (Window);
      end if;

      Gdk.Pixmap.Create_From_Xpm_D
        (Gdkpixmap, Get_Window (Window), Mask, Gdk.Color.Null_Color, Data);
      Gtk_New (Pixmap, Gdkpixmap, Mask);

      return Pixmap;
   end Create_Pixmap;
         </body>
      </extra>
   </package>

   <package id="GtkMisc">
      <doc group="Abstract base classes"/>
      <parameter name="self" ada="Misc"/>
      <method id="gtk_misc_set_alignment">
         <doc>
Modify the alignment for the widget.
Xalign and Yalign are both values between 0.0 and 1.0 that specify the
alignment: if Xalign is 0.0, the widget will be left aligned; if it is
0.5, the widget will be centered; if it is 1.0 the widget will be
right aligned. Yalign is from top (0.0) to bottom (1.0).
Both Xalign and Yalign will be constrained to the range 0.0 .. 1.0
Note that if the widget fills its allocated area, these two parameters
won't have any effect.
         </doc>
      </method>
   </package>

   <package id="GtkBin">
      <doc group="Abstract base classes"/>
      <parameter name="self" ada="Bin"/>
   </package>

   <!-- #################################################################
        Gtk.Layout
        ################################################################ -->

   <package id="GtkLayout">
      <doc group="Layout containers" testgtk="create_layout.adb"
           screenshot="gtk-layout">
A Gtk_Layout is a widget that can have an almost infinite size, without
occupying a lot of memory. Its children can be located anywhere within
it, but will only appear on the screen if the visible area of the layout
contains them.
Just like a Gtk_Viewport, its visible area is indicated by two
Gtk_Adjustment widgets, and thus a Gtk_Layout can be put as is in a
Gtk_Scrolled_Window.
As for Gtk_Fixed containers, the children can be located anywhere in the
layout (no automatic organization is done). But, as opposed to Gtk_Fixed
widgets, a Gtk_Layout does not try to resize itself to show all its
children.

Starting from GtkAda 2.0, you have to call Set_Size and specify the maximum
size of the layout, otherwise children added with Put outside the size
defined for the layout will never be visible.
One way to do this is to systematically call Set_Size before calling Put,
and make sure you specify a size big enough for the layout.
      </doc>
      <parameter name="self" ada="Layout"/> <!-- for all methods -->
      <method id="gtk_layout_new">
         <parameter name="hadjustment" default="null"/>
         <parameter name="vadjustment" default="null"/>
      </method>
      <method id="gtk_layout_put">
         <doc>The child will be displayed on the screen only if at least part of it intersects the visible area of the layout. The layout does not resize itself to automatically show the widget. You also need to call Set_Size, if the size you initially defined is smaller than (X, Y), or the child will never be visible even if the layout is scrolled.</doc>
      </method>

      <!-- These are now inherited from the Scrollable interface -->
      <method id="gtk_layout_get_hadjustment" bind="false"/>
      <method id="gtk_layout_get_vadjustment" bind="false"/>
      <method id="gtk_layout_set_hadjustment" bind="false"/>
      <method id="gtk_layout_set_vadjustment" bind="false"/>
   </package>

   <package id="GtkRange">
      <doc testgtk="create_range.adb" screenshot="gtk-range"/>
      <parameter name="self" ada="The_Range"/>
   </package>

   <package id="GtkButtonBox">
      <doc testgtk="create_button_box.adb" screenshot="gtk-button_box"
           group="Layout containers">
A Gtk_Button_Box is a special type of Gtk_Box specially tailored to contain
buttons.

This is only a base class for Gtk_Hbutton_Box and Gtk_Vbutton_Box which
provide a way to arrange their children horizontally (resp. vertically).
You can not instantiate a Gtk_Button_Box directly, and have to use one the
above two instead.
      </doc>
      <parameter name="self" ada="Widget"/>
   </package>

   <package id="GtkHButtonBox">
      <doc group="Layout containers">
A Gtk_Hbutton_Box is a specific Gtk_Button_Box that organizes its
children horizontally.
The beginning of the box (when you add children with Gtk.Box.Pack_Start)
is on the left of the box. Its end (for Gtk.Box.Pack_End) is on the right.
      </doc>
      <parameter name="self" ada="Widget"/>
   </package>

   <package id="GtkVButtonBox">
      <doc group="Layout containers">
A Gtk_Vbutton_Box is a specific Gtk_Button_Box that organizes its
children vertically.
The beginning of the box (when you add children with Gtk.Box.Pack_Start)
is on the top of the box. Its end (for Gtk.Box.Pack_End) is on the bottom.
      </doc>
      <parameter name="self" ada="Widget"/>
   </package>

   <package id="GtkVolumeButton">
      <parameter name="self" ada="Widget"/>
   </package>

   <package id="GtkAboutDialog">
      <doc group="Windows" testgtk="create_about.adb"/>
      <parameter name="self" ada="About"/>
      <enum ctype="GtkLicense"/>
  </package>

  <package id="GtkEntry">
     <doc testgtk="create_entry.adb" group="Numeric/Text Data Entry"
          screenshot="gtk-gentry">
A Gtk_Entry is a single line text editing widget.
The text is automatically scrolled if it is longer than can be displayed
on the screen, so that the cursor position is visible at all times.

See Gtk_Text_View for a multiple-line text editing widget.
     </doc>
     <parameter name="self" ada="The_Entry"/>
     <enum ctype="GtkEntryIconPosition" prefix=""/>

     <method id="gtk_entry_set_invisible_char">
        <parameter name="ch" ada="Char"/>
     </method>
     <method id="gtk_entry_set_has_frame">
        <parameter name="setting" default="True"/>
     </method>
     <method id="gtk_entry_set_width_chars">
        <parameter name="n_chars" ada="Width"/>
     </method>

     <extra>
        <spec>subtype Gtk_GEntry is Gtk_Entry;</spec>
        <spec>
   procedure Insert_Text
      (Editable : access Gtk_Entry_Record;
       New_Text : UTF8_String;
       Position : in out Gint);
   --  Convenience subprogram, identical to Insert_Text above without
   --  the requirement to supply the New_Text_Length argument.
        </spec>
        <body>
   procedure Insert_Text
      (Editable : access Gtk_Entry_Record;
       New_Text : UTF8_String;
       Position : in out Gint) is
   begin
      Insert_Text
        (Editable, New_Text &amp; ASCII.NUL, New_Text'Length, Position);
   end Insert_Text;
        </body>
     </extra>
  </package>

  <package id="GtkDialog">
     <doc group="Windows" testgtk="create_dialog.adb"
          screenshot="gtk-dialog">
          See Gtkada.Dialogs for a higher level dialog interface.
     </doc>
     <parameter name="self" ada="Dialog" />
     <parameter name="response_id" type="Gtk_Response_Type"/>
     <method id="gtk_dialog_get_action_area" return="GtkBox*"/>
     <method id="gtk_dialog_get_content_area" return="GtkBox*"/>
     <method id="gtk_dialog_get_response_for_widget" return="GtkResponseType"/>
     <method id="gtk_dialog_run" return="GtkResponseType"/>
     <method id="gtkada_GtkDialog_get_vbox" bind="true" return="GtkBox*"/>
     <method id="gtk_dialog_add_button">
        <parameter name="button_text" ada="text"/>
     </method>

     <!-- Bound manually below -->
     <method id="gtk_dialog_set_alternative_button_order_from_array" bind="False"/>

     <!-- Following methods have varargs -->
     <method id="gtk_dialog_new_with_buttons" bind="False"/>
     <method id="gtk_dialog_add_buttons" bind="False"/>
     <method id="gtk_dialog_set_alternative_button_order" bind="False"/>

     <method id="ada_gtk_dialog_new_with_buttons">
        <parameter name="parent" default="null"/>
     </method>

     <extra>
        <gir:constructor c:identifier="ada_gtk_dialog_new_with_buttons"
             name="new" version="GtkAda 1.0">
             <gir:doc>Create a new dialog with a specific title, and specific attributes. Parent is the transient parent for the dialog (ie the one that is used for reference for the flag Destroy_With_Parent, or to compute the initial position of the dialog).</gir:doc>
           <gir:return-value>
              <gir:type name="GtkDialog" c:type="GtkDialog*"/>
           </gir:return-value>
           <gir:parameters>
              <gir:parameter name="title">
                 <gir:type name="utf8" c:type="gchar*"/>
              </gir:parameter>
              <gir:parameter name="parent">
                 <gir:type name="Window" c:type="GtkWindow*"/>
              </gir:parameter>
              <gir:parameter name="flags">
                 <gir:type name="DialogFlags" c:type="GtkDialogFlags"/>
              </gir:parameter>
           </gir:parameters>
        </gir:constructor>

        <with_spec pkg="Gdk.Screen" />
        <spec>
   procedure Set_Alternative_Button_Order_From_Array
     (Dialog    : access Gtk_Dialog_Record;
      New_Order : Response_Type_Array);
   --  Sets an alternative button order. If the gtk-alternative-button-order
   --  setting is set to %TRUE, the dialog buttons are reordered according to
   --  the order of the response ids passed to this function.
   --
   --  By default, GTK+ dialogs use the button order advocated by the Gnome
   --  Human Interface Guidelines with the affirmative button at the far right,
   --  and the cancel button left of it. But the builtin GTK+ dialogs and
   --  message dialogs' do provide an alternative button order, which is more
   --  suitable on some platforms, e.g. Windows.
   --
   --  Use this function after adding all the buttons to your dialog.

   function Gtk_Alternative_Dialog_Button_Order
     (Screen : Gdk.Screen.Gdk_Screen := null)  return Boolean;
   --  Returns True if dialogs are expected to use an alternative button order
   --  on the given screen (or current screen if null) . See
   --  Set_Alternative_Button_Order_From_Array for more details about
   --  alternative button order.
   --
   --  If you need to use this function, you should probably connect to the
   --  ::notify:gtk-alternative-button-order signal on the Gtk_Settings object
   --  associated to Screen, in order to be notified if the button order
   --  setting changes.
   --
   --  Returns: Whether the alternative button order should be used
        </spec>
        <body>
   procedure Set_Alternative_Button_Order_From_Array
     (Dialog    : access Gtk_Dialog_Record;
      New_Order : Response_Type_Array)
   is
      procedure Internal
        (Dialog    : System.Address;
         N_Params  : Gint;
         New_Order : System.Address);
      pragma Import
        (C, Internal, "gtk_dialog_set_alternative_button_order_from_array");
   begin
      Internal (Get_Object (Dialog), New_Order'Length,
                New_Order (New_Order'First)'Address);
   end Set_Alternative_Button_Order_From_Array;

   function Gtk_Alternative_Dialog_Button_Order
     (Screen : Gdk.Screen.Gdk_Screen := null) return Boolean
   is
      function Internal (Screen : System.Address) return Gboolean;
      pragma Import (C, Internal, "gtk_alternative_dialog_button_order");
   begin
      return Boolean'Val (Internal (Get_Object (Screen)));
   end Gtk_Alternative_Dialog_Button_Order;
        </body>

        <type ctype="GtkDialogFlags" ada="Gtk_Dialog_Flags">
   type Gtk_Dialog_Flags is mod 8;
   for Gtk_Dialog_Flags'Size use Gint'Size;
   pragma Convention (C, Gtk_Dialog_Flags);
   Modal               : constant Gtk_Dialog_Flags := 2 ** 0;
   Destroy_With_Parent : constant Gtk_Dialog_Flags := 2 ** 1;
   No_Separator        : constant Gtk_Dialog_Flags := 2 ** 2;
   --  Various flags that can be set for the dialog, with the following
   --  implications:
   --     - Modal : the dialog is modal, see Gtk.Window.Set_Modal
   --     - Destroy_With_Parent: The dialog is destroyed if its parent is
   --       destroyed. See Gtk.Window.Set_Destroy_With_Parent
   --     - No_Separator: No separator bar above the buttons.
        </type>

        <type ctype="GtkResponseType" ada="Gtk_Response_Type">
   type Gtk_Response_Type is new Gint;
   --  Type used for Response_Id's.
   --  Positive values are totally user-interpreted.
   --  GtkAda will sometimes return Gtk_Response_None if no Response_Id is
   --  available.
   --
   --  Typical usage is:
   --    if Gtk.Dialog.Run (Dialog) = Gtk_Response_Accept then
   --       blah;
   --    end if;

   Gtk_Response_None : constant Gtk_Response_Type := -1;
   --  GtkAda returns this if a response widget has no Response_Id,
   --  or if the dialog gets programmatically hidden or destroyed.

   Gtk_Response_Reject : constant Gtk_Response_Type := -2;
   Gtk_Response_Accept : constant Gtk_Response_Type := -3;
   --  GtkAda won't return these unless you pass them in
   --  as the response for an action widget. They are
   --  for your convenience.

   Gtk_Response_Delete_Event : constant Gtk_Response_Type := -4;
   --  If the dialog is deleted through the button in the titlebar

   Gtk_Response_OK     : constant Gtk_Response_Type := -5;
   Gtk_Response_Cancel : constant Gtk_Response_Type := -6;
   Gtk_Response_Close  : constant Gtk_Response_Type := -7;
   Gtk_Response_Yes    : constant Gtk_Response_Type := -8;
   Gtk_Response_No     : constant Gtk_Response_Type := -9;
   Gtk_Response_Apply  : constant Gtk_Response_Type := -10;
   Gtk_Response_Help   : constant Gtk_Response_Type := -11;
   --  These are returned from dialogs, and you can also use them
   --  yourself if you like.
        </type>

        <type ctype="GtkResponseType*" ada="Response_Type_Array">
   type Response_Type_Array is array (Natural range &lt;&gt;) of Gtk_Response_Type;
        </type>
     </extra>
  </package>

  <package id="GtkExpander">
     <doc group="Layout containers" screenshot="gtk-expanded"/>
     <parameter name="self" ada="Expander"/>
  </package>

  <package id="GtkDrawingArea">
     <doc group="Drawing" testgtk="libart_demo.adb">
See also the Double_Buffer widget provided in the GtkAda examples for an advanced example that demonstrates how to use double buffering, to avoid flickering in your drawings.</doc>
     <parameter name="self" ada="Drawing_Area"/>
  </package>

  <package id="GtkAdjustment">
     <doc group="Scrolling">
The meaning of the most important fields can be explained on the following figure (imagine this is a scrollbar):

[-------|=================|-------------------]

lower    value        value + page_size       upper
     </doc>
     <parameter name="self" ada="Adjustment"/>
     <method id="gtk_adjustment_new">
        <parameter name="page_size" default="0.0"/>
        <doc>Create a new adjustment. Value is the initial value of the adjustment. It must be in the range (Lower .. Upper) and the adjustment's value will never be outside this range. Step_Increment is the value used to make minor adjustments, such as when the user clicks on the arrows of a scrollbar. Page_Increment is used to make major adjustments, such as when the user clicks in the through on a scrollbar. Page_Size is deprecated, use the default value.</doc>
     </method>
     <method id="gtk_adjustment_clamp_page">
        <doc>Update the Adjustment value to ensure that the range between Lower and Upper is in the current page (i.e. between value and value + page_size). If the range is larger than the page size, then only the start of it will be in the current page. A "value_changed" signal will be emitted if the value is changed.</doc>
     </method>
  </package>

  <package id="GtkImage">
     <doc group="Display widgets" screenshot="gtk-image"/>
     <parameter name="self" ada="Image"/>
     <parameter name="image" ada="Val"/>
     <parameter name="size" type="Gtk.Enums.Gtk_Icon_Size"/>
     <method id="gtk_image_new_from_animation" ada="Gtk_New"/>
     <method id="gtk_image_new_from_file"      ada="Gtk_New"/>
     <method id="gtk_image_new_from_image"     ada="Gtk_New"/>
     <method id="gtk_image_new_from_pixbuf"    ada="Gtk_New"/>
     <method id="gtk_image_new_from_icon_set"  ada="Gtk_New"/>
     <method id="gtk_image_new_from_pixmap"    ada="Gtk_New"/>
     <method id="gtk_image_new_from_stock"     ada="Gtk_New"/>
     <method id="gtk_image_get_animation"      ada="Get"/>
     <method id="gtk_image_set_from_animation" ada="Set"/>
     <method id="gtk_image_get_image"          ada="Get"/>
     <method id="gtk_image_get" bind="False"/> <!-- same as get_image -->
     <method id="gtk_image_set_from_image"     ada="Set"/>
     <method id="gtk_image_set" bind="False"/> <!-- same as set_from_image -->
     <method id="gtk_image_get_pixbuf"         ada="Get"/>
     <method id="gtk_image_set_from_pixbuf"    ada="Set"/>
     <method id="gtk_image_get_icon_set"       ada="Get"/>
     <method id="gtk_image_set_from_icon_set"  ada="Set"/>
     <method id="gtk_image_get_pixmap"         ada="Get"/>
     <method id="gtk_image_set_from_pixmap"    ada="Set"/>
     <method id="gtk_image_get_stock"          ada="Get" bind="False"/>
     <method id="gtk_image_set_from_stock"     ada="Set"/>
     <method id="gtk_image_get_gicon"          ada="Get"/>
     <method id="gtk_image_set_from_gicon"     ada="Set"/>
     <method id="gtk_image_set_from_file"      ada="Set"/>
     <method id="gtk_image_get_icon_name"      ada="Get" bind="False"/>
     <enum ctype="GtkImageType"/>
     <extra>
        <with_spec pkg="GNAT.Strings"/>
        <spec>
   function Get
     (Image : access Gtk_Image_Record;
      Size  : access Gtk.Enums.Gtk_Icon_Size) return String;
   --  Get the stock_id for the image displayed

   procedure Get_Icon_Name
     (Image : access Gtk_Image_Record;
      Name  : out GNAT.Strings.String_Access;
      Size  : out Gtk.Enums.Gtk_Icon_Size);
        </spec>
        <body>
   procedure Get_Icon_Name
     (Image : access Gtk_Image_Record;
      Name  : out GNAT.Strings.String_Access;
      Size  : out Gtk_Icon_Size)
   is
      procedure Internal
        (Image : System.Address;
         Name  : out Interfaces.C.Strings.chars_ptr;
         Size  : out Gtk_Icon_Size);
      pragma Import (C, Internal, "gtk_image_get_icon_name");
      Str : chars_ptr;
   begin
      Internal (Get_Object (Image), Str, Size);
      Name := new String'(Value (Str));
   end Get_Icon_Name;

   function Get
     (Image : access Gtk_Image_Record;
      Size  : access Gtk.Enums.Gtk_Icon_Size) return String
   is
      procedure Internal
        (Image    : System.Address;
         Stock_Id : out Interfaces.C.Strings.chars_ptr;
         Size     : out Gint);
      pragma Import (C, Internal, "gtk_image_get_stock");

      Stock : Interfaces.C.Strings.chars_ptr;
      Sze   : Gint;

   begin
      Internal (Get_Object (Image), Stock, Sze);
      Size.all := Gtk.Enums.Gtk_Icon_Size'Val (Sze);
      return Interfaces.C.Strings.Value (Stock);
   end Get;
        </body>
     </extra>
  </package>

  <package id="GtkCalendar">
     <doc group="Selectors" testgtk="create_calendar.adb"
          screenshot="gtk-calendar"/>
     <parameter name="self" ada="Calendar"/>
     <enum ctype="GtkCalendarDisplayOptions" prefix="GTK_CALENDAR_"/>
  </package>

  <package id="GtkSizeGroup">
     <doc testgtk="create_size_groups.adb"/>
     <parameter name="self" ada="Size_Group" />
     <method id="gtk_size_group_new">
        <parameter name="mode" default="Both"/>
     </method>
     <method id="gtk_size_group_get_widgets" return="WidgetSList"/>
     <enum ctype="GtkSizeGroupMode" ada="Size_Group_Mode" prefix="GTK_SIZE_GROUP_"/>
  </package>

  <package id="GtkAlignment">
     <doc testgtk="create_alignment.adb" screenshot="gtk-alignment"/>
     <parameter name="self" ada="Alignment"/>
     <method id="gtkada_GtkAlignment_get_xalign" bind="True"/>
     <method id="gtkada_GtkAlignment_get_xscale" bind="True"/>
     <method id="gtkada_GtkAlignment_get_yalign" bind="True"/>
     <method id="gtkada_GtkAlignment_get_yscale" bind="True"/>
  </package>

  <package id="GtkStatusbar">
     <doc group="Display widgets" testgtk="create_status.adb"
          screenshot="gtk-status_bar"/>
     <parameter name="self" ada="Statusbar"/>
     <parameter name="context" type="Context_Id"/>
     <parameter name="context_id" ada="context" type="Context_Id"/>
     <parameter name="message_id" ada="Message" type="Message_Id"/>
     <method id="gtk_statusbar_get_context_id" return="Context_Id"/>
     <method id="gtkada_GtkStatusbar_get_messages" return="MessagesList"
             bind="True"/>
     <method id="gtk_statusbar_push" return="Message_Id"/>
     <extra>
        <type>
   type Context_Id is new Guint;
   type Message_Id is new Guint;
        </type>
     </extra>
  </package>

  <package id="GtkTable">
     <doc group="Layout containers"/>
     <parameter name="self" ada="Table"/>
     <method id="gtk_table_new">
        <doc>Create a new table. The width allocated to the table is divided into Columns columns, which all have the same width if Homogeneous is True. If Homogeneous is False, the width will be calculated with the children contained in the table. Same behavior for the rows.</doc>
     </method>
     <method id="gtk_table_attach">
        <doc>Insert a new widget in the table. All the attachments are relative to the separations between columns and rows (for instance, to insert a widget spanning the first two columns in the table, you should put Left_Attach=0 and Right_Attach=2). Same behavior for the rows. Xoptions and Yoptions indicate the behavior of the child when the table is resized (whether the child can shrink or expand). See the description in Gtk.Box for more information on the possible values. Xpadding and Ypadding are the amount of space left around the child.</doc>
        <parameter name="xoptions" default="Expand or Fill"/>
        <parameter name="yoptions" default="Expand or Fill"/>
        <parameter name="xpadding" default="0"/>
        <parameter name="ypadding" default="0"/>
     </method>
     <method id="gtk_table_attach_defaults">
        <doc>Insert a new widget in the table, with default values. No padding is put around the child, and the options are set to Expand and Fill. This call is similar to Attach with default values and is only provided for compatibility.</doc>
     </method>
     <method id="gtk_table_set_col_spacing">
        <doc>Set the spacing in pixels between Column and the next one.</doc>
     </method>
     <method id="gtk_table_set_homogeneous">
        <doc>Indicate the homogeneous status of the table. If Homogeneous is True, the rows and columns of the table will all be allocated the same width or height.</doc>
     </method>
  </package>

  <package id="GtkCheckButton">
     <doc screenshot="gtk-check_button" group="Buttons and Toggles"
        testgtk="create_check_buttons.adb"/>
     <parameter name="self" ada="Check_Button"/>
     <method id="gtk_check_button_new" bind="False"/>
     <method id="gtk_check_button_new_with_label" ada="Gtk_New" >
        <parameter name="label" default='""' allow-none="1"/>
        <doc>Create a check button. if Label is null, then no widget is associated with the button, and any widget can be added to the button (with Gtk.Container.Add).</doc>
     </method>
  </package>

  <package id="GtkToggleButton">
     <doc screenshot="gtk-toggle_button" group="Buttons and Toggles"
          testgtk="create_toggle_buttons.adb">
You should consider using a Gtk_Check_Button instead, since it looks nicer and provides more visual clues that the button can be toggled.
     </doc>
     <parameter name="self" ada="Toggle_Button"/>
     <method id="gtk_toggle_button_new" bind="False"/>
     <method id="gtk_toggle_button_new_with_label" ada="Gtk_New" >
        <doc>Initialize a button. If Label is "", then no label is created inside the button and you will have to provide your own child through a call to Gtk.Container.Add. This is the recommended way to put a pixmap inside a toggle button.</doc>
        <parameter name="label" default='""' allow-none="1"/>
     </method>
     <method id="gtk_toggle_button_set_active">
        <doc>Change the state of the button. When Is_Active is True, the button is drawn as a pressed button</doc>
     </method>
     <method id="gtk_toggle_button_set_inconsistent">
        <parameter name="Setting" default="True"/>
     </method>
  </package>

  <package id="GtkAccelGroup">
     <parameter name="self" ada="Accel_Group"/>
     <method id="gtk_accel_group_new">
        <doc>Creates a new Gtk.Accel_Group.Gtk_Accel_Group.
Remember to call Gtk.Window.Add_Accel_Group to active the group.</doc>
     </method>
     <method id="gtk_accel_group_connect">
        <parameter name="closure" type="C_Gtk_Accel_Group_Activate"/>
     </method>
     <method id="gtk_accel_group_disconnect">
        <parameter name="closure" type="C_Gtk_Accel_Group_Activate"/>
     </method>
     <method id="gtk_accel_group_connect_by_path">
        <parameter name="closure" type="C_Gtk_Accel_Group_Activate"/>
     </method>
     <method id="gtk_accel_group_query" bind="False"/>
        <!-- ???Would be nice -->
     <method id="gtk_accel_group_from_accel_closure">
        <parameter name="closure" type="C_Gtk_Accel_Group_Activate"/>
     </method>
     <function id="gtk_accel_groups_activate">
        <parameter name="accel_key" type="Gdk.Types.Gdk_Key_Type"/>
     </function>
     <function id="gtk_accel_groups_from_object" ada="From_Object"
               return="ObjectSList"/>
     <function id="gtk_accelerator_valid">
        <parameter name="keyval" type="Gdk.Types.Gdk_Key_Type"/>
     </function>
     <function id="gtk_accelerator_parse">
        <parameter name="accelerator_key" ctype="GdkKeyType*"/>
     </function>
     <function id="gtk_accelerator_name">
        <parameter name="accelerator_key" type="Gdk.Types.Gdk_Key_Type"/>
     </function>
     <function id="gtk_accelerator_get_label">
        <parameter name="accelerator_key" type="Gdk.Types.Gdk_Key_Type"/>
     </function>
     <function id="gtk_accelerator_set_default_mod_mask"
               ada="Set_Default_Mod_Mask" />
     <function id="gtk_accelerator_get_default_mod_mask"
               return="GdkModifierType" ada="Get_Default_Mod_Mask"/>
     <enum ctype="GtkAccelFlags" prefix="GTK_"/>
     <record ctype="GtkAccelKey">
       <field name="accel_key" ctype="GdkKeyType"/>
       <field name="accel_flags" ctype="GtkAccelFlags"/>
     </record>
     <extra>
        <type ctype="GtkAccelGroupActive" ada="Gtk_Accel_Group_Activate">
   type Gtk_Accel_Group_Activate is access function
     (Accel_Group   : access Gtk_Accel_Group_Record'Class;
      Acceleratable : Glib.Object.GObject;
      Keyval        : Gdk.Types.Gdk_Key_Type;
      Modifier      : Gdk.Types.Gdk_Modifier_Type) return Boolean;

   type C_Gtk_Accel_Group_Activate is access function
     (Accel_Group   : System.Address;
      Acceleratable : System.Address;
      Keyval        : Gdk.Types.Gdk_Key_Type;
      Modifier      : Gdk.Types.Gdk_Modifier_Type) return Boolean;
   pragma Convention (C, C_Gtk_Accel_Group_Activate);
   --  Same as Gtk_Accel_Group_Activate, but passing directly the C values.
   --  You must use Get_User_Data to convert to the Ada types.
        </type>
     </extra>
  </package>

  <package id="GtkRadioButton">
     <doc screenshot="gtk-radio_button" group="Buttons and Toggles"
          testgtk="create_radio_button.adb"/>
     <parameter name="self" ada="Radio_Button"/>
     <parameter name="radio_group_member" ada="Group"/>
     <method id="gtk_radio_button_new" bind="False"/>
     <method id="gtk_radio_button_new_from_widget" bind="False"/>
     <method id="gtk_radio_button_new_with_label" ada="Gtk_New" >
        <doc>Creates or initializes a new radio button, belonging to Group. If Label is left as the empty string, then the button will not have any child and you are free to put any thing you want in it, including a pixmap. To initialize the group (when creating the first button), leave Group to the Null_List. You can later get the new group that is created with a call to the Get_Group subprogram below.</doc>
        <parameter name="group" default="Widget_SList.Null_List" ctype="WidgetSList"/>
        <parameter name="label" default='""' allow-none="1"/>
     </method>
     <method id="gtk_radio_button_new_with_label_from_widget" ada="Gtk_New" >
        <parameter name="radio_group_member" allow-none="1"/>
        <parameter name="label" default='""' allow-none="1"/>
     </method>
     <method id="gtk_radio_button_new_with_mnemonic">
        <parameter name="group" default="Widget_SList.Null_List" ctype="WidgetSList"/>
     </method>
     <method id="gtk_radio_button_new_with_mnemonic_from_widget" ada="Gtk_New_With_Mnemonic">
        <doc extend="true">To initialize a new group (when creating the first button), you should pass it null or a button that has not been created with Gtk_New, as in the example below.</doc>
        <parameter name="radio_group_member" allow-none="1"/>
     </method>
     <method id="gtk_radio_button_get_group" return="WidgetSList"/>
     <method id="gtk_radio_button_set_group">
        <parameter name="group" ctype="WidgetSList"/>
     </method>
  </package>

  <package id="GtkRadioAction">
     <doc group="Action-based menus" see="Gtk_Action"/>
     <parameter name="self" ada="Action"/>
     <method id="gtk_radio_action_new">
        <parameter name="label" default='""'/>
        <parameter name="tooltip" default='""'/>
        <parameter name="stock_id" default='""'/>
     </method>
     <method id="gtk_radio_action_set_group">
        <parameter name="group" ctype="WidgetSList"/>
        <doc extend="true">A common way to set up a group of radio group is the following:

__PRE__      Group  : GSlist := null;
      Action : Gtk_Radio_Action;
      while ... loop
         Gtk_New (Action, ...);
         Set_Group (Action, Group);
         Group := Get_Group (Action);
      end loop;</doc>
     </method>
     <method id="gtk_radio_action_get_group" return="WidgetSList"/>
  </package>

  <package id="GtkSeparator">
      <doc group="Ornaments" screenshot="gtk-separator"/>
      <parameter name="self" ada="Separator"/>
  </package>
  <package id="GtkVSeparator" into="GtkSeparator">
      <type name="Gtk_Vseparator" subtype="true"/>
      <method id="gtk_vseparator_new" ada="Gtk_New_Vseparator"/>
      <parameter name="self" ada="Separator"/>
      <method id="gtk_vseparator_get_type" ada="Vseparator_Get_Type" />
  </package>
  <package id="GtkHSeparator" into="GtkSeparator">
      <type name="Gtk_Hseparator" subtype="true"/>
      <method id="gtk_hseparator_new" ada="Gtk_New_Hseparator"/>
      <parameter name="self" ada="Separator"/>
      <method id="gtk_hseparator_get_type" ada="Hseparator_Get_Type" />
  </package>

  <package id="GtkSeparatorMenuItem">
     <doc group="Menus and Toolbars"/>
     <parameter name="self" ada="Widget" />
  </package>

  <package id="GtkSeparatorToolItem">
     <doc group="Menus and Toolbars"/>
     <parameter name="self" ada="Item" />
  </package>

  <package id="GtkRuler">
     <doc group="Drawing" testgtk="create_rulers.adb"
          screenshot="gtk-rulers">
 This widget is generally put on the sides of a drawing area to help the user measure distances. It indicates the current position of the mouse cursor within the drawing area, and can be graduated in multiple units.</doc>
     <parameter name="self" ada="Ruler" />
     <method id="gtk_ruler_set_metric">
        <doc>Set or get the units used for a Gtk_Ruler. See Set_Metric</doc>
     </method>
  </package>
  <package id="GtkVRuler" into="GtkRuler">
      <type name="Gtk_Vruler" subtype="true"/>
      <method id="gtk_vruler_new" ada="Gtk_New_Vruler"/>
      <parameter name="self" ada="Ruler"/>
      <method id="gtk_vruler_get_type" ada="Vruler_Get_Type" />
  </package>
  <package id="GtkHRuler" into="GtkRuler">
      <type name="Gtk_Hruler" subtype="true"/>
      <method id="gtk_hruler_new" ada="Gtk_New_Hruler"/>
      <parameter name="self" ada="Ruler"/>
      <method id="gtk_hruler_get_type" ada="Hruler_Get_Type" />
  </package>

  <package id="GtkFixed">
      <doc group="Layout containers" testgtk="create_fixed.adb"
           screenshot="gtk-fixed"/>
      <parameter name="self" ada="Fixed" />
      <method id="gtk_fixed_put">
         <doc>Add Widget to a Fixed container at the given position. X indicates the horizontal position to place the widget at. Y is the vertical position to place the widget at.</doc>
      </method>
      <method id="gtk_fixed_move">
         <doc>Move a child of a GtkFixed container to the given position. X indicates the horizontal position to place the widget at. Y is the vertical position to place the widget at.</doc>
      </method>
      <method id="gtk_fixed_set_has_window">
         <parameter name="has_window" default="False"/>
      </method>
  </package>

  <package id="GtkCellEditable">
     <doc group="Trees and Lists"/>
     <parameter name="self" ada="Cell_Editable"/>
  </package>

  <package id="GtkBuildable">
     <virtual-method id='*' bind='False'/>
     <method id="gtk_buildable_custom_tag_start" bind="False"/>
  </package>

  <package id="GtkFileChooser">
     <doc group="Selectors">
This package provides an interface implemented by Gtk.File_Chooser_Widget and Gtk.File_Chooser_Button, and by your own file selection widgets if you wish to expose a standard interface.

Gtk_File_Chooser allows for shortcuts to various places in the filesystem.  In the default implementation these are displayed in the left pane. It may be a bit confusing at first that these shortcuts come from various sources and in various flavours, so lets explain the terminology here:

__PRE__  - Bookmarks
    are created by the user, by dragging folders from the right pane to the
    left pane, or by using the "Add". Bookmarks can be renamed and deleted
    by the user.
  - Shortcuts
    can be provided by the application or by the underlying filesystem
    abstraction (e.g. both the gnome-vfs and the Windows filesystems
    provide "Desktop" shortcuts). Shortcuts cannot be modified by the user.
  - Volumes
    are provided by the underlying filesystem abstraction. They are the
    "roots" of the filesystem.

File Names and Encodings

When the user is finished selecting files in a Gtk_File_Chooser, your program can get the selected names either as filenames or as URIs. For URIs, the normal escaping rules are applied if the URI contains non-ASCII characters. However, filenames are always returned in the character set specified by the G_FILENAME_ENCODING environment variable. Please see the Glib documentation for more details about this variable.

Important: This means that while you can pass the result of Get_Filename to low-level file system primitives , you will need to convert it to UTF-8 before using it in a Gtk_Label for instance. Conversion is done through Glib.Convert.Filename_To_UTF8.

You can add a custom preview widget to a file chooser and then get notification about when the preview needs to be updated. To install a preview widget, use gtk_file_chooser_set_preview_widget(). Then, connect to the GtkFileChooser::update-preview signal to get notified when you need to update the contents of the preview.

Preview widgets

You can add a custom preview widget to a file chooser and then get notification about when the preview needs to be updated. To install a preview widget, use Set_Preview_Widget. Then, connect to the GtkFileChooser::update-preview signal to get notified when you need to
update the contents of the preview.

Your callback should use Get_Preview_Filename to see what needs previewing.  Once you have generated the preview for the corresponding file, you must call Set_Preview_Widget_Active with a boolean flag that indicates whether your callback could successfully generate a preview.

Adding Extra Widgets

You can add extra widgets to a file chooser to provide options that are not present in the default design. For example, you can add a toggle button to give the user the option to open a file in read-only mode. You can use Set_Extra_Widget to insert additional widgets in a file chooser.

If you want to set more than one extra widget in the file chooser, you can a container such as a GtkVBox or a GtkTable and include your widgets in it.  Then, set the container as the whole extra widget.

Key bindings

The following default key bindings are provided, but you can use a gtkrc file to override them if you need (see gtk-rc.ads).

__PRE__
   Signal name    | Key binding
   location-popup | Control-L  (empty path)
                  | /          (path of "/")
                  | ~          (home directory)
   up-folder      | Alt-Up  or backspace
   down-folder    | Alt-Down
   home-folder    | Alt-Home
   desktop-folder | Alt-D
   quick-bookmark | Alt-1 through Alt-0
     </doc>
  </package>

  <package id="GtkCellLayout">
     <virtual-method id='*' bind='False'/>  <!--  circular dep with Gtk.Cell_Area -->
     <doc group="Trees and Lists" testgtk="create_cell_view.adb"/>
     <parameter name="self" ada="Cell_Layout"/>
     <method id="gtk_cell_layout_get_area" bind="False"/>
     <!-- in Gtk.Cell_Area -->

     <method id="gtk_cell_layout_set_attributes" bind="False"/>
     <method id="gtk_cell_layout_get_cells" return="ObjectList"/>
  </package>

  <package id="GtkAssistant">
     <doc group="Windows" testgtk="create_assistant.adb"/>
     <parameter name="self" ada="Assistant"/>
     <enum ctype="GtkAssistantPageType" prefix=""/>
  </package>

  <package id="GtkSpinner">
     <doc group="Ornaments"/>
     <parameter name="self" ada="Spinner"/>
  </package>

  <package id="GtkEntryCompletion">
     <doc group="Numeric/Text Data Entry"/>
     <parameter name="self" ada="Completion"/>
  </package>

  <package id="GtkScrollable">
     <doc group="Interfaces"/>
  </package>

  <package id="GtkProgressBar">
     <doc testgtk="create_progress.adb"
          screenshot="gtk-progress_bar"
          group="Display widgets"/>
     <parameter name="self" ada="Progress_Bar"/>
  </package>

  <package id="GtkColorButton">
     <doc group="Buttons and Toggles"/>
     <parameter name="self" ada="Button"/>

     <method id="gtk_color_button_get_rgba" bind="False"/><!--from interface now-->
     <method id="gtk_color_button_set_rgba" bind="False"/><!--from interface now-->
     <method id="gtk_color_button_get_use_alpha" bind="False"/><!--from interface now-->
     <method id="gtk_color_button_set_use_alpha" bind="False"/><!--from interface now-->
  </package>

  <package id="GtkLinkButton">
     <doc group="Buttons and Toggles"/>
     <parameter name="self" ada="Widget" />
  </package>

  <package id="GtkFileFilter">
     <enum ctype="GtkFileFilterFlags"/>
     <record ctype="GtkFileFilterInfo"/>
  </package>

  <package id="GtkFileChooser">
     <doc group=""/>
     <parameter name="self" ada="Chooser"/>
     <enum ctype="GtkFileChooserAction" prefix="GTK_FILE_CHOOSER_"/>
     <enum ctype="GtkFileChooserConfirmation" prefix="GTK_FILE_CHOOSER_"/>
     <enum ctype="GtkFileChooserError" prefix="GTK_FILE_CHOOSER_"/>

     <!-- we won't bind any of these internal functions which pass GFile
          types -->
     <method id="gtk_file_chooser_get_file" bind="False"/>
     <method id="gtk_file_chooser_get_files" bind="False"/>
     <method id="gtk_file_chooser_get_current_folder_file" bind="False"/>
     <method id="gtk_file_chooser_get_preview_file" bind="False"/>
     <method id="gtk_file_chooser_select_file" bind="False"/>
     <method id="gtk_file_chooser_set_current_folder_file" bind="False"/>
     <method id="gtk_file_chooser_set_file" bind="False"/>
     <method id="gtk_file_chooser_unselect_file" bind="False"/>

     <method id="gtk_file_chooser_get_filenames" return="StringSList"/>
     <method id="gtk_file_chooser_get_uris" return="StringSList"/>
     <method id="gtk_file_chooser_list_shortcut_folder_uris"
             return="StringSList"/>
     <method id="gtk_file_chooser_list_shortcut_folders"
             return="StringSList"/>
     <method id="gtk_file_chooser_list_filters" return="ObjectSList"/>
  </package>

  <package id="GtkFileChooserButton">
     <doc group="Buttons and Toggles"/>
     <parameter name="self" ada="Button"/>
  </package>

  <package id="GtkToolbar">
     <parameter name="self" ada="Toolbar"/>
     <method id="gtk_toolbar_set_show_arrow">
        <parameter name="show_arrow" default="True"/>
     </method>
     <method id="gtk_toolbar_insert">
        <parameter name="pos" default="-1"/>
     </method>
     <method id="gtk_tool_shell_get_orientation" bind="False"/>
     <method id="gtk_tool_shell_get_icon_size" bind="False"/>
     <method id="gtk_tool_shell_get_relief_style" bind="False"/>
     <method id="gtk_tool_shell_get_style" bind="False"/>
  </package>

  <package id="GtkEditable">
     <parameter name="self" ada="Editable"/>
     <method id="::insert-text">
        <parameter name="position" direction="access"/>
     </method>
     <method id="gtk_editable_select_region">
        <parameter name="end_pos" default="-1"/>
     </method>
     <method id="gtk_editable_delete_text">
        <parameter name="end_pos" default="-1"/>
     </method>
     <method id="gtk_editable_get_chars">
        <parameter name="end_pos" default="-1"/>
     </method>
     <extra>
        <spec>
   procedure Insert_Text
     (Editable : Gtk_Editable;
      New_Text : UTF8_String;
      Position : in out Gint);
   --  Convenience subprogram, identical to Insert_Text above without
   --  the requirement to supply the New_Text_Length argument.
        </spec>
        <body>
   procedure Insert_Text
     (Editable : Gtk_Editable;
      New_Text : UTF8_String;
      Position : in out Gint) is
   begin
      Insert_Text
        (Editable, New_Text &amp; ASCII.NUL, New_Text'Length, Position);
   end Insert_Text;
        </body>
     </extra>
     <method id="gtk_editable_get_selection_bounds"
             return_as_param="Has_Selection"/>
  </package>

  <package id="GtkToolItem">
     <parameter name="self" ada="Tool_Item"/>
     <method id="gtk_tool_item_retrieve_proxy_menu_item" return="GtkMenuItem"/>
     <method id="gtk_tool_item_get_proxy_menu_item" return="GtkMenuItem"/>
     <method id="gtk_tool_item_set_proxy_menu_item">
        <parameter name="menu_item" ctype="GtkMenuItem"/>
     </method>
  </package>

   <package id="GtkScrollbar">
      <parameter name="self" ada="Scrollbar"/>
   </package>

   <package id="GtkHScrollbar" into="GtkScrollbar">
      <parameter name="self" ada="Scrollbar"/>
      <type name="Gtk_Hscrollbar" subtype="true"/>
      <method id="gtk_hscrollbar_new" ada="Gtk_New_Hscrollbar"/>
      <method id="gtk_hscrollbar_get_type" ada="Hscrollbar_Get_Type"/>
   </package>

   <package id="GtkVScrollbar" into="GtkScrollbar">
      <parameter name="self" ada="Scrollbar"/>
      <type name="Gtk_Vscrollbar" subtype="true"/>
      <method id="gtk_vscrollbar_new" ada="Gtk_New_Vscrollbar"/>
      <method id="gtk_vscrollbar_get_type" ada="Vscrollbar_Get_Type"/>
   </package>

   <package id="GtkCellRenderer">
      <parameter name="self" ada="Cell"/>
      <enum ctype="GtkCellRendererState"/>
      <enum ctype="GtkCellRendererMode"/>
      <method id="gtk_cell_renderer_get_size">
         <!-- hack to make cell_area an in-out parameter -->
         <parameter name="cell_area" ctype="GdkRectangle**"/>
      </method>
      <list ada="Cell_Renderer_List" ctype="GtkCellRenderer"/>
   </package>

   <package id="GtkStatusIcon">
      <parameter name="self" ada="Status_Icon"/>
      <!-- ??? inclusion of below method is pending on L117-038 -->
      <method id="gtk_status_icon_get_geometry" bind="False"/>

      <method id="gtk_status_icon_position_menu">
        <parameter name="user_data" ada="Icon" type="Glib.Object.GObject"/>
        <parameter name="x" direction="inout" />
        <parameter name="y" direction="inout" />
        <body>
      procedure Internal
         (Menu    : System.Address;
          X       : in out Gint;
          Y       : in out Gint;
          Push_In : out Integer;
          Icon    : System.Address);
      pragma Import (C, Internal, "gtk_status_icon_position_menu");
      --  Custom body because we need to initialize to 0 here (on OSX).
      Tmp_Push_In : aliased Integer := 0;
   begin
      Internal (Get_Object (Menu), X, Y, Tmp_Push_In, Get_Object (Icon));
      Push_In := Tmp_Push_In /= 0;
        </body>
      </method>
   </package>

   <package id="GtkMenuItem">
      <parameter name="self" ada="Menu_Item"/>
      <method id="gtk_menu_item_select" ada="Gtk_Select"/>
      <method id="gtk_menu_item_set_right_justified">
         <parameter name="right_justified" default="True"/>
      </method>
      <extra>
         <spec>
   procedure Gtk_New
      (Menu_Item : out Gtk_Menu_Item;
       Label     : UTF8_String) renames Gtk_New_With_Label;
   procedure Initialize
      (Menu_Item : access Gtk_Menu_Item_Record'Class;
       Label     : UTF8_String) renames Initialize_With_Label;
   --  For backwards compatibility.
         </spec>
      </extra>
   </package>

   <package id="GtkRecentFilter">
     <parameter name="self" ada="Filter"/>
     <enum ctype="GtkRecentFilterFlags" />
     <record ctype="GtkRecentFilterInfo" />
     <slist ada="Gtk_Recent_Filter_List" ctype="GtkRecentFilter"/>
   </package>

   <package id="GtkFileChooserDialog">
      <parameter name="self" ada="Dialog"/>
      <method id="gtk_file_chooser_dialog_new" ada="Gtk_New" bind="False"/> <!-- varargs -->

      <extra>
         <gir:constructor name="new"
                          c:identifier="ada_gtk_file_chooser_dialog_new"
                          version="2.4"
                          introspectable="0">
            <gir:doc xml:whitespace="preserve">Creates a new #GtkFileChooserDialog.  This function is analogous to gtk_dialog_new_with_buttons().</gir:doc>
            <gir:return-value transfer-ownership="none">
               <gir:doc xml:whitespace="preserve">a new #GtkFileChooserDialog</gir:doc>
               <gir:type name="Widget" c:type="GtkWidget*"/>
            </gir:return-value>
            <gir:parameters>
               <gir:parameter name="title" transfer-ownership="none" allow-none="1">
                  <gir:doc xml:whitespace="preserve">Title of the dialog, or %NULL</gir:doc>
                  <gir:type name="utf8" c:type="gchar*"/>
               </gir:parameter>
               <gir:parameter name="parent" transfer-ownership="none" allow-none="1">
                  <gir:doc xml:whitespace="preserve">Transient parent of the dialog, or %NULL</gir:doc>
                  <gir:type name="Window" c:type="GtkWindow*"/>
               </gir:parameter>
               <gir:parameter name="action" transfer-ownership="none">
                  <gir:doc xml:whitespace="preserve">Open or save mode for the dialog</gir:doc>
                  <gir:type name="FileChooserAction" c:type="GtkFileChooserAction"/>
               </gir:parameter>
            </gir:parameters>
         </gir:constructor>
      </extra>
   </package>

   <package id="GtkHandleBox" obsolescent="True">
     <parameter name="self" ada="Handle_Box"/>
   </package>

   <package id="GtkScaleButton">
      <parameter name="self" ada="Button"/>
  </package>

   <package id="GtkRecentManager">
     <doc>
In case the default screen is being used, adding a new recently used file is as
simple as:

__PRE__
     declare
        Manager : constant Gtk_Recent_Manager := Get_Default;
     begin
        Add_Item (Manager, File_URI);
     end;

While looking up a recently used file is as simple as using:

__PRE__
     declare
        Manager : constant Gtk_Recent_Manager := Get_Default;
        Info    : Gtk_Recent_Info;
        Error   : Glib.Error.GError;
     begin
        Lookup_Item (Info, Manager, File_URI, Error);
        if Error /= null then
           --  Use the info object
           Unref (Info);
        else
           Put_Line
             ("Could not find the file: " &amp; Glib.Error.Get_Message (Error));
           Glib.Error.Error_Free (Error);
        end if;
     end;
     </doc>
     <param name="self" ada="Manager" />
     <record ctype="GtkRecentData" />
     <method id="gtk_recent_manager_get_items" return="GtkRecentInfoList"/>
     <list ada="Gtk_Recent_Info_List" ctype="GtkRecentInfo"/>

     <!-- Bound below -->
     <method id="gtk_recent_manager_add_full" bind="False" />

     <extra>
       <with_spec pkg="GNAT.Strings" />
       <with_body pkg="Gtkada.Bindings" />
       <spec>
   function Add_Full
     (Manager      : access Gtk_Recent_Manager_Record;
      Uri          : UTF8_String;
      Display_Name : UTF8_String := "";
      Description  : UTF8_String := "";
      Mime_Type    : UTF8_String;
      App_Name     : UTF8_String;
      App_Exec     : UTF8_String;
      Groups       : GNAT.Strings.String_List;
      Is_Private   : Boolean)
      return Boolean;
   --  Manager      : the Gtk_Recent_Manager on which to operate
   --  Uri          : pointer to resource
   --  Display_Name : a UTF-8 encoded string, containing the name of the
   --                 recently used resource to be displayed, or "".
   --  Description  : a UTF-8 encoded string, containing a short description
   --                 of the resource, or "".
   --  Mime_Type    : the MIME type of the resource.
   --  App_Name     : the name of the application that is registering this
   --                 recently used resource.
   --  App_Exec     : command line used to launch this resource; may contain
   --                 the "%f" and "%u" escape characters which will be
   --                 expanded to the resource file path and URI, respectively,
   --                 when the command line is retrieved.
   --  Groups       : a vector of strings containing groups names.
   --  Is_Private   : whether this resource should be displayed only by the
   --                 applications that have registered it or not.
   --
   --  Adds a new resource, pointed by Uri, into the recently used
   --  resources list, using the metadata specified.
   --
   --  The passed URI will be used to identify this resource inside the
   --  list.
   --
   --  In order to register the new recently used resource, metadata about
   --  the resource must be passed as well as the URI.  This metadata must
   --  contain the MIME type of the resource pointed by the URI; the name of
   --  the application that is registering the item, and a command line to be
   --  used when launching the item.
   --
   --  Optionally, it is possible to specify a UTF-8 string to be used when
   --  viewing the item instead of the last component of the URI; a short
   --  description of the item; whether the item should be considered private -
   --  that is, should be displayed only by the applications that have
   --  registered it.
   --
   --  Returns True if the new item was successfully added to the recently
   --  used resources list, False otherwise.
       </spec>
       <body>
   function Add_Full
     (Manager      : access Gtk_Recent_Manager_Record;
      Uri          : UTF8_String;
      Display_Name : UTF8_String := "";
      Description  : UTF8_String := "";
      Mime_Type    : UTF8_String;
      App_Name     : UTF8_String;
      App_Exec     : UTF8_String;
      Groups       : GNAT.Strings.String_List;
      Is_Private   : Boolean)
      return Boolean
   is
      function Internal
        (Manager     : System.Address;
         Uri         : String;
         Recent_Data : System.Address)
         return Gboolean;
      pragma Import (C, Internal, "gtk_recent_manager_add_full");

      type Gtk_Recent_Data_Record is record
         display_name : chars_ptr;
         description  : chars_ptr;
         mime_type    : chars_ptr;
         app_name     : chars_ptr;
         app_exec     : chars_ptr;
         groups       : System.Address;
         is_private   : Gboolean;
      end record;
      pragma Convention (C, Gtk_Recent_Data_Record);
      --  Internal record that matches struct _GtkRecentData in
      --  gtkrecentmanager.h

      C_Groups : aliased chars_ptr_array := From_String_List (Groups);
      --  Temporary variable to aid translation

      GRD : aliased Gtk_Recent_Data_Record;
      --  Data to feed in to gtk_recent_manager_add_full()

      Result : Gboolean;
   begin
      --  Set up.
      GRD.display_name := String_Or_Null (Display_Name);
      GRD.description  := String_Or_Null (Description);
      GRD.mime_type    := New_String (Mime_Type);
      GRD.app_name     := New_String (App_Name);
      GRD.app_exec     := New_String (App_Exec);
      GRD.is_private   := Boolean'Pos (Is_Private);

      if C_Groups'Length > 0 then
         GRD.groups := C_Groups (C_Groups'First)'Address;
      else
         GRD.groups := System.Null_Address;
      end if;
      --  Invoke function.
      Result := Internal (Get_Object (Manager), Uri &amp; ASCII.NUL, GRD'Address);

      --  Clean up, making sure to avoid double-deallocations where such
      --  may be possible.
      if GRD.display_name /= Null_Ptr then
         Free (GRD.display_name);
      end if;
      if GRD.description /= Null_Ptr then
         Free (GRD.description);
      end if;
      Free (GRD.mime_type);
      Free (GRD.app_name);
      Free (GRD.app_exec);
      for I in C_Groups'Range loop
         if C_Groups (I) /= Null_Ptr then
            Free (C_Groups (I));
         end if;
      end loop;

      --  Return result.
      return Boolean'Val (Result);
   end Add_Full;
       </body>
     </extra>
   </package>

   <package id="GtkRecentInfo">  <!-- into="GtkRecentManager">-->
     <method id="gtk_recent_info_ref" return="void" />

     <!-- ??? Disabled for now, we are creating an unconstrained local var -->
     <method id="gtk_recent_info_get_application_info" return="void" bind="False"/>

     <!-- These functions return the length separately, not needed in Ada-->
     <method id="gtk_recent_info_get_applications" bind="False" />
     <method id="gtk_recent_info_get_groups" bind="False" />

     <extra>
       <type>
   subtype time_t is Long_Integer;
   --  Type to interface with C's time_t type.  To convert this to/from
   --  an Ada type, look at Ada.Calendar.Conversion_Operations and be
   --  sure to pay special attention to the ranges each type is capable
   --  of representing.
       </type>
     </extra>
   </package>

   <package id="GtkRecentChooser">
     <virtual-method id='*' bind='False'/>
     <parameter name="self" ada="Chooser" />
     <method id="gtk_recent_chooser_get_items" return="RecentInfoList"/>
     <enum ctype="GtkRecentSortType" />

     <!-- These functions return the length separately, not needed in Ada-->
     <method id="gtk_recent_chooser_get_uris" bind="False" />

     <method id="gtk_recent_chooser_list_filters" return="RecentFilterSList"/>
   </package>

   <package id="GtkWidgetClass" into="GtkWidget" bindtype="false">
     <method id="gtk_widget_class_find_style_property"/>
     <method id="gtk_widget_class_install_style_property" >
       <parameter name="pspec" ctype="GParamSpec"/>
     </method>
     <method id="gtk_widget_class_set_accessible_role" bind="False" /> <!--  needs atk -->
     <method id="gtk_widget_class_set_accessible_type" bind="False" /> <!--  needs atk -->

     <method id="gtk_widget_class_install_style_property_parser" bind="False" />
     <method id="gtk_widget_class_list_style_properties" bind="False" />
   </package>

   <package id="GtkWidget" needs_merge="false">
     <parameter name="self" ada="Widget" />
     <enum ctype="GtkAlign"/>
     <enum ctype="GtkWidgetHelpType" />
     <record ctype="GtkRequisition"/>
     <record ctype="GtkWidgetPath"/>
     <list ada="Widget_List" ctype="Widget"/>
     <slist ada="Widget_SList" ctype="Widget"/>

     <method id="::query-tooltip">
        <parameter name="tooltip" ctype="GObject*"/>
     </method>

     <method id="gtk_widget_new" bind="False" /> <!-- varargs -->
     <method id="gtk_widget_style_get" bind="False" /> <!-- varargs -->
     <method id="gtk_widget_style_get_valist" bind="False"/><!-- varargs -->
     <method id="gtk_widget_list_accel_closures" bind="False"/><!-- We do not expose Closures-->
     <method id="gtk_widget_get_style_context" bind="False"/><!-- in Gtk.Style_Context-->
     <method id="gtk_widget_get_accessible" bind="False"/> <!-- Requires ATK -->
     <method id="gtk_widget_get_clipboard" bind="False"/><!-- in Gtk.Clipboard -->
     <method id="gtk_widget_get_settings" bind="False"/><!-- in Gtk.Settings -->
     <method id="gtk_widget_modify_style" bind="False"/><!-- in Gtk.RC -->
     <method id="gtk_widget_get_modifier_style" bind="False"/><!-- in Gtk.RC -->
     <method id="gtk_widget_class_path" bind="False"/><!-- deprecated -->
     <method id="gtk_widget_path" bind="False"/><!-- deprecated -->
     <method id="gtk_drag_source_set_icon_gicon" bind="False"/><!-- does not exist in quartz backend-->
     <method id="gtk_drag_source_get_target_list" bind="False"/><!-- in Gtk.Dnd -->
     <method id="gtk_drag_source_set_target_list" bind="False"/><!-- in Gtk.Dnd-->
     <method id="gtk_drag_begin" bind="False"/><!-- in Gtk.Dnd -->
     <method id="gtk_drag_dest_find_target" bind="False"/><!-- in Gtk.Dnd-->
     <method id="gtk_drag_dest_get_target_list" bind="False"/><!-- in Gtk.Dnd-->
     <method id="gtk_drag_dest_set_target_list" bind="False"/><!-- in Gtk.Dnd-->
     <method id="gtk_drag_dest_set" bind="False"/><!-- in Gtk.Dnd -->
     <method id="gtk_drag_source_set" bind="False"/><!-- in Gtk.Dnd -->
     <method id="gtk_widget_modify_base" obsolescent="True"/>
     <method id="gtk_widget_modify_fg" obsolescent="True"/>
     <method id="gtk_widget_modify_bg" obsolescent="True"/>
     <method id="gtk_widget_modify_text" obsolescent="True"/>
     <method id="gtk_widget_modify_font" obsolescent="True"/>
     <method id="gtk_widget_insert_action_group" bind="False"/> <!--  needs GAction -->
     <method id="gtk_widget_set_sensitive">
       <parameter name="Sensitive" default="True"/>
     </method>
     <method id="gtk_widget_size_allocate">
        <parameter name="allocation" ctype="GtkAllocation" />
     </method>
     <method id="gtk_widget_set_size_request">
       <parameter name="Width" default="-1" />
       <parameter name="Height" default="-1" />
     </method>
     <method id="gtk_widget_add_accelerator">
       <parameter name="Accel_Key" ctype="GdkKeyType" />
     </method>
     <method id="gtk_widget_remove_accelerator">
       <parameter name="Accel_Key" ctype="GdkKeyType" />
     </method>
     <method id="gtk_widget_add_events">
       <parameter name="Events" ctype="GdkEventMask"/>
     </method>
     <method id="gtk_widget_set_events">
       <parameter name="Events" ctype="GdkEventMask"/>
     </method>
     <method id="gtk_widget_get_events" return="GdkEventMask"/>
     <method id="gtk_widget_get_tooltip_window" return="GtkWidget*" />
     <method id="gtk_widget_set_tooltip_window">
       <parameter name="Custom_Window" ctype="GtkWidget*"/>
     </method>
     <method id="gtk_widget_list_mnemonic_labels" return="WidgetList" />
     <method id="gtk_widget_render_icon">
       <parameter name="Detail" default='""'/>
     </method>
     <method id="gtk_widget_create_pango_layout">
       <parameter name="Text" allow-none="1"/>
     </method>
     <method id="gtk_widget_intersect">
       <parameter name="Intersection" direction="access"/>
     </method>
     <method id="gtk_widget_translate_coordinates" return_as_param="Result"/>
     <method id="gtk_widget_destroy">
       <body>
      procedure Internal (Widget : System.Address);
      pragma Import (C, Internal, "gtk_widget_destroy");

      procedure Unref_Internal (Widget : System.Address);
      pragma Import (C, Unref_Internal, "g_object_unref");
      --  External binding: g_object_unref

      Ptr : constant System.Address := Get_Object (Widget);

      use type System.Address;
   begin
      --  Keep a reference on the object, so that the Ada structure is
      --  never automatically deleted when the C object is.
      --  We can't reset the content of Widget to System.Null_Address before
      --  calling the C function, because we want the user's destroy
      --  callbacks to be called with the appropriate object.
      Ref (Widget);
      Internal (Ptr);

      --  We then can make sure that the object won't be referenced any
      --  more, (The Ada structure won't be free before the ref count goes
      --  down to 0, and we don't want the user to use a deleted object...).
      Set_Object (Widget, System.Null_Address);

      --  Free the reference we had. In most cases, this results in the
      --  object being freed. We can't use directly Unref, since the Ptr
      --  field for Object is Null_Address.
      Unref_Internal (Ptr);
       </body>
     </method>

     <function id="gtk_cairo_transform_to_window" ada="Transform_To_Window" />
     <function id="gtk_cairo_should_draw_window" ada="Should_Draw_Window" />
     <extra>
       <with_spec pkg="Gdk.Rectangle"/>
       <type>
   subtype Gtk_Allocation is Gdk.Rectangle.Gdk_Rectangle;
       </type>
       <spec>
   ------------------------------------
   -- Override default size handling --
   ------------------------------------

   type Gtk_Requisition_Access is access all Gtk_Requisition;
   type Gtk_Allocation_Access is access all Gtk_Allocation;
   pragma Convention (C, Gtk_Requisition_Access);
   pragma Convention (C, Gtk_Allocation_Access);

   function Get_Requisition
     (Value : Glib.Values.GValue) return Gtk_Requisition_Access;
   function Get_Allocation
     (Value : Glib.Values.GValue) return Gtk_Allocation_Access;
   --  Convert values received as callback parameters

   type Size_Allocate_Handler is access procedure
     (Widget : System.Address; Allocation : Gtk_Allocation);
   pragma Convention (C, Size_Allocate_Handler);
   --  Widget is the gtk+ C widget, that needs to be converted to Ada through
   --  a call to:
   --    declare
   --       Stub : Gtk_Widget_Record; --  or the exact type you expect
   --    begin
   --       My_Widget := Gtk_Widget (Glib.Object.Get_User_Data (Widget, Stub);
   --    end;

   procedure Set_Default_Size_Allocate_Handler
     (Klass   : Glib.Object.GObject_Class;
      Handler : Size_Allocate_Handler);
   pragma Import (C, Set_Default_Size_Allocate_Handler,
                  "ada_WIDGET_CLASS_override_size_allocate");
   --  Override the default size_allocate handler for this class. This handler
   --  is automatically called in several cases (when a widget is dynamically
   --  resized for instance), not through a signal. Thus, if you need to
   --  override the default behavior provided by one of the standard
   --  containers, you can not simply use Gtk.Handlers.Emit_Stop_By_Name, and
   --  you must override the default handler. Note also that this handler
   --  is automatically inherited by children of this class.
   --
   --  This function is not needed unless you are writting your own
   --  widgets, and should be reserved for advanced customization of the
   --  standard widgets.

   type Preferred_Size_Handler is access procedure
      (Widget       : System.Address;
       Minimum_Size : out Glib.Gint;
       Natural_Size : out Glib.Gint);
   pragma Convention (C, Preferred_Size_Handler);

   procedure Set_Default_Get_Preferred_Width_Handler
      (Klass   : Glib.Object.GObject_Class;
       Handler : Preferred_Size_Handler);
   procedure Set_Default_Get_Preferred_Height_Handler
      (Klass   : Glib.Object.GObject_Class;
       Handler : Preferred_Size_Handler);
   pragma Import (C, Set_Default_Get_Preferred_Width_Handler,
                  "ada_WIDGET_CLASS_override_get_preferred_width");
   pragma Import (C, Set_Default_Get_Preferred_Height_Handler,
                  "ada_WIDGET_CLASS_override_get_preferred_height");
   --  Override the computation of a widget's preferred sizes.
   --  You will only need to override this computation if you are writting
   --  your own container widgets.

   procedure Inherited_Get_Preferred_Width
      (Klass      : Glib.Object.Ada_GObject_Class;
       Widget     : access Gtk_Widget_Record'Class;
       Minimum_Size, Natural_Size : out Glib.Gint);
   procedure Inherited_Get_Preferred_Height
      (Klass      : Glib.Object.Ada_GObject_Class;
       Widget     : access Gtk_Widget_Record'Class;
       Minimum_Size, Natural_Size : out Glib.Gint);
   --  Call the default implementation
 
   procedure Inherited_Size_Allocate
      (Klass      : Glib.Object.Ada_GObject_Class;
       Widget     : access Gtk_Widget_Record'Class;
       Allocation : Gtk_Allocation);
   --  Call the inherited size_allocate. This is useful if you have overloaded it in
   --  your own class, but still need to call the standard implementation.

   type Realize_Handler is access procedure (Widget : System.Address);
   pragma Convention (C, Realize_Handler);
   procedure Set_Default_Realize_Handler
      (Klass   : Glib.Object.GObject_Class;
       Handler : Realize_Handler);
   pragma Import (C, Set_Default_Realize_Handler,
                  "ada_WIDGET_CLASS_override_realize");
   --  Override the handler for the "realize" signal. This handler should
   --  create the window for the widget

   procedure Inherited_Realize
      (Klass      : Glib.Object.Ada_GObject_Class;
       Widget     : access Gtk_Widget_Record'Class);
   --  Call the inherited realize.
 
   ---------------------------
   -- Override Draw handler --
   ---------------------------

   generic
       with function Draw
          (W  : access Gtk_Widget_Record'Class;
           Cr : Cairo.Cairo_Context) return Boolean;
   function Proxy_Draw
      (W  : System.Address; Cr : Cairo.Cairo_Context) return Gboolean;
   pragma Convention (C, Proxy_Draw);

   type Draw_Handler is access function
     (W  : System.Address;
      Cr : Cairo.Cairo_Context) return Gboolean;
   pragma Convention (C, Draw_Handler);
   --  A function responsible for drawing a widget.

   procedure Set_Default_Draw_Handler
      (Klass : Glib.Object.GObject_Class; Handler : Draw_Handler);
   --  Override the default drawing function. This in general gives more
   --  control than connection to Signal_Draw, however a widget is responsible
   --  for drawing its children.
   --  Use the generic Proxy_Draw to create a suitable callback.

   function Inherited_Draw
      (Klass  : Glib.Object.Ada_GObject_Class;
       Widget : access Gtk_Widget_Record'Class;
       Cr     : Cairo.Cairo_Context) return Boolean;
   --  Call the inherited draw. This is useful if you have overloaded draw in
   --  your own class, but still need to draw the child widgets that do not
   --  have their own window (the others will already get their own "draw"
   --  event.
   --  See http://developer.gnome.org/gtk3/3.0/chap-drawing-model.html
   --  for an explanation of the gtk+ drawing model.
       </spec>
       <with_body pkg="Ada.Unchecked_Conversion" use="False"/>
       <body>
   function Convert is new Ada.Unchecked_Conversion
      (Draw_Handler, System.Address);

   function Proxy_Draw
      (W  : System.Address;
       Cr : Cairo.Cairo_Context) return Gboolean
   is
      Stub : Gtk_Widget_Record;
      W2 : constant Gtk_Widget := Gtk_Widget (Get_User_Data (W, Stub));
   begin
      return Boolean'Pos (Draw (W2, Cr));
   end Proxy_Draw;

   function Inherited_Draw
      (Klass  : Glib.Object.Ada_GObject_Class;
       Widget : access Gtk_Widget_Record'Class;
       Cr     : Cairo.Cairo_Context) return Boolean
   is
       function Internal (Klass : Ada_GObject_Class;
                          Widget : System.Address;
                          Cr : Cairo.Cairo_Context) return Gboolean;
       pragma Import (C, Internal, "ada_inherited_WIDGET_CLASS_draw");
   begin
      return Internal (Klass, Widget.Get_Object, Cr) /= 0;
   end Inherited_Draw;

   procedure Inherited_Get_Preferred_Width
      (Klass  : Glib.Object.Ada_GObject_Class;
       Widget     : access Gtk_Widget_Record'Class;
       Minimum_Size, Natural_Size : out Glib.Gint)
   is
       procedure Internal (Klass : Ada_GObject_Class;
                           Widget : System.Address;
                           Min, Nat : out Glib.Gint);
       pragma Import
          (C, Internal, "ada_inherited_WIDGET_CLASS_get_preferred_width");
   begin
       Internal (Klass, Widget.Get_Object, Minimum_Size, Natural_Size);
   end Inherited_Get_Preferred_Width;

   procedure Inherited_Get_Preferred_Height
      (Klass  : Glib.Object.Ada_GObject_Class;
       Widget     : access Gtk_Widget_Record'Class;
       Minimum_Size, Natural_Size : out Glib.Gint)
   is
       procedure Internal (Klass : Ada_GObject_Class;
                           Widget : System.Address;
                           Min, Nat : out Glib.Gint);
       pragma Import
          (C, Internal, "ada_inherited_WIDGET_CLASS_get_preferred_height");
   begin
       Internal (Klass, Widget.Get_Object, Minimum_Size, Natural_Size);
   end Inherited_Get_Preferred_Height;

   procedure Inherited_Size_Allocate
      (Klass      : Glib.Object.Ada_GObject_Class;
       Widget     : access Gtk_Widget_Record'Class;
       Allocation : Gtk_Allocation)
   is
       procedure Internal (Klass : Ada_GObject_Class;
                           Widget : System.Address;
                           Allocation : Gtk_Allocation);
       pragma Import
          (C, Internal, "ada_inherited_WIDGET_CLASS_size_allocate");
   begin
       Internal (Klass, Widget.Get_Object, Allocation);
   end Inherited_Size_Allocate;

   procedure Inherited_Realize
      (Klass      : Glib.Object.Ada_GObject_Class;
       Widget     : access Gtk_Widget_Record'Class)
   is
       procedure Internal (Klass : Ada_GObject_Class;
                           Widget : System.Address);
       pragma Import
          (C, Internal, "ada_inherited_WIDGET_CLASS_realize");
   begin
       Internal (Klass, Widget.Get_Object);
   end Inherited_Realize;

   procedure Set_Default_Draw_Handler
      (Klass : Glib.Object.GObject_Class; Handler : Draw_Handler)
   is
      procedure Internal (K : GObject_Class; H : System.Address);
      pragma Import (C, Internal, "ada_WIDGET_CLASS_override_draw");
   begin
      Internal (Klass, Convert (Handler));
   end Set_Default_Draw_Handler;

   function Get_Allocation
     (Value : Glib.Values.GValue) return Gtk_Allocation_Access
   is
      pragma Warnings (Off);
      --  This UC is safe aliasing-wise, so kill warning
      function To_Allocation is new
        Ada.Unchecked_Conversion (System.Address, Gtk_Allocation_Access);
      pragma Warnings (On);
   begin
      return To_Allocation (Glib.Values.Get_Address (Value));
   end Get_Allocation;

   function Get_Requisition
     (Value : Glib.Values.GValue) return Gtk_Requisition_Access
   is
      pragma Warnings (Off);
      --  This UC is safe aliasing-wise, so kill warning
      function To_Requisition is new
        Ada.Unchecked_Conversion (System.Address, Gtk_Requisition_Access);
      pragma Warnings (On);
   begin
      return To_Requisition (Glib.Values.Get_Address (Value));
   end Get_Requisition;
       </body>
     </extra>
   </package>

   <package id="PangoEnums">
     <enum ctype="PangoAlignment" ada="Alignment"/>
     <enum ctype="PangoAttrType" ada="Attr_Type"/>
     <enum ctype="PangoCoverageLevel" ada="Coverage_Level"/>
     <enum ctype="PangoDirection" ada="Direction"/>
     <enum ctype="PangoFontMask" ada="Font_Mask"/>
     <enum ctype="PangoGravity" ada="Gravity"/>
     <enum ctype="PangoGravityHint" ada="GravityHint"/>
     <enum ctype="PangoStretch" ada="Stretch"/>
     <enum ctype="PangoStyle" ada="Style"/>
     <enum ctype="PangoUnderline" ada="Underline"/>
     <enum ctype="PangoVariant" ada="Variant"/>
     <enum ctype="PangoWeight" ada="Weight"/>
     <enum ctype="PangoWrapMode" ada="Wrap_Mode"/>

     <extra>
       <with_spec pkg="Glib"/>
       <spec>
   Pango_Scale : constant := 1024;
   --  All internal units in Pango are expressed in terms of this unit. A
   --  typical pango size must be divided by Pango_Scale to get the equivalent
   --  in pixels.

   function To_Pixels (Pango_Units : Gint) return Gint;
   --  Convert a size in pango units to pixels. This is a rounding of
   --  Pango_Units divided by Pango_Scale

   --  Enum types are bound with the following algorithm:
   --    + the "Pango" prefix of the type name is stripped
   --    + Each word of the type name is separated by '_'
   --    + the full enum name is kept, but capitalized.

   --  All enums types should be sorted by alphabetical order...
       </spec>
       <body>
   function To_Pixels (Pango_Units : Gint) return Gint is
   begin
      if Pango_Units > 0 then
         return (Pango_Units + Pango_Scale / 2) / Pango_Scale;
      else
         return (Pango_Units - Pango_Scale / 2) / Pango_Scale;
      end if;
   end To_Pixels;
       </body>
     </extra>
   </package>

   <package id="GtkEnums">
     <enum ctype="GtkArrowType"/>
     <enum ctype="GtkAttachOptions"/>
     <enum ctype="GtkButtonBoxStyle"/>
     <enum ctype="GtkCornerType"/>
     <enum ctype="GtkDeleteType"/>
     <enum ctype="GtkDirectionType"/>
     <enum ctype="GtkDragResult"/>
     <enum ctype="GtkExpanderStyle"/>
     <enum ctype="GtkIconSize" asbitfield="True"/>
     <enum ctype="GtkJunctionSides"/>
     <enum ctype="GtkJustification"/>
     <enum ctype="GtkMenuDirectionType"/>
     <enum ctype="GtkMovementStep"/>
     <enum ctype="GtkInputHints"/>
     <enum ctype="GtkInputPurpose"/>
     <enum ctype="GtkNumberUpLayout" prefix="GTK_NUMBER_UP_LAYOUT_"/>
     <enum ctype="GtkOrientation"/>
     <enum ctype="GtkPackDirection"/>
     <enum ctype="GtkPackType"/>
     <enum ctype="GtkPageOrientation"/>
     <enum ctype="GtkPageSet"/>
     <enum ctype="GtkLevelBarMode"/>
     <enum ctype="GtkPathPriorityType"/>
     <enum ctype="GtkPathType"/>
     <enum ctype="GtkPolicyType"/>
     <enum ctype="GtkPositionType"/>
     <enum ctype="GtkPrintDuplex"/>
     <enum ctype="GtkPrintPages"/>
     <enum ctype="GtkPrintQuality"/>
     <enum ctype="GtkRegionFlags"/>
     <enum ctype="GtkReliefStyle"/>
     <enum ctype="GtkResizeMode"/>
     <enum ctype="GtkScrollStep"/>
     <enum ctype="GtkScrollType"/>
     <enum ctype="GtkScrollablePolicy"/>
     <enum ctype="GtkSelectionMode"/>
     <enum ctype="GtkSensitivityType"/>
     <enum ctype="GtkShadowType"/>
     <enum ctype="GtkSizeRequestMode" prefix="GTK_SIZE_REQUEST_"/>
     <enum ctype="GtkSortType"/>
     <enum ctype="GtkStateFlags" prefix=""/>
     <enum ctype="GtkStateType"/>
     <enum ctype="GtkTargetFlags" prefix=""/>
     <enum ctype="GtkTextDirection"/>
     <enum ctype="GtkTextWindowType"/>
     <enum ctype="GtkTreeViewGridLines" prefix="GTK_TREE_VIEW_"/>
     <enum ctype="GtkToolbarSpaceStyle"/>
     <enum ctype="GtkToolbarStyle"/>
     <enum ctype="GtkUnit" prefix="GTK_UNIT_"/>
     <enum ctype="GtkWindowPosition"/>
     <enum ctype="GtkWindowType"/>
     <enum ctype="GtkWrapMode"/>

     <extra>
       <with_spec pkg="Glib.Glist"/>
       <with_spec pkg="Glib.GSlist"/>
       <spec>
   function Convert (S : String) return System.Address;
   function Convert (S : System.Address) return String;
   package String_List is new Glib.Glist.Generic_List (UTF8_String);
   package String_SList is new Glib.GSlist.Generic_SList (UTF8_String);
   --  Warning: when you create this list, new memory gets allocated for
   --  all the strings. You should use the function Free_String_List
   --  instead of Glib.Glist.Free to be sure to free this memory.

   procedure Free_String_List (List : in out String_List.Glist);
   procedure Free_String_List (List : in out String_SList.GSlist);
   --  Free the memory occupied by all the strings in the list, as well
   --  as the memory occupied by the list itself.
       </spec>
       <with_body pkg="Ada.Unchecked_Conversion" use="False"/>
       <with_body pkg="Interfaces.C.Strings" use="False"/>
       <body>
   function Convert (S : String) return System.Address is
      function Internal is new
        Ada.Unchecked_Conversion (Interfaces.C.Strings.chars_ptr, System.Address);
   begin
      return Internal (Interfaces.C.Strings.New_String (S));
   end Convert;

   function Convert_Chars_Ptr is new
     Ada.Unchecked_Conversion (System.Address, Interfaces.C.Strings.chars_ptr);

   function Convert (S : System.Address) return String is
   begin
      return Interfaces.C.Strings.Value (Convert_Chars_Ptr (S));
   end Convert;

   procedure Free_String_List (List : in out String_List.Glist) is
      use type String_List.Glist;
      Tmp   : String_List.Glist := List;
      Chars : Interfaces.C.Strings.chars_ptr;
   begin
      while Tmp /= String_List.Null_List loop
         Chars := Convert_Chars_Ptr (String_List.Get_Data_Address (Tmp));
         Interfaces.C.Strings.Free (Chars);
         Tmp := String_List.Next (Tmp);
      end loop;

      String_List.Free (List);
      List := String_List.Null_List;
   end Free_String_List;

   procedure Free_String_List (List : in out String_SList.GSlist) is
      use type String_SList.GSlist;

      Tmp   : String_SList.GSlist := List;
      Chars : Interfaces.C.Strings.chars_ptr;
   begin
      while Tmp /= String_SList.Null_List loop
         Chars := Convert_Chars_Ptr (String_SList.Get_Data_Address (Tmp));
         Interfaces.C.Strings.Free (Chars);
         Tmp := String_SList.Next (Tmp);
      end loop;

      String_SList.Free (List);
      List := String_SList.Null_List;
   end Free_String_List;
       </body>
     </extra>
   </package>

   <package id="GtkContainer">
     <parameter name="self" ada="Container"/>
     <method id="gtk_container_add_with_properties" bind="False"/><!-- varargs -->
     <method id="gtk_container_child_get" bind="False"/> <!-- varargs -->
     <method id="gtk_container_child_get_valist" bind="False"/> <!-- varargs -->
     <method id="gtk_container_child_set" bind="False"/> <!-- varargs -->
     <method id="gtk_container_child_set_valist" bind="False"/> <!-- varargs -->
     <method id="gtk_container_get_children" return="WidgetList"/>
     <method id="gtk_container_set_focus_chain">
       <parameter name="focusable_widgets" ctype="WidgetList"/>
     </method>
     <method id="gtk_container_child_set_property">
       <parameter name="value" direction="in" ctype="GValue"/>
     </method>

     <!-- ??? Binding needs testing -->
     <method id="gtk_container_get_focus_chain" return_as_param="Success" bind="false">
       <parameter name="focusable_widgets" ctype="WidgetList*" direction="out"/>
     </method>
   </package>

   <package id="GtkSpinButton">
     <parameter name="self" ada="Spin_Button"/>
     <enum ctype="GtkSpinType"/>
     <enum ctype="GtkSpinButtonUpdatePolicy"/>
     <method id="gtk_spin_button_new_with_range" ada="Gtk_New"/>
     <method id="gtk_spin_button_new">
       <parameter name="digits" default="0"/>
     </method>
   </package>

   <package id="GtkAction">
     <parameter name="self" ada="Action"/>
     <method id="gtk_action_get_accel_closure" bind="False" /> <!-- Closures not handled-->
     <method id="gtk_action_get_proxies" return="WidgetSList*"/>
   </package>

   <package id="GtkMenu">
     <parameter name="self" ada="Menu"/>
     <method id="gtk_menu_get_active" return="GtkMenuItem"/>
     <method id="gtk_menu_popup">
       <parameter name="parent_menu_shell" ctype="GtkMenuShell" default="null"/>
       <parameter name="parent_menu_item" ctype="GtkMenuItem" default="null"/>
       <parameter name="func" default="null"/>
       <parameter name="button" default="1"/>
       <parameter name="x" direction="inout" />
       <parameter name="y" direction="inout" />
       <parameter name="activate_time" default="0"/>
     </method>
     <method id="gtk_menu_get_for_attach_widget" return="WidgetList*"/>
   </package>

   <package id="GtkMenuBar">
     <parameter name="self" ada="Menu_Bar"/>
   </package>

   <package id="GtkMenuShell">
     <parameter name="self" ada="Menu_Shell"/>
   </package>

   <package id="GtkMenuToolButton">
     <parameter name="self" ada="Button"/>
     <method id="gtk_menu_tool_button_new">
       <parameter name="self" ada="Menu"/>
       <parameter name="icon_widget" default="null"/>
     </method>
     <method id="gtk_menu_tool_button_new_from_stock">
       <parameter name="self" ada="Menu"/>
     </method>
     <method id="gtk_menu_tool_button_get_menu" return="GtkMenu"/>
   </package>

   <package id="GtkImageMenuItem">
     <method id="gtk_image_menu_item_new"/>
     <method id="gtk_image_menu_item_new_with_label" ada="Gtk_New"/>
   </package>

   <package id="GtkCheckMenuItem">
     <parameter name="self" ada="Check_Menu_Item"/>
      <method id="gtk_check_menu_item_new" bind="False"/>
      <method id="gtk_check_menu_item_new_with_label" ada="Gtk_New" >
         <parameter name="label" default='""' allow-none="1"/>
      </method>
   </package>

   <package id="GdkRGBA">
     <method id="gdk_rgba_equal">
       <parameter name="p2" ctype="GdkRGBA*"/>
     </method>
     <method id="gdk_rgba_parse" return_as_param="Success">
       <parameter name="self" direction="out"/>
     </method>
     <extra>
       <with_spec pkg="Glib.Values" />
       <with_spec pkg="Glib.Object" />
       <spec>
   type array_of_Gdk_RGBA is array (Natural range &lt;&gt;) of Gdk_RGBA;

   Null_RGBA  : constant Gdk_RGBA := (0.0, 0.0, 0.0, 0.0);
   Black_RGBA : constant Gdk_RGBA := (0.0, 0.0, 0.0, 1.0);
   White_RGBA : constant Gdk_RGBA := (1.0, 1.0, 1.0, 1.0);

   type Property_RGBA is new Glib.Property;
   procedure Set_Property
     (Object : access Glib.Object.GObject_Record'Class;
      Name   : Property_RGBA;
      Value  : Gdk_RGBA);
   function Get_Property
     (Object : access Glib.Object.GObject_Record'Class;
      Name   : Property_RGBA) return Gdk_RGBA;

   function Gdk_RGBA_Or_Null (Val : System.Address) return System.Address;
   --  Used for the GtkAda binding itself.
   --  Return either a Null_Address or a pointer to Val, depending on
   --  whether Val is the null value for the type.
   --  In all cases, Val is supposed to be an access to the type mentioned in
   --  the name of the subprogram.
   --  In Ada2012, these could be replaced with expression functions instead.

   procedure Set_Value (Value : out Glib.Values.GValue; Val : Gdk_RGBA);
   function  Get_Value (Value : Glib.Values.GValue) return Gdk_RGBA;
   --  Conversion functions for storing a Gdk_RGBA as a GValue.
       </spec>
       <with_body pkg="Glib.Generic_Properties" />
       <body>
   function To_Address
     (Val : Gdk_RGBA; Addr : System.Address) return System.Address;
   package RGBA_Properties is new Generic_Internal_Boxed_Property
     (Gdk_RGBA, Gdk.RGBA.Get_Type, To_Address);

   procedure Set_Property
     (Object : access Glib.Object.GObject_Record'Class;
      Name   : Property_RGBA;
      Value  : Gdk_RGBA) is
   begin
      RGBA_Properties.Set_Property
         (Object, RGBA_Properties.Property (Name), Value);
   end Set_Property;

   function Get_Property
     (Object : access Glib.Object.GObject_Record'Class;
      Name   : Property_RGBA) return Gdk_RGBA is
   begin
      return RGBA_Properties.Get_Property
        (Object, RGBA_Properties.Property (Name));
   end Get_Property;

   function Gdk_RGBA_Or_Null (Val : System.Address) return System.Address is
      function Internal is new Gtkada.Bindings.Generic_To_Address_Or_Null
        (Gdk_RGBA, Null_RGBA);
   begin
      return Internal (Val);
   end Gdk_RGBA_Or_Null;

   function Get_Value (Value : Glib.Values.GValue) return Gdk_RGBA
     renames RGBA_Properties.Get_Value;
   procedure Set_Value (Value : out Glib.Values.GValue; Val : Gdk_RGBA)
     renames RGBA_Properties.Set_Value;

   function To_Address
     (Val : Gdk_RGBA; Addr : System.Address) return System.Address is
   begin
      if Val = Null_RGBA then
         return System.Null_Address;
      else
         return Addr;
      end if;
   end To_Address;
       </body>
     </extra>
   </package>

   <package id="GtkScrolledWindow">
     <parameter name="self" ada="Scrolled_Window"/>
     <method id="gtk_scrolled_window_new">
       <parameter name="hadjustment" default="null"/>
       <parameter name="vadjustment" default="null"/>
     </method>
     <method id="gtk_scrolled_window_get_hscrollbar" return="GtkScrollbar"/>
     <method id="gtk_scrolled_window_get_vscrollbar" return="GtkScrollbar"/>
   </package>

   <package id="GtkWindow">
     <parameter name="self" ada="Window"/>
     <method id="gtk_window_new">
       <parameter name="type" default="Gtk.Enums.Window_Toplevel"/>
     </method>
     <method id="gtk_window_set_opacity" bind="False"/> <!-- would hide Gtk.Widget.Set_Opacity-->
     <method id="gtk_window_get_opacity" bind="False"/> <!-- would hide Gtk.Widget.Get_Opacity-->
     <method id="gtk_window_list_toplevels" return="WidgetList"/>
     <method id="gtk_window_get_icon_list" return="ObjectList"/>
     <method id="gtk_window_set_icon_list">
       <parameter name="list" ctype="ObjectList"/>
     </method>
     <method id="gtk_window_get_default_icon_list" return="ObjectList"/>
     <method id="gtk_window_set_default_icon_list">
       <parameter name="list" ctype="ObjectList"/>
     </method>
     <method id="gtk_window_add_mnemonic">
       <parameter name="keyval" ctype="GdkKeyType"/>
     </method>
     <method id="gtk_window_remove_mnemonic">
       <parameter name="keyval" ctype="GdkKeyType"/>
     </method>
     <method id="gtk_window_mnemonic_activate">
       <parameter name="keyval" ctype="GdkKeyType"/>
     </method>
     <method id="gtk_window_get_resize_grip_area" return_as_param="retrieved"/>
     <method id="gtk_window_set_modal">
       <parameter name="modal" default="True"/>
     </method>

     <method id="gtk_window_get_application" bind="False"/> <!-- Circular dependency -->
     <method id="gtk_window_set_application" bind="False"/> <!-- Circular dependency -->
   </package>

   <package id="GtkWindowGroup" into="GtkWindow">
     <parameter name="self" ada="Window_Group"/>
     <method id="gtk_window_group_get_type" ada="Group_Get_Type"/>
     <method id="gtk_window_group_list_windows" return="WidgetList"/>
   </package>

   <package id="GtkPaperSize">
     <parameter name="self" ada="Widget"/>
     <list ada="Gtk_Paper_Size_Glist" ctype="GtkPaperSize" section="Functions"/>
     <method id="gtk_paper_size_get_paper_sizes" return="GtkPaperSizeList"/>
     <extra>
       <spec>
   --  Common names, from PWG 5101.1-2002 PWG: Standard for Media Standardized
   --  Names
   Gtk_Paper_Name_A3        : constant String := "iso_a3";
   Gtk_Paper_Name_A4        : constant String := "iso_a4";
   Gtk_Paper_Name_A5        : constant String := "iso_a5";
   Gtk_Paper_Name_B5        : constant String := "iso_b5";
   Gtk_Paper_Name_Letter    : constant String := "na_letter";
   Gtk_Paper_Name_Executive : constant String := "na_executive";
   Gtk_Paper_Name_Legal     : constant String := "na_legal";
       </spec>
     </extra>
   </package>

   <package id="GtkRecentAction">
     <parameter name="self" ada="Widget"/>
     <method id="gtk_recent_action_new_for_manager">
       <parameter name="manager" default="Gtk.Recent_Manager.Get_Default"/>
     </method>
   </package>

   <package id="GtkTearoffMenuItem">
     <parameter name="self" ada="Menu_Item"/>
   </package>

   <package id="GtkRecentChooserDialog">
     <parameter name="self" ada="Widget"/>
     <extra>
       <gir:constructor c:identifier="ada_gtk_recent_chooser_dialog_new" name="new">
         <gir:return-value>
           <gir:type name="GtkWidget" c:type="GtkWidget*"/>
         </gir:return-value>
         <gir:parameters>
           <gir:parameter name="title" allow-none="1">
             <gir:type name="utf8" c:type="gchar*"/>
           </gir:parameter>
           <gir:parameter name="parent" allow-none="1">
             <gir:type name="Window" c:type="GtkWindow*"/>
           </gir:parameter>
         </gir:parameters>
       </gir:constructor>
       <gir:constructor c:identifier="ada_gtk_recent_chooser_dialog_new_for_manager" name="new_for_manager">
         <gir:return-value>
           <gir:type name="GtkWidget" c:type="GtkWidget*"/>
         </gir:return-value>
         <gir:parameters>
           <gir:parameter name="title" allow-none="1">
             <gir:type name="utf8" c:type="gchar*"/>
           </gir:parameter>
           <gir:parameter name="parent" allow-none="1">
             <gir:type name="Window" c:type="GtkWindow*"/>
           </gir:parameter>
           <gir:parameter name="manager" allow-none="1">
             <gir:type name="RecentManager" c:type="GtkRecentManager*"/>
           </gir:parameter>
         </gir:parameters>
       </gir:constructor>
     </extra>
   </package>

   <package id="GtkRecentChooserMenu">
   </package>

   <package id="GtkRecentChooserWidget">
     <parameter name="self" ada="Widget"/>
   </package>

   <package id="GtkToggleAction">
     <parameter name="self" ada="Action"/>
   </package>

   <package id="GtkToggleToolButton">
     <parameter name="self" ada="Button"/>
   </package>

   <package id="GtkStyle">
     <parameter name="self" ada="Style"/>
      <method id="gtk_style_get_valist" bind="False"/><!-- va_list -->
      <method id="gtk_style_lookup_color"
              return_as_param="Found"/>

      <method id="gtk_style_render_icon" bind="False"/>  <!-- need icon_source -->
      <method id="gtk_style_lookup_icon_set" bind="False"/>  <!-- need icon_factory -->
   </package>

   <package id="GtkSymbolicColor">
     <method id="gtk_symbolic_color_resolve" bind="False"/> <!-- circular dep with StyleProperties -->
   </package>

   <package id="GtkStyleProvider">
      <virtual-method id='*' bind='False'/>  <!--  circular dep with StyleProperties -->
     <method id="gtk_style_provider_get_style" bind="False" /> <!-- circular dep with StyleProperties -->
     <method id="gtk_style_provider_get_style_property"
             return_as_param="Found"/>
     <method id="gtk_style_provider_get_icon_factory" bind="False" /> <!-- in GtkIconFactory -->
     <extra>
       <spec>
         subtype Priority is Glib.Guint;

         Priority_Fallback : constant Priority := 1;
         --  Used when no theme is defined

         Priority_Theme : constant Priority := 200;
         --  Used for style information provided by the theme

         Priority_Settings : constant Priority := 400;
         --  Used for information provided via Gtk_Settings

         Priority_Application : constant Priority := 600;
         --  For application-specific information

         Priority_User : constant Priority := 800;
         --  Used for the style information from ~/.gtk-3.0.css
       </spec>
     </extra>
   </package>

   <package id="GtkStyleProperties">
      <virtual-method id='*' bind='False'/>  <!--  circular dep with StyleProvider -->
     <method id="gtk_style_properties_get_property"
             return_as_param="Exists"/>
     <method id="gtk_style_properties_set_valist" bind="False"/> <!-- need valist -->
     <method id="gtk_style_properties_get_valist" bind="False"/> <!-- need valist -->
     <method id="gtk_style_properties_lookup_property" bind="False"/> <!-- need StylePropertyParser -->
     <method id="gtk_style_properties_register_property" bind="False"/> <!-- need StylePropertyParser -->
   </package>

   <package id="GtkStyleContext">
     <method id="gtk_style_context_has_region"
             return_as_param="Is_Defined"/>
     <method id="gtk_style_context_list_classes" return="StringList"/>
     <method id="gtk_style_context_list_regions" return="StringList"/>
     <method id="gtk_style_context_get_valist" bind="False"/> <!-- needs valist -->
     <method id="gtk_style_context_get_style_valist" bind="False"/> <!-- needs valist -->
     <method id="gtk_style_context_lookup_color" return_as_param="Found"/>
     <method id="gtk_style_context_state_is_running"
             return_as_param="Is_Running"/>
     <method id="gtk_style_context_lookup_icon_set" bind="False"/> <!--  in GtkIconSet-->
     <function id="gtk_render_handle"/>
     <function id="gtk_render_check" />
     <function id="gtk_render_option" />
     <function id="gtk_render_arrow" />
     <function id="gtk_render_background" />
     <function id="gtk_render_frame" />
     <function id="gtk_render_expander" />
     <function id="gtk_render_focus" />
     <function id="gtk_render_layout" />
     <function id="gtk_render_line" />
     <function id="gtk_render_slider" />
     <function id="gtk_render_frame_gap" />
     <function id="gtk_render_extension" />
     <function id="gtk_render_activity" />
     <!--  <function id="gtk_render_icon_pixbuf" /> -->
     <function id="gtk_render_icon" />
     <extra>
       <spec>
   function Get_Style_Context
      (Widget : not null access Gtk_Widget_Record'Class)
       return Gtk_Style_Context;
   --  Returns the style context associated to Widget.
   --  must not be freed.
       </spec>
       <body>
   function Get_Style_Context
      (Widget : not null access Gtk_Widget_Record'Class)
       return Gtk_Style_Context
   is
      function Internal (Widget : System.Address) return System.Address;
      pragma Import (C, Internal, "gtk_widget_get_style_context");
      Stub_Gtk_Style_Context : Gtk_Style_Context_Record;
   begin
      return Gtk_Style_Context
         (Get_User_Data (Internal (Get_Object (Widget)), Stub_Gtk_Style_Context));
   end Get_Style_Context;
       </body>
     </extra>
   </package>

   <package id="GtkToolButton">
     <parameter name="self" ada="Button"/>
     <method id="gtk_tool_button_new">
       <parameter name="icon_widget" default="null" />
     </method>
   </package>

   <package id="GtkFontButton">
     <parameter name="self" ada="Font_Button"/>
   </package>

   <package id="GtkTextBuffer">
     <parameter name="self" ada="Buffer"/>

      <!-- the following involve a complex callback type and are not needed -->
     <method id="gtk_text_buffer_register_serialize_format" bind="False"/>
     <method id="gtk_text_buffer_register_deserialize_format" bind="False"/>
     <method id="gtk_text_buffer_serialize" bind="False"/>
     <method id="gtk_text_buffer_deserialize" bind="False"/>
     <method id="gtk_text_buffer_get_serialize_formats" bind="False"/>
     <method id="gtk_text_buffer_get_deserialize_formats" bind="False"/>

     <method id="gtk_text_buffer_new">
        <parameter name="table" default="null"/>
     </method>

     <method id="gtk_text_buffer_create_mark">
        <parameter name="left_gravity" default="True"/>
     </method>

     <method id="gtk_text_buffer_get_text">
        <parameter name="include_hidden_chars" default="False"/>
     </method>

     <method id="gtk_text_buffer_get_slice">
        <parameter name="include_hidden_chars" default="False"/>
     </method>

     <method id="gtk_text_buffer_paste_clipboard">
        <parameter name="override_location" ada="" ctype="gpointer" default="System.Null_Address"/>
        <parameter name="default_editable" default="True"/>
     </method>

     <method id="gtk_text_buffer_get_selection_bounds" return_as_param="Result">
        <parameter name="start" direction="out"/>
        <parameter name="end" direction="out"/>
     </method>

     <method id="gtk_text_buffer_delete">
        <parameter name="start" direction="inout"/>
        <parameter name="end" direction="inout"/>
     </method>

     <method id="gtk_text_buffer_delete_interactive" return_as_param="Result">
        <parameter name="start" direction="inout"/>
        <parameter name="end" direction="inout"/>
     </method>

     <method id="gtk_text_buffer_insert">
        <parameter name="iter" direction="inout"/>
        <parameter name="len" default="-1" ada=""/>
     </method>

     <method id="gtk_text_buffer_insert_interactive">
        <parameter name="iter" direction="inout"/>
        <parameter name="len" default="-1" ada=""/>
     </method>

     <method id="gtk_text_buffer_insert_interactive_at_cursor">
        <parameter name="len" default="-1" ada=""/>
     </method>

     <method id="gtk_text_buffer_set_text">
        <parameter name="len" default="-1" ada=""/>
     </method>

     <method id="gtk_text_buffer_insert_at_cursor">
        <parameter name="len" default="-1" ada=""/>
     </method>

     <method id="gtk_text_buffer_create_tag" bind="False"/><!-- vararg, bound manually below -->
     <method id="gtk_text_buffer_insert_with_tags" bind="False"/><!-- vararg, bound manually below -->

      <!-- body bound manually to add safety check -->
     <method id="gtk_text_buffer_get_iter_at_line_offset">
        <body>
      procedure Internal
         (Buffer      : System.Address;
          Iter        : out Gtk.Text_Iter.Gtk_Text_Iter;
          Line_Number : Gint;
          Char_Offset : Gint);
      pragma Import (C, Internal, "gtk_text_buffer_get_iter_at_line_offset");
      Result   : Boolean;
   begin
      --  Prevent critical crashes from gtk+ if Char_Offset is invalid
      Internal (Get_Object (Buffer), Iter, Line_Number, 0);

      if not Ends_Line (Iter) then
         Forward_To_Line_End (Iter, Result);

         if Char_Offset &lt;= Get_Line_Offset (Iter) then
            Internal (Get_Object (Buffer), Iter, Line_Number, Char_Offset);
         end if;
      end if;
       </body>
     </method>

     <extra>
       <with_spec pkg="Gtkada.Types"/>
       <spec>
   procedure Insert
     (Buffer : access Gtk_Text_Buffer_Record;
      Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter;
      Text   : Gtkada.Types.Chars_Ptr);
   --  More efficient version of Insert, which doesn't require a string copy.

   procedure Insert_At_Cursor
     (Buffer : access Gtk_Text_Buffer_Record;
      Text   : Gtkada.Types.Chars_Ptr;
      Len    : Gint := -1);
   --  Call Buffer_Insert, using the current cursor position
   --  as the insertion point.
   --  Text: UTF-8 format C string to insert.

   function Get_Text
     (Buffer               : access Gtk_Text_Buffer_Record;
      Start                : Gtk.Text_Iter.Gtk_Text_Iter;
      The_End              : Gtk.Text_Iter.Gtk_Text_Iter;
      Include_Hidden_Chars : Boolean := False) return Gtkada.Types.Chars_Ptr;
   --  Same as Get_Text above, but return a pointer to a C string, for
   --  efficiency.
   --  The caller is responsible for freeing (using Gtkada.Types.g_free) the
   --  returned pointer.

   function Selection_Exists
     (Buffer : access Gtk_Text_Buffer_Record) return Boolean;
   --  Return True if some text in the buffer is currently selected.

   procedure Insert_With_Tags
     (Buffer : access Gtk_Text_Buffer_Record;
      Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter;
      Text   : UTF8_String;
      Tag    : Gtk_Text_Tag);
   procedure Insert_With_Tags
     (Buffer : access Gtk_Text_Buffer_Record;
      Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter;
      Text   : Gtkada.Types.Chars_Ptr;
      Tag    : Gtk.Text_Tag.Gtk_Text_Tag);
   --  Same as Insert, but specifies the tag to apply to the range.

   function Get_Buffer
      (Iter : Gtk_Text_Iter) return Gtk.Text_Buffer.Gtk_Text_Buffer;
   --  Returns the Gtk.Text_Buffer.Gtk_Text_Buffer this iterator is associated
   --  with.

   function Get_Buffer
      (Mark : Gtk_Text_Mark)
       return Gtk.Text_Buffer.Gtk_Text_Buffer;
   --  Gets the buffer this mark is located inside, or null if the mark is
   --  deleted.

   function Create_Tag
     (Buffer              : access Gtk_Text_Buffer_Record;
      Tag_Name            : String := "")
      return Gtk.Text_Tag.Gtk_Text_Tag;
   --  Creates a tag and adds it to the tag table for Buffer. Equivalent to
   --  calling gtk.text_tag.gtk_new and then adding the tag to the buffer's tag
   --  table. The returned tag is owned by the buffer's tag table, so the ref
   --  count will be equal to one.
   --
   --  If Tag_Name is NULL, the tag is anonymous, otherwise a tag called
   --  Tag_Name must not already exist in the tag table for this buffer.
       </spec>
       <body>
   ------------
   -- Insert --
   ------------

   procedure Insert
     (Buffer : access Gtk_Text_Buffer_Record;
      Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter;
      Text   : Gtkada.Types.Chars_Ptr)
   is
      procedure Internal
        (Buffer : System.Address;
         Iter   : Gtk.Text_Iter.Gtk_Text_Iter;
         Text   : Gtkada.Types.Chars_Ptr;
         Len    : Gint := -1);
      pragma Import (C, Internal, "gtk_text_buffer_insert");

   begin
      Internal (Get_Object (Buffer), Iter, Text);
   end Insert;

   procedure Insert_At_Cursor
     (Buffer : access Gtk_Text_Buffer_Record;
      Text   : Gtkada.Types.Chars_Ptr;
      Len    : Gint := -1)
   is
      procedure Internal
        (Buffer : System.Address;
         Text   : Gtkada.Types.Chars_Ptr;
         Len    : Gint);
      pragma Import (C, Internal, "gtk_text_buffer_insert_at_cursor");

   begin
      Internal (Get_Object (Buffer), Text, Len);
   end Insert_At_Cursor;

   procedure Insert_With_Tags
     (Buffer : access Gtk_Text_Buffer_Record;
      Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter;
      Text   : UTF8_String;
      Tag    : Gtk_Text_Tag)
   is
      procedure Internal
        (Buffer : System.Address;
         Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter;
         Text   : UTF8_String;
         Len    : Gint;
         Tag    : System.Address);
      pragma Import (C, Internal, "ada_gtk_text_buffer_insert_with_tags");

   begin
      Internal
        (Get_Object (Buffer), Iter, Text, Text'Length, Get_Object (Tag));
   end Insert_With_Tags;

   procedure Insert_With_Tags
     (Buffer : access Gtk_Text_Buffer_Record;
      Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter;
      Text   : Gtkada.Types.Chars_Ptr;
      Tag    : Gtk.Text_Tag.Gtk_Text_Tag)
   is
      procedure Internal
        (Buffer : System.Address;
         Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter;
         Text   : Gtkada.Types.Chars_Ptr;
         Len    : Gint := -1;
         Tag    : System.Address);
      pragma Import (C, Internal, "ada_gtk_text_buffer_insert_with_tags");

   begin
      Internal (Get_Object (Buffer), Iter, Text, Tag => Get_Object (Tag));
   end Insert_With_Tags;

   --------------
   -- Get_Text --
   --------------

   function Get_Text
     (Buffer               : access Gtk_Text_Buffer_Record;
      Start                : Gtk.Text_Iter.Gtk_Text_Iter;
      The_End              : Gtk.Text_Iter.Gtk_Text_Iter;
      Include_Hidden_Chars : Boolean := False) return Gtkada.Types.Chars_Ptr
   is
      function Internal
        (Buffer               : System.Address;
         Start                : Gtk.Text_Iter.Gtk_Text_Iter;
         The_End              : Gtk.Text_Iter.Gtk_Text_Iter;
         Include_Hidden_Chars : Gboolean)
         return Interfaces.C.Strings.chars_ptr;
      pragma Import (C, Internal, "gtk_text_buffer_get_text");

   begin
      return Internal
        (Get_Object (Buffer),
         Start,
         The_End,
         Boolean'Pos (Include_Hidden_Chars));
   end Get_Text;

   function Selection_Exists
     (Buffer : access Gtk_Text_Buffer_Record) return Boolean
   is
      Ignored_A, Ignored_B : Gtk_Text_Iter;
      Has_Selection : Boolean;
   begin
      Get_Selection_Bounds (Buffer, Ignored_A, Ignored_B, Has_Selection);
      return Has_Selection;
   end Selection_Exists;

   ----------------
   -- Get_Buffer --
   ----------------

   function Get_Buffer
      (Iter : Gtk_Text_Iter) return Gtk.Text_Buffer.Gtk_Text_Buffer
   is
      function Internal (Iter : Gtk_Text_Iter) return System.Address;
      pragma Import (C, Internal, "gtk_text_iter_get_buffer");
      Stub_Gtk_Text_Buffer : Gtk.Text_Buffer.Gtk_Text_Buffer_Record;
   begin
      return Gtk.Text_Buffer.Gtk_Text_Buffer (Get_User_Data (Internal (Iter), Stub_Gtk_Text_Buffer));
   end Get_Buffer;

   ----------------
   -- Get_Buffer --
   ----------------

   function Get_Buffer
      (Mark : Gtk_Text_Mark)
       return Gtk.Text_Buffer.Gtk_Text_Buffer
   is
      function Internal (Mark : System.Address) return System.Address;
      pragma Import (C, Internal, "gtk_text_mark_get_buffer");
      Stub_Gtk_Text_Buffer : Gtk.Text_Buffer.Gtk_Text_Buffer_Record;
   begin
      return Gtk.Text_Buffer.Gtk_Text_Buffer (Get_User_Data (Internal (Get_Object (Mark)), Stub_Gtk_Text_Buffer));
   end Get_Buffer;

   ----------------
   -- Create_Tag --
   ----------------

   function Create_Tag
     (Buffer              : access Gtk_Text_Buffer_Record;
      Tag_Name            : String := "")
      return Gtk_Text_Tag
   is
      function Internal
        (Buffer              : System.Address;
         Tag_Name            : Interfaces.C.Strings.chars_ptr)
         return System.Address;
      pragma Import (C, Internal, "ada_gtk_text_buffer_create_tag");
      Stub : Gtk_Text_Tag_Record;
      Str  : Interfaces.C.Strings.chars_ptr := String_Or_Null (Tag_Name);
      Tag  : Gtk_Text_Tag;
   begin
      Tag := Gtk_Text_Tag
        (Get_User_Data (Internal (Get_Object (Buffer), Str), Stub));
      Free (Str);
      return Tag;
   end Create_Tag;
       </body>
     </extra>
   </package>

   <package id="GtkTextMark">
     <parameter name="self" ada="Mark"/>
     <method id="gtk_text_mark_get_buffer" bind="False"/><!-- circular dependency, added manually in Gtk.Text_Buffer -->

     <extra>
       <with_spec pkg="Glib.Values"/>
       <spec>
   -------------------------------
   -- Converting to/from GValue --
   -------------------------------

   procedure Set_Text_Mark
     (Val  : in out Glib.Values.GValue;
      Mark : access Gtk_Text_Mark_Record);
   function Get_Text_Mark (Val : Glib.Values.GValue) return Gtk_Text_Mark;
   --  Set the value of the given GValue to Mark.

       </spec>
       <body>
   -------------------
   -- Set_Text_Mark --
   -------------------

   procedure Set_Text_Mark
     (Val  : in out Glib.Values.GValue;
      Mark : access Gtk_Text_Mark_Record) is
   begin
      Glib.Values.Set_Address (Val, Get_Object (Mark));
   end Set_Text_Mark;

   -------------------
   -- Get_Text_Mark --
   -------------------

   function Get_Text_Mark (Val  : Glib.Values.GValue) return Gtk_Text_Mark is
      Stub : Gtk_Text_Mark_Record;
   begin
      return Gtk_Text_Mark
        (Get_User_Data_Fast (Glib.Values.Get_Address (Val), Stub));
   end Get_Text_Mark;
       </body>
     </extra>
   </package>

   <package id="GtkTextChildAnchor">
     <parameter name="self" ada="Anchor"/>
     <method id="gtk_text_child_anchor_get_widgets" return="WidgetSList"/>
   </package>

   <package id="GtkTextTag">
     <parameter name="self" ada="Tag"/>
     <method id="::event" bind="False" />
     <method id="gtk_text_tag_new">
       <doc extend="true">
Newly created tags must be added to the tags table for the buffer you
intend to use them in, as in:
 "Gtk.Text_Tag_Table.Add (Get_Tag_Table (Buffer), Tag)".
See also Gtk.Text_Buffer.Create_Tag which is a more convenient way of
creating a tag.
       </doc>
     </method>
     <method id="gtk_text_tag_event" bind="false"/> <!-- circular dep with text_iter-->
     <slist ada="Text_Tag_List" ctype="GtkTextTag"/>
   </package>

   <package id="GtkCssProvider">
     <method id="::parsing-error" bind="False" />
     <method id="gtk_css_provider_load_from_data">
       <parameter name="data" ctype="char*"/>
       <parameter name="length" default="-1" ada=""/>
       <parameter name="error" direction="access"/>
     </method>
     <method id="gtk_css_provider_load_from_path">
       <parameter name="error" direction="access"/>
     </method>
     <method id="gtk_css_provider_load_from_file" bind="False"/> <!--  needs GFile -->
   </package>

   <package id="GtkMain">
     <function id="gtk_get_major_version" />
     <function id="gtk_get_minor_version" />
     <function id="gtk_get_micro_version" />
     <function id="gtk_get_binary_age" />
     <function id="gtk_get_interface_age" />
     <function id="gtk_check_version" />
     <function id="gtk_parse_args" bind="False" /> <!-- no access to argc argv -->x
     <function id="gtk_init" bind="False" /> <!--  custom -->
     <function id="gtk_init_check" bind="False" /> <!-- custom -->
     <function id="gtk_init_with_args" bind="False" />
     <function id="gtk_disable_setlocale"/>
     <function id="gtk_get_default_language"/>
     <function id="gtk_events_pending"/>
     <function id="gtk_main_do_event"/>
     <function id="gtk_main"/>
     <function id="gtk_main_level"/>
     <function id="gtk_main_quit"/>
     <function id="gtk_main_iteration" />
     <function id="gtk_main_iteration_do"/>
     <function id="gtk_true" />
     <function id="gtk_false" />
     <function id="gtk_grab_add" bind="False" />  <!--  in GtkWidget -->
     <function id="gtk_grab_get_current" />
     <function id="gtk_grab_remove" bind="False"/>  <!--  in GtkWidget -->
     <function id="gtk_device_grab_add" />
     <function id="gtk_device_grab_remove" />
     <function id="gtk_key_snooper_install" />
     <function id="gtk_key_snooper_remove" />
     <function id="gtk_get_current_event" />
     <function id="gtk_get_current_event_time" />
     <function id="gtk_get_current_event_state"
               return_as_param="Has_Current_Event">
       <parameter name="state" direction="out" />
     </function>
     <function id="gtk_get_current_event_device" />
     <function id="gtk_get_event_widget" />
     <function id="gtk_propagate_event" />

     <extra>
       <spec>
   procedure Init;
   --  Initialize GtkAda's internal structures.
   --  This subprogram should be called before any other one in GtkAda.
   --  If GtkAda could not be initialized (no access to the display, etc.), the
   --  application exits with an error

   function Init_Check return Boolean;
   --  Initialize GtkAda's internal structures.
   --  Return False if there was an error (no access to the display, etc.)
       </spec>
       <body>
   gnat_argc : Interfaces.C.int;
   pragma Import (C, gnat_argc);

   gnat_argv : System.Address;
   pragma Import (C, gnat_argv);

   procedure Init is
      procedure Internal (argc : System.Address; argv : System.Address);
      pragma Import (C, Internal, "gtk_init");

   begin
      Internal (gnat_argc'Address, gnat_argv'Address);
   end Init;

   function Init_Check return Boolean is
      function Internal
        (argc : System.Address; argv : System.Address) return Gboolean;
      pragma Import (C, Internal, "gtk_init_check");
   begin
      return Boolean'Val (Internal (gnat_argc'Address, gnat_argv'Address));
   end Init_Check;
       </body>
     </extra>
   </package>

   <package id="GdkCursor" bindtype="False">
     <enum ctype="GdkCursorType" prefix="GDK_"/>

     <method id="gdk_cursor_new_from_pixbuf" bind="False" />  <!--  in gdk.pixbuf -->
     <method id="gdk_cursor_get_image" bind="False" />  <!--  in gdk.pixbuf -->

     <method id="gdk_cursor_unref" bind="False" />  <!--  obsolete -->
     <method id="gdk_cursor_ref" bind="False" />  <!--  obsolete -->
     <extra>
       <spec>
   procedure Ref (Self : Gdk.Gdk_Cursor);
   pragma Import (C, Ref, "g_object_ref");

   procedure Unref (Self : Gdk.Gdk_Cursor);
   pragma Import (C, Unref, "g_object_unref");
       </spec>
     </extra>
   </package>

   <package id="GtkTextAttributes">
     <parameter name="self" ada="Text_Attr"/>
     <record ctype="GtkTextAppearance"/>

   </package>

   <package id="GtkTextTagTable">
     <parameter name="self" ada="Table"/>
   </package>

   <package id="GtkTextView">
     <parameter name="self" ada="View"/>

     <!-- These are now inherited from the Scrollable interface -->
     <method id="gtk_text_view_get_hadjustment" bind="false"/>
     <method id="gtk_text_view_get_vadjustment" bind="false"/>
     <method id="gtk_text_view_set_hadjustment" bind="false"/>
     <method id="gtk_text_view_set_vadjustment" bind="false"/>

     <method id="gtk_text_view_new_with_buffer" ada="Gtk_New"/>
   </package>

   <package id="GdkWindow" bindtype="False">
     <record ctype="GdkGeometry"/>
     <enum ctype="GdkWindowWindowClass" prefix="GDK_" ada="Gdk_Window_Class"/>
     <enum ctype="GdkWindowEdge" prefix="GDK_"/>
     <enum ctype="GdkWindowType" prefix="GDK_"/>
     <enum ctype="GdkWindowAttributesType" prefix="GDK_"/>
     <enum ctype="GdkWindowHints" prefix="GDK_"/>
     <enum ctype="GdkWindowTypeHint" prefix="GDK_"/>
     <enum ctype="GdkWMDecoration" prefix="GDK_"/>
     <enum ctype="GdkWMFunction" prefix="GDK_"/>
     <enum ctype="GdkGravity" prefix="GDK_"/>
     <enum ctype="GdkFullscreenMode" prefix="GDK_FULLSCREEN_" />
     <list ada="Gdk_Window_List" ctype="GdkWindow"/>
     <method id="::pick-embedded-child" bind="False" />
     <method id="::from-embedder" bind="False" />
     <method id="::to-embedder" bind="False" />
     <method id="::create-surface" bind="False" />
     <method id="gdk_window_add_filter" bind="False" />   <!-- dangerous -->
     <method id="gdk_window_remove_filter" bind="False" />   <!-- dangerous -->
     <method id="gdk_window_get_children" return="GdkWindowList"/>
     <method id="gdk_window_get_decorations" return_as_param="Has_Decorations"/>
     <method id="gdk_window_get_device_position" return_as_param="Window"/>
     <method id="gdk_window_get_origin" return="void"/>
     <method id="gdk_window_get_pointer" return_as_param="Window"/>
     <method id="gdk_window_peek_children" return="GdkWindowList" />
     <method id="gdk_window_at_pointer" return_as_param="Window"/>
     <method id="gdk_window_new">
        <parameter name="attributes_mask" ctype="GdkWindowAttributesType"/>
     </method>

<!--     <method id="gdk_window_get_events" bind="False" /> <!- circular dep with GdkEvent -->
<!--     <method id="gdk_window_set_events" bind="False" /> <!- circular dep with GdkEvent -->
<!--     <method id="gdk_window_get_device_events" bind="False" /> <!- circular dep with GdkEvent -->
<!--     <method id="gdk_window_set_device_events" bind="False" /> <!- circular dep with GdkEvent -->
<!--     <method id="gdk_window_get_source_events" bind="False" /> <!- circular dep with GdkEvent -->
<!--     <method id="gdk_window_set_source_events" bind="False" /> <!- circular dep with GdkEvent -->

     <method id="gdk_window_set_icon_list" bind="False"/> <!--  needs PixbufList -->
     <method id="gdk_window_get_drag_protocol" return_as_param="Protocol" bind="False"/> <!--  circular dep with GdkDragContent -->

     <method id="gdk_window_get_user_data" bind="False"/>  <!-- see below -->

     <extra>
       <spec>
   function Get_User_Data (Window : Gdk_Window) return Glib.Object.GObject;
   --  Return the widget to which events are reported when they happen on
   --  Window. This is the widget that was set through the call to
   --  Set_User_data.

   procedure Set_User_Data
     (Window : Gdk_Window;
      Widget : access Glib.Object.GObject_Record'Class);
   --  Sets a special field in the window.
   --  All the events reported by the Xserver (or the Windows server) for
   --  Window will be redirected to Widget through the standard signals
   --  "expose_event", "button_press_event", ...
   --  You almost always need to call this function after creating a new
   --  Gdk_Window yourself, or you won't be able to handle the events.

   procedure Ref (Window : Gdk_Window);
   procedure Unref (Window : Gdk_Window);
   pragma Import (C, Ref, "g_object_ref");
   pragma Import (C, Unref, "g_object_unref");
       </spec>
       <body>
   function Get_User_Data (Window : Gdk_Window) return Glib.Object.GObject is
      procedure Internal (Window : Gdk_Window; Widget : System.Address);
      pragma Import (C, Internal, "gdk_window_get_user_data");
      Data : aliased System.Address;
      Stub : GObject_Record;
   begin
      Internal (Window, Data'Address);
      return Get_User_Data (Data, Stub);
   end Get_User_Data;

   procedure Set_User_Data
     (Window : Gdk_Window;
      Widget : access Glib.Object.GObject_Record'Class)
   is
      procedure Internal (Window : Gdk_Window; Widget : System.Address);
      pragma Import (C, Internal, "gdk_window_set_user_data");
   begin
      Internal (Window, Get_Object (Widget));
   end Set_User_Data;
       </body>
     </extra>
   </package>

   <package id="GtkIconView">
     <parameter name="self" ada="Icon_View"/>
     <enum ctype="GtkIconViewDropPosition" prefix="GTK_ICON_VIEW_"/>
     <method id="gtk_icon_view_get_cursor" return_as_param="Cursor_Is_Set"/>
     <method id="gtk_icon_view_get_dest_item_at_pos" return_as_param="Has_Item"/>
     <method id="gtk_icon_view_get_item_at_pos" return_as_param="Has_Item"/>
     <method id="gtk_icon_view_get_selected_items" return="TreePathList"/>
     <method id="gtk_icon_view_get_tooltip_context" return_as_param="Success"/>
     <method id="gtk_icon_view_get_visible_range" return="void"/>

     <method id="gtk_icon_view_enable_model_drag_source" bind="False"/> <!-- see below -->
     <method id="gtk_icon_view_enable_model_drag_dest" bind="False"/> <!-- see below -->
     <extra>
       <with_spec pkg="Gtk.Target_List"/>
       <with_spec pkg="Gdk.Dnd"/>
       <with_spec pkg="Gdk.Types"/>
       <spec>
   procedure Enable_Model_Drag_Dest
     (Icon_View : access Gtk_Icon_View_Record;
      Targets   : Gtk.Target_List.Target_Entry_Array;
      Actions   : Gdk.Dnd.Drag_Action);
   --  Turns Icon_view into a drop destination for automatic DND.
   --  Targets is the list of targets that the drag will support.

   procedure Enable_Model_Drag_Source
     (Icon_View         : access Gtk_Icon_View_Record;
      Start_Button_Mask : Gdk.Types.Gdk_Modifier_Type;
      Targets           : Gtk.Target_List.Target_Entry_Array;
      Actions           : Gdk.Dnd.Drag_Action);
   --  Turns Icon_view into a drag source for automatic DND.
   --  Start_Button_Mask is the allowed buttons to start drag.
       </spec>
       <body>
   procedure Enable_Model_Drag_Dest
     (Icon_View : access Gtk_Icon_View_Record;
      Targets   : Target_Entry_Array;
      Actions   : Drag_Action)
   is
      procedure Internal
        (Icon_View : System.Address;
         Targets   : System.Address;
         N_Targets : Gint;
         Actions   : Drag_Action);
      pragma Import (C, Internal, "gtk_icon_view_enable_model_drag_dest");
   begin
      Internal (Get_Object (Icon_View),
                Targets (Targets'First)'Address, Targets'Length,
                Actions);
   end Enable_Model_Drag_Dest;

   procedure Enable_Model_Drag_Source
     (Icon_View         : access Gtk_Icon_View_Record;
      Start_Button_Mask : Gdk_Modifier_Type;
      Targets           : Target_Entry_Array;
      Actions           : Drag_Action)
   is
      procedure Internal
        (Icon_View         : System.Address;
         Start_Button_Mask : Gdk_Modifier_Type;
         Targets           : System.Address;
         N_Targets         : Gint;
         Actions           : Drag_Action);
      pragma Import (C, Internal, "gtk_icon_view_enable_model_drag_source");
   begin
      Internal (Get_Object (Icon_View), Start_Button_Mask,
                Targets (Targets'First)'Address, Targets'Length,
                Actions);
   end Enable_Model_Drag_Source;
       </body>
     </extra>
   </package>

   <package id="GdkEvent">
     <enum ctype="GdkEventType" prefix="GDK_" ignore="GDK_DOUBLE_BUTTON_PRESS GDK_TRIPLE_BUTTON_PRESS"/>
     <enum ctype="GdkEventMask" prefix="GDK_"/>
     <enum ctype="GdkVisibilityState" prefix="GDK_"/>
     <enum ctype="GdkScrollDirection" prefix="GDK_"/>
     <enum ctype="GdkNotifyType" prefix="GDK_"/>
     <enum ctype="GdkCrossingMode" prefix="GDK_"/>
     <enum ctype="GdkPropertyState" prefix="GDK_"/>
     <enum ctype="GdkWindowState" prefix="GDK_"/>
     <enum ctype="GdkSettingAction" prefix="GDK_"/>
     <enum ctype="GdkOwnerChange" prefix="GDK_"/>
     <record ctype="GdkEventAny"/>
     <record ctype="GdkEventButton"/>
     <record ctype="GdkEventExpose"/>
     <record ctype="GdkEventVisibility"/>
     <record ctype="GdkEventMotion"/>
     <record ctype="GdkEventScroll"/>
     <record ctype="GdkEventKey"/>
     <record ctype="GdkEventCrossing"/>
     <record ctype="GdkEventFocus"/>
     <record ctype="GdkEventConfigure"/>
     <record ctype="GdkEventProperty"/>
     <record ctype="GdkEventSelection"/>
     <record ctype="GdkEventOwnerChange"/>
     <record ctype="GdkEventProximity"/>
     <record ctype="GdkEventDND"/>
     <record ctype="GdkEventWindowState"/>
     <record ctype="GdkEventSetting"/>
     <record ctype="GdkEventTouch"/>
     <record ctype="GdkEventSequence"/>
     <record ctype="GdkEventGrabBroken"/>

     <record ctype="GdkEvent" ada="Gdk_Event_Record">
       <union value="GDK_NOTHING" field="any"/>
       <union value="GDK_DELETE" field="any"/>
       <union value="GDK_DESTROY" field="any" />
       <union value="GDK_EXPOSE" field="expose" />
       <union value="GDK_MOTION_NOTIFY" field="motion" />
       <union value="GDK_BUTTON_PRESS" field="button" />
       <union value="GDK_2BUTTON_PRESS" field="button" />
       <union value="GDK_3BUTTON_PRESS" field="button" />
       <union value="GDK_BUTTON_RELEASE" field="button" />
       <union value="GDK_KEY_PRESS" field="key" />
       <union value="GDK_KEY_RELEASE" field="key" />
       <union value="GDK_ENTER_NOTIFY" field="crossing" />
       <union value="GDK_LEAVE_NOTIFY" field="crossing" />
       <union value="GDK_FOCUS_CHANGE" field="focus_change" />
       <union value="GDK_CONFIGURE" field="configure" />
       <union value="GDK_MAP" field="any" />
       <union value="GDK_UNMAP" field="any" />
       <union value="GDK_PROPERTY_NOTIFY" field="property" />
       <union value="GDK_SELECTION_CLEAR" field="selection" />
       <union value="GDK_SELECTION_REQUEST" field="selection" />
       <union value="GDK_SELECTION_NOTIFY" field="selection" />
       <union value="GDK_PROXIMITY_IN" field="proximity" />
       <union value="GDK_PROXIMITY_OUT" field="proximity" />
       <union value="GDK_DRAG_ENTER" field="dnd" />
       <union value="GDK_DRAG_LEAVE" field="dnd" />
       <union value="GDK_DRAG_MOTION" field="dnd" />
       <union value="GDK_DRAG_STATUS" field="dnd" />
       <union value="GDK_DROP_START" field="dnd" />
       <union value="GDK_DROP_FINISHED" field="dnd" />
       <union value="GDK_CLIENT_EVENT" field="any" />
       <union value="GDK_VISIBILITY_NOTIFY" field="visibility" />
       <union value="GDK_SCROLL" field="scroll" />
       <union value="GDK_WINDOW_STATE" field="window_state" />
       <union value="GDK_SETTING" field="setting" />
       <union value="GDK_OWNER_CHANGE" field="owner_change" />
       <union value="GDK_GRAB_BROKEN" field="grab_broken" />
       <union value="GDK_DAMAGE" field="expose" />
       <union value="GDK_TOUCH_BEGIN" field="touch" />
       <union value="GDK_TOUCH_UPDATE" field="touch" />
       <union value="GDK_TOUCH_END" field="touch" />
       <union value="GDK_TOUCH_CANCEL" field="touch" />
     </record>

     <method id="gdk_event_get_coords" return="void"/>
     <method id="gdk_event_get_root_coords" return="void"/>
     <method id="gdk_event_get_axis" return="void"/>
     <method id="gdk_event_get_scroll_direction" return="void"/>
     <method id="gdk_event_get_scroll_deltas" return="void"/>

     <!--  These are getters provided by gtk+ itself. They are reused from our
           own misc.c file, because we want GtkAda to raise exceptions instead.
           See <extra> below
     -->
     <method id="gdk_event_get_button" bind="False"/>
     <method id="gdk_event_get_state" bind="False"/>
     <method id="gdk_event_get_click_count" bind="False"/>
     <method id="gdk_event_get_keyval" bind="False"/>
     <method id="gdk_event_get_keycode" bind="False"/>

     <!--  Avoid circular dependencies  Event->Device->Display->Event -->
     <method id="gdk_event_get_device" bind="False"/>
     <method id="gdk_event_get_source_device" bind="False"/>
     <method id="gdk_event_set_device" bind="False"/>
     <method id="gdk_event_set_source_device" bind="False"/>
     <method id="gdk_event_get_screen" bind="False"/>
     <method id="gdk_event_set_screen" bind="False"/>

     <function id="gdk_events_pending" ada="Events_Pending"/>
     <method id="gdk_events_get_angle" ada="Get_Angle"/>
     <method id="gdk_events_get_center" ada="Get_Center"/>
     <method id="gdk_events_get_distance" ada="Get_Distance"/>
     <function id="gdk_set_show_events" ada="Set_Show_Events"/>
     <function id="gdk_get_show_events" ada="Get_Show_Events"/>

     <extra>
       <gir:method name="Get_Button" c:identifier="ada_gdk_event_get_button">
         <gir:doc>Extract the button number from an event</gir:doc>
         <gir:return-value><gir:type name="guint" c:type="guint"/></gir:return-value>
       </gir:method>
       <gir:method name="Get_State" c:identifier="ada_gdk_event_get_state">
         <gir:doc>State of the mouse buttons and keyboard keys just prior to the event</gir:doc>
         <gir:return-value><gir:type name="GdkModifierType" c:type="GdkModifierType"/></gir:return-value>
       </gir:method>
       <gir:method name="Get_Key_Val" c:identifier="ada_gdk_event_get_keyval">
         <gir:doc>Code of the key that was pressed (and that generated the event)</gir:doc>
         <gir:return-value><gir:type name="GdkKeyType" c:type="GdkKeyType"/></gir:return-value>
       </gir:method>
       <gir:method name="Get_Keycode" c:identifier="ada_gdk_event_get_keycode">
         <gir:doc>Hardware key code of the key that was pressed</gir:doc>
         <gir:return-value><gir:type name="guint" c:type="guint"/></gir:return-value>
       </gir:method>
       <gir:method name="Get_Event_Type" c:identifier="ada_gdk_event_get_event_type">
         <gir:doc>The type of the event</gir:doc>
         <gir:return-value><gir:type name="GdkEventType" c:type="GdkEventType"/></gir:return-value>
       </gir:method>
       <gir:method name="Get_Window" c:identifier="ada_gdk_event_get_window">
         <gir:doc>The window to which the event was sent</gir:doc>
         <gir:return-value><gir:type name="GdkWindow*" c:type="GdkWindow*"/></gir:return-value>
       </gir:method>

       <type ctype="GdkEvent*" ada="Gdk_Event">
         type Gdk_Event is access all Gdk_Event_Record;
         pragma No_Strict_Aliasing (Gdk_Event);
       </type>
       <with_spec pkg="Glib.Values" />
       <spec>
         Double_Button_Press : constant Gdk_Event_Type := Gdk_2button_Press;
         Triple_Button_Press : constant Gdk_Event_Type := Gdk_3button_Press;

         Button_Primary   : constant Gint := 1;
         Button_Secondary : constant Gint := 3;
         Button_Middle    : constant Gint := 2;
         --  The primary button is typically the left mouse button, or the
         --  right button in a left-handed setup. The secondary button is the
         --  other one.

         function From_Address (C : System.Address) return Gdk_Event;
         --  Convert a C handler to the matching Event structure.

         function To_Address (C : Gdk_Event) return System.Address;
         --  Convert an event to the underlying C handler.

         function Get_Event (Value : Glib.Values.GValue) return Gdk_Event;
         --  Convert a value into a Gdk_Event.

         function To_Event (Event : access Gdk_Event_Button) return Gdk_Event;
         function To_Event (Event : access Gdk_Event_Key) return Gdk_Event;
         --  Cast Event into a Gdk_Event, which can be used to call some of
         --  subprograms in the API. The return value is a pointer to Event,
         --  which should therefore remain valid as long as the pointer is in
         --  use.

   -------------------------------
   -- Some constants used below --
   -------------------------------
   --  This constants have the '-1' since in some cases gtk itself uses
   --  the extrema to return some meaningful value (for instance, the result
   --  of Get_Area can have the values Guint16'Last to mean the whole area).

   Invalid_Gdouble_Value : constant Gdouble := Gdouble'Last - 1.0;
   Invalid_Gint_Value    : constant Gint    := Gint'Last - 1;
   Invalid_Guint_Value   : constant Guint   := Guint'Last - 1;
   Invalid_Guint32_Value : constant Guint32 := Guint32'Last - 1;
   Invalid_Gulong_Value  : constant Gulong  := Gulong'Last - 1;

   pragma Export (C, Invalid_Gdouble_Value, "ada_gdk_invalid_gdouble_value");
   pragma Export (C, Invalid_Gint_Value, "ada_gdk_invalid_gint_value");
   pragma Export (C, Invalid_Guint_Value, "ada_gdk_invalid_guint_value");
   pragma Export (C, Invalid_Guint32_Value, "ada_gdk_invalid_guint32_value");
   pragma Export (C, Invalid_Gulong_Value, "ada_gdk_invalid_gulong_value");
       </spec>
       <body>
   function From_Address (C : System.Address) return Gdk_Event is
      function Convert is new Ada.Unchecked_Conversion
           (Glib.C_Proxy, Gdk_Event);
   begin
      return Convert (Glib.C_Proxy'(Glib.To_Proxy (C)));
   end From_Address;

   function To_Address (C : Gdk_Event) return System.Address is
      function Convert is new Ada.Unchecked_Conversion
           (Gdk_Event, Glib.C_Proxy);
   begin
      return Glib.To_Address (Convert (C));
   end To_Address;

   function Get_Event (Value : Glib.Values.GValue) return Gdk_Event is
      function Convert is new Ada.Unchecked_Conversion
           (Glib.C_Proxy, Gdk_Event);
   begin
      return Convert (Glib.Values.Get_Proxy (Value));
   end Get_Event;

   function To_Event (Event : access Gdk_Event_Button) return Gdk_Event is
      type Gdk_Event_Button_Access is access all Gdk_Event_Button;
      function Convert is new Ada.Unchecked_Conversion
           (Gdk_Event_Button_Access, Gdk_Event);
   begin
      return Convert (Gdk_Event_Button_Access (Event));
   end To_Event;

   function To_Event (Event : access Gdk_Event_Key) return Gdk_Event is
      type Gdk_Event_Key_Access is access all Gdk_Event_Key;
      function Convert is new Ada.Unchecked_Conversion
         (Gdk_Event_Key_Access, Gdk_Event);
   begin
      return Convert (Gdk_Event_Key_Access (Event));
   end To_Event;
       </body>
     </extra>

     <doc group="Gdk, the low-level API"/>
     <parameter name="self" ada="Event"/>
   </package>

   <package id="GtkRadioToolButton">
     <method id="gtk_radio_tool_button_new">
       <parameter name="group" ctype="WidgetSList"/>
     </method>
     <method id="gtk_radio_tool_button_new_from_stock">
       <parameter name="group" ctype="WidgetSList"/>
     </method>
     <method id="gtk_radio_tool_button_set_group">
       <parameter name="group" ctype="WidgetSList"/>
     </method>
     <method id="gtk_radio_tool_button_get_group" return="WidgetSList"/>
     <method id="gtk_radio_tool_button_new_from_widget" bind="False"/> <!-- gir file misses Group parameter-->
     <method id="gtk_radio_tool_button_new_with_stock_from_widget" bind="False"/> <!-- gir file misses Group parameter-->
   </package>

   <package id="GtkSelectionData">
     <parameter name="self" ada="Selection"/>

     <method id="gtk_selection_data_targets_include_rich_text" bind="False"/> <!-- circular dependency on gtk.text_buffer -->
     <method id="gtk_selection_data_get_data_with_length" bind="False"/> <!-- not convenient, has an access gint and returns an array -->
     <method id="gtk_selection_data_set" bind="False"/> <!-- manual binding below -->
     <method id="gtk_selection_data_get_targets" bind="False"/> <!-- manual binding below -->

     <method id="gtk_selection_data_get_data" return="System.Address"/>

     <extra>
        <spec>
   ---------------
   -- Selection --
   ---------------

   function Make_Atom (Num : Gulong) return Gdk.Types.Gdk_Atom;
   pragma Import (C, Make_Atom, "ada_make_atom");
   --  Auxiliary subprogram

   subtype Gdk_Selection is Gdk.Types.Gdk_Atom;
   --  These are predefined atom values for several common selections.
   --  You are of course free to create new ones, but most of the time you
   --  should simply use Selection_Primary unless you foresee the need for
   --  multiple simultaneous selections.
   --  To access the clipboard on windows machines, you might need to create
   --  a new selection with Gdk.Property.Atom_Intern ("CLIPBOARD");

   Selection_Primary   : constant Gdk_Selection := Make_Atom (1);
   Selection_Secondary : constant Gdk_Selection := Make_Atom (2);

   procedure Selection_Data_Set
     (Selection : Gtk_Selection_Data;
      The_Type  : Gdk.Types.Gdk_Atom;
      Format    : Gint;
      Data      : System.Address;
      Length    : Gint);
   --  General form of Selection_Data_Set.
   --  Any data can be transmitted. Length is the number of bytes in Data.

   procedure Selection_Data_Set
     (Selection : Gtk_Selection_Data;
      The_Type  : Gdk.Types.Gdk_Atom;
      Format    : Gint;
      Data      : String);
   --  Set the data for a selection (special case for strings)
   --  This function is generally called when a drag-and-drop operation
   --  ask the source widget for the data to be transmitted. In that case,
   --  a Selection_Data was already transmitted and is given as a handler
   --  parameter for the signal "drag_data_get". The_Type can simply be
   --  extracted from the Selection_Data.

   function Get_Targets
     (Selection : Gtk_Selection_Data) return Gdk.Types.Gdk_Atom_Array;
   --  Gets the contents of Selection_Data as an array of targets.
   --  This can be used to interpret the results of getting
   --  the standard TARGETS target that is always supplied for
   --  any selection.
   --  This is different from Get_Target, which indicate the current format
   --  that the selection contains. Get_Targets only applies when Get_Target
   --  is "TARGETS".

   function Get_Data_As_String (Selection : Gtk_Selection_Data) return String;
   --  Return the data as a string.
   --  This is only a convenience function, since it simply creates a string
   --  from the return of Get_Data.
        </spec>

        <with_body pkg="Gtkada.C" />
        <body>
   package Atom_Arrays is new Gtkada.C.Unbounded_Arrays
     (Gdk.Types.Gdk_Atom, Gdk.Types.Gdk_None,
      Natural, Gdk.Types.Gdk_Atom_Array);

   ------------------------
   -- Selection_Data_Set --
   ------------------------

   procedure Selection_Data_Set
     (Selection : Gtk_Selection_Data;
      The_Type  : Gdk.Types.Gdk_Atom;
      Format    : Gint;
      Data      : System.Address;
      Length    : Gint)
   is
      procedure Internal
        (Selection : System.Address;
         The_Type  : Gdk.Types.Gdk_Atom;
         Format    : Gint;
         Data      : System.Address;
         Length    : Gint);
      pragma Import (C, Internal, "gtk_selection_data_set");

   begin
      Internal (Get_Object (Selection), The_Type, Format, Data, Length);
   end Selection_Data_Set;

   procedure Selection_Data_Set
     (Selection : Gtk_Selection_Data;
      The_Type  : Gdk.Types.Gdk_Atom;
      Format    : Gint;
      Data      : String) is
   begin
      Selection_Data_Set
        (Selection, The_Type, Format, Data'Address, Data'Length);
   end Selection_Data_Set;

   -----------------
   -- Get_Targets --
   -----------------

   function Get_Targets
     (Selection : Gtk_Selection_Data) return Gdk.Types.Gdk_Atom_Array
   is
      use Atom_Arrays;
      function Internal
        (Selection : System.Address;
         Targets   : access Unbounded_Array_Access;
         N_Atoms   : access Gint) return Gboolean;
      pragma Import (C, Internal, "gtk_selection_data_get_targets");

      Output    : aliased Unbounded_Array_Access;
      N         : aliased Gint;
   begin
      if Internal
         (Get_Object (Selection),
          Output'Unchecked_Access,
          N'Unchecked_Access) = 0
      then
         Output := null;
      end if;

      declare
         Result : constant Gdk_Atom_Array := To_Array (Output, Integer (N));
      begin
         G_Free (Output);
         return Result;
      end;
   end Get_Targets;

   ------------------------
   -- Get_Data_As_String --
   ------------------------

   function Get_Data_As_String
     (Selection : Gtk_Selection_Data) return String
   is
      function Internal
        (Selection : System.Address) return Interfaces.C.Strings.chars_ptr;
      pragma Import (C, Internal, "gtk_selection_data_get_data");
   begin
      return Interfaces.C.Strings.Value (Internal (Get_Object (Selection)));
   end Get_Data_As_String;
        </body>
     </extra>
   </package>


   <package id="GtkTargetEntry">
     <parameter name="self" ada="Target_Entry"/>

     <record ctype="GtkTargetEntry">
       <field name="flags" ctype="GtkTargetFlags"/>
     </record>

     <method id="gtk_target_entry_copy" bind="False"/> <!-- requires From_Object -->

     <method id="gtk_target_entry_new">
        <parameter name="Flags" ctype="GtkTargetFlags"/>
     </method>
   </package>

   <package id="GtkTargetList">
     <parameter name="self" ada="List"/>
     <enum ctype="GtkAccelFlags" prefix="GTK_"/>

     <method id="gtk_target_list_add_rich_text_targets" bind="False"/> <!-- circular dependency clipboard, text_buffer -->

     <method id="gtk_target_list_new" bind="False"/> <!-- manual binding below -->
     <method id="gtk_target_list_add_table" bind="False"/> <!-- manual binding below -->

     <method id="gtk_target_list_find"
         return_as_param="Found" />

     <extra>
       <with_spec pkg="Gtk.Target_Entry" />
       <spec>
   type Target_Entry_Array is array (Natural range &lt;&gt;) of Gtk_Target_Entry;

   Any_Target_Entry : Target_Entry_Array (1 .. 0);
   --  To be used for drop sites that accept any kind of data.

   procedure Gtk_New
      (List   : out Gtk_Target_List;
      Targets : Target_Entry_Array);
   --  Creates a new Gtk.Target_List.Gtk_Target_List from an array of
   --  Gtk.Target_Entry.Gtk_Target_Entry.

   procedure Add_Table
      (List    : Gtk_Target_List;
       Targets : Target_Entry_Array);
   --  Prepends a table of Gtk.Target_Entry.Gtk_Target_Entry to a target list.
       </spec>
       <body>
   -------------
   -- Gtk_New --
   -------------

   procedure Gtk_New
      (List   : out Gtk_Target_List;
       Targets : Target_Entry_Array)
   is
      function Internal
         (Targets  : System.Address;
          Ntargets : Guint) return System.Address;
      pragma Import (C, Internal, "gtk_target_list_new");
   begin
      List.Set_Object (Internal (Targets'Address, Targets'Length));
   end Gtk_New;

   ---------------
   -- Add_Table --
   ---------------

   procedure Add_Table
      (List    : Gtk_Target_List;
       Targets : Target_Entry_Array)
   is
      procedure Internal
         (List     : System.Address;
          Targets  : System.Address;
          Ntargets : Guint);
      pragma Import (C, Internal, "gtk_target_list_add_table");
   begin
      Internal (Get_Object (List), Targets'Address, Targets'Length);
   end Add_Table;
       </body>
     </extra>
   </package>

   <package id="GtkTooltip"/>

   <package id="GtkRadioMenuItem">
     <parameter name="self" ada="Radio_Menu_Item" />

     <!-- Merge two Gtk_New together -->
     <method id="gtk_radio_menu_item_new" bind="False"/>
     <method id="gtk_radio_menu_item_new_with_label" ada="Gtk_New" >
       <parameter name="label" default='""' allow-none="0"/>
       <parameter name="group" ctype="WidgetSList"/>
      </method>
     <method id="gtk_radio_menu_item_new_with_mnemonic" >
       <parameter name="group" ctype="WidgetSList"/>
      </method>
     <method id="gtk_radio_menu_item_set_group">
       <parameter name="group" ctype="WidgetSList"/>
     </method>
     <method id="gtk_radio_menu_item_get_group" return="WidgetSList"/>
     <method id="gtk_radio_menu_item_new_from_widget" bind="False"/> <!-- gir file misses Group parameter-->
     <method id="gtk_radio_menu_item_new_with_label_from_widget" bind="False"/> <!-- gir file misses Group parameter-->
     <method id="gtk_radio_menu_item_new_with_mnemonic_from_widget" bind="False"/> <!-- gir file misses Group parameter-->
     <extra>
       <spec>
   function Selected_Button (In_Group : Widget_SList.GSlist) return Natural;
   --  Return the button number of the selected button in the group.
   --  Note: This function is not part of Gtk+ itself, but is provided as a
   --  convenient function
       </spec>
       <body>
   function Selected_Button
     (In_Group : Widget_SList.GSlist) return Natural
   is
      use Widget_SList;
      J   : Natural := 0;
      Tmp : Widget_SList.GSlist := In_Group;
   begin
      while Tmp /= Widget_SList.Null_List loop
         exit when Get_Active (Gtk_Radio_Menu_Item (Get_Data (Tmp)));
         Tmp := Next (Tmp);
         J := J + 1;
      end loop;

      return J;
   end Selected_Button;
       </body>
     </extra>
   </package>

   <package id="GtkPrintContext">
     <parameter name="self" ada="Context"/>
   </package>

   <package id="PangoFontMetrics">
   </package>

   <package id="PangoFontset">
     <doc>an object containing a set of pango.Font objects</doc>
   </package>

   <package id="PangoLanguage">
     <enum ctype="PangoScript"/>
     <extra>
       <type ctype="Pango_Script_Array" ada="Pango_Script_Array">
         type Pango_Script_Array is array (Natural range &lt;&gt;) of Pango_Script;
       </type>
     </extra>

     <method id="pango_language_get_scripts" return="Pango_Script_Array">
       <parameter name="num_scripts" ada=""/>
       <body>
      type script_array_bounded is array (Natural) of Pango_Script;
      type script_array_access is access script_array_bounded;

      function Internal
         (Self     : System.Address;
          Size     : access Gint) return script_array_access;
      pragma Import (C, Internal, "pango_language_get_scripts");

      Scripts : script_array_access;
      Size : aliased Gint;
   begin
      Scripts := Internal (Self.Get_Object, Size'Access);

      declare
         Result : Pango_Script_Array (1 .. Integer (Size));
      begin
         for R in 0 .. Integer (Size) - 1 loop
             Result (R + 1) := Scripts (R);
         end loop;
         return Result;
      end;
       </body>
     </method>
   </package>

   <package id="PangoFontMap">
     <doc>An object that represents the set of fonts available for a particular
     rendering system</doc>

     <extra>
       <with_spec pkg="Pango.Font_Family"/>
     </extra>

     <method id="pango_font_map_list_families" return="Pango_Font_Family_Array">
       <parameter name="families" ada=""/>
       <parameter name="n_families" ada=""/>
       <body>
      type font_family_array_bounded is array (Natural) of System.Address;

      procedure Internal
         (Self     : System.Address;
          Families : System.Address;
          Size     : access Gint);
      pragma Import (C, Internal, "pango_font_map_list_families");

      procedure g_free (s : access font_family_array_bounded);
      pragma Import (C, g_free, "g_free");

      Families : aliased access font_family_array_bounded;
      Size : aliased Gint;
      Tmplt : Pango_Font_Family_Record;
   begin
      Internal (Self.Get_Object, Families'Address, Size'Access);

      declare
         Result : Pango_Font_Family_Array (1 .. Integer (Size));
      begin
         for R in 0 .. Integer (Size) - 1 loop
             Result (R + 1) := Pango_Font_Family
                (Get_User_Data (Families (R), Tmplt));
         end loop;
         g_free (Families);

         return Result;
      end;
       </body>
     </method>
   </package>

   <package id="PangoFontFamily">
     <extra>
       <with_spec pkg="Pango.Font_Face"/>

       <!--  Needed for PangoFontMap -->
       <type ctype="Pango_Font_Family_Array" ada="Pango_Font_Family_Array">
         type Pango_Font_Family_Array is array (Natural range &lt;&gt;) of Pango_Font_Family;
       </type>
     </extra>
     <method id="pango_font_family_list_faces" return="Pango_Font_Face_Array">
       <parameter name="faces" ada=""/>
       <parameter name="n_faces" ada=""/>
       <body>
      type font_face_array_bounded is array (Natural) of System.Address;

      procedure Internal
         (Self        : System.Address;
          Faces       : System.Address;
          Acc_N_Faces : access Gint);
      pragma Import (C, Internal, "pango_font_family_list_faces");

      procedure g_free (s : access font_face_array_bounded);
      pragma Import (C, g_free, "g_free");

      Faces : aliased access font_face_array_bounded;
      Size : aliased Gint;
      Tmplt : Pango_Font_Face_Record;
   begin
      Internal (Self.Get_Object, Faces'Address, Size'Access);

      declare
         Result : Pango_Font_Face_Array (1 .. Integer (Size));
      begin
         for R in 0 .. Integer (Size) - 1 loop
             Result (R + 1) := Pango_Font_Face
                (Get_User_Data (Faces (R), Tmplt));
         end loop;
         g_free (Faces);

         return Result;
      end;
       </body>
     </method>
   </package>

   <package id="PangoFontFace">
     <extra>
       <!--  Needed for PangoFontFamily -->
       <type ctype="Pango_Font_Face_Array" ada="Pango_Font_Face_Array">
         type Pango_Font_Face_Array is array (Natural range &lt;&gt;) of Pango_Font_Face;
       </type>
     </extra>
     <method id="pango_font_face_list_sizes" return="gint**">
       <parameter name="sizes" ada=""/>
       <parameter name="n_sizes" ada=""/>
       <body>
      type gint_array_bounded is array (Natural) of Gint;

      procedure Internal
         (Self        : System.Address;
          Sizes       : System.Address;
          Acc_N_Sizes : access Gint);
      pragma Import (C, Internal, "pango_font_face_list_sizes");

      procedure g_free (s : access gint_array_bounded);
      pragma Import (C, g_free, "g_free");

      Sizes : aliased access gint_array_bounded;
      Size : aliased Gint;
   begin
      Internal (Self.Get_Object, Sizes'Address, Size'Access);

      declare
         Result : Gint_Array (1 .. Integer (Size));
      begin
         for R in 0 .. Integer (Size) - 1 loop
             Result (R + 1) := Sizes (R);
         end loop;
         g_free (Sizes);

         return Result;
      end;
       </body>
     </method>
   </package>

   <package id="PangoLayout">
     <parameter name="self" ada="Layout"/>
     <enum ctype="PangoEllipsizeMode" prefix="PANGO_"/>
     <method id="pango_layout_xy_to_index" return_as_param="Exact">
       <parameter name="index" ada="Byte_Index" direction="out"/>
       <parameter name="trailing" direction="out"/>
     </method>

     <!-- Do not bind these, since they require a list of Pango_Layout_Line,
     which is incorrectly bound (error in From_Object) -->
     <method id="pango_layout_get_lines" return="PangoLayoutLineSList" bind="false"/>
     <method id="pango_layout_get_lines_readonly" bind="false"
             return="PangoLayoutLineSList"/>

     <method id="pango_layout_get_log_attrs" bind="false"/> <!--  what is a pango_log -->
     <method id="pango_layout_get_log_attrs_readonly" bind="false"/> <!--  what
     is a pango_log -->

     <method id="pango_layout_get_iter" classwide="true"/>

     <method id="pango_layout_set_attributes">
       <parameter name="attrs" direction="in" ctype="PangoAttrList"/>
     </method>

     <method id="pango_layout_set_text">
       <parameter name="length" default="-1" ada=""/>
     </method>
     <method id="pango_layout_set_markup">
       <parameter name="length" default="-1" ada=""/>
     </method>
     <extra>
       <with_spec pkg="Gtkada.Types" />
       <spec>
   function Get_Text (Layout : access Pango_Layout_Record)
      return Gtkada.Types.Chars_Ptr;
   --  Same a Get_Text, but return directly the C string, which is more
   --  efficient. The returned value should not be freed or modified.
       </spec>
       <body>
   function Get_Text (Layout : access Pango_Layout_Record)
      return Gtkada.Types.Chars_Ptr
   is
      function Internal (Layout : System.Address)
         return Interfaces.C.Strings.chars_ptr;
      pragma Import (C, Internal, "pango_layout_get_text");
   begin
      return Internal (Get_Object (Layout));
   end Get_Text;
       </body>
     </extra>
   </package>

   <package id="PangoLayoutLine" into="PangoLayout">
     <record ctype="PangoLayoutLine" private="true"/>

     <method id="pango_layout_line_get_type" ada="Get_Type_Layout_Line" />

     <method id="pango_layout_line_get_extents" bind="false"/> <!--  forces bad pragma import on pango_layout_get_extents -->
     <method id="pango_layout_line_get_pixel_extents" bind="false"/>
     <method id="pango_layout_line_ref" bind="false"/> <!--  Not needed in Ada -->
     <method id="pango_layout_line_unref" bind="false"/> <!--  Not needed in Ada -->

     <!--  Do not bind these for now, there is an error in the generator that
     tries to use Get_Object on a PangoLayoutLine because it doesn't know
     private records are implemented as C_Proxy -->
     <method id="pango_layout_line_get_x_ranges" bind="false"/>
     <method id="pango_layout_line_index_to_x" bind="false"/>
     <method id="pango_layout_line_x_to_index" bind="false"/>

   </package>

   <package id="PangoLayoutIter" into="PangoLayout">
     <method id="pango_layout_iter_get_type" ada="Get_Type_Layout_Iter" />

     <method id="pango_layout_iter_get_run" bind="false"/> <!--  what is a pango_run -->
     <method id="pango_layout_iter_get_run_readonly" bind="false"/> <!--  what is a pango_run -->
   </package>

   <package id="GtkPrintOperation">
     <enum ctype="GtkPrintStatus" prefix="GTK_PRINT_"/>
     <enum ctype="GtkPrintOperationResult" prefix="GTK_PRINT_OPERATION_"/>
     <enum ctype="GtkPrintOperationAction" prefix="GTK_PRINT_OPERATION_"/>
     <enum ctype="GtkPrintError" prefix="GTK_PRINT_"/>
   </package>

   <package id="GtkPrintOperationPreview">
     <parameter name="self" ada="Preview"/>
   </package>

   <package id="GtkAccelLabel">
     <parameter name="self" ada="Accel_Label"/>
   </package>

   <package id="GtkAccelMap">
     <method id="gtk_accel_map_load_scanner" bind="False"/> <!-- no binding for GScanner -->
     <method id="gtk_accel_map_add_entry">
       <parameter name="accel_key" ctype="GdkKeyType"/>
     </method>
     <method id="gtk_accel_map_change_entry">
       <parameter name="accel_key" ctype="GdkKeyType"/>
     </method>
     <method id="gtk_accel_map_lookup_entry" return_as_param="Found"/>
   </package>

   <package id="GtkActionGroup">
     <parameter name="self" ada="Action_Group"/>

     <list ada="Action_List" ctype="GtkAction"/>

     <method id="gtk_action_group_list_actions" return="GtkActionList"/>
     <method id="gtk_action_group_add_radio_actions" bind="False"/> <!-- see below -->
     <method id="gtk_action_group_add_radio_actions_full" bind="False"/> <!-- see below -->
     <method id="gtk_action_group_add_actions" bind="False"/> <!-- see below -->
     <method id="gtk_action_group_add_actions_full" bind="False"/> <!-- see below -->
     <method id="gtk_action_group_add_toggle_actions" bind="False"/> <!-- see below -->
     <method id="gtk_action_group_add_toggle_actions_full" bind="False"/> <!-- see below -->

     <extra>
       <with_spec pkg="Interfaces.C.Strings"/>
       <spec>
   type Action_Callback is access procedure
     (Action : System.Address; User_Data : System.Address);
   pragma Convention (C, Action_Callback);
   --  Profile of callbacks when an action is activated. You must convert
   --  Action to a Gtk_Action through:
   --      Act : constant Gtk_Action := Convert (Action);

   type Action_Entry is record
      Name         : Interfaces.C.Strings.chars_ptr;
      Stock_Id     : Interfaces.C.Strings.chars_ptr;
      Label        : Interfaces.C.Strings.chars_ptr;
      Accelerator  : Interfaces.C.Strings.chars_ptr;
      Tooltip      : Interfaces.C.Strings.chars_ptr;
      Callback     : Action_Callback;
   end record;
   pragma Convention (C, Action_Entry);

   type Radio_Action_Entry is record
      Name         : Interfaces.C.Strings.chars_ptr;
      Stock_Id     : Interfaces.C.Strings.chars_ptr;
      Label        : Interfaces.C.Strings.chars_ptr;
      Accelerator  : Interfaces.C.Strings.chars_ptr;
      Tooltip      : Interfaces.C.Strings.chars_ptr;
      Value        : Glib.Gint;
   end record;
   pragma Convention (C, Radio_Action_Entry);

   type Toggle_Action_Entry is record
      Name         : Interfaces.C.Strings.chars_ptr;
      Stock_Id     : Interfaces.C.Strings.chars_ptr;
      Label        : Interfaces.C.Strings.chars_ptr;
      Accelerator  : Interfaces.C.Strings.chars_ptr;
      Tooltip      : Interfaces.C.Strings.chars_ptr;
      Callback     : Action_Callback;
      Is_Active    : Glib.Gboolean;
   end record;
   pragma Convention (C, Toggle_Action_Entry);
   --  An opaque structure describing an action entry

   type Action_Entry_Array is array (Natural range &lt;&gt;) of Action_Entry;
   type Radio_Action_Entry_Array
     is array (Natural range &lt;&gt;) of Radio_Action_Entry;
   type Toggle_Action_Entry_Array
     is array (Natural range &lt;&gt;) of Toggle_Action_Entry;

   type Radio_Action_Callback is access procedure
     (Group     : access Gtk.Action.Gtk_Action_Record'Class;
      Current   : access Gtk.Action.Gtk_Action_Record'Class;
      User_Data : System.Address);
   --   Called when an element of the Gtk_Radio_Action group is selected

   function Create
     (Name        : String;
      Label       : String := "";
      Stock_Id    : String := "";
      Accelerator : String := "";
      Tooltip     : String := "";
      Callback    : Action_Callback := null) return Action_Entry;
   --  Create a new Action_Entry. The returned value must be freed by the
   --  caller.

   function Create
     (Name        : String;
      Label       : String := "";
      Stock_Id    : String := "";
      Accelerator : String := "";
      Tooltip     : String := "";
      Callback    : Action_Callback := null;
      Is_Active   : Boolean := True) return Toggle_Action_Entry;
   --  Create a new Action_Entry. The returned value must be freed by the
   --  caller. Is_Active is the initial state of the button.

   function Create
     (Name        : String;
      Label       : String;
      Stock_Id    : String := "";
      Accelerator : String := "";
      Tooltip     : String := "";
      Value       : Glib.Gint) return Radio_Action_Entry;
   --  Create a new Radio_Action_Entry. Value is the value set on the radio
   --  action (see Gtk.Radio_Action.Get_Current_Value)

   procedure Free (Action  : in out Action_Entry);
   procedure Free (Actions : in out Action_Entry_Array);
   procedure Free (Action  : in out Radio_Action_Entry);
   procedure Free (Actions : in out Radio_Action_Entry_Array);
   procedure Free (Action  : in out Toggle_Action_Entry);
   procedure Free (Actions : in out Toggle_Action_Entry_Array);
   --  Free Action and Actions

   procedure Add_Actions
     (Action_Group : access Gtk_Action_Group_Record;
      Entries      : Action_Entry_Array;
      User_Data    : System.Address := System.Null_Address;
      Destroy      : Glib.G_Destroy_Notify_Address := null);
   --  This is a convenience function to create a number of actions and add
   --  them to the action group.
   --  Destroy is called when User_Data is no longer needed.
   --
   --  The "activate" signals of the actions are connected to the callbacks in
   --  Entries, and their accel paths are set to
   --  &lt;Actions&gt;/group-name/action-name.

   procedure Add_Radio_Actions
     (Action_Group : access Gtk_Action_Group_Record;
      Entries      : Radio_Action_Entry_Array;
      Value        : Glib.Gint;
      On_Change    : Radio_Action_Callback;
      User_Data    : System.Address := System.Null_Address;
      Destroy      : Glib.G_Destroy_Notify_Address := null);
   --  This is a convenience routine to create a group of radio actions and
   --  add them to the action group.
   --
   --  The "changed" signal of the first radio action is connected to the
   --  On_Change callback and the accel paths of the actions are set to
   --    &lt;Actions&gt;/group-name/action-name
   --
   --  Value is the value of the action to activate initially, or -1 if no
   --  action should be activated.
   --  Destroy is called when User_Data is no longer necessary.

   procedure Add_Toggle_Actions
     (Action_Group : access Gtk_Action_Group_Record;
      Entries      : Toggle_Action_Entry_Array;
      User_Data    : System.Address := System.Null_Address;
      Destroy      : Glib.G_Destroy_Notify_Address := null);
   --  This is a convenience function to create a number of toggle actions and
   --  add them to the action group.
   --  The "activate" signals of the actions are connected to the callbacks and
   --  their accel paths are set to &lt;Actions&gt;/group-name/action-name.
   --  Destroy is called when User_Data is no longer necessary.
       </spec>
       <with_body pkg="Ada.Unchecked_Deallocation" use="False" />
       <body>
   procedure Local_Radio_Action_Callback
     (Group, Current, User_Data : System.Address);
   pragma Convention (C, Local_Radio_Action_Callback);
   --  Local proxy for Radio_Action_Callback

   procedure Local_Radio_Action_Destroy
     (Data : in out System.Address);
   pragma Convention (C, Local_Radio_Action_Destroy);
   --  Local proxy for the Destroy notify for Radio_Action

   type Local_Radio_Action_User_Data is record
      Callback  : Radio_Action_Callback;
      User_Data : System.Address;
      Destroy   : G_Destroy_Notify_Address;
   end record;
   type Local_Radio_Action_User_Data_Access is
     access Local_Radio_Action_User_Data;

   function Convert is new Ada.Unchecked_Conversion
     (System.Address, Local_Radio_Action_User_Data_Access);
   function Convert is new Ada.Unchecked_Conversion
     (Local_Radio_Action_User_Data_Access, System.Address);
   procedure Unchecked_Free is new Ada.Unchecked_Deallocation
     (Local_Radio_Action_User_Data, Local_Radio_Action_User_Data_Access);

   procedure Local_Radio_Action_Callback
     (Group, Current, User_Data : System.Address)
   is
      Data : constant Local_Radio_Action_User_Data_Access :=
        Convert (User_Data);
      Stub : Gtk_Action_Record;
      G : constant Gtk_Action := Gtk_Action (Get_User_Data (Group, Stub));
      C : constant Gtk_Action := Gtk_Action (Get_User_Data (Current, Stub));
   begin
      Data.Callback (G, C, Data.User_Data);
   end Local_Radio_Action_Callback;

   procedure Local_Radio_Action_Destroy
     (Data : in out System.Address)
   is
      D : Local_Radio_Action_User_Data_Access := Convert (Data);
   begin
      D.Destroy (D.User_Data);
      Unchecked_Free (D);
   end Local_Radio_Action_Destroy;

   function Create
     (Name        : String;
      Label       : String := "";
      Stock_Id    : String := "";
      Accelerator : String := "";
      Tooltip     : String := "";
      Callback    : Action_Callback := null) return Action_Entry is
   begin
      return (Name        => String_Or_Null (Name),
              Label       => String_Or_Null (Label),
              Stock_Id    => String_Or_Null (Stock_Id),
              Accelerator => String_Or_Null (Accelerator),
              Tooltip     => String_Or_Null (Tooltip),
              Callback    => Callback);
   end Create;

   function Create
     (Name        : String;
      Label       : String := "";
      Stock_Id    : String := "";
      Accelerator : String := "";
      Tooltip     : String := "";
      Callback    : Action_Callback := null;
      Is_Active   : Boolean := True) return Toggle_Action_Entry is
   begin
      return (Name        => String_Or_Null (Name),
              Label       => String_Or_Null (Label),
              Stock_Id    => String_Or_Null (Stock_Id),
              Accelerator => String_Or_Null (Accelerator),
              Tooltip     => String_Or_Null (Tooltip),
              Callback    => Callback,
              Is_Active   => Boolean'Pos (Is_Active));
   end Create;

   function Create
     (Name        : String;
      Label       : String;
      Stock_Id    : String := "";
      Accelerator : String := "";
      Tooltip     : String := "";
      Value       : Glib.Gint) return Radio_Action_Entry is
   begin
      return (Name        => String_Or_Null (Name),
              Label       => String_Or_Null (Label),
              Stock_Id    => String_Or_Null (Stock_Id),
              Accelerator => String_Or_Null (Accelerator),
              Tooltip     => String_Or_Null (Tooltip),
              Value       => Value);
   end Create;

   procedure Free (Action  : in out Action_Entry) is
   begin
      Free (Action.Name);
      Free (Action.Label);
      Free (Action.Stock_Id);
      Free (Action.Accelerator);
      Free (Action.Tooltip);
   end Free;

   procedure Free (Actions : in out Action_Entry_Array) is
   begin
      for A in Actions'Range loop
         Free (Actions (A));
      end loop;
   end Free;

   procedure Free (Action  : in out Radio_Action_Entry) is
   begin
      Free (Action.Name);
      Free (Action.Label);
      Free (Action.Stock_Id);
      Free (Action.Accelerator);
      Free (Action.Tooltip);
   end Free;

   procedure Free (Actions : in out Radio_Action_Entry_Array) is
   begin
      for A in Actions'Range loop
         Free (Actions (A));
      end loop;
   end Free;

   procedure Free (Action  : in out Toggle_Action_Entry) is
   begin
      Free (Action.Name);
      Free (Action.Label);
      Free (Action.Stock_Id);
      Free (Action.Accelerator);
      Free (Action.Tooltip);
   end Free;

   procedure Free (Actions : in out Toggle_Action_Entry_Array) is
   begin
      for A in Actions'Range loop
         Free (Actions (A));
      end loop;
   end Free;

   procedure Add_Actions
     (Action_Group : access Gtk_Action_Group_Record;
      Entries      : Action_Entry_Array;
      User_Data    : System.Address := System.Null_Address;
      Destroy      : Glib.G_Destroy_Notify_Address := null)
   is
      procedure Internal
        (Action_Group : System.Address;
         Entries      : System.Address;
         N_Entries    : Guint;
         User_Data    : System.Address;
         Destroy      : G_Destroy_Notify_Address);
      pragma Import (C, Internal, "gtk_action_group_add_actions_full");
   begin
      Internal (Get_Object (Action_Group),
                Entries (Entries'First)'Address,
                Entries'Length,
                User_Data, Destroy);
   end Add_Actions;

   procedure Add_Radio_Actions
     (Action_Group : access Gtk_Action_Group_Record;
      Entries      : Radio_Action_Entry_Array;
      Value        : Glib.Gint;
      On_Change    : Radio_Action_Callback;
      User_Data    : System.Address := System.Null_Address;
      Destroy      : Glib.G_Destroy_Notify_Address := null)
   is
      procedure Internal
        (Action_Group : System.Address;
         Entries      : System.Address;
         N_Entries    : Guint;
         Value        : Gint;
         On_Change    : System.Address;
         User_Data    : System.Address;
         Destroy      : System.Address);
      pragma Import (C, Internal, "gtk_action_group_add_radio_actions_full");
      Data : constant Local_Radio_Action_User_Data_Access :=
        new Local_Radio_Action_User_Data'
          (Callback  => On_Change,
           User_Data => User_Data,
           Destroy   => Destroy);
   begin
      Internal (Get_Object (Action_Group),
                Entries (Entries'First)'Address, Entries'Length,
                Value,
                Local_Radio_Action_Callback'Address,
                Convert (Data),
                Local_Radio_Action_Destroy'Address);
   end Add_Radio_Actions;

   procedure Add_Toggle_Actions
     (Action_Group : access Gtk_Action_Group_Record;
      Entries      : Toggle_Action_Entry_Array;
      User_Data    : System.Address := System.Null_Address;
      Destroy      : G_Destroy_Notify_Address := null)
   is
      procedure Internal
        (Action_Group : System.Address;
         Entries      : System.Address;
         N_Entries    : Guint;
         User_Data    : System.Address;
         Destroy      : G_Destroy_Notify_Address);
      pragma Import (C, Internal, "gtk_action_group_add_toggle_actions_full");
   begin
      Internal (Get_Object (Action_Group),
                Entries (Entries'First)'Address, Entries'Length, User_Data,
                Destroy);
   end Add_Toggle_Actions;
       </body>
     </extra>
   </package>

   <package id="GtkMessageDialog">
     <parameter name="self" ada="Dialog"/>
     <enum ctype="GtkMessageType" prefix="GTK_"/>
     <enum ctype="GtkButtonsType" prefix="GTK_"/>
     <method id="gtk_message_dialog_new">
       <parameter name="message_format" ada="message" default='""'/>
       <parameter name="varargs" ada="" ctype="gpointer" default="System.Null_Address"/>   <!--  remove varargs argument -->
     </method>
     <method id="gtk_message_dialog_new_with_markup">
       <parameter name="message_format" ada="message" default='""'/>
       <parameter name="varargs" ada="" ctype="gpointer" default="System.Null_Address"/>   <!--  remove varargs argument -->
     </method>
     <method id="gtk_message_dialog_format_secondary_markup">
       <parameter name="message_format" ada="message" default='""'/>
       <parameter name="varargs" ada="" ctype="gpointer" default="System.Null_Address"/>   <!--  remove varargs argument -->
     </method>
   </package>

   <package id="GtkPrintSettings">
     <method id="gtk_print_settings_set_page_ranges">
       <parameter name="page_ranges" type="Gtk_Page_Range_Array"/>
       <parameter name="num_ranges" ada="" default="-1" />
       <body>
      procedure Internal
        (Settings    : System.Address;
         Page_Ranges : System.Address;
         Num_Ranges  : Gint);
      pragma Import (C, Internal, "gtk_print_settings_set_page_ranges");
   begin
      Internal
        (Get_Object (Self),
         Page_Ranges (Page_Ranges'First)'Address,
         Page_Ranges'Length);
       </body>
     </method>
     <method id="gtk_print_settings_get_page_ranges" return="Gtk_Page_Range_Array">
       <parameter name="num_ranges" ada="" default="-1" />
       <body>
      type Internal_Page_Range_Array is
        array (Natural) of Gtk_Page_Range_Record;
      pragma Convention (C, Internal_Page_Range_Array);

      type Internal_Page_Range_Array_Access is
        access Internal_Page_Range_Array;
      pragma Convention (C, Internal_Page_Range_Array_Access);

      procedure Free (Item : in out Internal_Page_Range_Array_Access);
      pragma Import (C, Free, "g_free");

      function Internal
        (Settings   : System.Address;
         Num_Ranges : access Gint)
         return Internal_Page_Range_Array_Access;
      pragma Import (C, Internal, "gtk_print_settings_get_page_ranges");

      Len    : aliased Gint;
      Result : Internal_Page_Range_Array_Access;
   begin
      Result := Internal (Get_Object (Self), Len'Access);
      declare
         Ranges : constant Gtk_Page_Range_Array :=
           Gtk_Page_Range_Array (Result (0 .. Natural (Len)));
      begin
         Free (Result);
         return Ranges;
      end;
       </body>
     </method>
     <extra>
       <type ctype="GtkPageRange" ada="Gtk_Page_Range_Record">
   type Gtk_Page_Range_Record is record
      Range_Start : Gint;
      Range_End   : Gint;
   end record;
   pragma Convention (C, Gtk_Page_Range_Record);
   type Gtk_Page_Range_Array is array (Integer range &lt;&gt;) of Gtk_Page_Range_Record;
   pragma Convention (C, Gtk_Page_Range_Array);
   --  Page range specification(s).
       </type>
     </extra>
   </package>

   <package id="GtkBuilder">
     <parameter name="self" ada="Builder"/>
     <parameter name="error" direction="out" />
     <method id="gtk_builder_add_from_string">
       <parameter name="length" default="-1" ada=""/>
     </method>
     <method id="gtk_builder_get_objects" return="ObjectSList" />
     <method id="gtk_builder_value_from_string" return_as_param="Success" />
   </package>

   <package id="GtkUIManager">
     <enum ctype="GtkUIManagerItemType" prefix="GTK_UI_"
           ada="Manager_Item_Type"/>
     <method id="gtk_ui_manager_add_ui" ada="Add_UI">
       <parameter name="type" default="Manager_Auto"/>
       <parameter name="top" default="False"/>
     </method>
     <method id="gtk_ui_manager_remove_ui" ada="Remove_UI"/>
     <method id="gtk_ui_manager_add_ui_from_file" ada="Add_UI_From_File">
       <parameter name="error" direction="out"/>
     </method>
     <method id="gtk_ui_manager_add_ui_from_resource" ada="Add_UI_From_Resource">
       <parameter name="error" direction="out"/>
     </method>
     <method id="gtk_ui_manager_add_ui_from_string" ada="Add_UI_From_String">
       <parameter name="error" direction="out"/>
       <parameter name="length" ada="" default="-1"/>
     </method>
     <method id="gtk_ui_manager_get_action_groups" return="ObjectList"/>
     <method id="gtk_ui_manager_get_toplevels" return="WidgetSList"/>
   </package>

   <package id="GtkIconSet">
     <doc>
   An icon set represents a single icon in various sizes and widget states.
   It can provide a Gdk_Pixbuf for a given size and state on request, and
   automatically caches some of the rendered Gdk_Pixbuf objects.

   Normally you would use Gtk.Widget.Render_Icon instead of using icon sets
   directly. The one case where you'd use an icon set is to create
   application-specific icon sets to place in an icon factory.
     </doc>

     <extra>
       <spec>
   function Lookup_Icon_Set
      (Style    : access Gtk.Style_Context.Gtk_Style_Context_Record'Class;
       Stock_Id : String)
      return Gtk_Icon_Set;
   --  Retrieve an icon set by its name. The icon might exist in various sizes,
   --  that can be manipulated through the result set
       </spec>
       <body>
   function Lookup_Icon_Set
      (Style    : access Gtk.Style_Context.Gtk_Style_Context_Record'Class;
       Stock_Id : String)
      return Gtk_Icon_Set
   is
      function Internal
        (Style    : System.Address;
         Stock_Id : String)
         return System.Address;
      pragma Import (C, Internal, "gtk_style_context_lookup_icon_set");
   begin
      return From_Object (Internal (Get_Object (Style), Stock_Id &amp; ASCII.NUL));
   end Lookup_Icon_Set;
       </body>
     </extra>

     <method id="gtk_icon_set_get_sizes" return="Gint_Array">
       <parameter name="n_sizes" ada=""/>
       <parameter name="sizes" ada=""/>
       <body>
      type gint_array_bounded is array (Natural) of Gint;

      procedure Internal
         (Self        : System.Address;
          Sizes       : System.Address;
          Acc_N_Sizes : access Gint);
      pragma Import (C, Internal, "gtk_icon_set_get_sizes");

      procedure g_free (s : access gint_array_bounded);
      pragma Import (C, g_free, "g_free");

      Sizes : aliased access gint_array_bounded;
      Size : aliased Gint;
   begin
      Internal (Self.Get_Object, Sizes'Address, Size'Access);

      declare
         Result : Gint_Array (1 .. Integer (Size));
      begin
         for R in 0 .. Integer (Size) - 1 loop
             Result (R + 1) := Sizes (R);
         end loop;
         g_free (Sizes);

         return Result;
      end;
       </body>
     </method>
   </package>

   <package id="GtkIconSource">
     <doc>
An icon source contains a Gdk_Pixbuf (or image filename) that serves as
the base image for one or more of the icons in an icon set, along with a
specification for which icons in the icon set will be based on that
pixbuf or image file. An icon set contains a set of icons that represent
"the same" logical concept in different states, different global text
directions, and different sizes.

So for example a web browser's "Back to Previous Page" icon might point
in a different direction in Hebrew and in English; it might look
different when insensitive; and it might change size depending on
toolbar mode (small/large icons). So a single icon set would contain all
those variants of the icon. An icon set contains a list of icon sources
from which it can derive specific icon variants in the set.

In the simplest case, an icon set contains one source pixbuf from which
it derives all variants.

If you want to use a different base pixbuf for different icon variants,
you create multiple icon sources, mark which variants they'll be used to
create, and add them to the icon set with Add_Source (see below).

By default, the icon source has all parameters wildcarded. That is, the
icon source will be used as the base icon for any desired text
direction, widget state, or icon size.
     </doc>
   </package>

   <package id="GtkIconFactory">

     <function id="gtk_icon_size_lookup" return_as_param="Result" />
     <function id="gtk_icon_size_lookup_for_settings" return_as_param="Result" />
     <function id="gtk_icon_size_register" />
     <function id="gtk_icon_size_register_alias" />

     <extra>
       <with_spec pkg="Gtk.Style_Provider"/>
       <with_spec pkg="Gtk.Widget"/>
       <spec>
   function Get_Icon_Factory
      (Self : Gtk.Style_Provider.Gtk_Style_Provider;
       Path : Gtk.Widget.Gtk_Widget_Path)
       return Gtk_Icon_Factory;
   --  Returns the Gtk.Icon_Factory.Gtk_Icon_Factory defined to be in use for
   --  Path, or null if none is defined.
   --  Since: gtk+ 3.0
       </spec>
       <body>
   function Get_Icon_Factory
      (Self : Gtk_Style_Provider;
       Path : Gtk.Widget.Gtk_Widget_Path)
       return Gtk.Icon_Factory.Gtk_Icon_Factory
   is
      function Internal
         (Self : Gtk_Style_Provider;
          Path : Gtk.Widget.Gtk_Widget_Path) return System.Address;
      pragma Import (C, Internal, "gtk_style_provider_get_icon_factory");
      Stub_Gtk_Icon_Factory : Gtk.Icon_Factory.Gtk_Icon_Factory_Record;
   begin
      return Gtk.Icon_Factory.Gtk_Icon_Factory (Get_User_Data (Internal (Self, Path), Stub_Gtk_Icon_Factory));
   end Get_Icon_Factory;
       </body>
     </extra>
   </package>

   <package id="GtkIconTheme">
     <parameter name="self" ada="Icon_Theme" />
     <enum ctype="GtkIconLookupFlags" prefix="GTK_"/>
     <method id="gtk_icon_theme_lookup_by_gicon" classwide="true" />
     <method id="gtk_icon_theme_lookup_icon" classwide="true" />
     <method id="gtk_icon_theme_choose_icon" classwide="true" />
     <method id="gtk_icon_theme_set_search_path">
       <parameter name="n_elements" ada="" default="Path'Length"/>
     </method>
     <method id="gtk_icon_theme_get_search_path" return="GNAT.Strings.String_List">
       <parameter name="path" ada=""/>
       <parameter name="n_elements" ada=""/>
       <body>
      procedure Internal
        (Icon_Theme : System.Address;
         Path       : out chars_ptr_array_access;
         N_Elements : out Gint);
      pragma Import (C, Internal, "gtk_icon_theme_get_search_path");

      P : chars_ptr_array_access;
      N : Gint;
   begin
      Internal (Get_Object (Icon_Theme), P, N);
      declare
         Result : constant GNAT.Strings.String_List :=
           To_String_List (P.all, N);
      begin
         Free (P.all);
         return Result;
      end;
       </body>
     </method>
     <method id="gtk_icon_theme_get_icon_sizes">
       <body>
      use Gint_Arrays;
      function Internal
        (Icon_Theme : System.Address;
         Icon_Name  : String) return Unbounded_Array_Access;
      pragma Import (C, Internal, "gtk_icon_theme_get_icon_sizes");

      Res    : constant Unbounded_Array_Access := Internal
        (Get_Object (Icon_Theme), Icon_Name &amp; ASCII.NUL);
      Result : constant Gint_Array := To_Gint_Array_Zero_Terminated (Res);
   begin
      G_Free (Res);
      return Result;
       </body>
     </method>
     <method id="gtk_icon_theme_list_icons" return="StringList"/>
     <method id="gtk_icon_theme_list_contexts" return="StringList"/>
     <extra>
       <with_body pkg="Gtkada.Bindings"/>
     </extra>
   </package>

   <package id="GtkIconInfo" into="GtkIconTheme">
     <parameter name="self" ada="Icon_Info" />
     <method id="gtk_icon_info_get_type" ada="Icon_Info_Get_Type"/>
     <method id="gtk_icon_info_load_icon_async" bind="False"/> <!-- requires GAsync -->
     <method id="gtk_icon_info_load_symbolic_async" bind="False"/> <!-- requires GAsync -->
     <method id="gtk_icon_info_load_icon_finish" bind="False"/> <!-- requires GAsync -->
     <method id="gtk_icon_info_load_symbolic_finish" bind="False"/> <!-- requires GAsync -->
     <method id="gtk_icon_info_load_symbolic_for_context_async" bind="False"/> <!-- requires GAsync -->
     <method id="gtk_icon_info_load_symbolic_for_context_finish" bind="False"/> <!-- requires GAsync -->
     <method id="gtk_icon_info_get_embedded_rect" return_as_param="Has_Embedded_Rectangle"/>
     <method id="gtk_icon_info_get_attach_points" return="Gdk.Types.Gdk_Points_Array">
       <parameter name="n_points" ada=""/>
       <parameter name="points" ada=""/>
       <body>
      use Points_Arrays;
      function Internal
        (Icon_Info : System.Address;
         Result    : access Unbounded_Array_Access;
         N_Points  : access Gint) return Gboolean;
      pragma Import (C, Internal, "gtk_icon_info_get_attach_points");

      R : aliased Unbounded_Array_Access;
      N : aliased Gint;
   begin
      if Internal (Icon_Info.Get_Object, R'Unchecked_Access,
                   N'Unchecked_Access) = 0
      then
         R := null;
      end if;

      declare
         Result : constant Gdk_Points_Array := To_Array (R, Integer (N));
      begin
         G_Free (R);
         return Result;
      end;
       </body>
     </method>
     <extra>
       <with_body pkg="Gtkada.C"/>
       <body>
   package Points_Arrays is new Gtkada.C.Unbounded_Arrays
     (Gdk.Types.Gdk_Point, (0, 0), Positive, Gdk.Types.Gdk_Points_Array);
       </body>
     </extra>
   </package>

   <package id="GtkSettings">
     <method id="gtk_settings_install_property_parser" bind="False"/> <!-- not needed in Ada -->
     <method id="gtk_settings_set_property_value" bind="False"/> <!-- see below -->
     <extra>
       <spec>
   procedure Set_Property_Value
     (Settings : not null access Gtk_Settings_Record;
      Name     : String;
      Value    : GValue;
      Origin   : String);
       </spec>
       <body>
   procedure Set_Property_Value
     (Settings : not null access Gtk_Settings_Record;
      Name     : String;
      Value    : GValue;
      Origin   : String)
   is
      type Property_Value is record
         Origin : Interfaces.C.Strings.chars_ptr;
         Value  : GValue;
      end record;
      pragma Convention (C, Property_Value);

      procedure Internal
        (Settings : System.Address;
         Name     : String;
         Svalue   : System.Address);
      pragma Import (C, Internal, "gtk_settings_set_property_value");

      Val : aliased Property_Value :=
        (Origin => New_String (Origin),
         Value  => Value);
   begin
      Internal (Get_Object (Settings), Name &amp; ASCII.NUL, Val'Address);
      Free (Val.Origin);
   end Set_Property_Value;
       </body>
     </extra>
   </package>

   <package id="GtkBorder" into="GtkStyle">
     <record ctype="GtkBorder"/>
     <method id="gtk_border_copy" bind="False" />  <!-- not needed in Ada -->
     <method id="gtk_border_free" bind="False" />  <!-- not needed in Ada -->
     <method id="gtk_border_get_type" ada="Border_Get_Type"/>
   </package>

   <package id="GtkStockItem" ada="Gtk.Stock">
     <record ctype="GtkStockItem" private="True"/>
     <constant prefix_regexp="GTK_STOCK_.*" prefix="GTK_"/>
     <function id="gtk_stock_add" ada="Add">
       <parameter name="items" type="Gtk_Stock_Item_Array"/>
       <parameter name="n_items" ada="" default="Items'Length"/>
     </function>
     <function id="gtk_stock_add_static" ada="Add_Static">
       <parameter name="items" type="Gtk_Stock_Item_Array"/>
       <parameter name="n_items" ada="" default="Items'Length"/>
     </function>
     <function id="gtk_stock_lookup" ada="Lookup" return_as_param="Success"/>
     <method id="gtk_stock_item_free" bind="False" /> <!-- see below -->
     <extra>
       <type ada="Gtk_Stock_Item_Array" ctype="GtkStockItemArray">
   type Gtk_Stock_Item_Array is array (Natural range &lt;&gt;) of Gtk_Stock_Item;
       </type>
       <spec>
   procedure Gtk_New
     (Item               : out Gtk_Stock_Item;
      Stock_Id           : String;
      Label              : UTF8_String;
      Modifier           : Gdk.Types.Gdk_Modifier_Type;
      Keyval             : Gdk.Types.Gdk_Key_Type;
      Translation_Domain : String);
   --  Create a new stock item.

   procedure Free (Item : in out Gtk_Stock_Item);
   --  Free memory allocated in Item.

   procedure Add (Item : Gtk_Stock_Item);
   --  Register Item.
   --  If an item already exists with the same stock ID as one of the items,
   --  the old item gets replaced. The stock item is copied, so GtkAda does
   --  not hold any pointer into item and item can be freed. Use
   --  Add_Static if item is persistent and GtkAda need not copy the array.
       </spec>
       <with_body pkg="Interfaces.C.Strings" />
       <body>
   procedure Gtk_New
     (Item               : out Gtk_Stock_Item;
      Stock_Id           : String;
      Label              : UTF8_String;
      Modifier           : Gdk.Types.Gdk_Modifier_Type;
      Keyval             : Gdk.Types.Gdk_Key_Type;
      Translation_Domain : String) is
   begin
      Item.Stock_Id           := Interfaces.C.Strings.New_String (Stock_Id);
      Item.Label              := Interfaces.C.Strings.New_String (Label);
      Item.Modifier           := Modifier;
      Item.Keyval             := Guint (Keyval);
      Item.Translation_Domain := Interfaces.C.Strings.New_String (Translation_Domain);
   end Gtk_New;

   procedure Free (Item : in out Gtk_Stock_Item) is
   begin
      Interfaces.C.Strings.Free (Item.Stock_Id);
      Interfaces.C.Strings.Free (Item.Label);
      Interfaces.C.Strings.Free (Item.Translation_Domain);
   end Free;

   ---------
   -- Add --
   ---------

   procedure Add (Item : Gtk_Stock_Item) is
      procedure Internal (Item : Gtk_Stock_Item; N_Items : Guint := 1);
      pragma Import (C, Internal, "gtk_stock_add");

   begin
      Internal (Item);
   end Add;
       </body>
     </extra>
   </package>

   <package id="GtkTextIter">
     <parameter name="self" ada="Iter"/>
     <record ctype="GtkTextIter" private="True"/>
     <enum ctype="GtkTextSearchFlags" prefix="GTK_TEXT_SEARCH_"/>

     <method id="gtk_text_iter_get_buffer" bind="False"/> <!-- circular dependency -->
     <method id="gtk_text_iter_get_child_anchor" bind="False"/> <!-- circular dependency -->
     <method id="gtk_text_iter_copy" bind="False"/> <!-- manual binding below -->
     <method id="gtk_text_iter_get_marks" return="ObjectSList" />
     <method id="gtk_text_iter_get_tags" return="TextTagList" />
     <method id="gtk_text_iter_get_toggled_tags" return="TextTagList" />

     <method id="gtk_text_iter_forward_char" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_chars" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_char" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_chars" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_word_end" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_word_ends" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_visible_word_end" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_visible_word_ends" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_word_start" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_word_starts" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_visible_word_start" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_visible_word_starts" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_sentence_end" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_sentence_ends" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_sentence_start" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_sentence_starts" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>

     <method id="gtk_text_iter_set_offset">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_set_line">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_set_line_offset">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_set_line_index">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_set_visible_line_offset">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_set_visible_line_index">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>

     <method id="gtk_text_iter_forward_line" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_lines" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_visible_line" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_visible_lines" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_to_line_end" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>

     <method id="gtk_text_iter_backward_line" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_lines" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_visible_line" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_visible_lines" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>

     <method id="gtk_text_iter_forward_to_end">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>

     <method id="gtk_text_iter_forward_to_tag_toggle" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
       <parameter name="tag" default="null"/>
     </method>
     <method id="gtk_text_iter_backward_to_tag_toggle" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
       <parameter name="tag" default="null"/>
     </method>

     <method id="gtk_text_iter_forward_cursor_position" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_cursor_positions" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_cursor_position" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_cursor_positions" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_visible_cursor_position" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_forward_visible_cursor_positions" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_visible_cursor_position" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_visible_cursor_positions" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>

     <method id="gtk_text_iter_forward_search" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
       <parameter name="limit" default="Null_Text_Iter"/>
     </method>
     <method id="gtk_text_iter_backward_search" return_as_param="Result">
       <parameter name="self" ada="Iter" direction="inout"/>
       <parameter name="limit" default="Null_Text_Iter"/>
     </method>
     <method id="gtk_text_iter_forward_find_char" return_as_param="Result"
             bind="false"> <!--  Need func with callback and return_as_param -->
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <method id="gtk_text_iter_backward_find_char" return_as_param="Result"
             bind="false"> <!--  Need func with callback and return_as_param -->
       <parameter name="self" ada="Iter" direction="inout"/>
     </method>
     <extra>
        <with_spec pkg="Glib.Values"/>
        <with_spec pkg="Interfaces.C.Strings"/>
        <with_body pkg="Ada.Unchecked_Conversion" use="False"/>
        <with_body pkg="System.Address_To_Access_Conversions" use="False"/>
        <type>
   Null_Text_Iter : constant Gtk_Text_Iter;
        </type>
        <spec private="True">
   Null_Text_Iter : constant Gtk_Text_Iter :=
     (System.Null_Address, System.Null_Address, 0, 0, 0, 0, 0, 0,
      System.Null_Address, System.Null_Address, 0, 0, 0,
      System.Null_Address);
        </spec>
        <spec>
   procedure Copy (Source : Gtk_Text_Iter; Dest : out Gtk_Text_Iter);
   pragma Inline (Copy);
   --  Create a copy of Source.

   function Get_Char (Iter : Gtk_Text_Iter) return Character;
   --  Return the character immediately following Iter. If Iter is at the
   --  end of the buffer, then return ASCII.NUL.
   --  Note that this function assumes that the text is encoded in ASCII
   --  format. If this is not the case, use the Get_Char function that
   --  returns a Gunichar instead.

   function Iter_Or_Null (Iter : System.Address) return System.Address;
   --  Internal function for GtkAda

   -------------------------------
   -- Converting to/from GValue --
   -------------------------------

   procedure Set_Text_Iter
     (Val  : in out Glib.Values.GValue;
      Iter : Gtk_Text_Iter);
   pragma Import (C, Set_Text_Iter, "g_value_set_pointer");
   --  Set the value of the given GValue to Iter.
   --  Note that Iter is stored by reference, which means no copy of Iter
   --  is made. Iter should remain allocated as long as Val is being used.

   procedure Get_Text_Iter
     (Val  : Glib.Values.GValue;
      Iter : out Gtk_Text_Iter);
   --  Extract the iterator from the given GValue.
   --  Note that the iterator returned is a copy of the iterator referenced
   --  by the give GValue. Modifying the iterator returned does not modify
   --  the iterator referenced by the GValue.

   function Get_Slice
     (Start   : Gtk_Text_Iter;
      The_End : Gtk_Text_Iter) return Interfaces.C.Strings.chars_ptr;
   --  Same as Get_Slice above, but returns the raw C string.
   --  The caller is responsible for freeing the string returned.

        </spec>
        <body>

   type Gtk_Text_Iter_Access is access Gtk_Text_Iter;
   function Convert is new Ada.Unchecked_Conversion
     (System.Address, Gtk_Text_Iter_Access);
   use type System.Address;

   ------------------
   -- Iter_Or_Null --
   ------------------

   function Iter_Or_Null (Iter : System.Address) return System.Address is
   begin
      if Convert (Iter).all = Null_Text_Iter then--  null iter
         return System.Null_Address;
      else
         return Iter;
      end if;
   end Iter_Or_Null;

   ----------
   -- Copy --
   ----------

   procedure Copy (Source : Gtk_Text_Iter; Dest : out Gtk_Text_Iter) is
   begin
      Dest := Source;
   end Copy;

   --------------
   -- Get_Char --
   --------------

   function Get_Char (Iter : Gtk_Text_Iter) return Character is
      Result         : constant Gunichar := Get_Char (Iter);
      Eight_LSB_Mask : constant := 2#1111_1111#;

   begin
      --  This function relies on the Get_Char function provided by gtk+,
      --  which returns a gunichar value. Only the 8 least significant bits
      --  are then kept to deduce the associated character.

      return Character'Val (Result and Eight_LSB_Mask);
   end Get_Char;

   -------------------
   -- Get_Text_Iter --
   -------------------

   package Iter_Access_Address_Conversions is
     new System.Address_To_Access_Conversions (Gtk_Text_Iter);

   procedure Get_Text_Iter
     (Val  : Glib.Values.GValue;
      Iter : out Gtk_Text_Iter) is
   begin
      Copy
        (Source => Iter_Access_Address_Conversions.To_Pointer
                     (Glib.Values.Get_Address (Val)).all,
         Dest   => Iter);
   end Get_Text_Iter;

   ---------------
   -- Get_Slice --
   ---------------

   function Get_Slice
     (Start   : Gtk_Text_Iter;
      The_End : Gtk_Text_Iter) return Interfaces.C.Strings.chars_ptr
   is
      function Internal
        (Start   : Gtk_Text_Iter;
         The_End : Gtk_Text_Iter) return Interfaces.C.Strings.chars_ptr;
      pragma Import (C, Internal, "gtk_text_iter_get_slice");

   begin
      return Internal (Start, The_End);
   end Get_Slice;
        </body>
     </extra>
   </package>

   <package id="GIcon" ada="Glib.G_Icon">
     <virtual-method id='*' bind='False'/>
     <method id="g_icon_hash">
       <parameter name="icon" type="G_Icon"/>
     </method>
   </package>

   <package id="GtkToolPalette">
     <enum ctype="GtkDestDefaults"/>
     <enum ctype="GtkToolPaletteDragTargets"/>
     <method id="gtk_tool_palette_get_hadjustment" bind="False"/> <!-- obsolete, use interface-->
     <method id="gtk_tool_palette_get_vadjustment" bind="False"/> <!-- obsolete, use interface-->
   </package>

   <package id="PangoFont">
     <parameter name="self" ada="Font" />

     <method id="pango_font_get_type" ada="Font_Get_Type"/>
     <method id="pango_font_find_shaper" bind="False"/> <!--  internal implementation of gtk -->
     <method id="pango_font_describe" classwide="True"/>
     <method id="pango_font_describe_with_absolute_size" classwide="True"/>
     <method id="pango_font_descriptions_free" bind="False"/> <!-- in Ada, need iteration -->
     <method id="pango_font_get_coverage" bind="False"/> <!-- circular dependency -->
     <method id="pango_font_get_font_map" bind="False"/> <!-- circular dependency -->
     <method id="pango_font_get_metrics">
       <parameter name="language" default="Pango.Language.Null_Pango_Language"/>
     </method>
   </package>

   <package id="PangoMatrix">
     <record ctype="PangoMatrix"/>
     <method id="pango_matrix_rotate">
       <parameter name="self" direction="inout"/>
     </method>
     <method id="pango_matrix_scale">
       <parameter name="self" direction="inout"/>
     </method>
     <method id="pango_matrix_translate">
       <parameter name="self" direction="inout"/>
     </method>
   </package>

   <package id="PangoCoverage">
     <method id="pango_coverage_new" ada="Pango_New"/>
     <method id="pango_coverage_from_bytes" bind="False"/>  <!-- not used for Ada -->
     <method id="pango_coverage_to_bytes" bind="False"/>  <!-- not used for Ada -->
   </package>

   <package id="PangoTabArray" ada="Pango.Tabs">
     <enum ctype="PangoTabAlign"/>
     <method id="pango_tab_array_get_tabs" bind="False"/> <!-- Require manual binding -->
   </package>

   <package id="PangoAttribute" ada="Pango.Attributes">
     <method id="pango_attribute_init" bind="False"/> <!--  low-level -->
     <function id="pango_attr_underline_new"/>
     <function id="pango_attr_background_new"/>
     <function id="pango_attr_foreground_new"/>
     <function id="pango_attr_family_new"/>
     <function id="pango_attr_strikethrough_new"/>
     <function id="pango_attr_variant_new"/>
     <function id="pango_attr_weight_new"/>
     <function id="pango_attr_stretch_new"/>
     <function id="pango_attr_scale_new"/>
     <function id="pango_attr_rise_new"/>
     <function id="pango_attr_gravity_new"/>
   </package>

   <package id="PangoAttrList" into="PangoAttribute">
     <method id="pango_attr_list_get_iterator" bind="False"/>  <!-- Not needed ? -->
   </package>

   <package id="PangoContext">
     <method id="pango_context_get_font_map" bind="False" /> <!-- circular dep -->
     <method id="pango_context_set_font_map" bind="False" /> <!-- circular dep -->
     <extra>
       <with_spec pkg="Pango.Font_Family"/>
     </extra>
     <method id="pango_context_list_families" return="Pango_Font_Family_Array">
       <parameter name="families" ada=""/>
       <parameter name="n_families" ada=""/>
       <body>
      type font_family_array_bounded is array (Natural) of System.Address;

      procedure Internal
         (Self     : System.Address;
          Families : System.Address;
          Size     : access Gint);
      pragma Import (C, Internal, "pango_context_list_families");

      procedure g_free (s : access font_family_array_bounded);
      pragma Import (C, g_free, "g_free");

      Families : aliased access font_family_array_bounded;
      Size : aliased Gint;
      Tmplt : Pango_Font_Family_Record;
   begin
      Internal (Get_Object (Self), Families'Address, Size'Access);

      declare
         Result : Pango_Font_Family_Array (1 .. Integer (Size));
      begin
         for R in 0 .. Integer (Size) - 1 loop
             Result (R + 1) := Pango_Font_Family
                (Get_User_Data (Families (R), Tmplt));
         end loop;
         g_free (Families);

         return Result;
      end;
       </body>
     </method>
   </package>

   <package id="PangoFontDescription" into="PangoFont">
     <method id="pango_font_description_free" bind="False" /> <!--  manual binding below -->
     <extra>
       <with_spec pkg="Glib.Generic_Properties"/>
       <spec>
   function To_Font_Description
     (Family_Name : String := "";
      Style       : Pango.Enums.Style := Pango.Enums.Pango_Style_Normal;
      Variant     : Pango.Enums.Variant := Pango.Enums.Pango_Variant_Normal;
      Weight      : Pango.Enums.Weight := Pango.Enums.Pango_Weight_Normal;
      Stretch     : Pango.Enums.Stretch := Pango.Enums.Pango_Stretch_Normal;
      Size        : Gint := 0) return Pango_Font_Description;
   --  Create a new font decription from the given parameters.

   function To_Address
     (F : Pango_Font_Description; Add : System.Address) return System.Address;
   package Desc_Properties is new Generic_Internal_Boxed_Property
     (Pango_Font_Description, Get_Type, To_Address);
   type Property_Font_Description is new Desc_Properties.Property;

   procedure Free (Desc : in out Pango_Font_Description);
   --  Deallocate the given font description.
       </spec>
       <body>
   subtype String7 is String (1 .. 7);
   Style_Map : constant array (Enums.Style) of String7 :=
     (Enums.Pango_Style_Normal  =&gt; "       ",
      Enums.Pango_Style_Oblique =&gt; "Oblique",
      Enums.Pango_Style_Italic  =&gt; "Italic ");

   subtype String10 is String (1 .. 10);
   Variant_Map : constant array (Enums.Variant) of String10 :=
     (Enums.Pango_Variant_Normal     =&gt; "          ",
      Enums.Pango_Variant_Small_Caps =&gt; "Small-Caps");

   subtype String15 is String (1 .. 15);
   Stretch_Map : constant array (Enums.Stretch) of String15 :=
     (Enums.Pango_Stretch_Ultra_Condensed =&gt; "Ultra-Condensed",
      Enums.Pango_Stretch_Extra_Condensed =&gt; "Extra-Condensed",
      Enums.Pango_Stretch_Condensed       =&gt; "Condensed      ",
      Enums.Pango_Stretch_Semi_Condensed  =&gt; "Semi-Condensed ",
      Enums.Pango_Stretch_Normal          =&gt; "               ",
      Enums.Pango_Stretch_Semi_Expanded   =&gt; "Semi-Expanded  ",
      Enums.Pango_Stretch_Expanded        =&gt; "Expanded       ",
      Enums.Pango_Stretch_Extra_Expanded  =&gt; "Extra-Expanded ",
      Enums.Pango_Stretch_Ultra_Expanded  =&gt; "Ultra-Expanded ");

   --  Some of the values are not directly supported by pango.
   --  ??? See fonts.c in pango

   Weight_Map : constant array (Enums.Weight) of String10 :=
     (Enums.Pango_Weight_Ultralight  =&gt; "Light     ",
      Enums.Pango_Weight_Thin        =&gt; "Thin      ",
      Enums.Pango_Weight_Light       =&gt; "Light     ",
      Enums.Pango_Weight_Normal      =&gt; "          ",
      Enums.Pango_Weight_Book        =&gt; "Book      ",
      Enums.Pango_Weight_Medium      =&gt; "Medium    ",
      Enums.Pango_Weight_Semibold    =&gt; "Semi-Bold ",
      Enums.Pango_Weight_Bold        =&gt; "Bold      ",
      Enums.Pango_Weight_Ultrabold   =&gt; "Bold      ",
      Enums.Pango_Weight_Ultraheavy  =&gt; "Ultraheavy",
      Enums.Pango_Weight_Heavy       =&gt; "Heavy     ");

   function To_Font_Description
     (Family_Name : String := "";
      Style       : Enums.Style := Enums.Pango_Style_Normal;
      Variant     : Enums.Variant := Enums.Pango_Variant_Normal;
      Weight      : Enums.Weight := Enums.Pango_Weight_Normal;
      Stretch     : Enums.Stretch := Enums.Pango_Stretch_Normal;
      Size        : Gint := 0) return Pango_Font_Description
   is
   begin
      return From_String (Family_Name &amp; " " &amp;
                     Style_Map (Style) &amp; " " &amp;
                     Variant_Map (Variant) &amp;
                     Weight_Map (Weight) &amp; " " &amp;
                     Stretch_Map (Stretch) &amp; Gint'Image (Size));
   end To_Font_Description;

   function To_Address
      (F : Pango_Font_Description; Add : System.Address)
      return System.Address
   is
      pragma Unreferenced (Add);
   begin
      return F.all'Address;
   end To_Address;

   ----------
   -- Free --
   ----------

   procedure Free (Desc : in out Pango_Font_Description) is
      procedure Internal (Desc : Pango_Font_Description);
      pragma Import (C, Internal, "pango_font_description_free");

   begin
      Internal (Desc);
      Desc := null;
   end Free;
       </body>
     </extra>
   </package>

   <package id="GtkCellView">
     <parameter name="self" ada="Cell_View"/>
   </package>

   <package id="GtkTreeView">
     <parameter name="self" ada="Tree_View"/>
     <enum ctype="GtkTreeViewDropPosition" />
     <method id="gtk_tree_view_get_columns" return="GtkTreeViewColumnList"/>

     <method id="gtk_tree_view_new_with_model" ada="Gtk_New" />
     <method id="gtk_tree_view_insert_column">
       <parameter name="position" default="-1"/>
     </method>
     <method id="gtk_tree_view_get_path_at_pos" return_as_param="Row_Found"/>
     <method id="gtk_tree_view_get_visible_range" return_as_param="Success"/>
     <method id="gtk_tree_view_get_tooltip_context" return_as_param="Success"/>
     <method id="gtk_tree_view_set_expander_column">
        <parameter name="column" allow-none="1"/>
     </method>

     <method id="gtk_tree_view_get_hadjustment" bind="False" /> <!-- from scrollable -->
     <method id="gtk_tree_view_get_vadjustment" bind="False" /> <!-- from scrollable -->
     <method id="gtk_tree_view_set_hadjustment" bind="False" /> <!-- from scrollable -->
     <method id="gtk_tree_view_set_vadjustment" bind="False" /> <!-- from scrollable -->

     <method id="gtk_tree_view_enable_model_drag_source">
       <parameter name="targets" ctype="Gtk.Target_List.Target_Entry_Array"/>
       <parameter name="n_targets" ada="" default="Targets'Length" />
     </method>
     <method id="gtk_tree_view_enable_model_drag_dest">
       <parameter name="targets" ctype="Gtk.Target_List.Target_Entry_Array"/>
       <parameter name="n_targets" ada="" default="Targets'Length" />
     </method>

     <extra>
       <spec>
   procedure Gtk_New
      (Tree_View : out Gtk_Tree_View;
       Model     : access Gtk.Tree_Model.Gtk_Root_Tree_Model_Record'Class);
   --  A convenience function so that one can directly pass a model, without
   --  converting to a Gtk_Tree_Model via the "+" operator.
       </spec>
       <body>
   procedure Gtk_New
      (Tree_View : out Gtk_Tree_View;
       Model     : access Gtk.Tree_Model.Gtk_Root_Tree_Model_Record'Class)
   is
   begin
      Gtk_New (Tree_View, To_Interface (Model));
   end Gtk_New;
       </body>
     </extra>
   </package>

   <package id="GtkTreeViewColumn">
     <parameter name="self" ada="Tree_Column"/>
     <enum ctype="GtkTreeViewColumnSizing"/>
     <list ctype="GtkTreeViewColumn" ada="Column_List" />
     <method id="gtk_tree_view_column_cell_get_position" return_as_param="Success"/>

     <method id="gtk_tree_view_column_add_attribute" bind="False" /> <!-- overridden -->
     <method id="gtk_tree_view_column_clear" bind="False" /> <!-- from cell_layout -->
     <method id="gtk_tree_view_column_clear_attributes" bind="False" /> <!-- from cell_layout -->
     <method id="gtk_tree_view_column_pack_start" bind="False" /> <!-- from cell_layout -->
     <method id="gtk_tree_view_column_pack_end" bind="False" /> <!-- from cell_layout -->
     <method id="gtk_tree_view_column_set_cell_data_func" bind="False" /> <!-- from cell_layout -->
   </package>

   <package id="GtkTreeSortable">
     <parameter name="self" ada="Sortable"/>
     <method id="gtk_tree_sortable_get_sort_column_id" return="void"/>
     <extra>
       <spec>
   Default_Sort_Column_Id  : constant Gint := -1;
   Unsorted_Sort_Column_Id : constant Gint := -2;
   --  Two special values for the sort column
       </spec>
     </extra>
   </package>

   <package id="GtkTreeDragSource">
     <function id="gtk_tree_set_row_drag_data" ada="Set_Row_Drag_Data"/>
     <function id="gtk_tree_get_row_drag_data" ada="Get_Row_Drag_Data" return_as_param="succes"/>
   </package>

   <package id="GtkTreeModel">
     <parameter name="self" ada="Tree_Model"/>
     <enum ctype="GtkTreeModelFlags" ada="Tree_Model_Flags" />
     <method id="gtk_tree_model_get" bind="False"/> <!-- varargs -->
     <method id="gtk_tree_model_get_valist" bind="False"/> <!-- varargs -->
     <method id="gtk_tree_model_get_iter" return="Gtk_Tree_Iter">
       <parameter name="iter" ada=""/>
       <body>
      function Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter : System.Address; Path : System.Address) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_get_iter");
      Iter : aliased Gtk_Tree_Iter;
   begin
      if Internal (+Tree_Model, Iter'Address, Get_Object (Path)) /= 0 then
         return Iter;
      else
         return Null_Iter;
      end if;
       </body>
     </method>
     <method id="gtk_tree_model_get_iter_from_string" return="Gtk_Tree_Iter">
       <parameter name="iter" ada=""/>
       <body>
      function Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter : System.Address; Str : String) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_get_iter_from_string");
      Iter : aliased Gtk_Tree_Iter;
   begin
      if Internal
        (+Tree_Model, Iter'Address, Path_String &amp; ASCII.NUL) /= 0
      then
         return Iter;
      else
         return Null_Iter;
      end if;
       </body>
     </method>
     <method id="gtk_tree_model_get_iter_first" return="Gtk_Tree_Iter">
       <parameter name="iter" ada=""/>
       <body>
      function Internal
         (Tree_Model : Gtk_Tree_Model; Iter : System.Address) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_get_iter_first");
      Iter : aliased Gtk_Tree_Iter;
   begin
      if Internal (+Tree_Model, Iter'Address) /= 0 then
         return Iter;
      else
         return Null_Iter;
      end if;
       </body>
     </method>
     <method id="gtk_tree_model_iter_next" ada="Next" return="void">
       <parameter name="iter" direction="inout"/>
       <body>
      function Internal
         (Tree_Model : Gtk_Tree_Model; Iter : System.Address) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_iter_next");
      Local_Iter : aliased Gtk_Tree_Iter := Iter;
   begin
      if Internal (+Tree_Model, Local_Iter'Address) = 0 then
         Iter := Null_Iter;
      else
         Iter := Local_Iter;
      end if;
       </body>
     </method>
     <method id="gtk_tree_model_iter_previous" ada="Previous" return="void">
       <parameter name="iter" direction="inout"/>
       <body>
      function Internal
         (Tree_Model : Gtk_Tree_Model; Iter : System.Address) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_iter_previous");
      Local_Iter : aliased Gtk_Tree_Iter := Iter;
   begin
      if Internal (+Tree_Model, Local_Iter'Address) = 0 then
         Iter := Null_Iter;
      else
         Iter := Local_Iter;
      end if;
       </body>
     </method>
     <method id="gtk_tree_model_iter_children" ada="Children" return="Gtk_Tree_Iter">
       <parameter name="iter" ada=""/>
       <body>
      function Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter       : System.Address;
         Parent     : System.Address) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_iter_children");
      It : aliased Gtk_Tree_Iter;
   begin
      if Internal (+Tree_Model, It'Address, Iter_Or_Null (Parent'Address)) /= 0 then
         return It;
      else
         return Null_Iter;
      end if;
       </body>
     </method>
     <method id="gtk_tree_model_iter_has_child" ada="Has_Child"/>
     <method id="gtk_tree_model_iter_n_children" ada="N_Children">
       <parameter name="iter" default="Gtk.Tree_Model.Null_Iter"/>
       <body>
      function Internal
          (Tree_Model : Gtk_Tree_Model; Iter : System.Address) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_iter_n_children");
   begin
      return Internal (+Tree_Model, Iter_Or_Null (Iter'Address));
       </body>
     </method>
     <method id="gtk_tree_model_iter_nth_child" ada="Nth_Child" return="Gtk_Tree_Iter">
       <parameter name="iter" ada=""/>
       <body>
      function Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter, Parent : System.Address; N : Gint) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_iter_nth_child");
      Iter : aliased Gtk_Tree_Iter;
   begin
      if Internal (+Tree_Model, Iter'Address, Iter_Or_Null (Parent'Address), N) /= 0 then
         return Iter;
      else
         return Null_Iter;
      end if;
       </body>
     </method>
     <method id="gtk_tree_model_iter_parent" ada="Parent" return="Gtk_Tree_Iter">
       <parameter name="iter" ada=""/>
       <body>
      function Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter       : System.Address;
         Child      : Gtk_Tree_Iter) return Gint;
      pragma Import (C, Internal, "gtk_tree_model_iter_parent");
      Iter : aliased Gtk_Tree_Iter;
   begin
      if Internal (+Tree_Model, Iter'Address, Child) /= 0 then
         return Iter;
      else
         return Null_Iter;
      end if;
       </body>
     </method>
     <method id="gtk_tree_model_rows_reordered">
       <parameter name="new_order" type="Gint_Array"/>
     </method>
     <extra>
       <spec>
   type Gtk_Root_Tree_Model_Record is new Glib.Object.GObject_Record
      with null record;
   type Gtk_Root_Tree_Model is
      access all Gtk_Root_Tree_Model_Record'Class;
   --  A common base type for all objects that implement GtkTreeModel. This
   --  is used to conveniently provide a number of primitive operations.

   function Get_Int
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Gint;
   function Get_Ulong
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Gulong;
   function Get_Boolean
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Boolean;
   function Get_Object
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Glib.Object.GObject;
   function Get_C_Proxy
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Glib.C_Proxy;
   function Get_String
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return UTF8_String;
   function Get_Address
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return System.Address;
   --  Get the value of one cell of the model

   function Get_Int
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Gint;
   function Get_Ulong
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Gulong;
   function Get_Boolean
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Boolean;
   function Get_Object
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Glib.Object.GObject;
   function Get_C_Proxy
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Glib.C_Proxy;
   function Get_String
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return UTF8_String;
   function Get_Address
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return System.Address;

   package Implements_Gtk_Tree_Model is new Glib.Types.Implements
     (Gtk_Tree_Model, Gtk_Root_Tree_Model_Record, Gtk_Root_Tree_Model);
   function To_Interface
     (Widget : access Gtk_Root_Tree_Model_Record'Class)
     return Gtk_Tree_Model renames Implements_Gtk_Tree_Model.To_Interface;
   function "-"
     (Interf : Gtk_Tree_Model) return Gtk_Root_Tree_Model
     renames Implements_Gtk_Tree_Model.To_Object;
   --  Convert from the gtk+ interface to an actual object. The return type
   --  depends on the exact model, and will likely be an instance of
   --  Gtk_Tree_Store'Class or Gtk_List_Store'Class depending on how you
   --  created it.
       </spec>
       <body>
   function Get_Int
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Gint is
   begin
     return Get_Int (To_Interface (Tree_Model), Iter, Column);
   end Get_Int;

   function Get_Int
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Gint
   is
      procedure Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter       : Gtk_Tree_Iter;
         Column     : Gint;
         Value      : out Gint);
      pragma Import (C, Internal, "ada_gtk_tree_model_get");
      A : Gint;
   begin
      if Iter = Null_Iter then
         raise Program_Error with "Get_Int with null_iter";
      end if;
      Internal (Tree_Model, Iter, Column, A);
      return A;
   end Get_Int;

   function Get_Ulong
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Gulong is
   begin
     return Get_Ulong (To_Interface (Tree_Model), Iter, Column);
   end Get_Ulong;

   function Get_Ulong
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Gulong
   is
      procedure Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter       : Gtk_Tree_Iter;
         Column     : Gint;
         Value      : out Gulong);
      pragma Import (C, Internal, "ada_gtk_tree_model_get");
      A : Gulong;
   begin
      if Iter = Null_Iter then
         raise Program_Error with "Get_Ulong with null_iter";
      end if;
      Internal (Tree_Model, Iter, Column, A);
      return A;
   end Get_Ulong;

   function Get_Boolean
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Boolean is
   begin
      return Get_Boolean (To_Interface (Tree_Model), Iter, Column);
   end Get_Boolean;

   function Get_Boolean
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Boolean is
   begin
      return Get_Int (Tree_Model, Iter, Column) /= 0;
   end Get_Boolean;

   function Get_Object
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Glib.Object.GObject
   is
   begin
      return Get_Object (To_Interface (Tree_Model), Iter, Column);
   end Get_Object;

   function Get_Object
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Glib.Object.GObject
   is
      Stub : Glib.Object.GObject_Record;
   begin
      return Get_User_Data
         (Get_Address (Tree_Model, Iter, Column), Stub);
   end Get_Object;

   function Get_C_Proxy
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Glib.C_Proxy is
   begin
      return Get_C_Proxy (To_Interface (Tree_Model), Iter, Column);
   end Get_C_Proxy;

   function Get_C_Proxy
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return Glib.C_Proxy
   is
      procedure Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter       : Gtk_Tree_Iter;
         Column     : Gint;
         Value      : out Glib.C_Proxy);
      pragma Import (C, Internal, "ada_gtk_tree_model_get");
      A : Glib.C_Proxy;
   begin
      if Iter = Null_Iter then
         raise Program_Error with "Get_C_Proxy with null_iter";
      end if;
      Internal (Tree_Model, Iter, Column, A);
      return A;
   end Get_C_Proxy;

   function Get_String
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return UTF8_String
   is
   begin
      return Get_String (To_Interface (Tree_Model), Iter, Column);
   end Get_String;

   function Get_String
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return UTF8_String
   is
      procedure Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter       : Gtk_Tree_Iter;
         Column     : Gint;
         Value      : out Interfaces.C.Strings.chars_ptr);
      pragma Import (C, Internal, "ada_gtk_tree_model_get");
      A : Interfaces.C.Strings.chars_ptr;
   begin
      if Iter = Null_Iter then
         raise Program_Error with "Get_String with null_iter";
      end if;
      Internal (Tree_Model, Iter, Column, A);
      if A = Interfaces.C.Strings.Null_Ptr then
         return "";
      else
         declare
            S : constant String := Interfaces.C.Strings.Value (A);
         begin
            Interfaces.C.Strings.Free (A);
            return S;
         end;
      end if;
   end Get_String;

   function Get_Address
     (Tree_Model : access Gtk_Root_Tree_Model_Record;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return System.Address
   is
   begin
      return Get_Address (To_Interface (Tree_Model), Iter, Column);
   end Get_Address;

   function Get_Address
     (Tree_Model : Gtk_Tree_Model;
      Iter       : Gtk_Tree_Iter;
      Column     : Gint) return System.Address
   is
      procedure Internal
        (Tree_Model : Gtk_Tree_Model;
         Iter       : Gtk_Tree_Iter;
         Column     : Gint;
         Value      : out System.Address);
      pragma Import (C, Internal, "ada_gtk_tree_model_get");
      A : System.Address;
   begin
      if Iter = Null_Iter then
         raise Program_Error with "Get_Address with null_iter";
      end if;
      Internal (Tree_Model, Iter, Column, A);
      return A;
   end Get_Address;
       </body>
     </extra>
   </package>

   <package id="GtkTreeIter" into="GtkTreeModel">
     <record ctype="GtkTreeIter" private="True"/>
     <method id="gtk_tree_iter_get_type" ada="Iter_Get_Type" />
     <method id="gtk_tree_iter_copy" ada="Iter_Copy" />
     <extra>
       <type>
   Null_Iter : constant Gtk_Tree_Iter;
       </type>
       <spec>
   function "=" (Left : Gtk_Tree_Iter; Right : Gtk_Tree_Iter) return Boolean;

   procedure Set_Tree_Iter
     (Val  : in out Glib.Values.GValue;
      Iter : Gtk_Tree_Iter);
   pragma Import (C, Set_Tree_Iter, "g_value_set_pointer");
   --  Set the value of the given GValue to Iter.
   --  Note that Iter is stored by reference, which means no copy of Iter
   --  is made. Iter should remain allocated as long as Val is being used.

   procedure Get_Tree_Iter
     (Val  : Glib.Values.GValue;
      Iter : out Gtk_Tree_Iter);
   --  Extract the iterator from the given GValue.
   --  Note that the iterator returned is a copy of the iterator referenced
   --  by the give GValue. Modifying the iterator returned does not modify
   --  the iterator referenced by the GValue.

   function Get_Tree_Iter (Val : Glib.Values.GValue) return Gtk_Tree_Iter;
   --  Extract the iterator from the given GValue.

   function To_Address (Iter : Gtk_Tree_Iter) return System.Address;
   pragma Convention (C, To_Address);
   --  Return address of the specified iterator.
   --  Note: To_Address needs a pass-by-reference semantic to work properly
   --  On some ABIs (e.g. IA64), Gtk_Tree_Iter is passed by copy, since it's
   --  a "small enough" record.

   function Iter_Or_Null (Iter : System.Address) return System.Address;
   --  Internal function for GtkAda
       </spec>
       <spec private="True">
   Null_Iter : constant Gtk_Tree_Iter :=
     (0, System.Null_Address, System.Null_Address, System.Null_Address);
       </spec>
       <body>
   function "=" (Left : Gtk_Tree_Iter; Right : Gtk_Tree_Iter) return Boolean is
      use type System.Address;
   begin
      if Left.Stamp = Right.Stamp then
         if Left.Stamp = 0 then
            --  Stamp = 0 means the iterator is null iterator, we need not to
            --  compare other fields in this case.
            return True;
         else
            return Left.User_Data = Right.User_Data
                     and then Left.User_Data2 = Right.User_Data2
                     and then Left.User_Data3 = Right.User_Data3;
         end if;
      else
         return False;
      end if;
   end "=";

   type Gtk_Tree_Iter_Access is access Gtk_Tree_Iter;
   function Convert is new Ada.Unchecked_Conversion
      (System.Address, Gtk_Tree_Iter_Access);
   use type System.Address;

   function Iter_Or_Null (Iter : System.Address) return System.Address is
   begin
      if Convert (Iter).Stamp = 0 then   --  null iter
         return System.Null_Address;
      else
         return Iter;
      end if;
   end Iter_Or_Null;

   procedure Get_Tree_Iter
     (Val  : Glib.Values.GValue;
      Iter : out Gtk_Tree_Iter) is
   begin
      Iter := Convert (Glib.Values.Get_Address (Val)).all;
   end Get_Tree_Iter;

   function Get_Tree_Iter (Val : Glib.Values.GValue) return Gtk_Tree_Iter is
      Result : Gtk_Tree_Iter;
   begin
      Get_Tree_Iter (Val, Result);
      return Result;
   end Get_Tree_Iter;

   function To_Address (Iter : Gtk_Tree_Iter) return System.Address is
   begin
      return Iter'Address;
   end To_Address;
       </body>
     </extra>
   </package>

   <package id="GtkTreeRowReference">
     <parameter name="self" ada="Reference"/>
   </package>

   <package id="GtkTreePath" into="GtkTreeModel">
     <parameter name="self" ada="Path" />
     <list ctype="GtkTreePath" ada="Gtk_Tree_Path_List" section="Lists"/>
     <method id="gtk_tree_path_new_from_string" ada="Gtk_New">
       <parameter name="self" ada="Self" />
     </method>
     <method id="gtk_tree_path_get_type" ada="Path_Get_Type" />
     <method id="gtk_tree_path_free" ada="Path_Free" />
     <method id="gtk_tree_path_get_indices_with_depth" bind="False"/> <!-- duplicates Get_Indices, in Ada -->
     <method id="gtk_tree_path_get_indices" return="Glib.Gint_Array">
       <body>
      Depth : constant Integer := Integer (Get_Depth (Path));

      subtype Result_Array is Gint_Array (0 .. Depth - 1);
      type Result_Array_Access is access all Result_Array;
      pragma Convention (C, Result_Array_Access);

      function Internal (Path : System.Address) return Result_Array_Access;
      pragma Import (C, Internal, "gtk_tree_path_get_indices");

      --  Do not free the result of gtk_tree_path_get_indices since this is
      --  not a copy, but the currently used data.
      Result : constant Result_Array_Access := Internal (Get_Object (Path));

   begin
      if Result = null then
         return (0 .. -1 => 0);
      else
         return Result.all;
      end if;
       </body>
     </method>
     <extra>
       <spec>
   function Get_Tree_Path (Val : Glib.Values.GValue) return Gtk_Tree_Path;
   --  Extract the path from the given GValue.

       </spec>
       <with_body pkg="Glib.Values"/>
       <body>
   function Get_Tree_Path (Val : Glib.Values.GValue) return Gtk_Tree_Path is
   begin
      return From_Object (Glib.Values.Get_Address (Val));
   end Get_Tree_Path;
       </body>
     </extra>
   </package>

   <package id="GtkTreeModelSort" parent="Gtk.Tree_Model.Gtk_Root_Tree_Model">
     <method id="gtk_tree_model_sort_new_with_model" ada="Gtk_New_With_Model"/>
   </package>

   <package id="GtkTreeModelFilter" parent="Gtk.Tree_Model.Gtk_Root_Tree_Model">
     <method id="gtk_tree_model_filter_new" ada="Gtk_New">
       <parameter name="root" default="Null_Gtk_Tree_Path" />
     </method>
     <method id="gtk_tree_model_filter_convert_child_iter_to_iter" return="void" />
     <method id="gtk_tree_model_filter_set_modify_func"> <!-- function with callback and custom parameter -->
       <parameter name="types" type="Glib.GType_Array"/>
       <parameter name="n_columns" ada="" default="Types'Length" />
     </method>
   </package>

   <package id="GtkTreeSelection">
     <parameter name="self" ada="Selection" />
     <method id="gtk_tree_selection_get_selected" return="void">
        <body>
      function Internal
        (Selection : System.Address;
         Model     : access Gtk_Tree_Model;
         Iter      : access Gtk_Tree_Iter) return Gboolean;
      pragma Import (C, Internal, "gtk_tree_selection_get_selected");
      M  : aliased Gtk_Tree_Model := Null_Gtk_Tree_Model;
      It : aliased Gtk_Tree_Iter;
   begin
      if Internal (Get_Object (Selection), M'Access, It'Access) = 0 then
         Iter  := Null_Iter;
      else
         Iter  := It;
      end if;
      Model := M;
        </body>
     </method>
     <method id="gtk_tree_selection_get_selected_rows" bind="False"/><!-- see below -->
     <method id="gtk_tree_selection_get_tree_view" return="Gtk_Widget"/> <!-- avoid circular dep -->
     <extra>
       <spec>
   procedure Get_Selected_Rows
     (Selection : access Gtk_Tree_Selection_Record;
      Model     : out Gtk.Tree_Model.Gtk_Tree_Model;
      Path_List : out Gtk.Tree_Model.Gtk_Tree_Path_List.Glist);
   --  Creates a list of path of all selected rows. Additionally, if you are
   --  planning on modifying the model after calling this function, you may
   --  want to convert the returned list into a list of Gtk_Tree_Row_Reference.
   --
   --  You must free the resulting list by calling Path_Free on each item, and
   --  then freeing the list itself.
       </spec>
       <body>
   procedure Get_Selected_Rows
     (Selection : access Gtk_Tree_Selection_Record;
      Model     : out Gtk_Tree_Model;
      Path_List : out Gtk_Tree_Path_List.Glist)
   is
      use type System.Address;
      function Internal
        (Selection : System.Address;
         Model     : access Gtk_Tree_Model) return System.Address;
      pragma Import (C, Internal, "gtk_tree_selection_get_selected_rows");
      M        : aliased Gtk_Tree_Model;
      Selected : System.Address;  --  list of paths
   begin
      Selected := Internal (Get_Object (Selection), M'Access);
      Model := M;
      if Selected = System.Null_Address then
         Path_List := Gtk_Tree_Path_List.Null_List;
      else
         Gtk_Tree_Path_List.Set_Object (Path_List, Selected);
      end if;
   end Get_Selected_Rows;
       </body>
     </extra>
   </package>

   <package id="GtkListStore" parent="Gtk.Tree_Model.Gtk_Root_Tree_Model">
     <parameter name="self" ada="List_Store" />
     <method id="gtk_list_store_newv" ada="Gtk_New">
       <parameter name="types" type="GType_Array"/>
       <parameter name="n_columns" ada="" default="Types'Length"/>
     </method>
     <method id="gtk_list_store_set_column_types">
       <parameter name="types" type="GType_Array"/>
       <parameter name="n_columns" ada="" default="Types'Length"/>
     </method>
     <method id="gtk_list_store_insert_with_valuesv" bind="False"/> <!-- valist -->
     <method id="gtk_list_store_set_value">
       <parameter name="value" ctype="GValue" />
     </method>
     <method id="gtk_list_store_set_valist" bind="False"/> <!-- valist -->
     <method id="gtk_list_store_set_valuesv" bind="False"/> <!-- valist -->
     <method id="gtk_list_store_remove" return="void">
       <parameter name="iter" direction="inout"/>
       <body>%(auto)s
Iter := Gtk.Tree_Model.Null_Iter;
       </body>
     </method>
     <extra>
       <with_spec pkg="Gdk.Pixbuf" />
       <spec>
   procedure Set
     (Tree_Store : access Gtk_List_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : UTF8_String);
   procedure Set
     (Tree_Store : access Gtk_List_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Boolean);
   procedure Set
     (Tree_Store : access Gtk_List_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Gint);
   procedure Set
     (Tree_Store : access Gtk_List_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Gdk.Pixbuf.Gdk_Pixbuf);
       </spec>
       <body>
   procedure Set
     (Tree_Store : access Gtk_List_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : UTF8_String)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : UTF8_String);
      pragma Import (C, Internal, "ada_gtk_list_store_set_ptr");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Value &amp; ASCII.NUL);
   end Set;

   procedure Set
     (Tree_Store : access Gtk_List_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Gint)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : Gint);
      pragma Import (C, Internal, "ada_gtk_list_store_set_int");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Value);
   end Set;

   procedure Set
     (Tree_Store : access Gtk_List_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Boolean)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : Gboolean);
      pragma Import (C, Internal, "ada_gtk_list_store_set_int");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Boolean'Pos (Value));
   end Set;

   procedure Set
     (Tree_Store : access Gtk_List_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Gdk.Pixbuf.Gdk_Pixbuf)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : System.Address);
      pragma Import (C, Internal, "ada_gtk_list_store_set_ptr");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Get_Object (Value));
   end Set;
       </body>
     </extra>
   </package>

   <package id="GtkTreeStore" parent="Gtk.Tree_Model.Gtk_Root_Tree_Model">
     <parameter name="self" ada="Tree_Store" />
     <method id="gtk_tree_store_newv" ada="Gtk_New">
       <parameter name="types" type="GType_Array"/>
       <parameter name="n_columns" ada="" default="Types'Length"/>
     </method>
     <method id="gtk_tree_store_set_column_types">
       <parameter name="types" type="GType_Array"/>
       <parameter name="n_columns" ada="" default="Types'Length"/>
     </method>
     <method id="gtk_tree_store_remove" return="void">
       <parameter name="iter" direction="inout"/>
       <body>%(auto)s
Iter := Gtk.Tree_Model.Null_Iter;
       </body>
     </method>
     <method id="gtk_tree_store_reorder">
       <parameter name="new_order" type="Gint_Array"/>
     </method>
     <method id="gtk_tree_store_set_value">
       <parameter name="value" ctype="GValue" />
     </method>
     <method id="gtk_tree_store_insert_with_valuesv" bind="False"/> <!-- valist -->
     <method id="gtk_tree_store_set_valist" bind="False"/> <!-- valist -->
     <method id="gtk_tree_store_set_valuesv" bind="False"/> <!-- valist -->
     <extra>
       <spec>
   generic
      type Data_Type is private;
   package Generic_Set is
      type Data_Type_Access is access all Data_Type;

      procedure Set
        (Tree_Store : access Gtk_Tree_Store_Record'Class;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : Data_Type_Access);
      --  Generic procedure used to store access objects in the model.
      --  For GObject and all of its descendents (including all widgets),
      --  you should use the Set procedure below that takes a GObject as
      --  parameter.
      --
      --  Please see the example at the end for more information on how to
      --  create your own Set procedures adapted to your model. Also consider
      --  using Set_Value for complex cases

      function Get
        (Tree_Store : access Gtk_Tree_Store_Record'Class;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint) return Data_Type_Access;
      --  Generic procedure used to get access objects back from the model.
      --  For GObject and all of its descendents (including all widgets),
      --  you should use the Get_Object function defined in Gtk-Tree_Model
      --  that returns a GObject.

   end Generic_Set;

   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : UTF8_String);
   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Boolean);
   procedure Set_Ulong
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Gulong);
   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Gint);
   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Glib.C_Proxy);
   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Address    : System.Address);
   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Glib.Object.GObject);

   function Freeze_Sort
     (Tree : access Gtk.Tree_Store.Gtk_Tree_Store_Record'Class)
      return Gint;
   --  Freeze the sorting in the tree view, and returns the current
   --  sort_column_id, which should be used when thawing. (See Thaw_Sort)

   procedure Thaw_Sort
     (Tree      : access Gtk.Tree_Store.Gtk_Tree_Store_Record'Class;
      Column_Id : Gint);
   --  Thaw a frozen tree_view. Column_Id should be the value returned by
   --  the corresponding call to Freeze_Sort.
       </spec>
       <body>
   function Freeze_Sort
     (Tree : access Gtk.Tree_Store.Gtk_Tree_Store_Record'Class)
      return Gint
   is
      function Internal (Tree : System.Address) return Gint;
      pragma Import (C, Internal, "ada_gtk_tree_view_freeze_sort");
   begin
      return Internal (Get_Object (Tree));
   end Freeze_Sort;

   procedure Thaw_Sort
     (Tree : access Gtk.Tree_Store.Gtk_Tree_Store_Record'Class;
      Column_Id : Gint)
   is
      procedure Internal (Tree : System.Address; Id : Gint);
      pragma Import (C, Internal, "ada_gtk_tree_view_thaw_sort");
   begin
      Internal (Get_Object (Tree), Column_Id);
   end Thaw_Sort;

package body Generic_Set is

      pragma Warnings (Off);
      --  Disable warnings on strict aliasing, since there's no aliasing
      --  issue here.

      function To_Address is new
        Ada.Unchecked_Conversion (Data_Type_Access, System.Address);

      function To_Access is new
        Ada.Unchecked_Conversion (System.Address, Data_Type_Access);

      pragma Warnings (On);

      procedure Set
        (Tree_Store : access Gtk_Tree_Store_Record'Class;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : Data_Type_Access) is
      begin
         Set (Tree_Store, Iter, Column, To_Address (Value));
      end Set;

      function Get
        (Tree_Store : access Gtk_Tree_Store_Record'Class;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint) return Data_Type_Access is
      begin
         return To_Access (Get_Address (+Tree_Store, Iter, Column));
      end Get;
   end Generic_Set;

   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Address    : System.Address)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : System.Address);
      pragma Import (C, Internal, "ada_gtk_tree_store_set_ptr");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Address);
   end Set;

   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : UTF8_String)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : UTF8_String);
      pragma Import (C, Internal, "ada_gtk_tree_store_set_ptr");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Value &amp; ASCII.NUL);
   end Set;

   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Gint)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : Gint);
      pragma Import (C, Internal, "ada_gtk_tree_store_set_int");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Value);
   end Set;

   procedure Set_Ulong
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Gulong)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : Gulong);
      pragma Import (C, Internal, "ada_gtk_tree_store_set_ulong");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Value);
   end Set_Ulong;

   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Boolean)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : Gboolean);
      pragma Import (C, Internal, "ada_gtk_tree_store_set_int");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Boolean'Pos (Value));
   end Set;

   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Glib.C_Proxy)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : Glib.C_Proxy);
      pragma Import (C, Internal, "ada_gtk_tree_store_set_ptr");
   begin
      Internal (Get_Object (Tree_Store), Iter, Column, Value);
   end Set;

   procedure Set
     (Tree_Store : access Gtk_Tree_Store_Record;
      Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
      Column     : Gint;
      Value      : Glib.Object.GObject)
   is
      procedure Internal
        (Tree_Store : System.Address;
         Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
         Column     : Gint;
         Value      : System.Address);
      pragma Import (C, Internal, "ada_gtk_tree_store_set_ptr");
   begin
      if Value = null then
         Internal (Get_Object (Tree_Store), Iter, Column, System.Null_Address);
      else
         Internal (Get_Object (Tree_Store), Iter, Column, Get_Object (Value));
      end if;
   end Set;
       </body>
     </extra>
   </package>

   <package id="GtkGrid">
     <method id="gtk_grid_attach">
       <parameter name="width" default='1'/>
       <parameter name="height" default='1'/>
     </method>
     <method id="gtk_grid_attach_next_to">
       <parameter name="width" default='1'/>
       <parameter name="height" default='1'/>
     </method>
   </package>

   <package id="GtkCssSection">
     <enum ctype="GtkCssSectionType"/>

     <method id="gtk_css_section_get_file" bind="False"/>  <!--  needs GFile -->
   </package>

   <package id="GdkFrameClock">
     <enum ctype="GdkFrameClockPhase"/>
   </package>

   <package id="GtkMenuButton">
   </package>

   <package id="GtkActionable">
   </package>

   <package id="GtkThemingEngine">
     <method id="gtk_theming_engine_get_style_valist" bind="False"/> <!-- valist -->
     <method id="gtk_theming_engine_get_valist" bind="False"/> <!-- valist -->

     <method id="gtk_theming_engine_register_property" bind="False"/> <!-- obsolete and requires GtkStylePropertyParser -->
   </package>

   <package id="GtkBindingSet">
     <method id="gtk_binding_set_new" ada="Gtk_New"/>
     <record ctype="GtkBindingSet">
       <field name="widget_path_pspecs" ctype="gpointer"/>  <!-- unused in C -->
       <field name="widget_class_pspecs" ctype="gpointer"/>  <!-- unused in C -->
       <field name="class_branch_pspecs" ctype="gpointer"/>  <!-- unused in C -->
       <field name="current" ctype="gpointer"/>  <!-- implementation detail in C -->
     </record>
   </package>

   <package id="GtkBindingEntry" into="GtkBindingSet">
   </package>

   <package id="GIO" ada="Glib.IO"/>

   <package id="GVariant" ada="Glib.Variant">
     <enum ctype="GVariantClass" prefix="G_VARIANT_"/>
     <method id="g_variant_new_from_bytes" bind="False"/>  <!--  requires GByte -->
     <method id="g_variant_get_data_as_bytes" bind="False"/>  <!--  requires GByte -->
     <method id="g_variant_new_parsed_va" bind="False" /> <!-- va_list -->
     <method id="g_variant_new_va" bind="False" /> <!-- va_list -->
     <method id="g_variant_get_va" bind="False" /> <!-- va_list -->
     <method id="g_variant_new_array" bind="False"/> <!-- c arrays -->
     <method id="g_variant_new_fixed_array" bind="False"/> <!-- c arrays -->
     <method id="g_variant_new_from_data" bind="False"/> <!-- c arrays -->
     <method id="g_variant_new_maybe" bind="False"/> <!-- c arrays -->
     <method id="g_variant_new_tuple" bind="False"/> <!-- c arrays -->
     <method id="g_variant_get_fixed_array" bind="False"/> <!-- c arrays -->
     <method id="g_variant_compare" bind="False"/> <!-- c arrays -->
     <method id="g_variant_equal" bind="False"/> <!-- c arrays -->
     <method id="g_variant_get_data" bind="False"/> <!-- c arrays -->
     <method id="g_variant_dup_bytestring" bind="False"/> <!-- c arrays -->
     <method id="g_variant_get_bytestring" bind="False"/> <!-- c arrays -->
   </package>

   <package id="GVariantIter" into="GVariant" ada="Glib.Variant">
     <method id="g_variant_iter_copy" bind="False"/> <!-- results in duplicate import -->
     <method id="g_variant_iter_free" bind="False"/> <!-- results in duplicate import -->
     <method id="g_variant_iter_n_children" bind="False"/> <!-- duplicate import -->
   </package>

   <package id="GVariantType" into="GVariant" ada="Glib.Variant">
     <method id="g_variant_type_checked_" bind="False"/> <!--  implementation detail -->
     <method id="g_variant_type_new_from_bytes" bind="False"/>  <!--  requires GByte -->
     <method id="g_variant_type_new_tuple" bind="False"/> <!-- c arrays -->
     <method id="g_variant_type_new_maybe" bind="False"/> <!-- c arrays -->
     <method id="g_variant_type_new_array" bind="False"/> <!-- c arrays -->
     <method id="g_variant_type_equal" bind="False"/> <!-- c arrays -->
     <method id="g_variant_type_hash" bind="False"/> <!-- duplicate import -->
     <method id="g_variant_type_string_scan" bind="False"/> <!-- c arrays -->
     <extra>
        <spec>
      Gvariant_Type_Boolean : constant Gvariant_Type; --  value is 0 or 1
      Gvariant_Type_Byte    : constant Gvariant_Type; --  from 0 to 255
      Gvariant_Type_Int16   : constant Gvariant_Type; --  from -32768..32767
      Gvariant_Type_Uint16  : constant Gvariant_Type; --  from 0 to 65535
      Gvariant_Type_Int32   : constant Gvariant_Type;
      Gvariant_Type_Uint32  : constant Gvariant_Type;
      Gvariant_Type_Int64   : constant Gvariant_Type;
      Gvariant_Type_Uint64  : constant Gvariant_Type;
      Gvariant_Type_Double  : constant Gvariant_Type;
      Gvariant_Type_String  : constant Gvariant_Type;

      pragma Import (C, Gvariant_Type_Boolean, "ada_gvariant_type_boolean");
      pragma Import (C, Gvariant_Type_Byte,    "ada_gvariant_type_byte");
      pragma Import (C, Gvariant_Type_Int16,   "ada_gvariant_type_int16");
      pragma Import (C, Gvariant_Type_Uint16,  "ada_gvariant_type_uint16");
      pragma Import (C, Gvariant_Type_Int32,   "ada_gvariant_type_int32");
      pragma Import (C, Gvariant_Type_Uint32,  "ada_gvariant_type_uint32");
      pragma Import (C, Gvariant_Type_Int64,   "ada_gvariant_type_int64");
      pragma Import (C, Gvariant_Type_Uint64,  "ada_gvariant_type_uint64");
      pragma Import (C, Gvariant_Type_Double,  "ada_gvariant_type_double");
      pragma Import (C, Gvariant_Type_String,  "ada_gvariant_type_string");
        </spec>
     </extra>
   </package>

   <package id="GBytes" ada="Glib.Bytes" />

   <package id="GString" ada="Glib.String">
     <record ctype="GString"/>
     <method id="g_string_append_vprintf" bind="False"/> <!-- valist -->
     <method id="g_string_vprintf" bind="False"/> <!-- valist -->
     <method id="g_string_free_to_bytes" bind="False"/> <!-- requires GByte -->
   </package>

   <package id="GMenu" ada="Glib.Menu">
      <method id="g_menu_get_type" ada="Get_Type_Menu" />
   </package>

   <package id="GMenuItem" into="GMenu" ada="Glib.Menu">
      <method id="g_menu_item_get_type" ada="Get_Type_Menu_Item" />
   </package>

   <package id="GMenuModel" ada="Glib.Menu_Model">
      <method id="g_menu_model_get_type" ada="Get_Type_Menu_Model" />
   </package>

   <package id="GMenuAttributeIter" into="GMenuModel" ada="Glib.Menu_Model">
      <method id="g_menu_attribute_iter_get_type" ada="Get_Type_Menu_Attribute_Iter" />
      <method id="g_menu_attribute_iter_get_next" bind="False"/> <!-- parameter out String -->
   </package>

   <package id="GMenuLinkIter" into="GMenuModel" ada="Glib.Menu_Model">
      <method id="g_menu_link_iter_get_type" ada="Get_Type_Menu_Link_Iter" />
      <method id="g_menu_link_iter_get_next" bind="False"/> <!-- parameter out String -->
   </package>

   <package id="GApplication" ada="Glib.Application">
     <virtual-method id='command_line' bind='True'/>
     <virtual-method id='local_command_line' bind='True'>
        <parameter name='arguments' type='Gtkada.Bindings.chars_ptr_array_access' direction='access'/>
     </virtual-method>
     <enum ctype="GApplicationFlags"/>
     <method id="g_application_get_dbus_connection" bind="False"/> <!-- requires DBus -->
     <method id="g_application_open" bind="False" /> <!-- requires GFile -->
     <method id="::open" bind="False"/>  <!--  requires GFile -->
   </package>

   <package id="GApplicationCommandLine" into="GApplication" ada="Glib.Application">
     <method id="g_application_command_line_create_file_for_arg" bind="False" /> <!-- requires GFile -->
     <method id="g_application_command_line_get_stdin" bind="False" /> <!-- requires GInputStream -->
     <method id="g_application_command_line_get_type" ada="Get_Type_Command_Line" />
     <method id="g_application_command_line_get_arguments">
       <parameter name="argc" ada="" default="null"/>
       <return-value transfer-ownership="full"/>
     </method>
     <extra>
       <spec>
   function Run
      (Self : not null access Gapplication_Record) return Gint;
   --  Same as above, but automatically sets argc argv from actual values.
       </spec>
       <body>
   gnat_argc : Interfaces.C.int;
   pragma Import (C, gnat_argc);

   gnat_argv : System.Address;
   pragma Import (C, gnat_argv);

   function Run
      (Self : not null access Gapplication_Record) return Gint
   is
      function Internal
         (Self : System.Address;
          Argc : Gint;
          Argv : System.Address) return Gint;
      pragma Import (C, Internal, "g_application_run");
   begin
      return Internal (Self.Get_Object, Gint (gnat_argc), gnat_argv);
   end Run;
       </body>
     </extra>
   </package>

   <package id="GOptionContext" ada="Glib.Option">
     <record ctype="GOptionGroup"/>
     <record ctype="GOptionEntry">
       <field name="flags" ctype="GOptionFlags"/>
     </record>
     <enum ctype="GOptionError"/>
     <enum ctype="GOptionArg"/>
     <enum ctype="GOptionFlags"/>
     <method id="g_option_context_new" ada="G_New"/>
     <method id="g_option_group_new" ada="G_New"/>
     <method id="g_option_context_parse" bind="False"/> <!-- Invalid binding generated -->
     <method id="g_option_context_add_main_entries">
       <parameter name="entries" type="GOption_Entry_Array"/>
     </method>
     <extra>
       <type ctype="array_of_GOptionEntry" ada="GOption_Entry_Array">
         type GOption_Entry_Array is array (Natural range &lt;&gt;) of GOption_Entry;
       </type>
       <with_spec pkg="Glib.Application"/>
       <with_spec pkg="Glib.Error"/>
       <with_spec pkg="Interfaces.C.Strings"/>
       <with_spec pkg="Gtkada.Bindings"/>
       <with_body pkg="Ada.Unchecked_Conversion" use='false'/>
       <spec>
   Null_GOption_Entry : constant GOption_Entry;

   type Parse_Filter is access function (Param : String) return Boolean;
   --  Returns True if the parameter is to be passed from Command_Line to
   --  Goption_Context

   procedure Parse
     (Self         : Goption_Context;
      Command_Line : not null access Glib.Application.Gapplication_Command_Line_Record'Class;
      Filter       : Parse_Filter := null;
      Success      : out Boolean;
      Error        : out Glib.Error.GError);
   --  Parses the arguments given via Command_Line, removing from the arguments
   --  list all parsed switches.

   procedure Parse
     (Self         : Goption_Context;
      Argv         : access chars_ptr_array_access;  --  Null-terminated
      Success      : out Boolean;
      Error        : out Glib.Error.GError);
   --  This version is suitable for use from Glib.Application.Local_Command_Line
       </spec>
       <spec private="True">
   Null_GOption_Entry : constant GOption_Entry :=
                          (ICS.Null_Ptr, Gchar(ASCII.NUL),
                           0, G_Option_Arg_None, System.Null_Address,
                           ICS.Null_Ptr, ICS.Null_Ptr);
       </spec>
       <body>
   -----------
   -- Parse --
   -----------

   procedure Parse
     (Self         : Goption_Context;
      Command_Line : not null access Glib.Application.Gapplication_Command_Line_Record'Class;
      Filter       : Parse_Filter := null;
      Success      : out Boolean;
      Error        : out Glib.Error.GError)
   is
      function Get_Args
         (Self : System.Address;
          Argc : access Glib.Gint) return chars_ptr_array_access;
      pragma Import (C, Get_Args, "g_application_command_line_get_arguments");

      function Internal
         (Self  : System.Address;
          Argc  : access Glib.Gint;
          Argv  : System.Address;
          Error : System.Address) return Glib.Gboolean;
      pragma Import (C, Internal, "g_option_context_parse");

      pragma Warnings (Off, "possible aliasing problem for*");
      function Convert is new Ada.Unchecked_Conversion
         (System.Address, chars_ptr_array_access);
      pragma Warnings (On, "possible aliasing problem for*");

      Argc : aliased Glib.Gint;
      Argv : chars_ptr_array_access;
      Err  : Glib.Error.GError;
      Ret  : Glib.Gboolean;
   begin
      Argv := Get_Args (Command_Line.Get_Object, Argc'Access);

      if Filter = null then
         Ret := Internal (Get_Object (Self), Argc'Access, Argv'Address, Err'Address);
      else
         declare
            Args : aliased ICS.chars_ptr_array := To_Chars_Ptr (Argv);
            Idx  : aliased Glib.Gint := 1;
         begin
            --  Copy command name argument
            Args (0) := Argv (0);
            Idx := 1;

            for J in 1 .. Argc - 1 loop
               if Filter (ICS.Value (Argv (Interfaces.C.size_t (J)))) then
                  Args (Interfaces.C.size_t (Idx)) :=
                    Argv (Interfaces.C.size_t (J));
                  Idx := Idx + 1;
               end if;
            end loop;

            Argv := Convert (Args'Address);
            Ret := Internal
               (Get_Object (Self), Idx'Access, Argv'Address, Err'Address);
         end;
      end if;

      Error := Err;
      Success := Ret /= 0;
   end Parse;

   -----------
   -- Parse --
   -----------

   procedure Parse
     (Self         : Goption_Context;
      Argv         : access chars_ptr_array_access;  --  Null-terminated
      Success      : out Boolean;
      Error        : out Glib.Error.GError)
   is
      use Interfaces.C;
      function Internal
         (Self  : System.Address;
          Argc  : access Glib.Gint;
          Argv  : access chars_ptr_array_access;
          Error : System.Address) return Glib.Gboolean;
      pragma Import (C, Internal, "g_option_context_parse");

      Err  : Glib.Error.GError;
      Ret  : Glib.Gboolean;
      Argc : aliased Glib.Gint := 0;

   begin
      while Argv.all (size_t (Argc)) /= Null_Ptr loop
         Argc := Argc + 1;
      end loop;

      Ret := Internal (Get_Object (Self), Argc'Access, Argv, Err'Address);
      Argv.all (size_t (Argc)) := Null_Ptr;
      Error := Err;
      Success := Ret /= 0;
   end Parse;
       </body>
     </extra>
   </package>

   <package id="GAction" ada="Glib.Action">
   </package>

   <package id="GSimpleAction" ada="Glib.Simple_Action">
   </package>

   <package id="GActionGroup" ada="Glib.Action_Group">
   </package>

   <package id="GSimpleActionGroup" ada="Glib.Simple_Action_Group">
     <method id="g_simple_action_group_add_entries">
       <parameter name="entries" type="Glib.Action_Map.GAction_Entry_Array"/>
       <parameter name="n_entries" ada="" default="Entries'Length"/>
       <parameter name="user_data" default="System.Null_Address"/>
     </method>
   </package>

   <package id="GActionMap" ada="Glib.Action_Map">
     <record ctype="GActionEntry" private="true" />
     <method id="g_action_map_add_action_entries">
       <parameter name="n_entries" ada="" default="Entries'Length"/>
       <parameter name="user_data" default="System.Null_Address"/>
     </method>
     <extra>
       <type ctype="array_of_ActionEntry" ada="GAction_Entry_Array">
         type GAction_Entry_Array is array (Natural range &lt;&gt;) of GAction_Entry;
       </type>
       <with_spec pkg="Glib.Variant"/>
       <with_spec pkg="Glib.Simple_Action"/>
       <spec>
         type Activate_Callback is access procedure
            (Action    : access Glib.Simple_Action.Gsimple_Action;
             Parameter : Glib.Variant.Gvariant;
             Data      : System.Address);
         pragma Convention (C, Activate_Callback);

         type Change_State_Callback is access procedure
            (Action    : access Glib.Simple_Action.Gsimple_Action;
             Parameter : Glib.Variant.Gvariant;
             Data      : System.Address);
         pragma Convention (C, Change_State_Callback);

         function Build
            (Name           : String;
             Activate       : Activate_Callback := null;
             Parameter_Type : String := "";
             State          : String := "";
             Change_State   : Change_State_Callback := null)
            return GAction_Entry;
         --  Return a newly allocation action entry.
         --  This will be freed by the the action_map when needed.
         --
         --  Name is the name of the action.
         --  Activate is the callback to connect to the "activate" signal of
         --  the action.
         --  Parameter_Type is the type of the parameter that must be passed
         --  to the activate function for this action, given as a single
         --  Gvariant (or the empty string for no parameter).
         --  State is the initial state of this action, given in Gvariant
         --  text format. The state is parsed with no extra type information
         --  so type tags must be added to the string if they are necessary.
         --  Change_State is the callback for the "change-state" signal.
       </spec>
       <with_body pkg="Ada.Unchecked_Conversion" use="false" />
       <body>
         function Convert is new Ada.Unchecked_Conversion
            (Activate_Callback, System.Address);
         function Convert is new Ada.Unchecked_Conversion
            (Change_State_Callback, System.Address);

         function Build
            (Name           : String;
             Activate       : Activate_Callback := null;
             Parameter_Type : String := "";
             State          : String := "";
             Change_State   : Change_State_Callback := null)
            return GAction_Entry
         is
            P, S : chars_ptr := null_ptr;
         begin
            if Parameter_Type /= "" then
               P := New_String (Parameter_Type);
            end if;
            if State /= "" then
               S := New_String (State);
            end if;
            return GAction_Entry'
               (Name           => New_String (Name),
                Activate       => Convert (Activate),
                Parameter_Type => P,
                State          => S,
                Change_State   => Convert (Change_State),
                Padding        => &lt;&gt;);
         end Build;
       </body>
     </extra>
   </package>

   <package id="GtkApplication">
     <enum ctype="GtkApplicationInhibitFlags"/>
     <method id="gtk_application_get_windows" return="WidgetList"/>
   </package>

   <package id="GCancellable" ada="Glib.Cancellable">
     <method id="g_cancellable_make_pollfd" bind="False"/> <!-- requires GPoll_FD -->
   </package>

   <package id="GdkDeviceManager">
      <method id="gdk_device_manager_list_devices" return="DeviceList"/>
      <method id="::device-added" bind="False"/>
      <method id="::device-changed" bind="False"/>
      <method id="::device-removed" bind="False"/>
      <extra>
         <spec>
   function Get_Device_Manager
      (Self : not null access Gdk.Display.Gdk_Display_Record'Class)
      return Gdk.Device_Manager.Gdk_Device_Manager;
   --  Returns the Gdk.Device_Manager.Gdk_Device_Manager associated to
   --  Display.
   --  Since: gtk+ 3.0
         </spec>
         <body>
   function Get_Device_Manager
      (Self : not null access Gdk.Display.Gdk_Display_Record'Class)
       return Gdk.Device_Manager.Gdk_Device_Manager
   is
      function Internal (Self : System.Address) return System.Address;
      pragma Import (C, Internal, "gdk_display_get_device_manager");
      Stub_Gdk_Device_Manager : Gdk.Device_Manager.Gdk_Device_Manager_Record;
   begin
      return Gdk.Device_Manager.Gdk_Device_Manager (Get_User_Data (Internal (Get_Object (Self)), Stub_Gdk_Device_Manager));
   end Get_Device_Manager;
         </body>
      </extra>
   </package>

   <package id="GdkDisplay">
      <method id="gdk_display_get_app_launch_context" bind="False"/> <!-- requires GdkAppLaunchContext -->
      <method id="gdk_display_list_devices" bind="False"/> <!-- deprecated -->
      <method id="gdk_display_get_default_screen" bind="False"/> <!-- in gdk-screen.ads -->
      <method id="gdk_display_get_screen" bind="False"/> <!-- in gdk-screen.ads -->
      <method id="gdk_display_get_pointer" bind="False"/> <!-- deprecated by Gdk.Device.Get_Position -->
      <method id="gdk_display_warp_pointer" bind="False"/> <!-- deprecated, Gdk.Device.Warp -->
      <method id="gdk_display_get_device_manager" bind="False"/> <!-- in gdk-device_manager.ads -->
      <method id="gdk_display_device_is_grabbed" bind="False"/> <!-- circular dependency -->
      <method id="gdk_display_store_clipboard" bind="False"/> <!-- see below -->
      <method id="gdk_display_get_window_at_pointer" bind="False"/> <!-- see below -->
      <extra>
         <spec>
   procedure Store_Clipboard
      (Display          : not null access Gdk_Display_Record;
       Clipboard_Window : Gdk.Gdk_Window;
       Time             : Guint32;
       Targets          : Gdk.Types.Gdk_Atom_Array);
   --  Issues a request to the clipboard manager to store the clipboard data.
   --  On X11, this is a special program that works according to the
   --  freedesktop clipboard specification, available at &lt;ulink
   --  url="http://www.freedesktop.org/Standards/clipboard-manager-spec">
   --  http://www.freedesktop.org/Standards/clipboard-manager-spec&lt;/ulink&gt;>.
   --  Since: gtk+ 2.6
   --  "clipboard_window": a Gdk.Gdk_Window belonging to the clipboard owner
   --  "time_": a timestamp
   --  "targets": an array of targets that should be saved, or null if all
   --  available targets should be saved.
   --  "n_targets": length of the Targets array

   procedure Get_Window_At_Pointer
     (Display : access Gdk_Display_Record;
      Win_X   : out Glib.Gint;
      Win_Y   : out Glib.Gint;
      Win     : out Gdk.Gdk_Window);
   --  Obtains the window underneath the mouse pointer, returning the location
   --  of that window in Win_X, Win_Y. Returns nullif the window
   --  under the mouse pointer is not known to GDK (for example, belongs to
   --  another application).
   --  (Win_X, Win_Y) are relative to the origin of the window under the
   --  pointer.
   --
   --  Obsolescent: use Gdk.Device.Get_Window_At_Position instead.
         </spec>
         <body>
   procedure Store_Clipboard
     (Display          : not null access Gdk_Display_Record;
      Clipboard_Window : Gdk_Window;
      Time             : Guint32;
      Targets          : Gdk.Types.Gdk_Atom_Array)
   is
      procedure Internal
        (Display          : System.Address;
         Clipboard_Window : Gdk_Window;
         Time             : Guint32;
         Targets          : System.Address;
         N_Targets        : Gint);
      pragma Import (C, Internal, "gdk_display_store_clipboard");
   begin
      Internal (Get_Object (Display), Clipboard_Window, Time,
                Targets (Targets'First)'Address, Targets'Length);
   end Store_Clipboard;

   procedure Get_Window_At_Pointer
     (Display : access Gdk_Display_Record;
      Win_X   : out Gint;
      Win_Y   : out Gint;
      Win     : out Gdk_Window)
   is
      function Internal
        (Display : System.Address;
         Win_X   : access Gint;
         Win_Y   : access Gint) return Gdk_Window;
      pragma Import (C, Internal, "gdk_display_get_window_at_pointer");
      X, Y : aliased Gint;
   begin
      Win   := Internal (Get_Object (Display), X'Access, Y'Access);
      Win_X := X;
      Win_Y := Y;
   end Get_Window_At_Pointer;
         </body>
      </extra>
   </package>

   <package id='GtkActivatable'>
      <virtual-method id='*' bind='False'/>
   </package>

   <!-- Below were added just for the sake of parsing the files to get information
        on their symbols, and properly substitute them in the docs.
        No file is generated from them.
   -->

   <package id="GtkNumerableIcon">
     <method id="gtk_numerable_icon_new" ada="Gtk_New"/>
     <method id="gtk_numerable_icon_new_with_style_context" ada="Gtk_New_With_Style_Context"/>
   </package>

  <package id="GtkIMContext">
    <!-- There are issues with binding string parameters for the following
         two methods: -->
    <method id="gtk_im_context_get_preedit_string" bind="False" />
    <method id="gtk_im_context_get_surrounding" bind="False" />
  </package>

</GIR>