aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore_x/Ecore_X.h
blob: ba7021ffd2b1f6a111a76860d5ef17eb182c4227 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
#ifndef _ECORE_X_H
#define _ECORE_X_H

#include <Eina.h>

#ifdef EAPI
# undef EAPI
#endif // ifdef EAPI

#ifdef _MSC_VER
# ifdef BUILDING_DLL
#  define EAPI __declspec(dllexport)
# else // ifdef BUILDING_DLL
#  define EAPI __declspec(dllimport)
# endif // ifdef BUILDING_DLL
#else // ifdef _MSC_VER
# ifdef __GNUC__
#  if __GNUC__ >= 4
#   define EAPI __attribute__ ((visibility("default")))
#  else // if __GNUC__ >= 4
#   define EAPI
#  endif // if __GNUC__ >= 4
# else // ifdef __GNUC__
#  define EAPI
# endif // ifdef __GNUC__
#endif // ifdef _MSC_VER

#include <sys/types.h>

/**
 * @file
 * @brief Ecore functions for dealing with the X Windows System
 *
 * Ecore_X provides a wrapper and convenience functions for using the
 * X Windows System.  Function groups for this part of the library
 * include the following:
 * @li @ref Ecore_X_Init_Group
 * @li @ref Ecore_X_Display_Attr_Group
 * @li @ref Ecore_X_Flush_Group
 */

typedef unsigned int   Ecore_X_ID;
#ifndef _ECORE_X_WINDOW_PREDEF
typedef Ecore_X_ID     Ecore_X_Window;
#endif // ifndef _ECORE_X_WINDOW_PREDEF
typedef void          *Ecore_X_Visual;
typedef Ecore_X_ID     Ecore_X_Pixmap;
typedef Ecore_X_ID     Ecore_X_Drawable;
#ifdef HAVE_ECORE_X_XCB
typedef Ecore_X_ID     Ecore_X_GC;
#else // ifdef HAVE_ECORE_X_XCB
typedef void          *Ecore_X_GC;
#endif /* HAVE_ECORE_X_XCB */
typedef Ecore_X_ID     Ecore_X_Atom;
typedef Ecore_X_ID     Ecore_X_Colormap;
typedef Ecore_X_ID     Ecore_X_Time;
typedef Ecore_X_ID     Ecore_X_Cursor;
typedef void           Ecore_X_Display;
typedef void           Ecore_X_Connection;
typedef void           Ecore_X_Screen;
typedef Ecore_X_ID     Ecore_X_Sync_Counter;
typedef Ecore_X_ID     Ecore_X_Sync_Alarm;
typedef void           Ecore_X_XRegion;

typedef Ecore_X_ID     Ecore_X_Randr_Output;
typedef Ecore_X_ID     Ecore_X_Randr_Crtc;
typedef Ecore_X_ID     Ecore_X_Randr_Mode;
typedef unsigned short Ecore_X_Randr_Size_ID;
typedef int            Ecore_X_Randr_Screen;

typedef Ecore_X_ID     Ecore_X_Device;

