summaryrefslogtreecommitdiff
path: root/docs/gtk.texi
blob: 8e018abd4edb0a6fb8ef07cfd10fe5751fe32825 (plain)
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
\input texinfo @c -*-texinfo-*-
@c Copyright (C) 1996 by Peter Mattis. All rights reserved.
@c
@c %**start of header
@setfilename gtk.info
@settitle GTK
@setchapternewpage odd
@include macros.texi
@c %**end of header

@set edition 1.0
@set update-date 29 January 1998
@set update-month January 1998

@ifinfo
This file documents GTK, the General Toolkit

Copyright (C) 1996 Peter Mattis
Copyright (C) 1997 Peter Mattis

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies

@ignore
Permission is granted to process this file throught TeX and print the
results, provided the printed document carries copying permission notice
identical to this one except for the removal of this paragraph (this
paragraph not being relevant to the printed manual).

@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation
approved by Peter Mattis.
@end ifinfo

@titlepage
@title The General Toolkit
@subtitle Version @value{edition}
@subtitle @value{update-month}
@author by Peter Mattis

@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1996 Peter Mattis
@vskip 0pt plus 1fill
Copyright @copyright{} 1997 Peter Mattis

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation
approved by Peter Mattis.
@end titlepage

@dircategory User Interface Toolkit
@direntry
* GTK: (gtk).		The General Toolkit
@end direntry

@node Top, Copying, (dir), (dir)
@top The General Toolkit
@ifinfo
This is edition @value{edition} of the GTK documentation,
@w{@value{update-date}}.
@end ifinfo
@c FIXME: Do a introduction to the GTK?

@menu
* Copying::                     Your rights.
* Overview::                    What is GTK?
* Objects::                     Object overview.
* Signals::                     Signals overview.
* Widgets::                     Widget overview.
* Other Objects::               Utility objects.
* Miscellaneous::               Initialization, exit and other features.
* Examples::                    Using GTK.
* Object Implementation::       Object internals.
* Signal Implementation::       Signal internals.
* Widget Implementation::       Widget internals.
* Function Index::              Index of functions.
* Concept Index::               Index of concepts.
@end menu

@node Copying, Overview, Top, Top
@comment node-name, next, previous, up
@chapter Copying
@cindex Copying

GTK is @dfn{free}; this means that everyone is free to use it and free
to redestribute it on a free basis. GTK is not in the public domain; it
is copyrighted and there are restrictions on its distribution, but
these restrictions are designed to permit everything that a good
cooperating citizen would want to do. What is not allowed is to try to
prevent others from further sharing any version of GTK that they might
get from you.

Specifically, we want to make sure that you have the right to give away
copies of GTK, that you receive source code or else can get it if you
want it, that you can change GTK or use pieces of it in new free
programs, and that you know you can do these things.

To make sure that everyone has such rights, we have to forbid you to
deprive anyone else of these rights. For example, if you distribute
copies of GTK, you must give the recipients all the rights that you
have. You must make sure that they, too, receive or can get the source
code. And you must tell them their rights.

Also, for my own protection, we must make certain that everyone finds
out that there is no warranty for GTK. If GTK is modified by someone
else and passed on, we want their recipients to know that what they have
is not what we distributed, so that any problems introduced by others
will no reflect on our reputation.

The precise conditions of the licenses for GTK are found in the General
Public Licenses that accompanies it.


@node Overview, Objects, Copying, Top
@comment node-name, next, previous, up
@chapter What is GTK?
@cindex Overview

GTK is a library for creating graphical user interfaces similar to the
Motif ``look and feel''. It is designed to be small and efficient, but
still flexible enough to allow the programmer freedom in the interfaces
created. GTK allows the programmer to use a variety of standard user
interface widgets (@pxref{Widgets}) such as push, radio and check
buttons, menus, lists and frames. It also provides several ``container''
widgets which can be used to control the layout of the user interface
elements.

GTK provides some unique features. (At least, I know of no other widget
library which provides them). For example, a button does not contain a
label, it contains a child widget, which in most instances will be a
label. However, the child widget can also be a pixmap, image or any
combination possible the programmer desires. This flexibility is adhered
to throughout the library.


@node Objects, Signals, Overview, Top
@comment node-name, next, previous, up
@chapter Object Overview
@cindex Objects

GTK implements a semi-simple class mechanism and an associated class
hierarchy for widgets and several other useful objects. The GtkObject
type is the root of the class hierarchy. It provides a few items needed
by all classes, the foundation for the signal (@pxref{Signals})
mechanism and the ``destroy'' method.

The class hierarchy is defined by a type hierarchy. This hierarchy
allows queries to be made in regards to a type. The basic query that can
be performed is asking whether a given type has an ``is a'' relation
with another type. For instance, it is common to ask whether a general
widget pointer is a type of specific widget so that runtime sanity
checks can be made.

@section Type utility functions

The @code{GtkTypeInfo} structure is used to communicate information to
@code{gtk_type_unique} as opposed to passing in large numbers of
parameters.

@example
typedef struct _GtkTypeInfo GtkTypeInfo;

struct _GtkTypeInfo
@{
  gchar *type_name;
  guint object_size;
  guint class_size;
  GtkClassInitFunc class_init_func;
  GtkObjectInitFunc object_init_func;
  GtkArgSetFunc arg_set_func;
  GtkArgGetFunc arg_get_func;
@}
@end example

@itemize @bullet
@item
The @code{type_name} field refers to the name of the type. It is
convention for the type name to be the same as the C structure type. For
example, the type name of the @code{GtkObject} structure is
``GtkObject''.

@item
The @code{object_size} field refers to the size in bytes of the C
structure. The easiest (and portable) means of computing this size is by
using the C @code{sizeof} operator. For instance, the sizeof of the
@code{GtkObject} structure is computed by doing @code{sizeof
(GtkObject)}.

@item
The @code{class_size} field refers to the size in bytes of the C
structure for the class. Again, the @code{sizeof} operator should be
used to compute this value.

@item
The @code{class_init_func} field is a callback which is used by the type
mechanism to initialize class specific fields. The single argument this
function takes is a pointer to a class structure.

@item
The @code{object_init_func} field is a callback which is used by the
type mechanism to initialize object specific fields. The single argument
this functions takes is a pointer to an object structure.

@c FIXME!! Document the arg_set_func and arg_get_func..

@end itemize

@deftypefun guint gtk_type_unique (guint @var{parent_type}, GtkTypeInfo *@var{type_info})
The @var{parent_type} is simply the value of the new types parent
type. If @var{parent_type} is 0, then the new type is the root of the
type hierarchy. @var{type_info} is a pointer to a structure which
contains necessary information for construction of the new
type. Specifically, the @code{type_name}, @code{object_size} and
@code{class_size} fields are required. The @code{class_init_func},
@code{object_init_func} and @code{value_init_func} fields may be NULL.
@end deftypefun

@deftypefun gchar* gtk_type_name (guint @var{type})
The returned string is the name of @var{type} as specified to
@code{gtk_type_unique}.
@end deftypefun

@deftypefun guint gtk_type_from_name (guchar *@var{name})
Return the type associated with @var{name}. If there is no type
associated with @var{name}, then 0 will be returned.
@end deftypefun

@deftypefun guint gtk_type_parent (guint @var{type})
Returns the parent type of @var{type} or 0 if @var{type} is the root of
the type hierarchy.
@end deftypefun

@deftypefun gpointer gtk_type_class (guint @var{type})
Returns the initialized class structure for @var{type}. The class
structure is actually created and initialized the first time it is
needed. If creation and initialization occurs, the @code{class_size}
field of the @code{GtkTypeInfo} structure used to initialize this type
is used to determine how large the class structure is. The
@code{class_init_func} field from the @code{GtkTypeInfo} structure is
called for all the members in the types ancestry, including the
type. The order of this invocation proceeds from the root on down. For
example, the @code{GtkWidgetClass} is first initialized as an
@code{GtkObjectClass} by the object class initialization routine and
then by the widget class initialization routine. This allows the widget
class initialization routine to override values set by the object class
initialization routine. The returned structure is shared by all objects
of @var{type} and, as such, should not be modified.
@end deftypefun

@deftypefun gpointer gtk_type_new (guint @var{type})
Returns a new instance of an @var{type} object. The object structure is
created and initialized similarly to the class structure (as described
above). The @code{object_size} and @code{object_init_func} fields of the
@code{GtkTypeInfo} structure are used to determine the objects allocated
size and the object specific initialization routine. Similarly to the
class initialization, all the object initialization routines from the
root on down to the particular type being created are invoked.
@end deftypefun

@deftypefun void gtk_type_describe_heritage (guint @var{type})
Prints the type heritage for @var{type}. The heritage for a type
includes the type and all its parent types up the type tree.
@end deftypefun

@deftypefun void gtk_type_describe_tree (guint @var{type}, gint @var{show_size})
Prints the type tree which starts at @var{type}. @var{show_size} is a
boolean which determines whether type sizes are printed.
@end deftypefun

@deftypefun gint gtk_type_is_a (guint @var{type}, guint @var{is_a_type})
A predicate function which determines whether the relation @var{type}
is_a @var{is_a_type} is true.
@end deftypefun

@deftypefun void gtk_type_get_arg (GtkObject *@var{object}, GtkType @var{type}, GtkArg *@var{arg}, guint @var{arg_id})
@end deftypefun

@deftypefun void gtk_type_set_arg (GtkObject *@var{object}, GtkType @var{type}, GtkArg *@var{arg}, guint @var{arg_id})
@end deftypefun

@section Object functions

The GtkObject type is the root of the type hierarchy used by GTK. It
provides a minimal set of fields used to implement the actual
object, class and signal mechanisms, as well as several utility routines
which make dealing with objects easier.

For the adventurous, see @ref{Object Implementation}.

@deftypefun guint gtk_object_get_type (void)
Returns the @code{GtkObject} type identifier.
@end deftypefun

@deftypefun void gtk_object_class_add_signals (GtkObjectClass *@var{class}, gint *@var{signals}, gint @var{nsignals})
Adds @var{signals} to the @code{signals} field in the GtkObjectClass
structure @var{class}. @xref{Signals}.
@end deftypefun

@deftypefun GtkObject* gtk_object_new (guint @var{type}, @dots{})
@end deftypefun

@deftypefun GtkObject* gtk_object_newv (guint @var{type}, guint @var{nargs}, GtkArg *@var{args})
@end deftypefun

@deftypefun void gtk_object_ref (GtkObject *@var{object});
@end deftypefun

@deftypefun void gtk_object_unref (GtkObject *@var{object});
@end deftypefun

@deftypefun void gtk_object_getv (GtkObject *@var{object}, guint @var{nargs}, GtkArg *@var{args})
@end deftypefun

@deftypefun void gtk_object_set (GtkObject *@var{object}, @dots{})
@end deftypefun

@deftypefun void gtk_object_setv (GtkObject *@var{object}, guint @var{nargs}, GtArg *@var{args})
@end deftypefun

@deftypefun GtkArg* gtk_object_query_args (GtkType @var{class_type}, guint *@var{nargs})
@end deftypefun

@deftypefun void gtk_object_add_arg_type (gchar *@var{arg_name}, GtkType @var{arg_type}, guint @var{arg_id})
@end deftypefun

@deftypefun GtkType gtk_object_get_arg_type (gchar *@var{arg_name})
@end deftypefun


@deftypefun void gtk_object_destroy (GtkObject *@var{object})
Performs checks to make sure it is alright to destroy @var{object} and
then emits the @code{destroy} signal. The check which is performed is to
make sure @var{object} is not already processing another signal. If this
were the case then destroying the object immediately would undoubtedly
cause problems as the other signal would not be able to tell the object
was destroyed. The solution is that if @var{object} is processing another
signal we mark @var{object} is needing to be destroyed. When we finish
processing of the other signal we check whether the object needs to be
destroyed.
@end deftypefun

The GtkObject type provides a mechanism for associating arbitrary
amounts of data with an object. The data is associated with the object
using a character string key. The functions @code{gtk_object_set_data},
@code{gtk_object_get_data}, and @code{gtk_object_remove_data} are the
interface to this mechanism. Two other routines,
@code{gtk_object_set_user_data} and @code{gtk_object_get_user_data},
exist as convenience functions which simply use the same mechanism.

@deftypefun void gtk_object_set_data (GtkObject *@var{object}, const char *@var{key}, gpointer @var{data})
Associate @var{data} with @var{key} in the data list of @var{object}.
@end deftypefun

@deftypefun gpointer gtk_object_get_data (GtkObject *@var{object}, const char *@var{key})
Retrieve the data associated with @var{key} in the data list of @var{object}.
@end deftypefun

@deftypefun void gtk_object_remove_data (GtkObject *@var{object}, const char *@var{key})
Remove the data associated with @var{key} in the data list of @var{object}.
@end deftypefun

@deftypefun void gtk_object_set_user_data (GtkObject *@var{object}, gpointer @var{data})
Sets @var{data} into the @code{user_data} field of @var{object}.
@end deftypefun

@deftypefun gpointer gtk_object_get_user_data (GtkObject *@var{object})
Returns the @code{user_data} field of @var{object}.
@end deftypefun

@c ------------ Is this depreceated? -----------------

The GtkObject type also provides a mechanism for specifying
initialization values for fields. This general mechanism is called
object value stacks. The reason for using value stacks is that they can
simplify the life of the programmer. For instance, by default widgets
are non-visible when created. However, the ``visible'' value for widgets
may be specified so that widgets are made visible when created. (FIXME:
unfinished).

@deftypefun void gtk_object_value_stack_new (guint @var{object_type}, const gchar *@var{value_id}, GtkParamType @var{value_type})
@end deftypefun

@deftypefun void gtk_object_push_value (guint @var{object_type}, const gchar *@var{value_id}, @dots{})
Push a value on the value stack specified by @var{object_type} and
@var{value_id}. The type of value is implicitly given in the context of
@var{object_type} and @var{value_id}. (That is, it is not specified
explicitly in the function call). Only a single extra argument is
expected which is the data which is to be placed on the stack.
@end deftypefun

@deftypefun void gtk_object_pop_value (guint @var{object_type}, const gchar *@var{value_id})
Pop a value of the value stack specified by @var{object_type} and
@var{value_id}.
@end deftypefun

@deftypefun gint gtk_object_peek_value (guint @var{object_type}, const gchar *@var{value_id}, gpointer @var{data})
Peek at the value on the top of the value stack specified by
@var{object_type} and @var{value_id}. The @var{data} argument is
interpreted as the location of where to place the ``peeked'' data. For
instance, if the peeked data is of type @code{GTK_PARAM_POINTER}, then
@var{data} will be a pointer to a pointer. If the value stack is empty
or does not exist or an error occurs, @code{gtk_object_peek_value} will
return @code{FALSE}. On success it will return @code{TRUE}.
@end deftypefun


@node Signals, Widgets, Objects, Top
@comment node-name, next, previous, up
@chapter Signals Overview
@cindex Signals

Signals are GTK's method for objects to perform callbacks. A signal is
an event which occurs upon an object. The programmer can connect to a
signal of an object which involves specifying a function to be called
when that signal is emitted in the specified object.

When a signal is emitted, both the class function associated with the
signal (when it was defined) and all signal handlers installed for that
signal on the particular object emitting the signal are called. The
widget programmer can specify whether the class function is to be called
before after or both before and after the signal handlers installed by
the widget user. The widget user can, however, specify that their signal
handler is to be run after the class function (using the ``_after''
signal connection routines). Any signal handling function can emit the
same signal on the same object while it is running causing that signal
emittion to either restart or to run recursively. Additionally, signal
emittion can be terminated prematurely. While both such abilities are
rarely used, they do allow for greater flexibility in regards to
signals. For instance, a programmer can attach to the key press event
signal and intercept all tab key presses from a widget. This particular
example is used in the file selection dialog to implement tab completion
of filenames and prevent the entry widget from inserting the tab into
its buffer.

Signals are selected using either an integer identifier or a character
string name. It is convention to name the signal the same as the class
function which is associated with it. There are two versions of most of
the signal functions, one which takes an integer identifier and one
which takes a character string name for the signal.

@deftypefun gint gtk_signal_new (gchar *@var{name}, GtkSignalRunType @var{run_type}, gint @var{object_type}, gint @var{function_offset}, GtkSignalMarsahller @var{marshaller}, GtkParamType @var{return_val}, gint @var{nparams}, @dots{})
Create a new signal and give it the character string identifier
@var{name}. @var{name} needs to be unique in the context of
@var{object_type}'s branch of the class hierarchy. That is,
@var{object_type} cannot create a signal type with the same name as a
signal type created by one of its parent types.

@var{run_type} specifies whether the class function should be run before
(@code{GTK_RUN_FIRST}), after (@code{GTK_RUN_LAST}) or both before and
after normal signal handlers (@code{GTK_RUN_BOTH}). Additionally, the
@code{GTK_RUN_NO_RECURSE} value can be or'ed with any of those values to
specify that the signal should not be recursive. By default, emitting
the same signal on the same widget will cause the signal to be emitted
twice. However, if the @code{GTK_RUN_NO_RECURSE} flag is specified,
emitting the same signal on the same widget will cause the current
signal emittion to be restarted. This allows the widget programmer to
specify the semantics of signal emittion on a per signal
basis. (The @code{GTK_RUN_NO_RECURSE} flag is used by the GtkAdjustment
widget).

The @var{function_offset} is the byte offset from the start of the class
structure to the class function field within the class structure. The
easiest means to compute this offset is by using the
@code{GTK_SIGNAL_OFFSET} macro which takes the class structure type as
the first argument and the field as the second argument. For example,
@code{GTK_SIGNAL_OFFSET (GtkObjectClass, destroy)} will give the offset
of the @code{destroy} class function within the
@code{GtkObjectClass}. Note: An offset is specified instead of an
absolute location since there will be multiple instances of a class
structure being referenced. (The @code{GtkWidgetClass} structure ``is
a'' @code{GtkObjectClass} structure, etc.)

The @var{marshaller} function is used to invoke a signal handler. Since
signal handlers may take different parameters and return values and a
general mechanism for invoking them is not apparent, the approach of
making the signal creator responsible for invoking the signal handler
was taken. (FIXME: unfinished).

The @var{return_val} and @var{nparams} and the remaining arguments
specify the return value and the arguments to the signal handler
respectively. Note: There is an implicit first argument to every signal
handler which is the widget the signal has been emitted from. The
variable argument list (@var{@dots{}}) specifies the types of the
arguments. These can be one of @code{GTK_PARAM_CHAR},
@code{GTK_PARAM_SHORT}, @code{GTK_PARAM_INT}, @code{GTK_PARAM_LONG},
@code{GTK_PARAM_POINTER} or @code{GTK_PARAM_FUNCTION}. It is undefined
to specify @code{GTK_PARAM_NONE} as an argument type, however it is ok
to use @code{GTK_PARAM_NONE} for @var{return_val}. (This corresponds to
returning a @code{void}).

