This file is indexed.

/usr/share/ada/adainclude/gtkada/gdk-window.ads is in libgtkada16.1.0-dev 17.0.2017-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
------------------------------------------------------------------------------
--                                                                          --
--      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       --
--                     Copyright (C) 2000-2017, AdaCore                     --
--                                                                          --
-- This library is free software;  you can redistribute it and/or modify it --
-- under terms of the  GNU General Public License  as published by the Free --
-- Software  Foundation;  either version 3,  or (at your  option) any later --
-- version. This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            --
--                                                                          --
--                                                                          --
--                                                                          --
--                                                                          --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
--                                                                          --
------------------------------------------------------------------------------

pragma Ada_2005;

pragma Warnings (Off, "*is already use-visible*");
with Cairo;                   use Cairo;
with Cairo.Region;            use Cairo.Region;
with Gdk;                     use Gdk;
with Gdk.Color;               use Gdk.Color;
with Gdk.Device;              use Gdk.Device;
with Gdk.Display;             use Gdk.Display;
with Gdk.Event;               use Gdk.Event;
with Gdk.Frame_Clock;         use Gdk.Frame_Clock;
with Gdk.RGBA;                use Gdk.RGBA;
with Gdk.Rectangle;           use Gdk.Rectangle;
with Gdk.Screen;              use Gdk.Screen;
with Gdk.Types;               use Gdk.Types;
with Gdk.Visual;              use Gdk.Visual;
with Glib;                    use Glib;
with Glib.Generic_Properties; use Glib.Generic_Properties;
with Glib.Glist;              use Glib.Glist;
with Glib.Object;             use Glib.Object;
with Glib.Properties;         use Glib.Properties;