#ifdef __cplusplus
extern "C" {
#endif // ifdef __cplusplus

typedef struct _Ecore_X_Rectangle
{
   int          x, y;
   unsigned int width, height;
} Ecore_X_Rectangle;

typedef struct _Ecore_X_Icon
{
   unsigned int  width, height;
   unsigned int *data;
} Ecore_X_Icon;

typedef enum _Ecore_X_GC_Value_Mask
{
   ECORE_X_GC_VALUE_MASK_FUNCTION = (1L << 0),
   ECORE_X_GC_VALUE_MASK_PLANE_MASK = (1L << 1),
   ECORE_X_GC_VALUE_MASK_FOREGROUND = (1L << 2),
   ECORE_X_GC_VALUE_MASK_BACKGROUND = (1L << 3),
   ECORE_X_GC_VALUE_MASK_LINE_WIDTH = (1L << 4),
   ECORE_X_GC_VALUE_MASK_LINE_STYLE = (1L << 5),
   ECORE_X_GC_VALUE_MASK_CAP_STYLE = (1L << 6),
   ECORE_X_GC_VALUE_MASK_JOIN_STYLE = (1L << 7),
   ECORE_X_GC_VALUE_MASK_FILL_STYLE = (1L << 8),
   ECORE_X_GC_VALUE_MASK_FILL_RULE = (1L << 9),
   ECORE_X_GC_VALUE_MASK_TILE = (1L << 10),
   ECORE_X_GC_VALUE_MASK_STIPPLE = (1L << 11),
   ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_X = (1L << 12),
   ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_Y = (1L << 13),
   ECORE_X_GC_VALUE_MASK_FONT = (1L << 14),
   ECORE_X_GC_VALUE_MASK_SUBWINDOW_MODE = (1L << 15),
   ECORE_X_GC_VALUE_MASK_GRAPHICS_EXPOSURES = (1L << 16),
   ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_X = (1L << 17),
   ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_Y = (1L << 18),
   ECORE_X_GC_VALUE_MASK_CLIP_MASK = (1L << 19),
   ECORE_X_GC_VALUE_MASK_DASH_OFFSET = (1L << 20),
   ECORE_X_GC_VALUE_MASK_DASH_LIST = (1L << 21),
   ECORE_X_GC_VALUE_MASK_ARC_MODE = (1L << 22)
} Ecore_X_GC_Value_Mask;

typedef enum _Ecore_X_Composite_Update_Type
{
   ECORE_X_COMPOSITE_UPDATE_AUTOMATIC,
   ECORE_X_COMPOSITE_UPDATE_MANUAL
} Ecore_X_Composite_Update_Type;

typedef enum _Ecore_X_Window_State
{
   /* Unknown state */
    ECORE_X_WINDOW_STATE_UNKNOWN = 0,
    /** The window is iconified. */
    ECORE_X_WINDOW_STATE_ICONIFIED,
    /** The window is a modal dialog box. */
    ECORE_X_WINDOW_STATE_MODAL,
    /** The window manager should keep the window's position fixed
     * even if the virtual desktop scrolls. */
    ECORE_X_WINDOW_STATE_STICKY,
    /** The window has the maximum vertical size. */
    ECORE_X_WINDOW_STATE_MAXIMIZED_VERT,
    /** The window has the maximum horizontal size. */
    ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ,
    /** The window is shaded. */
    ECORE_X_WINDOW_STATE_SHADED,
    /** The window should not be included in the taskbar. */
    ECORE_X_WINDOW_STATE_SKIP_TASKBAR,
    /** The window should not be included in the pager. */
    ECORE_X_WINDOW_STATE_SKIP_PAGER,
    /** The window is invisible (i.e. minimized/iconified) */
    ECORE_X_WINDOW_STATE_HIDDEN,
    /** The window should fill the entire screen and have no
     * window border/decorations */
    ECORE_X_WINDOW_STATE_FULLSCREEN,
    /* The following are not documented because they are not
     * intended for use in applications. */
    ECORE_X_WINDOW_STATE_ABOVE,
    ECORE_X_WINDOW_STATE_BELOW,
    /* FIXME: Documentation */
    ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION
} Ecore_X_Window_State;

typedef enum _Ecore_X_Window_State_Action
{
   ECORE_X_WINDOW_STATE_ACTION_REMOVE,
   ECORE_X_WINDOW_STATE_ACTION_ADD,
   ECORE_X_WINDOW_STATE_ACTION_TOGGLE
} Ecore_X_Window_State_Action;

typedef enum _Ecore_X_Window_Stack_Mode
{
   ECORE_X_WINDOW_STACK_ABOVE = 0,
   ECORE_X_WINDOW_STACK_BELOW = 1,
   ECORE_X_WINDOW_STACK_TOP_IF = 2,
   ECORE_X_WINDOW_STACK_BOTTOM_IF = 3,
   ECORE_X_WINDOW_STACK_OPPOSITE = 4
} Ecore_X_Window_Stack_Mode;

typedef enum _Ecore_X_Randr_Orientation
{
   ECORE_X_RANDR_ORIENTATION_ROT_0 = (1 << 0),
   ECORE_X_RANDR_ORIENTATION_ROT_90 = (1 << 1),
   ECORE_X_RANDR_ORIENTATION_ROT_180 = (1 << 2),
   ECORE_X_RANDR_ORIENTATION_ROT_270 = (1 << 3),
   ECORE_X_RANDR_ORIENTATION_FLIP_X = (1 << 4),
   ECORE_X_RANDR_ORIENTATION_FLIP_Y = (1 << 5)
} Ecore_X_Randr_Orientation;

typedef enum _Ecore_X_Randr_Connection_Status
{
   ECORE_X_RANDR_CONNECTION_STATUS_CONNECTED = 0,
   ECORE_X_RANDR_CONNECTION_STATUS_DISCONNECTED = 1,
   ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN = 2
} Ecore_X_Randr_Connection_Status;

typedef enum _Ecore_X_Randr_Output_Policy
{
   ECORE_X_RANDR_OUTPUT_POLICY_ABOVE = 1,
   ECORE_X_RANDR_OUTPUT_POLICY_RIGHT = 2,
   ECORE_X_RANDR_OUTPUT_POLICY_BELOW = 3,
   ECORE_X_RANDR_OUTPUT_POLICY_LEFT = 4,
   ECORE_X_RANDR_OUTPUT_POLICY_CLONE = 5,
   ECORE_X_RANDR_OUTPUT_POLICY_NONE = 6
} Ecore_X_Randr_Output_Policy;

typedef enum _Ecore_X_Randr_Relative_Alignment
{
   ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE = 0,
   ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL = 1,
   ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR = 2
} Ecore_X_Randr_Relative_Alignment;

typedef enum _Ecore_X_Render_Subpixel_Order
{
   ECORE_X_RENDER_SUBPIXEL_ORDER_UNKNOWN = 0,
   ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_RGB = 1,
   ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_BGR = 2,
   ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_RGB = 3,
   ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_BGR = 4,
   ECORE_X_RENDER_SUBPIXEL_ORDER_NONE = 5
} Ecore_X_Render_Subpixel_Order;

typedef enum _Ecore_X_Randr_Edid_Display_Interface_Type
{
   ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_UNDEFINED,
   ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DVI,
   ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_HDMI_A,
   ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_HDMI_B,
   ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_MDDI,
   ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DISPLAY_PORT
} Ecore_X_Randr_Edid_Display_Interface_Type;

typedef enum _Ecore_X_Randr_Edid_Display_Colorscheme
{
   ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_MONOCHROME_GRAYSCALE = 0x00,
   ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB = 0x08,
   ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_NON_RGB = 0x10,
   ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_UNDEFINED = 0x18,
   ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_4_4_4 = 0x444000,
   ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_4_4 = 0x444,
   ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_2_2 = 0x422
} Ecore_X_Randr_Edid_Display_Colorscheme;

typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio
{
   ECORE_X_RANDR_EDID_ASPECT_RATIO_4_3 = 0x0,
   ECORE_X_RANDR_EDID_ASPECT_RATIO_16_9 = 0x1,
   ECORE_X_RANDR_EDID_ASPECT_RATIO_16_10 = 0x2,
   ECORE_X_RANDR_EDID_ASPECT_RATIO_5_4 = 0x4,
   ECORE_X_RANDR_EDID_ASPECT_RATIO_15_9 = 0x8
} Ecore_X_Randr_Edid_Aspect_Ratio;

#define ECORE_X_RANDR_EDID_UNKNOWN_VALUE       -1

#define ECORE_X_SELECTION_TARGET_TARGETS       "TARGETS"
#define ECORE_X_SELECTION_TARGET_TEXT          "TEXT"
#define ECORE_X_SELECTION_TARGET_COMPOUND_TEXT "COMPOUND_TEXT"
#define ECORE_X_SELECTION_TARGET_STRING        "STRING"
#define ECORE_X_SELECTION_TARGET_UTF8_STRING   "UTF8_STRING"
#define ECORE_X_SELECTION_TARGET_FILENAME      "FILENAME"

#define ECORE_X_DND_VERSION                    5

typedef enum _Ecore_X_Selection
{
   ECORE_X_SELECTION_PRIMARY,
   ECORE_X_SELECTION_SECONDARY,
   ECORE_X_SELECTION_XDND,
   ECORE_X_SELECTION_CLIPBOARD,
   ECORE_X_SELECTION_OTHER
} Ecore_X_Selection;

typedef enum _Ecore_X_Event_Mode
{
   ECORE_X_EVENT_MODE_NORMAL,
   ECORE_X_EVENT_MODE_WHILE_GRABBED,
   ECORE_X_EVENT_MODE_GRAB,
   ECORE_X_EVENT_MODE_UNGRAB
} Ecore_X_Event_Mode;

typedef enum _Ecore_X_Event_Detail
{
   ECORE_X_EVENT_DETAIL_ANCESTOR,
   ECORE_X_EVENT_DETAIL_VIRTUAL,
   ECORE_X_EVENT_DETAIL_INFERIOR,
   ECORE_X_EVENT_DETAIL_NON_LINEAR,
   ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL,
   ECORE_X_EVENT_DETAIL_POINTER,
   ECORE_X_EVENT_DETAIL_POINTER_ROOT,
   ECORE_X_EVENT_DETAIL_DETAIL_NONE
} Ecore_X_Event_Detail;

typedef enum _Ecore_X_Event_Mask
{
   ECORE_X_EVENT_MASK_NONE = 0L,
   ECORE_X_EVENT_MASK_KEY_DOWN = (1L << 0),
   ECORE_X_EVENT_MASK_KEY_UP = (1L << 1),
   ECORE_X_EVENT_MASK_MOUSE_DOWN = (1L << 2),
   ECORE_X_EVENT_MASK_MOUSE_UP = (1L << 3),
   ECORE_X_EVENT_MASK_MOUSE_IN = (1L << 4),
   ECORE_X_EVENT_MASK_MOUSE_OUT = (1L << 5),
   ECORE_X_EVENT_MASK_MOUSE_MOVE = (1L << 6),
   ECORE_X_EVENT_MASK_WINDOW_DAMAGE = (1L << 15),
   ECORE_X_EVENT_MASK_WINDOW_VISIBILITY = (1L << 16),
   ECORE_X_EVENT_MASK_WINDOW_CONFIGURE = (1L << 17),
   ECORE_X_EVENT_MASK_WINDOW_RESIZE_MANAGE = (1L << 18),
   ECORE_X_EVENT_MASK_WINDOW_MANAGE = (1L << 19),
   ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE = (1L << 20),
   ECORE_X_EVENT_MASK_WINDOW_FOCUS_CHANGE = (1L << 21),
   ECORE_X_EVENT_MASK_WINDOW_PROPERTY = (1L << 22),
   ECORE_X_EVENT_MASK_WINDOW_COLORMAP = (1L << 23),
   ECORE_X_EVENT_MASK_WINDOW_GRAB = (1L << 24),
   ECORE_X_EVENT_MASK_MOUSE_WHEEL = (1L << 29),
   ECORE_X_EVENT_MASK_WINDOW_FOCUS_IN = (1L << 30),
   ECORE_X_EVENT_MASK_WINDOW_FOCUS_OUT = (1L << 31)
} Ecore_X_Event_Mask;

typedef enum _Ecore_X_Gravity
{
   ECORE_X_GRAVITY_FORGET = 0,
   ECORE_X_GRAVITY_UNMAP = 0,
   ECORE_X_GRAVITY_NW = 1,
   ECORE_X_GRAVITY_N = 2,
   ECORE_X_GRAVITY_NE = 3,
   ECORE_X_GRAVITY_W = 4,
   ECORE_X_GRAVITY_CENTER = 5,
   ECORE_X_GRAVITY_E = 6,
   ECORE_X_GRAVITY_SW = 7,
   ECORE_X_GRAVITY_S = 8,
   ECORE_X_GRAVITY_SE = 9,
   ECORE_X_GRAVITY_STATIC = 10
} Ecore_X_Gravity;

/* Needed for ecore_x_region_window_shape_set */
typedef enum _Ecore_X_Shape_Type
{
   ECORE_X_SHAPE_BOUNDING,
   ECORE_X_SHAPE_CLIP,
   ECORE_X_SHAPE_INPUT
} Ecore_X_Shape_Type;

typedef enum _Ecore_X_Mapping_Type
{
   ECORE_X_MAPPING_MODIFIER,
   ECORE_X_MAPPING_KEYBOARD,
   ECORE_X_MAPPING_MOUSE
} Ecore_X_Mapping_Type;

typedef enum _Ecore_X_Randr_Property_Change
{
   ECORE_X_RANDR_PROPERTY_CHANGE_ADD,
   ECORE_X_RANDR_PROPERTY_CHANGE_DEL
} Ecore_X_Randr_Property_Change;

typedef struct _Ecore_X_Event_Mouse_In                     Ecore_X_Event_Mouse_In;
typedef struct _Ecore_X_Event_Mouse_Out                    Ecore_X_Event_Mouse_Out;
typedef struct _Ecore_X_Event_Window_Focus_In              Ecore_X_Event_Window_Focus_In;
typedef struct _Ecore_X_Event_Window_Focus_Out             Ecore_X_Event_Window_Focus_Out;
typedef struct _Ecore_X_Event_Window_Keymap                Ecore_X_Event_Window_Keymap;
typedef struct _Ecore_X_Event_Window_Damage                Ecore_X_Event_Window_Damage;
typedef struct _Ecore_X_Event_Window_Visibility_Change     Ecore_X_Event_Window_Visibility_Change;
typedef struct _Ecore_X_Event_Window_Create                Ecore_X_Event_Window_Create;
typedef struct _Ecore_X_Event_Window_Destroy               Ecore_X_Event_Window_Destroy;
typedef struct _Ecore_X_Event_Window_Hide                  Ecore_X_Event_Window_Hide;
typedef struct _Ecore_X_Event_Window_Show                  Ecore_X_Event_Window_Show;
typedef struct _Ecore_X_Event_Window_Show_Request          Ecore_X_Event_Window_Show_Request;
typedef struct _Ecore_X_Event_Window_Reparent              Ecore_X_Event_Window_Reparent;
typedef struct _Ecore_X_Event_Window_Configure             Ecore_X_Event_Window_Configure;
typedef struct _Ecore_X_Event_Window_Configure_Request     Ecore_X_Event_Window_Configure_Request;
typedef struct _Ecore_X_Event_Window_Gravity               Ecore_X_Event_Window_Gravity;
typedef struct _Ecore_X_Event_Window_Resize_Request        Ecore_X_Event_Window_Resize_Request;
typedef struct _Ecore_X_Event_Window_Stack                 Ecore_X_Event_Window_Stack;
typedef struct _Ecore_X_Event_Window_Stack_Request         Ecore_X_Event_Window_Stack_Request;
typedef struct _Ecore_X_Event_Window_Property              Ecore_X_Event_Window_Property;
typedef struct _Ecore_X_Event_Window_Colormap              Ecore_X_Event_Window_Colormap;
typedef struct _Ecore_X_Event_Mapping_Change               Ecore_X_Event_Mapping_Change;
typedef struct _Ecore_X_Event_Window_Mapping               Ecore_X_Event_Window_Mapping;
typedef struct _Ecore_X_Event_Selection_Clear              Ecore_X_Event_Selection_Clear;
typedef struct _Ecore_X_Event_Selection_Request            Ecore_X_Event_Selection_Request;
typedef struct _Ecore_X_Event_Selection_Notify             Ecore_X_Event_Selection_Notify;
typedef struct _Ecore_X_Event_Fixes_Selection_Notify       Ecore_X_Event_Fixes_Selection_Notify;
typedef struct _Ecore_X_Selection_Data                     Ecore_X_Selection_Data;
typedef struct _Ecore_X_Selection_Data_Files               Ecore_X_Selection_Data_Files;
typedef struct _Ecore_X_Selection_Data_Text                Ecore_X_Selection_Data_Text;
typedef struct _Ecore_X_Selection_Data_Targets             Ecore_X_Selection_Data_Targets;
typedef struct _Ecore_X_Event_Xdnd_Enter                   Ecore_X_Event_Xdnd_Enter;
typedef struct _Ecore_X_Event_Xdnd_Position                Ecore_X_Event_Xdnd_Position;
typedef struct _Ecore_X_Event_Xdnd_Status                  Ecore_X_Event_Xdnd_Status;
typedef struct _Ecore_X_Event_Xdnd_Leave                   Ecore_X_Event_Xdnd_Leave;
typedef struct _Ecore_X_Event_Xdnd_Drop                    Ecore_X_Event_Xdnd_Drop;
typedef struct _Ecore_X_Event_Xdnd_Finished                Ecore_X_Event_Xdnd_Finished;
typedef struct _Ecore_X_Event_Client_Message               Ecore_X_Event_Client_Message;
typedef struct _Ecore_X_Event_Window_Shape                 Ecore_X_Event_Window_Shape;
typedef struct _Ecore_X_Event_Screensaver_Notify           Ecore_X_Event_Screensaver_Notify;
typedef struct _Ecore_X_Event_Sync_Counter                 Ecore_X_Event_Sync_Counter;
typedef struct _Ecore_X_Event_Sync_Alarm                   Ecore_X_Event_Sync_Alarm;
typedef struct _Ecore_X_Event_Screen_Change                Ecore_X_Event_Screen_Change;
typedef struct _Ecore_X_Event_Randr_Crtc_Change            Ecore_X_Event_Randr_Crtc_Change;
typedef struct _Ecore_X_Event_Randr_Output_Change          Ecore_X_Event_Randr_Output_Change;
typedef struct _Ecore_X_Event_Randr_Output_Property_Notify Ecore_X_Event_Randr_Output_Property_Notify;

typedef struct _Ecore_X_Event_Window_Delete_Request        Ecore_X_Event_Window_Delete_Request;
typedef struct _Ecore_X_Event_Window_Move_Resize_Request   Ecore_X_Event_Window_Move_Resize_Request;
typedef struct _Ecore_X_Event_Window_State_Request         Ecore_X_Event_Window_State_Request;
typedef struct _Ecore_X_Event_Frame_Extents_Request        Ecore_X_Event_Frame_Extents_Request;
typedef struct _Ecore_X_Event_Ping                         Ecore_X_Event_Ping;
typedef struct _Ecore_X_Event_Desktop_Change               Ecore_X_Event_Desktop_Change;

typedef struct _Ecore_X_Event_Startup_Sequence             Ecore_X_Event_Startup_Sequence;

typedef struct _Ecore_X_Event_Generic                      Ecore_X_Event_Generic;

typedef struct _Ecore_X_Randr_Screen_Size                  Ecore_X_Randr_Screen_Size;
typedef struct _Ecore_X_Randr_Screen_Size_MM               Ecore_X_Randr_Screen_Size_MM;

typedef struct _Ecore_X_Xdnd_Position                      Ecore_X_Xdnd_Position;

struct _Ecore_X_Event_Mouse_In
{
   int                  modifiers;
   int                  x, y;
   Eina_Bool            same_screen : 1;
   struct
   {
      int x, y;
   } root;
   Ecore_X_Window       win;
   Ecore_X_Window       event_win;
   Ecore_X_Window       root_win;
   Ecore_X_Event_Mode   mode;
   Ecore_X_Event_Detail detail;
   Ecore_X_Time         time;
};

struct _Ecore_X_Event_Mouse_Out
{
   int                  modifiers;
   int                  x, y;
   int                  same_screen;
   struct
   {
      int x, y;
   } root;
   Ecore_X_Window       win;
   Ecore_X_Window       event_win;
   Ecore_X_Window       root_win;
   Ecore_X_Event_Mode   mode;
   Ecore_X_Event_Detail detail;
   Ecore_X_Time         time;
};

struct _Ecore_X_Event_Window_Focus_In
{
   Ecore_X_Window       win;
   Ecore_X_Event_Mode   mode;
   Ecore_X_Event_Detail detail;
   Ecore_X_Time         time;
};

struct _Ecore_X_Event_Window_Focus_Out
{
   Ecore_X_Window       win;
   Ecore_X_Event_Mode   mode;
   Ecore_X_Event_Detail detail;
   Ecore_X_Time         time;
};

struct _Ecore_X_Event_Window_Keymap
{
   Ecore_X_Window win;
};

struct _Ecore_X_Event_Window_Damage
{
   Ecore_X_Window win;
   int            x, y, w, h;
   int            count;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Visibility_Change
{
   Ecore_X_Window win;
   int            fully_obscured;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Create
{
   Ecore_X_Window win;
   Ecore_X_Window parent;
   int            override;
   int            x, y, w, h;
   int            border;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Destroy
{
   Ecore_X_Window win;
   Ecore_X_Window event_win;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Hide
{
   Ecore_X_Window win;
   Ecore_X_Window event_win;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Show
{
   Ecore_X_Window win;
   Ecore_X_Window event_win;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Show_Request
{
   Ecore_X_Window win;
   Ecore_X_Window parent;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Reparent
{
   Ecore_X_Window win;
   Ecore_X_Window event_win;
   Ecore_X_Window parent;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Configure
{
   Ecore_X_Window win;
   Ecore_X_Window event_win;
   Ecore_X_Window abovewin;
   int            x, y, w, h;
   int            border;
   Eina_Bool      override : 1;
   Eina_Bool      from_wm : 1;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Configure_Request
{
   Ecore_X_Window            win;
   Ecore_X_Window            parent_win;
   Ecore_X_Window            abovewin;
   int                       x, y, w, h;
   int                       border;
   Ecore_X_Window_Stack_Mode detail;
   unsigned long             value_mask;
   Ecore_X_Time              time;
};

struct _Ecore_X_Event_Window_Gravity
{
   Ecore_X_Window win;
   Ecore_X_Window event_win;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Resize_Request
{
   Ecore_X_Window win;
   int            w, h;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Stack
{
   Ecore_X_Window            win;
   Ecore_X_Window            event_win;
   Ecore_X_Window_Stack_Mode detail;
   Ecore_X_Time              time;
};

struct _Ecore_X_Event_Window_Stack_Request
{
   Ecore_X_Window            win;
   Ecore_X_Window            parent;
   Ecore_X_Window_Stack_Mode detail;
   Ecore_X_Time              time;
};

struct _Ecore_X_Event_Window_Property
{
   Ecore_X_Window win;
   Ecore_X_Atom   atom;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Colormap
{
   Ecore_X_Window   win;
   Ecore_X_Colormap cmap;
   Eina_Bool        installed : 1;
   Ecore_X_Time     time;
};

struct _Ecore_X_Event_Mapping_Change
{
   Ecore_X_Mapping_Type type;
   int                  keycode;
   int                  num;
};

struct _Ecore_X_Event_Selection_Clear
{
   Ecore_X_Window    win;
   Ecore_X_Selection selection;
   Ecore_X_Atom      atom;
   Ecore_X_Time      time;
};

struct _Ecore_X_Event_Selection_Request
{
   Ecore_X_Window owner;
   Ecore_X_Window requestor;
   Ecore_X_Time   time;
   Ecore_X_Atom   selection;
   Ecore_X_Atom   target;
   Ecore_X_Atom   property;
};

typedef enum
{
   ECORE_X_OWNER_CHANGE_REASON_NEW_OWNER,
   ECORE_X_OWNER_CHANGE_REASON_DESTROY,
   ECORE_X_OWNER_CHANGE_REASON_CLOSE
} Ecore_X_Owner_Change_Reason;

struct _Ecore_X_Event_Fixes_Selection_Notify
{
   Ecore_X_Window              win;
   Ecore_X_Window              owner;
   Ecore_X_Time                time;
   Ecore_X_Time                selection_time;
   Ecore_X_Selection           selection;
   Ecore_X_Atom                atom;
   Ecore_X_Owner_Change_Reason reason;
};

struct _Ecore_X_Event_Selection_Notify
{
   Ecore_X_Window    win;
   Ecore_X_Time      time;
   Ecore_X_Selection selection;
   Ecore_X_Atom      atom;
   char             *target;
   void             *data;
};

struct _Ecore_X_Selection_Data
{
   enum
   {
      ECORE_X_SELECTION_CONTENT_NONE,
      ECORE_X_SELECTION_CONTENT_TEXT,
      ECORE_X_SELECTION_CONTENT_FILES,
      ECORE_X_SELECTION_CONTENT_TARGETS,
      ECORE_X_SELECTION_CONTENT_CUSTOM
   } content;
   unsigned char *data;
   int            length;
   int            format;
   int            (*free)(void *data);
};

struct _Ecore_X_Selection_Data_Files
{
   Ecore_X_Selection_Data data;
   char                 **files;
   int                    num_files;
};

struct _Ecore_X_Selection_Data_Text
{
   Ecore_X_Selection_Data data;
   char                  *text;
};

struct _Ecore_X_Selection_Data_Targets
{
   Ecore_X_Selection_Data data;
   char                 **targets;
   int                    num_targets;
};

struct _Ecore_X_Event_Xdnd_Enter
{
   Ecore_X_Window win, source;

   char         **types;
   int            num_types;
};

struct _Ecore_X_Event_Xdnd_Position
{
   Ecore_X_Window win, source;
   struct
   {
      int x, y;
   } position;
   Ecore_X_Atom   action;
};

struct _Ecore_X_Xdnd_Position
{
   Ecore_X_Window win, prev;
   struct
   {
      int x, y;
   } position;
};

struct _Ecore_X_Event_Xdnd_Status
{
   Ecore_X_Window    win, target;
   Eina_Bool         will_accept : 1;
   Ecore_X_Rectangle rectangle;
   Ecore_X_Atom      action;
};

struct _Ecore_X_Event_Xdnd_Leave
{
   Ecore_X_Window win, source;
};

struct _Ecore_X_Event_Xdnd_Drop
{
   Ecore_X_Window win, source;
   Ecore_X_Atom   action;
   struct
   {
      int x, y;
   } position;
};

struct _Ecore_X_Event_Xdnd_Finished
{
   Ecore_X_Window win, target;
   Eina_Bool      completed : 1;
   Ecore_X_Atom   action;
};

struct _Ecore_X_Event_Client_Message
{
   Ecore_X_Window win;
   Ecore_X_Atom   message_type;
   int            format;
   union
   {
      char  b[20];
      short s[10];
      long  l[5];
   } data;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Window_Shape
{
   Ecore_X_Window     win;
   Ecore_X_Time       time;
   Ecore_X_Shape_Type type;
   int                x, y, w, h;
   Eina_Bool          shaped : 1;
};

struct _Ecore_X_Event_Screensaver_Notify
{
   Ecore_X_Window win;
   Eina_Bool      on : 1;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Sync_Counter
{
   Ecore_X_Time time;
};

struct _Ecore_X_Event_Sync_Alarm
{
   Ecore_X_Time       time;
   Ecore_X_Sync_Alarm alarm;
};

struct _Ecore_X_Randr_Screen_Size
{
   int width, height;
};

struct _Ecore_X_Randr_Screen_Size_MM
{
   int width, height, width_mm, height_mm;
};

struct _Ecore_X_Event_Screen_Change
{
   Ecore_X_Window                win;
   Ecore_X_Window                root;
   Ecore_X_Randr_Screen_Size_MM  size;  /* in pixel and millimeters */
   Ecore_X_Time                  time;
   Ecore_X_Time                  config_time;
   Ecore_X_Randr_Orientation     orientation;
   Ecore_X_Render_Subpixel_Order subpixel_order;
   Ecore_X_Randr_Size_ID         size_id;
};

struct _Ecore_X_Event_Randr_Crtc_Change
{
   Ecore_X_Window            win;
   Ecore_X_Randr_Crtc        crtc;
   Ecore_X_Randr_Mode        mode;
   Ecore_X_Randr_Orientation orientation;
   Eina_Rectangle            geo;
};

struct _Ecore_X_Event_Randr_Output_Change
{
   Ecore_X_Window                  win;
   Ecore_X_Randr_Output            output;
   Ecore_X_Randr_Crtc              crtc;
   Ecore_X_Randr_Mode              mode;
   Ecore_X_Randr_Orientation       orientation;
   Ecore_X_Randr_Connection_Status connection;
   Ecore_X_Render_Subpixel_Order   subpixel_order;
};

struct _Ecore_X_Event_Randr_Output_Property_Notify
{
   Ecore_X_Window                win;
   Ecore_X_Randr_Output          output;
   Ecore_X_Atom                  property;
   Ecore_X_Time                  time;
   Ecore_X_Randr_Property_Change state;
};

struct _Ecore_X_Event_Window_Delete_Request
{
   Ecore_X_Window win;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Startup_Sequence
{
   Ecore_X_Window win;
};

struct _Ecore_X_Event_Window_Move_Resize_Request
{
   Ecore_X_Window win;
   int            x, y;
   int            direction;
   int            button;
   int            source;
};

struct _Ecore_X_Event_Window_State_Request
{
   Ecore_X_Window              win;
   Ecore_X_Window_State_Action action;
   Ecore_X_Window_State        state[2];
   int                         source;
};

struct _Ecore_X_Event_Frame_Extents_Request
{
   Ecore_X_Window win;
};

struct _Ecore_X_Event_Ping
{
   Ecore_X_Window win;
   Ecore_X_Window event_win;
   Ecore_X_Time   time;
};

struct _Ecore_X_Event_Desktop_Change
{
   Ecore_X_Window win;
   unsigned int   desk;
   int            source;
};

struct _Ecore_X_Event_Generic
{
   int          extension;
   int          evtype;
   unsigned int cookie;
   void        *data;
};

EAPI extern int ECORE_X_EVENT_ANY; /**< low level event dependent on
                                        backend in use, if Xlib will be XEvent,
                                        if XCB will be xcb_generic_event_t.
                                        @warning avoid using it.
                                    */
EAPI extern int ECORE_X_EVENT_MOUSE_IN;
EAPI extern int ECORE_X_EVENT_MOUSE_OUT;
EAPI extern int ECORE_X_EVENT_WINDOW_FOCUS_IN;
EAPI extern int ECORE_X_EVENT_WINDOW_FOCUS_OUT;
EAPI extern int ECORE_X_EVENT_WINDOW_KEYMAP;
EAPI extern int ECORE_X_EVENT_WINDOW_DAMAGE;
EAPI extern int ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE;
EAPI extern int ECORE_X_EVENT_WINDOW_CREATE;
EAPI extern int ECORE_X_EVENT_WINDOW_DESTROY;
EAPI extern int ECORE_X_EVENT_WINDOW_HIDE;
EAPI extern int ECORE_X_EVENT_WINDOW_SHOW;
EAPI extern int ECORE_X_EVENT_WINDOW_SHOW_REQUEST;
EAPI extern int ECORE_X_EVENT_WINDOW_REPARENT;
EAPI extern int ECORE_X_EVENT_WINDOW_CONFIGURE;
EAPI extern int ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST;
EAPI extern int ECORE_X_EVENT_WINDOW_GRAVITY;
EAPI extern int ECORE_X_EVENT_WINDOW_RESIZE_REQUEST;
EAPI extern int ECORE_X_EVENT_WINDOW_STACK;
EAPI extern int ECORE_X_EVENT_WINDOW_STACK_REQUEST;
EAPI extern int ECORE_X_EVENT_WINDOW_PROPERTY;
EAPI extern int ECORE_X_EVENT_WINDOW_COLORMAP;
EAPI extern int ECORE_X_EVENT_WINDOW_MAPPING;
EAPI extern int ECORE_X_EVENT_MAPPING_CHANGE;
EAPI extern int ECORE_X_EVENT_SELECTION_CLEAR;
EAPI extern int ECORE_X_EVENT_SELECTION_REQUEST;
EAPI extern int ECORE_X_EVENT_SELECTION_NOTIFY;
EAPI extern int ECORE_X_EVENT_FIXES_SELECTION_NOTIFY;
EAPI extern int ECORE_X_EVENT_CLIENT_MESSAGE;
EAPI extern int ECORE_X_EVENT_WINDOW_SHAPE;
EAPI extern int ECORE_X_EVENT_SCREENSAVER_NOTIFY;
EAPI extern int ECORE_X_EVENT_SYNC_COUNTER;
EAPI extern int ECORE_X_EVENT_SYNC_ALARM;
EAPI extern int ECORE_X_EVENT_SCREEN_CHANGE;
EAPI extern int ECORE_X_EVENT_RANDR_CRTC_CHANGE;
EAPI extern int ECORE_X_EVENT_RANDR_OUTPUT_CHANGE;
EAPI extern int ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY;
EAPI extern int ECORE_X_EVENT_DAMAGE_NOTIFY;

EAPI extern int ECORE_X_EVENT_WINDOW_DELETE_REQUEST;

EAPI extern int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST;
EAPI extern int ECORE_X_EVENT_WINDOW_STATE_REQUEST;
EAPI extern int ECORE_X_EVENT_FRAME_EXTENTS_REQUEST;
EAPI extern int ECORE_X_EVENT_PING;
EAPI extern int ECORE_X_EVENT_DESKTOP_CHANGE;

EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_NEW;
EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE;

EAPI extern int ECORE_X_EVENT_GENERIC;

EAPI extern int ECORE_X_EVENT_XDND_ENTER;
EAPI extern int ECORE_X_EVENT_XDND_POSITION;
EAPI extern int ECORE_X_EVENT_XDND_STATUS;
EAPI extern int ECORE_X_EVENT_XDND_LEAVE;
EAPI extern int ECORE_X_EVENT_XDND_DROP;
EAPI extern int ECORE_X_EVENT_XDND_FINISHED;

EAPI extern int ECORE_X_LOCK_SCROLL;
EAPI extern int ECORE_X_LOCK_NUM;
EAPI extern int ECORE_X_LOCK_CAPS;
EAPI extern int ECORE_X_LOCK_SHIFT;

typedef enum _Ecore_X_WM_Protocol
{
   /* If enabled the window manager will be asked to send a
    * delete message instead of just closing (destroying) the window. */
     ECORE_X_WM_PROTOCOL_DELETE_REQUEST,

     /* If enabled the window manager will be told that the window
      * explicitly sets input focus. */
     ECORE_X_WM_PROTOCOL_TAKE_FOCUS,

     /* If enabled the window manager can ping the window to check
      * if it is alive. */
     ECORE_X_NET_WM_PROTOCOL_PING,

     /* If enabled the window manager can sync updating with the
      * window (?) */
     ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST,

     /* Number of defined items */
     ECORE_X_WM_PROTOCOL_NUM
} Ecore_X_WM_Protocol;

typedef enum _Ecore_X_Window_Input_Mode
{
   /* The window can never be focused */
    ECORE_X_WINDOW_INPUT_MODE_NONE,

    /* The window can be focused by the WM but doesn't focus itself */
    ECORE_X_WINDOW_INPUT_MODE_PASSIVE,

    /* The window sets the focus itself if one of its sub-windows
     * already is focused */
    ECORE_X_WINDOW_INPUT_MODE_ACTIVE_LOCAL,

    /* The window sets the focus itself even if another window
     * is currently focused */
    ECORE_X_WINDOW_INPUT_MODE_ACTIVE_GLOBAL
} Ecore_X_Window_Input_Mode;

typedef enum _Ecore_X_Window_State_Hint
{
   /** Do not provide any state hint to the window manager */
    ECORE_X_WINDOW_STATE_HINT_NONE = -1,

    /** The window wants to remain hidden and NOT iconified */
    ECORE_X_WINDOW_STATE_HINT_WITHDRAWN,

    /** The window wants to be mapped normally */
    ECORE_X_WINDOW_STATE_HINT_NORMAL,

    /** The window wants to start in an iconified state */
    ECORE_X_WINDOW_STATE_HINT_ICONIC
} Ecore_X_Window_State_Hint;

typedef enum _Ecore_X_Window_Type
{
   ECORE_X_WINDOW_TYPE_UNKNOWN = 0,
   ECORE_X_WINDOW_TYPE_DESKTOP,
   ECORE_X_WINDOW_TYPE_DOCK,
   ECORE_X_WINDOW_TYPE_TOOLBAR,
   ECORE_X_WINDOW_TYPE_MENU,
   ECORE_X_WINDOW_TYPE_UTILITY,
   ECORE_X_WINDOW_TYPE_SPLASH,
   ECORE_X_WINDOW_TYPE_DIALOG,
   ECORE_X_WINDOW_TYPE_NORMAL,
   ECORE_X_WINDOW_TYPE_DROPDOWN_MENU,
   ECORE_X_WINDOW_TYPE_POPUP_MENU,
   ECORE_X_WINDOW_TYPE_TOOLTIP,
   ECORE_X_WINDOW_TYPE_NOTIFICATION,
   ECORE_X_WINDOW_TYPE_COMBO,
   ECORE_X_WINDOW_TYPE_DND
} Ecore_X_Window_Type;

typedef enum _Ecore_X_Action
{
   ECORE_X_ACTION_MOVE,
   ECORE_X_ACTION_RESIZE,
   ECORE_X_ACTION_MINIMIZE,
   ECORE_X_ACTION_SHADE,
   ECORE_X_ACTION_STICK,
   ECORE_X_ACTION_MAXIMIZE_HORZ,
   ECORE_X_ACTION_MAXIMIZE_VERT,
   ECORE_X_ACTION_FULLSCREEN,
   ECORE_X_ACTION_CHANGE_DESKTOP,
   ECORE_X_ACTION_CLOSE,
   ECORE_X_ACTION_ABOVE,
   ECORE_X_ACTION_BELOW
} Ecore_X_Action;

typedef enum _Ecore_X_Window_Configure_Mask
{
   ECORE_X_WINDOW_CONFIGURE_MASK_X = (1 << 0),
   ECORE_X_WINDOW_CONFIGURE_MASK_Y = (1 << 1),
   ECORE_X_WINDOW_CONFIGURE_MASK_W = (1 << 2),
   ECORE_X_WINDOW_CONFIGURE_MASK_H = (1 << 3),
   ECORE_X_WINDOW_CONFIGURE_MASK_BORDER_WIDTH = (1 << 4),
   ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING = (1 << 5),
   ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE = (1 << 6)
} Ecore_X_Window_Configure_Mask;

typedef enum _Ecore_X_Virtual_Keyboard_State
{
   ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN = 0,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_ON,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_IP,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_URL,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD,
   ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME
} Ecore_X_Virtual_Keyboard_State;

typedef enum _Ecore_X_Illume_Mode
{
   ECORE_X_ILLUME_MODE_UNKNOWN = 0,
   ECORE_X_ILLUME_MODE_SINGLE,
   ECORE_X_ILLUME_MODE_DUAL_TOP,
   ECORE_X_ILLUME_MODE_DUAL_LEFT
} Ecore_X_Illume_Mode;

typedef enum _Ecore_X_Illume_Quickpanel_State
{
   ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN = 0,
   ECORE_X_ILLUME_QUICKPANEL_STATE_OFF,
   ECORE_X_ILLUME_QUICKPANEL_STATE_ON
} Ecore_X_Illume_Quickpanel_State;

/* Window layer constants */
#define ECORE_X_WINDOW_LAYER_BELOW  2
#define ECORE_X_WINDOW_LAYER_NORMAL 4
#define ECORE_X_WINDOW_LAYER_ABOVE  6

/* Property list operations */
#define ECORE_X_PROP_LIST_REMOVE    0
#define ECORE_X_PROP_LIST_ADD       1
#define ECORE_X_PROP_LIST_TOGGLE    2

EAPI int
 ecore_x_init(const char *name);
EAPI int
 ecore_x_shutdown(void);
EAPI int
 ecore_x_disconnect(void);
EAPI Ecore_X_Display *
 ecore_x_display_get(void);
EAPI Ecore_X_Connection *
 ecore_x_connection_get(void);
EAPI int
 ecore_x_fd_get(void);
EAPI Ecore_X_Screen *
 ecore_x_default_screen_get(void);
EAPI void
 ecore_x_screen_size_get(const Ecore_X_Screen *screen,
                        int *w,
                        int *h);
EAPI int
 ecore_x_screen_count_get(void);
EAPI int
 ecore_x_screen_index_get(const Ecore_X_Screen *screen);
EAPI Ecore_X_Screen *
 ecore_x_screen_get(int index);

EAPI void
 ecore_x_double_click_time_set(double t);
EAPI double
 ecore_x_double_click_time_get(void);
EAPI void
 ecore_x_flush(void);
EAPI void
 ecore_x_sync(void);
EAPI void
 ecore_x_killall(Ecore_X_Window root);
EAPI void
 ecore_x_kill(Ecore_X_Window win);
EAPI int
 ecore_x_dpi_get(void);
EAPI Eina_Bool
 ecore_x_bell(int percent);
EAPI unsigned int
 ecore_x_visual_id_get(Ecore_X_Visual visual);

EAPI Ecore_X_Visual
ecore_x_default_visual_get(Ecore_X_Display *disp,
                           Ecore_X_Screen *screen);
EAPI Ecore_X_Colormap
ecore_x_default_colormap_get(Ecore_X_Display *disp,
                             Ecore_X_Screen *screen);
EAPI int
ecore_x_default_depth_get(Ecore_X_Display *disp,
                          Ecore_X_Screen *screen);

EAPI Ecore_X_Time
ecore_x_current_time_get(void);

EAPI void
ecore_x_error_handler_set(void (*func)(void *data),
                          const void *data);
EAPI void
ecore_x_io_error_handler_set(void (*func)(void *data),
                             const void *data);
EAPI int
 ecore_x_error_request_get(void);
EAPI int
 ecore_x_error_code_get(void);

EAPI void
ecore_x_event_mask_set(Ecore_X_Window w,
                       Ecore_X_Event_Mask mask);
EAPI void
ecore_x_event_mask_unset(Ecore_X_Window w,
                         Ecore_X_Event_Mask mask);

EAPI Eina_Bool
ecore_x_selection_notify_send(Ecore_X_Window requestor,
                              Ecore_X_Atom selection,
                              Ecore_X_Atom target,
                              Ecore_X_Atom property,
                              Ecore_X_Time time);
EAPI Eina_Bool
ecore_x_selection_primary_set(Ecore_X_Window w,
                              const void *data,
                              int size);
EAPI Eina_Bool
 ecore_x_selection_primary_clear(void);
EAPI Eina_Bool
 ecore_x_selection_secondary_set(Ecore_X_Window w,
                                const void *data,
                                int size);
EAPI Eina_Bool
 ecore_x_selection_secondary_clear(void);
EAPI Eina_Bool
 ecore_x_selection_xdnd_set(Ecore_X_Window w,
                           const void *data,
                           int size);
EAPI Eina_Bool
 ecore_x_selection_xdnd_clear(void);
EAPI Eina_Bool
 ecore_x_selection_clipboard_set(Ecore_X_Window w,
                                const void *data,
                                int size);
EAPI Eina_Bool
 ecore_x_selection_clipboard_clear(void);
EAPI void
 ecore_x_selection_primary_request(Ecore_X_Window w,
                                  const char *target);
EAPI void
ecore_x_selection_secondary_request(Ecore_X_Window w,
                                    const char *target);
EAPI void
ecore_x_selection_xdnd_request(Ecore_X_Window w,
                               const char *target);
EAPI void
ecore_x_selection_clipboard_request(Ecore_X_Window w,
                                    const char *target);
EAPI Eina_Bool
ecore_x_selection_convert(Ecore_X_Atom selection,
                          Ecore_X_Atom target,
                          void **data_ret,
                          int *len,
                          Ecore_X_Atom *targprop,
                          int *targsize);
EAPI void
ecore_x_selection_converter_add(char *target,
                                Eina_Bool (*func)(char *target,
                                                  void *data,
                                                  int size,
                                                  void **data_ret,
                                                  int *size_ret,
                                                  Ecore_X_Atom *,
                                                  int *));
EAPI void
ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
                                     Eina_Bool (*func)(char *target,
                                                       void *data,
                                                       int size,
                                                       void **data_ret,
                                                       int *size_ret,
                                                       Ecore_X_Atom *tprop,
                                                       int *tsize));
EAPI void
 ecore_x_selection_converter_del(char *target);
EAPI void
 ecore_x_selection_converter_atom_del(Ecore_X_Atom target);
EAPI void
 ecore_x_selection_parser_add(const char *target,
                             void *(*func)(const char *target, void *data, int size, int format));
EAPI void
 ecore_x_selection_parser_del(const char *target);
EAPI void
 ecore_x_selection_owner_set(Ecore_X_Window win,
                            Ecore_X_Atom atom,
                            Ecore_X_Time tm);
EAPI Ecore_X_Window
ecore_x_selection_owner_get(Ecore_X_Atom atom);

EAPI void
ecore_x_dnd_aware_set(Ecore_X_Window win,
                      Eina_Bool on);
EAPI int
 ecore_x_dnd_version_get(Ecore_X_Window win);
EAPI Eina_Bool
 ecore_x_dnd_type_isset(Ecore_X_Window win,
                       const char *type);
EAPI void
ecore_x_dnd_type_set(Ecore_X_Window win,
                     const char *type,
                     Eina_Bool on);
EAPI void
ecore_x_dnd_types_set(Ecore_X_Window win,
                      const char **types,
                      unsigned int num_types);
EAPI void
ecore_x_dnd_actions_set(Ecore_X_Window win,
                        Ecore_X_Atom *actions,
                        unsigned int num_actions);
EAPI Eina_Bool
ecore_x_dnd_begin(Ecore_X_Window source,
                  unsigned char *data,
                  int size);
EAPI Eina_Bool
 ecore_x_dnd_drop(void);
EAPI void
 ecore_x_dnd_send_status(Eina_Bool will_accept,
                        Eina_Bool suppress,
                        Ecore_X_Rectangle rectangle,
                        Ecore_X_Atom action);
EAPI void
 ecore_x_dnd_send_finished(void);
EAPI void
 ecore_x_dnd_source_action_set(Ecore_X_Atom action);
EAPI Ecore_X_Atom
 ecore_x_dnd_source_action_get(void);
EAPI void
 ecore_x_dnd_callback_pos_update_set(void (*cb)(void *,
                                               Ecore_X_Xdnd_Position *data),
                                    const void *data);

EAPI Ecore_X_Window
ecore_x_window_new(Ecore_X_Window parent,
                   int x,
                   int y,
                   int w,
                   int h);
EAPI Ecore_X_Window
ecore_x_window_override_new(Ecore_X_Window parent,
                            int x,
                            int y,
                            int w,
                            int h);
EAPI int
 ecore_x_window_argb_get(Ecore_X_Window win);
EAPI Ecore_X_Window
 ecore_x_window_manager_argb_new(Ecore_X_Window parent,
                                int x,
                                int y,
                                int w,
                                int h);
EAPI Ecore_X_Window
ecore_x_window_argb_new(Ecore_X_Window parent,
                        int x,
                        int y,
                        int w,
                        int h);
EAPI Ecore_X_Window
ecore_x_window_override_argb_new(Ecore_X_Window parent,
                                 int x,
                                 int y,
                                 int w,
                                 int h);
EAPI Ecore_X_Window
ecore_x_window_input_new(Ecore_X_Window parent,
                         int x,
                         int y,
                         int w,
                         int h);
EAPI void
ecore_x_window_configure(Ecore_X_Window win,
                         Ecore_X_Window_Configure_Mask mask,
                         int x,
                         int y,
                         int w,
                         int h,
                         int border_width,
                         Ecore_X_Window sibling,
                         int stack_mode);
EAPI void
ecore_x_window_cursor_set(Ecore_X_Window win,
                          Ecore_X_Cursor c);
EAPI void
 ecore_x_window_free(Ecore_X_Window win);
EAPI void
 ecore_x_window_ignore_set(Ecore_X_Window win,
                          int ignore);
EAPI Ecore_X_Window *
ecore_x_window_ignore_list(int *num);

EAPI void
 ecore_x_window_delete_request_send(Ecore_X_Window win);
EAPI void
 ecore_x_window_show(Ecore_X_Window win);
EAPI void
 ecore_x_window_hide(Ecore_X_Window win);
EAPI void
 ecore_x_window_move(Ecore_X_Window win,
                    int x,
                    int y);
EAPI void
ecore_x_window_resize(Ecore_X_Window win,
                      int w,
                      int h);
EAPI void
ecore_x_window_move_resize(Ecore_X_Window win,
                           int x,
                           int y,
                           int w,
                           int h);
EAPI void
 ecore_x_window_focus(Ecore_X_Window win);
EAPI void
 ecore_x_window_focus_at_time(Ecore_X_Window win,
                             Ecore_X_Time t);
EAPI Ecore_X_Window
 ecore_x_window_focus_get(void);
EAPI void
 ecore_x_window_raise(Ecore_X_Window win);
EAPI void
 ecore_x_window_lower(Ecore_X_Window win);
EAPI void
 ecore_x_window_reparent(Ecore_X_Window win,
                        Ecore_X_Window new_parent,
                        int x,
                        int y);
EAPI void
ecore_x_window_size_get(Ecore_X_Window win,
                        int *w,
                        int *h);
EAPI void
ecore_x_window_geometry_get(Ecore_X_Window win,
                            int *x,
                            int *y,
                            int *w,
                            int *h);
EAPI int
 ecore_x_window_border_width_get(Ecore_X_Window win);
EAPI void
 ecore_x_window_border_width_set(Ecore_X_Window win,
                                int width);
EAPI int
 ecore_x_window_depth_get(Ecore_X_Window win);
EAPI void
 ecore_x_window_cursor_show(Ecore_X_Window win,
                           Eina_Bool show);
EAPI void
 ecore_x_window_defaults_set(Ecore_X_Window win);
EAPI int
 ecore_x_window_visible_get(Ecore_X_Window win);
EAPI Ecore_X_Window
 ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
                                               int x,
                                               int y,
                                               Ecore_X_Window *skip,
                                               int skip_num);
EAPI Ecore_X_Window
ecore_x_window_shadow_parent_get(Ecore_X_Window root,
                                 Ecore_X_Window win);
EAPI void
 ecore_x_window_shadow_tree_flush(void);
EAPI Ecore_X_Window
 ecore_x_window_root_get(Ecore_X_Window win);
EAPI Ecore_X_Window
 ecore_x_window_at_xy_get(int x,
                         int y);
EAPI Ecore_X_Window
ecore_x_window_at_xy_with_skip_get(int x,
                                   int y,
                                   Ecore_X_Window *skip,
                                   int skip_num);
EAPI Ecore_X_Window
ecore_x_window_at_xy_begin_get(Ecore_X_Window begin,
                               int x,
                               int y);
EAPI Ecore_X_Window
ecore_x_window_parent_get(Ecore_X_Window win);

EAPI void
ecore_x_window_background_color_set(Ecore_X_Window win,
                                    unsigned short r,
                                    unsigned short g,
                                    unsigned short b);
EAPI void
ecore_x_window_gravity_set(Ecore_X_Window win,
                           Ecore_X_Gravity grav);
EAPI void
ecore_x_window_pixel_gravity_set(Ecore_X_Window win,
                                 Ecore_X_Gravity grav);
EAPI void
ecore_x_window_pixmap_set(Ecore_X_Window win,
                          Ecore_X_Pixmap pmap);
EAPI void
ecore_x_window_area_clear(Ecore_X_Window win,
                          int x,
                          int y,
                          int w,
                          int h);
EAPI void
ecore_x_window_area_expose(Ecore_X_Window win,
                           int x,
                           int y,
                           int w,
                           int h);
EAPI void
ecore_x_window_override_set(Ecore_X_Window win,
                            Eina_Bool override);

EAPI void
ecore_x_window_prop_card32_set(Ecore_X_Window win,
                               Ecore_X_Atom atom,
                               unsigned int *val,
                               unsigned int num);
EAPI int
ecore_x_window_prop_card32_get(Ecore_X_Window win,
                               Ecore_X_Atom atom,
                               unsigned int *val,
                               unsigned int len);
EAPI int
ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
                                    Ecore_X_Atom atom,
                                    unsigned int **plst);

EAPI void
ecore_x_window_prop_xid_set(Ecore_X_Window win,
                            Ecore_X_Atom atom,
                            Ecore_X_Atom type,
                            Ecore_X_ID *lst,
                            unsigned int num);
EAPI int
ecore_x_window_prop_xid_get(Ecore_X_Window win,
                            Ecore_X_Atom atom,
                            Ecore_X_Atom type,
                            Ecore_X_ID *lst,
                            unsigned int len);
EAPI int
ecore_x_window_prop_xid_list_get(Ecore_X_Window win,
                                 Ecore_X_Atom atom,
                                 Ecore_X_Atom type,
                                 Ecore_X_ID **plst);
EAPI void
ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
                                    Ecore_X_Atom atom,
                                    Ecore_X_Atom type,
                                    Ecore_X_ID item,
                                    int op);
EAPI void
ecore_x_window_prop_atom_set(Ecore_X_Window win,
                             Ecore_X_Atom atom,
                             Ecore_X_Atom *val,
                             unsigned int num);
EAPI int
ecore_x_window_prop_atom_get(Ecore_X_Window win,
                             Ecore_X_Atom atom,
                             Ecore_X_Atom *val,
                             unsigned int len);
EAPI int
ecore_x_window_prop_atom_list_get(Ecore_X_Window win,
                                  Ecore_X_Atom atom,
                                  Ecore_X_Atom **plst);
EAPI void
ecore_x_window_prop_atom_list_change(Ecore_X_Window win,
                                     Ecore_X_Atom atom,
                                     Ecore_X_Atom item,
                                     int op);
EAPI void
ecore_x_window_prop_window_set(Ecore_X_Window win,
                               Ecore_X_Atom atom,
                               Ecore_X_Window *val,
                               unsigned int num);
EAPI int
ecore_x_window_prop_window_get(Ecore_X_Window win,
                               Ecore_X_Atom atom,
                               Ecore_X_Window *val,
                               unsigned int len);
EAPI int
ecore_x_window_prop_window_list_get(Ecore_X_Window win,
                                    Ecore_X_Atom atom,
                                    Ecore_X_Window **plst);

EAPI Ecore_X_Atom
 ecore_x_window_prop_any_type(void);
EAPI void
 ecore_x_window_prop_property_set(Ecore_X_Window win,
                                 Ecore_X_Atom type,
                                 Ecore_X_Atom format,
                                 int size,
                                 void *data,
                                 int number);
EAPI int
ecore_x_window_prop_property_get(Ecore_X_Window win,
                                 Ecore_X_Atom property,
                                 Ecore_X_Atom type,
                                 int size,
                                 unsigned char **data,
                                 int *num);
EAPI void
ecore_x_window_prop_property_del(Ecore_X_Window win,
                                 Ecore_X_Atom property);
EAPI Ecore_X_Atom *
ecore_x_window_prop_list(Ecore_X_Window win,
                         int *num_ret);
EAPI void
ecore_x_window_prop_string_set(Ecore_X_Window win,
                               Ecore_X_Atom type,
                               const char *str);
EAPI char *
ecore_x_window_prop_string_get(Ecore_X_Window win,
                               Ecore_X_Atom type);
EAPI Eina_Bool
ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
                                   Ecore_X_WM_Protocol protocol);
EAPI Ecore_X_WM_Protocol *
ecore_x_window_prop_protocol_list_get(Ecore_X_Window win,
                                      int *num_ret);

EAPI void
ecore_x_window_shape_mask_set(Ecore_X_Window win,
                              Ecore_X_Pixmap mask);
EAPI void
ecore_x_window_shape_window_set(Ecore_X_Window win,
                                Ecore_X_Window shape_win);
EAPI void
ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
                                   Ecore_X_Window shape_win,
                                   int x,
                                   int y);
EAPI void
ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
                                   int x,
                                   int y,
                                   int w,
                                   int h);
EAPI void
ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
                                    Ecore_X_Rectangle *rects,
                                    int num);
EAPI void
ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win,
                                         int x,
                                         int y,
                                         int w,
                                         int h);
EAPI void
ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win,
                                          Ecore_X_Rectangle *rects,
                                          int num);
EAPI void
ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win,
                                         int x,
                                         int y,
                                         int w,
                                         int h);
EAPI void
ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win,
                                        int x,
                                        int y,
                                        int w,
                                        int h);
EAPI void
ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win,
                                              int x,
                                              int y,
                                              int w,
                                              int h);
EAPI void
ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win,
                                         Ecore_X_Window shape_win,
                                         int x,
                                         int y);
EAPI void
ecore_x_window_shape_input_window_set(Ecore_X_Window win,
                                      Ecore_X_Window shape_win);
EAPI void
ecore_x_window_shape_window_add(Ecore_X_Window win,
                                Ecore_X_Window shape_win);
EAPI void
ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
                                   Ecore_X_Window shape_win,
                                   int x,
                                   int y);
EAPI void
ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win,
                                         Ecore_X_Window shape_win,
                                         int x,
                                         int y);