@code{gtk_signal_new} returns the integer identifier of the newly
created signal. Signal identifiers start numbering at 1 and increase
upwards. A value of -1 will be returned if an error occurs.

@strong{Note:} @code{gtk_signal_new} is only needed by widget writers. A
normal user of GTK will never needed to invoke this function.
@end deftypefun

@deftypefun gint gtk_signal_lookup (gchar *@var{name}, gint @var{object_type})
Returns the integer identifier for the signal referenced by @var{name}
and @var{object_type}. If @var{object_type} does not define the signal
@var{name}, then the signal is looked for in @var{object_type}'s parent
type recursively.
@end deftypefun

@deftypefun gchar* gtk_signal_name (gint @var{signal_num})
@end deftypefun

@deftypefun gint gtk_signal_emit (GtkObject *@var{object}, gint @var{signal_type}, @dots{})
Emit the signal specified by the integer identifier @var{signal_type}
from @var{object}. If an error occurs, @code{gtk_signal_emit} will
return @code{FALSE} and will return @code{TRUE} on success. The signal
definition determines the parameters passed in the variable argument
list (@code{@dots{}}). For example, if the signal is defined as:

@example
  gint (* event) (GtkWidget *widget, GdkEvent *event);
@end example

Then a call to emit the ``event'' signal would look like:

@example
  GdkEvent event;
  gint return_val;
  @dots{}
  gtk_signal_emit (some_object,
                   gtk_signal_lookup ("event",
                     GTK_OBJECT_TYPE (some_object)),
                   &event, &return_val);
@end example

Notice that the @code{widget} argument is implicit in that the first
argument to every signal is a type derived from @code{GtkObject}. The
@var{return_val} argument is actually a pointer to the return value type
since the signal mechanism needs to be able to place the return value in
an actual location. And lastly, the @code{gtk_signal_lookup} call is
normally avoided by using the @code{gtk_signal_emit_by_name} function
instead. @code{gtk_signal_emit} is normally used internally by widgets
which know the signal identifier (since they defined the signal) and can
therefore side-step the cost of calling @code{gtk_signal_lookup}.
@end deftypefun

@deftypefun gint gtk_signal_emit_by_name (GtkObject *@var{object}, gchar *@var{name}, @dots{})
Similar to @code{gtk_signal_emit} except that the signal is referenced
by @var{name} instead of by its integer identifier.
@end deftypefun

@deftypefun void gtk_signal_emit_stop (GtkObject *@var{object}, gint @var{signal_type})
Stop the emission of the signal @var{signal_type} on
@var{object}. @var{signal_type} is the integer identifier for the signal
and can be determined using the function
@code{gtk_signal_lookup}. Alternatively, the function
@code{gtk_signal_emit_stop_by_name} can be used to refer to the signal
by name. Attempting to stop the emission of a signal that isn't being
emitted does nothing.
@end deftypefun

@deftypefun void gtk_signal_emit_stop_by_name (GtkObject *@var{object}, gchar *@var{name})
Similar to @code{gtk_signal_emit_stop} except that the signal is
referenced by @var{name} instead of by its integer identifier.
@end deftypefun

@deftypefun gint gtk_signal_connect (GtkObject *@var{object}, gchar *@var{name}, GtkSignalFunc @var{func}, gpointer @var{func_data})
Connects a signal handling function to a signal emitting
object. @var{func} is connected to the signal @var{name} emitted by
@var{object}. The arguments and returns type of @var{func} should match
the arguments and return type of the signal @var{name}. However,
@var{func} may take the extra argument of @var{func_data}. Due to the C
calling convention it is ok to ignore the extra argument. (It is ok to
ignore all the arguments in fact).

@code{gtk_signal_connect} returns an integer identifier for the
connection which can be used to refer to it in the future. Specifically
it is useful for removing the connection and/or blocking it from being
used.
@end deftypefun

@deftypefun gint gtk_signal_connect_after (GtkObject *@var{object}, gchar *@var{name}, GtkSignalFunc @var{func}, gpointer @var{func_data})
Similar to @code{gtk_signal_connect} except the signal handler is
connected in the ``after'' slot. This allows a signal handler to be
guaranteed to run after other signal handlers connected to the same
signal on the same object and after the class function associated with
the signal.

Like @code{gtk_signal_connect}, @code{gtk_signal_connect_after} returns
an integer identifier which can be used to refer to the connection.
@end deftypefun

@deftypefun gint gtk_signal_connect_object (GtkObject *@var{object}, gchar *@var{name}, GtkSignalFunc @var{func}, GtkObject *@var{slot_object})
Connects @var{func} to the signal @var{name} emitted by
@var{object}. Similar to @code{gtk_signal_connect} with the difference
that @var{slot_object} is passed as the first parameter to @var{func}
instead of the signal emitting object. This can be useful for connecting
a signal emitted by one object to a signal in another object. A common
usage is to connect the ``destroy'' signal of dialog to the ``clicked''
signal emitted by a ``close'' button in the dialog. That is, the
``clicked'' signal emitted by the button will caused the ``destroy''
signal to be emitted for the dialog. This is also the ``right'' way to
handle closing of a dialog since the ``destroy'' signal will be sent if
the dialog is deleted using a window manager function and this enables
the two methods of closing the window to be handled by the same
mechanism. Returns an integer identifier which can be used to refer to
the connection.
@end deftypefun

@deftypefun gint gtk_signal_connect_object_after (GtkObject *@var{object}, gchar *@var{name}, GtkSignalFunc @var{func}, GtkObject *@var{slot_object})
Similar to @code{gtk_signal_connect_object} except the signal handler is
connected in the ``after'' slot. This allows a signal handler to be
guaranteed to run after other signal handlers connected to the same
signal on the same object and after the class function associated with
the signal. Returns an integer identifier which can be used to refer to
the connection.
@end deftypefun

@deftypefun gint gtk_signal_connect_interp (GtkObject *@var{object}, gchar *@var{name}, GtkCallbackMarshal @var{func}, gpointer @var{data}, GtkDestroyNotify @var{destroy_func}, gint @var{after})
@end deftypefun

@deftypefun void gtk_signal_disconnect (GtkObject *@var{object}, gint @var{id})
Disconnects a signal handler from an object. The signal handler is
identified by the integer @var{id} which is returned by the
@code{gtk_signal_connect*} family of functions.
@end deftypefun

@deftypefun void gtk_signal_disconnect_by_data (GtkObject *@var{object}, gpointer @var{data})
Disconnects a signal handler from an object. The signal handler is
identified by the @var{data} argument specified as the @var{func_data}
argument to the @code{gtk_signal_connect*} family of functions. For the
@code{gtk_signal_connect_object*} functions, @var{data} refers to the
@var{slot_object}.

@strong{Note:} This will remove all signal handlers connected to
@var{object} which were connected using @var{data} as their
@var{func_data} argument. Multiple signal handlers may be disconnected
with this call.
@end deftypefun

@deftypefun void gtk_signal_handler_block (GtkObject *@var{object}, gint @var{id})
Blocks calling of a signal handler during signal emission. The signal
handler is identified by the integer @var{id} which is returned by the
@code{gtk_signal_connect*} family of functions. If the signal is already
blocked no change is made.
@end deftypefun

@deftypefun void gtk_signal_handler_block_by_data (GtkObject *@var{object}, gint @var{data})
Blocks calling of a signal handler during signal emission. The signal
handler is identified by the @var{data} argument specified as the
@var{func_data} argument to the @code{gtk_signal_connect*} family of
functions. For the @code{gtk_signal_connect_object*} functions,
@var{data} refers to the @var{slot_object}. If the signal is already
blocked no change is made.

@strong{Note:} This will block all signal handlers connected to
@var{object} which were connected using @var{data} as their
@var{func_data} argument. Multiple signal handlers may be blocked
with this call.
@end deftypefun

@deftypefun void gtk_signal_handler_unblock (GtkObject *@var{object}, gint @var{id})
Unblocks calling of a signal handler during signal emission. The signal
handler is identified by the integer @var{id} which is returned by the
@code{gtk_signal_connect*} family of functions. If the signal is already
unblocked no change is made.
@end deftypefun

@deftypefun void gtk_signal_handler_unblock_by_data (GtkObject *@var{object}, gint @var{data})
Unblocks calling of a signal handler during signal emission. The signal
handler is identified by the @var{data} argument specified as the
@var{func_data} argument to the @code{gtk_signal_connect*} family of
functions. For the @code{gtk_signal_connect_object*} functions,
@var{data} refers to the @var{slot_object}. If the signal is already
unblocked no change is made.

@strong{Note:} This will unblock all signal handlers connected to
@var{object} which were connected using @var{data} as their
@var{func_data} argument. Multiple signal handlers may be unblocked
with this call.
@end deftypefun

@deftypefun void gtk_signal_handlers_destroy (GtkObject *@var{object})
Destroy all of the signal handlers connected to @var{object}. There
should normally never be reason to call this function as it is called
automatically when @var{object} is destroyed.
@end deftypefun

@deftypefun void gtk_signal_default_marshaller (GtkObject *@var{object}, GtkSignalFunc @var{func}, gpointer @var{func_data}, GtkSignalParam *@var{params})
@code{gtk_signal_new} requires a callback in order to actually call a
signal handler for a particular signal. The vast majority of signals are
of the particular form:

@example
  (* std_signal) (gpointer std_arg);
@end example

@code{gtk_signal_default_marshaller} is a signal marshaller which
marshals arguments for a signal of that form.
@end deftypefun

@deftypefun void gtk_signal_set_funcs (GtkSignalMarshal @var{marshal_func}, GtkSignalDestroy @var{destroy_fun})
@end deftypefun


@node Widgets, Other Objects, Signals, Top
@comment node-name, next, previous, up
@chapter Widget Overview
@cindex Widgets


Widgets are the general term used to describe user interface objects. A
widget defines a class interface that all user interface objects conform
to. This interface allows a uniform method for dealing with operations
common to all objects such as hiding and showing, size requisition and
allocation and events.

The common interface that widgets must adhere to is described by the
GtkWidget and GtkWidgetClass structure. For the purposes of using GTK
these structures can be considered read-only and, for the most part,
opaque.

All widget creation routines in GTK return pointers to GtkWidget
structures. In reality, all widget creation routines create structures
that can be viewed as equivalent to the GtkWidget structure, but often
have contain additional information. @xref{Object Implementation}

The widgets available for use are implemented in a hierarchy. Several
widgets exist solely as common bases for more specific widgets. For
example, it is not possible to create a ruler widget itself, but the
ruler widget provides a base and functionality common to the horizontal
and vertical rulers.

The available widgets (in alphabetical order):

@menu
* GtkAlignment::                The alignment widget.
* GtkArrow::                    The arrow widget.
* GtkAspectFrame::		The aspect frame widget.
* GtkBin::                      The bin widget.
* GtkBox::                      The box widget.
* GtkButtonBox::		The button box widget.
* GtkButton::                   The button widget.
* GtkCheckButton::              The check button widget.
* GtkCheckMenuItem::            The check menu item widget.
* GtkCList::			The compound list widget.
* GtkColorSelection::		The color selector widget.
* GtkCombo::			The combo box widget.
* GtkContainer::                The container widget.
* GtkCurve::			The curve widget.
* GtkDialog::                   The dialog widget.
* GtkDrawingArea::              The drawing area widget.
* GtkEntry::                    The entry widget.
* GtkEventBox::			The event box widget.
* GtkFileSelection::            The file selection dialog widget.
* GtkFixed::			The fixed widget.
* GtkFrame::                    The frame widget.
* GtkGamma::			The gamma widget.
* GtkHBox::                     The horizontal box widget.
* GtkHButtonBox::		The horizontal button box widget.
* GtkHPaned::			The horizontal paned widget.
* GtkHRuler::                   The horizontal ruler widget.
* GtkHScale::                   The horizontal scale widget.
* GtkHScrollbar::               The horizontal scrollbar widget.
* GtkHSeparator::               The horizontal separator widget.
* GtkImage::                    The image widget.
* GtkInputDialog::		The input dialog widget.
* GtkItem::                     The item widget.
* GtkLabel::                    The label widget.
* GtkList::                     The list widget.
* GtkListItem::                 The list item widget.
* GtkMenu::                     The menu widget.
* GtkMenuBar::                  The menu bar widget.
* GtkMenuItem::                 The menu item widget.
* GtkMenuShell::                The menu shell widget.
* GtkMisc::                     The misc widget.
* GtkNotebook::                 The notebook widget.
* GtkOptionMenu::               The option menu widget.
* GtkPaned::			The paned widget.
* GtkPixmap::                   The pixmap widget.
* GtkPreview::                  The preview widget.
* GtkProgressBar::              The progress bar widget.
* GtkRadioButton::              The radio button widget.
* GtkRadioMenuItem::            The radio menu item widget.
* GtkRange::                    The range widget.
* GtkRuler::                    The ruler widget.
* GtkScale::                    The scale widget.
* GtkScrollbar::                The scrollbar widget.
* GtkScrolledWindow::           The scrolled window widget.
* GtkSeparator::                The separator widget.
* GtkStatusbar::		The statusbar widget.
* GtkTable::                    The table widget.
* GtkText::                     The text widget.
* GtkToggleButton::             The toggle button widget.
* GtkToolbar::			The tool bar widget.
* GtkTooltips::			The tool tips widget.
* GtkTree::                     The tree widget.
* GtkTreeItem::                 The tree item widget.
* GtkVBox::                     The vertical box widget.
* GtkVButtonBox::		The vertical button box widget.
* GtkViewport::                 The viewport widget.
* GtkVPaned::			The vertical paned widget.
* GtkVRuler::                   The vertical ruler widget.
* GtkVScale::                   The vertical scale widget.
* GtkVScrollbar::               The vertical scrollbar widget.
* GtkVSeparator::               The vertical separator widget.
* GtkWidget::                   The base widget type.
* GtkWindow::                   The window widget.
@end menu

@node GtkAlignment, GtkArrow, Widgets, Widgets
@comment node-name, next, previous, up
@section The alignment widget


@subsection Description

The alignment widget is a container (@pxref{GtkContainer}) derived from
the bin widget (@pxref{GtkBin}). Its entire purpose is to give the
programmer flexibility in how the child it manages is positioned when a
window is resized.

Normally, a widget is allocated at least as much size as it
requests. (@pxref{GtkContainer} for a discussion of geometry
management). When a widget is allocated more size than it requests there
is a question of how the widget should expand. By convention, most GTK
widgets expand to fill their allocated space. Sometimes this behavior is
not desired. The alignment widget allows the programmer to specify how a
widget should expand and position itself to fill the area it is
allocated.

@subsection Options

@defopt xscale
@defoptx yscale
The @var{xscale} and @var{yscale} options specify how to scale the child
widget. If the scale value is 0.0, the child widget is allocated exactly
the size it requested in that dimension. If the scale value is 1.0, the
child widget is allocated all of the space in a dimension. A scale value
of 1.0 for both x and y is equivalent to not using an alignment widget.
@end defopt

@defopt xalign
@defoptx yalign
The @var{xalign} and @var{yalign} options specify how to position the
child widget when it is not allocated all the space available to it
(because the @var{xscale} and/or @var{yscale} options are less than
1.0). If an alignment value is 0.0 the widget is positioned to the left
(or top) of its allocated space. An alignment value of 1.0 positions the
widget to the right (or bottom) of its allocated space. A common usage
is to specify @var{xalign} and @var{yalign} to be 0.5 which causes the
widget to be centered within its allocated area.
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_alignment_get_type (void)
Returns the @code{GtkAlignment} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_alignment_new (gfloat @var{xalign}, gfloat @var{yalign}, gfloat @var{xscale}, gfloat @var{yscale})
Create a new @code{GtkAlignment} object and initialize it with the
values @var{xalign}, @var{yalign}, @var{xscale} and @var{yscale}. The
new widget is returned as a pointer to a @code{GtkWidget}
object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_alignment_set (GtkAlignment *@var{alignment}, gfloat @var{xalign}, gfloat @var{yalign}, gfloat @var{xscale}, gfloat @var{yscale})
Set the @var{xalign}, @var{yalign}, @var{xscale} and @var{yscale} options
of an alignment widget. It is important to not set the fields of the
@code{GtkAlignment} structure directly (or, for that matter, any type
derived from @code{GtkObject}).
@end deftypefun

@gtkstdmacros{Alignment, ALIGNMENT}

@page
@node GtkArrow, GtkAspectFrame, GtkAlignment, Widgets
@comment node-name, next, previous, up
@section The arrow widget

@subsection Description

The arrow widget is derived from the misc widget (@pxref{GtkMisc}) and
is intended for use where a directional arrow (in one of the four
cardinal directions) is desired. As such, it has very limited
functionality and basically only draws itself in a particular direction
and with a particular shadow type. The arrow widget will expand to fill
all the space it is allocated.

@subsection Options

@defopt arrow_type
The @var{arrow_type} option specifies which direction the arrow will
point. It can be one of @code{GTK_ARROW_UP}, @code{GTK_ARROW_DOWN},
@code{GTK_ARROW_LEFT} or @code{GTK_ARROW_RIGHT}. This will set the arrow
pointing in the direction specified.
@end defopt

@defopt shadow_type
The @var{shadow_type} option specifies how to draw the shadow for the
arrow. Currently, only the @code{GTK_SHADOW_IN} and
@code{GTK_SHADOW_OUT} shadow types are supported for drawing
arrows. Other shadow types will cause nothing to be drawn.
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_arrow_get_type (void)
Returns the @code{GtkArrow} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_arrow_new (GtkArrowType @var{arrow_type}, GtkShadowType @var{shadow_type})
Create a new @code{GtkArrow} object and initialize it with the values
@var{arrow_type} and @var{shadow_type}. The new widget is returned as a
pointer to a @code{GtkWidget} object. @code{NULL} is returned on
failure.
@end deftypefun

@deftypefun void gtk_arrow_set (GtkArrow *@var{arrow}, GtkArrowType @var{arrow_type}, GtkShadowType @var{shadow_type})
Set the @var{arrow_type} and @var{shadow_type} options of an arrow
widget. It is important to not set the fields of the @code{GtkArrow}
structure directly (or, for that matter, any type derived from
@code{GtkObject}).
@end deftypefun

@gtkstdmacros{Arrow, ARROW}


@page
@node GtkAspectFrame, GtkBin, GtkArrow, Widgets
@comment node-name, next, previous, upa
@section The aspect frame widget

@subsection Description

@subsection Options

@defopt label
@end defopt

@defopt xalign
@end defopt

@defopt yalign
@end defopt

@defopt ratio
@end defopt