package Gdk.Window is

   type Gdk_Window_Class is (
      Input_Output,
      Input_Only);
   pragma Convention (C, Gdk_Window_Class);
   --  Gdk_Input_Output windows are the standard kind of window you might
   --  expect. Such windows receive events and are also displayed on screen.
   --  Gdk_Input_Only windows are invisible; they are usually placed above
   --  other windows in order to trap or filter the events. You can't draw on
   --  Gdk_Input_Only windows.

   type Gdk_Window_Edge is (
      Window_Edge_North_West,
      Window_Edge_North,
      Window_Edge_North_East,
      Window_Edge_West,
      Window_Edge_East,
      Window_Edge_South_West,
      Window_Edge_South,
      Window_Edge_South_East);
   pragma Convention (C, Gdk_Window_Edge);
   --  Determines a window edge or corner.

   type Gdk_Window_Type is (
      Window_Root,
      Window_Toplevel,
      Window_Child,
      Window_Temp,
      Window_Foreign,
      Window_Offscreen,
      Window_Subsurface);
   pragma Convention (C, Gdk_Window_Type);
   --  Describes the kind of window.

   type Gdk_Window_Attributes_Type is mod 2 ** Integer'Size;
   pragma Convention (C, Gdk_Window_Attributes_Type);
   --  Used to indicate which fields in the Gdk_Window_Attr struct should be
   --  honored. For example, if you filled in the "cursor" and "x" fields of
   --  Gdk_Window_Attr, pass "Gdk_Wa_X | Gdk_Wa_Cursor" to gdk_window_new.
   --  Fields in Gdk_Window_Attr not covered by a bit in this enum are
   --  required; for example, the Width/Height, Wclass, and Window_Type fields
   --  are required, they have no corresponding flag in
   --  Gdk.Window.Gdk_Window_Attributes_Type.

   Wa_Title : constant Gdk_Window_Attributes_Type := 2;
   Wa_X : constant Gdk_Window_Attributes_Type := 4;
   Wa_Y : constant Gdk_Window_Attributes_Type := 8;
   Wa_Cursor : constant Gdk_Window_Attributes_Type := 16;
   Wa_Visual : constant Gdk_Window_Attributes_Type := 32;
   Wa_Wmclass : constant Gdk_Window_Attributes_Type := 64;
   Wa_Noredir : constant Gdk_Window_Attributes_Type := 128;
   Wa_Type_Hint : constant Gdk_Window_Attributes_Type := 256;

   type Gdk_Window_Hints is mod 2 ** Integer'Size;
   pragma Convention (C, Gdk_Window_Hints);
   --  Used to indicate which fields of a Gdk.Window.Gdk_Geometry struct
   --  should be paid attention to. Also, the presence/absence of Gdk_Hint_Pos,
   --  Gdk_Hint_User_Pos, and Gdk_Hint_User_Size is significant, though they
   --  don't directly refer to Gdk.Window.Gdk_Geometry fields.
   --  Gdk_Hint_User_Pos will be set automatically by Gtk.Window.Gtk_Window if
   --  you call Gtk.Window.Move. Gdk_Hint_User_Pos and Gdk_Hint_User_Size
   --  should be set if the user specified a size/position using a --geometry
   --  command-line argument; Gtk.Window.Parse_Geometry automatically sets
   --  these flags.

   Hint_Pos : constant Gdk_Window_Hints := 1;
   Hint_Min_Size : constant Gdk_Window_Hints := 2;
   Hint_Max_Size : constant Gdk_Window_Hints := 4;
   Hint_Base_Size : constant Gdk_Window_Hints := 8;
   Hint_Aspect : constant Gdk_Window_Hints := 16;
   Hint_Resize_Inc : constant Gdk_Window_Hints := 32;
   Hint_Win_Gravity : constant Gdk_Window_Hints := 64;
   Hint_User_Pos : constant Gdk_Window_Hints := 128;
   Hint_User_Size : constant Gdk_Window_Hints := 256;

   type Gdk_Window_Type_Hint is (
      Window_Type_Hint_Normal,
      Window_Type_Hint_Dialog,
      Window_Type_Hint_Menu,
      Window_Type_Hint_Toolbar,
      Window_Type_Hint_Splashscreen,
      Window_Type_Hint_Utility,
      Window_Type_Hint_Dock,
      Window_Type_Hint_Desktop,
      Window_Type_Hint_Dropdown_Menu,
      Window_Type_Hint_Popup_Menu,
      Window_Type_Hint_Tooltip,
      Window_Type_Hint_Notification,
      Window_Type_Hint_Combo,
      Window_Type_Hint_Dnd);
   pragma Convention (C, Gdk_Window_Type_Hint);
   --  These are hints for the window manager that indicate what type of
   --  function the window has. The window manager can use this when
   --  determining decoration and behaviour of the window. The hint must be set
   --  before mapping the window.
   --
   --  See the [Extended Window Manager
   --  Hints](http://www.freedesktop.org/Standards/wm-spec) specification for
   --  more details about window types.

   type Gdk_WMDecoration is mod 2 ** Integer'Size;
   pragma Convention (C, Gdk_WMDecoration);
   --  These are hints originally defined by the Motif toolkit. The window
   --  manager can use them when determining how to decorate the window. The
   --  hint must be set before mapping the window.

   Decor_All : constant Gdk_WMDecoration := 1;
   Decor_Border : constant Gdk_WMDecoration := 2;
   Decor_Resizeh : constant Gdk_WMDecoration := 4;
   Decor_Title : constant Gdk_WMDecoration := 8;
   Decor_Menu : constant Gdk_WMDecoration := 16;
   Decor_Minimize : constant Gdk_WMDecoration := 32;
   Decor_Maximize : constant Gdk_WMDecoration := 64;

   type Gdk_WMFunction is mod 2 ** Integer'Size;
   pragma Convention (C, Gdk_WMFunction);
   --  These are hints originally defined by the Motif toolkit. The window
   --  manager can use them when determining the functions to offer for the
   --  window. The hint must be set before mapping the window.

   Func_All : constant Gdk_WMFunction := 1;
   Func_Resize : constant Gdk_WMFunction := 2;
   Func_Move : constant Gdk_WMFunction := 4;
   Func_Minimize : constant Gdk_WMFunction := 8;
   Func_Maximize : constant Gdk_WMFunction := 16;
   Func_Close : constant Gdk_WMFunction := 32;

   type Gdk_Gravity is (
      Gravity_North_West,
      Gravity_North,
      Gravity_North_East,
      Gravity_West,
      Gravity_Center,
      Gravity_East,
      Gravity_South_West,
      Gravity_South,
      Gravity_South_East,
      Gravity_Static);
   pragma Convention (C, Gdk_Gravity);
   --  Defines the reference point of a window and the meaning of coordinates
   --  passed to Gtk.Window.Move. See Gtk.Window.Move and the "implementation
   --  notes" section of the [Extended Window Manager
   --  Hints](http://www.freedesktop.org/Standards/wm-spec) specification for
   --  more details.

   for Gdk_Gravity use (
      Gravity_North_West => 1,
      Gravity_North => 2,
      Gravity_North_East => 3,
      Gravity_West => 4,
      Gravity_Center => 5,
      Gravity_East => 6,
      Gravity_South_West => 7,
      Gravity_South => 8,
      Gravity_South_East => 9,
      Gravity_Static => 10);

   type Gdk_Fullscreen_Mode is (
      On_Current_Monitor,
      On_All_Monitors);
   pragma Convention (C, Gdk_Fullscreen_Mode);
   --  Indicates which monitor (in a multi-head setup) a window should span
   --  over when in fullscreen mode.

   type Gdk_Geometry is record
      Min_Width : Gint := 0;
      Min_Height : Gint := 0;
      Max_Width : Gint := 0;
      Max_Height : Gint := 0;
      Base_Width : Gint := 0;
      Base_Height : Gint := 0;
      Width_Inc : Gint := 0;
      Height_Inc : Gint := 0;
      Min_Aspect : Gdouble;
      Max_Aspect : Gdouble;
      Win_Gravity : Gdk_Gravity;
   end record;
   pragma Convention (C, Gdk_Geometry);

   function From_Object_Free (B : access Gdk_Geometry) return Gdk_Geometry;
   pragma Inline (From_Object_Free);
   --  The Gdk.Window.Gdk_Geometry struct gives the window manager information
   --  about a window's geometry constraints. Normally you would set these on
   --  the GTK+ level using Gtk.Window.Set_Geometry_Hints.
   --  Gtk.Window.Gtk_Window then sets the hints on the Gdk.Gdk_Window it
   --  creates.
   --
   --  Gdk.Window.Set_Geometry_Hints expects the hints to be fully valid
   --  already and simply passes them to the window manager; in contrast,
   --  Gtk.Window.Set_Geometry_Hints performs some interpretation. For example,
   --  Gtk.Window.Gtk_Window will apply the hints to the geometry widget
   --  instead of the toplevel window, if you set a geometry widget. Also, the
   --  Min_Width/Min_Height/Max_Width/Max_Height fields may be set to -1, and
   --  Gtk.Window.Gtk_Window will substitute the size request of the window or
   --  geometry widget. If the minimum size hint is not provided,
   --  Gtk.Window.Gtk_Window will use its requisition as the minimum size. If
   --  the minimum size is provided and a geometry widget is set,
   --  Gtk.Window.Gtk_Window will take the minimum size as the minimum size of
   --  the geometry widget rather than the entire window. The base size is
   --  treated similarly.
   --
   --  The canonical use-case for Gtk.Window.Set_Geometry_Hints is to get a
   --  terminal widget to resize properly. Here, the terminal text area should
   --  be the geometry widget; Gtk.Window.Gtk_Window will then automatically
   --  set the base size to the size of other widgets in the terminal window,
   --  such as the menubar and scrollbar. Then, the Width_Inc and Height_Inc
   --  fields should be set to the size of one character in the terminal.
   --  Finally, the base size should be set to the size of one character. The
   --  net effect is that the minimum size of the terminal will have a 1x1
   --  character terminal area, and only terminal sizes on the "character grid"
   --  will be allowed.
   --
   --  Here's an example of how the terminal example would be implemented,
   --  assuming a terminal area widget called "terminal" and a toplevel window
   --  "toplevel":
   --
   --  |[<!-- language="C" --> GdkGeometry hints;
   --
   --  hints.base_width = terminal->char_width; hints.base_height =
   --  terminal->char_height; hints.min_width = terminal->char_width;
   --  hints.min_height = terminal->char_height; hints.width_inc =
   --  terminal->char_width; hints.height_inc = terminal->char_height;
   --
   --  gtk_window_set_geometry_hints (GTK_WINDOW (toplevel), GTK_WIDGET
   --  (terminal), &hints, GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE |
   --  GDK_HINT_BASE_SIZE); ]|
   --
   --  The other useful fields are the Min_Aspect and Max_Aspect fields; these
   --  contain a width/height ratio as a floating point number. If a geometry
   --  widget is set, the aspect applies to the geometry widget rather than the
   --  entire window. The most common use of these hints is probably to set
   --  Min_Aspect and Max_Aspect to the same value, thus forcing the window to
   --  keep a constant aspect ratio.

   function Convert (R : Gdk.Gdk_Window) return System.Address;
   function Convert (R : System.Address) return Gdk.Gdk_Window;
   package Gdk_Window_List is new Generic_List (Gdk.Gdk_Window);

   ---------------
   -- Callbacks --
   ---------------

   type Gdk_Window_Child_Func is access function (Window : Gdk.Gdk_Window) return Boolean;
   --  A function of this type is passed to
   --  Gdk.Window.Invalidate_Maybe_Recurse. It gets called for each child of
   --  the window to determine whether to recursively invalidate it or now.
   --  "window": a Gdk.Gdk_Window

   type Gdk_Window_Invalidate_Handler_Func is access procedure
     (Window : Gdk.Gdk_Window;
      Region : Cairo.Region.Cairo_Region);
   --  Whenever some area of the window is invalidated (directly in the window
   --  or in a child window) this gets called with Region in the coordinate
   --  space of Window. You can use Region to just keep track of the dirty
   --  region, or you can actually change Region in case you are doing display
   --  tricks like showing a child in multiple places.
   --  Since: gtk+ 3.10
   --  "window": a Gdk.Gdk_Window
   --  "region": a cairo_region_t

   pragma Convention (C, Gdk_Window_Invalidate_Handler_Func);

   ----------------------------
   -- Enumeration Properties --
   ----------------------------

   package Gdk_Window_Class_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Window_Class);
   type Property_Gdk_Window_Class is new Gdk_Window_Class_Properties.Property;

   package Gdk_Window_Edge_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Window_Edge);
   type Property_Gdk_Window_Edge is new Gdk_Window_Edge_Properties.Property;

   package Gdk_Window_Type_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Window_Type);
   type Property_Gdk_Window_Type is new Gdk_Window_Type_Properties.Property;

   package Gdk_Window_Attributes_Type_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Window_Attributes_Type);
   type Property_Gdk_Window_Attributes_Type is new Gdk_Window_Attributes_Type_Properties.Property;

   package Gdk_Window_Hints_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Window_Hints);
   type Property_Gdk_Window_Hints is new Gdk_Window_Hints_Properties.Property;

   package Gdk_Window_Type_Hint_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Window_Type_Hint);
   type Property_Gdk_Window_Type_Hint is new Gdk_Window_Type_Hint_Properties.Property;

   package Gdk_WMDecoration_Properties is
      new Generic_Internal_Discrete_Property (Gdk_WMDecoration);
   type Property_Gdk_WMDecoration is new Gdk_WMDecoration_Properties.Property;

   package Gdk_WMFunction_Properties is
      new Generic_Internal_Discrete_Property (Gdk_WMFunction);
   type Property_Gdk_WMFunction is new Gdk_WMFunction_Properties.Property;

   package Gdk_Gravity_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Gravity);
   type Property_Gdk_Gravity is new Gdk_Gravity_Properties.Property;

   package Gdk_Fullscreen_Mode_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Fullscreen_Mode);
   type Property_Gdk_Fullscreen_Mode is new Gdk_Fullscreen_Mode_Properties.Property;

   ------------------
   -- Constructors --
   ------------------

   procedure Gdk_New
      (Self            : out Gdk_Window;
       Parent          : Gdk.Gdk_Window;
       Attributes      : Gdk.Gdk_Window_Attr;
       Attributes_Mask : Gdk_Window_Attributes_Type);
   --  Creates a new Gdk.Gdk_Window using the attributes from Attributes. See
   --  Gdk_Window_Attr and Gdk.Window.Gdk_Window_Attributes_Type for more
   --  details. Note: to use this on displays other than the default display,
   --  Parent must be specified.
   --  "parent": a Gdk.Gdk_Window, or null to create the window as a child of
   --  the default root window for the default display.
   --  "attributes": attributes of the new window
   --  "attributes_mask": mask indicating which fields in Attributes are valid

   function Gdk_Window_New
      (Parent          : Gdk.Gdk_Window;
       Attributes      : Gdk.Gdk_Window_Attr;
       Attributes_Mask : Gdk_Window_Attributes_Type) return Gdk_Window;
   --  Creates a new Gdk.Gdk_Window using the attributes from Attributes. See
   --  Gdk_Window_Attr and Gdk.Window.Gdk_Window_Attributes_Type for more
   --  details. Note: to use this on displays other than the default display,
   --  Parent must be specified.
   --  "parent": a Gdk.Gdk_Window, or null to create the window as a child of
   --  the default root window for the default display.
   --  "attributes": attributes of the new window
   --  "attributes_mask": mask indicating which fields in Attributes are valid

   function Get_Type return Glib.GType;
   pragma Import (C, Get_Type, "gdk_window_get_type");

   -------------
   -- Methods --
   -------------

   procedure Beep (Self : Gdk.Gdk_Window);
   pragma Import (C, Beep, "gdk_window_beep");
   --  Emits a short beep associated to Window in the appropriate display, if
   --  supported. Otherwise, emits a short beep on the display just as
   --  Gdk.Display.Beep.
   --  Since: gtk+ 2.12

   procedure Begin_Move_Drag
      (Self      : Gdk.Gdk_Window;
       Button    : Gint;
       Root_X    : Gint;
       Root_Y    : Gint;
       Timestamp : Guint32);
   pragma Import (C, Begin_Move_Drag, "gdk_window_begin_move_drag");
   --  Begins a window move operation (for a toplevel window).
   --  This function assumes that the drag is controlled by the client pointer
   --  device, use Gdk.Window.Begin_Move_Drag_For_Device to begin a drag with a
   --  different device.
   --  "button": the button being used to drag, or 0 for a keyboard-initiated
   --  drag
   --  "root_x": root window X coordinate of mouse click that began the drag
   --  "root_y": root window Y coordinate of mouse click that began the drag
   --  "timestamp": timestamp of mouse click that began the drag

   procedure Begin_Move_Drag_For_Device
      (Self      : Gdk.Gdk_Window;
       Device    : not null access Gdk.Device.Gdk_Device_Record'Class;
       Button    : Gint;
       Root_X    : Gint;
       Root_Y    : Gint;
       Timestamp : Guint32);
   --  Begins a window move operation (for a toplevel window). You might use
   --  this function to implement a "window move grip," for example. The
   --  function works best with window managers that support the [Extended
   --  Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) but
   --  has a fallback implementation for other window managers.
   --  Since: gtk+ 3.4
   --  "device": the device used for the operation
   --  "button": the button being used to drag, or 0 for a keyboard-initiated
   --  drag
   --  "root_x": root window X coordinate of mouse click that began the drag
   --  "root_y": root window Y coordinate of mouse click that began the drag
   --  "timestamp": timestamp of mouse click that began the drag

   procedure Begin_Paint_Rect
      (Self      : Gdk.Gdk_Window;
       Rectangle : Gdk.Rectangle.Gdk_Rectangle);
   pragma Import (C, Begin_Paint_Rect, "gdk_window_begin_paint_rect");
   --  A convenience wrapper around Gdk.Window.Begin_Paint_Region which
   --  creates a rectangular region for you. See Gdk.Window.Begin_Paint_Region
   --  for details.
   --  "rectangle": rectangle you intend to draw to

   procedure Begin_Paint_Region
      (Self   : Gdk.Gdk_Window;
       Region : Cairo.Region.Cairo_Region);
   pragma Import (C, Begin_Paint_Region, "gdk_window_begin_paint_region");
   --  Indicates that you are beginning the process of redrawing Region. A
   --  backing store (offscreen buffer) large enough to contain Region will be
   --  created. The backing store will be initialized with the background color
   --  or background surface for Window. Then, all drawing operations performed
   --  on Window will be diverted to the backing store. When you call
   --  Gdk.Window.End_Paint, the backing store will be copied to Window, making
   --  it visible onscreen. Only the part of Window contained in Region will be
   --  modified; that is, drawing operations are clipped to Region.
   --  The net result of all this is to remove flicker, because the user sees
   --  the finished product appear all at once when you call
   --  Gdk.Window.End_Paint. If you draw to Window directly without calling
   --  Gdk.Window.Begin_Paint_Region, the user may see flicker as individual
   --  drawing operations are performed in sequence. The clipping and
   --  background-initializing features of Gdk.Window.Begin_Paint_Region are
   --  conveniences for the programmer, so you can avoid doing that work
   --  yourself.
   --  When using GTK+, the widget system automatically places calls to
   --  Gdk.Window.Begin_Paint_Region and Gdk.Window.End_Paint around emissions
   --  of the expose_event signal. That is, if you're writing an expose event
   --  handler, you can assume that the exposed area in
   --  Gdk.Event.Gdk_Event_Expose has already been cleared to the window
   --  background, is already set as the clip region, and already has a backing
   --  store. Therefore in most cases, application code need not call
   --  Gdk.Window.Begin_Paint_Region. (You can disable the automatic calls
   --  around expose events on a widget-by-widget basis by calling
   --  Gtk.Widget.Set_Double_Buffered.)
   --  If you call this function multiple times before calling the matching
   --  Gdk.Window.End_Paint, the backing stores are pushed onto a stack.
   --  Gdk.Window.End_Paint copies the topmost backing store onscreen,
   --  subtracts the topmost region from all other regions in the stack, and
   --  pops the stack. All drawing operations affect only the topmost backing
   --  store in the stack. One matching call to Gdk.Window.End_Paint is
   --  required for each call to Gdk.Window.Begin_Paint_Region.
   --  "region": region you intend to draw to

   procedure Begin_Resize_Drag
      (Self      : Gdk.Gdk_Window;
       Edge      : Gdk_Window_Edge;
       Button    : Gint;
       Root_X    : Gint;
       Root_Y    : Gint;
       Timestamp : Guint32);
   pragma Import (C, Begin_Resize_Drag, "gdk_window_begin_resize_drag");
   --  Begins a window resize operation (for a toplevel window).
   --  This function assumes that the drag is controlled by the client pointer
   --  device, use Gdk.Window.Begin_Resize_Drag_For_Device to begin a drag with
   --  a different device.
   --  "edge": the edge or corner from which the drag is started
   --  "button": the button being used to drag, or 0 for a keyboard-initiated
   --  drag
   --  "root_x": root window X coordinate of mouse click that began the drag
   --  "root_y": root window Y coordinate of mouse click that began the drag
   --  "timestamp": timestamp of mouse click that began the drag (use
   --  Gdk.Event.Get_Time)

   procedure Begin_Resize_Drag_For_Device
      (Self      : Gdk.Gdk_Window;
       Edge      : Gdk_Window_Edge;
       Device    : not null access Gdk.Device.Gdk_Device_Record'Class;
       Button    : Gint;
       Root_X    : Gint;
       Root_Y    : Gint;
       Timestamp : Guint32);
   --  Begins a window resize operation (for a toplevel window). You might use
   --  this function to implement a "window resize grip," for example; in fact
   --  Gtk.Status_Bar.Gtk_Status_Bar uses it. The function works best with
   --  window managers that support the [Extended Window Manager
   --  Hints](http://www.freedesktop.org/Standards/wm-spec) but has a fallback
   --  implementation for other window managers.
   --  Since: gtk+ 3.4
   --  "edge": the edge or corner from which the drag is started
   --  "device": the device used for the operation
   --  "button": the button being used to drag, or 0 for a keyboard-initiated
   --  drag
   --  "root_x": root window X coordinate of mouse click that began the drag
   --  "root_y": root window Y coordinate of mouse click that began the drag
   --  "timestamp": timestamp of mouse click that began the drag (use
   --  Gdk.Event.Get_Time)

   procedure Configure_Finished (Self : Gdk.Gdk_Window);
   pragma Import (C, Configure_Finished, "gdk_window_configure_finished");
   pragma Obsolescent (Configure_Finished);
   --  Does nothing, present only for compatiblity.
   --  Since: gtk+ 2.6
   --  Deprecated since 3.8, 1

   procedure Coords_From_Parent
      (Self     : Gdk.Gdk_Window;
       Parent_X : Gdouble;
       Parent_Y : Gdouble;
       X        : out Gdouble;
       Y        : out Gdouble);
   pragma Import (C, Coords_From_Parent, "gdk_window_coords_from_parent");
   --  Transforms window coordinates from a parent window to a child window,
   --  where the parent window is the normal parent as returned by
   --  Gdk.Window.Get_Parent for normal windows, and the window's embedder as
   --  returned by gdk_offscreen_window_get_embedder for offscreen windows.
   --  For normal windows, calling this function is equivalent to subtracting
   --  the return values of Gdk.Window.Get_Position from the parent
   --  coordinates. For offscreen windows however (which can be arbitrarily
   --  transformed), this function calls the GdkWindow::from-embedder: signal
   --  to translate the coordinates.
   --  You should always use this function when writing generic code that
   --  walks down a window hierarchy.
   --  See also: Gdk.Window.Coords_To_Parent
   --  Since: gtk+ 2.22
   --  "parent_x": X coordinate in parent's coordinate system
   --  "parent_y": Y coordinate in parent's coordinate system
   --  "x": return location for X coordinate in child's coordinate system
   --  "y": return location for Y coordinate in child's coordinate system

   procedure Coords_To_Parent
      (Self     : Gdk.Gdk_Window;
       X        : Gdouble;
       Y        : Gdouble;
       Parent_X : out Gdouble;
       Parent_Y : out Gdouble);
   pragma Import (C, Coords_To_Parent, "gdk_window_coords_to_parent");
   --  Transforms window coordinates from a child window to its parent window,
   --  where the parent window is the normal parent as returned by
   --  Gdk.Window.Get_Parent for normal windows, and the window's embedder as
   --  returned by gdk_offscreen_window_get_embedder for offscreen windows.
   --  For normal windows, calling this function is equivalent to adding the
   --  return values of Gdk.Window.Get_Position to the child coordinates. For
   --  offscreen windows however (which can be arbitrarily transformed), this
   --  function calls the GdkWindow::to-embedder: signal to translate the
   --  coordinates.
   --  You should always use this function when writing generic code that
   --  walks up a window hierarchy.
   --  See also: Gdk.Window.Coords_From_Parent
   --  Since: gtk+ 2.22
   --  "x": X coordinate in child's coordinate system
   --  "y": Y coordinate in child's coordinate system
   --  "parent_x": return location for X coordinate in parent's coordinate
   --  system, or null
   --  "parent_y": return location for Y coordinate in parent's coordinate
   --  system, or null

   function Create_Similar_Image_Surface
      (Self   : Gdk.Gdk_Window;
       Format : Cairo.Cairo_Format;
       Width  : Gint;
       Height : Gint;
       Scale  : Gint) return Cairo.Cairo_Surface;
   pragma Import (C, Create_Similar_Image_Surface, "gdk_window_create_similar_image_surface");
   --  Create a new image surface that is efficient to draw on the given
   --  Window.
   --  Initially the surface contents are all 0 (transparent if contents have
   --  transparency, black otherwise.)
   --  Since: gtk+ 3.10
   --  "format": the format for the new surface
   --  "width": width of the new surface
   --  "height": height of the new surface
   --  "scale": the scale of the new surface, or 0 to use same as Window

   function Create_Similar_Surface
      (Self    : Gdk.Gdk_Window;
       Content : Cairo.Cairo_Content;
       Width   : Gint;
       Height  : Gint) return Cairo.Cairo_Surface;
   pragma Import (C, Create_Similar_Surface, "gdk_window_create_similar_surface");
   --  Create a new surface that is as compatible as possible with the given
   --  Window. For example the new surface will have the same fallback
   --  resolution and font options as Window. Generally, the new surface will
   --  also use the same backend as Window, unless that is not possible for
   --  some reason. The type of the returned surface may be examined with
   --  cairo_surface_get_type.
   --  Initially the surface contents are all 0 (transparent if contents have
   --  transparency, black otherwise.)
   --  Since: gtk+ 2.22
   --  "content": the content for the new surface
   --  "width": width of the new surface
   --  "height": height of the new surface

   procedure Deiconify (Self : Gdk.Gdk_Window);
   pragma Import (C, Deiconify, "gdk_window_deiconify");
   --  Attempt to deiconify (unminimize) Window. On X11 the window manager may
   --  choose to ignore the request to deiconify. When using GTK+, use
   --  Gtk.Window.Deiconify instead of the Gdk.Gdk_Window variant. Or better
   --  yet, you probably want to use Gtk.Window.Present, which raises the
   --  window, focuses it, unminimizes it, and puts it on the current desktop.

   procedure Destroy (Self : Gdk.Gdk_Window);
   pragma Import (C, Destroy, "gdk_window_destroy");
   --  Destroys the window system resources associated with Window and
   --  decrements Window's reference count. The window system resources for all
   --  children of Window are also destroyed, but the children's reference
   --  counts are not decremented.
   --  Note that a window will not be destroyed automatically when its
   --  reference count reaches zero. You must call this function yourself
   --  before that happens.

   procedure Destroy_Notify (Self : Gdk.Gdk_Window);
   pragma Import (C, Destroy_Notify, "gdk_window_destroy_notify");

   procedure Enable_Synchronized_Configure (Self : Gdk.Gdk_Window);
   pragma Import (C, Enable_Synchronized_Configure, "gdk_window_enable_synchronized_configure");
   pragma Obsolescent (Enable_Synchronized_Configure);
   --  Does nothing, present only for compatiblity.
   --  Since: gtk+ 2.6
   --  Deprecated since 3.8, 1

   procedure End_Paint (Self : Gdk.Gdk_Window);
   pragma Import (C, End_Paint, "gdk_window_end_paint");
   --  Indicates that the backing store created by the most recent call to
   --  Gdk.Window.Begin_Paint_Region should be copied onscreen and deleted,
   --  leaving the next-most-recent backing store or no backing store at all as
   --  the active paint region. See Gdk.Window.Begin_Paint_Region for full
   --  details. It is an error to call this function without a matching
   --  Gdk.Window.Begin_Paint_Region first.

   function Ensure_Native (Self : Gdk.Gdk_Window) return Boolean;
   --  Tries to ensure that there is a window-system native window for this
   --  GdkWindow. This may fail in some situations, returning False.
   --  Offscreen window and children of them can never have native windows.
   --  Some backends may not support native child windows.
   --  Since: gtk+ 2.18

   procedure Flush (Self : Gdk.Gdk_Window);
   pragma Import (C, Flush, "gdk_window_flush");
   pragma Obsolescent (Flush);
   --  This function does nothing.
   --  Since: gtk+ 2.18
   --  Deprecated since 3.14, 1

   procedure Focus (Self : Gdk.Gdk_Window; Timestamp : Guint32);
   pragma Import (C, Focus, "gdk_window_focus");
   --  Sets keyboard focus to Window. In most cases, Gtk.Window.Present should
   --  be used on a Gtk.Window.Gtk_Window, rather than calling this function.
   --  "timestamp": timestamp of the event triggering the window focus

   procedure Freeze_Toplevel_Updates_Libgtk_Only (Self : Gdk.Gdk_Window);
   pragma Import (C, Freeze_Toplevel_Updates_Libgtk_Only, "gdk_window_freeze_toplevel_updates_libgtk_only");
   --  Temporarily freezes a window and all its descendants such that it won't
   --  receive expose events. The window will begin receiving expose events
   --  again when Gdk.Window.Thaw_Toplevel_Updates_Libgtk_Only is called. If
   --  Gdk.Window.Freeze_Toplevel_Updates_Libgtk_Only has been called more than
   --  once, Gdk.Window.Thaw_Toplevel_Updates_Libgtk_Only must be called an
   --  equal number of times to begin processing exposes.
   --  This function is not part of the GDK public API and is only for use by
   --  GTK+.

   procedure Freeze_Updates (Self : Gdk.Gdk_Window);
   pragma Import (C, Freeze_Updates, "gdk_window_freeze_updates");
   --  Temporarily freezes a window such that it won't receive expose events.
   --  The window will begin receiving expose events again when
   --  Gdk.Window.Thaw_Updates is called. If Gdk.Window.Freeze_Updates has been
   --  called more than once, Gdk.Window.Thaw_Updates must be called an equal
   --  number of times to begin processing exposes.

   procedure Fullscreen (Self : Gdk.Gdk_Window);
   pragma Import (C, Fullscreen, "gdk_window_fullscreen");
   --  Moves the window into fullscreen mode. This means the window covers the
   --  entire screen and is above any panels or task bars.
   --  If the window was already fullscreen, then this function does nothing.
   --  On X11, asks the window manager to put Window in a fullscreen state, if
   --  the window manager supports this operation. Not all window managers
   --  support this, and some deliberately ignore it or don't have a concept of
   --  "fullscreen"; so you can't rely on the fullscreenification actually
   --  happening. But it will happen with most standard window managers, and
   --  GDK makes a best effort to get it to happen.
   --  Since: gtk+ 2.2

   procedure Geometry_Changed (Self : Gdk.Gdk_Window);
   pragma Import (C, Geometry_Changed, "gdk_window_geometry_changed");
   --  This function informs GDK that the geometry of an embedded offscreen
   --  window has changed. This is necessary for GDK to keep track of which
   --  offscreen window the pointer is in.
   --  Since: gtk+ 2.18

   function Get_Accept_Focus (Self : Gdk.Gdk_Window) return Boolean;
   --  Determines whether or not the desktop environment shuld be hinted that
   --  the window does not want to receive input focus.
   --  Since: gtk+ 2.22

   procedure Set_Accept_Focus
      (Self         : Gdk.Gdk_Window;
       Accept_Focus : Boolean);
   --  Setting Accept_Focus to False hints the desktop environment that the
   --  window doesn't want to receive input focus.
   --  On X, it is the responsibility of the window manager to interpret this
   --  hint. ICCCM-compliant window manager usually respect it.
   --  Since: gtk+ 2.4
   --  "accept_focus": True if the window should receive input focus

   function Get_Background_Pattern
      (Self : Gdk.Gdk_Window) return Cairo.Cairo_Pattern;
   pragma Import (C, Get_Background_Pattern, "gdk_window_get_background_pattern");
   --  Gets the pattern used to clear the background on Window. If Window does
   --  not have its own background and reuses the parent's, null is returned
   --  and you'll have to query it yourself.
   --  Since: gtk+ 2.22

   procedure Set_Background_Pattern
      (Self    : Gdk.Gdk_Window;
       Pattern : Cairo.Cairo_Pattern);
   pragma Import (C, Set_Background_Pattern, "gdk_window_set_background_pattern");
   --  Sets the background of Window.
   --  A background of null means that the window will inherit its background
   --  from its parent window.
   --  The windowing system will normally fill a window with its background
   --  when the window is obscured then exposed.
   --  "pattern": a pattern to use, or null

   function Get_Children
      (Self : Gdk.Gdk_Window) return Gdk_Window_List.Glist;
   --  Gets the list of children of Window known to GDK. This function only
   --  returns children created via GDK, so for example it's useless when used
   --  with the root window; it only returns windows an application created
   --  itself.
   --  The returned list must be freed, but the elements in the list need not
   --  be.

   function Get_Clip_Region
      (Self : Gdk.Gdk_Window) return Cairo.Region.Cairo_Region;
   pragma Import (C, Get_Clip_Region, "gdk_window_get_clip_region");
   --  Computes the region of a window that potentially can be written to by
   --  drawing primitives. This region may not take into account other factors
   --  such as if the window is obscured by other windows, but no area outside
   --  of this region will be affected by drawing primitives.

   function Get_Composited (Self : Gdk.Gdk_Window) return Boolean;
   --  Determines whether Window is composited.
   --  See Gdk.Window.Set_Composited.
   --  Since: gtk+ 2.22

   procedure Set_Composited (Self : Gdk.Gdk_Window; Composited : Boolean);
   --  Sets a Gdk.Gdk_Window as composited, or unsets it. Composited windows
   --  do not automatically have their contents drawn to the screen. Drawing is
   --  redirected to an offscreen buffer and an expose event is emitted on the
   --  parent of the composited window. It is the responsibility of the
   --  parent's expose handler to manually merge the off-screen content onto
   --  the screen in whatever way it sees fit.
   --  It only makes sense for child windows to be composited; see
   --  Gdk.Window.Set_Opacity if you need translucent toplevel windows.
   --  An additional effect of this call is that the area of this window is no
   --  longer clipped from regions marked for invalidation on its parent. Draws
   --  done on the parent window are also no longer clipped by the child.
   --  This call is only supported on some systems (currently, only X11 with
   --  new enough Xcomposite and Xdamage extensions). You must call
   --  Gdk.Display.Supports_Composite to check if setting a window as
   --  composited is supported before attempting to do so.
   --  Since: gtk+ 2.12
   --  "composited": True to set the window as composited

   function Get_Cursor (Self : Gdk.Gdk_Window) return Gdk.Gdk_Cursor;
   pragma Import (C, Get_Cursor, "gdk_window_get_cursor");
   --  Retrieves a Gdk.Gdk_Cursor pointer for the cursor currently set on the
   --  specified Gdk.Gdk_Window, or null. If the return value is null then
   --  there is no custom cursor set on the specified window, and it is using
   --  the cursor for its parent window.
   --  Since: gtk+ 2.18

   procedure Set_Cursor (Self : Gdk.Gdk_Window; Cursor : Gdk.Gdk_Cursor);
   pragma Import (C, Set_Cursor, "gdk_window_set_cursor");
   --  Sets the default mouse pointer for a Gdk.Gdk_Window. Use
   --  gdk_cursor_new_for_display or gdk_cursor_new_from_pixbuf to create the
   --  cursor. To make the cursor invisible, use Gdk.Blank_Cursor. Passing null
   --  for the Cursor argument to Gdk.Window.Set_Cursor means that Window will
   --  use the cursor of its parent window. Most windows should use this
   --  default.
   --  "cursor": a cursor

   procedure Get_Decorations
      (Self            : Gdk.Gdk_Window;
       Decorations     : out Gdk_WMDecoration;
       Has_Decorations : out Boolean);
   --  Returns the decorations set on the GdkWindow with
   --  Gdk.Window.Set_Decorations.
   --  "decorations": The window decorations will be written here

   procedure Set_Decorations
      (Self        : Gdk.Gdk_Window;
       Decorations : Gdk_WMDecoration);
   pragma Import (C, Set_Decorations, "gdk_window_set_decorations");
   --  "Decorations" are the features the window manager adds to a toplevel
   --  Gdk.Gdk_Window. This function sets the traditional Motif window manager
   --  hints that tell the window manager which decorations you would like your
   --  window to have. Usually you should use Gtk.Window.Set_Decorated on a
   --  Gtk.Window.Gtk_Window instead of using the GDK function directly.
   --  The Decorations argument is the logical OR of the fields in the
   --  Gdk.Window.Gdk_WMDecoration enumeration. If GDK_DECOR_ALL is included in
   --  the mask, the other bits indicate which decorations should be turned
   --  off. If GDK_DECOR_ALL is not included, then the other bits indicate
   --  which decorations should be turned on.
   --  Most window managers honor a decorations hint of 0 to disable all
   --  decorations, but very few honor all possible combinations of bits.
   --  "decorations": decoration hint mask

   function Get_Device_Cursor
      (Self   : Gdk.Gdk_Window;
       Device : not null access Gdk.Device.Gdk_Device_Record'Class)
       return Gdk.Gdk_Cursor;
   --  Retrieves a Gdk.Gdk_Cursor pointer for the Device currently set on the
   --  specified Gdk.Gdk_Window, or null. If the return value is null then
   --  there is no custom cursor set on the specified window, and it is using
   --  the cursor for its parent window.
   --  Since: gtk+ 3.0
   --  "device": a master, pointer Gdk.Device.Gdk_Device.

   procedure Set_Device_Cursor
      (Self   : Gdk.Gdk_Window;
       Device : not null access Gdk.Device.Gdk_Device_Record'Class;
       Cursor : Gdk.Gdk_Cursor);
   --  Sets a specific Gdk.Gdk_Cursor for a given device when it gets inside
   --  Window. Use gdk_cursor_new_for_display or gdk_cursor_new_from_pixbuf to
   --  create the cursor. To make the cursor invisible, use Gdk.Blank_Cursor.
   --  Passing null for the Cursor argument to Gdk.Window.Set_Cursor means that
   --  Window will use the cursor of its parent window. Most windows should use
   --  this default.
   --  Since: gtk+ 3.0
   --  "device": a master, pointer Gdk.Device.Gdk_Device
   --  "cursor": a Gdk.Gdk_Cursor

   function Get_Device_Events
      (Self   : Gdk.Gdk_Window;
       Device : not null access Gdk.Device.Gdk_Device_Record'Class)
       return Gdk.Event.Gdk_Event_Mask;
   --  Returns the event mask for Window corresponding to an specific device.
   --  Since: gtk+ 3.0
   --  "device": a Gdk.Device.Gdk_Device.

   procedure Set_Device_Events
      (Self       : Gdk.Gdk_Window;
       Device     : not null access Gdk.Device.Gdk_Device_Record'Class;
       Event_Mask : Gdk.Event.Gdk_Event_Mask);
   --  Sets the event mask for a given device (Normally a floating device, not
   --  attached to any visible pointer) to Window. For example, an event mask
   --  including GDK_BUTTON_PRESS_MASK means the window should report button
   --  press events. The event mask is the bitwise OR of values from the
   --  Gdk.Event.Gdk_Event_Mask enumeration.
   --  Since: gtk+ 3.0
   --  "device": Gdk.Device.Gdk_Device to enable events for.
   --  "event_mask": event mask for Window

   procedure Get_Device_Position
      (Self   : Gdk.Gdk_Window;
       Device : not null access Gdk.Device.Gdk_Device_Record'Class;
       X      : out Gint;
       Y      : out Gint;
       Mask   : out Gdk.Types.Gdk_Modifier_Type;
       Window : out Gdk.Gdk_Window);
   --  Obtains the current device position and modifier state. The position is
   --  given in coordinates relative to the upper left corner of Window.
   --  Use Gdk.Window.Get_Device_Position_Double if you need subpixel
   --  precision.
   --  Since: gtk+ 3.0
   --  "device": pointer Gdk.Device.Gdk_Device to query to.
   --  "x": return location for the X coordinate of Device, or null.
   --  "y": return location for the Y coordinate of Device, or null.
   --  "mask": return location for the modifier mask, or null.

   function Get_Device_Position_Double
      (Self   : Gdk.Gdk_Window;
       Device : not null access Gdk.Device.Gdk_Device_Record'Class;
       X      : access Gdouble;
       Y      : access Gdouble;
       Mask   : access Gdk.Types.Gdk_Modifier_Type) return Gdk.Gdk_Window;
   --  Obtains the current device position in doubles and modifier state. The
   --  position is given in coordinates relative to the upper left corner of
   --  Window.
   --  Since: gtk+ 3.10
   --  "device": pointer Gdk.Device.Gdk_Device to query to.
   --  "x": return location for the X coordinate of Device, or null.
   --  "y": return location for the Y coordinate of Device, or null.
   --  "mask": return location for the modifier mask, or null.

   function Get_Display
      (Self : Gdk.Gdk_Window) return Gdk.Display.Gdk_Display;
   --  Gets the Gdk.Display.Gdk_Display associated with a Gdk.Gdk_Window.
   --  Since: gtk+ 2.24

   function Get_Effective_Parent
      (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window;
   pragma Import (C, Get_Effective_Parent, "gdk_window_get_effective_parent");
   --  Obtains the parent of Window, as known to GDK. Works like
   --  Gdk.Window.Get_Parent for normal windows, but returns the window's
   --  embedder for offscreen windows.
   --  See also: gdk_offscreen_window_get_embedder
   --  Since: gtk+ 2.22

   function Get_Effective_Toplevel
      (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window;
   pragma Import (C, Get_Effective_Toplevel, "gdk_window_get_effective_toplevel");
   --  Gets the toplevel window that's an ancestor of Window.
   --  Works like Gdk.Window.Get_Toplevel, but treats an offscreen window's
   --  embedder as its parent, using Gdk.Window.Get_Effective_Parent.
   --  See also: gdk_offscreen_window_get_embedder
   --  Since: gtk+ 2.22

   function Get_Event_Compression (Self : Gdk.Gdk_Window) return Boolean;
   --  Get the current event compression setting for this window.
   --  Since: gtk+ 3.12

   procedure Set_Event_Compression
      (Self              : Gdk.Gdk_Window;
       Event_Compression : Boolean);
   --  Determines whether or not extra unprocessed motion events in the event
   --  queue can be discarded. If True only the most recent event will be
   --  delivered.
   --  Some types of applications, e.g. paint programs, need to see all motion
   --  events and will benefit from turning off event compression.
   --  By default, event compression is enabled.
   --  Since: gtk+ 3.12
   --  "event_compression": True if motion events should be compressed

   function Get_Events
      (Self : Gdk.Gdk_Window) return Gdk.Event.Gdk_Event_Mask;
   pragma Import (C, Get_Events, "gdk_window_get_events");
   --  Gets the event mask for Window for all master input devices. See
   --  Gdk.Window.Set_Events.

   procedure Set_Events
      (Self       : Gdk.Gdk_Window;
       Event_Mask : Gdk.Event.Gdk_Event_Mask);
   pragma Import (C, Set_Events, "gdk_window_set_events");
   --  The event mask for a window determines which events will be reported
   --  for that window from all master input devices. For example, an event
   --  mask including GDK_BUTTON_PRESS_MASK means the window should report
   --  button press events. The event mask is the bitwise OR of values from the
   --  Gdk.Event.Gdk_Event_Mask enumeration.
   --  "event_mask": event mask for Window

   function Get_Focus_On_Map (Self : Gdk.Gdk_Window) return Boolean;
   --  Determines whether or not the desktop environment should be hinted that
   --  the window does not want to receive input focus when it is mapped.
   --  Since: gtk+ 2.22

   procedure Set_Focus_On_Map
      (Self         : Gdk.Gdk_Window;
       Focus_On_Map : Boolean);
   --  Setting Focus_On_Map to False hints the desktop environment that the
   --  window doesn't want to receive input focus when it is mapped.
   --  focus_on_map should be turned off for windows that aren't triggered
   --  interactively (such as popups from network activity).
   --  On X, it is the responsibility of the window manager to interpret this
   --  hint. Window managers following the freedesktop.org window manager
   --  extension specification should respect it.
   --  Since: gtk+ 2.6
   --  "focus_on_map": True if the window should receive input focus when
   --  mapped

   function Get_Frame_Clock
      (Self : Gdk.Gdk_Window) return Gdk.Frame_Clock.Gdk_Frame_Clock;
   --  Gets the frame clock for the window. The frame clock for a window never
   --  changes unless the window is reparented to a new toplevel window.
   --  Since: gtk+ 3.8

   procedure Get_Frame_Extents
      (Self : Gdk.Gdk_Window;
       Rect : out Gdk.Rectangle.Gdk_Rectangle);
   pragma Import (C, Get_Frame_Extents, "gdk_window_get_frame_extents");
   --  Obtains the bounding box of the window, including window manager
   --  titlebar/borders if any. The frame position is given in root window
   --  coordinates. To get the position of the window itself (rather than the
   --  frame) in root window coordinates, use Gdk.Window.Get_Origin.
   --  "rect": rectangle to fill with bounding box of the window frame

   function Get_Fullscreen_Mode
      (Self : Gdk.Gdk_Window) return Gdk_Fullscreen_Mode;
   pragma Import (C, Get_Fullscreen_Mode, "gdk_window_get_fullscreen_mode");
   --  Obtains the Gdk.Window.Gdk_Fullscreen_Mode of the Window.
   --  Since: gtk+ 3.8

   procedure Set_Fullscreen_Mode
      (Self : Gdk.Gdk_Window;
       Mode : Gdk_Fullscreen_Mode);
   pragma Import (C, Set_Fullscreen_Mode, "gdk_window_set_fullscreen_mode");
   --  Specifies whether the Window should span over all monitors (in a
   --  multi-head setup) or only the current monitor when in fullscreen mode.
   --  The Mode argument is from the Gdk.Window.Gdk_Fullscreen_Mode
   --  enumeration. If GDK_FULLSCREEN_ON_ALL_MONITORS is specified, the
   --  fullscreen Window will span over all monitors from the
   --  Gdk.Screen.Gdk_Screen.
   --  On X11, searches through the list of monitors from the
   --  Gdk.Screen.Gdk_Screen the ones which delimit the 4 edges of the entire
   --  Gdk.Screen.Gdk_Screen and will ask the window manager to span the Window
   --  over these monitors.
   --  If the XINERAMA extension is not available or not usable, this function
   --  has no effect.
   --  Not all window managers support this, so you can't rely on the
   --  fullscreen window to span over the multiple monitors when
   --  GDK_FULLSCREEN_ON_ALL_MONITORS is specified.
   --  Since: gtk+ 3.8
   --  "mode": fullscreen mode

   procedure Get_Geometry
      (Self   : Gdk.Gdk_Window;
       X      : out Gint;
       Y      : out Gint;
       Width  : out Gint;
       Height : out Gint);
   pragma Import (C, Get_Geometry, "gdk_window_get_geometry");
   --  Any of the return location arguments to this function may be null, if
   --  you aren't interested in getting the value of that field.
   --  The X and Y coordinates returned are relative to the parent window of
   --  Window, which for toplevels usually means relative to the window
   --  decorations (titlebar, etc.) rather than relative to the root window
   --  (screen-size background window).
   --  On the X11 platform, the geometry is obtained from the X server, so
   --  reflects the latest position of Window; this may be out-of-sync with the
   --  position of Window delivered in the most-recently-processed
   --  Gdk.Event.Gdk_Event_Configure. Gdk.Window.Get_Position in contrast gets
   --  the position from the most recent configure event.
   --  Note: If Window is not a toplevel, it is much better to call
   --  Gdk.Window.Get_Position, Gdk.Window.Get_Width and Gdk.Window.Get_Height
   --  instead, because it avoids the roundtrip to the X server and because
   --  these functions support the full 32-bit coordinate space, whereas
   --  Gdk.Window.Get_Geometry is restricted to the 16-bit coordinates of X11.
   --  "x": return location for X coordinate of window (relative to its
   --  parent)
   --  "y": return location for Y coordinate of window (relative to its
   --  parent)
   --  "width": return location for width of window
   --  "height": return location for height of window

   function Get_Group (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window;
   pragma Import (C, Get_Group, "gdk_window_get_group");
   --  Returns the group leader window for Window. See Gdk.Window.Set_Group.
   --  Since: gtk+ 2.4

   procedure Set_Group (Self : Gdk.Gdk_Window; Leader : Gdk.Gdk_Window);
   pragma Import (C, Set_Group, "gdk_window_set_group");
   --  Sets the group leader window for Window. By default, GDK sets the group
   --  leader for all toplevel windows to a global window implicitly created by
   --  GDK. With this function you can override this default.
   --  The group leader window allows the window manager to distinguish all
   --  windows that belong to a single application. It may for example allow
   --  users to minimize/unminimize all windows belonging to an application at
   --  once. You should only set a non-default group window if your application
   --  pretends to be multiple applications.
   --  "leader": group leader window, or null to restore the default group
   --  leader window

   function Get_Height (Self : Gdk.Gdk_Window) return Gint;
   pragma Import (C, Get_Height, "gdk_window_get_height");
   --  Returns the height of the given Window.
   --  On the X11 platform the returned size is the size reported in the
   --  most-recently-processed configure event, rather than the current size on
   --  the X server.
   --  Since: gtk+ 2.24

   function Get_Modal_Hint (Self : Gdk.Gdk_Window) return Boolean;
   --  Determines whether or not the window manager is hinted that Window has
   --  modal behaviour.
   --  Since: gtk+ 2.22

   procedure Set_Modal_Hint (Self : Gdk.Gdk_Window; Modal : Boolean);
   --  The application can use this hint to tell the window manager that a
   --  certain window has modal behaviour. The window manager can use this
   --  information to handle modal windows in a special way.
   --  You should only use this on windows for which you have previously
   --  called Gdk.Window.Set_Transient_For
   --  "modal": True if the window is modal, False otherwise.

   procedure Get_Origin (Self : Gdk.Gdk_Window; X : out Gint; Y : out Gint);
   pragma Import (C, Get_Origin, "gdk_window_get_origin");
   --  Obtains the position of a window in root window coordinates. (Compare
   --  with Gdk.Window.Get_Position and Gdk.Window.Get_Geometry which return
   --  the position of a window relative to its parent window.)
   --  "x": return location for X coordinate
   --  "y": return location for Y coordinate

   function Get_Parent (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window;
   pragma Import (C, Get_Parent, "gdk_window_get_parent");
   --  Obtains the parent of Window, as known to GDK. Does not query the X
   --  server; thus this returns the parent as passed to gdk_window_new, not
   --  the actual parent. This should never matter unless you're using Xlib
   --  calls mixed with GDK calls on the X11 platform. It may also matter for
   --  toplevel windows, because the window manager may choose to reparent
   --  them.
   --  Note that you should use Gdk.Window.Get_Effective_Parent when writing
   --  generic code that walks up a window hierarchy, because
   --  Gdk.Window.Get_Parent will most likely not do what you expect if there
   --  are offscreen windows in the hierarchy.

   procedure Get_Pointer
      (Self   : Gdk.Gdk_Window;
       X      : out Gint;
       Y      : out Gint;
       Mask   : out Gdk.Types.Gdk_Modifier_Type;
       Window : out Gdk.Gdk_Window);
   pragma Obsolescent (Get_Pointer);
   --  Obtains the current pointer position and modifier state. The position
   --  is given in coordinates relative to the upper left corner of Window.
   --  Deprecated since 3.0, 1
   --  "x": return location for X coordinate of pointer or null to not return
   --  the X coordinate
   --  "y": return location for Y coordinate of pointer or null to not return
   --  the Y coordinate
   --  "mask": return location for modifier mask or null to not return the
   --  modifier mask

   procedure Get_Position
      (Self : Gdk.Gdk_Window;
       X    : out Gint;
       Y    : out Gint);
   pragma Import (C, Get_Position, "gdk_window_get_position");
   --  Obtains the position of the window as reported in the
   --  most-recently-processed Gdk.Event.Gdk_Event_Configure. Contrast with
   --  Gdk.Window.Get_Geometry which queries the X server for the current
   --  window position, regardless of which events have been received or
   --  processed.
   --  The position coordinates are relative to the window's parent window.
   --  "x": X coordinate of window
   --  "y": Y coordinate of window

   procedure Get_Root_Coords
      (Self   : Gdk.Gdk_Window;
       X      : Gint;
       Y      : Gint;
       Root_X : out Gint;
       Root_Y : out Gint);
   pragma Import (C, Get_Root_Coords, "gdk_window_get_root_coords");
   --  Obtains the position of a window position in root window coordinates.
   --  This is similar to Gdk.Window.Get_Origin but allows you go pass in any
   --  position in the window, not just the origin.
   --  Since: gtk+ 2.18
   --  "x": X coordinate in window
   --  "y": Y coordinate in window
   --  "root_x": return location for X coordinate
   --  "root_y": return location for Y coordinate

   procedure Get_Root_Origin
      (Self : Gdk.Gdk_Window;
       X    : out Gint;
       Y    : out Gint);
   pragma Import (C, Get_Root_Origin, "gdk_window_get_root_origin");
   --  Obtains the top-left corner of the window manager frame in root window
   --  coordinates.
   --  "x": return location for X position of window frame
   --  "y": return location for Y position of window frame

   function Get_Scale_Factor (Self : Gdk.Gdk_Window) return Gint;
   pragma Import (C, Get_Scale_Factor, "gdk_window_get_scale_factor");
   --  Returns the internal scale factor that maps from window coordiantes to
   --  the actual device pixels. On traditional systems this is 1, but on very
   --  high density outputs this can be a higher value (often 2).
   --  A higher value means that drawing is automatically scaled up to a
   --  higher resolution, so any code doing drawing will automatically look
   --  nicer. However, if you are supplying pixel-based data the scale value
   --  can be used to determine whether to use a pixel resource with higher
   --  resolution data.
   --  The scale of a window may change during runtime, if this happens a
   --  configure event will be sent to the toplevel window.
   --  Since: gtk+ 3.10

   function Get_Screen (Self : Gdk.Gdk_Window) return Gdk.Screen.Gdk_Screen;
   --  Gets the Gdk.Screen.Gdk_Screen associated with a Gdk.Gdk_Window.
   --  Since: gtk+ 2.24

   function Get_Source_Events
      (Self   : Gdk.Gdk_Window;
       Source : Gdk_Input_Source) return Gdk.Event.Gdk_Event_Mask;
   pragma Import (C, Get_Source_Events, "gdk_window_get_source_events");
   --  Returns the event mask for Window corresponding to the device class
   --  specified by Source.
   --  "source": a Gdk_Input_Source to define the source class.

   procedure Set_Source_Events
      (Self       : Gdk.Gdk_Window;
       Source     : Gdk_Input_Source;
       Event_Mask : Gdk.Event.Gdk_Event_Mask);
   pragma Import (C, Set_Source_Events, "gdk_window_set_source_events");
   --  Sets the event mask for any floating device (i.e. not attached to any
   --  visible pointer) that has the source defined as Source. This event mask
   --  will be applied both to currently existing, newly added devices after
   --  this call, and devices being attached/detached.
   --  Since: gtk+ 3.0
   --  "source": a Gdk_Input_Source to define the source class.
   --  "event_mask": event mask for Window

   function Get_State
      (Self : Gdk.Gdk_Window) return Gdk.Event.Gdk_Window_State;
   pragma Import (C, Get_State, "gdk_window_get_state");
   --  Gets the bitwise OR of the currently active window state flags, from
   --  the Gdk.Event.Gdk_Window_State enumeration.

   function Get_Support_Multidevice (Self : Gdk.Gdk_Window) return Boolean;
   --  Returns True if the window is aware of the existence of multiple
   --  devices.
   --  Since: gtk+ 3.0

   procedure Set_Support_Multidevice
      (Self                : Gdk.Gdk_Window;
       Support_Multidevice : Boolean);
   --  This function will enable multidevice features in Window.
   --  Multidevice aware windows will need to handle properly multiple, per
   --  device enter/leave events, device grabs and grab ownerships.
   --  Since: gtk+ 3.0
   --  "support_multidevice": True to enable multidevice support in Window.

   function Get_Toplevel (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window;
   pragma Import (C, Get_Toplevel, "gdk_window_get_toplevel");
   --  Gets the toplevel window that's an ancestor of Window.
   --  Any window type but Gdk.Window_Child is considered a toplevel window,
   --  as is a Gdk.Window_Child window that has a root window as parent.
   --  Note that you should use Gdk.Window.Get_Effective_Toplevel when you
   --  want to get to a window's toplevel as seen on screen, because
   --  Gdk.Window.Get_Toplevel will most likely not do what you expect if there
   --  are offscreen windows in the hierarchy.

   function Get_Type_Hint
      (Self : Gdk.Gdk_Window) return Gdk_Window_Type_Hint;
   pragma Import (C, Get_Type_Hint, "gdk_window_get_type_hint");
   --  This function returns the type hint set for a window.
   --  Since: gtk+ 2.10

   procedure Set_Type_Hint
      (Self : Gdk.Gdk_Window;
       Hint : Gdk_Window_Type_Hint);
   pragma Import (C, Set_Type_Hint, "gdk_window_set_type_hint");
   --  The application can use this call to provide a hint to the window
   --  manager about the functionality of a window. The window manager can use
   --  this information when determining the decoration and behaviour of the
   --  window.
   --  The hint must be set before the window is mapped.
   --  "hint": A hint of the function this window will have

   function Get_Update_Area
      (Self : Gdk.Gdk_Window) return Cairo.Region.Cairo_Region;
   pragma Import (C, Get_Update_Area, "gdk_window_get_update_area");
   --  Transfers ownership of the update area from Window to the caller of the
   --  function. That is, after calling this function, Window will no longer
   --  have an invalid/dirty region; the update area is removed from Window and
   --  handed to you. If a window has no update area,
   --  Gdk.Window.Get_Update_Area returns null. You are responsible for calling
   --  cairo_region_destroy on the returned region if it's non-null.

   function Get_Visible_Region
      (Self : Gdk.Gdk_Window) return Cairo.Region.Cairo_Region;
   pragma Import (C, Get_Visible_Region, "gdk_window_get_visible_region");
   --  Computes the region of the Window that is potentially visible. This
   --  does not necessarily take into account if the window is obscured by
   --  other windows, but no area outside of this region is visible.

   function Get_Visual (Self : Gdk.Gdk_Window) return Gdk.Visual.Gdk_Visual;
   pragma Import (C, Get_Visual, "gdk_window_get_visual");
   --  Gets the Gdk.Visual.Gdk_Visual describing the pixel format of Window.
   --  Since: gtk+ 2.24

   function Get_Width (Self : Gdk.Gdk_Window) return Gint;
   pragma Import (C, Get_Width, "gdk_window_get_width");
   --  Returns the width of the given Window.
   --  On the X11 platform the returned size is the size reported in the
   --  most-recently-processed configure event, rather than the current size on
   --  the X server.
   --  Since: gtk+ 2.24

   function Get_Window_Type (Self : Gdk.Gdk_Window) return Gdk_Window_Type;
   pragma Import (C, Get_Window_Type, "gdk_window_get_window_type");
   --  Gets the type of the window. See Gdk.Window.Gdk_Window_Type.

   function Has_Native (Self : Gdk.Gdk_Window) return Boolean;
   --  Checks whether the window has a native window or not. Note that you can
   --  use Gdk.Window.Ensure_Native if a native window is needed.
   --  Since: gtk+ 2.22

   procedure Hide (Self : Gdk.Gdk_Window);
   pragma Import (C, Hide, "gdk_window_hide");
   --  For toplevel windows, withdraws them, so they will no longer be known
   --  to the window manager; for all windows, unmaps them, so they won't be
   --  displayed. Normally done automatically as part of Gtk.Widget.Hide.

   procedure Iconify (Self : Gdk.Gdk_Window);
   pragma Import (C, Iconify, "gdk_window_iconify");
   --  Asks to iconify (minimize) Window. The window manager may choose to
   --  ignore the request, but normally will honor it. Using Gtk.Window.Iconify
   --  is preferred, if you have a Gtk.Window.Gtk_Window widget.
   --  This function only makes sense when Window is a toplevel window.

   procedure Input_Shape_Combine_Region
      (Self         : Gdk.Gdk_Window;
       Shape_Region : Cairo.Region.Cairo_Region;
       Offset_X     : Gint;
       Offset_Y     : Gint);
   pragma Import (C, Input_Shape_Combine_Region, "gdk_window_input_shape_combine_region");
   --  Like Gdk.Window.Shape_Combine_Region, but the shape applies only to
   --  event handling. Mouse events which happen while the pointer position
   --  corresponds to an unset bit in the mask will be passed on the window
   --  below Window.
   --  An input shape is typically used with RGBA windows. The alpha channel
   --  of the window defines which pixels are invisible and allows for nicely
   --  antialiased borders, and the input shape controls where the window is
   --  "clickable".
   --  On the X11 platform, this requires version 1.1 of the shape extension.
   --  On the Win32 platform, this functionality is not present and the
   --  function does nothing.
   --  Since: gtk+ 2.10
   --  "shape_region": region of window to be non-transparent
   --  "offset_x": X position of Shape_Region in Window coordinates
   --  "offset_y": Y position of Shape_Region in Window coordinates

   procedure Invalidate_Maybe_Recurse
      (Self       : Gdk.Gdk_Window;
       Region     : Cairo.Region.Cairo_Region;
       Child_Func : Gdk_Window_Child_Func);
   --  Adds Region to the update area for Window. The update area is the
   --  region that needs to be redrawn, or "dirty region." The call
   --  Gdk.Window.Process_Updates sends one or more expose events to the
   --  window, which together cover the entire update area. An application
   --  would normally redraw the contents of Window in response to those expose
   --  events.
   --  GDK will call Gdk.Window.Process_All_Updates on your behalf whenever
   --  your program returns to the main loop and becomes idle, so normally
   --  there's no need to do that manually, you just need to invalidate regions
   --  that you know should be redrawn.
   --  The Child_Func parameter controls whether the region of each child
   --  window that intersects Region will also be invalidated. Only children
   --  for which Child_Func returns TRUE will have the area invalidated.
   --  "region": a cairo_region_t
   --  "child_func": function to use to decide if to recurse to a child, null
   --  means never recurse.

   generic
      type User_Data_Type (<>) is private;
      with procedure Destroy (Data : in out User_Data_Type) is null;
   package Invalidate_Maybe_Recurse_User_Data is

      type Gdk_Window_Child_Func is access function
        (Window    : Gdk.Gdk_Window;
         User_Data : User_Data_Type) return Boolean;
      --  A function of this type is passed to
      --  Gdk.Window.Invalidate_Maybe_Recurse. It gets called for each child of
      --  the window to determine whether to recursively invalidate it or now.
      --  "window": a Gdk.Gdk_Window
      --  "user_data": user data

      procedure Invalidate_Maybe_Recurse
         (Self       : Gdk.Gdk_Window;
          Region     : Cairo.Region.Cairo_Region;
          Child_Func : Gdk_Window_Child_Func;
          User_Data  : User_Data_Type);
      --  Adds Region to the update area for Window. The update area is the
      --  region that needs to be redrawn, or "dirty region." The call
      --  Gdk.Window.Process_Updates sends one or more expose events to the
      --  window, which together cover the entire update area. An application
      --  would normally redraw the contents of Window in response to those
      --  expose events.
      --  GDK will call Gdk.Window.Process_All_Updates on your behalf whenever
      --  your program returns to the main loop and becomes idle, so normally
      --  there's no need to do that manually, you just need to invalidate
      --  regions that you know should be redrawn.
      --  The Child_Func parameter controls whether the region of each child
      --  window that intersects Region will also be invalidated. Only children
      --  for which Child_Func returns TRUE will have the area invalidated.
      --  "region": a cairo_region_t
      --  "child_func": function to use to decide if to recurse to a child,
      --  null means never recurse.
      --  "user_data": data passed to Child_Func

   end Invalidate_Maybe_Recurse_User_Data;

   procedure Invalidate_Rect
      (Self                : Gdk.Gdk_Window;
       Rect                : Gdk.Rectangle.Gdk_Rectangle;
       Invalidate_Children : Boolean);
   --  A convenience wrapper around Gdk.Window.Invalidate_Region which
   --  invalidates a rectangular region. See Gdk.Window.Invalidate_Region for
   --  details.
   --  "rect": rectangle to invalidate or null to invalidate the whole window
   --  "invalidate_children": whether to also invalidate child windows

   procedure Invalidate_Region
      (Self                : Gdk.Gdk_Window;
       Region              : Cairo.Region.Cairo_Region;
       Invalidate_Children : Boolean);
   --  Adds Region to the update area for Window. The update area is the
   --  region that needs to be redrawn, or "dirty region." The call
   --  Gdk.Window.Process_Updates sends one or more expose events to the
   --  window, which together cover the entire update area. An application
   --  would normally redraw the contents of Window in response to those expose
   --  events.
   --  GDK will call Gdk.Window.Process_All_Updates on your behalf whenever
   --  your program returns to the main loop and becomes idle, so normally
   --  there's no need to do that manually, you just need to invalidate regions
   --  that you know should be redrawn.
   --  The Invalidate_Children parameter controls whether the region of each
   --  child window that intersects Region will also be invalidated. If False,
   --  then the update area for child windows will remain unaffected. See
   --  gdk_window_invalidate_maybe_recurse if you need fine grained control
   --  over which children are invalidated.
   --  "region": a cairo_region_t
   --  "invalidate_children": True to also invalidate child windows

   function Is_Destroyed (Self : Gdk.Gdk_Window) return Boolean;
   --  Check to see if a window is destroyed..
   --  Since: gtk+ 2.18

   function Is_Input_Only (Self : Gdk.Gdk_Window) return Boolean;
   --  Determines whether or not the window is an input only window.
   --  Since: gtk+ 2.22

   function Is_Shaped (Self : Gdk.Gdk_Window) return Boolean;
   --  Determines whether or not the window is shaped.
   --  Since: gtk+ 2.22

   function Is_Viewable (Self : Gdk.Gdk_Window) return Boolean;
   --  Check if the window and all ancestors of the window are mapped. (This
   --  is not necessarily "viewable" in the X sense, since we only check as far
   --  as we have GDK window parents, not to the root window.)

   function Is_Visible (Self : Gdk.Gdk_Window) return Boolean;
   --  Checks whether the window has been mapped (with Gdk.Window.Show or
   --  Gdk.Window.Show_Unraised).

   procedure Lower (Self : Gdk.Gdk_Window);
   pragma Import (C, Lower, "gdk_window_lower");
   --  Lowers Window to the bottom of the Z-order (stacking order), so that
   --  other windows with the same parent window appear above Window. This is
   --  true whether or not the other windows are visible.
   --  If Window is a toplevel, the window manager may choose to deny the
   --  request to move the window in the Z-order, Gdk.Window.Lower only
   --  requests the restack, does not guarantee it.
   --  Note that Gdk.Window.Show raises the window again, so don't call this
   --  function before Gdk.Window.Show. (Try Gdk.Window.Show_Unraised.)

   procedure Maximize (Self : Gdk.Gdk_Window);
   pragma Import (C, Maximize, "gdk_window_maximize");
   --  Maximizes the window. If the window was already maximized, then this
   --  function does nothing.
   --  On X11, asks the window manager to maximize Window, if the window
   --  manager supports this operation. Not all window managers support this,
   --  and some deliberately ignore it or don't have a concept of "maximized";
   --  so you can't rely on the maximization actually happening. But it will
   --  happen with most standard window managers, and GDK makes a best effort
   --  to get it to happen.
   --  On Windows, reliably maximizes the window.

   procedure Merge_Child_Input_Shapes (Self : Gdk.Gdk_Window);
   pragma Import (C, Merge_Child_Input_Shapes, "gdk_window_merge_child_input_shapes");
   --  Merges the input shape masks for any child windows into the input shape
   --  mask for Window. i.e. the union of all input masks for Window and its
   --  children will become the new input mask for Window. See
   --  Gdk.Window.Input_Shape_Combine_Region.
   --  This function is distinct from Gdk.Window.Set_Child_Input_Shapes
   --  because it includes Window's input shape mask in the set of shapes to be
   --  merged.
   --  Since: gtk+ 2.10

   procedure Merge_Child_Shapes (Self : Gdk.Gdk_Window);
   pragma Import (C, Merge_Child_Shapes, "gdk_window_merge_child_shapes");
   --  Merges the shape masks for any child windows into the shape mask for
   --  Window. i.e. the union of all masks for Window and its children will
   --  become the new mask for Window. See Gdk.Window.Shape_Combine_Region.
   --  This function is distinct from Gdk.Window.Set_Child_Shapes because it
   --  includes Window's shape mask in the set of shapes to be merged.

   procedure Move (Self : Gdk.Gdk_Window; X : Gint; Y : Gint);
   pragma Import (C, Move, "gdk_window_move");
   --  Repositions a window relative to its parent window. For toplevel
   --  windows, window managers may ignore or modify the move; you should
   --  probably use Gtk.Window.Move on a Gtk.Window.Gtk_Window widget anyway,
   --  instead of using GDK functions. For child windows, the move will
   --  reliably succeed.
   --  If you're also planning to resize the window, use
   --  Gdk.Window.Move_Resize to both move and resize simultaneously, for a
   --  nicer visual effect.
   --  "x": X coordinate relative to window's parent
   --  "y": Y coordinate relative to window's parent

   procedure Move_Region
      (Self   : Gdk.Gdk_Window;
       Region : Cairo.Region.Cairo_Region;
       Dx     : Gint;
       Dy     : Gint);
   pragma Import (C, Move_Region, "gdk_window_move_region");
   --  Move the part of Window indicated by Region by Dy pixels in the Y
   --  direction and Dx pixels in the X direction. The portions of Region that
   --  not covered by the new position of Region are invalidated.
   --  Child windows are not moved.
   --  Since: gtk+ 2.8
   --  "region": The cairo_region_t to move
   --  "dx": Amount to move in the X direction
   --  "dy": Amount to move in the Y direction

   procedure Move_Resize
      (Self   : Gdk.Gdk_Window;
       X      : Gint;
       Y      : Gint;
       Width  : Gint;
       Height : Gint);
   pragma Import (C, Move_Resize, "gdk_window_move_resize");
   --  Equivalent to calling Gdk.Window.Move and Gdk.Window.Resize, except
   --  that both operations are performed at once, avoiding strange visual
   --  effects. (i.e. the user may be able to see the window first move, then
   --  resize, if you don't use Gdk.Window.Move_Resize.)
   --  "x": new X position relative to window's parent
   --  "y": new Y position relative to window's parent
   --  "width": new width
   --  "height": new height

   function Peek_Children
      (Self : Gdk.Gdk_Window) return Gdk_Window_List.Glist;
   --  Like Gdk.Window.Get_Children, but does not copy the list of children,
   --  so the list does not need to be freed.

   procedure Process_Updates
      (Self            : Gdk.Gdk_Window;
       Update_Children : Boolean);
   --  Sends one or more expose events to Window. The areas in each expose
   --  event will cover the entire update area for the window (see
   --  Gdk.Window.Invalidate_Region for details). Normally GDK calls
   --  Gdk.Window.Process_All_Updates on your behalf, so there's no need to
   --  call this function unless you want to force expose events to be
   --  delivered immediately and synchronously (vs. the usual case, where GDK
   --  delivers them in an idle handler). Occasionally this is useful to
   --  produce nicer scrolling behavior, for example.
   --  "update_children": whether to also process updates for child windows

   procedure Gdk_Raise (Self : Gdk.Gdk_Window);
   pragma Import (C, Gdk_Raise, "gdk_window_raise");
   --  Raises Window to the top of the Z-order (stacking order), so that other
   --  windows with the same parent window appear below Window. This is true
   --  whether or not the windows are visible.
   --  If Window is a toplevel, the window manager may choose to deny the
   --  request to move the window in the Z-order, Gdk.Window.Gdk_Raise only
   --  requests the restack, does not guarantee it.

   procedure Register_Dnd (Self : Gdk.Gdk_Window);
   pragma Import (C, Register_Dnd, "gdk_window_register_dnd");
   --  Registers a window as a potential drop destination.

   procedure Reparent
      (Self       : Gdk.Gdk_Window;
       New_Parent : Gdk.Gdk_Window;
       X          : Gint;
       Y          : Gint);
   pragma Import (C, Reparent, "gdk_window_reparent");
   --  Reparents Window into the given New_Parent. The window being reparented
   --  will be unmapped as a side effect.
   --  "new_parent": new parent to move Window into
   --  "x": X location inside the new parent
   --  "y": Y location inside the new parent

   procedure Resize (Self : Gdk.Gdk_Window; Width : Gint; Height : Gint);
   pragma Import (C, Resize, "gdk_window_resize");
   --  Resizes Window; for toplevel windows, asks the window manager to resize
   --  the window. The window manager may not allow the resize. When using
   --  GTK+, use Gtk.Window.Resize instead of this low-level GDK function.
   --  Windows may not be resized below 1x1.
   --  If you're also planning to move the window, use Gdk.Window.Move_Resize
   --  to both move and resize simultaneously, for a nicer visual effect.
   --  "width": new width of the window
   --  "height": new height of the window

   procedure Restack
      (Self    : Gdk.Gdk_Window;
       Sibling : Gdk.Gdk_Window;
       Above   : Boolean);
   --  Changes the position of Window in the Z-order (stacking order), so that
   --  it is above Sibling (if Above is True) or below Sibling (if Above is
   --  False).
   --  If Sibling is null, then this either raises (if Above is True) or
   --  lowers the window.
   --  If Window is a toplevel, the window manager may choose to deny the
   --  request to move the window in the Z-order, Gdk.Window.Restack only
   --  requests the restack, does not guarantee it.
   --  Since: gtk+ 2.18
   --  "sibling": a Gdk.Gdk_Window that is a sibling of Window, or null
   --  "above": a boolean

   procedure Scroll (Self : Gdk.Gdk_Window; Dx : Gint; Dy : Gint);
   pragma Import (C, Scroll, "gdk_window_scroll");
   --  Scroll the contents of Window, both pixels and children, by the given
   --  amount. Window itself does not move. Portions of the window that the
   --  scroll operation brings in from offscreen areas are invalidated. The
   --  invalidated region may be bigger than what would strictly be necessary.
   --  For X11, a minimum area will be invalidated if the window has no
   --  subwindows, or if the edges of the window's parent do not extend beyond
   --  the edges of the window. In other cases, a multi-step process is used to
   --  scroll the window which may produce temporary visual artifacts and
   --  unnecessary invalidations.
   --  "dx": Amount to scroll in the X direction
   --  "dy": Amount to scroll in the Y direction

   procedure Set_Background
      (Self  : Gdk.Gdk_Window;
       Color : Gdk.Color.Gdk_Color);
   pragma Import (C, Set_Background, "gdk_window_set_background");
   pragma Obsolescent (Set_Background);
   --  Sets the background color of Window. (However, when using GTK+, set the
   --  background of a widget with Gtk.Widget.Modify_Bg - if you're an
   --  application - or Gtk.Style.Set_Background - if you're implementing a
   --  custom widget.)
   --  See also Gdk.Window.Set_Background_Pattern.
   --  Deprecated since 3.4, 1
   --  "color": a Gdk.Color.Gdk_Color

   procedure Set_Background_Rgba
      (Self : Gdk.Gdk_Window;
       Rgba : Gdk.RGBA.Gdk_RGBA);
   pragma Import (C, Set_Background_Rgba, "gdk_window_set_background_rgba");
   --  Sets the background color of Window.
   --  See also Gdk.Window.Set_Background_Pattern.
   --  "rgba": a Gdk.RGBA.Gdk_RGBA color

   procedure Set_Child_Input_Shapes (Self : Gdk.Gdk_Window);
   pragma Import (C, Set_Child_Input_Shapes, "gdk_window_set_child_input_shapes");
   --  Sets the input shape mask of Window to the union of input shape masks
   --  for all children of Window, ignoring the input shape mask of Window
   --  itself. Contrast with Gdk.Window.Merge_Child_Input_Shapes which includes
   --  the input shape mask of Window in the masks to be merged.
   --  Since: gtk+ 2.10

   procedure Set_Child_Shapes (Self : Gdk.Gdk_Window);
   pragma Import (C, Set_Child_Shapes, "gdk_window_set_child_shapes");
   --  Sets the shape mask of Window to the union of shape masks for all
   --  children of Window, ignoring the shape mask of Window itself. Contrast
   --  with Gdk.Window.Merge_Child_Shapes which includes the shape mask of
   --  Window in the masks to be merged.

   procedure Set_Functions
      (Self      : Gdk.Gdk_Window;
       Functions : Gdk_WMFunction);
   pragma Import (C, Set_Functions, "gdk_window_set_functions");
   --  Sets hints about the window management functions to make available via
   --  buttons on the window frame.
   --  On the X backend, this function sets the traditional Motif window
   --  manager hint for this purpose. However, few window managers do anything
   --  reliable or interesting with this hint. Many ignore it entirely.
   --  The Functions argument is the logical OR of values from the
   --  Gdk.Window.Gdk_WMFunction enumeration. If the bitmask includes
   --  GDK_FUNC_ALL, then the other bits indicate which functions to disable;
   --  if it doesn't include GDK_FUNC_ALL, it indicates which functions to
   --  enable.
   --  "functions": bitmask of operations to allow on Window

   procedure Set_Geometry_Hints
      (Self      : Gdk.Gdk_Window;
       Geometry  : Gdk_Geometry;
       Geom_Mask : Gdk_Window_Hints);
   pragma Import (C, Set_Geometry_Hints, "gdk_window_set_geometry_hints");
   --  Sets the geometry hints for Window. Hints flagged in Geom_Mask are set,
   --  hints not flagged in Geom_Mask are unset. To unset all hints, use a
   --  Geom_Mask of 0 and a Geometry of null.
   --  This function provides hints to the windowing system about acceptable
   --  sizes for a toplevel window. The purpose of this is to constrain user
   --  resizing, but the windowing system will typically (but is not required
   --  to) also constrain the current size of the window to the provided values
   --  and constrain programatic resizing via Gdk.Window.Resize or
   --  Gdk.Window.Move_Resize.
   --  Note that on X11, this effect has no effect on windows of type
   --  Gdk.Window_Temp or windows where override redirect has been turned on
   --  via Gdk.Window.Set_Override_Redirect since these windows are not
   --  resizable by the user.
   --  Since you can't count on the windowing system doing the constraints for
   --  programmatic resizes, you should generally call
   --  Gdk.Window.Constrain_Size yourself to determine appropriate sizes.
   --  "geometry": geometry hints
   --  "geom_mask": bitmask indicating fields of Geometry to pay attention to

   procedure Set_Icon_Name (Self : Gdk.Gdk_Window; Name : UTF8_String := "");
   --  Windows may have a name used while minimized, distinct from the name
   --  they display in their titlebar. Most of the time this is a bad idea from
   --  a user interface standpoint. But you can set such a name with this
   --  function, if you like.
   --  After calling this with a non-null Name, calls to Gdk.Window.Set_Title
   --  will not update the icon title.
   --  Using null for Name unsets the icon title; further calls to
   --  Gdk.Window.Set_Title will again update the icon title as well.
   --  "name": name of window while iconified (minimized)

   procedure Set_Invalidate_Handler
      (Self    : Gdk.Gdk_Window;
       Handler : Gdk_Window_Invalidate_Handler_Func);
   --  Registers an invalidate handler for a specific window. This will get
   --  called whenever a region in the window or its children is invalidated.
   --  This can be used to record the invalidated region, which is useful if
   --  you are keeping an offscreen copy of some region and want to keep it up
   --  to date. You can also modify the invalidated region in case you're doing
   --  some effect where e.g. a child widget appears in multiple places.
   --  Since: gtk+ 3.10
   --  "handler": a Gdk_Window_Invalidate_Handler_Func callback function

   procedure Set_Keep_Above (Self : Gdk.Gdk_Window; Setting : Boolean);
   --  Set if Window must be kept above other windows. If the window was
   --  already above, then this function does nothing.
   --  On X11, asks the window manager to keep Window above, if the window
   --  manager supports this operation. Not all window managers support this,
   --  and some deliberately ignore it or don't have a concept of "keep above";
   --  so you can't rely on the window being kept above. But it will happen
   --  with most standard window managers, and GDK makes a best effort to get
   --  it to happen.
   --  Since: gtk+ 2.4
   --  "setting": whether to keep Window above other windows

   procedure Set_Keep_Below (Self : Gdk.Gdk_Window; Setting : Boolean);
   --  Set if Window must be kept below other windows. If the window was
   --  already below, then this function does nothing.
   --  On X11, asks the window manager to keep Window below, if the window
   --  manager supports this operation. Not all window managers support this,
   --  and some deliberately ignore it or don't have a concept of "keep below";
   --  so you can't rely on the window being kept below. But it will happen
   --  with most standard window managers, and GDK makes a best effort to get
   --  it to happen.
   --  Since: gtk+ 2.4
   --  "setting": whether to keep Window below other windows

   procedure Set_Opacity (Self : Gdk.Gdk_Window; Opacity : Gdouble);
   pragma Import (C, Set_Opacity, "gdk_window_set_opacity");
   --  Set Window to render as partially transparent, with opacity 0 being
   --  fully transparent and 1 fully opaque. (Values of the opacity parameter
   --  are clamped to the [0,1] range.)
   --  For toplevel windows this depends on support from the windowing system
   --  that may not always be there. For instance, On X11, this works only on X
   --  screens with a compositing manager running.
   --  For child windows this function only works for non-native windows.
   --  For setting up per-pixel alpha topelevels, see
   --  Gdk.Screen.Get_Rgba_Visual, and for non-toplevels, see
   --  Gdk.Window.Set_Composited.
   --  Support for non-toplevel windows was added in 3.8.
   --  Since: gtk+ 2.12
   --  "opacity": opacity

   procedure Set_Opaque_Region
      (Self   : Gdk.Gdk_Window;
       Region : Cairo.Region.Cairo_Region);
   pragma Import (C, Set_Opaque_Region, "gdk_window_set_opaque_region");
   --  For optimizization purposes, compositing window managers may like to
   --  not draw obscured regions of windows, or turn off blending during for
   --  these regions. With RGB windows with no transparency, this is just the
   --  shape of the window, but with ARGB32 windows, the compositor does not
   --  know what regions of the window are transparent or not.
   --  This function only works for toplevel windows.
   --  GTK+ will automatically update this property automatically if the
   --  Window background is opaque, as we know where the opaque regions are. If
   --  your window background is not opaque, please update this property in
   --  your Gtk.Widget.Gtk_Widget::style-updated handler.
   --  Since: gtk+ 3.10
   --  "region": a region

   procedure Set_Override_Redirect
      (Self              : Gdk.Gdk_Window;
       Override_Redirect : Boolean);
   --  An override redirect window is not under the control of the window
   --  manager. This means it won't have a titlebar, won't be minimizable, etc.
   --  - it will be entirely under the control of the application. The window
   --  manager can't see the override redirect window at all.
   --  Override redirect should only be used for short-lived temporary
   --  windows, such as popup menus. Gtk.Menu.Gtk_Menu uses an override
   --  redirect window in its implementation, for example.
   --  "override_redirect": True if window should be override redirect

   procedure Set_Role (Self : Gdk.Gdk_Window; Role : UTF8_String);
   --  When using GTK+, typically you should use Gtk.Window.Set_Role instead
   --  of this low-level function.
   --  The window manager and session manager use a window's role to
   --  distinguish it from other kinds of window in the same application. When
   --  an application is restarted after being saved in a previous session, all
   --  windows with the same title and role are treated as interchangeable. So
   --  if you have two windows with the same title that should be distinguished
   --  for session management purposes, you should set the role on those
   --  windows. It doesn't matter what string you use for the role, as long as
   --  you have a different role for each non-interchangeable kind of window.
   --  "role": a string indicating its role

   procedure Set_Shadow_Width
      (Self   : Gdk.Gdk_Window;
       Left   : Gint;
       Right  : Gint;
       Top    : Gint;
       Bottom : Gint);
   pragma Import (C, Set_Shadow_Width, "gdk_window_set_shadow_width");
   --  Newer GTK+ windows using client-side decorations use extra geometry
   --  around their frames for effects like shadows and invisible borders.
   --  Window managers that want to maximize windows or snap to edges need to
   --  know where the extents of the actual frame lie, so that users don't feel
   --  like windows are snapping against random invisible edges.
   --  Note that this property is automatically updated by GTK+, so this
   --  function should only be used by applications which do not use GTK+ to
   --  create toplevel windows.
   --  Since: gtk+ 3.12
   --  "left": The left extent
   --  "right": The right extent
   --  "top": The top extent
   --  "bottom": The bottom extent

   procedure Set_Skip_Pager_Hint
      (Self        : Gdk.Gdk_Window;
       Skips_Pager : Boolean);
   --  Toggles whether a window should appear in a pager (workspace switcher,
   --  or other desktop utility program that displays a small thumbnail
   --  representation of the windows on the desktop). If a window's semantic
   --  type as specified with Gdk.Window.Set_Type_Hint already fully describes
   --  the window, this function should not be called in addition, instead you
   --  should allow the window to be treated according to standard policy for
   --  its semantic type.
   --  Since: gtk+ 2.2
   --  "skips_pager": True to skip the pager

   procedure Set_Skip_Taskbar_Hint
      (Self          : Gdk.Gdk_Window;
       Skips_Taskbar : Boolean);
   --  Toggles whether a window should appear in a task list or window list.
   --  If a window's semantic type as specified with Gdk.Window.Set_Type_Hint
   --  already fully describes the window, this function should not be called
   --  in addition, instead you should allow the window to be treated according
   --  to standard policy for its semantic type.
   --  Since: gtk+ 2.2
   --  "skips_taskbar": True to skip the taskbar

   procedure Set_Startup_Id
      (Self       : Gdk.Gdk_Window;
       Startup_Id : UTF8_String);
   --  When using GTK+, typically you should use Gtk.Window.Set_Startup_Id
   --  instead of this low-level function.
   --  Since: gtk+ 2.12
   --  "startup_id": a string with startup-notification identifier

   function Set_Static_Gravities
      (Self       : Gdk.Gdk_Window;
       Use_Static : Boolean) return Boolean;
   --  Set the bit gravity of the given window to static, and flag it so all
   --  children get static subwindow gravity. This is used if you are
   --  implementing scary features that involve deep knowledge of the windowing
   --  system. Don't worry about it unless you have to.
   --  "use_static": True to turn on static gravity

   procedure Set_Title (Self : Gdk.Gdk_Window; Title : UTF8_String);
   --  Sets the title of a toplevel window, to be displayed in the titlebar.
   --  If you haven't explicitly set the icon name for the window (using
   --  Gdk.Window.Set_Icon_Name), the icon name will be set to Title as well.
   --  Title must be in UTF-8 encoding (as with all user-readable strings in
   --  GDK/GTK+). Title may not be null.
   --  "title": title of Window

   procedure Set_Transient_For
      (Self   : Gdk.Gdk_Window;
       Parent : Gdk.Gdk_Window);
   pragma Import (C, Set_Transient_For, "gdk_window_set_transient_for");
   --  Indicates to the window manager that Window is a transient dialog
   --  associated with the application window Parent. This allows the window
   --  manager to do things like center Window on Parent and keep Window above
   --  Parent.
   --  See Gtk.Window.Set_Transient_For if you're using Gtk.Window.Gtk_Window
   --  or Gtk.Dialog.Gtk_Dialog.
   --  "parent": another toplevel Gdk.Gdk_Window

   procedure Set_Urgency_Hint (Self : Gdk.Gdk_Window; Urgent : Boolean);
   --  Toggles whether a window needs the user's urgent attention.
   --  Since: gtk+ 2.8
   --  "urgent": True if the window is urgent

   procedure Set_User_Data
      (Self      : Gdk.Gdk_Window;
       User_Data : System.Address);
   pragma Import (C, Set_User_Data, "gdk_window_set_user_data");
   --  For most purposes this function is deprecated in favor of
   --  g_object_set_data. However, for historical reasons GTK+ stores the
   --  Gtk.Widget.Gtk_Widget that owns a Gdk.Gdk_Window as user data on the
   --  Gdk.Gdk_Window. So, custom widget implementations should use this
   --  function for that. If GTK+ receives an event for a Gdk.Gdk_Window, and
   --  the user data for the window is non-null, GTK+ will assume the user data
   --  is a Gtk.Widget.Gtk_Widget, and forward the event to that widget.
   --  "user_data": user data

   procedure Shape_Combine_Region
      (Self         : Gdk.Gdk_Window;
       Shape_Region : Cairo.Region.Cairo_Region;
       Offset_X     : Gint;
       Offset_Y     : Gint);
   pragma Import (C, Shape_Combine_Region, "gdk_window_shape_combine_region");
   --  Makes pixels in Window outside Shape_Region be transparent, so that the
   --  window may be nonrectangular.
   --  If Shape_Region is null, the shape will be unset, so the whole window
   --  will be opaque again. Offset_X and Offset_Y are ignored if Shape_Region
   --  is null.
   --  On the X11 platform, this uses an X server extension which is widely
   --  available on most common platforms, but not available on very old X
   --  servers, and occasionally the implementation will be buggy. On servers
   --  without the shape extension, this function will do nothing.
   --  This function works on both toplevel and child windows.
   --  "shape_region": region of window to be non-transparent
   --  "offset_x": X position of Shape_Region in Window coordinates
   --  "offset_y": Y position of Shape_Region in Window coordinates

   procedure Show (Self : Gdk.Gdk_Window);
   pragma Import (C, Show, "gdk_window_show");
   --  Like Gdk.Window.Show_Unraised, but also raises the window to the top of
   --  the window stack (moves the window to the front of the Z-order).
   --  This function maps a window so it's visible onscreen. Its opposite is
   --  Gdk.Window.Hide.
   --  When implementing a Gtk.Widget.Gtk_Widget, you should call this
   --  function on the widget's Gdk.Gdk_Window as part of the "map" method.

   procedure Show_Unraised (Self : Gdk.Gdk_Window);
   pragma Import (C, Show_Unraised, "gdk_window_show_unraised");
   --  Shows a Gdk.Gdk_Window onscreen, but does not modify its stacking
   --  order. In contrast, Gdk.Window.Show will raise the window to the top of
   --  the window stack.
   --  On the X11 platform, in Xlib terms, this function calls XMapWindow (it
   --  also updates some internal GDK state, which means that you can't really
   --  use XMapWindow directly on a GDK window).

   function Show_Window_Menu
      (Self  : Gdk.Gdk_Window;
       Event : Gdk.Event.Gdk_Event) return Boolean;
   --  Asks the windowing system to show the window menu. The window menu is
   --  the menu shown when right-clicking the titlebar on traditional windows
   --  managed by the window manager. This is useful for windows using
   --  client-side decorations, activating it with a right-click on the window
   --  decorations.
   --  Since: gtk+ 3.14
   --  "event": a Gdk.Event.Gdk_Event to show the menu for

   procedure Stick (Self : Gdk.Gdk_Window);
   pragma Import (C, Stick, "gdk_window_stick");
   --  "Pins" a window such that it's on all workspaces and does not scroll
   --  with viewports, for window managers that have scrollable viewports.
   --  (When using Gtk.Window.Gtk_Window, Gtk.Window.Stick may be more useful.)
   --  On the X11 platform, this function depends on window manager support,
   --  so may have no effect with many window managers. However, GDK will do
   --  the best it can to convince the window manager to stick the window. For
   --  window managers that don't support this operation, there's nothing you
   --  can do to force it to happen.

   procedure Thaw_Toplevel_Updates_Libgtk_Only (Self : Gdk.Gdk_Window);
   pragma Import (C, Thaw_Toplevel_Updates_Libgtk_Only, "gdk_window_thaw_toplevel_updates_libgtk_only");
   --  Thaws a window frozen with
   --  Gdk.Window.Freeze_Toplevel_Updates_Libgtk_Only.
   --  This function is not part of the GDK public API and is only for use by
   --  GTK+.

   procedure Thaw_Updates (Self : Gdk.Gdk_Window);
   pragma Import (C, Thaw_Updates, "gdk_window_thaw_updates");
   --  Thaws a window frozen with Gdk.Window.Freeze_Updates.

   procedure Unfullscreen (Self : Gdk.Gdk_Window);
   pragma Import (C, Unfullscreen, "gdk_window_unfullscreen");
   --  Moves the window out of fullscreen mode. If the window was not
   --  fullscreen, does nothing.
   --  On X11, asks the window manager to move Window out of the fullscreen
   --  state, if the window manager supports this operation. Not all window
   --  managers support this, and some deliberately ignore it or don't have a
   --  concept of "fullscreen"; so you can't rely on the unfullscreenification
   --  actually happening. But it will happen with most standard window
   --  managers, and GDK makes a best effort to get it to happen.
   --  Since: gtk+ 2.2

   procedure Unmaximize (Self : Gdk.Gdk_Window);
   pragma Import (C, Unmaximize, "gdk_window_unmaximize");
   --  Unmaximizes the window. If the window wasn't maximized, then this
   --  function does nothing.
   --  On X11, asks the window manager to unmaximize Window, if the window
   --  manager supports this operation. Not all window managers support this,
   --  and some deliberately ignore it or don't have a concept of "maximized";
   --  so you can't rely on the unmaximization actually happening. But it will
   --  happen with most standard window managers, and GDK makes a best effort
   --  to get it to happen.
   --  On Windows, reliably unmaximizes the window.

   procedure Unstick (Self : Gdk.Gdk_Window);
   pragma Import (C, Unstick, "gdk_window_unstick");
   --  Reverse operation for Gdk.Window.Stick; see Gdk.Window.Stick, and
   --  Gtk.Window.Unstick.

   procedure Withdraw (Self : Gdk.Gdk_Window);
   pragma Import (C, Withdraw, "gdk_window_withdraw");
   --  Withdraws a window (unmaps it and asks the window manager to forget
   --  about it). This function is not really useful as Gdk.Window.Hide
   --  automatically withdraws toplevel windows before hiding them.

   ----------------------
   -- GtkAda additions --
   ----------------------

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

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

   procedure Ref (Window : Gdk_Window);
   procedure Unref (Window : Gdk_Window);
   pragma Import (C, Ref, "g_object_ref");
   pragma Import (C, Unref, "g_object_unref");

   ---------------
   -- Functions --
   ---------------

   procedure At_Pointer
      (Win_X  : out Gint;
       Win_Y  : out Gint;
       Window : out Gdk.Gdk_Window);
   pragma Obsolescent (At_Pointer);
   --  Obtains the window underneath the mouse pointer, returning the location
   --  of that window in Win_X, Win_Y. Returns null if the window under the
   --  mouse pointer is not known to GDK (if the window belongs to another
   --  application and a Gdk.Gdk_Window hasn't been created for it with
   --  gdk_window_foreign_new)
   --  NOTE: For multihead-aware widgets or applications use
   --  gdk_display_get_window_at_pointer instead.
   --  Deprecated since 3.0, 1
   --  "win_x": return location for origin of the window under the pointer
   --  "win_y": return location for origin of the window under the pointer

   procedure Constrain_Size
      (Geometry   : Gdk_Geometry;
       Flags      : Gdk_Window_Hints;
       Width      : Gint;
       Height     : Gint;
       New_Width  : out Gint;
       New_Height : out Gint);
   pragma Import (C, Constrain_Size, "gdk_window_constrain_size");
   --  Constrains a desired width and height according to a set of geometry
   --  hints (such as minimum and maximum size).
   --  "geometry": a Gdk.Window.Gdk_Geometry structure
   --  "flags": a mask indicating what portions of Geometry are set
   --  "width": desired width of window
   --  "height": desired height of the window
   --  "new_width": location to store resulting width
   --  "new_height": location to store resulting height

   procedure Process_All_Updates;
   pragma Import (C, Process_All_Updates, "gdk_window_process_all_updates");
   --  Calls Gdk.Window.Process_Updates for all windows (see Gdk.Gdk_Window)
   --  in the application.

   procedure Set_Debug_Updates (Setting : Boolean);
   --  With update debugging enabled, calls to Gdk.Window.Invalidate_Region
   --  clear the invalidated region of the screen to a noticeable color, and
   --  GDK pauses for a short time before sending exposes to windows during
   --  Gdk.Window.Process_Updates. The net effect is that you can see the
   --  invalid region for each window and watch redraws as they occur. This
   --  allows you to diagnose inefficiencies in your application.
   --  In essence, because the GDK rendering model prevents all flicker, if
   --  you are redrawing the same region 400 times you may never notice, aside
   --  from noticing a speed problem. Enabling update debugging causes GTK to
   --  flicker slowly and noticeably, so you can see exactly what's being
   --  redrawn when, in what order.
   --  The --gtk-debug=updates command line option passed to GTK+ programs
   --  enables this debug option at application startup time. That's usually
   --  more useful than calling Gdk.Window.Set_Debug_Updates yourself, though
   --  you might want to use this function to enable updates sometime after
   --  application startup time.
   --  "setting": True to turn on update debugging

   ----------------
   -- Properties --
   ----------------
   --  The following properties are defined for this widget. See
   --  Glib.Properties for more information on properties)

   Cursor_Property : constant Glib.Properties.Property_Boxed;
   --  Type: Cursor
   --  The mouse pointer for a Gdk.Gdk_Window. See Gdk.Window.Set_Cursor and
   --  Gdk.Window.Get_Cursor for details.

   -------------
   -- Signals --
   -------------

   Signal_Create_Surface : constant Glib.Signal_Name := "create-surface";
   --  The ::create-surface signal is emitted when an offscreen window needs
   --  its surface (re)created, which happens either when the window is first
   --  drawn to, or when the window is being resized. The first signal handler
   --  that returns a non-null surface will stop any further signal emission,
   --  and its surface will be used.
   --
   --  Note that it is not possible to access the window's previous surface
   --  from within any callback of this signal. Calling
   --  gdk_offscreen_window_get_surface will lead to a crash.
   --    function Handler
   --       (Self   : Gdk_Window;
   --        Width  : Gint;
   --        Height : Gint) return Cairo.Cairo_Surface
   -- 
   --  Callback parameters:
   --    --  "width": the width of the offscreen surface to create
   --    --  "height": the height of the offscreen surface to create
   --    --  Returns the newly created cairo_surface_t for the offscreen window

   Signal_From_Embedder : constant Glib.Signal_Name := "from-embedder";
   --  The ::from-embedder signal is emitted to translate coordinates in the
   --  embedder of an offscreen window to the offscreen window.
   --
   --  See also Gdk.Gdk_Window::to-embedder.
   --    procedure Handler
   --       (Self        : Gdk_Window;
   --        Embedder_X  : Gdouble;
   --        Embedder_Y  : Gdouble;
   --        Offscreen_X : out System.Address;
   --        Offscreen_Y : out System.Address)
   -- 
   --  Callback parameters:
   --    --  "embedder_x": x coordinate in the embedder window
   --    --  "embedder_y": y coordinate in the embedder window
   --    --  "offscreen_x": return location for the x coordinate in the offscreen
   --    --  window
   --    --  "offscreen_y": return location for the y coordinate in the offscreen
   --    --  window

   Signal_Pick_Embedded_Child : constant Glib.Signal_Name := "pick-embedded-child";
   --  The ::pick-embedded-child signal is emitted to find an embedded child
   --  at the given position.
   --    function Handler
   --       (Self : Gdk_Window;
   --        X    : Gdouble;
   --        Y    : Gdouble) return Gtk.Window.Gtk_Window
   -- 
   --  Callback parameters:
   --    --  "x": x coordinate in the window
   --    --  "y": y coordinate in the window
   --    --  Returns the Gdk.Gdk_Window of the
   --     embedded child at X, Y, or null

   Signal_To_Embedder : constant Glib.Signal_Name := "to-embedder";
   --  The ::to-embedder signal is emitted to translate coordinates in an
   --  offscreen window to its embedder.
   --
   --  See also Gdk.Gdk_Window::from-embedder.
   --    procedure Handler
   --       (Self        : Gdk_Window;
   --        Offscreen_X : Gdouble;
   --        Offscreen_Y : Gdouble;
   --        Embedder_X  : out System.Address;
   --        Embedder_Y  : out System.Address)
   -- 
   --  Callback parameters:
   --    --  "offscreen_x": x coordinate in the offscreen window
   --    --  "offscreen_y": y coordinate in the offscreen window
   --    --  "embedder_x": return location for the x coordinate in the embedder
   --    --  window
   --    --  "embedder_y": return location for the y coordinate in the embedder
   --    --  window

private
   Cursor_Property : constant Glib.Properties.Property_Boxed :=
     Glib.Properties.Build ("cursor");
end Gdk.Window;