EAPI void
ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
                                   int x,
                                   int y,
                                   int w,
                                   int h);
EAPI void
ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
                                    int x,
                                    int y,
                                    int w,
                                    int h);
EAPI void
ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win,
                                          int x,
                                          int y,
                                          int w,
                                          int h);
EAPI void
ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
                                    Ecore_X_Rectangle *rects,
                                    int num);
EAPI void
ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win,
                                          Ecore_X_Rectangle *rects,
                                          int num);
EAPI Ecore_X_Rectangle *
ecore_x_window_shape_rectangles_get(Ecore_X_Window win,
                                    int *num_ret);
EAPI Ecore_X_Rectangle *
ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win,
                                          int *num_ret);
EAPI void
ecore_x_window_shape_events_select(Ecore_X_Window win,
                                   Eina_Bool on);
EAPI void
ecore_x_window_shape_input_mask_set(Ecore_X_Window win,
                                    Ecore_X_Pixmap mask);

EAPI Ecore_X_Pixmap
ecore_x_pixmap_new(Ecore_X_Window win,
                   int w,
                   int h,
                   int dep);
EAPI void
 ecore_x_pixmap_free(Ecore_X_Pixmap pmap);
EAPI void
 ecore_x_pixmap_paste(Ecore_X_Pixmap pmap,
                     Ecore_X_Drawable dest,
                     Ecore_X_GC gc,
                     int sx,
                     int sy,
                     int w,
                     int h,
                     int dx,
                     int dy);