@defopt obey_child
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_aspect_frame_get_type (void)
Returns the @code{GtkAspectFrame} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_aspect_frame_new (gchar *@var{label}, gfloat @var{xalign}, gfloat @var{yalign}, gfloat @var{ratio}, gint @var{obey_child})
Create a new @code{GtkAspectFrame} object and initialize it with the values 
@var{label}, @var{xalign}, @var{yalign}, @var{ratio} and @var{obey_child}.
The new widget is returned as a pointer to a @code{GtkWidget} object. 
@code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_aspect_frame_set (GtkAspectFrame *@var{aspect_frame}, gfloat @var{xalign}, gfloat @var{yalign}, gfloat @var{ratio}, gint @var{obey_child})
@end deftypefun


@gtkstdmacros{AspectFrame, ASPECT_FRAME}

@page
@node GtkBin, GtkBox, GtkAspectFrame, Widgets
@comment node-name, next, previous, up
@section The bin widget

@subsection Description

The bin widget is a container (@pxref{GtkContainer}) derived from the
container widget. It is an abstract base class. That is, it is not
possible to create an actual bin widget. It exists only to provide a
base of functionality for other widgets. Specifically, the bin widget
provides a base for several other widgets that contain only a single
child. These widgets include alignments (@pxref{GtkAlignment}), frames
(@pxref{GtkFrame}), items (@pxref{GtkItem}), viewports
(@pxref{GtkViewport}) and windows (@pxref{GtkWindow})

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_bin_get_type (void)
Returns the @code{GtkBin} type identifier.
@end deftypefun

@gtkstdmacros{Bin, BIN}


@page
@node GtkBox, GtkButtonBox, GtkBin, Widgets
@comment node-name, next, previous, up
@section The box widget


@subsection Description

The box widget is a container (@pxref{GtkContainer}) derived from the
container widget. It is an abstract base class used by the horizontal
box (@pxref{GtkHBox}), the vertical box (@pxref{GtkVBox}) and the 
(@pxref{GtkButtonBox}) widgets to provide a base of common functionality.

A box provides an abstraction for organizing the position and size of
widgets. Widgets in a box are layed out horizontally or vertically. By
using a box widget appropriately, a programmer can control how widgets
are positioned and how they will be allocated space when a window gets
resized.

The key attribute of boxes is that they position their children in a
single row (horizontal boxes) or column (vertical boxes). In the case of
horizontal boxes, all children are stretched vertically. The vertical
size of the box is determined by the largest vertical requisition of all
of its children. Similarly, a vertical box streches all of its children
horizontally. The horizontal size (of the vertical box) is determined by
the largest horizontal requisition of all of its children. An alignment
widget (@pxref{GtkAlignment}) can be used to control child allocation
more precisely on a per child basis.

The second attribute of boxes is how they expand children. In the case
of a horizontal box, the main control is over how children are expanded
horizontally to fill the allocated area. (The rest of this discussion
will focus on horizontal boxes but it applies to vertical boxes as
well).

There are two flags which can be set controlling how a widget is
expanded horizontally in a horizontal box. These are the @code{expand}
and @code{fill}. There operation is fairly simple. If @code{expand} is
set, the childs potentially allocated area will expand to fill available
space. If @code{fill} is set, the childs actual allocated area will be
its potentially allocated area. There is a difference between
the potentially area (which is the area the box widget sets aside for
the child) and the actual allocated area (which is the area the box
widget actual allocates for the widget via
@code{gtk_widget_size_allocate}).

The allocation of space to children occurs as follows (for horizontal
boxes):
@enumerate
@item
All children are allocated at least their requested size horizontally
and the maximum requested child size vertically.

@item
Any child with the @code{expand} flag set is allocated @code{extra_width
/ nexpand_children} extra pixels horizontally. If the @code{homogeneous}
flag was set, all children are considered to have the @code{expand} flag
set. That is, all children will be allocated the same area.The
horizontal box is a fair widget and, as such, divides up any extra
allocated space evenly among the ``expand'' children. (Those children
which have the @code{expand} flag set). The exception occurs when
@code{extra_width / nexpand_children} does not divide cleanly. The extra
space is given to the last widget.

@item
@code{spacing} number of pixels separate each child. Note: The
separation is between the potentially allocated area for each child and
not the actual allocated area. The @code{padding} value associated with
each child causes that many pixels to be left empty to each side of the
child.

@item
If a child has the @code{fill} flag set it is allocated its potentially
allocated area. If it does not, it is allocated its requested size
horizontally and centered within its potentially allocated area. Its
vertical allocation is still the maximum requested size of any child.

@item
Children placed at the start of the box are placed in order of addition
to the box from left to right in the boxes allocated area.. Children
placed at the end of the box are placed in order of addition from right
to left in the boxes allocated area.
@end enumerate

@xref{GtkHBox}, and @ref{GtkVBox}, for code examples of using horizontal
and vertical boxes.

@subsection Options

@defopt expand
@end defopt

@defopt fill
@end defopt

@defopt padding
@end defopt

@defopt expand
@end defopt

@c FIXME: options for GtkBox

@subsection Signals

@subsection Functions

@deftypefun guint gtk_box_get_type (void)
Returns the @code{GtkBox} type identifier.
@end deftypefun

@deftypefun void gtk_box_pack_start (GtkBox *@var{box}, GtkWidget *@var{child}, gint @var{expand}, gint @var{fill}, gint @var{padding})
Add @var{child} to the front of @var{box}. The flags @var{expand} and
@var{fill} and the padding value of @var{padding} are associated with
@var{child}.
@end deftypefun

@deftypefun void gtk_box_pack_end (GtkBox *@var{box}, GtkWidget *@var{child}, gint @var{expand}, gint @var{fill}, gint @var{padding})
Add @var{child} to the end of @var{box}. The flags @var{expand} and
@var{fill} and the padding value of @var{padding} are associated with
@var{child}.
@end deftypefun

@deftypefun void gtk_box_pack_start_defaults (GtkBox *@var{box}, GtkWidget *@var{widget})
A convenience function which is equivalent to the following:

@example
  gtk_box_pack_start (@var{box}, @var{widget}, TRUE, TRUE, 0);
@end example
@end deftypefun

@deftypefun void gtk_box_pack_end_defaults (GtkBox *@var{box}, GtkWidget *@var{widget})
A convenience function which is equivalent to the following:

@example
  gtk_box_pack_start (@var{box}, @var{widget}, TRUE, TRUE, 0);
@end example
@end deftypefun

@deftypefun void gtk_box_set_homogeneous (GtkBox *@var{box}, gint @var{homogeneous})
Set the homogeneous setting of this box to @var{homogeneous}.
@end deftypefun

@deftypefun void gtk_box_set_spacing (GtkBox *@var{box}, gint @var{spacing})
@end deftypefun

@deftypefun void gtk_box_reorder_child (GtkBox *@var{box}, GtkWidget *@var{child}, guint @var{pos})
@end deftypefun

@deftypefun void gtk_box_query_child_packing (GtkBox *@var{box}, GtkWidget *@var{child}, gint *@var{expand}, gint *@var{fill}, gint *@var{padding}, GtkPackType *@var{pack_type})
@end deftypefun

@deftypefun void gtk_box_set_child_packing (GtkBox *@var{box}, GtkWidget *@var{child}, gint @var{expand}, gint @var{fill}, gint @var{padding}, GtkPackType *@var{pack_type})
@end deftypefun

@gtkstdmacros{Box, BOX}


@page
@node GtkButtonBox, GtkButton, GtkBox, Widgets
@comment node-name, next, previous, up
@section The button box widget

@subsection Description
The button box widget is a container (@pxref{GtkContainer}) derived from the
(@pxref{GtkBox}) widget. It is an abstract base class used by the horizontal
button box (@pxref{GtkHButtonBox}) and the vertical button box 
(@pxref{GtkVButtonBox}) widgets to provide a base of common functionality.

The button box, like the box widget, (@pxref{GtkBox}) provides an abstraction
for organizing position and size of wigets. In the case of the button box
it is targeted at the button widget,(@pxref{GtkButton}). Button widgets are
layed in the box horizontally or vertically. By using a button box widget 
appropeiately, a programmer can control how the button widgets are positioned
and how they will be allocated space when a window gets resized.
 
@subsection Options
@defopt layout_style
@itemize @bullet
@itemize @bullet
@item 
@code{GTK_BUTTONBOX_SPREAD}
@end itemize

@item
The layout style @code{GTK_BUTTONBOX_SPREAD} will spread the buttons out
evenly within the button box. When the parent window is resized they will
re-adjust to the new window dimensions. The @code{gtk_button_box_set_spacing}
function will set the minimum space that the buttons will leave between
themselves.

@itemize @bullet
@item
@code{GTK_BUTTONBOX_EDGE}
@end itemize
@item

@itemize @bullet
@item
@code{GTK_BUTTONBOX_START}
@end itemize

@item
The layout style @code{GTK_BUTTONBOX_START} will place the buttons at the
start of the button box, taking into account the spacing as set by the
@code{gtk_button_box_set_spacing} function. The buttons will not move
when the parent window is re-sized. 

@itemize @bullet
@item
@code{GTK_BUTTONBOX_END}
@end itemize

@item
The layout style @code{GTK_BUTTONBOX_END} will place the buttons at the
end of the button box, taking into account the spacing as set by the
@code{gtk_button_box_set_spacing} function. Again like the
@code{GTK_BUTTONBOX_START} layout style the buttons will not move when
the parent window is re-sized.
@end itemize
@end defopt

@defopt width
@end defopt

@defopt height
@end defopt

@defopt ipad_x
@defoptx ipad_y
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_button_box_get_type (void)
Returns the @code{GtkButtonBox} type identifier.
@end deftypefun

@deftypefun void gtk_button_box_set_child_size_default (gint @var{width}, gint@var{height})
@end deftypefun

@deftypefun void gtk_button_box_set_child_ipadding_default (gint @var{ipad_x}, gint @var{ipad_y})
@end deftypefun

@deftypefun void gtk_button_box_get_child_size_default (gint *@var{width}, gint *@var{height})
@end deftypefun

@deftypefun void gtk_button_box_get_child_ipadding_default (gint *@var{ipad_x}, gint *@var{ipad_y})
@end deftypefun

@deftypefun void gtk_button_box_set_child_size (GtkButtonBox *@var{widget}, gint @var{width}, gint @var{height})
@end deftypefun

@deftypefun void gtk_button_box_set_child_ipadding (GtkButtonBox *@var{widget}, gint @var{ipad_x}, gint @var{ipad_y})
@end deftypefun

@deftypefun void gtk_button_box_set_layout (GtkButtonBox *@var{widget}, gint @var{layout_style})
This will set the layout style of the buttons within this box. Currently it can
be set to one of @code{GTK_BUTTONBOX_SPREAD}, @code{GTK_BUTTONBOX_EDGE}, 
@code{GTK_BUTTONBOX_START} or @code{GTK_BUTTONBOX_END}.

The following example:
@example
    gtk_button_box_set_layout (GTK_BUTTON_BOX (box), 
                               GTK_BUTTONBOX_SPREAD);
@end example
Will set the @var{box} argument to the @dfn{SPREAD} layout style described 
above.
@end deftypefun

@deftypefun gint gtk_button_box_get_spacing (GtkButtonBox *@var{widget})
Get the per widget value for spacing within the button box. This value is
the amount of space that will be between the indvidual buttons contained by
this box.
@end deftypefun

@deftypefun void gtk_button_box_get_child_size (GtkButtonBox *@var{wiget}, gint *@var{width}, gint *@var{height})
@end deftypefun

@deftypefun void gtk_button_box_get_child_ipadding (GtkButtonBox *@var{widget}, gint *@var{ipad_x}, gint *@var{ipad_y})
Get the per widget value for the padding inside the buttons. This value 
controls how large the buttons will be within the box.
@end deftypefun

@deftypefun gint gtk_button_box_get_layout (GtkButtonBox *@var{widget})
Get the @var{layout_style} for the @code{GtkButtonBox} object passed to this
function in the @var{widget} variable.

@example
   layout = gtk_button_box_get_layout(GTK_BUTTON_BOX (box));
@end example

@end deftypefun

@gtkstdmacros{ButtonBox, BUTTON_BOX}

@page
@node GtkButton, GtkCheckButton, GtkButtonBox, Widgets
@comment node-name, next, previous, up
@section The button widget


@subsection Description

@subsection Signals

@deftypefn Signal void GtkButton::pressed (GtkButton *@var{button})
@end deftypefn

@deftypefn Signal void GtkButton::released (GtkButton *@var{button})
@end deftypefn

@deftypefn Signal void GtkButton::clicked (GtkButton *@var{button})
@end deftypefn

@deftypefn Signal void GtkButton::enter (GtkButton *@var{button})
@end deftypefn

@deftypefn Signal void GtkButton::leave (GtkButton *@var{button})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_button_get_type (void)
Returns the @code{GtkButton} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_button_new (void)
Create a new @code{GtkButton} object. The new widget is returned as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_button_new_with_label (gchar *@var{label})
Create a new @code{GtkButton} object and set the text that is 
on the button to @var{label}. The new widget is returned as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_button_pressed (GtkButton *@var{button})
@end deftypefun

@deftypefun void gtk_button_released (GtkButton *@var{button})
@end deftypefun

@deftypefun void gtk_button_clicked (GtkButton *@var{button})
@end deftypefun

@deftypefun void gtk_button_enter (GtkButton *@var{button})
@end deftypefun

@deftypefun void gtk_button_leave (GtkButton *@var{button})
@end deftypefun

@gtkstdmacros{Button, BUTTON}


@page
@node GtkCheckButton, GtkCheckMenuItem, GtkButton, Widgets
@comment node-name, next, previous, up
@section The check button widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_check_button_get_type (void)
Returns the @code{GtkCheckButton} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_check_button_new (void)
Create a new @code{GtkCheckButton} object and initialize it with the 
default values in the library. The new widget is returned as a pointer
to a @code{GtkWidget} object. A @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_check_button_new_with_label (gchar *@var{label})
Create a new @code{GtkCheckButton} object and initialize it with the 
values @var{label}. The new widget is returned as a pointer to a
@code{GtkWidget} object. @code{NULL} is returned on any failure.
@end deftypefun

@deftypefun GtkCheckButton* GTK_CHECK_BUTTON (gpointer @var{obj})
@end deftypefun

@deftypefun GtkCheckButtonClass* GTK_CHECK_BUTTON_CLASS (gpointer @var{class})
@end deftypefun

@deftypefun gint GTK_IS_CHECK_BUTTON (gpointer @var{obj})
@end deftypefun

@gtkstdmacros{CheckButton, CHECK_BUTTON}

@page
@node GtkCheckMenuItem, GtkCList, GtkCheckButton, Widgets,
@comment node-name, next, previous, up
@section The check menu item widget

@subsection Description

@subsection Options

@defopt label
@end defopt

@defopt state
@end defopt

@subsection Signals

@deftypefn Signal void GtkCheckMenuItem::toggled (GtkCheckMenuItem *@var{check_menu_item})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_check_menu_item_get_type (void)
Returns the @code{GtkCheckMenuItem} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_check_menu_item_new (void)
Create a new @code{GtkCheckMenuItem} object. The new widget is returned as a
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_check_menu_item_new_with_label (gchar *@var{label})
Create a new @code{GtkCheckMenuItem} object and initalize it with the values
@var{label}. The new widget is returned as a pointer to a @code{GtkWidget}
object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_check_menu_item_set_state (GtkCheckMenuItem *@var{check_menu_item}, gint @var{state})
@end deftypefun

@deftypefun void gtk_check_menu_item_toggled (GtkCheckMenuItem *@var{check_menu_item})
@end deftypefun

@gtkstdmacros{CheckMenuItem, CHECK_MENU_ITEM}

@page 
@node GtkCList, GtkColorSelection, GtkCheckMenuItem, Widgets
@comment node-name, next, previous, up
@section The compound list widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_clist_get_type (void)
Returns the @code{GtkCList} type identifer.
@end deftypefun

@deftypefun GtkWidget* gtk_clist_new (int @var{columns})
Create a new @code{GtkCList} initilizing it with the value @var{columns}. 
The new widget is returned as a pointer to a @code{GtkWidget} object.
@code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_clist_new_with_titles (int @var{columns}, gchar *@var{titles[]})
@end deftypefun

@deftypefun void gtk_clist_set_border (GtkCList *@var{clist}, GtkShadowType @var{border})
Set the border style of the @var{clist} to the shadow type @var{border}.
@end deftypefun

@deftypefun void gtk_clist_set_selection_mode (GtkCList *@var{clist} GtkSelectionMode @var{mode})
Set the selection mode on the @var{clist} to the @var{mode} selection mode.
@end deftypefun

@deftypefun void gtk_clist_set_policy (GtkCList *@var{clist}, GtkPolicyType @var{vscrollbar_policy}, GtkPolicyType @var{hscrollbar_policy})
Set the policy on the scrollbars on the @var{clist} to @var{vscrollbar_policy} and @var{hscrollbar_policy}.
@end deftypefun

@deftypefun void gtk_clist_freeze (GtkCList *@var{clist})
Stop all visual updates of the @var{clist}. Useful for when making a large
number of changes to a @code{GtkCList}.
@end deftypefun

@deftypefun void gtk_clist_thaw (GtkCList *@var{clist})
Allow all visual updates of the @var{clist} to resume. 
@end deftypefun

@deftypefun void gtk_clist_column_titles_show (GtkCList *@var{clist})
Show the column title buttons on the @var{clist}.
@end deftypefun

@deftypefun void gtk_clist_column_titles_hide (GtkCList *@var{clist})
Hide the column title buttons on the @var{clist}.
@end deftypefun

@deftypefun void gtk_clist_set_column_title (GtkCList *@var{clist}, gint @var{column}, gchar *@var{title})
Set the title in column @var{column} of the @var{clist} button to @var{title}.
@end deftypefun

@deftypefun void gtk_clist_set_column_widget (GtkCList *@var{clist}, gint @var{column}, GtkWidget *@var{widget})
Set the @var{widget} instead of the title button for the column @var{column} 
in the @var{clist}.
@end deftypefun

@deftypefun void gtk_clist_set_column_justification (GtkCList *@var{clist}, gint @var{column}, GtkJustification @var{justification})
Set the @var{column}'s justification, in the @var{clist} to @var{justification}.
@end deftypefun

@deftypefun void gtk_clist_set_column_width (GtkCList *@var{clist}, gint @var{column}, gint @var{width})
Set the pixel width of column @var{column} in the @code{GtkCList} @var{clist}
to @var{width}. This function is a necessary steo in creating a 
@code{GtkCList} because otherwise the column width is chosen from the width
of the column title, which is almost never correct.
@end deftypefun

@deftypefun void gtk_clist_set_row_height (GtkCList *@var{clist}, gint @var{height})
Change the height of the rows in the @var{clist} to @var{height}. The default
is the height of the current font.
@end deftypefun