EAPI void
ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap,
                            int *x,
                            int *y,
                            int *w,
                            int *h);
EAPI int
ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap);

EAPI Ecore_X_GC
ecore_x_gc_new(Ecore_X_Drawable draw,
               Ecore_X_GC_Value_Mask value_mask,
               const unsigned int *value_list);
EAPI void
 ecore_x_gc_free(Ecore_X_GC gc);
EAPI void
 ecore_x_gc_foreground_set(Ecore_X_GC gc,
                          unsigned long foreground);
EAPI void
ecore_x_gc_background_set(Ecore_X_GC gc,
                          unsigned long background);

EAPI Eina_Bool
ecore_x_client_message32_send(Ecore_X_Window win,
                              Ecore_X_Atom type,
                              Ecore_X_Event_Mask mask,
                              long d0,
                              long d1,
                              long d2,
                              long d3,
                              long d4);
EAPI Eina_Bool
ecore_x_client_message8_send(Ecore_X_Window win,
                             Ecore_X_Atom type,
                             const void *data,
                             int len);
EAPI Eina_Bool
ecore_x_mouse_move_send(Ecore_X_Window win,
                        int x,
                        int y);
EAPI Eina_Bool
ecore_x_mouse_down_send(Ecore_X_Window win,
                        int x,
                        int y,
                        int b);
EAPI Eina_Bool
ecore_x_mouse_up_send(Ecore_X_Window win,
                      int x,
                      int y,
                      int b);

EAPI void
ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
                              int *x,
                              int *y,
                              int *w,
                              int *h);
EAPI int
 ecore_x_drawable_border_width_get(Ecore_X_Drawable d);
EAPI int
 ecore_x_drawable_depth_get(Ecore_X_Drawable d);
EAPI void
 ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d,
                                Ecore_X_GC gc,
                                int x,
                                int y,
                                int width,
                                int height);

EAPI Eina_Bool
 ecore_x_cursor_color_supported_get(void);
EAPI Ecore_X_Cursor
 ecore_x_cursor_new(Ecore_X_Window win,
                   int *pixels,
                   int w,
                   int h,
                   int hot_x,
                   int hot_y);
EAPI void
 ecore_x_cursor_free(Ecore_X_Cursor c);
EAPI Ecore_X_Cursor
 ecore_x_cursor_shape_get(int shape);
EAPI void
 ecore_x_cursor_size_set(int size);
EAPI int
 ecore_x_cursor_size_get(void);

/* FIXME: these funcs need categorising */
EAPI Ecore_X_Window *
 ecore_x_window_root_list(int *num_ret);
EAPI Ecore_X_Window
 ecore_x_window_root_first_get(void);
EAPI Eina_Bool
 ecore_x_window_manage(Ecore_X_Window win);
EAPI void
 ecore_x_window_container_manage(Ecore_X_Window win);
EAPI void
 ecore_x_window_client_manage(Ecore_X_Window win);
EAPI void
 ecore_x_window_sniff(Ecore_X_Window win);
EAPI void
 ecore_x_window_client_sniff(Ecore_X_Window win);

EAPI Ecore_X_Atom
 ecore_x_atom_get(const char *name);
EAPI void
 ecore_x_atoms_get(const char **names,
                  int num,
                  Ecore_X_Atom *atoms);
EAPI char *
ecore_x_atom_name_get(Ecore_X_Atom atom);

EAPI void
 ecore_x_icccm_init(void);
EAPI void
 ecore_x_icccm_state_set(Ecore_X_Window win,
                        Ecore_X_Window_State_Hint state);
EAPI Ecore_X_Window_State_Hint
 ecore_x_icccm_state_get(Ecore_X_Window win);
EAPI void
 ecore_x_icccm_delete_window_send(Ecore_X_Window win,
                                 Ecore_X_Time t);
EAPI void
ecore_x_icccm_take_focus_send(Ecore_X_Window win,
                              Ecore_X_Time t);
EAPI void
ecore_x_icccm_save_yourself_send(Ecore_X_Window win,
                                 Ecore_X_Time t);
EAPI void
ecore_x_icccm_move_resize_send(Ecore_X_Window win,
                               int x,
                               int y,
                               int w,
                               int h);
EAPI void
ecore_x_icccm_hints_set(Ecore_X_Window win,
                        Eina_Bool accepts_focus,
                        Ecore_X_Window_State_Hint initial_state,
                        Ecore_X_Pixmap icon_pixmap,
                        Ecore_X_Pixmap icon_mask,
                        Ecore_X_Window icon_window,
                        Ecore_X_Window window_group,
                        Eina_Bool is_urgent);
EAPI Eina_Bool
ecore_x_icccm_hints_get(Ecore_X_Window win,
                        Eina_Bool *accepts_focus,
                        Ecore_X_Window_State_Hint *initial_state,
                        Ecore_X_Pixmap *icon_pixmap,
                        Ecore_X_Pixmap *icon_mask,
                        Ecore_X_Window *icon_window,
                        Ecore_X_Window *window_group,
                        Eina_Bool *is_urgent);
EAPI void
ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
                                 Eina_Bool request_pos,
                                 Ecore_X_Gravity gravity,
                                 int min_w,
                                 int min_h,
                                 int max_w,
                                 int max_h,
                                 int base_w,
                                 int base_h,
                                 int step_x,
                                 int step_y,
                                 double min_aspect,
                                 double max_aspect);
EAPI Eina_Bool
ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
                                 Eina_Bool *request_pos,
                                 Ecore_X_Gravity *gravity,
                                 int *min_w,
                                 int *min_h,
                                 int *max_w,
                                 int *max_h,
                                 int *base_w,
                                 int *base_h,
                                 int *step_x,
                                 int *step_y,
                                 double *min_aspect,
                                 double *max_aspect);
EAPI void
ecore_x_icccm_title_set(Ecore_X_Window win,
                        const char *t);
EAPI char *
 ecore_x_icccm_title_get(Ecore_X_Window win);
EAPI void
 ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
                                 Ecore_X_Atom *protos,
                                 int num);
EAPI void
ecore_x_icccm_protocol_set(Ecore_X_Window win,
                           Ecore_X_WM_Protocol protocol,
                           Eina_Bool on);
EAPI Eina_Bool
ecore_x_icccm_protocol_isset(Ecore_X_Window win,
                             Ecore_X_WM_Protocol protocol);
EAPI void
ecore_x_icccm_name_class_set(Ecore_X_Window win,
                             const char *n,
                             const char *c);
EAPI void
ecore_x_icccm_name_class_get(Ecore_X_Window win,
                             char **n,
                             char **c);
EAPI char *
 ecore_x_icccm_client_machine_get(Ecore_X_Window win);
EAPI void
 ecore_x_icccm_command_set(Ecore_X_Window win,
                          int argc,
                          char **argv);
EAPI void
ecore_x_icccm_command_get(Ecore_X_Window win,
                          int *argc,
                          char ***argv);
EAPI char *
 ecore_x_icccm_icon_name_get(Ecore_X_Window win);
EAPI void
 ecore_x_icccm_icon_name_set(Ecore_X_Window win,
                            const char *t);
EAPI void
ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
                                  Ecore_X_Window subwin);
EAPI void
ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
                                    Ecore_X_Window subwin);
EAPI void
ecore_x_icccm_transient_for_set(Ecore_X_Window win,
                                Ecore_X_Window forwin);
EAPI void
 ecore_x_icccm_transient_for_unset(Ecore_X_Window win);
EAPI Ecore_X_Window
 ecore_x_icccm_transient_for_get(Ecore_X_Window win);
EAPI void
 ecore_x_icccm_window_role_set(Ecore_X_Window win,
                              const char *role);
EAPI char *
 ecore_x_icccm_window_role_get(Ecore_X_Window win);
EAPI void
 ecore_x_icccm_client_leader_set(Ecore_X_Window win,
                                Ecore_X_Window l);
EAPI Ecore_X_Window
 ecore_x_icccm_client_leader_get(Ecore_X_Window win);
EAPI void
 ecore_x_icccm_iconic_request_send(Ecore_X_Window win,
                                  Ecore_X_Window root);

typedef enum _Ecore_X_MWM_Hint_Func
{
   ECORE_X_MWM_HINT_FUNC_ALL = (1 << 0),
   ECORE_X_MWM_HINT_FUNC_RESIZE = (1 << 1),
   ECORE_X_MWM_HINT_FUNC_MOVE = (1 << 2),
   ECORE_X_MWM_HINT_FUNC_MINIMIZE = (1 << 3),
   ECORE_X_MWM_HINT_FUNC_MAXIMIZE = (1 << 4),
   ECORE_X_MWM_HINT_FUNC_CLOSE = (1 << 5)
} Ecore_X_MWM_Hint_Func;

typedef enum _Ecore_X_MWM_Hint_Decor
{
   ECORE_X_MWM_HINT_DECOR_ALL = (1 << 0),
   ECORE_X_MWM_HINT_DECOR_BORDER = (1 << 1),
   ECORE_X_MWM_HINT_DECOR_RESIZEH = (1 << 2),
   ECORE_X_MWM_HINT_DECOR_TITLE = (1 << 3),
   ECORE_X_MWM_HINT_DECOR_MENU = (1 << 4),
   ECORE_X_MWM_HINT_DECOR_MINIMIZE = (1 << 5),
   ECORE_X_MWM_HINT_DECOR_MAXIMIZE = (1 << 6)
} Ecore_X_MWM_Hint_Decor;

typedef enum _Ecore_X_MWM_Hint_Input
{
   ECORE_X_MWM_HINT_INPUT_MODELESS = 0,
   ECORE_X_MWM_HINT_INPUT_PRIMARY_APPLICATION_MODAL = 1,
   ECORE_X_MWM_HINT_INPUT_SYSTEM_MODAL = 2,
   ECORE_X_MWM_HINT_INPUT_FULL_APPLICATION_MODAL = 3
} Ecore_X_MWM_Hint_Input;

EAPI Eina_Bool
ecore_x_mwm_hints_get(Ecore_X_Window win,
                      Ecore_X_MWM_Hint_Func *fhint,
                      Ecore_X_MWM_Hint_Decor *dhint,
                      Ecore_X_MWM_Hint_Input *ihint);
EAPI void
ecore_x_mwm_borderless_set(Ecore_X_Window win,
                           Eina_Bool borderless);

/* netwm */
EAPI void
 ecore_x_netwm_init(void);
EAPI void
 ecore_x_netwm_shutdown(void);
EAPI void
 ecore_x_netwm_wm_identify(Ecore_X_Window root,
                          Ecore_X_Window check,
                          const char *wm_name);
EAPI void
ecore_x_netwm_supported_set(Ecore_X_Window root,
                            Ecore_X_Atom *supported,
                            int num);