@deftypefun void gtk_clist_moveto (GtkCList *@var{clist}, gint @var{row}, gint@var{column}, gfloat @var{row_align}, gfloat @var{col_align})
Scroll the viewing area of the @code{GtkClist} in @var{clist} to @var{column}
and @var{row}. The @var{row_align} and @var{col_align} are between zero and
one, representing the location the row should appear on screen. Setting 
@var{row_align} or the @var{col_align} to 0.0 will be the top or left of the
viewing area. Setting the @var{row_align} or @var{col_align} to 1.0 will
be the bottom or right of the viewing area. If the @var{row} or @var{column}
is -1 then there is no change.
@end deftypefun

@deftypefun void gtk_clist_set_text (GtkCList *@var{clist}, gint @var{row}, gint @var{column}, gchar *@var{text})
Set a given cell's text, located by the @var{row} and @var{column}, to 
@var{text} replacing its current contents.
@end deftypefun

@deftypefun void gtk_clist_set_pixmap (GtkCList *@var{clist}, gint @var{row}, gint @var{column}, GdkPixmap *@var{pixmap}, GdkBitmap *@var{mask})
Set a given cell's text, located by the @var{column} and @var{row} arguments,
to the pixmap described by the @var{pixmap} argument using the @var{mask} as 
its mask. The current contents of the cell will be replaced.
@end deftypefun

@deftypefun void gtk_clist_setpixtext (GtkCList *@var{clist}, gint @var{row}, gint @var{column}, gchar *@var{text}, guint8 @var{spacing}, GdkPixmap *@var{pixmap}, GdkBitmap *@var{mask})
Set a given cell's text and pixmap, located by the @var{row} and @var{column}
arguments, to the text and pixmap described by the @var{pixmap} and @var{text}
arguments. The @var{mask} will be used for the pixmap mask and the 
@var{spacing} argument specifies the spacing between the two.
@end deftypefun

@deftypefun void gtk_clist_set_foreground (GtkCList *@var{clist}, gint @var{row}, GdkColor *@var{color})
Set the foreground color of row @var{row} to @var{color} in the 
@code{GtkCList} @var{clist}. The @var{color} must
already be allocated.
@end deftypefun

@deftypefun void gtk_clist_set_background (GtkCList *@var{clist}, gint @var{row}, GdkColor *@var{color})
Set the background color of row @var{row} to @var{color} in the 
@code{GtkCList} pointed to by @var{clist}. The color must be previously
allocated.
@end deftypefun

@deftypefun void gtk_clist_set_shift (GtkCList *@var{clist}, gint @var{row}, gint @var{column}, gint @var{vertical}, gint @var{horizontal})
Set the horizontal and vertical shift for drawing the contents of the cell
located at @var{row} and @var{column}. The @var{vertical} and @var{horizontal}
arguments can be positive or negitive. 
@end deftypefun

@deftypefun gint gtk_clist_append (GtkCList *@var{clist}, gchar *@var{text[]})
Append the given text, in the @var{text[]} argument,  to the @code{GtkCList} 
pointed to by the @var{clist}. The return value is the index of the row that
was just added.
@end deftypefun

@deftypefun void gtk_clist_insert (GtkCList *@var{clist}, gint @var{row}, gchar *@var{text[]})
Insert a row into the @code{GtkCList} pointed to by @var{clist} at row 
@var{row} with the text in @var{text[]}.
@end deftypefun

@deftypefun void gtk_clist_remove (GtkCList *@var{clist}, gint @var{row})
Remove row index @var{row} from the @var{clist}.
@end deftypefun

@deftypefun void gtk_clist_set_row_data (GtkCList *@var{clist}, gint @var{row}, gpointer @var{data})
Will set an arbitrary data pointer, @var{data}, for row @var{row} in the
@code{GtkCList} pointed to by @var{clist}.
@end deftypefun

@deftypefun gpointer gtk_clist_get_row_data (GtkCList *@var{clist}, gint @var{row})
Return the data that was set for row @var{row} from the @code{GtkCList} pointed
to by @var{clist}. @code{NULL} is returned if no data was set.
@end deftypefun

@deftypefun void gtk_clist_select_row (GtkCList *@var{clist}, gint @var{row}, gint @var{column})
Force selection of a row, located by @var{row} and @var{column}, in the 
@code{GtkCList} pointed to by @var{clist}.
@end deftypefun

@deftypefun void gtk_clist_unselect_row (GtkCList *@var{clist}, gint @var{row}, gint @var{column})
Force the unselection of a row, located by @var{row} and @var{column}, in the
@code{GtkCList} pointed to by @var{clist}.
@end deftypefun

@deftypefun void gtk_clist_clear (GtkCList *@var{clist})
Clear the entire contents of the @code{GtkCList} pointed to by @var{clist}.
This is much faster then removing each item seperatly with 
@code{gtk_clist_remove}.
@end deftypefun

@gtkstdmacros{CList, CLIST}

@page
@node GtkColorSelection, GtkCombo, GtkCList, Widgets
@comment node-name, next, previous, up
@section The color selector widget

@subsection Description

@subsection Options
@defopt policy
@itemize @bullet
@item
GTK_UPDATE_CONTINUOUS
@item
GTK_UPDATE_DISCONTINOUS
@item
GTK_UPDATE_DELAYED
@end itemize
@end defopt

@defopt color
@end defopt

@defopt use_opacity
@end defopt

@defopt title
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_color_selection_get_type (void)
Returns the @code{GtkColorSelection} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_color_selection_new (void)
Create a new @code{GtkColorSelection} object. The new object is returned as a
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_color_selection_set_update_policy (GtkColorSelection *@var{colorsel}, GtkUpdateType @var{policy})
@end deftypefun

@deftypefun void gtk_color_selection_set_color (GtkColorSelection *@var{colorsel}, gdouble *@var{color})
@end deftypefun

@deftypefun void gtk_color_selection_get_color (GtkColorSelection *@var{colorsel}, gdouble *@var{color})
@end deftypefun

@deftypefun void gtk_color_selection_set_opacity (GtkColorSelection *@var{colorsel}, gint @var{use_opacity})
@end deftypefun

@deftypefun guint gtk_color_selection_dialog_get_type (void)
Returns the @code{GtkColorSelection} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_color_selection_dialog_new (gchar *@var{title})
Create a new @code{GtkColorSelection} object initilizing the title bar of 
the resulting dialog to @var{title}. The new widget is returned as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{ColorSelection, COLOR_SELECTION}

@page
@node GtkCombo, GtkContainer, GtkColorSelection, Widgets
@comment node-name, next, previous, up
@section The combo widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_combo_get_type (void)
Returns the @code{GtkCombo} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_combo_new (void)
Create a new @code{GtkCombo} object returning the new widget as a pointer to
a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_combo_set_value_in_list (GtkCombo *@var{combo}, gint @var{val}, gint @var{ok_if_empty})
@end deftypefun

@deftypefun void gtk_combo_set_use_arrows (GtkCombo *@var{combo}, gint @var{val})
@end deftypefun

@deftypefun void gtk_combo_set_use_arrows_always (GtkCombo *@var{combo}, gint @var{val})
@end deftypefun

@deftypefun void gtk_combo_set_case_sensitive (GtkCombo *@var{combo}, gint @var{val})
@end deftypefun

@deftypefun void gtk_combo_set_item_string (GtkCombo *@var{combo}, GtkItem *@var{item}, gchar *@var{item_value})
@end deftypefun

@deftypefun void gtk_combo_set_popdown_strings (GtkCombo *@var{combo}, GList *@var{strings})
@end deftypefun

@gtkstdmacros{Combo, COMBO}

@page
@node GtkContainer, GtkCurve, GtkCombo, Widgets
@comment node-name, next, previous, up
@section The container widget

@subsection Description

@subsection Options

@defopt border_width
@end defopt

@subsection Signals