EAPI Eina_Bool
ecore_x_netwm_supported_get(Ecore_X_Window root,
                            Ecore_X_Atom **supported,
                            int *num);
EAPI void
ecore_x_netwm_desk_count_set(Ecore_X_Window root,
                             unsigned int n_desks);
EAPI void
ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
                             Ecore_X_Window *vroots,
                             unsigned int n_desks);
EAPI void
ecore_x_netwm_desk_names_set(Ecore_X_Window root,
                             const char **names,
                             unsigned int n_desks);
EAPI void
ecore_x_netwm_desk_size_set(Ecore_X_Window root,
                            unsigned int width,
                            unsigned int height);
EAPI void
ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
                                 unsigned int *areas,
                                 unsigned int n_desks);
EAPI void
ecore_x_netwm_desk_current_set(Ecore_X_Window root,
                               unsigned int desk);
EAPI void
ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
                                 unsigned int *origins,
                                 unsigned int n_desks);
EAPI void
ecore_x_netwm_desk_layout_set(Ecore_X_Window root,
                              int orientation,
                              int columns,
                              int rows,
                              int starting_corner);
EAPI void
ecore_x_netwm_showing_desktop_set(Ecore_X_Window root,
                                  Eina_Bool on);
EAPI void
ecore_x_netwm_client_list_set(Ecore_X_Window root,
                              Ecore_X_Window *p_clients,
                              unsigned int n_clients);
EAPI void
ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
                                       Ecore_X_Window *p_clients,
                                       unsigned int n_clients);
EAPI void
ecore_x_netwm_client_active_set(Ecore_X_Window root,
                                Ecore_X_Window win);
EAPI void
ecore_x_netwm_client_active_request(Ecore_X_Window root,
                                    Ecore_X_Window win,
                                    int type,
                                    Ecore_X_Window current_win);
EAPI void
ecore_x_netwm_name_set(Ecore_X_Window win,
                       const char *name);
EAPI int
ecore_x_netwm_name_get(Ecore_X_Window win,
                       char **name);
EAPI void
ecore_x_netwm_startup_id_set(Ecore_X_Window win,
                             const char *id);
EAPI int
ecore_x_netwm_startup_id_get(Ecore_X_Window win,
                             char **id);
EAPI void
ecore_x_netwm_visible_name_set(Ecore_X_Window win,
                               const char *name);
EAPI int
ecore_x_netwm_visible_name_get(Ecore_X_Window win,
                               char **name);
EAPI void
ecore_x_netwm_icon_name_set(Ecore_X_Window win,
                            const char *name);
EAPI int
ecore_x_netwm_icon_name_get(Ecore_X_Window win,
                            char **name);
EAPI void
ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win,
                                    const char *name);
EAPI int
ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win,
                                    char **name);
EAPI void
ecore_x_netwm_desktop_set(Ecore_X_Window win,
                          unsigned int desk);
EAPI Eina_Bool
ecore_x_netwm_desktop_get(Ecore_X_Window win,
                          unsigned int *desk);
EAPI void
ecore_x_netwm_strut_set(Ecore_X_Window win,
                        int left,
                        int right,
                        int top,
                        int bottom);
EAPI Eina_Bool
ecore_x_netwm_strut_get(Ecore_X_Window win,
                        int *left,
                        int *right,
                        int *top,
                        int *bottom);
EAPI void
ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
                                int left,
                                int right,
                                int top,
                                int bottom,
                                int left_start_y,
                                int left_end_y,
                                int right_start_y,
                                int right_end_y,
                                int top_start_x,
                                int top_end_x,
                                int bottom_start_x,
                                int bottom_end_x);
EAPI Eina_Bool
ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
                                int *left,
                                int *right,
                                int *top,
                                int *bottom,
                                int *left_start_y,
                                int *left_end_y,
                                int *right_start_y,
                                int *right_end_y,
                                int *top_start_x,
                                int *top_end_x,
                                int *bottom_start_x,
                                int *bottom_end_x);

EAPI Eina_Bool
ecore_x_netwm_icons_get(Ecore_X_Window win,
                        Ecore_X_Icon **icon,
                        int *num);
EAPI void
ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
                                int x,
                                int y,
                                int width,
                                int height);
EAPI Eina_Bool
ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
                                int *x,
                                int *y,
                                int *width,
                                int *height);
EAPI void
ecore_x_netwm_pid_set(Ecore_X_Window win,
                      int pid);
EAPI Eina_Bool
ecore_x_netwm_pid_get(Ecore_X_Window win,
                      int *pid);
EAPI void
 ecore_x_netwm_handled_icons_set(Ecore_X_Window win);
EAPI Eina_Bool
 ecore_x_netwm_handled_icons_get(Ecore_X_Window win);
EAPI void
 ecore_x_netwm_user_time_set(Ecore_X_Window win,
                            unsigned int time);
EAPI Eina_Bool
ecore_x_netwm_user_time_get(Ecore_X_Window win,
                            unsigned int *time);
EAPI void
ecore_x_netwm_window_state_set(Ecore_X_Window win,
                               Ecore_X_Window_State *state,
                               unsigned int num);
EAPI Eina_Bool
ecore_x_netwm_window_state_get(Ecore_X_Window win,
                               Ecore_X_Window_State **state,
                               unsigned int *num);
EAPI void
ecore_x_netwm_window_type_set(Ecore_X_Window win,
                              Ecore_X_Window_Type type);
EAPI Eina_Bool
ecore_x_netwm_window_type_get(Ecore_X_Window win,
                              Ecore_X_Window_Type *type);
EAPI int
ecore_x_netwm_window_types_get(Ecore_X_Window win,
                               Ecore_X_Window_Type **types);
EAPI Eina_Bool
ecore_x_netwm_allowed_action_isset(Ecore_X_Window win,
                                   Ecore_X_Action action);
EAPI void
ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
                                 Ecore_X_Action *action,
                                 unsigned int num);
EAPI Eina_Bool
ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
                                 Ecore_X_Action **action,
                                 unsigned int *num);
EAPI void
ecore_x_netwm_opacity_set(Ecore_X_Window win,
                          unsigned int opacity);
EAPI Eina_Bool
ecore_x_netwm_opacity_get(Ecore_X_Window win,
                          unsigned int *opacity);
EAPI void
ecore_x_netwm_frame_size_set(Ecore_X_Window win,
                             int fl,
                             int fr,
                             int ft,
                             int fb);
EAPI Eina_Bool
ecore_x_netwm_frame_size_get(Ecore_X_Window win,
                             int *fl,
                             int *fr,
                             int *ft,
                             int *fb);
EAPI Eina_Bool
ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
                               Ecore_X_Sync_Counter *counter);
EAPI void
 ecore_x_netwm_ping_send(Ecore_X_Window win);
EAPI void
 ecore_x_netwm_sync_request_send(Ecore_X_Window win,
                                unsigned int serial);
EAPI void
ecore_x_netwm_state_request_send(Ecore_X_Window win,
                                 Ecore_X_Window root,
                                 Ecore_X_Window_State s1,
                                 Ecore_X_Window_State s2,
                                 Eina_Bool set);
EAPI void
ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
                                   Ecore_X_Window root,
                                   unsigned int desktop);

EAPI void
 ecore_x_e_init(void);
EAPI void
 ecore_x_e_frame_size_set(Ecore_X_Window win,
                         int fl,
                         int fr,
                         int ft,
                         int fb);
EAPI void
ecore_x_e_virtual_keyboard_set(Ecore_X_Window win,
                               unsigned int is_keyboard);
EAPI Eina_Bool
 ecore_x_e_virtual_keyboard_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
                                     Ecore_X_Virtual_Keyboard_State state);
EAPI Ecore_X_Virtual_Keyboard_State
 ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
                                      Ecore_X_Virtual_Keyboard_State state);

/* Illume functions */
EAPI void
ecore_x_e_illume_zone_set(Ecore_X_Window win,
                          Ecore_X_Window zone);
EAPI Ecore_X_Window
 ecore_x_e_illume_zone_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
                               Ecore_X_Window *zones,
                               unsigned int n_zones);
EAPI void
ecore_x_e_illume_conformant_set(Ecore_X_Window win,
                                unsigned int is_conformant);
EAPI Eina_Bool
 ecore_x_e_illume_conformant_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_mode_set(Ecore_X_Window win,
                          Ecore_X_Illume_Mode mode);
EAPI Ecore_X_Illume_Mode
 ecore_x_e_illume_mode_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_mode_send(Ecore_X_Window win,
                           Ecore_X_Illume_Mode mode);
EAPI void
 ecore_x_e_illume_focus_back_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_focus_forward_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_focus_home_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_close_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_home_new_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_home_del_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_drag_set(Ecore_X_Window win,
                          unsigned int drag);
EAPI Eina_Bool
 ecore_x_e_illume_drag_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_drag_locked_set(Ecore_X_Window win,
                                 unsigned int is_locked);
EAPI Eina_Bool
 ecore_x_e_illume_drag_locked_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_drag_start_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_drag_end_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
                                        int x,
                                        int y,
                                        int w,
                                        int h);
EAPI Eina_Bool
ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
                                        int *x,
                                        int *y,
                                        int *w,
                                        int *h);
EAPI void
ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
                                      int x,
                                      int y,
                                      int w,
                                      int h);
EAPI Eina_Bool
ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
                                      int *x,
                                      int *y,
                                      int *w,
                                      int *h);
EAPI void
ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
                                       int x,
                                       int y,
                                       int w,
                                       int h);
EAPI Eina_Bool
ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
                                       int *x,
                                       int *y,
                                       int *w,
                                       int *h);
EAPI void
ecore_x_e_illume_quickpanel_set(Ecore_X_Window win,
                                unsigned int is_quickpanel);
EAPI Eina_Bool
 ecore_x_e_illume_quickpanel_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
                                      Ecore_X_Illume_Quickpanel_State state);
EAPI Ecore_X_Illume_Quickpanel_State
 ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
                                       Ecore_X_Illume_Quickpanel_State state);
EAPI void
 ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
                                               unsigned int priority);
EAPI int
 ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
                                               unsigned int priority);
EAPI int
 ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win,
                                     unsigned int zone);
EAPI int
 ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_quickpanel_zone_request_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win);

EAPI void
ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
                                Ecore_X_Sync_Counter counter);
EAPI Ecore_X_Sync_Counter
 ecore_x_e_comp_sync_counter_get(Ecore_X_Window win);
EAPI void
 ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root,
                                   Ecore_X_Window win);
EAPI void
ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root,
                                        Ecore_X_Window win,
                                        int w,
                                        int h);
EAPI void
ecore_x_e_comp_sync_supported_set(Ecore_X_Window root,
                                  Eina_Bool enabled);
EAPI Eina_Bool
 ecore_x_e_comp_sync_supported_get(Ecore_X_Window root);
EAPI void
 ecore_x_e_comp_sync_begin_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_comp_sync_end_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win);

EAPI void
 ecore_x_e_comp_flush_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_comp_dump_send(Ecore_X_Window win);
EAPI void
 ecore_x_e_comp_pixmap_set(Ecore_X_Window win,
                          Ecore_X_Pixmap pixmap);
EAPI Ecore_X_Pixmap
ecore_x_e_comp_pixmap_get(Ecore_X_Window win);

EAPI Ecore_X_Sync_Alarm
 ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter);
EAPI Eina_Bool
 ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm);
EAPI Eina_Bool
 ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter,
                           unsigned int *val);
EAPI Ecore_X_Sync_Counter
 ecore_x_sync_counter_new(int val);
EAPI void
 ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter);
EAPI void
 ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter,
                         int by);
EAPI void
ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter,
                              int val);

EAPI void
ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter,
                         int val);
EAPI void
ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter,
                           int val_hi,
                           unsigned int val_lo);
EAPI Eina_Bool
ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter,
                             int *val_hi,
                             unsigned int *val_lo);

EAPI int
 ecore_x_xinerama_screen_count_get(void);
EAPI Eina_Bool
 ecore_x_xinerama_screen_geometry_get(int screen,
                                     int *x,
                                     int *y,
                                     int *w,
                                     int *h);

EAPI Eina_Bool
 ecore_x_screensaver_event_available_get(void);
EAPI int
 ecore_x_screensaver_idle_time_get(void);
EAPI void
 ecore_x_screensaver_set(int timeout,
                        int interval,
                        int prefer_blanking,
                        int allow_exposures);
EAPI void
 ecore_x_screensaver_timeout_set(int timeout);
EAPI int
 ecore_x_screensaver_timeout_get(void);
EAPI void
 ecore_x_screensaver_blank_set(int timeout);
EAPI int
 ecore_x_screensaver_blank_get(void);
EAPI void
 ecore_x_screensaver_expose_set(int timeout);
EAPI int
 ecore_x_screensaver_expose_get(void);
EAPI void
 ecore_x_screensaver_interval_set(int timeout);
EAPI int
 ecore_x_screensaver_interval_get(void);
EAPI void
 ecore_x_screensaver_event_listen_set(Eina_Bool on);

/* FIXME: these funcs need categorising */

typedef struct _Ecore_X_Window_Attributes
{
   Ecore_X_Window   root;
   int              x, y, w, h;
   int              border;
   int              depth;
   Eina_Bool        visible : 1;
   Eina_Bool        viewable : 1;
   Eina_Bool        override : 1;
   Eina_Bool        input_only : 1;
   Eina_Bool        save_under : 1;
   struct
   {
      Ecore_X_Event_Mask mine;
      Ecore_X_Event_Mask all;
      Ecore_X_Event_Mask no_propagate;
   } event_mask;
   Ecore_X_Gravity  window_gravity;
   Ecore_X_Gravity  pixel_gravity;
   Ecore_X_Colormap colormap;
   Ecore_X_Visual   visual;
   /* FIXME: missing
    * int map_installed;
    * Screen *screen;
    */
} Ecore_X_Window_Attributes;

EAPI Eina_Bool
ecore_x_window_attributes_get(Ecore_X_Window win,
                              Ecore_X_Window_Attributes *att_ret);
EAPI void
 ecore_x_window_save_set_add(Ecore_X_Window win);
EAPI void
 ecore_x_window_save_set_del(Ecore_X_Window win);
EAPI Ecore_X_Window *
 ecore_x_window_children_get(Ecore_X_Window win,
                            int *num);

EAPI Eina_Bool
ecore_x_pointer_control_set(int accel_num,
                            int accel_denom,
                            int threshold);
EAPI Eina_Bool
ecore_x_pointer_control_get(int *accel_num,
                            int *accel_denom,
                            int *threshold);
EAPI Eina_Bool
ecore_x_pointer_mapping_set(unsigned char *map,
                            int nmap);
EAPI Eina_Bool
ecore_x_pointer_mapping_get(unsigned char *map,
                            int nmap);
EAPI Eina_Bool
 ecore_x_pointer_grab(Ecore_X_Window win);
EAPI Eina_Bool
 ecore_x_pointer_confine_grab(Ecore_X_Window win);
EAPI void
 ecore_x_pointer_ungrab(void);
EAPI Eina_Bool
 ecore_x_pointer_warp(Ecore_X_Window win,
                     int x,
                     int y);
EAPI Eina_Bool
 ecore_x_keyboard_grab(Ecore_X_Window win);
EAPI void
 ecore_x_keyboard_ungrab(void);
EAPI void
 ecore_x_grab(void);
EAPI void
 ecore_x_ungrab(void);
EAPI void
 ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
                                                       int event_type,
                                                       void *event),
                                     void *data);
EAPI void
ecore_x_window_button_grab(Ecore_X_Window win,
                           int button,
                           Ecore_X_Event_Mask event_mask,
                           int mod,
                           int any_mod);
EAPI void
ecore_x_window_button_ungrab(Ecore_X_Window win,
                             int button,
                             int mod,
                             int any_mod);
EAPI void
ecore_x_window_key_grab(Ecore_X_Window win,
                        const char *key,
                        int mod,
                        int any_mod);
EAPI void
ecore_x_window_key_ungrab(Ecore_X_Window win,
                          const char *key,
                          int mod,
                          int any_mod);

EAPI void
 ecore_x_focus_reset(void);
EAPI void
 ecore_x_events_allow_all(void);
EAPI void
 ecore_x_pointer_last_xy_get(int *x,
                            int *y);
EAPI void
ecore_x_pointer_xy_get(Ecore_X_Window win,
                       int *x,
                       int *y);

/* ecore_x_region.c */
EAPI Ecore_X_XRegion *
 ecore_x_xregion_new(void);
EAPI void
 ecore_x_xregion_free(Ecore_X_XRegion *region);
EAPI Eina_Bool
 ecore_x_xregion_set(Ecore_X_XRegion *region,
                    Ecore_X_GC gc);
EAPI void
ecore_x_xregion_translate(Ecore_X_XRegion *region,
                          int x,
                          int y);
EAPI Eina_Bool
ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
                          Ecore_X_XRegion *r1,
                          Ecore_X_XRegion *r2);
EAPI Eina_Bool
ecore_x_xregion_union(Ecore_X_XRegion *dst,
                      Ecore_X_XRegion *r1,
                      Ecore_X_XRegion *r2);
EAPI Eina_Bool
ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
                           Ecore_X_XRegion *src,
                           Ecore_X_Rectangle *rect);
EAPI Eina_Bool
ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
                         Ecore_X_XRegion *r1,
                         Ecore_X_XRegion *r2);
EAPI Eina_Bool
 ecore_x_xregion_is_empty(Ecore_X_XRegion *region);
EAPI Eina_Bool
 ecore_x_xregion_is_equal(Ecore_X_XRegion *r1,
                         Ecore_X_XRegion *r2);
EAPI Eina_Bool
ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
                              int x,
                              int y);
EAPI Eina_Bool
ecore_x_xregion_rect_contain(Ecore_X_XRegion *region,
                             Ecore_X_Rectangle *rect);

/* ecore_x_randr.c */

/* The usage of 'Ecore_X_Randr_None' or 'Ecore_X_Randr_Unset'
 * depends on the context. In most cases 'Ecore_X_Randr_Unset'
 * can be used, but in some cases -1 is a special value to
 * functions, thus 'Ecore_X_Randr_None' (=0) musst be used.
 */

typedef short Ecore_X_Randr_Refresh_Rate;
typedef int   Ecore_X_Randr_Crtc_Gamma;
typedef int   Ecore_X_Randr_Signal_Format;
typedef int   Ecore_X_Randr_Signal_Property;
typedef int   Ecore_X_Randr_Connector_Type;

typedef struct _Ecore_X_Randr_Mode_Info
{
   Ecore_X_ID    xid;
   unsigned int  width;
   unsigned int  height;
   unsigned long dotClock;
   unsigned int  hSyncStart;
   unsigned int  hSyncEnd;
   unsigned int  hTotal;
   unsigned int  hSkew;
   unsigned int  vSyncStart;
   unsigned int  vSyncEnd;
   unsigned int  vTotal;
   char         *name;
   unsigned int  nameLength;
   unsigned long modeFlags;
} Ecore_X_Randr_Mode_Info;

EAPI int
 ecore_x_randr_version_get(void);
EAPI Eina_Bool
 ecore_x_randr_query(void);

/* ecore_x_randr_11.c */
EAPI Ecore_X_Randr_Orientation
 ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root);
EAPI Ecore_X_Randr_Orientation
 ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root);
EAPI Eina_Bool
 ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root,
                                                    Ecore_X_Randr_Orientation orientation);
EAPI Ecore_X_Randr_Screen_Size_MM *
ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root,
                                              int *num);
EAPI void
ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root,
                                                     int *w,
                                                     int *h,
                                                     int *w_mm,
                                                     int *h_mm,
                                                     int *size_index);
EAPI Eina_Bool
ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root,
                                             int size_index);
EAPI Ecore_X_Randr_Refresh_Rate
 ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root);
EAPI Ecore_X_Randr_Refresh_Rate *
 ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root,
                                                      int size_index,
                                                      int *num);
EAPI Eina_Bool
ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root,
                                                     int size_index,
                                                     Ecore_X_Randr_Refresh_Rate rate);

/* ecore_x_randr_12.c */
EAPI void
ecore_x_randr_events_select(Ecore_X_Window win,
                            Eina_Bool on);

EAPI void
ecore_x_randr_screen_current_size_get(Ecore_X_Window root,
                                      int *w,
                                      int *h,
                                      int *w_mm,
                                      int *h_mm);
EAPI void
ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
                                    int *wmin,
                                    int *hmin,
                                    int *wmax,
                                    int *hmax);
EAPI void
 ecore_x_randr_screen_reset(Ecore_X_Window root);
EAPI Eina_Bool
 ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
                                      int w,
                                      int h,
                                      int w_mm,
                                      int h_mm);
EAPI Ecore_X_Randr_Mode_Info **
ecore_x_randr_modes_info_get(Ecore_X_Window root,
                             int *num);
EAPI Ecore_X_Randr_Mode_Info *
ecore_x_randr_mode_info_get(Ecore_X_Window root,
                            Ecore_X_Randr_Mode mode);
EAPI void
                           ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info);
EAPI Ecore_X_Randr_Crtc *
                           ecore_x_randr_crtcs_get(Ecore_X_Window root,
                        int *num);
EAPI Ecore_X_Randr_Output *ecore_x_randr_outputs_get(Ecore_X_Window root,
                                                      int *num);
EAPI Ecore_X_Randr_Output *
ecore_x_randr_window_outputs_get(Ecore_X_Window window,
                                 int *num);
EINA_DEPRECATED EAPI Ecore_X_Randr_Output *
ecore_x_randr_current_output_get(Ecore_X_Window window,
                                 int *num);
EAPI Ecore_X_Randr_Crtc *
ecore_x_randr_current_crtc_get(Ecore_X_Window window,
                               int *num);
EAPI Ecore_X_Randr_Output *
ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
                               Ecore_X_Randr_Crtc crtc,
                               int *num);
EAPI Ecore_X_Randr_Output *
ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
                                        Ecore_X_Randr_Crtc crtc,
                                        int *num);
EAPI void
ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
                                Ecore_X_Randr_Crtc crtc,
                                int *x,
                                int *y,
                                int *w,
                                int *h);
EAPI void
ecore_x_randr_crtc_pos_get(Ecore_X_Window root,
                           Ecore_X_Randr_Crtc crtc,
                           int *x,
                           int *y);
EAPI Eina_Bool
ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
                           Ecore_X_Randr_Crtc crtc,
                           int x,
                           int y);
EAPI Ecore_X_Randr_Mode
ecore_x_randr_crtc_mode_get(Ecore_X_Window root,
                            Ecore_X_Randr_Crtc crtc);
EAPI Eina_Bool
ecore_x_randr_crtc_mode_set(Ecore_X_Window root,
                            Ecore_X_Randr_Crtc crtc,
                            Ecore_X_Randr_Output *outputs,
                            int noutputs,
                            Ecore_X_Randr_Mode mode);
EAPI void
ecore_x_randr_crtc_size_get(Ecore_X_Window root,
                            Ecore_X_Randr_Crtc crtc,
                            int *w,
                            int *h);
EAPI Ecore_X_Randr_Refresh_Rate
ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root,
                                    Ecore_X_Randr_Crtc crtc,
                                    Ecore_X_Randr_Mode mode);
EAPI Ecore_X_Randr_Orientation
ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
                                    Ecore_X_Randr_Crtc crtc);
EAPI Ecore_X_Randr_Orientation
ecore_x_randr_crtc_orientation_get(Ecore_X_Window root,
                                   Ecore_X_Randr_Crtc crtc);
EAPI Eina_Bool
ecore_x_randr_crtc_orientation_set(Ecore_X_Window root,
                                   Ecore_X_Randr_Crtc crtc,
                                   const Ecore_X_Randr_Orientation orientation);
EAPI Eina_Bool
ecore_x_randr_crtc_clone_set(Ecore_X_Window root,
                             Ecore_X_Randr_Crtc original,
                             Ecore_X_Randr_Crtc clone);
EAPI Eina_Bool
ecore_x_randr_crtc_settings_set(Ecore_X_Window root,
                                Ecore_X_Randr_Crtc crtc,
                                Ecore_X_Randr_Output *outputs,
                                int noutputs,
                                int x,
                                int y,
                                Ecore_X_Randr_Mode mode,
                                Ecore_X_Randr_Orientation orientation);
EAPI Eina_Bool
ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root,
                                    Ecore_X_Randr_Crtc crtc_r1,
                                    Ecore_X_Randr_Crtc crtc_r2,
                                    Ecore_X_Randr_Output_Policy policy,
                                    Ecore_X_Randr_Relative_Alignment alignment);
EAPI Ecore_X_Randr_Mode *
ecore_x_randr_output_modes_get(Ecore_X_Window root,
                               Ecore_X_Randr_Output output,
                               int *num,
                               int *npreferred);
EAPI Ecore_X_Randr_Output *ecore_x_randr_output_clones_get(Ecore_X_Window root,
                                                           Ecore_X_Randr_Output output,
                                                           int *num);
EAPI Ecore_X_Randr_Crtc *ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root,
                                                                 Ecore_X_Randr_Output output,
                                                                 int *num);
EAPI Ecore_X_Randr_Crtc
ecore_x_randr_output_crtc_get(Ecore_X_Window root,
                              Ecore_X_Randr_Output output);
EAPI char *
ecore_x_randr_output_name_get(Ecore_X_Window root,
                              Ecore_X_Randr_Output output,
                              int *len);
EAPI int
 ecore_x_randr_crtc_gamma_ramp_size_get(Ecore_X_Randr_Crtc crtc);
EAPI Ecore_X_Randr_Crtc_Gamma **
 ecore_x_randr_crtc_gamma_ramps_get(Ecore_X_Randr_Crtc crtc);
EAPI Eina_Bool
 ecore_x_randr_crtc_gamma_ramps_set(Ecore_X_Randr_Crtc crtc,
                                   const Ecore_X_Randr_Crtc_Gamma *red,
                                   const Ecore_X_Randr_Crtc_Gamma *green,
                                   const Ecore_X_Randr_Crtc_Gamma *blue);
EAPI Eina_Bool
ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
                                 const Ecore_X_Randr_Crtc *not_moved,
                                 int nnot_moved,
                                 int dx,
                                 int dy);
EAPI Eina_Bool
ecore_x_randr_move_crtcs(Ecore_X_Window root,
                         const Ecore_X_Randr_Crtc *crtcs,
                         int ncrtc,
                         int dx,
                         int dy);
EAPI void
ecore_x_randr_mode_size_get(Ecore_X_Window root,
                            Ecore_X_Randr_Mode mode,
                            int *w,
                            int *h);
EAPI Ecore_X_Randr_Connection_Status
ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
                                           Ecore_X_Randr_Output output);
EAPI void
ecore_x_randr_output_size_mm_get(Ecore_X_Window root,
                                 Ecore_X_Randr_Output output,
                                 int *w,
                                 int *h);
EAPI Eina_Bool
ecore_x_randr_output_crtc_set(Ecore_X_Window root,
                              Ecore_X_Randr_Output output,
                              const Ecore_X_Randr_Crtc crtc);

/* ecore_x_randr_12_edid.c */

/*
 * @brief Validates the header from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return EINA_TRUE, if the header is valid. Else EINA_FALSE.
 */
EAPI Eina_Bool
ecore_x_randr_edid_has_valid_header(unsigned char *edid,
                                    unsigned long edid_length);

/*
 * @brief Checks whether a display's EDID has a valid checksum.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return EINA_TRUE, if the checksum is valid. Else EINA_FALSE.
 */
EAPI Eina_Bool
ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid,
                                           unsigned long edid_length);

/*
 * @brief Get the encoded version from raw EDID data.
 *
 * The return value has the minor version in the lowest 8 bits, and the major
 * version in all the rest of the bits. i.e.
 *
 * minor = (version & 0x000000ff);
 * major = (version & 0xffffff00) >> 8;
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The encoded major and minor version encasuplated an int.
 */
EAPI int
ecore_x_randr_edid_version_get(unsigned char *edid,
                               unsigned long edid_length);

/*
 * @brief Get the encoded manufacturer from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The encoded manufacturer identifier.
 */
EAPI char *
ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid,
                                         unsigned long edid_length);

/*
 * @brief Get the encoded name from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The encoded manufacturer identifier.
 */
EAPI char *
ecore_x_randr_edid_display_name_get(unsigned char *edid,
                                    unsigned long edid_length);

/*
 * @brief Get the encoded ASCII from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The encoded ASCII display identifier.
 */
EAPI char *
ecore_x_randr_edid_display_ascii_get(unsigned char *edid,
                                     unsigned long edid_length);

/*
 * @brief Get the encoded serial identifier from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The encoded serial identifier.
 */
EAPI char *
ecore_x_randr_edid_display_serial_get(unsigned char *edid,
                                      unsigned long edid_length);

/*
 * @brief Get the encoded model number from raw EDID data.
 *
 * The manufacturer ID table is necessary for a useful description.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The encoded model number.
 */
EAPI int
ecore_x_randr_edid_model_get(unsigned char *edid,
                             unsigned long edid_length);

/*
 * @brief Get the manufacturer serial number from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The encoded serial manufacturer serial number.
 */