@deftypefn Signal void GtkContainer::add (GtkContainer *@var{container}, GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkContainer::remove (GtkContainer *@var{container}, GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkContainer::need_resize (GtkContainer *@var{container}, GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkContainer::foreach (GtkContainer *@var{container}, GtkCallback @var{callback}, gpointer @var{callback_data})
@end deftypefn

@deftypefn Signal gint GtkContainer::focus (GtkContainer *@var{container}, GtkDirectionType @var{direction})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_container_get_type (void)
Returns the @code{GtkContainer} type identifier.
@end deftypefun

@deftypefun void gtk_container_border_width (GtkContainer *@var{container}, gint @var{border_width})
@end deftypefun

@deftypefun void gtk_container_add (GtkContainer *@var{container}, GtkWidget *@var{widget})
Add @var{widget} to the @var{container}.
@end deftypefun

@deftypefun void gtk_container_remove (GtkContainer *@var{container}, GtkWidget *@var{widget})
Remove @var{widget} from @var{container}.
@end deftypefun

@deftypefun void gtk_container_disable_resize (GtkContainer *@var{container})
@end deftypefun

@deftypefun void gtk_container_enable_resize (GtkContainer *@var{container})
@end deftypefun

@deftypefun void gtk_container_block_resize (GtkContainer *@var{container})
@end deftypefun

@deftypefun void gtk_container_unblock_resize (GtkContainer *@var{container})
@end deftypefun

@deftypefun gint gtk_container_need_resize (GtkContainer *@var{container}, GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_container_check_resize (GtkContainer *@var{container}, GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_container_foreach (GtkContainer *@var{container}, GtkCallback @var{callback}, gpointer @var{callback_data})
@end deftypefun

@deftypefun void gtk_container_focus (GtkContainer *@var{container}, GtkDirectionType @var{direction})
@end deftypefun

@deftypefun GList* gtk_container_children (GtkContainer @var{container})
@end deftypefun

@gtkstdmacros{Container, CONTAINER}

@page
@node GtkCurve, GtkDialog, GtkContainer, Widgets
@comment node-name, next, previous, up
@section The curve widget

@subsection Description

@subsection Options

@defopt type
@itemize @bullet
@item GTK_CURVE_TYPE_LINEAR
@item GTK_CURVE_TYPE_SPLINE
@item GTK_CURVE_TYPE_FREE
@end itemize
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_curve_get_type (void)
Returns the @code{GtkCurve} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_curve_new (void)
Create a new @code{GtkCurve} returning the new widget as a pointer to a 
@code{GtkWidget} object.
@end deftypefun

@deftypefun void gtk_curve_reset (GtkCurve *@var{curve})
@end deftypefun

@deftypefun void gtk_curve_set_gamma (GtkCurve *@var{curve}, gfloat @var{gamma})
@end deftypefun

@deftypefun void gtk_curve_set_range (GtkCurve *@var{curve}, gfloat @var{min_x}, gfloat @var{max_x}, gfloat @var{min_y}, gfloat @var{max_y})
@end deftypefun

@deftypefun void gtk_curve_get_vector (GtkCurve *@var{curve}, int @var{veclen}, gfloat @var{vector[]})
@end deftypefun

@deftypefun void gtk_curve_set_vector (GtkCurve *@var{curve}, int @var{vaclen}, gfloat @var{vector[]})
@end deftypefun

@deftypefun void gtk_curve_set_curve_type (GtkCurve *@var{curve}, GtkCurveType @var{type})
@end deftypefun

@gtkstdmacros{Curve, CURVE}

@page
@node GtkDialog, GtkDrawingArea, GtkCurve, Widgets
@comment node-name, next, previous, up
@section The dialog widget


@subsection Description
The dialog widget is a window (@pxref{GtkWindow}) that has a vertical box
(@pxref{GtkVBox}), a horizontal box (@pxref{GtkHBox}), separated with a 
horizontal separator (@pxref{GtkHSeparator}).

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_dialog_get_type (void)
Returns the @code{GtkDialog} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_dialog_new (void)
Create a new @code{GtkDialog} object and return the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{Dialog, DIALOG}


@page
@node GtkDrawingArea, GtkEntry, GtkDialog, Widgets
@comment node-name, next, previous, up
@section The drawing area widget

@subsection Description

@subsection Options

@defopt width
@end defopt

@defopt height
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_drawing_area_get_type (void)
Returns the @code{GtkDrawingArea} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_drawing_area_new (void)
Create a new @code{GtkDrawingArea} object returning the new widget as a 
pointer to a @code{GtwWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_drawing_area_size (GtkDrawingArea *@var{darea}, gint @var{width}, gint @var{height})
Set the size of the @var{darea} widget, created previously, to @var{width} and @var{height}.
@end deftypefun

@gtkstdmacros{DrawingArea, DRAWING_AREA}


@page
@node GtkEntry, GtkEventBox, GtkDrawingArea, Widgets
@comment node-name, next, previous, up
@section The entry widget


@subsection Description

@subsection Options

@defopt max
With this option it is possible to set the @var{text_max_length} to the 
value speified in the @var{max} option. This value is a guint16 value.
@end defopt

@defopt text
With this option it is possible to 'preload' the text that will be displayed 
in the @code{entry} widget to the string pointed to by @var{text}.
@end defopt

@subsection Signals

@deftypefn Signal void GtkEntry::insert_text (GtkEntry *@var{entry}, gchar *@var{text}, gint @var{length}, gint *@var{position})
@end deftypefn

@deftypefn Signal void GtkEntry::delete_text (GtkEntry *@var{entry}, gint @var{start_pos}, gint @var{end_pos})
@end deftypefn

@deftypefn Signal void GtkEntry::changed (GtkEntry *@var{entry})
@end deftypefn

@deftypefn Signal void GtkEntry::set_text (GtkEntry *@var{entry})
@end deftypefn

@deftypefn Signal void GtkEntry::activate (GtkEntry *@var{entry})
@end deftypefn 

@subsection Functions

@deftypefun guint gtk_entry_get_type (void)
Returns the @code{GtkEntry} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_entry_new (void)
Create a new @code{GtkEntry} object. The new widget is returned 
as a pointer to a @code{GtkWidget} object. @code{NULL} is returned on
failure.
@end deftypefun

@deftypefun GtkWidget* gtk_entry_new_with_max_length (guint16 @var{max})
Create a new @code{GtkEntry} object initilizing it with the value @var{max}.
The new widget is returned as a pointer to a @code{GtkWidget} object. 
@code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_entry_set_text (GtkEntry *@var{entry}, gchar *@var{text})
Will set the text in the previously created @code{GtkEntry} object to 
@var{text}. It is important to not set the fields of the @code{GtkEntry}
structure directly (or, for that matter, any type derived from 
@code{GtkObject}).
@end deftypefun

@deftypefun void gtk_entry_append_text (GtkEntry *@var{entry}, gchar *@var{text})
Append the text that is in the @var{text} argument to the widgets text. It is
important to not set the fields of the @code{GtkEntry} structure directly.
@end deftypefun

@deftypefun void gtk_entry_prepend_text (GtkEntry *@var{entry}, gchar *@var{text})
Add the text in the @var{text} argument to the text in the @code{GtkEntry} 
widget. It is important to not set the fields of the @code{GtkEntry} structure
directly.
@end deftypefun

@deftypefun void gtk_entry_set_position (GtkEntry *@var{entry}, gint @var{position})
@end deftypefun

@deftypefun void gtk_entry_set_visibility (GtkEntry *@var{entry}, gint @var{visible})
Will make the keystrokes entered into the @code{GtkEntry} object invisible
when @var{visible} is @code{TRUE}. Defaults to @code{FALSE}.
@end deftypefun

@deftypefun gchar* gtk_entry_get_text (GtkEntry *@var{entry})
Returns the text that is contained in the @code{GtkEntry} as a pointer to a 
@code{gchar} variable.
@end deftypefun

@gtkstdmacros{Entry, ENTRY}

@page
@node GtkEventBox, GtkFileSelection, GtkEntry, Widgets
@comment node-name, next, previous, up
@section The event box widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions
@deftypefun guint gtk_event_box_get_type (void)
Returns the @code{GtkEventBox} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_event_box_new (void)
Create a new @code{GtkEventBox} returning the new widget as a pointer to
a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{GtkEventBox, EVENT_BOX}

@page
@node GtkFileSelection, GtkFixed, GtkEventBox, Widgets
@comment node-name, next, previous, up
@section The file selection dialog widget

@subsection Description

@subsection Options

@defopt title
@end defopt

@defopt filename
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_file_selection_get_type (void)
Returns the @code{GtkFileSelection} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_file_selection_new (gchar *@var{title})
Create a new @code{GtkFileSelection} object and return the new widget as a
pointer to a @code{GtkWidget}. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_file_selection_set_filename (GtkFileSelection *@var{filesel}, gchar *@var{filename})
@end deftypefun

@deftypefun gchar* gtk_file_selection_get_filename (GtkFileSelection *@var{filesel})
@end deftypefun

@gtkstdmacros{FileSelection, FILE_SELECTION}

@page
@node GtkFixed, GtkFrame, GtkFileSelection, Widgets
@comment node-name, next, previous, up
@section The fixed widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_fixed_get_type (void)
Returns the @code{GtkFixed} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_fixed_new (void)
Create a new @code{GtkFixed} object returning the new widget as a pointer to 
a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_fixed_put_new (GtkFixed *@var{fixed}, GtkWidget *@var{widget}, gint16 @var{x}, gint16 @var{y})
@end deftypefun

@deftypefun void gtk_fixed_move (GtkFixed *@var{fixed}, GtkWidget *@var{widget}, gint16 @var{x}, gint16 @var{y})
@end deftypefun

@gtkstdmacros{Fixed, FIXED}

@page
@node GtkFrame, GtkGamma, GtkFixed, Widgets
@comment node-name, next, previous, up
@section The frame widget


@subsection Options
@defopt label
@end defopt

@defopt xalign
@end defopt

@defopt yalign
@end defopt

@defopt type
@end defopt

@subsection Description

@subsection Signals

@subsection Functions

@deftypefun guint gtk_frame_get_type (void)
Returns the @code{GtkFrame} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_frame_new (gchar *@var{label})
Create a new @code{GtkFrame} object initilizing it with the value in 
@var{label}. The new widget is returned as a pointer to a @code{GtkWidget}
object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_frame_set_label (GtkFrame *@var{frame}, gchar *@var{label})
@end deftypefun

@deftypefun void gtk_frame_set_label_align (GtkFrame *@var{frame}, gfloat @var{xalign}, gfloat @var{yalign})
@end deftypefun

@deftypefun void gtk_frame_set_shadow_type (GtkFrame *@var{frame}, GtkShadowType @var{type})
@end deftypefun

@gtkstdmacros{Frame, FRAME}

@page
@node GtkGamma, GtkHBox, GtkFrame, Widgets
@comment node-name, next, previous, up
@section The gamma widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_gamma_curve_get_type (void)
Returns the @code{GtkGamma} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_gamma_curve_new (void)
Create a new @code{GtkGamma} object returning the new widget as a pointer 
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{Gamma, GAMMA}

@page
@node GtkHBox, GtkHButtonBox, GtkGamma, Widgets
@comment node-name, next, previous, up
@section The horizontal box widget


@subsection Description

@subsection Options

@defopt homogeneous
This option controls whether each object in the box has the same size. In the
case of the @code{GtkHBox}, this effects the width. If this option is set then
the @var{expand} option to the @code{gtk_box_pack} (@pxref{GtkBox}) routines
is always set to @code{TRUE}.
@end defopt

@defopt spacing
This option controls the amount of space that is added between the objects
packed into this @code{GtkVBox} object.
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_hbox_get_type (void)
Returns the @code{GtkHBox} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_hbox_new (gint @var{homogeneous}, gint @var{spacing})
Create a new @code{GtkHBox} object initilizing it with the values in 
@var{homogeneous} and @var{spacing}. The new widget is returned as a pointer 
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{HBox, HBOX}

@page
@node GtkHButtonBox, GtkHPaned, GtkHBox, Widgets
@comment node-name, next, previous, up
@section The horizontal button box widget

@subsection Description

@subsection Options

@defopt spacing
@end defopt

@defopt layout
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_hbutton_box_get_type (void)
Returns the @code{GtkHButtonBox} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_hbutton_box_new (void)
Create a new @code{GtkHButtonBox} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_hbutton_box_set_spacing_default (gint @var{spacing})
@end deftypefun

@deftypefun void gtk_hbutton_box_set_layout_default (gint @var{layout})
@end deftypefun

@deftypefun gint gtk_hbutton_box_get_spacing_default (void)
@end deftypefun

@deftypefun gint gtk_hbutton_box_get_layout_default (void)
@end deftypefun

@gtkstdmacros {HButtonBox, HBUTTON_BOX}

@page
@node GtkHPaned, GtkHRuler, GtkHButtonBox, Widgets
@comment node-name, next, previous, up
@section The horizontal paned widget

@subsection Description 

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun void gtk_hpaned_get_type (void)
Returns the @code{GtkHPaned} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_hpaned_new (void)
Create a new @code{GtkHPaned} object returning the new widget as a pointer 
to a @code{GtkWidget} object.
@end deftypefun

@gtkstdmacros{HPaned, HPANED}

@page
@node GtkHRuler, GtkHScale, GtkHPaned, Widgets
@comment node-name, next, previous, up
@section The horizontal ruler widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_hruler_get_type (void)
Returns the @code{GtkHRuler} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_hruler_new (void)
Create a new @code{GtkHRuler} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{HRuler, HRULER}


@page
@node GtkHScale, GtkHScrollbar, GtkHRuler, Widgets
@comment node-name, next, previous, up
@section The horizontal scale widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_hscale_get_type (void)
Returns the @code{GtkHScale} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_hscale_new (GtkAdjustment *@var{adjustment})
Create a new @code{GtkHScale} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{HScale, HSCALE}


@page
@node GtkHScrollbar, GtkHSeparator, GtkHScale, Widgets
@comment node-name, next, previous, up
@section The horizontal scrollbar widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_hscrollbar_get_type (void)
Returns the @code{GtkHScrollbar} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_hscrollbar_new (GtkAdjustment *@var{adjustment})
Create a new @code{GtkHScrollbar} object returning the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{HScrollbar, HSCROLLBAR}


@page
@node GtkHSeparator, GtkImage, GtkHScrollbar, Widgets
@comment node-name, next, previous, up
@section The horizontal separator widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_hseparator_get_type (void)
Returns the @code{GtkHSeparator} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_hseparator_new (void)
Create a new @code{GtkHSeparator} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{HSeparator, HSEPARATOR}


@page
@node GtkImage, GtkInputDialog, GtkHSeparator, Widgets
@comment node-name, next, previous, up
@section The image widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_image_get_type (void)
Returns the @code{GtkImage} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_image_new (GdkImage *@var{val}, GdkBitmap *@var{mask})
Create a new @code{GtkImage} object initilizing it with the values in 
@var{val} and @var{mask}. The new widget is returned as a pointer to a 
@code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_image_set (GtkImage *@var{image}, GdkImage *@var{val}, GdkBitmap *@var{mask})
@end deftypefun

@deftypefun void gtk_image_get (GtkImage *@var{image}, GdkImage **@var{val}, GdkBitmap **@var{mask})
@end deftypefun

@gtkstdmacros{Image, IMAGE}

@page
@node GtkInputDialog, GtkItem, GtkImage, Widgets
@comment node-name, next, previous, up
@section The input dialog widget

@subsection Description

@subsection Options

@subsection Signals

@deftypefn Signal void GtkInputDialog::enable_device (GtkInputDialog *@var{inputd}, guint32 @var{devid}, gpointer *@var{data})
@end deftypefn

@deftypefn Signal void GtkInputDialog::disable_device (GtkInputDialog *@var{inputd}, guint32 @var{devid}, gpointer *@var{data})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_input_dialog_get_type (void)
Returns the @code{GtkInputDialog} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_input_dialog_new (void)
Create a new @code{GtkInputDialog} object and return the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun


@gtkstdmacros{InputDialog, INPUTDIALOG}

@page
@node GtkItem, GtkLabel, GtkInputDialog, Widgets
@comment node-name, next, previous, up
@section The item widget


@subsection Description

@subsection Signals

@deftypefn Signal void GtkItem::select (GtkItem *@var{item})
@end deftypefn

@deftypefn Signal void GtkItem::deselect (GtkItem *@var{item})
@end deftypefn

@deftypefn Signal void GtkItem::toggle (GtkItem *@var{toggle})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_item_get_type (void)
Returns the @code{GtkItem} type identifier.
@end deftypefun

@deftypefun void gtk_item_select (GtkItem *@var{item})
@end deftypefun

@deftypefun void gtk_item_deselect (GtkItem *@var{item})
@end deftypefun

@deftypefun void gtk_item_toggle (GtkItem *@var{item})
@end deftypefun

@gtkstdmacros{Item, ITEM}


@page
@node GtkLabel, GtkList, GtkItem, Widgets
@comment node-name, next, previous, up
@section The label widget

@subsection Description

@subsection Options

@defopt str
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_label_get_type (void)
Returns the @code{GtkLabel} type identifer.
@end deftypefun

@deftypefun GtkWidget* gtk_label_new (GtkLabel *@var{label}, gchar *@var{str})
Create a new @code{GtkLabel} object and initialize it with the 
text in @var{str}. The new widget is returned as a pointer to a 
@code{GtkWidget} object. @code{NULL} is returned on faulure.
@end deftypefun

@deftypefun void gtk_label_set (GtkLabel *@var{label}, gchar *@var{str})
Set the @code{GtkLabel} label value to the value passed in the @var{str} 
argument.
@end deftypefun

@deftypefun void gtk_label_get (GtkLabel *@var{label}, gchar **@var{str})
Copies the current value in the @code{GtkLabel} label field to the variable
passed in the @var{str} argument.
@end deftypefun

@gtkstdmacros{Label, LABEL}


@page
@node GtkList, GtkListItem, GtkLabel, Widgets
@comment node-name, next, previous, up
@section The list widget


@subsection Description

@subsection Signals

@deftypefn Signal void GtkList::selection_changed (GtkList *@var{list})
@end deftypefn

@deftypefn Signal void GtkList::select_child (GtkList *@var{list}, GtkWidget *@var{child})
@end deftypefn

@deftypefn Signal void GtkList::unselect_child (GtkList *@var{list}, GtkWidget *@var{child})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_list_get_type (void)
Returns the @code{GtkList} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_list_new (void)
Create a new @code{GtkList} object and return the new widget as a pointer to
a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_list_insert_items (GtkList *@var{list}, GList *@var{items}, gint @var{position})
@end deftypefun

@deftypefun void gtk_list_append_items (GtkList *@var{list}, GList *@var{items})
@end deftypefun

@deftypefun void gtk_list_prepend_items (GtkList *@var{list}, GList *@var{items})
@end deftypefun

@deftypefun void gtk_list_remove_items (GtkList *@var{list}, GList *@var{items})
@end deftypefun

@deftypefun void gtk_list_clear_items (GtkList *@var{list}, gint @var{start}, gint @var{end})
@end deftypefun

@deftypefun void gtk_list_select_item (GtkList *@var{list}, gint @var{item})
@end deftypefun

@deftypefun void gtk_list_unselect_item (GtkList *@var{list}, gint @var{item})
@end deftypefun

@deftypefun void gtk_list_select_child (GtkList *@var{list}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_list_unselect_child (GtkList *@var{list}, GtkWidget *@var{child})
@end deftypefun

@deftypefun gint gtk_list_child_position (GtkList *@var{list}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_list_set_selection_mode (GtkList *@var{list}, GtkSelectionMode @var{mode})
@end deftypefun

@gtkstdmacros{List, LIST}


@page
@node GtkListItem, GtkMenu, GtkList, Widgets
@comment node-name, next, previous, up
@section The list item widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_list_item_get_type (void)
Returns the @code{GtkListItem} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_list_item_new (void)
Create a new @code{GtkListItem} object and return the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_list_item_new_with_label (gchar *@var{label})
Create a new @code{GtkListItem} object initalizing with the value @var{label}.
The new widget is returned as a pointer to a @code{GtkWidget} object. 
@code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_list_item_select (GtkListItem *@var{list_item})
@end deftypefun

@deftypefun void gtk_list_item_deselect (GtkListItem *@var{list_item})
@end deftypefun

@gtkstdmacros{ListItem, LIST_ITEM}


@page
@node GtkMenu, GtkMenuBar, GtkListItem, Widgets
@comment node-name, next, previous, up
@section The menu widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_menu_get_type (void)
Returns the @code{GtkMenu} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_menu_new (void)
Create a new @code{GtkMenu} object returning the new widget as a pointer to 
a @code{GtkWidget}. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_menu_append (GtkMenu *@var{menu}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_menu_prepend (GtkMenu *@var{menu}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_menu_insert (GtkMenu *@var{menu}, GtkWidget *@var{child}, gint @var{position})
@end deftypefun

@deftypefun void gtk_menu_popup (GtkMenu *@var{menu}, GtkWidget *@var{parent_menu_shell}, GtkWidget *@var{parent_menu_item}, GtkMenuPositionFunc @var{func}, gpointer @var{data}, gint @var{button})
@end deftypefun

@deftypefun void gtk_menu_popdown (GtkMenu *@var{menu})
@end deftypefun

@deftypefun GtkWidget* gtk_menu_get_active (GtkMenu *@var{menu})
@end deftypefun

@deftypefun void gtk_menu_set_active (GtkMenu *@var{menu})
@end deftypefun

@deftypefun void gtk_menu_set_accelerator_table (GtkMenu *@var{menu}, GtkAcceleratorTable *@var{table})
@end deftypefun

@gtkstdmacros{Menu, MENU}


@page
@node GtkMenuBar, GtkMenuItem, GtkMenu, Widgets
@comment node-name, next, previous, up
@section The menu bar widget

@subsection Description

@subsection Options

@defopt position
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_menu_bar_get_type (void)
Returns the @code{GtkMenuBar} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_menu_bar_new (void)
Create a new @code{GtkMenuBar} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_menu_bar_append (GtkMenuBar *@var{menu_bar}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_menu_bar_prepend (GtkMenuBar *@var{menu_bar}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_menu_bar_insert (GtkMenuBar *@var{menu_bar}, GtkWidget *@var{child}, gint @var{position})
@end deftypefun

@gtkstdmacros{MenuBar, MENU_BAR}


@page
@node GtkMenuItem, GtkMenuShell, GtkMenuBar, Widgets
@comment node-name, next, previous, up
@section The menu item widget


@subsection Description

@subsection Options

@subsection Signals

@deftypefn Signal void GtkMenuItem::activate (GtkMenuItem *@var{menu_item})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_menu_item_get_type (void)
Returns the @code{GtkMenuItem} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_menu_item_new (void)
Create a new @code{GtkMenuItem} object returning the new widget as a pointer 
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_menu_item_new_with_label (gchar *@var{label})
Create a new @code{GtkMenuItem} object initilizing it with the value in 
@var{label}. The new widget is returned as a pointer to a @code{GtkWidget}
object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_menu_item_set_submenu (GtkMenuItem *@var{menu_item}, GtkWidget *@var{submenu})
@end deftypefun

@deftypefun void gtk_menu_item_set_placement (GtkMenuItem *@var{menu_item}, GtkSubmenuPlacement @var{placement})
@end deftypefun

@deftypefun void gtk_menu_item_accelerator_size (GtkMenuItem *@var{menu_item})
@end deftypefun

@deftypefun void gtk_menu_item_accelerator_text (GtkMenuItem *@var{menu_item}, gchar *@var{buffer})
@end deftypefun

@deftypefun void gtk_menu_item_configure (GtkMenuItem *@var{menu_item}, gint @var{show_toggle_indicator}, gint @var{show_submenu_indicator})
@end deftypefun

@deftypefun void gtk_menu_item_select (GtkMenuItem *@var{menu_item})
@end deftypefun

@deftypefun void gtk_menu_item_deselect (GtkMenuItem *@var{menu_item})
@end deftypefun

@deftypefun void gtk_menu_item_activate (GtkMenuItem *@var{menu_item})
@end deftypefun

@gtkstdmacros{MenuItem, MENU_ITEM}


@page
@node GtkMenuShell, GtkMisc, GtkMenuItem, Widgets
@comment node-name, next, previous, up
@section The menu shell widget


@subsection Description

@subsection Options

@subsection Signals

@deftypefn Signal void GtkMenuShell::deactivate (GtkMenuShell *@var{menu_shell})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_menu_shell_get_type (void)
Returns the @code{GtkMenuShell} type identifier.
@end deftypefun

@deftypefun void gtk_menu_shell_append (GtkMenuShell *@var{menu_shell}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_menu_shell_prepend (GtkMenuShell *@var{menu_shell}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_menu_shell_insert (GtkMenuShell *@var{menu_shell}, GtkWidget *@var{child}, gint @var{position})
@end deftypefun

@deftypefun void gtk_menu_shell_deactivate (GtkMenuShell *@var{menu_shell})
@end deftypefun

@gtkstdmacros{MenuShell, MENU_SHELL}


@page
@node GtkMisc, GtkNotebook, GtkMenuShell, Widgets
@comment node-name, next, previous, up
@section The misc widget

@subsection Description

@subsection Options

@defopt xalign
@end defopt

@defopt yalign
@end defopt

@defopt xpad
@end defopt

@defopt ypad
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_misc_get_type (void)
Returns the @code{GtkMisc} type identifier.
@end deftypefun

@deftypefun void gtk_misc_set_alignment (GtkMisc *@var{misc}, gfloat @var{xalign}, gfloat @var{yalign})
@end deftypefun

@deftypefun void gtk_misc_set_padding (GtkMisc *@var{misc}, gint @var{xpad}, gint @var{ypad})
@end deftypefun

@gtkstdmacros{Misc, MISC}


@page
@node GtkNotebook, GtkOptionMenu, GtkMisc, Widgets
@comment node-name, next, previous, up
@section The notebook widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_notebook_get_type (void)
Returns the @code{GtkNotebook} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_notebook_new (void)
Create a new @code{GtkNotebook} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on a failure.
@end deftypefun

@deftypefun void gtk_notebook_append_page (GtkNotebook *@var{notebook}, GtkWidget *@var{child}, GtkWidget *@var{tab_label})
@end deftypefun

@deftypefun void gtk_notebook_prepend_page (GtkNotebook *@var{notebook}, GtkWidget *@var{child}, GtkWidget *@var{tab_label})
@end deftypefun

@deftypefun void gtk_notebook_insert_page (GtkNotebook *@var{notebook}, GtkWidget *@var{child}, GtkWidget *@var{tab_label}, gint @var{position})
@end deftypefun

@deftypefun void gtk_notebook_remove_page (GtkNotebook *@var{notebook}, gint @var{page_num})
@end deftypefun

@deftypefun void gtk_notebook_set_page (GtkNotebook *@var{notebook}, gint @var{page_num})
@end deftypefun

@deftypefun void gtk_notebook_next_page (GtkNotebook *@var{notebook})
@end deftypefun

@deftypefun void gtk_notebook_prev_page (GtkNotebook *@var{notebook})
@end deftypefun

@deftypefun void gtk_notebook_set_tab_pos (GtkNotebook *@var{notebook}, GtkPositionType @var{pos})
@end deftypefun

@deftypefun void gtk_notebook_set_show_tabs (GtkNotebook *@var{notebook}, gint @var{show_tabs})
@end deftypefun

@deftypefun void gtk_notebook_set_show_border (GtkNotebook *@var{notebook}, gint @var{show_border})
@end deftypefun

@gtkstdmacros{Notebook, NOTEBOOK}


@page
@node GtkOptionMenu, GtkPaned, GtkNotebook, Widgets
@comment node-name, next, previous, up
@section The option menu widget

@subsection Description

@subsection Options

@defopt index
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_option_menu_get_type (void)
Returns the @code{GtkOptionMenu} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_option_menu_new (void)
Create a new @code{GtkOptionMenu} object returning the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_option_menu_get_menu (GtkOptionMenu *@var{option_menu})
@end deftypefun

@deftypefun void gtk_option_menu_set_menu (GtkOptionMenu *@var{option_menu}, GtkWidget *@var{menu})
@end deftypefun

@deftypefun void gtk_option_menu_remove_menu (GtkOptionMenu *@var{option_menu})
@end deftypefun

@deftypefun void gtk_option_menu_set_history (GtkOptionMenu *@var{option_menu}, gint @var{index})
@end deftypefun

@gtkstdmacros{OptionMenu, OPTION_MENU}

@page
@node GtkPaned, GtkPixmap, GtkOptionMenu, Widgets
@comment node-name, next, previous, up
@section The paned widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_paned_get_type (void)
Returns the @code{GtkPaned} type identifier.
@end deftypefun

@deftypefun void gtk_paned_add1 (GtkPaned *@var{paned}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_paned_add2 (GtkPaned *@var{paned}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_paned_handle_size (GtkPaned *@var{paned}, guint16 @var{size})
@end deftypefun


@deftypefun void gtk_paned_gutter_size (GtkPaned *@var{paned}, guint16 @var{size})
@end deftypefun

@gtkstdmacros{Paned, PANED}

@page
@node GtkPixmap, GtkPreview, GtkPaned, Widgets
@comment node-name, next, previous, up
@section The pixmap widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_pixmap_get_type (void)
Returns the @code{GtkPixmap} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_pixmap_new (GdkPixmap *@var{normal}, GdkPixmap *@var{active}, GdkPixmap *@var{prelight}, GdkPixmap *@var{selected}, GdkPixmap *@var{insensitive})
@end deftypefun

@deftypefun void gtk_pixmap_set (GtkPixmap *@var{pixmap}, GdkPixmap *@var{val}, GtkStateType @var{state})
@end deftypefun

@deftypefun void gtk_pixmap_get (GtkPixmap *@var{pixmap}, GdkPixmap **@var{val}, GtkStateType @var{state})
@end deftypefun

@gtkstdmacros{Pixmap, PIXMAP}


@page
@node GtkPreview, GtkProgressBar, GtkPixmap, Widgets
@comment node-name, next, previous, up
@section The preview widget

@subsection Description

@subsection Options

@defopt type
@end defopt

@defopt width
@end defopt

@defopt height
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_preview_get_type (void)
Returns the @code{GtkPreview} type identifier.
@end deftypefun

@deftypefun void gtk_preview_uninit (void)
@end deftypefun

@deftypefun GtkWidget* gtk_preview_new (GtkPreviewType @var{type})
Create a new @code{GtkPreview} object initilizing it with the values in 
@var{type}. The new widget is returned as a pointer to a @code{GtwWidget} 
object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_preview_size (GtkPreview *@var{preview}, gint @var{width}, gint @var{height})
Set the size of the @var{preview} object to @var{width} and @var{height}.
@end deftypefun

@deftypefun void gtk_preview_put (GtkPreview *@var{preview}, GdkWindow *@var{window}, GdkGC *@var{gc}, gint @var{srcx}, gint @var{srcy}, gint @var{destx}, gint @var{desty}, gint @var{width}, gint @var{height})
@end deftypefun

@deftypefun void gtk_preview_put_row (GtkPreview *@var{preview}, guchar *@var{src}, guchar *@var{dest}, gint @var{x}, gint @var{y}, gint @var{w})
@end deftypefun

@deftypefun void gtk_preview_draw_row (GtkPreview *@var{preview}, guchar @var{data}, gint @var{x}, gint @var{y}, gint @var{w})
@end deftypefun

@deftypefun void gtk_preview_set_expand (GtkPreview *@var{preview}, gint @var{expand})
@end deftypefun

@deftypefun void gtk_preview_set_gamma (double @var{gamma})
@end deftypefun

@deftypefun void gtk_preview_set_color_cube (guint @var{nred_shades}, guint @var{ngreen_shades}, guint @var{nblue_shades}, guint @var{ngray_shades})
@end deftypefun

@deftypefun void gtk_preview_set_install_cmap (gint @var{install_cmap})
@end deftypefun

@deftypefun void gtk_preview_set_reserved (gint @var{nreserved})
@end deftypefun

@deftypefun GdkVisual* gtk_preview_get_visual (void)
@end deftypefun

@deftypefun GdkColormap* gtk_preview_get_cmap (void)
@end deftypefun

@deftypefun GtkPreviewInfo* gtk_preview_get_info (void)
@end deftypefun

@gtkstdmacros{Preview, PREVIEW}


@page
@node GtkProgressBar, GtkRadioButton, GtkPreview, Widgets
@comment node-name, next, previous, up
@section The progress bar widget


@subsection Description

@subsection Options

@defopt percentage
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_progress_bar_get_type (void)
Returns the @code{GtkProgressBar} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_progress_bar_new (void)
Create a new @code{GtkProgressBar} object returning the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_progress_bar_update (GtkProgressBar *@var{pbar}, gfloat @var{percentage})
Cause the @code{GtkProgessBar} to update its visual apperance to reflect the
@var{percentage}.
@end deftypefun

@gtkstdmacros{ProgressBar, PROGRESS_BAR}


@page
@node GtkRadioButton, GtkRadioMenuItem, GtkProgressBar, Widgets
@comment node-name, next, previous, up
@section The radio button widget

@subsection Description

@subsection Options

@defopt group
@end defopt

@defopt label
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_radio_button_get_type (void)
Returns the @code{GtkRadioButton} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_radio_button_new (GSList *@var{group})
Create a new @code{GtkRadioButton} object initilizing it with the value
in the @var{group} argument. The new widget is returned as a pointer to a 
@code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_radio_button_new_with_label (GSList *@var{group}, gchar *@var{label})
Create a new @code{GtkRadioButton} object initilizing it with the values in
the @var{group} and @var{label} arguments. The new widget is returned as a 
pointer to @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GSList* gtk_radio_button_group (GtkRadioButton *@var{radio_button})
@end deftypefun

@gtkstdmacros{RadioButton, RADIO_BUTTON}


@page
@node GtkRadioMenuItem, GtkRange, GtkRadioButton, Widgets
@comment node-name, next, previous, up
@section The radio button widget


@subsection Description

@subsection Options

@defopt group
@end defopt

@defopt label
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_radio_menu_item_get_type (void)
Returns the @code{GtkRadioMenuItem} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_radio_menu_item_new (GSList *@var{group})
Create a new @code{GtkRadioMenuItem} object and initilize it with the 
values in @var{group}. The new widget is returned as a pointer to a 
@code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_radio_menu_item_new_with_label (GSList *@var{group}, gchar *@var{label})
@end deftypefun

@deftypefun GSList* gtk_radio_menu_item_group (GtkRadioMenuItem *@var{radio_menu_item})
@end deftypefun

@gtkstdmacros{RadioMenuItem, RADIO_MENU_ITEM}


@page
@node GtkRange, GtkRuler, GtkRadioMenuItem, Widgets
@comment node-name, next, previous, up
@section The range widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_range_get_type (void)
Returns the @code{GtkRange} type identifier.
@end deftypefun

@deftypefun GtkAdjustment* gtk_range_get_adjustment (GtkRange *@var{range})
@end deftypefun

@deftypefun void gtk_range_set_update_policy (GtkRange *@var{range}, GtkUpdatePolicy @var{policy})
@end deftypefun

@deftypefun void gtk_range_set_adjustment (GtkRange *@var{range}, GtkAdjustment *@var{adjustment})
@end deftypefun

@deftypefun void gtk_range_draw_background (GtkRange *@var{range})
@end deftypefun

@deftypefun void gtk_range_draw_trough (GtkRange *@var{range})
@end deftypefun

@deftypefun void gtk_range_draw_slider (GtkRange *@var{range})
@end deftypefun

@deftypefun void gtk_range_draw_step_forw (GtkRange *@var{range})
@end deftypefun

@deftypefun void gtk_range_draw_step_back (GtkRange *@var{range})
@end deftypefun

@deftypefun void gtk_range_slider_update (GtkRange *@var{range})
@end deftypefun

@deftypefun gint gtk_range_trough_click (GtkRange *@var{range}, gint @var{x}, gint @var{y})
@end deftypefun

@deftypefun void gtk_range_default_hslider_update (GtkRange *@var{range})
@end deftypefun

@deftypefun void gtk_range_default_vslider_update (GtkRange *@var{range})
@end deftypefun

@deftypefun gint gtk_range_default_htrough_click (GtkRange *@var{range}, gint @var{x}, gint @var{y})
@end deftypefun

@deftypefun gint gtk_range_default_vtrough_click (GtkRange *@var{range}, gint @var{x}, gint @var{y})
@end deftypefun

@deftypefun void gtk_range_default_hmotion (GtkRange *@var{range}, gint @var{xdelta}, gint @var{ydelta})
@end deftypefun

@deftypefun void gtk_range_default_vmotion (GtkRange *@var{range}, gint @var{xdelta}, gint @var{ydelta})
@end deftypefun

@deftypefun gfloat gtk_range_calc_value (GtkRange *@var{ragne}, gint @var{position})
@end deftypefun

@gtkstdmacros{Range, RANGE}


@page
@node GtkRuler, GtkScale, GtkRange, Widgets
@comment node-name, next, previous, up
@section The ruler widget

@subsection Description

@subsection Options

@defopt metric
@end defopt

@defopt lower
@end defopt

@defopt upper
@end defopt

@defopt position
@end defopt

@defopt max_size
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_ruler_get_type (void)
Returns the @code{GtkRuler} type identifier.
@end deftypefun

@deftypefun void gtk_ruler_set_metric (GtkRuler *@var{ruler}, GtkMetricType @var{metric})
@end deftypefun

@deftypefun void gtk_ruler_set_range (GtkRuler *@var{ruler}, gfloat @var{lower}, gfloat @var{upper}, gfloat @var{position}, gfloat @var{max_size})
@end deftypefun

@deftypefun void gtk_ruler_draw_ticks (GtkRuler *@var{ruler})
@end deftypefun

@deftypefun void gtk_ruler_draw_pos (GtkRuler *@var{ruler})
@end deftypefun

@gtkstdmacros{Ruler, RULER}


@page
@node GtkScale, GtkScrollbar, GtkRuler, Widgets
@comment node-name, next, previous, up
@section The scale widget


@subsection Description

@subsection Options

@defopt digits
@end defopt

@defopt draw_value
@end defopt

@defopt pos
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_scale_get_type (void)
Returns the @code{GtkScale} type identifier.
@end deftypefun

@deftypefun void gtk_scale_set_digits (GtkScale *@var{scale}, gint @var{digits})
@end deftypefun

@deftypefun void gtk_scale_set_draw_value (GtkScale *@var{scale}, gint @var{draw_value})
@end deftypefun

@deftypefun void gtk_scale_set_value_pos (GtkScale *@var{scale}, gint @var{pos})
@end deftypefun

@deftypefun gint gtk_scale_value_width (GtkScale *@var{scale})
@end deftypefun

@deftypefun void gtk_scale_draw_value (GtkScale *@var{scale})
@end deftypefun

@gtkstdmacros{Scale, SCALE}


@page
@node GtkScrollbar, GtkScrolledWindow, GtkScale, Widgets
@comment node-name, next, previous, up
@section The scrollbar widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_scrollbar_get_type (void)a
Returns the @code{GtkScrollbar} type identifier.
@end deftypefun

@gtkstdmacros{Scrollbar, SCROLLBAR}


@page
@node GtkScrolledWindow, GtkSeparator, GtkScrollbar, Widgets
@comment node-name, next, previous, up
@section The scrolled window widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_scrolled_window_get_type (void)
Returns the @code{GtkScrolledWindow} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_scrolled_window_new (GtkAdjustment *@var{hadjustment}, GtkAdjustment *@var{vadjustment})
Create a new @code{GtkScrolledWindow} object initilizing it with the values in
@var{adjustment} and @var{adjustment}. The new widget is returned as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkAdjustment* gtk_scrolled_window_get_hadjustment (GtkScrolledWindow *@var{scrolled_window})
@end deftypefun

@deftypefun GtkAdjustment* gtk_scrolled_window_get_vadjustment (GtkScrolledWindow *@var{scrolled_window})
@end deftypefun

@deftypefun void gtk_scrolled_window_set_policy (GtkScrolledWindow *@var{scrolled_window}, GtkPolicyType @var{hscrollbar_policy}, GtkPolicyType @var{vscrollbar_policy})
@end deftypefun

@gtkstdmacros{ScrolledWindow, SCROLLED_WINDOW}


@page
@node GtkSeparator, GtkStatusbar, GtkScrolledWindow, Widgets
@comment node-name, next, previous, up
@section The separator widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_separator_get_type (void)
Returns the @code{GtkSeparator} type identifier.
@end deftypefun

@gtkstdmacros{Separator, SEPARATOR}

@page
@node GtkStatusbar, GtkTable, GtkSeparator, Widgets
@comment node-name, next, previous, up
@section The statusbar widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_statusbar_get_type (void)
Returns the @code{GtkStatusbar} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_statusbar_new (void)
Create a new @code{GtkStatusbar} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun gint gtk_statusbar_push (GtkStatusbar *@var{statusbar}, gchar *@var{text})
@end deftypefun

@deftypefun void gtk_statusbar_pop (GtkStatusbar *@var{statusbar}, gint @var{ststusid})
@end deftypefun

@gtkstdmacros{Statusbar, STATUSBAR}

@page
@node GtkTable, GtkText, GtkStatusbar, Widgets
@comment node-name, next, previous, up
@section The table widget

@subsection Description

@subsection Options

@defopt rows
@end defopt

@defopt columns
@end defopt

@defopt homogeneous
This option controls whether all child widgets in the @code{GtkTable} will
be of the same size. The child widgets will be the size of the largest child.
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_table_get_type (void)
Returns the @code{GtkTable} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_table_new (gint @var{rows}, gint @var{columns}, gint @var{homogeneous})
Create a new @code{GtkTable} object initilizing it with the values in 
@var{rows}, @var{columns} and @var{homogeneous}. The new widget is returned 
as a pointer to a @code{GtkWidget}. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_table_attach (GtkTable *@var{table}, GtkWidget *@var{child}, gint @var{left_attach}, gint @var{right_attach}, gint @var{top_attach}, gint @var{bottom_attach}, gint @var{xoptions}, gint @var{yoptions}, gint @var{xpadding}, gint @var{ypadding})
@end deftypefun

@deftypefun void gtk_table_attach_defaults (GtkTable *@var{table}, GtkWidget *@var{widget}, gint @var{left_attach}, gint @var{right_attach}, gint @var{top_attach}, gint @var{bottom_attach})
@end deftypefun

@deftypefun void gtk_table_set_row_spacing (GtkTable *@var{table}, gint @var{row}, gint @var{spacing})
@end deftypefun

@deftypefun void gtk_table_set_col_spacing (GtkTable *@var{table}, gint @var{col}, gint @var{spacing})
@end deftypefun

@deftypefun void gtk_table_set_row_spacings (GtkTable *@var{table}, gint @var{spacing})
@end deftypefun

@deftypefun void gtk_table_set_col_spacings (GtkTable *@var{table}, gint @var{spacing})
@end deftypefun

@gtkstdmacros{Table, TABLE}


@page
@node GtkText, GtkToggleButton, GtkTable, Widgets
@comment node-name, next, previous, up
@section The text widget


@subsection Description

@subsection Signals

@subsection Functions

@deftypefun guint gtk_text_get_type (void)
Returns the @code{GtkText} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_text_new (GtkAdjustment *@var{hadj}, GtkAdjustment *@var{vadj});
Create a new @code{GtkText} object initilizing it with the values in 
@var{hadj} and @var{vadj}. The new widget is returned as a pointer to a 
@code{GtkWidget}. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_text_set_editable (GtkText *@var{text}, gint @var{editable})
@end deftypefun

@deftypefun void gtk_text_set_adjustments (GtkText *@var{text}, GtkAdjustment *@var{hadj}, GtkAdjustment *@var{vadj})
@end deftypefun

@deftypefun void gtk_text_set_point (GtkText *@var{text}, guint @var{index})
@end deftypefun

@deftypefun guint gtk_text_get_point (GtkText *@var{text})
@end deftypefun

@deftypefun guint gtk_text_get_length (GtkText *@var{text})
@end deftypefun

@deftypefun void gtk_text_freeze (GtkText *@var{text})
@end deftypefun

@deftypefun void gtk_text_thaw (GtkText *@var{text})
@end deftypefun

@deftypefun void gtk_text_insert (GtkText *@var{text}, GdkFont *@var{font}, GdkColor *@var{fore}, GdkColor *@var{back}, char *@var{chars}, gint @var{length})
@end deftypefun

@deftypefun gint gtk_text_forward_delete (GtkText *@var{text}, guint @var{nchars})
@end deftypefun

@deftypefun gint gtk_text_backward_delete (GtkText *@var{text}, guint @var{nchars})
@end deftypefun


@gtkstdmacros{Text, TEXT}


@page
@node GtkToggleButton, GtkToolbar, GtkText, Widgets
@comment node-name, next, previous, up
@section The toggle button widget


@subsection Description

@subsection Options

@defopt state
@end defopt

@subsection Signals

@deftypefn Signal void GtkToggleButton::toggled (GtkToggleButton *@var{toggle_button})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_toggle_button_get_type (void)
Returns the @code{GtkToggleButton} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_toggle_button_new (void)
Create a new @code{GtkToggleButton} object returning the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_toggle_button_new_with_label (gchar *@var{label})
Create a new @code{GtkToggleButton} object initilizing it with the values in
@var{label}. The new widget is returned as a pointer to a @code{GtkWidget} 
object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_toggle_button_set_mode (GtkToggleButton *@var{toggle_button}, gint @var{draw_indicator})
@end deftypefun

@deftypefun void gtk_toggle_button_set_state (GtkToggleButton *@var{toggle_button}, gint @var{state})
@end deftypefun

@deftypefun void gtk_toggle_button_toggled (GtkToggleButotn *@var{toggle_button})
@end deftypefun

@gtkstdmacros{ToggleButton, TOGGLE_BUTTON}


@page 
@node GtkToolbar, GtkTooltips, GtkToggleButton, Widgets
@comment node-name, next, previous, up
@section The tool bar widget

@subsection Description

@subsection Options

@defopt orientation
@itemize @bullet
@item GTK_ORIENTATION_HORIZONTAL

@item GTK_ORIENTATION_VERTICAL
@end itemize
@end defopt

@defopt style
@itemize @bullet
@item GTK_TOOLBAR_ICONS
@item GTK_TOOLBAR_TEXT
@item GTK_TOOLBAR_BOTH
@end itemize
@end defopt

@defopt space_size
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_toolbar_get_type (void)
Returns the @code{GtkToolbar} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_toolbar_new (GtkOrientation @var{orientation}, GtkToolbarStyle @var{style})
Create a new @code{GtkToolbar} object initilizing it with the values
@var{orientation} and @var{style}. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_toolbar_append_item (GtkToolbar *@var{toolbar}, char *@var{text}, char *@var{tooltip_text}, GtkPixmap *@var{icon}, GtkSignalFunc @var{callback}, gpointer @var{user_data})
@end deftypefun

@deftypefun void gtk_toolbar_prepend_item (GtkToolbar *@var{toolbar}, char *@var{text}, char *@var{tooltip_text}, GtkPixmap *@var{icon}, GtkSignalFunc @var{callback}, gpointer @var{user_data})
@end deftypefun

@deftypefun void gtk_toolbar_insert_item (GtkToolbar *@var{toolbar}, char *@var{text}, char *@var{tooltip_text}, GtkPixmap *@var{icon}, GtkSignalFunc @var{callback}, gpointer @var{user_data}, gint @var{position})
@end deftypefun

@deftypefun void gtk_toolbar_append_space (GtkToolbar *@var{toolbar})
@end deftypefun

@deftypefun void gtk_toolbar_prepend_space (GtkToolbar *@var{toolbar})
@end deftypefun

@deftypefun void gtk_toolbar_insert_space (GtkToolbar *@var{toolbar}, gint @var{position})
@end deftypefun

@deftypefun void gtk_toolbar_set_orientation (GtkToolbar *@var{toolbar}, GtkOrientation @var{orientation})
@end deftypefun

@deftypefun void gtk_toolbar_set_style (GtkToolbar *@var{toolbar}, GtkToolbarStyle @var{style})
Set the @var{style} of the @var{toolbar} to @var{style}.
@end deftypefun

@deftypefun void gtk_toolbar_set_space_size (GtkToolbar *@var{toolbar}, gint @var{space_size})
@end deftypefun

@deftypefun void gtk_toolbar_set_tooltips (GtkToolbar *@var{toolbar}, gint @var{enable})
@end deftypefun


@gtkstdmacros{Toolbar, TOOLBAR}


@page
@node GtkTooltips, GtkTree, GtkToolbar, Widgets
@comment node-name, next, previous, up
@section The tool tips widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun GtkTooltips* gtk_tooltips_new (void)
Create a new @code{GtkTooltips} object returning the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkTooltips* gtk_tooltips_ref (GtkTooltips *@var{tooltips})
@end deftypefun

@deftypefun void gtk_tooltips_unref (GtkTooltips *@var{tooltips})
@end deftypefun

@deftypefun void gtk_tooltips_free_string (gpointer @var{data}, gpointer @var{user_data})
@end deftypefun

@deftypefun void gtk_tooltips_enable (GtkTooltips *@var{tooltips})
@end deftypefun

@deftypefun void gtk_tooltips_disable (GtkTooltips *@var{tooltips})
@end deftypefun

@deftypefun void gtk_tooltips_set_delay (GtkTooltips *@var{tooltips}, GtkWidget *@var{widget}, gchar *@var{tips_text})
@end deftypefun

@deftypefun void gtk_tooltips_set_colors (GtkTooltips *@var{tooltips}, GdkColor *@var{background}, GdkColor *@var{foreground})
@end deftypefun


@gtkstdmacros{Tooltips, TOOLTIPS}


@page
@node GtkTree, GtkTreeItem, GtkTooltips, Widgets
@comment node-name, next, previous, up
@section The tree widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_tree_get_type (void)
Returns the @code{GtkTree} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_tree_new (void)
Create a new @code{GtkTree} object returning the new widget as a pointer to
a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_tree_append (GtkTree *@var{tree}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_tree_prepend (GtkTree *@var{tree}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_tree_insert (GtkTree *@var{tree}, GtkWidget *@var{child}, gint @var{position})
@end deftypefun

@deftypefun gint gtk_tree_child_position (GtkTree *@var{tree}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_tree_clear_items (GtkTree *@var{tree}, gint @var{start}, gint @var{end})
@end deftypefun

@deftypefun void gtk_tree_remove_items (GtkTree *@var{tree}, GList *@var{items})
@end deftypefun

@deftypefun void gtk_tree_select_child (GtkTree *@var{tree}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_tree_select_item (GtkTree *@var{tree}, gint @var{item})
@end deftypefun

@deftypefun void gtk_tree_unselect_child (GtkTree *@var{tree}, GtkWidget *@var{child})
@end deftypefun

@deftypefun void gtk_tree_unselect_item (GtkTree *@var{tree}, gint @var{item})
@end deftypefun

@deftypefun void gtk_tree_set_selection_mode (GtkTree *@var{tree}, GtkSelectionMode @var{mode})
@end deftypefun

@deftypefun void gtk_tree_set_view_mode (GtkTree *@var{tree}, GtkTreeViewMode @var{mode})
@end deftypefun

@deftypefun void gtk_tree_set_view_lines (GtkTree *@var{tree}, guint @var{flag})
@end deftypefun


@gtkstdmacros{Tree, TREE}


@page
@node GtkTreeItem, GtkVBox, GtkTree, Widgets
@comment node-name, next, previous, up
@section The tree item widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_tree_item_get_type (void)
Returns the @code{GtkTreeItem} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_tree_item_new (void)
Create a new @code{GtkTreeItem} object returning the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun GtkWidget* gtk_tree_item_new_with_label (gchar *@var{label})
Create a new @code{GtkTreeItem} object initilizing it with the values in
@var{label}. The new widget is returned as a pointer to a @code{GtkWidget}
object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_tree_item_set_subtree (GtkTreeItem *@var{tree_item}, GtkWidget *@var{subtree})
@end deftypefun

@deftypefun void gtk_tree_item_select (GtkTreeItem *@var{tree_item})
@end deftypefun

@deftypefun void gtk_tree_item_deselect (GtkTreeItem *@var{tree_item})
@end deftypefun

@deftypefun void gtk_tree_item_expand (GtkTreeItem *@var{tree_item})
@end deftypefun

@deftypefun void gtk_tree_item_collapse (GtkTreeItem *@var{tree_item})
@end deftypefun

@deftypefun void gtk_tree_item_remove_subtree (GtkTreeItem *@var{item})
@end deftypefun


@gtkstdmacros{TreeItem, TREE_ITEM}

@page
@node GtkVBox, GtkVButtonBox, GtkTreeItem, Widgets
@comment node-name, next, previous, up
@section The vertical box widget


@subsection Description

@subsection Options

@defopt homogeneous
This option controls whether each object in the box has the same size. In the
case of the @code{GtkVBox}, this refers to the height. If this option is set
then the @var{expand} option to the @code{gtk_box_pack} (@pxref{GtkBox}) 
routines is always turned on.
@end defopt

@defopt spacing
This option sets the amount of space that is added between the objects packed
into this @code{GtkVBox} object.
@end defopt


@subsection Signals
This widget does not define any new signals.

@subsection Functions

@deftypefun guint gtk_vbox_get_type (void)
Returns the @code{GtkVBox} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_vbox_new (gint @var{homogeneous}, gint @var{spacing})
Create a new @code{GtkVBox} object initilizing it with the values in 
@var{homogeneous} and @var{spacing}. The new widget is returned as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{VBox, VBOX}

@page
@node GtkVButtonBox, GtkViewport, GtkVBox, Widgets
@comment node-name, next, previous, up
@section The vertical button box widget


@subsection Description

@subsection Options
@defopt spacing
@end defopt

@defopt layout
@end defopt

@subsection Signals

@subsection Functions

@deftypefun guint gtk_vbutton_box_get_type (void)
Returns the @code{GtkVButtonBox} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_vbutton_box_new (void)
Create a new @code{GtkVButtonBox} object returning the new widget as a
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@deftypefun void gtk_vbutton_box_set_spacing_default (gint @var{spacing})
@end deftypefun

@deftypefun void gtk_vbutton_box_set_layout_default (gint @var{layout})
@end deftypefun

@deftypefun gint gtk_vbutton_box_get_spacing_default (void)
@end deftypefun

@deftypefun gint gtk_vbutton_box_get_layout_default (void)
@end deftypefun

@gtkstdmacros{VButtonBox, VBUTTON_BOX}


@page
@node GtkViewport, GtkVPaned, GtkVButtonBox, Widgets
@comment node-name, next, previous, up
@section The viewport widget


@subsection Description

@subsection Signals

@subsection Functions

@deftypefun guint gtk_viewport_get_type (void)
Returns the @code{GtkViewport} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_viewport_new (GtkAdjustment *@var{hadjustment}, GtkAdjustment *@var{vadjustment})
@end deftypefun

@deftypefun GtkAdjustment* gtk_viewport_get_hadjustment (GtkViewport *@var{viewport})
@end deftypefun

@deftypefun GtkAdjustment* gtk_viewport_get_vadjustment (GtkViewport *@var{viewport})
@end deftypefun

@deftypefun void gtk_viewport_set_hadjustment (GtkViewport *@var{viewport}, GtkAdjustment *@var{adjustment})
@end deftypefun

@deftypefun void gtk_viewport_set_vadjustment (GtkViewport *@var{viewport}, GtkAdjustment *@var{adjustment})
@end deftypefun

@deftypefun void gtk_viewport_set_shadow_type (GtkViewport *@var{viewport}, GtkShadowType @var{type})
@end deftypefun

@gtkstdmacros{Viewport, VIEWPORT}

@page 
@node GtkVPaned, GtkVRuler, GtkViewport, Widgets
@comment node-name, next, previous, up
@section The vertical paned widget

@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_vpaned_get_type (void)
Returns the @code{GtkVPaned} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_vpaned_new (void)
Create a new @code{GtkVPaned} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{VPaned, VPANED}

@page
@node GtkVRuler, GtkVScale, GtkVPaned, Widgets
@comment node-name, next, previous, up
@section The vertical ruler widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_vruler_get_type (void)
Returns the @code{GtkVRuler} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_vruler_new (void)
Create a new @code{GtkVRuler} object returning the new widget as a pointer to 
a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{VRuler, VRULER}


@page
@node GtkVScale, GtkVScrollbar, GtkVRuler, Widgets
@comment node-name, next, previous, up
@section The vertical ruler widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_vscale_get_type (void)
Returns the @code{GtkVScale} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_vscale_new (GtkAdjustment *@var{adjustment})
Create a new @code{GtkVScale} object returning the new widget as a pointer
to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{VScale, VSCALE}


@page
@node GtkVScrollbar, GtkVSeparator, GtkVScale, Widgets
@comment node-name, next, previous, up
@section The vertical scrollbar widget


@subsection Description

@subsection Options

@subsection Signals

@subsection Functions

@deftypefun guint gtk_vscrollbar_get_type (void)
Returns the @code{GtkVScrollbar} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_vscrollbar_new (GtkAdjustment *@var{adjustment})
Create a new @code{GtkVScrollbar} object initilizing it with the values in
@var{adjusment}. The new widget is returned as a pointer to a @code{GtkWidget}
object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{VScrollbar, VSCROLLBAR}


@page
@node GtkVSeparator, GtkWidget, GtkVScrollbar, Widgets
@comment node-name, next, previous, up
@section The vertical separator widget


@subsection Description

@subsection Signals

@subsection Functions

@deftypefun guint gtk_vseparator_get_type (void)
Returns the @code{GtkVSeparator} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_vseparator_new (void)
Create a new @code{GtkVSeparator} object and return the new widget as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
@end deftypefun

@gtkstdmacros{VSeparator, VSEPARATOR}


@page
@node GtkWidget, GtkWindow, GtkVSeparator, Widgets
@comment node-name, next, previous, up
@section The base widget


@subsection Description

@subsection Signals

@deftypefn Signal void GtkWidget::show (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkWidget::hide (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkWidget::map (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkWidget::unmap (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkWidget::realize (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkWidget::unrealize (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkWidget::draw (GtkWidget *@var{widget}, GdkRectangle *@var{area})
@end deftypefn

@deftypefn Signal void GtkWidget::draw_focus (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkWidget::draw_default (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal void GtkWidget::size_request (GtkWidget *@var{widget}, GtkRequisition *@var{requisition})
@end deftypefn

@deftypefn Signal void GtkWidget::size_allocate (GtkWidget *@var{widget}, GtkAllocation *@var{allocation})
@end deftypefn

@deftypefn Signal void GtkWidget::state_changed (GtkWidget *@var{widget})
@end deftypefn

@deftypefn Signal gint GtkWidget::install_accelerator (GtkWidget *@var{widget}, gchar *@var{signal_name}, gchar @var{key}, guint8 @var{modifiers})
@end deftypefn

@deftypefn Signal void GtkWidget::remove_accelerator (GtkWidget *@var{widget}, gchar *@var{signal_name})
@end deftypefn

@deftypefn Signal gint GtkWidget::event (GtkWidget *@var{widget}, GdkEvent *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::button_press_event (GtkWidget *@var{widget}, GdkEventButton *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::button_release_event (GtkWidget *@var{widget}, GdkEventButton *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::motion_notify_event (GtkWidget *@var{widget}, GdkEventMotion *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::delete_event (GtkWidget *@var{widget}, GdkEventAny *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::destroy_event (GtkWidget *@var{widget}, GdkEventAny *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::expose_event (GtkWidget *@var{widget}, GdkEventExpose *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::key_press_event (GtkWidget *@var{widget}, GdkEventKey *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::key_release_event (GtkWidget *@var{widget}, GdkEventKey *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::enter_notify_event (GtkWidget *@var{widget}, GdkEventCrossing *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::leave_notify_event (GtkWidget *@var{widget}, GdkEventCrossing *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::configure_event (GtkWidget *@var{widget}, GdkEventConfigure *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::focus_in_event (GtkWidget *@var{widget}, GdkEventFocus *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::focus_out_event (GtkWidget *@var{widget}, GdkEventFocus *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::map_event (GtkWidget *@var{widget}, GdkEventAny *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::unmap_event (GtkWidget *@var{widget}, GdkEventAny *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::property_notify_event (GtkWidget *@var{widget}, GdkEventProperty *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::selection_clear_event (GtkWidget *@var{widget}, GdkEventSelection *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::selection_request_event (GtkWidget *@var{widget}, GdkEventSelection *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::selection_notify_event (GtkWidget *@var{widget}, GdkEventSelection *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::drop_event (GtkWidget *@var{widget}, GdkEventDrop *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::drag_begin_event (GtkWidget *@var{widget}, GdkEventDragBegin *@var{event})
@end deftypefn

@deftypefn Signal gint GtkWidget::other_event (GtkWidget *@var{widget}, GdkEventOther *@var{event})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_widget_get_type (void)
Returns the @code{GtkWidget} type identifier.
@end deftypefun

@deftypefun void gtk_widget_class_init (GtkWidgetClass *@var{class})
@end deftypefun

@deftypefun void gtk_widget_init (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_destroy (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_show (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_hide (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_map (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_unmap (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_realize (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_unrealize (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_draw (GtkWidget *@var{widget}, GdkRectangle *@var{area})
@end deftypefun

@deftypefun void gtk_widget_draw_focus (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_draw_children (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_size_request (GtkWidget *@var{widget}, GtkRequisition *@var{requisition})
@end deftypefun

@deftypefun void gtk_widget_size_allocate (GtkWidget *@var{widget}, GtkAllocation *@var{allocation})
@end deftypefun

@deftypefun void gtk_widget_install_accelerator (GtkWidget *@var{widget}, GtkAcceleratorTable *@var{table}, gchar *@var{signal_name}, gchar @var{key}, guint8 @var{modifiers})
@end deftypefun

@deftypefun void gtk_widget_remove_accelerator (GtkWidget *@var{widget}, GtkAcceleratorTable *@var{table}, gchar *@var{signal_name})
@end deftypefun

@deftypefun gint gtk_widget_event (GtkWidget *@var{widget}, GdkEvent *@var{event})
@end deftypefun

@deftypefun void gtk_widget_reparent (GtkWidget *@var{widget}, GtkWidget *@var{new_parent})
@end deftypefun

@deftypefun void gtk_widget_popup (GtkWidget *@var{widget}, gint @var{x}, gint @var{y})
@end deftypefun

@deftypefun gint gtk_widget_intersect (GtkWidget *@var{widget}, GdkRectangle *@var{area}, GdkRectangle *@var{intersection})
@end deftypefun

@deftypefun void gtk_widget_grab_focus (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_grab_default (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_restore_state (GtkWidget *@var{widget})
@end deftypefun

@deftypefun void gtk_widget_set_name (GtkWidget *@var{widget}, gchar *@var{name})
@end deftypefun

@deftypefun void gtk_widget_set_state (GtkWidget *@var{widget}, GtkStateType @var{state})
@end deftypefun

@deftypefun void gtk_widget_set_sensitive (GtkWidget *@var{widget}, gint sensitive)
@end deftypefun

@deftypefun void gtk_widget_set_parent (GtkWidget *@var{widget}, GtkWidget *@var{parent})
@end deftypefun

@deftypefun void gtk_widget_set_style (GtkWidget *@var{widget}, GtkStyle *@var{style})
@end deftypefun

@deftypefun void gtk_widget_set_uposition (GtkWidget *@var{widget}, gint @var{x}, gint @var{y})
@end deftypefun

@deftypefun void gtk_widget_set_usize (GtkWidget *@var{widget}, gint @var{width}, gint @var{height})
@end deftypefun

@deftypefun GtkWidget* gtk_widget_get_toplevel (GtkWidget *@var{widget})
@end deftypefun

@deftypefun GtkWidget* gtk_widget_get_ancestor (GtkWidget *@var{widget}, gint @var{type})
@end deftypefun

@deftypefun GdkColormap* gtk_widget_get_colormap (GtkWidget *@var{widget})
@end deftypefun

@deftypefun GdkVisual* gtk_widget_get_visual (GtkWidget *@var{visual})
@end deftypefun

@deftypefun GtkStyle* gtk_widget_get_style (GtkWidget *@var{style})
@end deftypefun

@gtkstdmacros{Widget, WIDGET}


@page
@node GtkWindow, , GtkWidget, Widgets
@comment node-name, next, previous, up
@section The window widget


@subsection Description

@subsection Options

@defopt type
The @var{type} options specify how this widget will interact with the 
window manager. Currently the following types and the effect they have
on the window to window manager interaction is as follows.
@itemize @bullet

@item
@code{GTK_WINDOW_TOPLEVEL}
@itemize @bullet
@item
The option @code{GTK_WINDOW_TOPLEVEL} is usually used for the main application
window that will remain for the entire application run.
@end itemize
@item
@code{GTK_WINDOW_DIALOG}
@itemize @bullet
@item
The option @code{GTK_WINDOW_DIALOG} is usually used for transient
windows. These windows will open up, gather some input or provide some 
application specific updates, then close. The window manager is free not
to provide all the 'normal' window functions to this window.
@end itemize
@item
@code{GTK_WINDOW_POPUP}
@itemize @bullet
@item
The option @code{GTK_WINDOW_POPUP} is usually used for transient windows.
These windows are typically used for when no user interaction is required,
to notify the user of some condition. Other uses for these types of windows
are for 'about windows', startup windows and the like. Typically the window
manager will @strong{not} provide the usual widgets that surround the 
window. At the most all that will be provided is a border. Also note that
windows that set this @var{type} will not be in any window list of the window
manager. Though this window will @strong{not} get the kill and close widgets
of the window manager they still can recieve said events and should be 
taken into account.
@end itemize
@end itemize
@end defopt

@defopt title
The @var{title} option will set the title of the window in the window manager.
@strong{Note:} On windows that have the @var{type} option set to 
@code{GTK_WINDOW_POPUP} there is a strong possiblity that this will text
will not be seen.
@end defopt

@defopt position
The @var{position} option will determine where the window will be displayed
when it is finally drawn to the screen. Currently the following positions 
 and the effect they have on window placement can be specified.

@itemize @bullet

@item
@code{GTK_WIN_POS_NONE}
@itemize @bullet
@item
This @var{position} type will allow the window manager full freedom, depending
on the current settings in the window manager. As to where the window will
be placed.
@end itemize
@item
@code{GTK_WIN_POS_CENTER}
@itemize @bullet
@item
This @var{position} option will cause the window to center itself on the 
the screen. This option setting will take into account the @var{virtual screen}
size when calculating the center. This is @strong{not} the same as the 
@var{virtual desktop} setting of many window managers. It will center itself
on the current @var{virtual desktop}.
@end itemize
@item
@code{GTK_WIN_POS_MOUSE}
@itemize @bullet
This @var{position} option will cause the window to center itself under the 
mouse pointers' current location. Typical uses for this setting is in 
warning/error/informational dialogs where user interaction is desired.
@end itemize
@end itemize
@end defopt


@subsection Signals

@deftypefn Signal void GtkWindow::move_resize (GtkWindow *@var{window}, gint *@var{x}, gint *@var{y}, gint @var{width}, gint @var{height})
@end deftypefn

@deftypefn Signal void GtkWindow::set_focus (GtkWindow *@var{window}, GtkWidget *@var{focus})
@end deftypefn

@subsection Functions

@deftypefun guint gtk_window_get_type (void)
Returns the @code{GtkWindow} type identifier.
@end deftypefun

@deftypefun GtkWidget* gtk_window_new (GtkWindowType @var{type})
Create a new @code{GtkWindow} object. The new widget is returned as a 
pointer to a @code{GtkWidget} object. @code{NULL} is returned on failure.
The @var{type} can be one of @code{GTK_WINDOW_TOPLEVEL}, 
@code{GTK_WINDOW_DIALOG} or, @code{GTK_WINDOW_POPUP}. The @var{type} 
value determines how this widget will interact with the window manager.
@end deftypefun

@deftypefun void gtk_window_set_title (GtkWindow *@var{window}, gchar *@var{title})
Set the title of this window to the text in the @var{title} argument. It is 
important to not set the fields of the @code{GtkWindow} structure directly.
@end deftypefun

@deftypefun void gtk_window_set_focus (GtkWindow *@var{window}, GtkWidget *@var{focus})
@end deftypefun

@deftypefun void gtk_window_set_default (GtkWindow *@var{window}, GtkWidget *@var{defaultw})
@end deftypefun

@deftypefun void gtk_window_set_policy (GtkWindow *@var{window}, gint @var{allow_shrink}, gint @var{allow_grow}, gint @var{auto_shrink})
@end deftypefun

@deftypefun void gtk_window_add_accelerator_table (GtkWindow *@var{window}, GtkAcceleratorTable *@var{table})
@end deftypefun

@deftypefun void gtk_window_remove_accelerator_table (GtkWindow *@var{window}, GtkAcceleratorTable *@var{table})
@end deftypefun

@deftypefun void gtk_window_position (GtkWindow *@var{window}, GtkWindowPosition @var{position})
Set the position that the window will be at when it is finally drawn to the
screen. The @var{position} argument effects the the position as described
above.
@end deftypefun

@gtkstdmacros{Window, WINDOW}


@node Other Objects, Miscellaneous, Widgets, Top
@comment node-name, next, previous, up
@chapter Utility objects


@menu
* GtkAcceleratorTable::		The accelerator table object.
* GtkAdjustment::               The adjustment object.
* GtkGC::			The GC object.
* GtkData::                     The data object.
* GtkStyle::			The style object.
@end menu


@node GtkAcceleratorTable, GtkAdjustment, Other Objects, Other Objects
@comment node-name, next, previous, up
@section The accelerator table object

@subsection Description

@subsection Functions

@deftypefun GtkAcceleratorTable* gtk_accelerator_table_new (void)
@end deftypefun

@deftypefun GtkAcceleratorTable* gtk_accelerator_table_find (GtkObject *@var{object}, gchar *@var{signal_name}, guchar @var{accelerator_key}, guint8 @var{accelerator_mods})
@end deftypefun

@deftypefun GtkAccelerator *gtk_accelerator_table_ref (GtkAcceleratorTable *@var{table})
@end deftypefun

@deftypefun void gtk_accelerator_table_unref (GtkAcceleratorTable *@var{table})
@end deftypefun

@deftypefun void gtk_accelerator_table_install (GtkAcceleratorTable *@var{table}, GtkObject *@var{object}, gchar *@var{signal_name}, guchar @var{accelerator_key}, guint8 @var{accelerator_mods})
@end deftypefun

@deftypefun void gtk_accelerator_table_remove (GtkAcceleratorTable *@var{table}, GtkObject *@var{object}, gchar *@var{signal_name})
@end deftypefun

@deftypefun void gtk_accelerator_table_check (GtkAcceleratorTable *@var{table}, guchar @var{accelerator_key}, guint8 @var{accelerator_mods})
@end deftypefun

@deftypefun void gtk_accelerator_table_set_mod_mask (GtkAcceleratorTable *@var{table}, guint8 @var{modifier_mask})
@end deftypefun

@page
@node GtkAdjustment, GtkGC, GtkAcceleratorTable, Other Objects
@comment node-name, next, previous, up
@section The adjustment object

@subsection Description

@subsection Functions

@deftypefun guint gtk_adjustment_get_type (void)
Returns the @code{GtkAdjustment} type identifier.
@end deftypefun

@deftypefun GtkObject* gtk_adjustment_new (gfloat @var{value}, gfloat @var{lower}, gfloat @var{upper}, gfloat @var{step_increment}, gfloat @var{page_increment}, gfloat @var{page_size})
@end deftypefun

@gtkstdmacros{GtkAdjustment, ADJUSTMENT}

@page
@node GtkGC, GtkData, GtkAdjustment, Other Objects
@section The GC object

@subsection Description

@subsection Functions

@deftypefun GdkGC* gtk_gc_get (gint @var{depth}, GdkColormap *@var{colormap}, GdkGCValues *@var{values}, GdkGCValuesMask @var{values_mask})
@end deftypefun

@deftypefun void gtk_gc_release (GdkGC *@var{gc})
@end deftypefun

@page
@node GtkData, GtkStyle, GtkGC, Other Objects
@comment node-name, next, previous, up
@section The data object

@subsection Description

@subsection Functions

@deftypefun guint gtk_data_get_type (void)
Returns the @code{GtkData} type identifier.
@end deftypefun

@gtkstdmacros{Data, DATA}
@page
@node GtkStyle, ,GtkData, Other Objects
@section The style object

@subsection Description

@subsection Functions

@page
@node Miscellaneous, Examples, Other Objects, Top
@comment node-name, next, previous, up
@chapter Initialization, exit and other features


@menu
* Initialization and exit::     Initializing and exiting GTK.
* Customization::		Customizing the library.
* Menu Factories::              Simplified menu creation.
* Tree Factories::              Simplified tree creation.
* Tool Tips::                   Pop up help mechanism.
* Resource Files::              Resource files.
* Standard Macros::             Macros defined by all objects.
@end menu


@node Initialization and exit, Customization, Miscellaneous, Miscellaneous
@comment node-name, next, previous, up
@section Initializing and exiting GTK

@subsection Initializing
Before any GTK functions can be utilized the library must be initilized. This
can be accomplished by calling the @code{gtk_init} function. The arguments
you pass to this function should be the same arguments that were passed to
your application. This function will parse the arguments that it understands
and handle initilizing the GDK library for you.

@subsection Exiting

@subsection Functions

@deftypefun void gtk_init (int *@var{argc}, char **@var{argv})
Function to initilize GTK and GDK for you. This function will remove any
command line arguments from @var{argc} and @var{argv} that it understands.

@example
int main (int argc, char *argv[])
@{
   @dots{Any local variables or non GTK/GDK initilization}

   /* Initalize GTK. */
   gtk_init(&argc, &argc);
   
@}
@end example
@end deftypefun

@deftypefun void gtk_exit (int @var{error_code})
Exit GTK and perform any necessary cleanup. @code{gtk_exit} will call the
systems @code{exit} function passing @var{error_code} as the parameter.
@end deftypefun

@deftypefun gint gtk_events_pending (void)
Returns the number of events pending on the event queue.
@end deftypefun

@deftypefun void gtk_main (void)
@end deftypefun

@deftypefun guint gtk_main_level (void)
@end deftypefun

@deftypefun void gtk_main_quit (void)
A call to this function will cause the @code{gtk_main} function to exit, 
thereby allowing your application to exit.
@end deftypefun

@page
@node Customization, Menu Factories, Initialization and exit, Miscellaneous
@comment node-name, next, previous, up
@section Customization of the library

@subsection Description
Like other X-windows applications the GTK library provides a way for the
user and application programmer to change the colors of just about any widget. 
You can also specify what pixmap should be tiled onto the background of some
widgets. All this is handled through a similar method as in the standard 
X-windows environment, through the use of 'rc' files. The format and 
functions available in these files is discussed below.

@subsection Functions
The following functions are available to handle the rc files.

@deftypefun void gtk_rc_parse (char *@var{filename})
This function will parse the @var{filename} that is passed to it as its 
argument. It will use the style settings for the widget types defined there.
@end deftypefun

@deftypefun void gtk_rc_init (void)
This function will initilize the rc file parser, normally this need not
be called directly as the @code{gtk_rc_parse} function will handle this for
you.
@end deftypefun

@page
@node Menu Factories, Tree Factories, Customization, Miscellaneous
@comment node-name, next, previous, up
@section Simplified menu creation

@page
@node Tree Factories, Tool Tips, Menu Factories, Miscellaneous
@comment node-name, next, previous, up
@section Simplified tree creation

@page
@node Tool Tips, Resource Files, Tree Factories, Miscellaneous
@comment node-name, next, previous, up
@section Pop up help mechanism

@subsection Description

@page
@node Resource Files, Standard Macros, Tool Tips, Miscellaneous
@comment node-name, next, previous, up
@section Resource Files

@page
@node Standard Macros, , Resource Files, Miscellaneous
@comment node-name, next, previous, up
@section Macros defined by all objects

There are three macros that are defined by all object types. The first
two are used for performing casts and the last is for querying whether
an object is of a particular type. These macros are both conveniences
and debugging tools. If the GTK library was compiled with @code{NDEBUG}
defined as a preprocessor symbol (via the -DNDEBUG to cc), then the
macros check the object type and emit a warning if the cast is
invalid. Doing such checking is fairly expensive since the cast macros
are used everywhere in GTK and would normally be turned off in a public
release of a product. Note: The functions below are indeed macros, but
they may be considered functions for most purposes.

@deftypefun Gtk<ObjectType>* GTK_<OBJECT_TYPE> (gpointer @var{obj})
Cast a generic pointer to @code{Gtk<ObjectType>*}. This function is
provided in order to be able to provide checking during development
stages of code development since it is possible to examine the actual
type of object (using @code{gtk_type_is_a}) before performing the cast.
@end deftypefun

@deftypefun Gtk<ObjectType>Class* GTK_<OBJECT_TYPE>_CLASS (gpointer @var{class})
Cast a generic pointer to @code{Gtk<ObjectType>Class*}. Like
@code{GTK_<ObjectType>}, this function is, in reality, a macro.
@end deftypefun

@deftypefun gint GTK_IS_<ObjectType> (gpointer @var{obj})
Determine if a generic pointer refers to a @code{Gtk<ObjectType>}
object. This function is, in reality, a macro wrapper around the
@code{gtk_type_is_a} function (@pxref{Objects}).
@end deftypefun


@node Examples, Object Implementation, Miscellaneous, Top
@comment node-name, next, previous, up
@chapter Using GTK
@cindex Using GTK

@menu
* Simple::                      The simplest GTK program.
* Hello World::                 Hello world in GTK.
* Hello World II::              An enhanced hello world.
* Hello World III::             Making Hello World II robust.
@end menu


@node Simple, Hello World, Examples, Examples
@comment node-name, next, previous, up
@section The simplest GTK program


The 16 line GTK program shown below is just about the simplest possible
program which uses GTK. (Well, technically, you don't have to create the
window and it would still be a program which uses GTK). The program,
when compiled and run, will create a single window 200x200 pixels in
size. The program does not exit until its is explicitly killed using the
shell or a window manager function.

@example
#include <gtk/gtk.h>

int
main (int argc, char *argv[])
@{
  GtkWidget *window;

  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_show (window);

  gtk_main ();

  return 0;
@}
@end example

The first point of interest in this program is the standard
initialization line.

@example
  gtk_init (&argc, &argv);
@end example

Almost every GTK program will contain such a line. GTK will initialize
itself and GDK and remove any command line arguments it recognizes from
@var{argc} and @var{argv}.

The next two lines of code create and display a window.

@example
  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_show (window);
@end example

The @code{GTK_WINDOW_TOPLEVEL} argument specifies that we want the
window to undergo window manager decoration and placement. One might be
lead to think that the window, since it has no children, would be 0x0
pixels in size. But, this is not the case because a window that has no
children defaults to 200x200 pixels in size. Mainly because 0x0 windows
are annoying to manipulate or even see in some cases.

The last line enters the GTK main processing loop.

@example
  gtk_main ();
@end example

Normally, @code{gtk_main} is called once and the program should exit
when it returns. @xref{Initialization and exit}.


@node Hello World, Hello World II, Simple, Examples
@comment node-name, next, previous, up
@section Hello world in GTK


@example
#include <gtk/gtk.h>

int
main (int argc, char *argv[])
@{
  GtkWidget *window;
  GtkWidget *label;

  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_border_width (GTK_CONTAINER (window), 10);

  label = gtk_label_new ("Hello World");
  gtk_container_add (GTK_CONTAINER (window), label);
  gtk_widget_show (label);

  gtk_widget_show (window);

  gtk_main ();

  return 0;
@}
@end example


@node Hello World II, Hello World III, Hello World, Examples
@comment node-name, next, previous, up
@section An enhanced hello world


@example
#include "gtk.h"

void
hello (void)
@{
  g_print ("Hello World\n");
  gtk_exit (0);
@}

int
main (int argc, char *argv[])
@{
  GtkWidget *window;
  GtkWidget *button;

  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_border_width (GTK_CONTAINER (window), 10);

  button = gtk_button_new_with_label ("Hello World");
  gtk_signal_connect (GTK_OBJECT (button), "clicked",
		      GTK_SIGNAL_FUNC (hello), NULL);
  gtk_container_add (GTK_CONTAINER (window), button);
  gtk_widget_show (button);

  gtk_widget_show (window);

  gtk_main ();

  return 0;
@}
@end example


@node Hello World III, , Hello World II, Examples
@comment node-name, next, previous, up
@section Making Hello World II robust


@example
#include "gtk.h"

void
hello (void)
@{
  g_print ("Hello World\n");
  gtk_exit (0);
@}

void
destroy (void)
@{
  gtk_exit (0);
@}

int
main (int argc, char *argv[])
@{
  GtkWidget *window;
  GtkWidget *button;

  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_signal_connect (GTK_OBJECT (window), "destroy",
		      GTK_SIGNAL_FUNC (destroy), NULL);
  gtk_container_border_width (GTK_CONTAINER (window), 10);

  button = gtk_button_new_with_label ("Hello World");
  gtk_signal_connect (GTK_OBJECT (button), "clicked",
		      GTK_SIGNAL_FUNC (hello), NULL);
  gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
			     GTK_SIGNAL_FUNC (gtk_widget_destroy),
			     GTK_OBJECT (window));
  gtk_container_add (GTK_CONTAINER (window), button);
  gtk_widget_show (button);

  gtk_widget_show (window);

  gtk_main ();

  return 0;
@}
@end example


@node Object Implementation, Signal Implementation, Examples, Top
@comment node-name, next, previous, up
@chapter Object internals
@cindex Object Implementaton

Objects (or the @code{GtkObject} type) and the class hierarchy in
general is implemented via a hierarchy of structs and type casting. Be
aware that when classes are mentioned it is the conceptual idea of
classes that is being referred to. GTK is written entirely in C which
provides no direct support for classes.

The first part to the class mechanism is the object fields. These are
fields that will be used on a per object basis. For example, the widget
type contains a field for the widgets parent. Every derived type needs a
reference to its parent type. A descendant class of @code{GtkObject}
would define itself like:

@example
struct Descendant
@{
  GtkObject object;

  @dots{}
@};
@end example

It is important to note that the @code{GtkObject} field needs to appear
first in the descendant type structure. This allows pointers to objects
of type @code{Descendant} to be cast to pointers to @code{GtkObjects}'s
and vice-versa.

The second part to the class mechanism is the class fields. These fields
are defined on a per class basis. In the case of widgets, the class
fields are all the ``virtual'' functions for widgets. The
@code{GtkObject} class defines the @code{destroy} virtual function and
the necessary fields for the signal mechanism as well as a field for
determining the runtime type of an object. A virtual function is
semantically the same as it is in C++. That is, the actual function that
is called is determined based on the type of the object. Or, more
specifically, the actual function call depends on the class structure
that is pointed to by the @code{klass} field of the @code{GtkObject}
structure.

To see how the class fields work it is necessary to see the object
fields for a @code{GtkObject}. The @code{GtkObject} type is defined as
follows:

@example
typedef struct _GtkObject GtkObject;

struct _GtkObject
@{
  guint32 flags;
  GtkObjectClass *klass;
  gpointer object_data;
@};
@end example

The @code{class} field actually points to a class structure derived from
@code{GtkObjectClass}. By convention, each new type defines its own
class structure even if it is unnecessary. As an example, the
hypothetical @code{Descendant} class would define its class structure
as:

@example
struct DescendantClass
@{
  GtkObjectClass parent_class;

  @dots{}
@};
@end example

It is convention to name the parent class field (@code{GtkObjectClass}
in this case), @code{parent_class}. For the same reason as stated above
for the object structure, the parent class field must be the first field
in the class structure.

@strong{Note:} GTK assumes that the first field in a structure will be
placed by the compiler at the start of the structure. This is certainly
true for gcc, however, from my precursory reading of the C standard I
was unable to come to a definite conclusion as to whether this was
required or simply done for simplicity. I'm not too worried about this
assumption, though, as every C compiler I've ever encountered would work
with GTK.

The @code{flags} field of the @code{GtkObject} structure is used to keep
track of a relatively few object flags and is also used by the
@code{GtkWidget} type to store additional flags. At this time, the upper
16 bits of the flags field are reserved but unused.

The @code{object_data} field of the @code{GtkObject} structure is an
opaque pointer used by the object data mechanism. In truth, it is a
pointer to the beginning of the data list which is composed of the
following structures.

@example
typedef struct _GtkObjectData GtkObjectData;

struct _GtkObjectData
@{
  guint id;
  gpointer data;
  GtkObjectData *next;
@};
@end example

The data mechanism allows arbitrary data to be associated with a
character string key in any object. A hash table is used to transform
the character string key into the data id and then a search through the
list is made to see if the data exists. The assumption being that the
data list will usually be short and therefore a linear search is
ok. Future work on the data mechanism might make use of a resizable
array instead of a linked list. This would shrink the overhead of the
@code{GtkObjectData} structure by 4 bytes on 32 bit architectures.


@node Signal Implementation, Widget Implementation, Object Implementation, Top
@comment node-name, next, previous, up
@chapter Signal internals
@cindex Signal Implementation


@node Widget Implementation, Function Index, Signal Implementation, Top
@comment node-name, next, previous, up
@chapter Widget internals
@cindex Widget Implementation


@node Function Index, Concept Index, Widget Implementation, Top
@comment node-name, next, previous, up
@unnumbered Function Index

@printindex fn


@node Concept Index, , Function Index, Top
@comment node-name, next, previous, up
@unnumbered Concept Index

@printindex cp


@summarycontents
@contents
@bye