EAPI int
ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid,
                                                  unsigned long edid_length);

/*
 * @brief Get the manufacturer model number from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The manufacturer's model number.
 */
EAPI int
ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid,
                                          unsigned long edid_length);

/*
 * @brief Looks up the DPMS support from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return EINA_TRUE, if DPMS is supported in some way. Else EINA_FALSE.
 */
EAPI Eina_Bool
ecore_x_randr_edid_dpms_available_get(unsigned char *edid,
                                      unsigned long edid_length);

/*
 * @brief Looks up the DPMS Standby support from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return EINA_TRUE, if DPMS Standby is supported. Else EINA_FALSE.
 */
EAPI Eina_Bool
ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid,
                                              unsigned long edid_length);

/*
 * @brief Looks up the DPMS Suspend support from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return EINA_TRUE, if DPMS Suspend is supported. Else EINA_FALSE.
 */
EAPI Eina_Bool
ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid,
                                              unsigned long edid_length);

/*
 * @brief Looks up the DPMS Off support from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return EINA_TRUE, if DPMS Off is supported. Else EINA_FALSE.
 */
EAPI Eina_Bool
ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid,
                                          unsigned long edid_length);

/*
 * @brief Get the preferred aspect ratio from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The preferred aspect ratio.
 */
EAPI Ecore_X_Randr_Edid_Aspect_Ratio
ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid,
                                                      unsigned long edid_length);

/*
 * @brief Get the supported aspect ratios from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The supported aspect ratios.
 */
EAPI Ecore_X_Randr_Edid_Aspect_Ratio
ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid,
                                             unsigned long edid_length);

/*
 * @brief Get the supported colorschemes from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The supported colorschemes.
 */
EAPI Ecore_X_Randr_Edid_Display_Colorscheme
ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid,
                                           unsigned long edid_length);

/*
 * @brief Get the display type from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return EINA_TRUE, if the display is a digital one. Else EINA_FALSE.
 */
EAPI Eina_Bool
ecore_x_randr_edid_display_type_digital_get(unsigned char *edid,
                                            unsigned long edid_length);

/*
 * @brief Get the display interface type from raw EDID data.
 *
 * @param edid the edid structure
 * @param edid_length length of the edid structure
 * @return The interface type.
 */
EAPI Ecore_X_Randr_Edid_Display_Interface_Type
ecore_x_randr_edid_display_interface_type_get(unsigned char *edid,
                                              unsigned long edid_length);

/* ecore_x_randr_13.c */
EAPI void
ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root,
                                         double level);
EAPI double
ecore_x_randr_output_backlight_level_get(Ecore_X_Window root,
                                         Ecore_X_Randr_Output output);
EAPI Eina_Bool
ecore_x_randr_output_backlight_level_set(Ecore_X_Window root,
                                         Ecore_X_Randr_Output output,
                                         double level);
EAPI Ecore_X_Randr_Output
 ecore_x_randr_primary_output_get(Ecore_X_Window root);
EAPI void
 ecore_x_randr_primary_output_set(Ecore_X_Window root,
                                 Ecore_X_Randr_Output output);
EAPI Ecore_X_Render_Subpixel_Order
ecore_x_randr_output_subpixel_order_get(Ecore_X_Window root,
                                        Ecore_X_Randr_Output output);
EAPI unsigned char *
ecore_x_randr_output_edid_get(Ecore_X_Window root,
                              Ecore_X_Randr_Output output,
                              unsigned long *length);
EAPI Ecore_X_Randr_Output *
ecore_x_randr_output_wired_clones_get(Ecore_X_Window root,
                                      Ecore_X_Randr_Output output,
                                      int *num);
EAPI Ecore_X_Randr_Output **
ecore_x_randr_output_compatibility_list_get(Ecore_X_Window root,
                                            Ecore_X_Randr_Output output,
                                            int *num);
EAPI Ecore_X_Randr_Signal_Format *
ecore_x_randr_output_signal_formats_get(Ecore_X_Window root,
                                        Ecore_X_Randr_Output output,
                                        int *num);
EAPI Eina_Bool
ecore_x_randr_output_signal_format_set(Ecore_X_Window root,
                                       Ecore_X_Randr_Output output,
                                       Ecore_X_Randr_Signal_Format *signal);
EAPI Ecore_X_Randr_Signal_Property *
ecore_x_randr_output_signal_properties_get(Ecore_X_Window root,
                                           Ecore_X_Randr_Output output,
                                           int *num);
EAPI int
ecore_x_randr_output_connector_number_get(Ecore_X_Window root,
                                          Ecore_X_Randr_Output output);
EAPI Ecore_X_Randr_Connector_Type
ecore_x_randr_output_connector_type_get(Ecore_X_Window root,
                                        Ecore_X_Randr_Output output);
EAPI Eina_Rectangle *
ecore_x_randr_crtc_panning_area_get(Ecore_X_Window root,
                                    Ecore_X_Randr_Crtc crtc,
                                    int *x,
                                    int *y,
                                    int *w,
                                    int *h);
EAPI Eina_Bool
ecore_x_randr_crtc_panning_area_set(Ecore_X_Window root,
                                    Ecore_X_Randr_Crtc crtc,
                                    int x,
                                    const int y,
                                    const int w,
                                    const int h);
EAPI Eina_Rectangle *
ecore_x_randr_crtc_tracking_area_get(Ecore_X_Window root,
                                     Ecore_X_Randr_Crtc crtc,
                                     int *x,
                                     int *y,
                                     int *w,
                                     int *h);
EAPI Eina_Bool
ecore_x_randr_crtc_tracking_area_set(Ecore_X_Window root,
                                     Ecore_X_Randr_Crtc crtc,
                                     int x,
                                     const int y,
                                     const int w,
                                     const int h);
EAPI Eina_Rectangle *
ecore_x_randr_crtc_border_area_get(Ecore_X_Window root,
                                   Ecore_X_Randr_Crtc crtc);
EAPI Eina_Bool
ecore_x_randr_crtc_border_area_set(Ecore_X_Window root,
                                   Ecore_X_Randr_Crtc crtc,
                                   int left,
                                   const int top,
                                   const int right,
                                   const int bottom);

/* XRender Support (horrendously incomplete) */
typedef Ecore_X_ID Ecore_X_Picture;

/* XFixes Extension Support */
typedef Ecore_X_ID Ecore_X_Region;

typedef enum _Ecore_X_Region_Type
{
   ECORE_X_REGION_BOUNDING,
   ECORE_X_REGION_CLIP
} Ecore_X_Region_Type;

EAPI Ecore_X_Region
ecore_x_region_new(Ecore_X_Rectangle *rects,
                   int num);
EAPI Ecore_X_Region
 ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap);
EAPI Ecore_X_Region
 ecore_x_region_new_from_window(Ecore_X_Window win,
                               Ecore_X_Region_Type type);
EAPI Ecore_X_Region
 ecore_x_region_new_from_gc(Ecore_X_GC gc);
EAPI Ecore_X_Region
 ecore_x_region_new_from_picture(Ecore_X_Picture picture);
EAPI void
 ecore_x_region_free(Ecore_X_Region region);
EAPI void
 ecore_x_region_set(Ecore_X_Region region,
                   Ecore_X_Rectangle *rects,
                   int num);
EAPI void
ecore_x_region_copy(Ecore_X_Region dest,
                    Ecore_X_Region source);
EAPI void
ecore_x_region_combine(Ecore_X_Region dest,
                       Ecore_X_Region source1,
                       Ecore_X_Region source2);
EAPI void
ecore_x_region_intersect(Ecore_X_Region dest,
                         Ecore_X_Region source1,
                         Ecore_X_Region source2);
EAPI void
ecore_x_region_subtract(Ecore_X_Region dest,
                        Ecore_X_Region source1,
                        Ecore_X_Region source2);
EAPI void
ecore_x_region_invert(Ecore_X_Region dest,
                      Ecore_X_Rectangle *bounds,
                      Ecore_X_Region source);
EAPI void
ecore_x_region_translate(Ecore_X_Region region,
                         int dx,
                         int dy);
EAPI void
ecore_x_region_extents(Ecore_X_Region dest,
                       Ecore_X_Region source);
EAPI Ecore_X_Rectangle *
ecore_x_region_fetch(Ecore_X_Region region,
                     int *num,
                     Ecore_X_Rectangle *bounds);
EAPI void
ecore_x_region_expand(Ecore_X_Region dest,
                      Ecore_X_Region source,
                      unsigned int left,
                      unsigned int right,
                      unsigned int top,
                      unsigned int bottom);
EAPI void
ecore_x_region_gc_clip_set(Ecore_X_Region region,
                           Ecore_X_GC gc,
                           int x_origin,
                           int y_origin);
EAPI void
ecore_x_region_window_shape_set(Ecore_X_Region region,
                                Ecore_X_Window win,
                                Ecore_X_Shape_Type type,
                                int x_offset,
                                int y_offset);
EAPI void
ecore_x_region_picture_clip_set(Ecore_X_Region region,
                                Ecore_X_Picture picture,
                                int x_origin,
                                int y_origin);

/**
 * xfixes selection notification request.
 *
 * This lets you choose which selections you want to get notifications for.
 * @param selection the selection atom.
 * @return EINA_TRUE on success, EINA_FALSE otherwise.
 * @since 1.1.0
 */
EAPI Eina_Bool
ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection);

/* XComposite Extension Support */
EAPI Eina_Bool
 ecore_x_composite_query(void);
EAPI void
 ecore_x_composite_redirect_window(Ecore_X_Window win,
                                  Ecore_X_Composite_Update_Type type);
EAPI void
ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
                                      Ecore_X_Composite_Update_Type type);
EAPI void
ecore_x_composite_unredirect_window(Ecore_X_Window win,
                                    Ecore_X_Composite_Update_Type type);
EAPI void
ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
                                        Ecore_X_Composite_Update_Type type);
EAPI Ecore_X_Pixmap
 ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win);
EAPI void
 ecore_x_composite_window_events_disable(Ecore_X_Window win);
EAPI void
 ecore_x_composite_window_events_enable(Ecore_X_Window win);
EAPI Ecore_X_Window
 ecore_x_composite_render_window_enable(Ecore_X_Window root);
EAPI void
 ecore_x_composite_render_window_disable(Ecore_X_Window root);

/* XDamage Extension Support */
typedef Ecore_X_ID Ecore_X_Damage;

typedef enum _Ecore_X_Damage_Report_Level
{
   ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES,
   ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES,
   ECORE_X_DAMAGE_REPORT_BOUNDING_BOX,
   ECORE_X_DAMAGE_REPORT_NON_EMPTY
} Ecore_X_Damage_Report_Level;

struct _Ecore_X_Event_Damage
{
   Ecore_X_Damage_Report_Level level;
   Ecore_X_Drawable            drawable;
   Ecore_X_Damage              damage;
   int                         more;
   Ecore_X_Time                time;
   Ecore_X_Rectangle           area;
   Ecore_X_Rectangle           geometry;
};

typedef struct _Ecore_X_Event_Damage Ecore_X_Event_Damage;

EAPI Eina_Bool
 ecore_x_damage_query(void);
EAPI Ecore_X_Damage
 ecore_x_damage_new(Ecore_X_Drawable d,
                   Ecore_X_Damage_Report_Level level);
EAPI void
 ecore_x_damage_free(Ecore_X_Damage damage);
EAPI void
 ecore_x_damage_subtract(Ecore_X_Damage damage,
                        Ecore_X_Region repair,
                        Ecore_X_Region parts);

EAPI Eina_Bool
 ecore_x_screen_is_composited(int screen);
EAPI void
 ecore_x_screen_is_composited_set(int screen,
                                 Ecore_X_Window win);

EAPI Eina_Bool
 ecore_x_dpms_query(void);
EAPI Eina_Bool
 ecore_x_dpms_capable_get(void);
EAPI Eina_Bool
 ecore_x_dpms_enabled_get(void);
EAPI void
 ecore_x_dpms_enabled_set(int enabled);
EAPI void
 ecore_x_dpms_timeouts_get(unsigned int *standby,
                          unsigned int *suspend,
                          unsigned int *off);
EAPI Eina_Bool
ecore_x_dpms_timeouts_set(unsigned int standby,
                          unsigned int suspend,
                          unsigned int off);
EAPI unsigned int
 ecore_x_dpms_timeout_standby_get(void);
EAPI unsigned int
 ecore_x_dpms_timeout_suspend_get(void);
EAPI unsigned int
 ecore_x_dpms_timeout_off_get(void);
EAPI void
 ecore_x_dpms_timeout_standby_set(unsigned int new_timeout);
EAPI void
 ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout);
EAPI void
 ecore_x_dpms_timeout_off_set(unsigned int new_timeout);

EAPI Eina_Bool
 ecore_x_test_fake_key_down(const char *key);
EAPI Eina_Bool
 ecore_x_test_fake_key_up(const char *key);
EAPI Eina_Bool
 ecore_x_test_fake_key_press(const char *key);
EAPI const char *
 ecore_x_keysym_string_get(int keysym);

typedef struct _Ecore_X_Image Ecore_X_Image;

EAPI Ecore_X_Image *
ecore_x_image_new(int w,
                  int h,
                  Ecore_X_Visual vis,
                  int depth);
EAPI void
 ecore_x_image_free(Ecore_X_Image *im);
EAPI Eina_Bool
 ecore_x_image_get(Ecore_X_Image *im,
                  Ecore_X_Drawable draw,
                  int x,
                  int y,
                  int sx,
                  int sy,
                  int w,
                  int h);
EAPI void
ecore_x_image_put(Ecore_X_Image *im,
                  Ecore_X_Drawable draw,
                  Ecore_X_GC gc,
                  int x,
                  int y,
                  int sx,
                  int sy,
                  int w,
                  int h);
EAPI void *
ecore_x_image_data_get(Ecore_X_Image *im,
                       int *bpl,
                       int *rows,
                       int *bpp);
EAPI Eina_Bool
ecore_x_image_is_argb32_get(Ecore_X_Image *im);

EAPI Eina_Bool
ecore_x_image_to_argb_convert(void *src,
                              int sbpp,
                              int sbpl,
                              Ecore_X_Colormap c,
                              Ecore_X_Visual v,
                              int x,
                              int y,
                              int w,
                              int h,
                              unsigned int *dst,
                              int dbpl,
                              int dx,
                              int dy);

EAPI Eina_Bool
ecore_x_input_multi_select(Ecore_X_Window win);

EAPI Eina_Bool
ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win);

#ifdef __cplusplus
}
#endif // ifdef __cplusplus

#include <Ecore_X_Atoms.h>
#include <Ecore_X_Cursor.h>

#endif // ifndef _ECORE_X_H