Compare commits
659 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a87d84225b | ||
|
|
4ddf2c6512 | ||
|
|
9862894317 | ||
|
|
5af547bf83 | ||
|
|
cbe449dba4 | ||
|
|
3b3faee6d2 | ||
|
|
f3cd3c3dd0 | ||
|
|
70715c377e | ||
|
|
559cb5d8ab | ||
|
|
b18d4feaaf | ||
|
|
e229f2998b | ||
|
|
931faeab12 | ||
|
|
b6bf9112ad | ||
|
|
e158b9b13a | ||
|
|
b0d0bf7f7d | ||
|
|
20b794812f | ||
|
|
b2f9a53c00 | ||
|
|
661c0838b7 | ||
|
|
2baa2dc7f0 | ||
|
|
7ffc605ac2 | ||
|
|
ac093e25f6 | ||
|
|
af91746931 | ||
|
|
44b2e88aef | ||
|
|
c14e9ee768 | ||
|
|
b609bd1149 | ||
|
|
cb3f20ecbe | ||
|
|
3998dd9563 | ||
|
|
856a69936b | ||
|
|
5813ccc700 | ||
|
|
8a6bf12346 | ||
|
|
f7b7346f8d | ||
|
|
db55058178 | ||
|
|
6fcb389975 | ||
|
|
c26905747f | ||
|
|
fa007952ba | ||
|
|
de7b27159d | ||
|
|
9bc8ba7e5d | ||
|
|
48342ad2bd | ||
|
|
420f2fbddc | ||
|
|
45d05f52c2 | ||
|
|
0e47df0ee0 | ||
|
|
fa2d05ab4e | ||
|
|
e3185138ac | ||
|
|
8e51a22707 | ||
|
|
28f82afd0e | ||
|
|
64adba6e3e | ||
|
|
bd0f159b6c | ||
|
|
03bdae8dcc | ||
|
|
1d8bac64b2 | ||
|
|
47b2868a08 | ||
|
|
66f55661ad | ||
|
|
0b3710d762 | ||
|
|
e8a0f3cfb8 | ||
|
|
0b5a530ef1 | ||
|
|
bb8e1c67c6 | ||
|
|
840c9aa8d9 | ||
|
|
f80f4f5ce3 | ||
|
|
6dd57dfe65 | ||
|
|
7cda5b54fb | ||
|
|
b08b4cccc5 | ||
|
|
461d71f6aa | ||
|
|
a33dceee4b | ||
|
|
5cded4d5e2 | ||
|
|
9b2457a671 | ||
|
|
0455bcfda4 | ||
|
|
a5d35b95f0 | ||
|
|
c44fe0bc54 | ||
|
|
164149a8dc | ||
|
|
78a4b090e2 | ||
|
|
dfa1ea8245 | ||
|
|
f40a129e28 | ||
|
|
e48f5b4073 | ||
|
|
cc44561b61 | ||
|
|
ff780aa35e | ||
|
|
737941b333 | ||
|
|
e361e38e09 | ||
|
|
8253735ed1 | ||
|
|
caf389649a | ||
|
|
1435dcc1cb | ||
|
|
4ea1f5e15e | ||
|
|
a59f254fad | ||
|
|
af45513d78 | ||
|
|
5ad3a3b440 | ||
|
|
f54ad24ec2 | ||
|
|
832f1de519 | ||
|
|
9c1b0e4cc0 | ||
|
|
b9c9919fe2 | ||
|
|
e00c9fbc18 | ||
|
|
fda6444216 | ||
|
|
67d042f02b | ||
|
|
ed4605e597 | ||
|
|
2cf66d39e4 | ||
|
|
0c6d327a25 | ||
|
|
7de568a2ae | ||
|
|
3241efa11c | ||
|
|
472aeda2e0 | ||
|
|
6490a22aaf | ||
|
|
644f25c497 | ||
|
|
54a07580c0 | ||
|
|
87285bc8bf | ||
|
|
882db1cf5f | ||
|
|
79b4c34a8f | ||
|
|
fb2eb5f1aa | ||
|
|
9591369339 | ||
|
|
b225585844 | ||
|
|
6f776f0814 | ||
|
|
171bac4626 | ||
|
|
f9dd531bc9 | ||
|
|
c76b247da5 | ||
|
|
e369d70dd6 | ||
|
|
1e93d01d47 | ||
|
|
1e196b39b8 | ||
|
|
be8c0e4734 | ||
|
|
9fb03bb402 | ||
|
|
120915d6de | ||
|
|
e2361108f4 | ||
|
|
b447cd972e | ||
|
|
8bccb1ecf1 | ||
|
|
5383f20c7e | ||
|
|
3e9dc75768 | ||
|
|
8ad1c959ef | ||
|
|
dd05e41475 | ||
|
|
7b1c38b57c | ||
|
|
a88f8e4c57 | ||
|
|
bad6d00966 | ||
|
|
e65e208d40 | ||
|
|
6250c1dbe1 | ||
|
|
dd1de27061 | ||
|
|
08e4a60de1 | ||
|
|
2f8c78ddc5 | ||
|
|
0f8251da61 | ||
|
|
3bdd56c928 | ||
|
|
b2bd11618f | ||
|
|
55cf284749 | ||
|
|
53ff5679f7 | ||
|
|
c282958fb4 | ||
|
|
64f2460b7b | ||
|
|
fced380ec9 | ||
|
|
512d29e53a | ||
|
|
098e02c29d | ||
|
|
b2274ba08a | ||
|
|
6e2573fd76 | ||
|
|
36a1730bb8 | ||
|
|
b3c5232a9b | ||
|
|
d0f2b13309 | ||
|
|
07c00b9969 | ||
|
|
058ff14ac8 | ||
|
|
7f6b9ce7f5 | ||
|
|
3024081928 | ||
|
|
516a6d8495 | ||
|
|
f27b33b40e | ||
|
|
b91b0ebbd7 | ||
|
|
931d93d9a4 | ||
|
|
5101c0d469 | ||
|
|
b70f365c22 | ||
|
|
55b88f1779 | ||
|
|
b38249b35c | ||
|
|
02ae5c8cdf | ||
|
|
f0ff8dfd0f | ||
|
|
adfcc91be6 | ||
|
|
3770f98e7b | ||
|
|
49b7cef2c3 | ||
|
|
795e1b77e3 | ||
|
|
5f044d33ef | ||
|
|
9e91b6557a | ||
|
|
176218c5a0 | ||
|
|
174158bf9c | ||
|
|
2ab90f5d65 | ||
|
|
95f588dc78 | ||
|
|
10d541b8b6 | ||
|
|
70929bc7ba | ||
|
|
df08bc43ec | ||
|
|
f03eca7b1d | ||
|
|
513befc4f2 | ||
|
|
7f85787916 | ||
|
|
e01ae1ee12 | ||
|
|
675cbdc163 | ||
|
|
1fb94a8410 | ||
|
|
4773148f1a | ||
|
|
75a1102901 | ||
|
|
6400a3281b | ||
|
|
bfa741bace | ||
|
|
779f4e10be | ||
|
|
eb6cce1675 | ||
|
|
f9220cbd59 | ||
|
|
6e93a0ae28 | ||
|
|
e9393ed855 | ||
|
|
a0693b4c57 | ||
|
|
bf395263b2 | ||
|
|
1050485a13 | ||
|
|
8a9d458baf | ||
|
|
230e3a3a99 | ||
|
|
6a80d40154 | ||
|
|
6e6b82abb9 | ||
|
|
7825f01b2f | ||
|
|
78bb09c5a1 | ||
|
|
15eecb1645 | ||
|
|
dfd7e05123 | ||
|
|
b0a17e5a37 | ||
|
|
1d444d8def | ||
|
|
508f727665 | ||
|
|
7b5b230ead | ||
|
|
f62b56194b | ||
|
|
e6e9eef855 | ||
|
|
3258af741e | ||
|
|
51dcd09950 | ||
|
|
b94372f199 | ||
|
|
5e94e36f9a | ||
|
|
883835d17b | ||
|
|
3a90254369 | ||
|
|
0200763126 | ||
|
|
d14ecbeba9 | ||
|
|
d929bffd25 | ||
|
|
ea0170250a | ||
|
|
5045337162 | ||
|
|
d942045c10 | ||
|
|
009ea42112 | ||
|
|
f76c62929a | ||
|
|
b68d58c0b1 | ||
|
|
406c9c9c68 | ||
|
|
44e186658b | ||
|
|
2a646c1d21 | ||
|
|
6a2524324f | ||
|
|
caf38fc213 | ||
|
|
880c9d82ec | ||
|
|
9f08f69f4b | ||
|
|
5350edbb2c | ||
|
|
463e6843b9 | ||
|
|
09cf709fe9 | ||
|
|
b6f4b7dbce | ||
|
|
c9ea622fc6 | ||
|
|
fac5167404 | ||
|
|
d1f256ac30 | ||
|
|
2e5251b405 | ||
|
|
a2087c9095 | ||
|
|
c4bc22d77b | ||
|
|
ce6090b11e | ||
|
|
74ad2e1e7e | ||
|
|
f574305b17 | ||
|
|
71bec7e7ad | ||
|
|
b7cd904fe3 | ||
|
|
537a2534b9 | ||
|
|
6c95f0475f | ||
|
|
43bc74eae1 | ||
|
|
2119046a1c | ||
|
|
530cf56f24 | ||
|
|
990715e5db | ||
|
|
dd5cf4769a | ||
|
|
4272a6f1d8 | ||
|
|
fb4ae28444 | ||
|
|
6d9959b30c | ||
|
|
f6e92685a6 | ||
|
|
fe5c6f29fe | ||
|
|
62c2b4f529 | ||
|
|
2dd67663c8 | ||
|
|
1757426e86 | ||
|
|
d508b22228 | ||
|
|
efc03dd0ee | ||
|
|
4850fa57f9 | ||
|
|
d7cc714705 | ||
|
|
0ebde0bbe5 | ||
|
|
a3fa516c60 | ||
|
|
27970efd52 | ||
|
|
44b8334775 | ||
|
|
3a634939a8 | ||
|
|
7e0f13f678 | ||
|
|
2c6685355b | ||
|
|
42e2d014d0 | ||
|
|
285ab04c0c | ||
|
|
b9db80d62c | ||
|
|
2ba282165e | ||
|
|
7c44678f53 | ||
|
|
f9473472dd | ||
|
|
3cd5d1619c | ||
|
|
2363cccd24 | ||
|
|
4394a972dc | ||
|
|
7cf1133d45 | ||
|
|
81ec8c7a1b | ||
|
|
dddeee0cb2 | ||
|
|
80c096ed6e | ||
|
|
92235e2a58 | ||
|
|
9190497b4a | ||
|
|
a3c3031a0e | ||
|
|
ee14cc3160 | ||
|
|
ecc6577a37 | ||
|
|
e58f22a7ea | ||
|
|
88f54ea47d | ||
|
|
fa1b57ca97 | ||
|
|
be0beb758e | ||
|
|
1b05158db9 | ||
|
|
15df889204 | ||
|
|
eb77f20c52 | ||
|
|
750c81f43d | ||
|
|
ae84810db5 | ||
|
|
8ec4f184ab | ||
|
|
8e75ddeac6 | ||
|
|
373f2b8a0c | ||
|
|
19ef533618 | ||
|
|
bcdd895229 | ||
|
|
ba5ba3b022 | ||
|
|
ebc6238a0e | ||
|
|
b6a733c9d2 | ||
|
|
522a2f0214 | ||
|
|
7e9f7d7703 | ||
|
|
1294e41449 | ||
|
|
7ea18bc4ee | ||
|
|
4f6c63f0c9 | ||
|
|
bbd68748bc | ||
|
|
33fd9626eb | ||
|
|
2ee665300b | ||
|
|
c3c5575fc1 | ||
|
|
5077d9cce8 | ||
|
|
007595b639 | ||
|
|
727287b870 | ||
|
|
ae98e7dd7a | ||
|
|
6db486993d | ||
|
|
ca63fd71d7 | ||
|
|
2e2431f353 | ||
|
|
ef06c92610 | ||
|
|
1175e6b98c | ||
|
|
d72cfae56a | ||
|
|
027380d33e | ||
|
|
20d8fbd90f | ||
|
|
9f9170e3aa | ||
|
|
6f6650e6cf | ||
|
|
b288284122 | ||
|
|
7a1cf58934 | ||
|
|
d6e11a97e3 | ||
|
|
4bd9e3aecc | ||
|
|
88a521862a | ||
|
|
fc82963911 | ||
|
|
45ed34c78f | ||
|
|
190b3c372a | ||
|
|
49e18a29b2 | ||
|
|
7f2b4bb381 | ||
|
|
e14bf989eb | ||
|
|
076ae4f5ad | ||
|
|
d945a3cef4 | ||
|
|
a3268e29a1 | ||
|
|
75fca2449f | ||
|
|
30a52271e5 | ||
|
|
b7b9a01efb | ||
|
|
4509240d0e | ||
|
|
65f7b09b39 | ||
|
|
8e958f58c9 | ||
|
|
333d53b342 | ||
|
|
737f035959 | ||
|
|
2970d775ed | ||
|
|
5538315d38 | ||
|
|
ecb7734660 | ||
|
|
9de2f4b9cc | ||
|
|
68ba791720 | ||
|
|
4e9be0c9e9 | ||
|
|
000b2fa22b | ||
|
|
59d6e84459 | ||
|
|
f8d42326ea | ||
|
|
3c3aa2778b | ||
|
|
8637b3eb37 | ||
|
|
4226a6cfcd | ||
|
|
eea413fe9d | ||
|
|
6e4765b1e9 | ||
|
|
ce41d56f73 | ||
|
|
5c74a696d5 | ||
|
|
0499938cf8 | ||
|
|
39a9857c00 | ||
|
|
11b47eaa54 | ||
|
|
1402c861a9 | ||
|
|
e822af1d98 | ||
|
|
78d120e299 | ||
|
|
a5ee5feed0 | ||
|
|
65f10fb0f9 | ||
|
|
4e2ade8d6b | ||
|
|
c9c23ef031 | ||
|
|
d28a54e7f6 | ||
|
|
50cc4896ad | ||
|
|
8aa07505ae | ||
|
|
818ef9aaf6 | ||
|
|
77d28e3104 | ||
|
|
895b9ff43f | ||
|
|
af44019baf | ||
|
|
17269e6c1d | ||
|
|
707f1a9a84 | ||
|
|
91ce32602a | ||
|
|
c7e650ae5d | ||
|
|
a1e8ea6b7f | ||
|
|
770e308c42 | ||
|
|
5149e93f97 | ||
|
|
49abec1de8 | ||
|
|
095343ff8d | ||
|
|
012d605c23 | ||
|
|
9596c3fd24 | ||
|
|
7dc89847a7 | ||
|
|
e339d36a02 | ||
|
|
068515ad96 | ||
|
|
2e08524481 | ||
|
|
0e781823cb | ||
|
|
6d0ff4708c | ||
|
|
b53e822af7 | ||
|
|
1cd305e85f | ||
|
|
587a1de401 | ||
|
|
67684a05b6 | ||
|
|
1f905a1c17 | ||
|
|
36f931f292 | ||
|
|
d24a6727b8 | ||
|
|
02520a0781 | ||
|
|
a3689e670e | ||
|
|
1d5a6e790a | ||
|
|
315c23546d | ||
|
|
9f1cb0798b | ||
|
|
77b703c2fc | ||
|
|
370dfc16ca | ||
|
|
767235aabc | ||
|
|
3df3ff9a3a | ||
|
|
997d3aada6 | ||
|
|
00857133d4 | ||
|
|
0e183fe745 | ||
|
|
cedf52fb81 | ||
|
|
329b34b8cb | ||
|
|
9d2f8f5098 | ||
|
|
e8915ae422 | ||
|
|
a41107b616 | ||
|
|
8963e7cc46 | ||
|
|
70f65529a5 | ||
|
|
64bcdb78e0 | ||
|
|
2161fb5b8c | ||
|
|
a11e4a58c0 | ||
|
|
fd352a10ca | ||
|
|
1fed87720e | ||
|
|
28eebcf383 | ||
|
|
db2053ac1f | ||
|
|
85f8f64d78 | ||
|
|
0e1342b5e5 | ||
|
|
bff0d11c4d | ||
|
|
78bf0f3071 | ||
|
|
d80bc7868f | ||
|
|
244fc05cff | ||
|
|
d7a1973f9f | ||
|
|
a907d5e2cc | ||
|
|
8a2a736af4 | ||
|
|
41b637c338 | ||
|
|
84f565505f | ||
|
|
3d506df234 | ||
|
|
99c851c72d | ||
|
|
df120b78b3 | ||
|
|
18ac62d459 | ||
|
|
b50cdb4b5e | ||
|
|
4150ffbbe2 | ||
|
|
e75fad5fbd | ||
|
|
0d42dabf6c | ||
|
|
141b2ceff2 | ||
|
|
8dc19e4158 | ||
|
|
8e537f94ac | ||
|
|
2b9b125a88 | ||
|
|
970ae51e38 | ||
|
|
0ba97c7aae | ||
|
|
ddb905e99a | ||
|
|
f69034a079 | ||
|
|
53cf3d2edc | ||
|
|
88b7857bc8 | ||
|
|
9e1ae0e29a | ||
|
|
769c63c7ef | ||
|
|
3cbdc7ac89 | ||
|
|
e95f6da116 | ||
|
|
d5ff6b6c66 | ||
|
|
2e1f12642b | ||
|
|
c1292fe01d | ||
|
|
7ee63c07ee | ||
|
|
09080e3c76 | ||
|
|
bb3c91bfda | ||
|
|
fe401cdbb4 | ||
|
|
6740d24bb8 | ||
|
|
e570fe6730 | ||
|
|
f36bb4d91d | ||
|
|
32c4f471d5 | ||
|
|
28f51514f9 | ||
|
|
92055d8d32 | ||
|
|
568865ab1b | ||
|
|
0a61e919e2 | ||
|
|
fa509fcc78 | ||
|
|
996fd9dc5e | ||
|
|
b41972bd96 | ||
|
|
3c7bb5b746 | ||
|
|
23f7d3a0ea | ||
|
|
fd75ced492 | ||
|
|
01fea4032f | ||
|
|
e1c7ff8ee0 | ||
|
|
fafc457a01 | ||
|
|
7a68f42d2e | ||
|
|
ec332bbd42 | ||
|
|
dc2fea413b | ||
|
|
6c25cf872f | ||
|
|
05e2004eb6 | ||
|
|
186f858d86 | ||
|
|
13dba0a461 | ||
|
|
f1627fc8f5 | ||
|
|
8f42a13ce7 | ||
|
|
81321b7d55 | ||
|
|
838dfd50ac | ||
|
|
aa017fae64 | ||
|
|
c492c798fc | ||
|
|
0e99667286 | ||
|
|
5af7597e2e | ||
|
|
266fbce3a3 | ||
|
|
47836a3af1 | ||
|
|
1a30c3f272 | ||
|
|
72cd4207b7 | ||
|
|
9a71ad7ca9 | ||
|
|
1af84d33f7 | ||
|
|
3511fe4355 | ||
|
|
b27d39ee23 | ||
|
|
ef3ec85bac | ||
|
|
3b62411040 | ||
|
|
10ebcedf56 | ||
|
|
89743a6370 | ||
|
|
f1e0b23697 | ||
|
|
f2d6ab4062 | ||
|
|
91728b0890 | ||
|
|
130c42c4c9 | ||
|
|
3805dc3605 | ||
|
|
e339a9b0da | ||
|
|
6de36e580b | ||
|
|
b1cc8b9cd8 | ||
|
|
807c14741f | ||
|
|
b404a437c7 | ||
|
|
ce8a190b25 | ||
|
|
f23c956473 | ||
|
|
c47c91cd3a | ||
|
|
d89ac0ba69 | ||
|
|
bdbe090dc0 | ||
|
|
6af9817392 | ||
|
|
b89dcab5a5 | ||
|
|
e634f3fbe0 | ||
|
|
3770d914ec | ||
|
|
093a867e51 | ||
|
|
9f5f47f8be | ||
|
|
49f72c1fb4 | ||
|
|
42d07ad6ce | ||
|
|
75585d16de | ||
|
|
f1b158bacd | ||
|
|
674b196577 | ||
|
|
2417a819ef | ||
|
|
1607efc0b5 | ||
|
|
47f0af6092 | ||
|
|
cbf303d8c6 | ||
|
|
1adba9e908 | ||
|
|
63a276654d | ||
|
|
eb1ec05da3 | ||
|
|
c1c3670711 | ||
|
|
081eaf4484 | ||
|
|
85ed525682 | ||
|
|
82c89e9456 | ||
|
|
70094721aa | ||
|
|
6eebe91b7a | ||
|
|
90dd7e2990 | ||
|
|
f0fa511457 | ||
|
|
a9b778931c | ||
|
|
ace3ea4a89 | ||
|
|
95b7dca983 | ||
|
|
cb29d27707 | ||
|
|
946c1ca136 | ||
|
|
fa7ace866c | ||
|
|
7d6d1af7a1 | ||
|
|
022f88a6ac | ||
|
|
5c93288199 | ||
|
|
c0c4ab0946 | ||
|
|
a39c3b43b2 | ||
|
|
8ceef86cf8 | ||
|
|
200896e9b9 | ||
|
|
bba451147b | ||
|
|
ce504e2217 | ||
|
|
49943be22b | ||
|
|
6922490fa5 | ||
|
|
cbb01e6063 | ||
|
|
606180b746 | ||
|
|
8fc7a58504 | ||
|
|
a8e3ce6bb4 | ||
|
|
6138f23f5b | ||
|
|
d9250dfa1f | ||
|
|
a36bfa1424 | ||
|
|
75afa7d8d3 | ||
|
|
68f31098ad | ||
|
|
5b41e388c9 | ||
|
|
b5fdb45259 | ||
|
|
52c7ad6de3 | ||
|
|
05dad359e7 | ||
|
|
eade6b23be | ||
|
|
e494ec1d61 | ||
|
|
54e959ef96 | ||
|
|
1a00cb9df5 | ||
|
|
af7f95207e | ||
|
|
4acbc2fdb0 | ||
|
|
070afc587c | ||
|
|
3b50f22873 | ||
|
|
d3adde0116 | ||
|
|
88dbf5cabf | ||
|
|
1bd94d731b | ||
|
|
5ac10f45f1 | ||
|
|
f14fc8bc37 | ||
|
|
d780a23746 | ||
|
|
e6b02c883f | ||
|
|
429b728fe1 | ||
|
|
c3a9713775 | ||
|
|
e4ece66c9c | ||
|
|
c8262d39fa | ||
|
|
e16a965ef6 | ||
|
|
01e2fc5b5a | ||
|
|
22c61e0c8f | ||
|
|
d393cb377c | ||
|
|
8a6f6b5421 | ||
|
|
75e48d68bc | ||
|
|
6c0ff288b0 | ||
|
|
ae7cfc70c7 | ||
|
|
2788322135 | ||
|
|
7cfdf8fa32 | ||
|
|
4451536712 | ||
|
|
fcf0edb6c1 | ||
|
|
39f3d5e182 | ||
|
|
97015c226f | ||
|
|
fe22d4a402 | ||
|
|
6abc512298 | ||
|
|
5cededa0aa | ||
|
|
cb8c076321 | ||
|
|
3e16fd9967 | ||
|
|
84e9c08a40 | ||
|
|
e89187fc87 | ||
|
|
b0359fb944 | ||
|
|
cfb988ab38 | ||
|
|
c4b1bbf3e2 | ||
|
|
4acc2716cb | ||
|
|
6c7dc26935 | ||
|
|
863853ec5f | ||
|
|
fd20ac0751 | ||
|
|
15037df282 | ||
|
|
2aa560865e | ||
|
|
45a83fdbeb | ||
|
|
821dd33918 | ||
|
|
dde9cf2882 | ||
|
|
5616bdc3dc | ||
|
|
43091232a2 | ||
|
|
239cfddc97 | ||
|
|
ef2dc17256 | ||
|
|
60d1ac5539 | ||
|
|
c81abfae02 | ||
|
|
a184432baf | ||
|
|
8cd4c387f0 | ||
|
|
96986af5b4 | ||
|
|
02d8976176 | ||
|
|
c05ec8d783 | ||
|
|
42664a22cf | ||
|
|
7d61c9fff5 | ||
|
|
7df52ebdd4 | ||
|
|
f2f0ae89ae | ||
|
|
bec4cfc758 | ||
|
|
1fb1f6a7b1 | ||
|
|
0e7f5332d3 | ||
|
|
489657f305 | ||
|
|
fc35cd9bfe | ||
|
|
501098e946 | ||
|
|
bd873014ca |
2
HACKING
2
HACKING
@@ -13,7 +13,7 @@ fine GNU mirrors. Beta software can be found at alpha.gnu.org.
|
||||
Up-to-date instructions about developing GNOME applications and libraries
|
||||
can be found here:
|
||||
|
||||
http://library.gnome.org/devel/
|
||||
http://developer.gnome.org
|
||||
|
||||
Information about using git with GNOME can be found here:
|
||||
|
||||
|
||||
11
INSTALL.in
11
INSTALL.in
@@ -3,11 +3,9 @@ Prerequisites
|
||||
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, GdkPixbuf, ATK and cairo libraries, available at
|
||||
the same location as GTK+. GTK+ @GTK_VERSION@ requires at least
|
||||
GLib @GLIB_REQUIRED_VERSION@, Pango @PANGO_REQUIRED_VERSION@,
|
||||
GdkPixbuf @GDK_PIXBUF_REQUIRED_VERSION@, ATK @ATK_REQUIRED_VERSION@
|
||||
and cairo @CAIRO_REQUIRED_VERSION@.
|
||||
- The GLib, Pango, GdkPixbuf, ATK and cairo libraries, available at the same
|
||||
location as GTK+. GTK+ @GTK_VERSION@ requires at least GLib 2.25.10,
|
||||
Pango 1.20, GdkPixbuf 2.21.0, ATK 1.29.2 and cairo 1.6.0.
|
||||
|
||||
- gobject-introspection 0.9.3 or newer.
|
||||
|
||||
@@ -31,4 +29,5 @@ in the file:
|
||||
|
||||
Or online at:
|
||||
|
||||
http://library.gnome.org/devel/gtk/stable/gtk-building.html
|
||||
http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html
|
||||
|
||||
|
||||
162
Makefile.am
162
Makefile.am
@@ -1,13 +1,14 @@
|
||||
## Makefile.am for GTK+
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SRC_SUBDIRS = gdk gtk modules demos tests perf examples
|
||||
SRC_SUBDIRS = gdk gtk modules demos tests perf
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST += \
|
||||
autogen.sh \
|
||||
HACKING \
|
||||
makecopyright \
|
||||
NEWS.pre-1-0 \
|
||||
@@ -31,8 +32,93 @@ EXTRA_DIST += \
|
||||
gtk-zip.sh.in \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
po/po2tbl.sed.in
|
||||
|
||||
po/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
examples/aspectframe/aspectframe.c \
|
||||
examples/Makefile \
|
||||
examples/README.1ST \
|
||||
examples/extract.awk \
|
||||
examples/extract.sh \
|
||||
examples/arrow/Makefile \
|
||||
examples/arrow/arrow.c \
|
||||
examples/base/Makefile \
|
||||
examples/base/base.c \
|
||||
examples/buttonbox/Makefile \
|
||||
examples/buttonbox/buttonbox.c \
|
||||
examples/buttons/Makefile \
|
||||
examples/buttons/buttons.c \
|
||||
examples/buttons/info.xpm \
|
||||
examples/calendar/Makefile \
|
||||
examples/calendar/calendar.c \
|
||||
examples/clist/Makefile \
|
||||
examples/clist/clist.c \
|
||||
examples/entry/Makefile \
|
||||
examples/entry/entry.c \
|
||||
examples/eventbox/Makefile \
|
||||
examples/eventbox/eventbox.c \
|
||||
examples/filesel/Makefile \
|
||||
examples/filesel/filesel.c \
|
||||
examples/gtkdial/Makefile \
|
||||
examples/gtkdial/dial_test.c \
|
||||
examples/gtkdial/gtkdial.c \
|
||||
examples/gtkdial/gtkdial.h \
|
||||
examples/helloworld/Makefile \
|
||||
examples/helloworld/helloworld.c \
|
||||
examples/helloworld2/Makefile \
|
||||
examples/helloworld2/helloworld2.c \
|
||||
examples/label/Makefile \
|
||||
examples/label/label.c \
|
||||
examples/list/Makefile \
|
||||
examples/list/list.c \
|
||||
examples/menu/Makefile \
|
||||
examples/menu/menu.c \
|
||||
examples/menu/itemfactory.c \
|
||||
examples/notebook/Makefile \
|
||||
examples/notebook/notebook.c \
|
||||
examples/packbox/Makefile \
|
||||
examples/packbox/packbox.c \
|
||||
examples/paned/Makefile \
|
||||
examples/paned/paned.c \
|
||||
examples/pixmap/Makefile \
|
||||
examples/pixmap/pixmap.c \
|
||||
examples/progressbar/Makefile \
|
||||
examples/progressbar/progressbar.c \
|
||||
examples/radiobuttons/Makefile \
|
||||
examples/radiobuttons/radiobuttons.c \
|
||||
examples/rangewidgets/Makefile \
|
||||
examples/rangewidgets/rangewidgets.c \
|
||||
examples/rulers/Makefile \
|
||||
examples/rulers/rulers.c \
|
||||
examples/scribble-simple/Makefile \
|
||||
examples/scribble-simple/scribble-simple.c \
|
||||
examples/scribble-xinput/Makefile \
|
||||
examples/scribble-xinput/scribble-xinput.c \
|
||||
examples/scrolledwin/Makefile \
|
||||
examples/scrolledwin/scrolledwin.c \
|
||||
examples/selection/Makefile \
|
||||
examples/selection/gettargets.c \
|
||||
examples/selection/setselection.c \
|
||||
examples/statusbar/Makefile \
|
||||
examples/statusbar/statusbar.c \
|
||||
examples/table/Makefile \
|
||||
examples/table/table.c \
|
||||
examples/text/Makefile \
|
||||
examples/text/text.c \
|
||||
examples/tictactoe/Makefile \
|
||||
examples/tictactoe/tictactoe.c \
|
||||
examples/tictactoe/tictactoe.h \
|
||||
examples/tictactoe/ttt_test.c \
|
||||
examples/tree/Makefile \
|
||||
examples/tree/tree.c \
|
||||
examples/wheelbarrow/Makefile \
|
||||
examples/wheelbarrow/wheelbarrow.c \
|
||||
examples/fixed/fixed.c \
|
||||
examples/fixed/Makefile \
|
||||
examples/frame/frame.c \
|
||||
examples/frame/Makefile \
|
||||
examples/spinbutton/spinbutton.c \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/INSTALL \
|
||||
$(srcdir)/README \
|
||||
@@ -57,37 +143,37 @@ MAINTAINERCLEANFILES = \
|
||||
GDKTARGET=@gdktarget@
|
||||
|
||||
## Copy .pc files to target-specific names
|
||||
gtk+-$(GDKTARGET)-3.0.pc: gtk+-3.0.pc
|
||||
rm -f gtk+-$(GDKTARGET)-3.0.pc && \
|
||||
cp gtk+-3.0.pc gtk+-$(GDKTARGET)-3.0.pc
|
||||
gtk+-$(GDKTARGET)-2.0.pc: gtk+-2.0.pc
|
||||
rm -f gtk+-$(GDKTARGET)-2.0.pc && \
|
||||
cp gtk+-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
|
||||
|
||||
gdk-$(GDKTARGET)-3.0.pc: gdk-3.0.pc
|
||||
rm -f gdk-$(GDKTARGET)-3.0.pc && \
|
||||
cp gdk-3.0.pc gdk-$(GDKTARGET)-3.0.pc
|
||||
gdk-$(GDKTARGET)-2.0.pc: gdk-2.0.pc
|
||||
rm -f gdk-$(GDKTARGET)-2.0.pc && \
|
||||
cp gdk-2.0.pc gdk-$(GDKTARGET)-2.0.pc
|
||||
|
||||
gtk+-$(GDKTARGET)-3.0-uninstalled.pc: gtk+-3.0-uninstalled.pc
|
||||
rm -f gtk+-$(GDKTARGET)-3.0-uninstalled.pc && \
|
||||
cp gtk+-3.0-uninstalled.pc gtk+-$(GDKTARGET)-3.0-uninstalled.pc
|
||||
gtk+-$(GDKTARGET)-2.0-uninstalled.pc: gtk+-2.0-uninstalled.pc
|
||||
rm -f gtk+-$(GDKTARGET)-2.0-uninstalled.pc && \
|
||||
cp gtk+-2.0-uninstalled.pc gtk+-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
gdk-$(GDKTARGET)-3.0-uninstalled.pc: gdk-3.0-uninstalled.pc
|
||||
rm -f gdk-$(GDKTARGET)-3.0-uninstalled.pc && \
|
||||
cp gdk-3.0-uninstalled.pc gdk-$(GDKTARGET)-3.0-uninstalled.pc
|
||||
gdk-$(GDKTARGET)-2.0-uninstalled.pc: gdk-2.0-uninstalled.pc
|
||||
rm -f gdk-$(GDKTARGET)-2.0-uninstalled.pc && \
|
||||
cp gdk-2.0-uninstalled.pc gdk-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-$(GDKTARGET)-3.0.pc gtk+-$(GDKTARGET)-3.0.pc gail-3.0.pc
|
||||
pkgconfig_DATA= gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc gail.pc
|
||||
|
||||
if OS_UNIX
|
||||
pkgconfig_DATA += gtk+-unix-print-3.0.pc
|
||||
pkgconfig_DATA += gtk+-unix-print-2.0.pc
|
||||
endif
|
||||
|
||||
DISTCLEANFILES = \
|
||||
gtk+-unix-print-3.0.pc \
|
||||
gtk+-$(GDKTARGET)-3.0.pc \
|
||||
gdk-$(GDKTARGET)-3.0.pc \
|
||||
gail-3.0.pc \
|
||||
gtk+-$(GDKTARGET)-3.0-uninstalled.pc \
|
||||
gdk-$(GDKTARGET)-3.0-uninstalled.pc \
|
||||
gail-3.0-uninstalled.pc \
|
||||
gtk+-unix-print-2.0.pc \
|
||||
gtk+-$(GDKTARGET)-2.0.pc \
|
||||
gdk-$(GDKTARGET)-2.0.pc \
|
||||
gail.pc \
|
||||
gtk+-$(GDKTARGET)-2.0-uninstalled.pc \
|
||||
gdk-$(GDKTARGET)-2.0-uninstalled.pc \
|
||||
gail-uninstalled.pc \
|
||||
config.lt
|
||||
|
||||
distclean-local:
|
||||
@@ -109,21 +195,21 @@ ChangeLog:
|
||||
echo A git checkout and git-log is required to generate this file >> $@); \
|
||||
fi
|
||||
|
||||
## copy the default target for this platform to gdk-3.0.pc and gtk+-3.0.pc
|
||||
## copy the default target for this platform to gdk-2.0.pc and gtk+-2.0.pc
|
||||
DEFAULT_GDKTARGET=x11
|
||||
install-data-hook:
|
||||
(cd $(DESTDIR)$(pkgconfigdir) && \
|
||||
test -f gdk-$(DEFAULT_GDKTARGET)-3.0.pc && \
|
||||
test -f gtk+-$(DEFAULT_GDKTARGET)-3.0.pc && \
|
||||
rm -f gdk-3.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-3.0.pc gdk-3.0.pc && \
|
||||
rm -f gtk+-3.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-3.0.pc gtk+-3.0.pc) || \
|
||||
test -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc && \
|
||||
test -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc && \
|
||||
rm -f gdk-2.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc gdk-2.0.pc && \
|
||||
rm -f gtk+-2.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc gtk+-2.0.pc) || \
|
||||
(cd $(DESTDIR)$(pkgconfigdir) && \
|
||||
rm -f gdk-3.0.pc && cp -f gdk-$(GDKTARGET)-3.0.pc gdk-3.0.pc && \
|
||||
rm -f gtk+-3.0.pc && cp -f gtk+-$(GDKTARGET)-3.0.pc gtk+-3.0.pc)
|
||||
rm -f gdk-2.0.pc && cp -f gdk-$(GDKTARGET)-2.0.pc gdk-2.0.pc && \
|
||||
rm -f gtk+-2.0.pc && cp -f gtk+-$(GDKTARGET)-2.0.pc gtk+-2.0.pc)
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gdk-3.0.pc
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-3.0.pc
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gdk-2.0.pc
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-2.0.pc
|
||||
|
||||
dist-hook:
|
||||
if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
|
||||
@@ -157,11 +243,7 @@ sanity:
|
||||
snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-gtk-doc \
|
||||
--enable-man \
|
||||
--disable-rebuilds \
|
||||
--enable-introspection
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds --enable-introspection
|
||||
|
||||
GITIGNOREFILES = \
|
||||
po-properties/Makefile.in.in \
|
||||
|
||||
16
README.in
16
README.in
@@ -111,11 +111,15 @@ Release notes for 2.14
|
||||
to GTK_SENSITIVITY_ON, so that the button is always sensitive or
|
||||
GTK_SENSITIVITY_OFF to make it insensitive respectively.
|
||||
|
||||
* GtkAdjustment now enforces that values are restricted to the
|
||||
range [lower, upper - page_size]. This has always been the documented
|
||||
behaviour, and the recommended practice is to set page_size to 0
|
||||
when using adjustments for simple scalar values, like in a slider
|
||||
or spin button.
|
||||
* In the early 2.14.x releases, GtkAdjustment was changed to enforce
|
||||
that values are restricted to the range [lower, upper - page_size].
|
||||
This has always been the documented behaviour, and the recommended
|
||||
practice is to set page_size to 0 when using adjustments for simple
|
||||
scalar values, like in a slider or spin button.
|
||||
Due to the large number of applications that are affected by this
|
||||
change, the behaviour has been reverted to the old behaviour in
|
||||
2.14.3, with an explicit warning that this change will be
|
||||
reintroduced in 2.90.
|
||||
|
||||
* gdk-pixbuf will use GIO for mime type detection if possible. For
|
||||
this to work, shared-mime-info needs to be installed and XDG_DATA_DIRS
|
||||
@@ -254,7 +258,7 @@ Release notes for 2.10
|
||||
GTK_OBJECT_IS_FLOATING() will still work, but direct checking
|
||||
of the GTK_FLOATING flag will no longer detect the floating
|
||||
reference. Details about floating references can be found in the docs:
|
||||
http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#floating-ref
|
||||
http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#floating-ref
|
||||
|
||||
* Accelerators like (_F) are now stripped from labels when they are
|
||||
displayed in toolbars. If this is not wanted, the feature can be
|
||||
|
||||
26
README.win32
26
README.win32
@@ -7,9 +7,18 @@ Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
|
||||
zlib, libtiff at least. See
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
dependencies: GDK-Pixbuf, Pango, atk, glib, gettext-runtime, libiconv
|
||||
at least. See
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies.
|
||||
|
||||
For people compiling GTK+ on Visual C++ 2005 or later, it is recommended
|
||||
that you build GDK-Pixbuf, Pango, atk, glib with the same compiler to avoid
|
||||
crashes and errors caused by the usage of different CRTS. VS 2008
|
||||
project files and/or VS Makefiles are either already available in these
|
||||
packages or will be available in the next stable release. Unfortunately
|
||||
compiling with Microsoft's compilers (version 2003 or earlier) is not
|
||||
supported as compiling GLib requires features from the newer compilers
|
||||
and/or the newer Platform SDKs at this time of writing.
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
@@ -147,11 +156,19 @@ Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||
makefile.msc files, and the makefile snippets in build/win32.
|
||||
|
||||
Since this release, there are also Visual Studio 9 (2008) Project Files
|
||||
that can be used to compile GTK+. They can be found in ./build/win32/vs9
|
||||
for usage, and should build GTK+ out of the box provided the afore-mentioned
|
||||
compile-time dependencies are installed. The VS2008 Solution and Project
|
||||
files are currently maintained by Chun-wei Fan, and they currently build
|
||||
GDK with the Win32 backend, GTK+ and the gtk-demo demonstration program
|
||||
(GAIL and GAIL-utils are not built with this method yet)
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
I use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
I (Tor) use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
makefiles. At times, we disagree a bit about various issues, and for
|
||||
instance the makefile.msc files might not produce identically named
|
||||
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
@@ -182,3 +199,4 @@ sources. Unfortunately it seems that only Wacom tablets come with
|
||||
support for the Wintab API nowadays.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
--Updated by Fan, Chun-wei <fanc999@yahoo.com.tw>
|
||||
|
||||
13
autogen.sh
13
autogen.sh
@@ -19,14 +19,14 @@ if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
|
||||
sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
|
||||
-e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
2.*)
|
||||
1.4*|1.5*|2.2*|2.4*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_libtool ; then : ; else
|
||||
echo
|
||||
echo "You must have libtool 2.2 installed to compile $PROJECT."
|
||||
echo "You must have libtool 1.4 installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
|
||||
DIE=1
|
||||
@@ -54,14 +54,18 @@ if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
else if automake-1.10 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.10
|
||||
ACLOCAL=aclocal-1.10
|
||||
else if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
else
|
||||
echo
|
||||
echo "You must have automake 1,10.x or 1.11.x installed to compile $PROJECT."
|
||||
echo "You must have automake 1.7.x, 1,10.x or 1.11.x installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
|
||||
DIE=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
@@ -110,11 +114,10 @@ rm -rf autom4te.cache
|
||||
# regenerated from their corresponding *.in files by ./configure anyway.
|
||||
touch README INSTALL
|
||||
|
||||
gtkdocize || exit $?
|
||||
|
||||
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
|
||||
|
||||
libtoolize --force || exit $?
|
||||
gtkdocize || exit $?
|
||||
|
||||
autoheader || exit $?
|
||||
|
||||
|
||||
166
build/win32/vs9/gdk-pixbuf-csource.vcproj
Normal file
166
build/win32/vs9/gdk-pixbuf-csource.vcproj
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="gdk-pixbuf-csource"
|
||||
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}"
|
||||
RootNamespace="gdkpixbufcsource"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-csource.c" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
166
build/win32/vs9/gdk-pixbuf-query-loaders.vcproj
Normal file
166
build/win32/vs9/gdk-pixbuf-query-loaders.vcproj
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gdk-pixbuf-query-loaders"
|
||||
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}"
|
||||
RootNamespace="gdkpixbufqueryloaders"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND;$(GtkPrefixDefine);$(GdkPixbufLibdirDefine)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\queryloaders.c" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
258
build/win32/vs9/gdk-pixbuf.vcproj
Normal file
258
build/win32/vs9/gdk-pixbuf.vcproj
Normal file
@@ -0,0 +1,258 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gdk_pixbuf"
|
||||
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}"
|
||||
RootNamespace="gdk_pixbuf"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="0"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkPixbufDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libpng.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="$(GdkPixbufDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libpng.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkPixbufDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libpng.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="$(GdkPixbufDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libpng.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf.symbols"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gdk-pixbuf.def"
|
||||
CommandLine="$(GtkGenerateGdkPixbufDef)"
|
||||
Outputs="$(IntDir)\gdk-pixbuf.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gdk-pixbuf.def"
|
||||
CommandLine="$(GtkGenerateGdkPixbufDef)"
|
||||
Outputs="$(IntDir)\gdk-pixbuf.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gdk-pixbuf.def"
|
||||
CommandLine="$(GtkGenerateGdkPixbufDef)"
|
||||
Outputs="$(IntDir)\gdk-pixbuf.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gdk-pixbuf.def"
|
||||
CommandLine="$(GtkGenerateGdkPixbufDef)"
|
||||
Outputs="$(IntDir)\gdk-pixbuf.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-aliasdef.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-animation.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-data.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-enum-types.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-io.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-loader.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-scale.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-scaled-anim.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-simple-anim.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-util.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixdata.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-ani.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-ani-animation.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-utils.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-animation.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-bmp.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-emf.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-gif.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-ico.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-jpeg.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-tiff.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-wmf.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gif-animation.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-icns.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-pcx.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-png.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-pnm.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-ras.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-tga.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-wbmp.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-xbm.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-xpm.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\pixops\pixops.c" />
|
||||
</Filter>
|
||||
</Files>
|
||||
</VisualStudioProject>
|
||||
@@ -134,6 +134,7 @@
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkgeometry-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkglobals-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkim-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkimage-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkinput-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkinput.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkkeys-win32.c" />
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -63,7 +63,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GdkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -96,7 +96,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -128,7 +128,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GdkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\GdkPixbuf-2.0"
|
||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
||||
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||
/>
|
||||
@@ -31,7 +31,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkApiVersion"
|
||||
Value="3.0"
|
||||
Value="2.0"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkBinaryVersion"
|
||||
@@ -55,7 +55,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDefines"
|
||||
Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs9\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\";$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(GtkApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\";GDK_DISABLE_DEPRECATED"
|
||||
Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs9\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\";$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(GtkApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstall"
|
||||
@@ -64,14 +64,14 @@ echo on

|
||||
mkdir $(OutDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(OutDir)\bin

|
||||
|
||||
mkdir $(OutDir)\bin\gtk3-demo

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.c $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.h $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.png $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(OutDir)\bin\gtk3-demo

|
||||
mkdir $(OutDir)\bin\gtk-demo

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.png $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.c $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.h $(OutDir)\bin\gtk-demo

|
||||
|
||||
mkdir $(OutDir)\lib

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib

|
||||
@@ -82,29 +82,30 @@ copy ..\..\..\gdk\gdkapplaunchcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\g
|
||||
copy ..\..\..\gdk\gdkcairo.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkcolor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkcursor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdevice.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdevicemanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdisplay.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdisplaymanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdrawable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkenumtypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkevents.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkfont.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkgc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdki18n.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkimage.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkinput.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkkeys.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkkeysyms.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkkeysyms-compat.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkpango.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkpixmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkproperty.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkrectangle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkrgba.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkregion.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkrgb.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkscreen.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkspawn.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkthreads.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdktypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkvisual.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\win32\gdkwin32.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
@@ -114,7 +115,6 @@ mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtk.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaboutdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccelgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccelgroupprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccellabel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccelmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccessible.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -123,7 +123,6 @@ copy ..\..\..\gtk\gtkactiongroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x
|
||||
copy ..\..\..\gtk\gtkactivatable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkadjustment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkalignment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkapplication.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkarrow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaspectframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkassistant.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -150,12 +149,17 @@ copy ..\..\..\gtk\gtkcellview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
|
||||
copy ..\..\..\gtk\gtkcheckbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcheckmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkclipboard.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkclist.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcolorbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcolorsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcolorseldialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcombo.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcombobox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcomboboxentry.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcomboboxtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcontainer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkctree.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcurve.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdebug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -172,11 +176,13 @@ copy ..\..\..\gtk\gtkfilechooserbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\
|
||||
copy ..\..\..\gtk\gtkfilechooserdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfilechooserwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfilefilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfilesel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfixed.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfontbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfontsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkgrid.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkgamma.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkgc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhandlebox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -196,12 +202,18 @@ copy ..\..\..\gtk\gtkimcontextsimple.h $(OutDir)\include\gtk-$(GtkApiVersion)\gt
|
||||
copy ..\..\..\gtk\gtkimmodule.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkimmulticontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkinfobar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkinputdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkinvisible.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkitemfactory.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklabel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklayout.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklinkbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklist.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklistitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkliststore.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmarshal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmenubar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -212,17 +224,22 @@ copy ..\..\..\gtk\gtkmisc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
�
|
||||
copy ..\..\..\gtk\gtkmodules.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmountoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtknotebook.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkobject.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkoffscreenwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkoldeditable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkoptionmenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkorientable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpagesetup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpaned.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpapersize.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpixmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkplug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpreview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprintcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprintoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprintoperationpreview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprintsettings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprogress.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprogressbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkradioaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkradiobutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -240,7 +257,6 @@ copy ..\..\..\gtk\gtkrecentmanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&
|
||||
copy ..\..\..\gtk\gtkruler.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscalebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscrollable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscrollbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscrolledwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -249,8 +265,8 @@ copy ..\..\..\gtk\gtkseparatormenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\
|
||||
copy ..\..\..\gtk\gtkseparatortoolitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksettings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkshow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksignal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksizegroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksizerequest.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksocket.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkspinbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkspinner.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -261,6 +277,7 @@ copy ..\..\..\gtk\gtkstyle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
&#x
|
||||
copy ..\..\..\gtk\gtktable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktearoffmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextbuffer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextbufferrichtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextchild.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -271,6 +288,7 @@ copy ..\..\..\gtk\gtktextmark.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
|
||||
copy ..\..\..\gtk\gtktexttag.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktexttagtable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktipsquery.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktoggleaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktogglebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktoggletoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -281,7 +299,10 @@ copy ..\..\..\gtk\gtktoolitemgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&
|
||||
copy ..\..\..\gtk\gtktoolpalette.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktoolshell.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktooltip.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktooltips.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktree.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreednd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreeitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreemodel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreemodelfilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreemodelsort.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -316,6 +337,10 @@ copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\l
|
||||
Name="GtkGenerateGdkDef"
|
||||
Value="echo EXPORTS >"$(IntDir)\gdk.def" && cl /EP -DGDK_WINDOWING_WIN32 -DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols >>"$(IntDir)\gdk.def""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGenerateGtkDefW64"
|
||||
Value="echo EXPORTS >"$(IntDir)\gtk.def" && cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -D_WIN64 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(IntDir)\gtk.def""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGenerateGtkDef"
|
||||
Value="echo EXPORTS >"$(IntDir)\gtk.def" && cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(IntDir)\gtk.def""
|
||||
@@ -334,7 +359,7 @@ copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\l
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkSeparateVS9DllSuffix"
|
||||
Value="-3-vs9"
|
||||
Value="-2-vs9"
|
||||
/>
|
||||
<!-- Change these two to GtkLibtoolCompatibleDllPrefix and
|
||||
GtkLibtoolCompatibleDllSuffix if that is what you want -->
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gtk"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="_DEBUG;$(GtkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -63,7 +63,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GtkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -96,7 +96,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="_DEBUG;$(GtkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -128,7 +128,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GtkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -183,7 +183,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gtk.def"
|
||||
CommandLine="$(GtkGenerateGtkDef)"
|
||||
CommandLine="$(GtkGenerateGtkDefW64)"
|
||||
Outputs="$(IntDir)\gtk.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -203,7 +203,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gtk.def"
|
||||
CommandLine="$(GtkGenerateGtkDef)"
|
||||
CommandLine="$(GtkGenerateGtkDefW64)"
|
||||
Outputs="$(IntDir)\gtk.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
# require autoconf 2.54
|
||||
AC_PREREQ(2.62)
|
||||
|
||||
# Making releases:
|
||||
# GTK_MICRO_VERSION += 1;
|
||||
@@ -9,24 +11,15 @@
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [91])
|
||||
m4_define([gtk_micro_version], [6])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_minor_version], [24])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_interface_age], [2])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
[gtk_major_version.gtk_minor_version.gtk_micro_version])
|
||||
# This is the X.Y used in -lgtk-FOO-X.Y
|
||||
m4_define([gtk_api_version], [3.0])
|
||||
|
||||
AC_PREREQ([2.64])
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[gtk+])
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
m4_define([gtk_api_version], [2.0])
|
||||
|
||||
# Define a string for the earliest version that this release has
|
||||
# backwards binary compatibility with for all interfaces a module
|
||||
@@ -35,39 +28,38 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||
# for GTK+.
|
||||
#
|
||||
#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
|
||||
m4_define([gtk_binary_version], [3.0.0])
|
||||
m4_define([gtk_binary_version], [2.10.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.27.3])
|
||||
m4_define([pango_required_version], [1.20])
|
||||
m4_define([atk_required_version], [1.29.2])
|
||||
m4_define([cairo_required_version], [1.10.0])
|
||||
m4_define([gdk_pixbuf_required_version], [2.21.0])
|
||||
GLIB_REQUIRED_VERSION=glib_required_version
|
||||
PANGO_REQUIRED_VERSION=pango_required_version
|
||||
ATK_REQUIRED_VERSION=atk_required_version
|
||||
CAIRO_REQUIRED_VERSION=cairo_required_version
|
||||
GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
|
||||
AC_SUBST(GLIB_REQUIRED_VERSION)
|
||||
AC_SUBST(PANGO_REQUIRED_VERSION)
|
||||
AC_SUBST(ATK_REQUIRED_VERSION)
|
||||
AC_SUBST(CAIRO_REQUIRED_VERSION)
|
||||
AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
|
||||
m4_define([cairo_required_version], [1.6])
|
||||
+m4_define([gdk_pixbuf_required_version], [2.21.0])
|
||||
|
||||
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[gtk+])
|
||||
|
||||
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
AM_INIT_AUTOMAKE([1.10 no-define -Wno-portability dist-bzip2])
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
AM_INIT_AUTOMAKE([no-define -Wno-portability dist-bzip2])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# Support silent build rules, requires at least automake-1.11. Disable
|
||||
# by either passing --disable-silent-rules to configure or passing V=1
|
||||
# Support silent build rules, requires at least automake-1.11. Enable
|
||||
# by either passing --enable-silent-rules to configure or passing V=0
|
||||
# to make
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
|
||||
|
||||
#
|
||||
# For each of the libraries we build, we define the following
|
||||
|
||||
# substituted variables:
|
||||
#
|
||||
# foo_PACKAGES: pkg-config packages this library requires
|
||||
@@ -109,23 +101,15 @@ LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
|
||||
AC_SUBST(LT_VERSION_INFO)
|
||||
AC_SUBST(LT_CURRENT_MINUS_AGE)
|
||||
|
||||
m4_define([gail_lt_current],[0])
|
||||
m4_define([gail_lt_revision],[0])
|
||||
m4_define([gail_lt_current],[18])
|
||||
m4_define([gail_lt_revision],[1])
|
||||
m4_define([gail_lt_age],[0])
|
||||
m4_define([gail_lt_version_info],[gail_lt_current:gail_lt_revision:gail_lt_age])
|
||||
m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
|
||||
AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
|
||||
AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C_O
|
||||
AC_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
|
||||
GETTEXT_PACKAGE=gtk30
|
||||
GETTEXT_PACKAGE=gtk20
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||
[The prefix for our gettext translation domains.])
|
||||
@@ -163,12 +147,17 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl Initialize libtool
|
||||
AC_PROG_CC
|
||||
AM_DISABLE_STATIC
|
||||
|
||||
dnl
|
||||
dnl Check for a working C++ compiler, but do not bail out, if none is found.
|
||||
dnl We use this for an automated test for C++ header correctness.
|
||||
dnl
|
||||
dnl
|
||||
AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
|
||||
AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
|
||||
@@ -178,7 +167,7 @@ CXXFLAGS="$CXXFLAGS -x objective-c++"
|
||||
AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
|
||||
AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
|
||||
CXXFLAGS="$gtk_save_cxxflags"
|
||||
AC_LANG_POP([C++])
|
||||
AC_LANG_RESTORE
|
||||
|
||||
if test "$os_win32" = "yes"; then
|
||||
if test x$enable_static = xyes -o x$enable_static = x; then
|
||||
@@ -191,11 +180,11 @@ if test "$os_win32" = "yes"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
|
||||
dnl Initialize libtool
|
||||
LT_PREREQ([2.2.6])
|
||||
LT_INIT([disable-static win32-dll])
|
||||
# Create libtool early, because it's used in configure
|
||||
LT_OUTPUT
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
dnl when using libtool 2.x create libtool early, because it's used in configure
|
||||
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
|
||||
|
||||
|
||||
# Make sure we use 64-bit versions of various file stuff.
|
||||
AC_SYS_LARGEFILE
|
||||
@@ -203,6 +192,9 @@ AC_SYS_LARGEFILE
|
||||
AM_PROG_AS
|
||||
AC_PATH_PROG(NM, nm, nm)
|
||||
|
||||
dnl Initialize maintainer mode
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_MSG_CHECKING([for some Win32 platform])
|
||||
case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
@@ -236,6 +228,10 @@ AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
|
||||
[turn on debugging @<:@default=debug_default@:>@]),,
|
||||
enable_debug=debug_default)
|
||||
AC_ARG_ENABLE(shm,
|
||||
[AC_HELP_STRING([--enable-shm],
|
||||
[support shared memory if available [default=yes]])],,
|
||||
[enable_shm="yes"])
|
||||
AC_ARG_ENABLE(xkb,
|
||||
[AC_HELP_STRING([--enable-xkb],
|
||||
[support XKB [default=maybe]])],,
|
||||
@@ -248,6 +244,10 @@ AC_ARG_ENABLE(rebuilds,
|
||||
[AC_HELP_STRING([--disable-rebuilds],
|
||||
[disable all source autogeneration rules])],,
|
||||
[enable_rebuilds=yes])
|
||||
AC_ARG_ENABLE(visibility,
|
||||
[AC_HELP_STRING([--disable-visibility],
|
||||
[don't use ELF visibility attributes])],,
|
||||
[enable_visibility=yes])
|
||||
|
||||
AC_ARG_WITH(xinput,
|
||||
[AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
|
||||
@@ -258,13 +258,13 @@ else
|
||||
gdktarget=x11
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz]] select non-default GDK target],
|
||||
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
|
||||
gdktarget=$with_gdktarget)
|
||||
|
||||
AC_SUBST(gdktarget)
|
||||
case $gdktarget in
|
||||
x11|win32|quartz) ;;
|
||||
*) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz or win32.]);;
|
||||
x11|win32|quartz|directfb) ;;
|
||||
*) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
|
||||
esac
|
||||
|
||||
gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
|
||||
@@ -275,7 +275,7 @@ AC_SUBST(gtktargetlib)
|
||||
|
||||
if test "x$enable_debug" = "xyes"; then
|
||||
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
||||
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
|
||||
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
|
||||
else
|
||||
if test "x$enable_debug" = "xno"; then
|
||||
GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
|
||||
@@ -285,13 +285,25 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if test "x$enable_visibility" = "xno"; then
|
||||
GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
|
||||
fi
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
|
||||
[Define if debugging is enabled])
|
||||
|
||||
|
||||
|
||||
# Build time sanity check...
|
||||
AM_SANITY_CHECK
|
||||
|
||||
# Checks for programs.
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
@@ -313,7 +325,7 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES"
|
||||
CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
|
||||
|
||||
# Ensure MSVC-compatible struct packing convention is used when
|
||||
# compiling for Win32 with gcc.
|
||||
@@ -350,18 +362,20 @@ if test x"$os_win32" = xyes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
## Initial sanity check, done here so that users get told they
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
## Initial sanity check, done here so that users get told they
|
||||
## have the wrong dependencies as early in the process as possible.
|
||||
## Later on we actually use the cflags/libs from separate pkg-config
|
||||
## calls. Oh, also the later pkg-config calls don't include
|
||||
## the version requirements since those make the module lists
|
||||
## calls. Oh, also the later pkg-config calls don't include
|
||||
## the version requirements since those make the module lists
|
||||
## annoying to construct
|
||||
PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
[glib-2.0 >= glib_required_version dnl
|
||||
atk >= atk_required_version dnl
|
||||
pango >= pango_required_version dnl
|
||||
cairo >= cairo_required_version dnl
|
||||
cairo-gobject >= cairo_required_version dnl
|
||||
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
|
||||
|
||||
## In addition to checking that cairo is present, we also need to
|
||||
@@ -391,7 +405,7 @@ dnl ******************************************************
|
||||
dnl * See whether to include shared library dependencies *
|
||||
dnl ******************************************************
|
||||
|
||||
AC_ARG_ENABLE(explicit-deps,
|
||||
AC_ARG_ENABLE(explicit-deps,
|
||||
[AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
|
||||
[use explicit dependencies in .pc files [default=auto]])],,
|
||||
[enable_explicit_deps=auto])
|
||||
@@ -402,12 +416,12 @@ case $enable_explicit_deps in
|
||||
export SED
|
||||
deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
|
||||
if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
|
||||
enable_explicit_deps=yes
|
||||
enable_explicit_deps=yes
|
||||
else
|
||||
enable_explicit_deps=no
|
||||
enable_explicit_deps=no
|
||||
fi
|
||||
;;
|
||||
yes|no)
|
||||
yes|no)
|
||||
;;
|
||||
*) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
|
||||
;;
|
||||
@@ -482,6 +496,18 @@ if test "$gtk_ok" = "yes"; then
|
||||
AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
|
||||
[Define if _NL_PAPER_WIDTH is available])
|
||||
fi
|
||||
|
||||
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
|
||||
AC_MSG_CHECKING(for sigsetjmp)
|
||||
AC_TRY_LINK([#include <setjmp.h>], [
|
||||
sigjmp_buf env;
|
||||
sigsetjmp(env, 0);
|
||||
], gtk_ok=yes, gtk_ok=no)
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
if test "$gtk_ok" = "yes"; then
|
||||
AC_DEFINE(HAVE_SIGSETJMP, 1,
|
||||
[Define to 1 if sigsetjmp is available])
|
||||
fi
|
||||
|
||||
# i18n stuff
|
||||
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
|
||||
@@ -513,7 +539,7 @@ dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
|
||||
|
||||
AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
|
||||
|
||||
dnl The DU4 header files don't provide library prototypes unless
|
||||
dnl The DU4 header files don't provide library prototypes unless
|
||||
dnl -std1 is given to the native cc.
|
||||
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
|
||||
|
||||
@@ -577,13 +603,13 @@ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
||||
|
||||
#
|
||||
# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
|
||||
#
|
||||
#
|
||||
|
||||
GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
|
||||
|
||||
AM_PATH_GLIB_2_0(glib_required_version, :,
|
||||
AC_MSG_ERROR([
|
||||
*** GLIB glib_required_version or better is required. The latest version of
|
||||
*** GLIB glib_required_version or better is required. The latest version of
|
||||
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
|
||||
gobject gmodule-no-export gthread)
|
||||
|
||||
@@ -738,7 +764,7 @@ if test x$enable_modules = xno; then
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_CHECKING(whether dynamic modules work)
|
||||
## for loop is to strip newline
|
||||
## for loop is to strip newline
|
||||
tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
|
||||
for I in $tmp; do
|
||||
dynworks=$I
|
||||
@@ -782,7 +808,7 @@ AC_ARG_WITH(included_immodules,
|
||||
[ --with-included-immodules=MODULE1,MODULE2,...
|
||||
build the specified input methods into gtk])
|
||||
|
||||
if $dynworks; then
|
||||
if $dynworks; then
|
||||
:
|
||||
else
|
||||
## if the option was specified, leave it; otherwise disable included immodules
|
||||
@@ -852,7 +878,7 @@ AC_TYPE_SIGNAL
|
||||
# support.
|
||||
#
|
||||
AC_CHECK_HEADER(sys/systeminfo.h,
|
||||
AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
|
||||
AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
|
||||
[Define to 1 if sys/systeminfo.h is available]))
|
||||
AC_CHECK_HEADER(sys/sysinfo.h,
|
||||
AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
|
||||
@@ -893,11 +919,11 @@ fi
|
||||
|
||||
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
|
||||
|
||||
if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
|
||||
if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
|
||||
test "x$REBUILD_PNGS" = "x#" ; then
|
||||
AC_MSG_ERROR([
|
||||
*** gtkbuiltincache.h is not in the tree, and cannot be built
|
||||
*** because you don't have libpng, or (when cross-compiling) you
|
||||
*** because you don't have libpng, or (when cross-compiling) you
|
||||
*** don't have a prebuilt gtk-update-icon-cache on the build system.])
|
||||
fi
|
||||
|
||||
@@ -907,7 +933,7 @@ fi
|
||||
|
||||
GDK_EXTRA_LIBS="$GDK_WLIBS"
|
||||
GDK_EXTRA_CFLAGS=
|
||||
|
||||
|
||||
# GTK+ uses some X calls, so needs to link against X directly
|
||||
GTK_DEP_PACKAGES_FOR_X=
|
||||
GTK_DEP_LIBS_FOR_X=
|
||||
@@ -927,17 +953,17 @@ if test "x$gdktarget" = "xx11"; then
|
||||
#
|
||||
# Check for basic X packages; we use pkg-config if available
|
||||
#
|
||||
if $PKG_CONFIG --exists x11 xext; then
|
||||
if $PKG_CONFIG --exists x11 xext xrender; then
|
||||
have_base_x_pc=true
|
||||
X_PACKAGES="$X_PACKAGES x11 xext"
|
||||
x_libs="`$PKG_CONFIG --libs x11 xext`"
|
||||
X_CFLAGS="`$PKG_CONFIG --cflags x11 xext`"
|
||||
|
||||
X_PACKAGES="$X_PACKAGES x11 xext xrender"
|
||||
x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
|
||||
X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
|
||||
|
||||
# Strip out any .la files that pkg-config might give us (this happens
|
||||
# with -uninstalled.pc files)
|
||||
x_libs_for_checks=
|
||||
for I in $x_libs ; do
|
||||
case $I in
|
||||
case $I in
|
||||
*.la) ;;
|
||||
*) x_libs_for_checks="$x_libs_for_checks $I" ;;
|
||||
esac
|
||||
@@ -950,11 +976,11 @@ if test "x$gdktarget" = "xx11"; then
|
||||
if test x$no_x = xyes ; then
|
||||
AC_MSG_ERROR([X development libraries not found])
|
||||
fi
|
||||
|
||||
|
||||
x_cflags="$X_CFLAGS"
|
||||
x_libs_for_checks="$X_LIBS -lXext -lX11 $X_EXTRA_LIBS"
|
||||
x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
|
||||
|
||||
GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
|
||||
fi
|
||||
|
||||
# Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
|
||||
@@ -965,7 +991,7 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
gtk_save_LIBS=$LIBS
|
||||
LIBS="$x_libs_for_checks $LIBS"
|
||||
|
||||
|
||||
# Sanity check for the X11 and Xext libraries. While everything we need from
|
||||
# Xext is optional, the chances a system has *none* of these things is so
|
||||
# small that we just unconditionally require it.
|
||||
@@ -973,6 +999,8 @@ if test "x$gdktarget" = "xx11"; then
|
||||
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
|
||||
AC_CHECK_FUNC(XextFindDisplay, :,
|
||||
AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
|
||||
AC_CHECK_FUNC(XRenderQueryExtension, :,
|
||||
AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
|
||||
|
||||
# Check for xReply
|
||||
|
||||
@@ -995,9 +1023,9 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
# Generic X11R6 check needed for XIM support; we could
|
||||
# probably use this to replace the above, but we'll
|
||||
# leave the separate checks for XConvertCase and XInternAtoms
|
||||
# leave the separate checks for XConvertCase and XInternAtoms
|
||||
# for clarity
|
||||
|
||||
|
||||
have_x11r6=false
|
||||
AC_CHECK_FUNC(XAddConnectionWatch,
|
||||
have_x11r6=true)
|
||||
@@ -1027,7 +1055,7 @@ if test "x$gdktarget" = "xx11"; then
|
||||
# X SYNC check
|
||||
gtk_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $x_cflags"
|
||||
|
||||
|
||||
AC_CHECK_FUNC(XSyncQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/sync.h,
|
||||
AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
|
||||
@@ -1035,21 +1063,69 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
CFLAGS="$gtk_save_CFLAGS"
|
||||
|
||||
# Xshm checks
|
||||
|
||||
if test "x$enable_shm" = "xyes"; then
|
||||
# Check for the XShm extension, normally in Xext
|
||||
AC_CHECK_FUNC(XShmAttach,
|
||||
:,
|
||||
# On AIX, it is in XextSam instead
|
||||
[AC_CHECK_LIB(XextSam, XShmAttach,
|
||||
[GTK_ADD_LIB(x_extra_libs,XextSam)])])
|
||||
fi
|
||||
|
||||
if test "x$enable_shm" = "xyes"; then
|
||||
# Check for shared memory
|
||||
AC_CHECK_HEADER(sys/ipc.h,
|
||||
AC_DEFINE(HAVE_IPC_H, 1,
|
||||
[Define to 1 if ipc.h is available]),
|
||||
no_sys_ipc=yes)
|
||||
AC_CHECK_HEADER(sys/shm.h,
|
||||
AC_DEFINE(HAVE_SHM_H, 1,
|
||||
[Define to 1 if shm.h is available]),
|
||||
no_sys_shm=yes)
|
||||
|
||||
# Check for the X shared memory extension header file
|
||||
have_xshm=no
|
||||
AC_MSG_CHECKING(X11/extensions/XShm.h)
|
||||
if test "x$no_xext_lib" = "xyes"; then
|
||||
:
|
||||
else
|
||||
gtk_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $x_cflags"
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
|
||||
CFLAGS="$gtk_save_CFLAGS"
|
||||
fi
|
||||
AC_MSG_RESULT($have_xshm)
|
||||
if test $have_xshm = yes ; then
|
||||
AC_DEFINE(HAVE_XSHM_H, 1,
|
||||
[Define to 1 if xshm.h is available])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_xinerama" = "xyes"; then
|
||||
# Check for Xinerama extension (Solaris impl or Xfree impl)
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $x_cflags"
|
||||
|
||||
|
||||
# Check for XFree
|
||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||
|
||||
|
||||
have_xfree_xinerama=false
|
||||
if $PKG_CONFIG --exists xinerama ; then
|
||||
have_xfree_xinerama=true
|
||||
X_PACKAGES="$X_PACKAGES xinerama"
|
||||
else
|
||||
else
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
[GTK_ADD_LIB(x_extra_libs,Xinerama)
|
||||
have_xfree_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
@@ -1068,13 +1144,13 @@ if test "x$gdktarget" = "xx11"; then
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
|
||||
|
||||
have_solaris_xinerama=false
|
||||
AC_CHECK_FUNC(XineramaGetInfo,
|
||||
[AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||
[have_solaris_xinerama=true], :,
|
||||
[have_solaris_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
|
||||
|
||||
if $have_solaris_xinerama ; then
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||
[Define to 1 if solaris xinerama is available])
|
||||
@@ -1090,25 +1166,24 @@ if test "x$gdktarget" = "xx11"; then
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# set up things for XInput
|
||||
if test "x$with_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
|
||||
have_xinput=yes
|
||||
|
||||
if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
|
||||
AC_DEFINE(XINPUT_XFREE, 1,
|
||||
[Define to 1 if XFree XInput should be used])
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xi"
|
||||
|
||||
AC_CHECK_HEADER(X11/extensions/XInput2.h,
|
||||
have_xinput2=yes; AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]))
|
||||
|
||||
if $PKG_CONFIG --exists xi ; then
|
||||
X_PACKAGES="$X_PACKAGES xi"
|
||||
else
|
||||
GTK_ADD_LIB(x_extra_libs, Xi)
|
||||
fi
|
||||
else
|
||||
AC_DEFINE(XINPUT_NONE, 1,
|
||||
[Define to 1 if no XInput should be used])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XINPUT_XFREE, test "x$have_xinput" = "xyes")
|
||||
AM_CONDITIONAL(XINPUT_2, test "x$have_xinput2" = "xyes")
|
||||
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
|
||||
|
||||
# Check for the RANDR extension
|
||||
if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
|
||||
@@ -1116,20 +1191,20 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xrandr"
|
||||
fi
|
||||
|
||||
|
||||
# Checks for Xcursor library
|
||||
|
||||
|
||||
if $PKG_CONFIG --exists xcursor ; then
|
||||
AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
|
||||
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xcursor"
|
||||
fi
|
||||
|
||||
# Checks for XFixes extension
|
||||
|
||||
|
||||
if $PKG_CONFIG --exists xfixes ; then
|
||||
AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
|
||||
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xfixes"
|
||||
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
|
||||
fi
|
||||
@@ -1166,7 +1241,6 @@ else
|
||||
XPACKAGES=
|
||||
|
||||
AM_CONDITIONAL(XINPUT_XFREE, false)
|
||||
AM_CONDITIONAL(XINPUT_2, false)
|
||||
AM_CONDITIONAL(USE_X11, false)
|
||||
AM_CONDITIONAL(HAVE_X11R6, false)
|
||||
fi
|
||||
@@ -1185,6 +1259,17 @@ else
|
||||
AM_CONDITIONAL(USE_QUARTZ, false)
|
||||
fi
|
||||
|
||||
if test "x$gdktarget" = "xdirectfb"; then
|
||||
DIRECTFB_REQUIRED_VERSION=1.0.0
|
||||
AC_MSG_CHECKING(for DirectFB)
|
||||
|
||||
PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
|
||||
AM_CONDITIONAL(USE_DIRECTFB, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_DIRECTFB, false)
|
||||
fi
|
||||
|
||||
|
||||
# Check for Pango flags
|
||||
|
||||
if test "x$gdktarget" = "xwin32"; then
|
||||
@@ -1224,9 +1309,9 @@ LDFLAGS="$saved_ldflags"
|
||||
|
||||
# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend cairo-gobject"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend"
|
||||
else
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend cairo-gobject"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend"
|
||||
fi
|
||||
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
|
||||
@@ -1276,12 +1361,12 @@ else
|
||||
LIBS="$gtk_save_LIBS"
|
||||
fi
|
||||
|
||||
GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
|
||||
GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0"
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
GTK_PACKAGES="$GTK_PACKAGES pangoft2"
|
||||
fi
|
||||
GTK_EXTRA_LIBS=
|
||||
GTK_EXTRA_CFLAGS=
|
||||
GTK_EXTRA_CFLAGS=
|
||||
GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS"
|
||||
GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES $GTK_PACKAGES` $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
|
||||
|
||||
@@ -1292,7 +1377,7 @@ fi
|
||||
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
|
||||
ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
|
||||
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
|
||||
CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
|
||||
CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
|
||||
|
||||
AC_SUBST(GTK_PACKAGES)
|
||||
AC_SUBST(GTK_EXTRA_LIBS)
|
||||
@@ -1328,7 +1413,7 @@ AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/un.h>]
|
||||
)
|
||||
case $struct_sockaddr_un_sun_len in
|
||||
case $struct_sockaddr_un_sun_len in
|
||||
true)
|
||||
AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
|
||||
[Have the sockaddr_un.sun_len member])
|
||||
@@ -1373,7 +1458,7 @@ else
|
||||
|
||||
if test $CUPS_API_MAJOR -gt 1 -o \
|
||||
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
|
||||
AC_DEFINE(HAVE_CUPS_API_1_2, 1,
|
||||
AC_DEFINE(HAVE_CUPS_API_1_2, 1,
|
||||
[Define to 1 if CUPS 1.2 API is available])
|
||||
fi
|
||||
|
||||
@@ -1438,17 +1523,17 @@ AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
|
||||
|
||||
if test "$os_win32" != "yes"; then
|
||||
AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
|
||||
*** Can't find cairo-ps.h. You must build Cairo with the
|
||||
*** Can't find cairo-ps.h. You must build Cairo with the
|
||||
*** postscript backend enabled.]))
|
||||
|
||||
AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
|
||||
*** Can't find cairo-svg.h. You must build Cairo with the
|
||||
*** svg backend enabled.]))
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$gtk_save_cppflags"
|
||||
|
||||
|
||||
|
||||
|
||||
AC_ARG_ENABLE(test-print-backend,
|
||||
[AC_HELP_STRING([--enable-test-print-backend],
|
||||
[build test print backend])],,
|
||||
@@ -1476,12 +1561,6 @@ if test -n "$export_dynamic"; then
|
||||
GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
fi
|
||||
|
||||
#############
|
||||
# GSettings #
|
||||
#############
|
||||
|
||||
GLIB_GSETTINGS
|
||||
|
||||
##################################################
|
||||
# GObject introspection
|
||||
##################################################
|
||||
@@ -1530,7 +1609,7 @@ AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
|
||||
cat > $outfile <<\_______EOF
|
||||
/* gdkconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify `configure.ac'
|
||||
* This is a generated file. Please modify `configure.in'
|
||||
*/
|
||||
|
||||
#ifndef GDKCONFIG_H
|
||||
@@ -1584,6 +1663,9 @@ elif test "x$gdktarget" = "xwin32" ; then
|
||||
elif test "x$gdktarget" = "xquartz" ; then
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_QUARTZ'
|
||||
elif test "x$gdktarget" = "xdirectfb" ; then
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_DIRECTFB'
|
||||
fi
|
||||
|
||||
if test x$gdk_wchar_h = xyes; then
|
||||
@@ -1598,48 +1680,27 @@ if test x$gdk_working_wctype = xno; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_BROKEN_WCTYPE 1"
|
||||
fi
|
||||
|
||||
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Check for -Bsymbolic-functions linker flag used to avoid
|
||||
dnl intra-library PLT jumps, if available.
|
||||
dnl
|
||||
AC_ARG_ENABLE(Bsymbolic,
|
||||
[AC_HELP_STRING([--disable-Bsymbolic],
|
||||
[avoid linking with -Bsymbolic])],,
|
||||
[SAVED_LDFLAGS="${LDFLAGS}"
|
||||
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
|
||||
LDFLAGS=-Wl,-Bsymbolic-functions
|
||||
AC_TRY_LINK([], [int main (void) { return 0; }],
|
||||
AC_MSG_RESULT(yes)
|
||||
enable_Bsymbolic=yes,
|
||||
AC_MSG_RESULT(no)
|
||||
enable_Bsymbolic=no)
|
||||
LDFLAGS="${SAVED_LDFLAGS}"])
|
||||
|
||||
if test "x${enable_Bsymbolic}" == "xyes"; then
|
||||
GTK_LINK_FLAGS=-Wl,-Bsymbolic-functions
|
||||
fi
|
||||
AC_SUBST(GTK_LINK_FLAGS)
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
config.h.win32
|
||||
gtk-zip.sh
|
||||
Makefile
|
||||
gdk-3.0.pc
|
||||
gtk+-3.0.pc
|
||||
gtk+-unix-print-3.0.pc
|
||||
gail-3.0.pc
|
||||
gdk-3.0-uninstalled.pc
|
||||
gtk+-3.0-uninstalled.pc
|
||||
gail-3.0-uninstalled.pc
|
||||
gdk-2.0.pc
|
||||
gtk+-2.0.pc
|
||||
gtk+-unix-print-2.0.pc
|
||||
gail.pc
|
||||
gdk-2.0-uninstalled.pc
|
||||
gtk+-2.0-uninstalled.pc
|
||||
gail-uninstalled.pc
|
||||
m4macros/Makefile
|
||||
po/Makefile.in
|
||||
po-properties/Makefile.in
|
||||
demos/Makefile
|
||||
demos/gtk-demo/Makefile
|
||||
demos/gtk-demo/geninclude.pl
|
||||
examples/Makefile
|
||||
tests/Makefile
|
||||
docs/Makefile
|
||||
docs/reference/Makefile
|
||||
@@ -1648,7 +1709,9 @@ docs/reference/gdk/version.xml
|
||||
docs/reference/gtk/Makefile
|
||||
docs/reference/gtk/version.xml
|
||||
docs/reference/libgail-util/Makefile
|
||||
docs/faq/Makefile
|
||||
docs/tools/Makefile
|
||||
docs/tutorial/Makefile
|
||||
build/Makefile
|
||||
build/win32/Makefile
|
||||
build/win32/vs9/Makefile
|
||||
@@ -1658,6 +1721,7 @@ gdk/win32/Makefile
|
||||
gdk/win32/rc/Makefile
|
||||
gdk/win32/rc/gdk.rc
|
||||
gdk/quartz/Makefile
|
||||
gdk/directfb/Makefile
|
||||
gdk/tests/Makefile
|
||||
gtk/Makefile
|
||||
gtk/makefile.msc
|
||||
@@ -1674,7 +1738,7 @@ modules/engines/Makefile
|
||||
modules/engines/pixbuf/Makefile
|
||||
modules/engines/ms-windows/Makefile
|
||||
modules/engines/ms-windows/Theme/Makefile
|
||||
modules/engines/ms-windows/Theme/gtk-3.0/Makefile
|
||||
modules/engines/ms-windows/Theme/gtk-2.0/Makefile
|
||||
modules/input/Makefile
|
||||
modules/printbackends/Makefile
|
||||
modules/printbackends/cups/Makefile
|
||||
@@ -1688,4 +1752,4 @@ perf/Makefile
|
||||
AC_OUTPUT
|
||||
|
||||
echo "configuration:
|
||||
target: $gdktarget"
|
||||
target: $gdktarget"
|
||||
@@ -22,24 +22,42 @@ LDADDS = \
|
||||
$(MATH_LIB)
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
testpixbuf-drawable \
|
||||
testanimation \
|
||||
testpixbuf-color \
|
||||
testpixbuf-save \
|
||||
testpixbuf-scale \
|
||||
pixbuf-demo
|
||||
|
||||
# Need to build test-inline-pixbufs.h for testpixbuf
|
||||
noinst_PROGRAMS += testpixbuf
|
||||
BUILT_SOURCES = test-inline-pixbufs.h
|
||||
|
||||
test-inline-pixbufs.h: apple-red.png gnome-foot.png
|
||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list \
|
||||
apple_red $(srcdir)/apple-red.png \
|
||||
gnome_foot $(srcdir)/gnome-foot.png \
|
||||
> test-inline-pixbufs.h \
|
||||
|| (rm -f test-inline-pixbufs.h && false)
|
||||
|
||||
testpixbuf_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_drawable_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_save_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_color_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_scale_DEPENDENCIES = $(DEPS)
|
||||
testanimation_DEPENDENCIES = $(DEPS)
|
||||
pixbuf_demo_DEPENDENCIES = $(DEPS)
|
||||
|
||||
testpixbuf_LDADD = $(LDADDS)
|
||||
testpixbuf_drawable_LDADD = $(LDADDS)
|
||||
testpixbuf_save_LDADD = $(LDADDS)
|
||||
testpixbuf_color_LDADD = $(LDADDS)
|
||||
testpixbuf_scale_LDADD = $(LDADDS)
|
||||
testanimation_LDADD = $(LDADDS)
|
||||
pixbuf_demo_LDADD = $(LDADDS)
|
||||
|
||||
testpixbuf_SOURCES = testpixbuf.c pixbuf-init.c
|
||||
testpixbuf_drawable_SOURCES = testpixbuf-drawable.c pixbuf-init.c
|
||||
testpixbuf_save_SOURCES = testpixbuf-save.c
|
||||
testpixbuf_color_SOURCES = testpixbuf-color.c
|
||||
testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
|
||||
@@ -57,4 +75,6 @@ EXTRA_DIST += \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png
|
||||
|
||||
DISTCLEANFILES = test-inline-pixbufs.h
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## Makefile.am for gtk+/demos
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
democodedir=$(datadir)/gtk-$(GTK_API_VERSION)/demo
|
||||
democodedir=$(datadir)/gtk-2.0/demo
|
||||
|
||||
## These should be in the order you want them to appear in the
|
||||
## demo app, which means alphabetized by demo title, not filename
|
||||
@@ -61,10 +61,10 @@ DEPS = \
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(GTK_DEP_LIBS) \
|
||||
-lm
|
||||
|
||||
bin_PROGRAMS = gtk3-demo
|
||||
bin_PROGRAMS = gtk-demo
|
||||
|
||||
BUILT_SOURCES = demos.h
|
||||
|
||||
@@ -75,15 +75,15 @@ EXTRA_DIST += \
|
||||
demos.h: @REBUILD@ $(demos) geninclude.pl
|
||||
(here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos)) > demos.h
|
||||
|
||||
gtk3_demo_SOURCES = \
|
||||
gtk_demo_SOURCES = \
|
||||
$(demos) \
|
||||
demo-common.h \
|
||||
main.c \
|
||||
demos.h
|
||||
|
||||
gtk3_demo_DEPENDENCIES = $(DEPS)
|
||||
gtk3_demo_LDADD = $(LDADDS)
|
||||
gtk3_demo_LDFLAGS = -export-dynamic
|
||||
gtk_demo_DEPENDENCIES = $(DEPS)
|
||||
gtk_demo_LDADD = $(LDADDS)
|
||||
gtk_demo_LDFLAGS = -export-dynamic
|
||||
|
||||
IMAGEFILES= alphatest.png \
|
||||
apple-red.png \
|
||||
@@ -98,7 +98,7 @@ IMAGEFILES= alphatest.png \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png \
|
||||
gtk-logo-rgb.gif
|
||||
gtk-logo-rgb.gif
|
||||
|
||||
democode_DATA = $(demos) $(IMAGEFILES) demo.ui
|
||||
|
||||
|
||||
@@ -19,16 +19,6 @@ activate_action (GtkAction *action)
|
||||
|
||||
GtkWidget *dialog;
|
||||
|
||||
if (g_str_equal (name, "DarkTheme"))
|
||||
{
|
||||
gboolean value = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
|
||||
g_object_set (G_OBJECT (settings),
|
||||
"gtk-application-prefer-dark-theme", value,
|
||||
NULL);
|
||||
return;
|
||||
}
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
@@ -90,6 +80,22 @@ about_cb (GtkAction *action,
|
||||
NULL
|
||||
};
|
||||
|
||||
const gchar *license =
|
||||
"This library is free software; you can redistribute it and/or\n"
|
||||
"modify it under the terms of the GNU Library General Public License as\n"
|
||||
"published by the Free Software Foundation; either version 2 of the\n"
|
||||
"License, or (at your option) any later version.\n"
|
||||
"\n"
|
||||
"This library is distributed in the hope that it will be useful,\n"
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
|
||||
"Library General Public License for more details.\n"
|
||||
"\n"
|
||||
"You should have received a copy of the GNU Library General Public\n"
|
||||
"License along with the Gnome Library; see the file COPYING.LIB. If not,\n"
|
||||
"write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
|
||||
"Boston, MA 02111-1307, USA.\n";
|
||||
|
||||
pixbuf = NULL;
|
||||
transparent = NULL;
|
||||
filename = demo_find_file ("gtk-logo-rgb.gif", NULL);
|
||||
@@ -103,13 +109,9 @@ about_cb (GtkAction *action,
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"program-name", "GTK+ Code Demos",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
||||
PACKAGE_VERSION,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ()),
|
||||
"version", PACKAGE_VERSION,
|
||||
"copyright", "(C) 1997-2009 The GTK+ Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"license", license,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ functions.",
|
||||
"authors", authors,
|
||||
@@ -189,11 +191,6 @@ static GtkToggleActionEntry toggle_entries[] = {
|
||||
"Bold", /* tooltip */
|
||||
G_CALLBACK (activate_action),
|
||||
TRUE }, /* is_active */
|
||||
{ "DarkTheme", NULL, /* name, stock id */
|
||||
"_Prefer Dark Theme", NULL, /* label, accelerator */
|
||||
"Prefer Dark Theme", /* tooltip */
|
||||
G_CALLBACK (activate_action),
|
||||
FALSE }, /* is_active */
|
||||
};
|
||||
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
|
||||
|
||||
@@ -247,7 +244,6 @@ static const gchar *ui_info =
|
||||
" <menuitem action='Quit'/>"
|
||||
" </menu>"
|
||||
" <menu action='PreferencesMenu'>"
|
||||
" <menuitem action='DarkTheme'/>"
|
||||
" <menu action='ColorMenu'>"
|
||||
" <menuitem action='Red'/>"
|
||||
" <menuitem action='Green'/>"
|
||||
@@ -384,6 +380,23 @@ mark_set_callback (GtkTextBuffer *buffer,
|
||||
update_statusbar (buffer, GTK_STATUSBAR (data));
|
||||
}
|
||||
|
||||
static void
|
||||
update_resize_grip (GtkWidget *widget,
|
||||
GdkEventWindowState *event,
|
||||
GtkStatusbar *statusbar)
|
||||
{
|
||||
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN))
|
||||
{
|
||||
gboolean maximized;
|
||||
|
||||
maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN);
|
||||
gtk_statusbar_set_has_resize_grip (statusbar, !maximized);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
do_appwindow (GtkWidget *do_widget)
|
||||
{
|
||||
@@ -409,7 +422,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Application Window");
|
||||
gtk_window_set_icon_name (GTK_WINDOW (window), "document-open");
|
||||
gtk_window_set_icon_name (GTK_WINDOW (window), "gtk-open");
|
||||
|
||||
/* NULL window variable when window is closed */
|
||||
g_signal_connect (window, "destroy",
|
||||
@@ -552,6 +565,12 @@ do_appwindow (GtkWidget *do_widget)
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
g_signal_connect_object (window,
|
||||
"window_state_event",
|
||||
G_CALLBACK (update_resize_grip),
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ create_page1 (GtkWidget *assistant)
|
||||
GtkWidget *box, *label, *entry;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
box = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
|
||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||
@@ -121,7 +121,7 @@ create_page2 (GtkWidget *assistant)
|
||||
GtkWidget *box, *checkbutton;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
box = gtk_vbox_new (12, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
|
||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||
|
||||
@@ -18,9 +18,9 @@ create_bbox (gint horizontal,
|
||||
frame = gtk_frame_new (title);
|
||||
|
||||
if (horizontal)
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
else
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
|
||||
bbox = gtk_vbutton_box_new ();
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||
@@ -63,13 +63,13 @@ do_button_box (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||
|
||||
@@ -92,7 +92,7 @@ do_button_box (GtkWidget *do_widget)
|
||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ query_for_toplevel (GdkScreen *screen,
|
||||
gtk_widget_show_all (popup);
|
||||
cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
|
||||
|
||||
if (gdk_pointer_grab (gtk_widget_get_window (popup), FALSE,
|
||||
if (gdk_pointer_grab (popup->window, FALSE,
|
||||
GDK_BUTTON_RELEASE_MASK,
|
||||
NULL,
|
||||
cursor,
|
||||
@@ -229,7 +229,6 @@ static void
|
||||
open_display_cb (GtkWidget *button,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *display_entry;
|
||||
GtkWidget *dialog_label;
|
||||
@@ -249,13 +248,11 @@ open_display_cb (GtkWidget *button,
|
||||
dialog_label =
|
||||
gtk_label_new ("Please enter the name of\nthe new display\n");
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (content_area), dialog_label);
|
||||
gtk_container_add (GTK_CONTAINER (content_area), display_entry);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog_label);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), display_entry);
|
||||
|
||||
gtk_widget_grab_focus (display_entry);
|
||||
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (dialog)));
|
||||
gtk_widget_show_all (GTK_BIN (dialog)->child);
|
||||
|
||||
while (!result)
|
||||
{
|
||||
@@ -357,7 +354,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
|
||||
*frame = gtk_frame_new (title);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
||||
|
||||
@@ -375,7 +372,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
*button_vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
|
||||
|
||||
if (!info->size_group)
|
||||
@@ -585,7 +582,7 @@ destroy_info (ChangeDisplayInfo *info)
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_cb (GObject *object,
|
||||
destroy_cb (GtkObject *object,
|
||||
ChangeDisplayInfo **info)
|
||||
{
|
||||
destroy_info (*info);
|
||||
@@ -602,7 +599,6 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
|
||||
if (!info)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *frame;
|
||||
|
||||
@@ -610,7 +606,7 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
|
||||
info->window = gtk_dialog_new_with_buttons ("Change Screen or display",
|
||||
GTK_WINDOW (do_widget),
|
||||
0,
|
||||
GTK_DIALOG_NO_SEPARATOR,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
"Change", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
@@ -622,11 +618,11 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
g_signal_connect (info->window, "destroy",
|
||||
G_CALLBACK (destroy_cb), &info);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->window)->vbox), vbox,
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
frame = create_display_frame (info);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
@@ -210,7 +210,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
@@ -219,7 +219,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
@@ -236,7 +236,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
@@ -253,7 +253,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
|
||||
@@ -15,16 +15,25 @@ static GtkWidget *frame;
|
||||
/* Expose callback for the drawing area
|
||||
*/
|
||||
static gboolean
|
||||
draw_callback (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
expose_event_callback (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
GtkStyle *style;
|
||||
if (widget->window)
|
||||
{
|
||||
GtkStyle *style;
|
||||
cairo_t *cr;
|
||||
|
||||
style = gtk_widget_get_style (widget);
|
||||
style = gtk_widget_get_style (widget);
|
||||
|
||||
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
|
||||
cairo_paint (cr);
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -35,15 +44,13 @@ change_color_callback (GtkWidget *button,
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkColorSelection *colorsel;
|
||||
GtkColorSelectionDialog *selection_dialog;
|
||||
gint response;
|
||||
|
||||
dialog = gtk_color_selection_dialog_new ("Changing color");
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));
|
||||
|
||||
selection_dialog = GTK_COLOR_SELECTION_DIALOG (dialog);
|
||||
colorsel = GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (selection_dialog));
|
||||
|
||||
colorsel = GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (dialog)->colorsel);
|
||||
|
||||
gtk_color_selection_set_previous_color (colorsel, &color);
|
||||
gtk_color_selection_set_current_color (colorsel, &color);
|
||||
@@ -85,7 +92,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -100,8 +107,8 @@ do_colorsel (GtkWidget *do_widget)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (draw_callback), NULL);
|
||||
g_signal_connect (da, "expose_event",
|
||||
G_CALLBACK (expose_event_callback), NULL);
|
||||
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 200, 200);
|
||||
|
||||
@@ -271,7 +271,7 @@ struct _MaskEntryClass
|
||||
};
|
||||
|
||||
|
||||
static void mask_entry_editable_init (GtkEditableInterface *iface);
|
||||
static void mask_entry_editable_init (GtkEditableClass *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (MaskEntry, mask_entry, GTK_TYPE_ENTRY,
|
||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
|
||||
@@ -316,7 +316,7 @@ mask_entry_class_init (MaskEntryClass *klass)
|
||||
|
||||
|
||||
static void
|
||||
mask_entry_editable_init (GtkEditableInterface *iface)
|
||||
mask_entry_editable_init (GtkEditableClass *iface)
|
||||
{
|
||||
iface->changed = mask_entry_changed;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/* A combobox demonstrating cell renderers, separators and
|
||||
@@ -354,7 +354,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Some stock icons");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
@@ -395,7 +395,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Where are we ?");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
@@ -424,7 +424,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Editable");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
@@ -435,28 +435,9 @@ do_combobox (GtkWidget *do_widget)
|
||||
entry = g_object_new (TYPE_MASK_ENTRY, NULL);
|
||||
MASK_ENTRY (entry)->mask = "^([0-9]*|One|Two|2\302\275|Three)$";
|
||||
|
||||
gtk_container_remove (GTK_CONTAINER (combo), gtk_bin_get_child (GTK_BIN (combo)));
|
||||
gtk_container_remove (GTK_CONTAINER (combo), GTK_BIN (combo)->child);
|
||||
gtk_container_add (GTK_CONTAINER (combo), entry);
|
||||
|
||||
/* A combobox with string IDs */
|
||||
frame = gtk_frame_new ("String IDs");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_text_new ();
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "never", "Not visible");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "when-active", "Visible when active");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "always", "Always visible");
|
||||
gtk_container_add (GTK_CONTAINER (box), combo);
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
g_object_bind_property (combo, "active-id",
|
||||
entry, "text",
|
||||
G_BINDING_BIDIRECTIONAL);
|
||||
gtk_container_add (GTK_CONTAINER (box), entry);
|
||||
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
||||
@@ -33,7 +33,6 @@ static void
|
||||
interactive_dialog_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *stock;
|
||||
@@ -52,11 +51,9 @@ interactive_dialog_clicked (GtkButton *button,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
NULL);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
stock = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), stock, FALSE, FALSE, 0);
|
||||
@@ -120,25 +117,24 @@ do_dialog (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Dialogs");
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
/* Standard message dialog */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
button = gtk_button_new_with_mnemonic ("_Message Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (message_dialog_clicked), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
|
||||
FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
|
||||
|
||||
/* Interactive dialog*/
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
|
||||
@@ -25,17 +25,15 @@ scribble_configure_event (GtkWidget *widget,
|
||||
GdkEventConfigure *event,
|
||||
gpointer data)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
cairo_t *cr;
|
||||
|
||||
if (surface)
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
|
||||
surface = gdk_window_create_similar_surface (widget->window,
|
||||
CAIRO_CONTENT_COLOR,
|
||||
allocation.width,
|
||||
allocation.height);
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
|
||||
/* Initialize the surface to white */
|
||||
cr = cairo_create (surface);
|
||||
@@ -51,12 +49,19 @@ scribble_configure_event (GtkWidget *widget,
|
||||
|
||||
/* Redraw the screen from the surface */
|
||||
static gboolean
|
||||
scribble_draw (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
scribble_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -84,7 +89,7 @@ draw_brush (GtkWidget *widget,
|
||||
cairo_destroy (cr);
|
||||
|
||||
/* Now invalidate the affected region of the drawing area. */
|
||||
gdk_window_invalidate_rect (gtk_widget_get_window (widget),
|
||||
gdk_window_invalidate_rect (widget->window,
|
||||
&update_rect,
|
||||
FALSE);
|
||||
}
|
||||
@@ -137,38 +142,43 @@ scribble_motion_notify_event (GtkWidget *widget,
|
||||
|
||||
|
||||
static gboolean
|
||||
checkerboard_draw (GtkWidget *da,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
checkerboard_expose (GtkWidget *da,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
gint i, j, xcount, ycount, width, height;
|
||||
gint i, j, xcount, ycount;
|
||||
cairo_t *cr;
|
||||
|
||||
#define CHECK_SIZE 10
|
||||
#define SPACING 2
|
||||
|
||||
/* At the start of a draw handler, a clip region has been set on
|
||||
* the Cairo context, and the contents have been cleared to the
|
||||
/* At the start of an expose handler, a clip region of event->area
|
||||
* is set on the window, and event->area has been cleared to the
|
||||
* widget's background color. The docs for
|
||||
* gdk_window_begin_paint_region() give more details on how this
|
||||
* works.
|
||||
*/
|
||||
|
||||
cr = gdk_cairo_create (da->window);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_clip (cr);
|
||||
|
||||
xcount = 0;
|
||||
width = gtk_widget_get_allocated_width (da);
|
||||
height = gtk_widget_get_allocated_height (da);
|
||||
i = SPACING;
|
||||
while (i < width)
|
||||
while (i < da->allocation.width)
|
||||
{
|
||||
j = SPACING;
|
||||
ycount = xcount % 2; /* start with even/odd depending on row */
|
||||
while (j < height)
|
||||
while (j < da->allocation.height)
|
||||
{
|
||||
if (ycount % 2)
|
||||
cairo_set_source_rgb (cr, 0.45777, 0, 0.45777);
|
||||
else
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
|
||||
/* If we're outside the clip, this will do nothing.
|
||||
/* If we're outside event->area, this will do nothing.
|
||||
* It might be mildly more efficient if we handled
|
||||
* the clipping ourselves, but again we're feeling lazy.
|
||||
*/
|
||||
cairo_rectangle (cr, i, j, CHECK_SIZE, CHECK_SIZE);
|
||||
cairo_fill (cr);
|
||||
@@ -181,6 +191,8 @@ checkerboard_draw (GtkWidget *da,
|
||||
++xcount;
|
||||
}
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
/* return TRUE because we've handled this event, so no
|
||||
* further processing is required.
|
||||
*/
|
||||
@@ -193,7 +205,7 @@ close_window (void)
|
||||
window = NULL;
|
||||
|
||||
if (surface)
|
||||
cairo_surface_destroy (surface);
|
||||
g_object_unref (surface);
|
||||
surface = NULL;
|
||||
}
|
||||
|
||||
@@ -216,7 +228,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -239,8 +251,8 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (checkerboard_draw), NULL);
|
||||
g_signal_connect (da, "expose-event",
|
||||
G_CALLBACK (checkerboard_expose), NULL);
|
||||
|
||||
/*
|
||||
* Create the scribble area
|
||||
@@ -263,8 +275,8 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
/* Signals used to handle backing surface */
|
||||
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (scribble_draw), NULL);
|
||||
g_signal_connect (da, "expose-event",
|
||||
G_CALLBACK (scribble_expose_event), NULL);
|
||||
g_signal_connect (da,"configure-event",
|
||||
G_CALLBACK (scribble_configure_event), NULL);
|
||||
|
||||
|
||||
@@ -48,27 +48,27 @@ add_items (void)
|
||||
g_return_if_fail (articles != NULL);
|
||||
|
||||
foo.number = 3;
|
||||
foo.product = g_strdup ("bottles of coke");
|
||||
foo.product = "bottles of coke";
|
||||
foo.yummy = 20;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
foo.number = 5;
|
||||
foo.product = g_strdup ("packages of noodles");
|
||||
foo.product = "packages of noodles";
|
||||
foo.yummy = 50;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
foo.number = 2;
|
||||
foo.product = g_strdup ("packages of chocolate chip cookies");
|
||||
foo.product = "packages of chocolate chip cookies";
|
||||
foo.yummy = 90;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
foo.number = 1;
|
||||
foo.product = g_strdup ("can vanilla ice cream");
|
||||
foo.product = "can vanilla ice cream";
|
||||
foo.yummy = 60;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
foo.number = 6;
|
||||
foo.product = g_strdup ("eggs");
|
||||
foo.product = "eggs";
|
||||
foo.yummy = 10;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
}
|
||||
@@ -332,7 +332,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
@@ -365,8 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (sw), treeview);
|
||||
|
||||
/* some buttons */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
hbox = gtk_hbox_new (TRUE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
|
||||
@@ -11,7 +11,6 @@ static GtkWidget *window = NULL;
|
||||
GtkWidget *
|
||||
do_entry_buffer (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry;
|
||||
@@ -32,10 +31,8 @@ do_entry_buffer (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
||||
@@ -37,7 +37,6 @@ create_completion_model (void)
|
||||
GtkWidget *
|
||||
do_entry_completion (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry;
|
||||
@@ -59,10 +58,8 @@ do_entry_completion (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
||||
@@ -13,7 +13,6 @@ static GtkWidget *window = NULL;
|
||||
GtkWidget *
|
||||
do_expander (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *expander;
|
||||
@@ -33,10 +32,8 @@ do_expander (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new ("Expander demo. Click on the triangle for details.");
|
||||
|
||||
@@ -113,8 +113,8 @@ key_press_event (GtkWidget *text_view,
|
||||
|
||||
switch (event->keyval)
|
||||
{
|
||||
case GDK_KEY_Return:
|
||||
case GDK_KEY_KP_Enter:
|
||||
case GDK_Return:
|
||||
case GDK_KP_Enter:
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
|
||||
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
|
||||
gtk_text_buffer_get_insert (buffer));
|
||||
@@ -225,8 +225,7 @@ motion_notify_event (GtkWidget *text_view,
|
||||
|
||||
set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y);
|
||||
|
||||
gdk_window_get_pointer (gtk_widget_get_window (text_view),
|
||||
NULL, NULL, NULL);
|
||||
gdk_window_get_pointer (text_view->window, NULL, NULL, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -238,10 +237,9 @@ visibility_notify_event (GtkWidget *text_view,
|
||||
GdkEventVisibility *event)
|
||||
{
|
||||
gint wx, wy, bx, by;
|
||||
|
||||
gdk_window_get_pointer (gtk_widget_get_window (text_view),
|
||||
&wx, &wy, NULL);
|
||||
|
||||
|
||||
gdk_window_get_pointer (text_view->window, &wx, &wy, NULL);
|
||||
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
|
||||
GTK_TEXT_WINDOW_WIDGET,
|
||||
wx, wy, &bx, &by);
|
||||
|
||||
@@ -105,6 +105,7 @@ fill_store (GtkListStore *store)
|
||||
|
||||
name = g_dir_read_name (dir);
|
||||
}
|
||||
g_dir_close (dir);
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -300,7 +301,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
GtkWidget *tool_bar;
|
||||
GtkToolItem *home_button;
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
tool_bar = gtk_toolbar_new ();
|
||||
|
||||
@@ -120,8 +120,8 @@ do_iconview_edit (GtkWidget *do_widget)
|
||||
|
||||
gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (icon_view),
|
||||
GTK_SELECTION_SINGLE);
|
||||
gtk_icon_view_set_item_orientation (GTK_ICON_VIEW (icon_view),
|
||||
GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_icon_view_set_orientation (GTK_ICON_VIEW (icon_view),
|
||||
GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_icon_view_set_columns (GTK_ICON_VIEW (icon_view), 2);
|
||||
gtk_icon_view_set_reorderable (GTK_ICON_VIEW (icon_view), TRUE);
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ start_progressive_loading (GtkWidget *image)
|
||||
}
|
||||
|
||||
static void
|
||||
cleanup_callback (GObject *object,
|
||||
cleanup_callback (GtkObject *object,
|
||||
gpointer data)
|
||||
{
|
||||
if (load_timeout)
|
||||
@@ -317,7 +317,6 @@ do_images (GtkWidget *do_widget)
|
||||
GtkWidget *align;
|
||||
GtkWidget *button;
|
||||
GdkPixbuf *pixbuf;
|
||||
GIcon *gicon;
|
||||
GError *error = NULL;
|
||||
char *filename;
|
||||
|
||||
@@ -335,7 +334,7 @@ do_images (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -416,26 +415,6 @@ do_images (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), image);
|
||||
|
||||
/* Symbolic icon */
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Symbolic themed icon</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
/* The alignment keeps the frame from growing when users resize
|
||||
* the window
|
||||
*/
|
||||
align = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||
gtk_container_add (GTK_CONTAINER (align), frame);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
|
||||
|
||||
gicon = g_themed_icon_new_with_default_fallbacks ("battery-critical-charging-symbolic");
|
||||
image = gtk_image_new_from_gicon (gicon, GTK_ICON_SIZE_DIALOG);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), image);
|
||||
|
||||
/* Progressive */
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ do_infobar (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
@@ -81,7 +81,7 @@ do_infobar (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 8);
|
||||
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox2 = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
||||
|
||||
|
||||
@@ -29,9 +29,7 @@ enum
|
||||
COLUMN_SEVERITY,
|
||||
COLUMN_DESCRIPTION,
|
||||
COLUMN_PULSE,
|
||||
COLUMN_ICON,
|
||||
COLUMN_ACTIVE,
|
||||
COLUMN_SENSITIVE,
|
||||
NUM_COLUMNS
|
||||
};
|
||||
|
||||
@@ -94,24 +92,11 @@ create_model (void)
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_UINT,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_BOOLEAN,
|
||||
G_TYPE_BOOLEAN);
|
||||
|
||||
/* add data to the list store */
|
||||
for (i = 0; i < G_N_ELEMENTS (data); i++)
|
||||
{
|
||||
gchar *icon_name;
|
||||
gboolean sensitive;
|
||||
|
||||
if (i == 1 || i == 3)
|
||||
icon_name = "battery-critical-charging-symbolic";
|
||||
else
|
||||
icon_name = NULL;
|
||||
if (i == 3)
|
||||
sensitive = FALSE;
|
||||
else
|
||||
sensitive = TRUE;
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
COLUMN_FIXED, data[i].fixed,
|
||||
@@ -119,9 +104,7 @@ create_model (void)
|
||||
COLUMN_SEVERITY, data[i].severity,
|
||||
COLUMN_DESCRIPTION, data[i].description,
|
||||
COLUMN_PULSE, 0,
|
||||
COLUMN_ICON, icon_name,
|
||||
COLUMN_ACTIVE, FALSE,
|
||||
COLUMN_SENSITIVE, sensitive,
|
||||
-1);
|
||||
}
|
||||
|
||||
@@ -216,19 +199,6 @@ add_columns (GtkTreeView *treeview)
|
||||
NULL);
|
||||
gtk_tree_view_column_set_sort_column_id (column, COLUMN_PULSE);
|
||||
gtk_tree_view_append_column (treeview, column);
|
||||
|
||||
/* column for symbolic icon */
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
g_object_set (G_OBJECT (renderer), "follow-state", TRUE, NULL);
|
||||
column = gtk_tree_view_column_new_with_attributes ("Symbolic icon",
|
||||
renderer,
|
||||
"icon-name",
|
||||
COLUMN_ICON,
|
||||
"sensitive",
|
||||
COLUMN_SENSITIVE,
|
||||
NULL);
|
||||
gtk_tree_view_column_set_sort_column_id (column, COLUMN_ICON);
|
||||
gtk_tree_view_append_column (treeview, column);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -266,7 +236,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||
|
||||
@@ -223,6 +223,7 @@ static gchar *types[] =
|
||||
"FALSE",
|
||||
"TRUE",
|
||||
"FILE ",
|
||||
"GtkObject ",
|
||||
"GtkColorSelection ",
|
||||
"GtkWidget ",
|
||||
"GtkButton ",
|
||||
@@ -278,7 +279,7 @@ static gchar *types[] =
|
||||
"GtkTreeStore ",
|
||||
"GtkEntry ",
|
||||
"GtkEditable ",
|
||||
"GtkEditableInterface ",
|
||||
"GtkEditableClass ",
|
||||
"GdkPixmap ",
|
||||
"GdkEventConfigure ",
|
||||
"GdkEventMotion ",
|
||||
@@ -940,8 +941,8 @@ main (int argc, char **argv)
|
||||
if (g_file_test ("../../gdk-pixbuf/libpixbufloader-pnm.la",
|
||||
G_FILE_TEST_EXISTS))
|
||||
{
|
||||
g_setenv ("GDK_PIXBUF_MODULE_FILE", "../../gdk-pixbuf/loaders.cache", TRUE);
|
||||
g_setenv ("GTK_IM_MODULE_FILE", "../../modules/input/immodules.cache", TRUE);
|
||||
g_setenv ("GDK_PIXBUF_MODULE_FILE", "../../gdk-pixbuf/gdk-pixbuf.loaders", TRUE);
|
||||
g_setenv ("GTK_IM_MODULE_FILE", "../../modules/input/gtk.immodules", TRUE);
|
||||
}
|
||||
/* -- End of hack -- */
|
||||
|
||||
@@ -954,7 +955,7 @@ main (int argc, char **argv)
|
||||
g_signal_connect_after (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
tree = create_tree ();
|
||||
|
||||
@@ -14,15 +14,15 @@ PERL = perl
|
||||
################################################################
|
||||
|
||||
# Possibly override versions from build/win32/module.defs
|
||||
GTK_VER = 2.0
|
||||
GDK_PIXBUF_VER = 2.0
|
||||
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
|
||||
GDK_PIXBUF_VER = @GDK_PIXBUF_MAJOR@.@GDK_PIXBUF_MINOR@
|
||||
|
||||
GDK_LIBS = ../../gdk/gdk-win32-$(GTK_VER).lib
|
||||
GTK_LIBS = ../../gtk/gtk-win32-$(GTK_VER).lib
|
||||
GDK_PIXBUF_LIBS = ../../gdk-pixbuf/gdk_pixbuf-$(GDK_PIXBUF_VER).lib
|
||||
|
||||
INCLUDES = -FImsvc_recommended_pragmas.h -I . -I ../.. -I ../../gdk -I ../../gdk-pixbuf -I ../../gtk
|
||||
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) $(ATK_CFLAGS) $(CAIRO_CFLAGS)
|
||||
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) $(ATK_CFLAGS)
|
||||
LDFLAGS = /link /machine:ix86 $(LINKDEBUG)
|
||||
DEFINES = -DG_LOG_DOMAIN=\"GtkDemo\" -DGTK_VERSION=\"$(GTK_VER)\" \
|
||||
-DDEMOCODEDIR=\".\"
|
||||
@@ -90,6 +90,5 @@ OBJECTS = \
|
||||
main.obj \
|
||||
|
||||
gtk-demo.exe : demos.h $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -Fegtk-demo.exe $(OBJECTS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) \
|
||||
$(CAIRO_LIBS) $(PANGOCAIRO_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -Fegtk-demo.exe $(OBJECTS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
|
||||
|
||||
|
||||
@@ -146,11 +146,11 @@ do_menus (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_show (box);
|
||||
|
||||
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), box1);
|
||||
gtk_widget_show (box1);
|
||||
|
||||
@@ -176,7 +176,7 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
@@ -39,18 +39,14 @@ void gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
|
||||
|
||||
static void gtk_rotated_bin_realize (GtkWidget *widget);
|
||||
static void gtk_rotated_bin_unrealize (GtkWidget *widget);
|
||||
static void gtk_rotated_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_rotated_bin_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean gtk_rotated_bin_draw (GtkWidget *widget,
|
||||
cairo_t *cr);
|
||||
static gboolean gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *offscreen);
|
||||
|
||||
static void gtk_rotated_bin_add (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
@@ -78,7 +74,7 @@ to_child (GtkRotatedBin *bin,
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
gtk_widget_get_allocation (bin->child, &child_area);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
@@ -118,7 +114,7 @@ to_parent (GtkRotatedBin *bin,
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
gtk_widget_get_allocation (bin->child, &child_area);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
@@ -152,10 +148,9 @@ gtk_rotated_bin_class_init (GtkRotatedBinClass *klass)
|
||||
|
||||
widget_class->realize = gtk_rotated_bin_realize;
|
||||
widget_class->unrealize = gtk_rotated_bin_unrealize;
|
||||
widget_class->get_preferred_width = gtk_rotated_bin_get_preferred_width;
|
||||
widget_class->get_preferred_height = gtk_rotated_bin_get_preferred_height;
|
||||
widget_class->size_request = gtk_rotated_bin_size_request;
|
||||
widget_class->size_allocate = gtk_rotated_bin_size_allocate;
|
||||
widget_class->draw = gtk_rotated_bin_draw;
|
||||
widget_class->expose_event = gtk_rotated_bin_expose;
|
||||
|
||||
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
|
||||
GTK_TYPE_ROTATED_BIN,
|
||||
@@ -193,7 +188,7 @@ pick_offscreen_child (GdkWindow *offscreen_window,
|
||||
{
|
||||
to_child (bin, widget_x, widget_y, &x, &y);
|
||||
|
||||
gtk_widget_get_allocation (bin->child, &child_area);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
if (x >= 0 && x < child_area.width &&
|
||||
y >= 0 && y < child_area.height)
|
||||
@@ -229,23 +224,19 @@ static void
|
||||
gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
GtkAllocation allocation;
|
||||
GtkStyle *style;
|
||||
GdkWindow *window;
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
guint border_width;
|
||||
gint border_width;
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
attributes.x = allocation.x + border_width;
|
||||
attributes.y = allocation.y + border_width;
|
||||
attributes.width = allocation.width - 2 * border_width;
|
||||
attributes.height = allocation.height - 2 * border_width;
|
||||
attributes.x = widget->allocation.x + border_width;
|
||||
attributes.y = widget->allocation.y + border_width;
|
||||
attributes.width = widget->allocation.width - 2 * border_width;
|
||||
attributes.height = widget->allocation.height - 2 * border_width;
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.event_mask = gtk_widget_get_events (widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
@@ -257,15 +248,15 @@ gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
| GDK_LEAVE_NOTIFY_MASK;
|
||||
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
|
||||
window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gtk_widget_set_window (widget, window);
|
||||
gdk_window_set_user_data (window, widget);
|
||||
g_signal_connect (window, "pick-embedded-child",
|
||||
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (widget->window, widget);
|
||||
g_signal_connect (widget->window, "pick-embedded-child",
|
||||
G_CALLBACK (pick_offscreen_child), bin);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_OFFSCREEN;
|
||||
@@ -273,27 +264,24 @@ gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
child_requisition.width = child_requisition.height = 0;
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
gtk_widget_get_allocation (bin->child, &child_allocation);
|
||||
attributes.width = child_allocation.width;
|
||||
attributes.height = child_allocation.height;
|
||||
attributes.width = bin->child->allocation.width;
|
||||
attributes.height = bin->child->allocation.height;
|
||||
}
|
||||
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (bin->offscreen_window, widget);
|
||||
if (bin->child)
|
||||
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
|
||||
gdk_offscreen_window_set_embedder (bin->offscreen_window, window);
|
||||
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
|
||||
g_signal_connect (bin->offscreen_window, "to-embedder",
|
||||
G_CALLBACK (offscreen_window_to_parent), bin);
|
||||
g_signal_connect (bin->offscreen_window, "from-embedder",
|
||||
G_CALLBACK (offscreen_window_from_parent), bin);
|
||||
|
||||
gtk_widget_style_attach (widget);
|
||||
style = gtk_widget_get_style (widget);
|
||||
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (style, bin->offscreen_window, GTK_STATE_NORMAL);
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
|
||||
gdk_window_show (bin->offscreen_window);
|
||||
}
|
||||
|
||||
@@ -390,47 +378,20 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition child_requisition;
|
||||
double s, c;
|
||||
double w, h;
|
||||
guint border_width;
|
||||
|
||||
child_requisition.width = 0;
|
||||
child_requisition.height = 0;
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
gtk_widget_get_preferred_size ( (bin->child),
|
||||
&child_requisition, NULL);
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
w = c * child_requisition.width + s * child_requisition.height;
|
||||
h = s * child_requisition.width + c * child_requisition.height;
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
requisition->width = border_width * 2 + w;
|
||||
requisition->height = border_width * 2 + h;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_rotated_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.width;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_rotated_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.height;
|
||||
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + w;
|
||||
requisition->height = GTK_CONTAINER (widget)->border_width * 2 + h;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -438,19 +399,19 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
guint border_width;
|
||||
gint border_width;
|
||||
gint w, h;
|
||||
gdouble s, c;
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
widget->allocation = *allocation;
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
w = allocation->width - border_width * 2;
|
||||
h = allocation->height - border_width * 2;
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
gdk_window_move_resize (gtk_widget_get_window (widget),
|
||||
gdk_window_move_resize (widget->window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
w, h);
|
||||
@@ -463,8 +424,7 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
|
||||
gtk_widget_get_preferred_size (bin->child,
|
||||
&child_requisition, NULL);
|
||||
gtk_widget_get_child_requisition (bin->child, &child_requisition);
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.height = child_requisition.height;
|
||||
@@ -492,67 +452,69 @@ static gboolean
|
||||
gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
gdk_window_invalidate_rect (gtk_widget_get_window (widget),
|
||||
NULL, FALSE);
|
||||
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_rotated_bin_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
GdkWindow *window;
|
||||
gint width, height;
|
||||
gdouble s, c;
|
||||
gdouble w, h;
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
if (gtk_cairo_should_draw_window (cr, window))
|
||||
if (gtk_widget_is_drawable (widget))
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
GtkAllocation child_area;
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
if (event->window == widget->window)
|
||||
{
|
||||
surface = gdk_offscreen_window_get_surface (bin->offscreen_window);
|
||||
gtk_widget_get_allocation (bin->child, &child_area);
|
||||
GdkPixmap *pixmap;
|
||||
GtkAllocation child_area;
|
||||
cairo_t *cr;
|
||||
|
||||
/* transform */
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
cairo_translate (cr, (w - child_area.width) / 2, (h - child_area.height) / 2);
|
||||
cairo_translate (cr, child_area.width / 2, child_area.height / 2);
|
||||
cairo_rotate (cr, bin->angle);
|
||||
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
/* clip */
|
||||
cairo_rectangle (cr,
|
||||
0, 0,
|
||||
gdk_window_get_width (bin->offscreen_window),
|
||||
gdk_window_get_height (bin->offscreen_window));
|
||||
cairo_clip (cr);
|
||||
/* paint */
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
/* transform */
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
|
||||
cairo_translate (cr, (w - child_area.width) / 2, (h - child_area.height) / 2);
|
||||
cairo_translate (cr, child_area.width / 2, child_area.height / 2);
|
||||
cairo_rotate (cr, bin->angle);
|
||||
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
|
||||
|
||||
/* clip */
|
||||
gdk_pixmap_get_size (pixmap, &width, &height);
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_clip (cr);
|
||||
/* paint */
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
|
||||
{
|
||||
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
widget, "blah",
|
||||
0, 0,
|
||||
gdk_window_get_width (bin->offscreen_window),
|
||||
gdk_window_get_height (bin->offscreen_window));
|
||||
else if (event->window == bin->offscreen_window)
|
||||
{
|
||||
gtk_paint_flat_box (widget->style, event->window,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
&event->area, widget, "blah",
|
||||
0, 0, -1, -1);
|
||||
|
||||
if (bin->child)
|
||||
gtk_container_propagate_draw (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
cr);
|
||||
if (bin->child)
|
||||
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
event);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -589,9 +551,8 @@ do_offscreen_window (GtkWidget *do_widget)
|
||||
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &black);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,
|
||||
0, G_PI/2, 0.01);
|
||||
vbox = gtk_vbox_new (0, FALSE);
|
||||
scale = gtk_hscale_new_with_range (0, G_PI/2, 0.01);
|
||||
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
|
||||
|
||||
button = gtk_button_new_with_label ("A Button");
|
||||
|
||||
@@ -35,18 +35,14 @@ GtkWidget* gtk_mirror_bin_new (void);
|
||||
|
||||
static void gtk_mirror_bin_realize (GtkWidget *widget);
|
||||
static void gtk_mirror_bin_unrealize (GtkWidget *widget);
|
||||
static void gtk_mirror_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_mirror_bin_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean gtk_mirror_bin_draw (GtkWidget *widget,
|
||||
cairo_t *cr);
|
||||
static gboolean gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *offscreen);
|
||||
|
||||
static void gtk_mirror_bin_add (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
@@ -90,10 +86,9 @@ gtk_mirror_bin_class_init (GtkMirrorBinClass *klass)
|
||||
|
||||
widget_class->realize = gtk_mirror_bin_realize;
|
||||
widget_class->unrealize = gtk_mirror_bin_unrealize;
|
||||
widget_class->get_preferred_width = gtk_mirror_bin_get_preferred_width;
|
||||
widget_class->get_preferred_height = gtk_mirror_bin_get_preferred_height;
|
||||
widget_class->size_request = gtk_mirror_bin_size_request;
|
||||
widget_class->size_allocate = gtk_mirror_bin_size_allocate;
|
||||
widget_class->draw = gtk_mirror_bin_draw;
|
||||
widget_class->expose_event = gtk_mirror_bin_expose;
|
||||
|
||||
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
|
||||
GTK_TYPE_MIRROR_BIN,
|
||||
@@ -131,7 +126,7 @@ pick_offscreen_child (GdkWindow *offscreen_window,
|
||||
{
|
||||
to_child (bin, widget_x, widget_y, &x, &y);
|
||||
|
||||
gtk_widget_get_allocation (bin->child, &child_area);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
if (x >= 0 && x < child_area.width &&
|
||||
y >= 0 && y < child_area.height)
|
||||
@@ -167,23 +162,19 @@ static void
|
||||
gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GtkAllocation allocation;
|
||||
GtkStyle *style;
|
||||
GdkWindow *window;
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
guint border_width;
|
||||
gint border_width;
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
attributes.x = allocation.x + border_width;
|
||||
attributes.y = allocation.y + border_width;
|
||||
attributes.width = allocation.width - 2 * border_width;
|
||||
attributes.height = allocation.height - 2 * border_width;
|
||||
attributes.x = widget->allocation.x + border_width;
|
||||
attributes.y = widget->allocation.y + border_width;
|
||||
attributes.width = widget->allocation.width - 2 * border_width;
|
||||
attributes.height = widget->allocation.height - 2 * border_width;
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.event_mask = gtk_widget_get_events (widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
@@ -195,15 +186,15 @@ gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
| GDK_LEAVE_NOTIFY_MASK;
|
||||
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
|
||||
window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gtk_widget_set_window (widget, window);
|
||||
gdk_window_set_user_data (window, widget);
|
||||
g_signal_connect (window, "pick-embedded-child",
|
||||
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (widget->window, widget);
|
||||
g_signal_connect (widget->window, "pick-embedded-child",
|
||||
G_CALLBACK (pick_offscreen_child), bin);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_OFFSCREEN;
|
||||
@@ -211,27 +202,24 @@ gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
child_requisition.width = child_requisition.height = 0;
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
gtk_widget_get_allocation (bin->child, &child_allocation);
|
||||
attributes.width = child_allocation.width;
|
||||
attributes.height = child_allocation.height;
|
||||
attributes.width = bin->child->allocation.width;
|
||||
attributes.height = bin->child->allocation.height;
|
||||
}
|
||||
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (bin->offscreen_window, widget);
|
||||
if (bin->child)
|
||||
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
|
||||
gdk_offscreen_window_set_embedder (bin->offscreen_window, window);
|
||||
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
|
||||
g_signal_connect (bin->offscreen_window, "to-embedder",
|
||||
G_CALLBACK (offscreen_window_to_parent), bin);
|
||||
g_signal_connect (bin->offscreen_window, "from-embedder",
|
||||
G_CALLBACK (offscreen_window_from_parent), bin);
|
||||
|
||||
gtk_widget_style_attach (widget);
|
||||
style = gtk_widget_get_style (widget);
|
||||
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (style, bin->offscreen_window, GTK_STATE_NORMAL);
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
|
||||
gdk_window_show (bin->offscreen_window);
|
||||
}
|
||||
|
||||
@@ -314,42 +302,15 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GtkRequisition child_requisition;
|
||||
guint border_width;
|
||||
|
||||
child_requisition.width = 0;
|
||||
child_requisition.height = 0;
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
gtk_widget_get_preferred_size ( (bin->child),
|
||||
&child_requisition, NULL);
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
requisition->width = border_width * 2 + child_requisition.width + 10;
|
||||
requisition->height = border_width * 2 + child_requisition.height * 2 + 10;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_mirror_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.width;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_mirror_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.width;
|
||||
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.width + 10;
|
||||
requisition->height = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.height * 2 + 10;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -357,18 +318,17 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
gint border_width;
|
||||
gint w, h;
|
||||
guint border_width;
|
||||
widget->allocation = *allocation;
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
w = allocation->width - border_width * 2;
|
||||
h = allocation->height - border_width * 2;
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
gdk_window_move_resize (gtk_widget_get_window (widget),
|
||||
gdk_window_move_resize (widget->window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
w, h);
|
||||
@@ -378,8 +338,7 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkRequisition child_requisition;
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
gtk_widget_get_preferred_size (bin->child,
|
||||
&child_requisition, NULL);
|
||||
gtk_widget_get_child_requisition (bin->child, &child_requisition);
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.height = child_requisition.height;
|
||||
@@ -398,70 +357,82 @@ static gboolean
|
||||
gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
gdk_window_invalidate_rect (gtk_widget_get_window (widget),
|
||||
NULL, FALSE);
|
||||
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mirror_bin_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GdkWindow *window;
|
||||
gint width, height;
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
if (gtk_cairo_should_draw_window (cr, window))
|
||||
if (gtk_widget_is_drawable (widget))
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
cairo_matrix_t matrix;
|
||||
cairo_pattern_t *mask;
|
||||
int height;
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
if (event->window == widget->window)
|
||||
{
|
||||
surface = gdk_offscreen_window_get_surface (bin->offscreen_window);
|
||||
height = gdk_window_get_height (bin->offscreen_window);
|
||||
GdkPixmap *pixmap;
|
||||
cairo_t *cr;
|
||||
cairo_matrix_t matrix;
|
||||
cairo_pattern_t *mask;
|
||||
|
||||
/* paint the offscreen child */
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
gdk_pixmap_get_size (pixmap, &width, &height);
|
||||
|
||||
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
|
||||
cairo_matrix_scale (&matrix, 1.0, -1.0);
|
||||
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
|
||||
cairo_transform (cr, &matrix);
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
cairo_set_source_surface (cr, surface, 0, height);
|
||||
cairo_save (cr);
|
||||
|
||||
/* create linear gradient as mask-pattern to fade out the source */
|
||||
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_clip (cr);
|
||||
|
||||
/* paint the reflection */
|
||||
cairo_mask (cr, mask);
|
||||
/* paint the offscreen child */
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_pattern_destroy (mask);
|
||||
cairo_restore (cr);
|
||||
|
||||
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
|
||||
cairo_matrix_scale (&matrix, 1.0, -1.0);
|
||||
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
|
||||
cairo_transform (cr, &matrix);
|
||||
|
||||
cairo_rectangle (cr, 0, height, width, height);
|
||||
cairo_clip (cr);
|
||||
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, height);
|
||||
|
||||
/* create linear gradient as mask-pattern to fade out the source */
|
||||
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
/* paint the reflection */
|
||||
cairo_mask (cr, mask);
|
||||
|
||||
cairo_pattern_destroy (mask);
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
|
||||
{
|
||||
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
widget, "blah",
|
||||
0, 0,
|
||||
gdk_window_get_width (bin->offscreen_window),
|
||||
gdk_window_get_height (bin->offscreen_window));
|
||||
else if (event->window == bin->offscreen_window)
|
||||
{
|
||||
gtk_paint_flat_box (widget->style, event->window,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
&event->area, widget, "blah",
|
||||
0, 0, -1, -1);
|
||||
|
||||
if (bin->child)
|
||||
gtk_container_propagate_draw (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
cr);
|
||||
if (bin->child)
|
||||
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
event);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -490,13 +461,13 @@ do_offscreen_window2 (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox = gtk_vbox_new (0, FALSE);
|
||||
|
||||
bin = gtk_mirror_bin_new ();
|
||||
|
||||
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
backbutton = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (backbutton),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_BACK, 4));
|
||||
|
||||
@@ -17,23 +17,15 @@ void
|
||||
toggle_resize (GtkWidget *widget,
|
||||
GtkWidget *child)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
GtkPaned *paned;
|
||||
gboolean is_child1;
|
||||
GtkPaned *paned = GTK_PANED (child->parent);
|
||||
gboolean is_child1 = (child == paned->child1);
|
||||
gboolean resize, shrink;
|
||||
|
||||
parent = gtk_widget_get_parent (child);
|
||||
paned = GTK_PANED (parent);
|
||||
|
||||
is_child1 = (child == gtk_paned_get_child1 (paned));
|
||||
|
||||
gtk_container_child_get (GTK_CONTAINER (paned), child,
|
||||
"resize", &resize,
|
||||
"shrink", &shrink,
|
||||
NULL);
|
||||
resize = is_child1 ? paned->child1_resize : paned->child2_resize;
|
||||
shrink = is_child1 ? paned->child1_shrink : paned->child2_shrink;
|
||||
|
||||
g_object_ref (child);
|
||||
gtk_container_remove (GTK_CONTAINER (parent), child);
|
||||
gtk_container_remove (GTK_CONTAINER (child->parent), child);
|
||||
if (is_child1)
|
||||
gtk_paned_pack1 (paned, child, !resize, shrink);
|
||||
else
|
||||
@@ -45,23 +37,15 @@ void
|
||||
toggle_shrink (GtkWidget *widget,
|
||||
GtkWidget *child)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
GtkPaned *paned;
|
||||
gboolean is_child1;
|
||||
GtkPaned *paned = GTK_PANED (child->parent);
|
||||
gboolean is_child1 = (child == paned->child1);
|
||||
gboolean resize, shrink;
|
||||
|
||||
parent = gtk_widget_get_parent (child);
|
||||
paned = GTK_PANED (parent);
|
||||
|
||||
is_child1 = (child == gtk_paned_get_child1 (paned));
|
||||
|
||||
gtk_container_child_get (GTK_CONTAINER (paned), child,
|
||||
"resize", &resize,
|
||||
"shrink", &shrink,
|
||||
NULL);
|
||||
resize = is_child1 ? paned->child1_resize : paned->child2_resize;
|
||||
shrink = is_child1 ? paned->child1_shrink : paned->child2_shrink;
|
||||
|
||||
g_object_ref (child);
|
||||
gtk_container_remove (GTK_CONTAINER (parent), child);
|
||||
gtk_container_remove (GTK_CONTAINER (child->parent), child);
|
||||
if (is_child1)
|
||||
gtk_paned_pack1 (paned, child, resize, !shrink);
|
||||
else
|
||||
@@ -75,15 +59,11 @@ create_pane_options (GtkPaned *paned,
|
||||
const gchar *label1,
|
||||
const gchar *label2)
|
||||
{
|
||||
GtkWidget *child1, *child2;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *check_button;
|
||||
|
||||
child1 = gtk_paned_get_child1 (paned);
|
||||
child2 = gtk_paned_get_child2 (paned);
|
||||
|
||||
|
||||
frame = gtk_frame_new (frame_label);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
|
||||
|
||||
@@ -98,16 +78,16 @@ create_pane_options (GtkPaned *paned,
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), check_button,
|
||||
0, 1, 1, 2);
|
||||
g_signal_connect (check_button, "toggled",
|
||||
G_CALLBACK (toggle_resize), child1);
|
||||
|
||||
G_CALLBACK (toggle_resize), paned->child1);
|
||||
|
||||
check_button = gtk_check_button_new_with_mnemonic ("_Shrink");
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), check_button,
|
||||
0, 1, 2, 3);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
|
||||
TRUE);
|
||||
g_signal_connect (check_button, "toggled",
|
||||
G_CALLBACK (toggle_shrink), child1);
|
||||
|
||||
G_CALLBACK (toggle_shrink), paned->child1);
|
||||
|
||||
label = gtk_label_new (label2);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label,
|
||||
1, 2, 0, 1);
|
||||
@@ -118,15 +98,15 @@ create_pane_options (GtkPaned *paned,
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
|
||||
TRUE);
|
||||
g_signal_connect (check_button, "toggled",
|
||||
G_CALLBACK (toggle_resize), child2);
|
||||
|
||||
G_CALLBACK (toggle_resize), paned->child2);
|
||||
|
||||
check_button = gtk_check_button_new_with_mnemonic ("_Shrink");
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), check_button,
|
||||
1, 2, 2, 3);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
|
||||
TRUE);
|
||||
g_signal_connect (check_button, "toggled",
|
||||
G_CALLBACK (toggle_shrink), child2);
|
||||
G_CALLBACK (toggle_shrink), paned->child2);
|
||||
|
||||
return frame;
|
||||
}
|
||||
@@ -153,14 +133,14 @@ do_panes (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Panes");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
vpaned = gtk_vpaned_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
|
||||
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
hpaned = gtk_hpaned_new ();
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
|
||||
@@ -96,12 +96,19 @@ load_pixbufs (GError **error)
|
||||
|
||||
/* Expose callback for the drawing area */
|
||||
static gint
|
||||
draw_cb (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
expose_cb (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
|
||||
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
|
||||
cairo_paint (cr);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -186,7 +193,7 @@ timeout (gpointer data)
|
||||
static guint timeout_id;
|
||||
|
||||
static void
|
||||
cleanup_callback (GObject *object,
|
||||
cleanup_callback (GtkObject *object,
|
||||
gpointer data)
|
||||
{
|
||||
g_source_remove (timeout_id);
|
||||
@@ -239,8 +246,8 @@ do_pixbufs (GtkWidget *do_widget)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
g_signal_connect (da, "expose-event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), da);
|
||||
|
||||
|
||||
@@ -91,9 +91,9 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
rotated_text_draw (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
rotated_text_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
#define RADIUS 150
|
||||
#define N_WORDS 5
|
||||
@@ -103,20 +103,21 @@ rotated_text_draw (GtkWidget *widget,
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
cairo_t *cr;
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
PangoAttrList *attrs;
|
||||
|
||||
int width = widget->allocation.width;
|
||||
int height = widget->allocation.height;
|
||||
double device_radius;
|
||||
int width, height;
|
||||
int i;
|
||||
|
||||
/* Create a cairo context and set up a transformation matrix so that the user
|
||||
* space coordinates for the centered square where we draw are [-RADIUS, RADIUS],
|
||||
* [-RADIUS, RADIUS].
|
||||
* We first center, then change the scale. */
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
device_radius = MIN (width, height) / 2.;
|
||||
cairo_translate (cr,
|
||||
device_radius + (width - 2 * device_radius) / 2,
|
||||
@@ -166,6 +167,7 @@ rotated_text_draw (GtkWidget *widget,
|
||||
g_object_unref (layout);
|
||||
g_object_unref (context);
|
||||
cairo_pattern_destroy (pattern);
|
||||
cairo_destroy (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -190,8 +192,7 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 4 * RADIUS, 2 * RADIUS);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
|
||||
box = gtk_hbox_new (TRUE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
/* Add a drawing area */
|
||||
@@ -202,8 +203,8 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
/* This overrides the background color from the theme */
|
||||
gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &white);
|
||||
|
||||
g_signal_connect (drawing_area, "draw",
|
||||
G_CALLBACK (rotated_text_draw), NULL);
|
||||
g_signal_connect (drawing_area, "expose-event",
|
||||
G_CALLBACK (rotated_text_expose_event), NULL);
|
||||
|
||||
/* And a label */
|
||||
|
||||
|
||||
@@ -241,7 +241,6 @@ entry_populate_popup (GtkEntry *entry,
|
||||
GtkWidget *
|
||||
do_search_entry (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *label;
|
||||
@@ -264,17 +263,15 @@ do_search_entry (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (search_entry_destroyed), &window);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
hbox = gtk_hbox_new (FALSE, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ toggle_grouping (GtkToggleButton *check_button,
|
||||
GtkWidget *
|
||||
do_sizegroup (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *table;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
@@ -116,10 +115,8 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
|
||||
@@ -27,7 +27,6 @@ on_stop_clicked (GtkButton *button, gpointer user_data)
|
||||
GtkWidget *
|
||||
do_spinner (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *button;
|
||||
@@ -48,14 +47,12 @@ do_spinner (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
/* Sensitive */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
spinner = gtk_spinner_new ();
|
||||
gtk_container_add (GTK_CONTAINER (hbox), spinner);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());
|
||||
@@ -63,7 +60,7 @@ do_spinner (GtkWidget *do_widget)
|
||||
spinner_sensitive = spinner;
|
||||
|
||||
/* Disabled */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
spinner = gtk_spinner_new ();
|
||||
gtk_container_add (GTK_CONTAINER (hbox), spinner);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());
|
||||
|
||||
@@ -58,10 +58,18 @@ stock_item_info_copy (StockItemInfo *src)
|
||||
return info;
|
||||
}
|
||||
|
||||
static
|
||||
G_DEFINE_BOXED_TYPE (StockItemInfo, stock_item_info,
|
||||
stock_item_info_copy,
|
||||
stock_item_info_free)
|
||||
static GType
|
||||
stock_item_info_get_type (void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("StockItemInfo",
|
||||
(GBoxedCopyFunc) stock_item_info_copy,
|
||||
(GBoxedFreeFunc) stock_item_info_free);
|
||||
|
||||
return our_type;
|
||||
}
|
||||
|
||||
typedef struct _StockItemDisplay StockItemDisplay;
|
||||
struct _StockItemDisplay
|
||||
@@ -417,7 +425,7 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
@@ -486,7 +494,7 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Selected Item");
|
||||
gtk_container_add (GTK_CONTAINER (align), frame);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
|
||||
@@ -184,8 +184,7 @@ do_textscroll (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
hbox = gtk_hbox_new (TRUE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
create_text_view (hbox, TRUE);
|
||||
|
||||
@@ -30,99 +30,99 @@ create_tags (GtkTextBuffer *buffer)
|
||||
* new copies of the same tags for every buffer.
|
||||
*
|
||||
* Tags are assigned default priorities in order of addition to the
|
||||
* tag table. That is, tags created later that affect the same text
|
||||
* tag table. That is, tags created later that affect the same text
|
||||
* property affected by an earlier tag will override the earlier
|
||||
* tag. You can modify tag priorities with
|
||||
* gtk_text_tag_set_priority().
|
||||
*/
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "heading",
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"size", 15 * PANGO_SCALE,
|
||||
NULL);
|
||||
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"size", 15 * PANGO_SCALE,
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "italic",
|
||||
"style", PANGO_STYLE_ITALIC, NULL);
|
||||
"style", PANGO_STYLE_ITALIC, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "bold",
|
||||
"weight", PANGO_WEIGHT_BOLD, NULL);
|
||||
|
||||
"weight", PANGO_WEIGHT_BOLD, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big",
|
||||
/* points times the PANGO_SCALE factor */
|
||||
"size", 20 * PANGO_SCALE, NULL);
|
||||
/* points times the PANGO_SCALE factor */
|
||||
"size", 20 * PANGO_SCALE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "xx-small",
|
||||
"scale", PANGO_SCALE_XX_SMALL, NULL);
|
||||
"scale", PANGO_SCALE_XX_SMALL, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "x-large",
|
||||
"scale", PANGO_SCALE_X_LARGE, NULL);
|
||||
|
||||
"scale", PANGO_SCALE_X_LARGE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "monospace",
|
||||
"family", "monospace", NULL);
|
||||
|
||||
"family", "monospace", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "blue_foreground",
|
||||
"foreground", "blue", NULL);
|
||||
"foreground", "blue", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "red_background",
|
||||
"background", "red", NULL);
|
||||
"background", "red", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
|
||||
"pixels_above_lines", 30, NULL);
|
||||
"pixels_above_lines", 30, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_after_line",
|
||||
"pixels_below_lines", 30, NULL);
|
||||
"pixels_below_lines", 30, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "double_spaced_line",
|
||||
"pixels_inside_wrap", 10, NULL);
|
||||
"pixels_inside_wrap", 10, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "not_editable",
|
||||
"editable", FALSE, NULL);
|
||||
|
||||
"editable", FALSE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "word_wrap",
|
||||
"wrap_mode", GTK_WRAP_WORD, NULL);
|
||||
"wrap_mode", GTK_WRAP_WORD, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "char_wrap",
|
||||
"wrap_mode", GTK_WRAP_CHAR, NULL);
|
||||
"wrap_mode", GTK_WRAP_CHAR, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "no_wrap",
|
||||
"wrap_mode", GTK_WRAP_NONE, NULL);
|
||||
|
||||
"wrap_mode", GTK_WRAP_NONE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "center",
|
||||
"justification", GTK_JUSTIFY_CENTER, NULL);
|
||||
"justification", GTK_JUSTIFY_CENTER, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "right_justify",
|
||||
"justification", GTK_JUSTIFY_RIGHT, NULL);
|
||||
"justification", GTK_JUSTIFY_RIGHT, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "wide_margins",
|
||||
"left_margin", 50, "right_margin", 50,
|
||||
NULL);
|
||||
|
||||
"left_margin", 50, "right_margin", 50,
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "strikethrough",
|
||||
"strikethrough", TRUE, NULL);
|
||||
|
||||
"strikethrough", TRUE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "underline",
|
||||
"underline", PANGO_UNDERLINE_SINGLE, NULL);
|
||||
"underline", PANGO_UNDERLINE_SINGLE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "double_underline",
|
||||
"underline", PANGO_UNDERLINE_DOUBLE, NULL);
|
||||
"underline", PANGO_UNDERLINE_DOUBLE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "superscript",
|
||||
"rise", 10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
"rise", 10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "subscript",
|
||||
"rise", -10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
"rise", -10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "rtl_quote",
|
||||
"wrap_mode", GTK_WRAP_WORD,
|
||||
"direction", GTK_TEXT_DIR_RTL,
|
||||
"indent", 30,
|
||||
"left_margin", 20,
|
||||
"right_margin", 20,
|
||||
NULL);
|
||||
"wrap_mode", GTK_WRAP_WORD,
|
||||
"direction", GTK_TEXT_DIR_RTL,
|
||||
"indent", 30,
|
||||
"left_margin", 20,
|
||||
"right_margin", 20,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -156,99 +156,90 @@ insert_text (GtkTextBuffer *buffer)
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = scaled;
|
||||
|
||||
|
||||
/* get start of buffer; each insertion will revalidate the
|
||||
* iterator to point to just after the inserted text.
|
||||
*/
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"The text widget can display text with all kinds of nifty attributes. "
|
||||
"It also supports multiple views of the same buffer; this demo is "
|
||||
"showing the same buffer in two places.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Font styles. ", -1,
|
||||
"heading", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, "The text widget can display text with all kinds of nifty attributes. It also supports multiple views of the same buffer; this demo is showing the same buffer in two places.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Font styles. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "For example, you can have ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"italic", -1,
|
||||
"italic", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
"italic", -1,
|
||||
"italic", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"bold", -1,
|
||||
"bold", NULL);
|
||||
"bold", -1,
|
||||
"bold", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"monospace (typewriter)", -1,
|
||||
"monospace", NULL);
|
||||
"monospace (typewriter)", -1,
|
||||
"monospace", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"big", -1,
|
||||
"big", NULL);
|
||||
"big", -1,
|
||||
"big", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " text. ", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"It's best not to hardcode specific text sizes; you can use relative "
|
||||
"sizes as with CSS, such as ", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, "It's best not to hardcode specific text sizes; you can use relative sizes as with CSS, such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"xx-small", -1,
|
||||
"xx-small", NULL);
|
||||
"xx-small", -1,
|
||||
"xx-small", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"x-large", -1,
|
||||
"x-large", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
" to ensure that your program properly adapts if the user changes the "
|
||||
"default font size.\n\n", -1);
|
||||
|
||||
"x-large", -1,
|
||||
"x-large", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " to ensure that your program properly adapts if the user changes the default font size.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Colors. ", -1,
|
||||
"heading", NULL);
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Colors such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground", -1,
|
||||
"blue_foreground", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a red background", -1,
|
||||
"red_background", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground on red background", -1,
|
||||
"blue_foreground",
|
||||
"red_background",
|
||||
NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Colors such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Underline, strikethrough, and rise. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground", -1,
|
||||
"blue_foreground", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a red background", -1,
|
||||
"red_background", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground on red background", -1,
|
||||
"blue_foreground",
|
||||
"red_background",
|
||||
NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Underline, strikethrough, and rise. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Strikethrough", -1,
|
||||
"strikethrough", NULL);
|
||||
"Strikethrough", -1,
|
||||
"strikethrough", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"underline", -1,
|
||||
"underline", NULL);
|
||||
"underline", -1,
|
||||
"underline", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"double underline", -1,
|
||||
"double_underline", NULL);
|
||||
"double underline", -1,
|
||||
"double_underline", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"superscript", -1,
|
||||
"superscript", NULL);
|
||||
"superscript", -1,
|
||||
"superscript", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", and ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"subscript", -1,
|
||||
"subscript", NULL);
|
||||
"subscript", -1,
|
||||
"subscript", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " are all supported.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Images. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "The buffer can have images in it: ", -1);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
@@ -256,126 +247,70 @@ insert_text (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_insert (buffer, &iter, " for example.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Spacing. ", -1,
|
||||
"heading", NULL);
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "You can adjust the amount of space before each line.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has a whole lot of space before it.\n", -1,
|
||||
"big_gap_before_line", "wide_margins", NULL);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space after each line; this line has a whole lot of space after it.\n", -1,
|
||||
"big_gap_after_line", "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space between wrapped lines; this line has extra space between each wrapped line in the same paragraph. To show off wrapping, some filler text: the quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah blah blah.\n", -1,
|
||||
"double_spaced_line", "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Also note that those lines have extra-wide margins.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Editability. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line is 'locked down' and can't be edited by the user - just try it! You can't delete this line.\n\n", -1,
|
||||
"not_editable", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Wrapping. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can adjust the amount of space before each line.\n", -1);
|
||||
"This line (and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has character-based wrapping, and can wrap between any two character glyphs. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", -1,
|
||||
"char_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has all wrapping turned off, so it makes the horizontal scrollbar appear.\n\n\n", -1,
|
||||
"no_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Justification. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has center justification.\n", -1,
|
||||
"center", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has a whole lot of space before it.\n", -1,
|
||||
"big_gap_before_line", "wide_margins", NULL);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space after each line; "
|
||||
"this line has a whole lot of space after it.\n", -1,
|
||||
"big_gap_after_line", "wide_margins", NULL);
|
||||
"This line has right justification.\n", -1,
|
||||
"right_justify", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space between wrapped lines; "
|
||||
"this line has extra space between each wrapped line in the same "
|
||||
"paragraph. To show off wrapping, some filler text: the quick "
|
||||
"brown fox jumped over the lazy dog. Blah blah blah blah blah "
|
||||
"blah blah blah blah.\n", -1,
|
||||
"double_spaced_line", "wide_margins", NULL);
|
||||
"\nThis line has big wide margins. Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.\n", -1,
|
||||
"wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Internationalization. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Also note that those lines have extra-wide margins.\n\n", -1);
|
||||
"You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew \327\251\327\234\327\225\327\235\nJapanese (\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Editability. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line is 'locked down' and can't be edited by the user - just "
|
||||
"try it! You can't delete this line.\n\n", -1,
|
||||
"not_editable", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Wrapping. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"This line (and most of the others in this buffer) is word-wrapped, "
|
||||
"using the proper Unicode algorithm. Word wrap should work in all "
|
||||
"scripts and languages that GTK+ supports. Let's make this a long "
|
||||
"paragraph to demonstrate: blah blah blah blah blah blah blah blah "
|
||||
"blah blah blah blah blah blah blah blah blah blah blah\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has character-based wrapping, and can wrap between any two "
|
||||
"character glyphs. Let's make this a long paragraph to demonstrate: "
|
||||
"blah blah blah blah blah blah blah blah blah blah blah blah blah blah "
|
||||
"blah blah blah blah blah\n\n", -1, "char_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has all wrapping turned off, so it makes the horizontal "
|
||||
"scrollbar appear.\n\n\n", -1, "no_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Justification. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has center justification.\n", -1,
|
||||
"center", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has right justification.\n", -1,
|
||||
"right_justify", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has big wide margins. Text text text text text text text "
|
||||
"text text text text text text text text text text text text text text "
|
||||
"text text text text text text text text text text text text text text "
|
||||
"text.\n", -1, "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Internationalization. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can put all sorts of Unicode text in the buffer.\n\nGerman "
|
||||
"(Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek "
|
||||
"(\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) "
|
||||
"\316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew "
|
||||
"\327\251\327\234\327\225\327\235\nJapanese "
|
||||
"(\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles "
|
||||
"bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, "
|
||||
"grapheme boundaries, and so on using the Pango internationalization "
|
||||
"framework.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Here's a word-wrapped quote in a right-to-left language:\n", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\331\210\331\202\330\257 \330\250\330\257\330\243 "
|
||||
"\330\253\331\204\330\247\330\253 \331\205\331\206 "
|
||||
"\330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\330\252\331\202\330\257\331\205\330\247 \331\201\331\212 "
|
||||
"\330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 "
|
||||
"\330\250\330\261\330\247\331\205\330\254\331\207\330\247 "
|
||||
"\331\203\331\205\331\206\330\270\331\205\330\247\330\252 "
|
||||
"\331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 "
|
||||
"\330\253\331\205 \330\252\330\255\331\210\331\204\330\252 "
|
||||
"\331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 "
|
||||
"\330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 "
|
||||
"\330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 "
|
||||
"\331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 "
|
||||
"\331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 "
|
||||
"\330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 "
|
||||
"\330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 "
|
||||
"\331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 "
|
||||
"\331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 "
|
||||
"\330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 "
|
||||
"\330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 "
|
||||
"\330\243\331\203\330\253\330\261 \331\207\330\260\331\207 "
|
||||
"\330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\331\206\330\254\330\247\330\255\330\247 \331\207\331\210 "
|
||||
"\302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 "
|
||||
"\331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
|
||||
"rtl_quote", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can put widgets in the buffer: Here's a button: ", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, "Here's a word-wrapped quote in a right-to-left language:\n", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "\331\210\331\202\330\257 \330\250\330\257\330\243 \330\253\331\204\330\247\330\253 \331\205\331\206 \330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \330\252\331\202\330\257\331\205\330\247 \331\201\331\212 \330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 \330\250\330\261\330\247\331\205\330\254\331\207\330\247 \331\203\331\205\331\206\330\270\331\205\330\247\330\252 \331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 \330\253\331\205 \330\252\330\255\331\210\331\204\330\252 \331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 \330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 \330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 \331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 \331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 \331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 \330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 \330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 \331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 \331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 \330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 \330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 \330\243\331\203\330\253\330\261 \331\207\330\260\331\207 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \331\206\330\254\330\247\330\255\330\247 \331\207\331\210 \302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 \331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
|
||||
"rtl_quote", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "You can put widgets in the buffer: Here's a button: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter, " and a menu: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
@@ -386,12 +321,8 @@ insert_text (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_insert (buffer, &iter, " finally a text entry: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter, ".\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; "
|
||||
"it leaves out, for example: invisible/hidden text, tab stops, "
|
||||
"application-drawn areas on the sides of the widget for displaying "
|
||||
"breakpoints and such...", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text, tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...", -1);
|
||||
|
||||
/* Apply word_wrap tag to whole buffer */
|
||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||
@@ -417,7 +348,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
GtkTextIter iter;
|
||||
GtkTextBuffer *buffer;
|
||||
int i;
|
||||
|
||||
|
||||
buffer = gtk_text_view_get_buffer (text_view);
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
@@ -427,7 +358,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
{
|
||||
GtkTextChildAnchor *anchor;
|
||||
GtkWidget *widget;
|
||||
|
||||
|
||||
anchor = gtk_text_iter_get_child_anchor (&iter);
|
||||
|
||||
if (i == 0)
|
||||
@@ -448,15 +379,15 @@ attach_widgets (GtkTextView *text_view)
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
widget = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, NULL);
|
||||
widget = gtk_hscale_new (NULL);
|
||||
gtk_range_set_range (GTK_RANGE (widget), 0, 100);
|
||||
gtk_widget_set_size_request (widget, 70, -1);
|
||||
}
|
||||
else if (i == 3)
|
||||
{
|
||||
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
|
||||
widget = gtk_image_new_from_file (filename);
|
||||
g_free (filename);
|
||||
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
|
||||
widget = gtk_image_new_from_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
else if (i == 4)
|
||||
{
|
||||
@@ -490,20 +421,20 @@ do_textview (GtkWidget *do_widget)
|
||||
GtkWidget *view2;
|
||||
GtkWidget *sw;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
|
||||
450, 450);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "TextView");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
vpaned = gtk_vpaned_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vpaned);
|
||||
|
||||
@@ -515,19 +446,19 @@ do_textview (GtkWidget *do_widget)
|
||||
view1 = gtk_text_view_new ();
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view1));
|
||||
view2 = gtk_text_view_new_with_buffer (buffer);
|
||||
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), sw);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), view1);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_paned_add2 (GTK_PANED (vpaned), sw);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), view2);
|
||||
@@ -537,7 +468,7 @@ do_textview (GtkWidget *do_widget)
|
||||
|
||||
attach_widgets (GTK_TEXT_VIEW (view1));
|
||||
attach_widgets (GTK_TEXT_VIEW (view2));
|
||||
|
||||
|
||||
gtk_widget_show_all (vpaned);
|
||||
}
|
||||
|
||||
@@ -563,10 +494,10 @@ recursive_attach_view (int depth,
|
||||
GtkWidget *event_box;
|
||||
GdkColor color;
|
||||
GtkWidget *align;
|
||||
|
||||
|
||||
if (depth > 4)
|
||||
return;
|
||||
|
||||
|
||||
child_view = gtk_text_view_new_with_buffer (gtk_text_view_get_buffer (view));
|
||||
|
||||
/* Event box is to add a black border around each child view */
|
||||
@@ -576,10 +507,10 @@ recursive_attach_view (int depth,
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (align), 1);
|
||||
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (event_box), align);
|
||||
gtk_container_add (GTK_CONTAINER (align), child_view);
|
||||
|
||||
|
||||
gtk_text_view_add_child_at_anchor (view, event_box, anchor);
|
||||
|
||||
recursive_attach_view (depth + 1, GTK_TEXT_VIEW (child_view), anchor);
|
||||
@@ -602,21 +533,21 @@ easter_egg_callback (GtkWidget *button,
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
buffer = gtk_text_buffer_new (NULL);
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"This buffer is shared by a set of nested text views.\n Nested view:\n", -1);
|
||||
"This buffer is shared by a set of nested text views.\n Nested view:\n", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"\nDon't do this in real applications, please.\n", -1);
|
||||
|
||||
view = gtk_text_view_new_with_buffer (buffer);
|
||||
|
||||
|
||||
recursive_attach_view (0, GTK_TEXT_VIEW (view), anchor);
|
||||
|
||||
|
||||
g_object_unref (buffer);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
@@ -632,7 +563,7 @@ easter_egg_callback (GtkWidget *button,
|
||||
g_object_add_weak_pointer (G_OBJECT (window), window_ptr);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
|
||||
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,13 +81,19 @@ canvas_item_draw (const CanvasItem *item,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
canvas_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
canvas_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
cairo_t *cr;
|
||||
GList *iter;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
gdk_cairo_region (cr, event->region);
|
||||
cairo_clip (cr);
|
||||
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
cairo_paint (cr);
|
||||
cairo_rectangle (cr, 0, 0, widget->allocation.width, widget->allocation.height);
|
||||
cairo_fill (cr);
|
||||
|
||||
for (iter = canvas_items; iter; iter = iter->next)
|
||||
canvas_item_draw (iter->data, cr, FALSE);
|
||||
@@ -95,6 +101,8 @@ canvas_draw (GtkWidget *widget,
|
||||
if (drop_item)
|
||||
canvas_item_draw (drop_item, cr, TRUE);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -165,7 +173,6 @@ palette_drag_data_received (GtkWidget *widget,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GtkToolItemGroup *drop_group = NULL;
|
||||
GtkWidget *drag_palette = gtk_drag_get_source_widget (context);
|
||||
GtkWidget *drag_item = NULL;
|
||||
@@ -186,13 +193,10 @@ palette_drag_data_received (GtkWidget *widget,
|
||||
GTK_TOOL_ITEM_GROUP (drag_item),
|
||||
drop_group);
|
||||
else if (GTK_IS_TOOL_ITEM (drag_item) && drop_group)
|
||||
{
|
||||
gtk_widget_get_allocation (GTK_WIDGET (drop_group), &allocation);
|
||||
palette_drop_item (GTK_TOOL_ITEM (drag_item),
|
||||
drop_group,
|
||||
x - allocation.x,
|
||||
y - allocation.y);
|
||||
}
|
||||
palette_drop_item (GTK_TOOL_ITEM (drag_item),
|
||||
drop_group,
|
||||
x - GTK_WIDGET (drop_group)->allocation.x,
|
||||
y - GTK_WIDGET (drop_group)->allocation.y);
|
||||
}
|
||||
|
||||
/********************************/
|
||||
@@ -368,13 +372,11 @@ on_combo_orientation_changed (GtkComboBox *combo_box,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkToolPalette *palette = GTK_TOOL_PALETTE (user_data);
|
||||
GtkScrolledWindow *sw;
|
||||
GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (GTK_WIDGET (palette)->parent);
|
||||
GtkTreeModel *model = gtk_combo_box_get_model (combo_box);
|
||||
GtkTreeIter iter;
|
||||
gint val = 0;
|
||||
|
||||
sw = GTK_SCROLLED_WINDOW (gtk_widget_get_parent (GTK_WIDGET (palette)));
|
||||
|
||||
if (!gtk_combo_box_get_active_iter (combo_box, &iter))
|
||||
return;
|
||||
|
||||
@@ -438,7 +440,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
/* Add widgets to control the ToolPalette appearance: */
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
box = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
/* Orientation combo box: */
|
||||
@@ -507,7 +509,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
|
||||
|
||||
/* Add hbox */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
|
||||
|
||||
/* Add and fill the ToolPalette: */
|
||||
@@ -561,7 +563,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_widget_set_app_paintable (contents, TRUE);
|
||||
|
||||
g_object_connect (contents,
|
||||
"signal::draw", canvas_draw, NULL,
|
||||
"signal::expose-event", canvas_expose_event, NULL,
|
||||
"signal::drag-data-received", passive_canvas_drag_data_received, NULL,
|
||||
NULL);
|
||||
|
||||
@@ -589,7 +591,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_widget_set_app_paintable (contents, TRUE);
|
||||
|
||||
g_object_connect (contents,
|
||||
"signal::draw", canvas_draw, NULL,
|
||||
"signal::expose-event", canvas_expose_event, NULL,
|
||||
"signal::drag-motion", interactive_canvas_drag_motion, NULL,
|
||||
"signal::drag-data-received", interactive_canvas_drag_data_received, NULL,
|
||||
"signal::drag-leave", interactive_canvas_drag_leave, NULL,
|
||||
|
||||
@@ -402,7 +402,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box1);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box1),
|
||||
@@ -209,11 +209,11 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
|
||||
|
||||
|
||||
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
separator = gtk_hseparator_new ();
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
|
||||
|
||||
|
||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
|
||||
|
||||
@@ -86,11 +86,17 @@ load_pixbufs (void)
|
||||
}
|
||||
|
||||
/* Expose callback for the drawing area */
|
||||
static gboolean
|
||||
draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
|
||||
static gint
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
|
||||
cairo_paint (cr);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -173,7 +179,7 @@ static guint timeout_id;
|
||||
|
||||
/* Destroy handler for the window */
|
||||
static void
|
||||
destroy_cb (GObject *object, gpointer data)
|
||||
destroy_cb (GtkObject *object, gpointer data)
|
||||
{
|
||||
g_source_remove (timeout_id);
|
||||
timeout_id = 0;
|
||||
@@ -208,8 +214,8 @@ main (int argc, char **argv)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
g_signal_connect (da, "expose_event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), da);
|
||||
|
||||
|
||||
@@ -16,5 +16,5 @@ void
|
||||
pixbuf_init (void)
|
||||
{
|
||||
if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
|
||||
g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/loaders.cache", TRUE);
|
||||
g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE);
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ do_image (const char *filename)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -384,7 +384,7 @@ do_nonprogressive (const gchar *filename)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ main (int argc, char **argv)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
tree = create_tree ();
|
||||
@@ -369,16 +369,16 @@ main (int argc, char **argv)
|
||||
gtk_label_new ("Source"));
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "title");
|
||||
g_object_set (tag,
|
||||
"font", "Sans 18",
|
||||
NULL);
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"font", "Sans 18",
|
||||
NULL);
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "source");
|
||||
g_object_set (tag,
|
||||
"font", "Courier 10",
|
||||
"pixels_above_lines", 0,
|
||||
"pixels_below_lines", 0,
|
||||
NULL);
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"font", "Courier 10",
|
||||
"pixels_above_lines", 0,
|
||||
"pixels_below_lines", 0,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
@@ -112,8 +112,8 @@ main (int argc, char **argv)
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
pixbuf = gdk_pixbuf_get_from_window (root,
|
||||
0, 0, 150, 160);
|
||||
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
|
||||
0, 0, 0, 0, 150, 160);
|
||||
|
||||
/* PASS */
|
||||
g_debug ("try to save PNG with a profile");
|
||||
|
||||
118
demos/testpixbuf-drawable.c
Normal file
118
demos/testpixbuf-drawable.c
Normal file
@@ -0,0 +1,118 @@
|
||||
#include "config.h"
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int
|
||||
close_app (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
expose_cb (GtkWidget *drawing_area, GdkEventExpose *evt, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *) g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
|
||||
if (gdk_pixbuf_get_has_alpha (pixbuf))
|
||||
{
|
||||
gdk_draw_rgb_32_image (drawing_area->window,
|
||||
drawing_area->style->black_gc,
|
||||
evt->area.x, evt->area.y,
|
||||
evt->area.width,
|
||||
evt->area.height,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
gdk_pixbuf_get_pixels (pixbuf) +
|
||||
(evt->area.y * gdk_pixbuf_get_rowstride (pixbuf)) +
|
||||
(evt->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
|
||||
gdk_pixbuf_get_rowstride (pixbuf));
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_draw_rgb_image (drawing_area->window,
|
||||
drawing_area->style->black_gc,
|
||||
evt->area.x, evt->area.y,
|
||||
evt->area.width,
|
||||
evt->area.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
gdk_pixbuf_get_pixels (pixbuf) +
|
||||
(evt->area.y * gdk_pixbuf_get_rowstride (pixbuf)) +
|
||||
(evt->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
|
||||
gdk_pixbuf_get_rowstride (pixbuf));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int
|
||||
configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *) g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
|
||||
|
||||
g_print ("X:%d Y:%d\n", evt->width, evt->height);
|
||||
if (evt->width != gdk_pixbuf_get_width (pixbuf) || evt->height != gdk_pixbuf_get_height (pixbuf))
|
||||
{
|
||||
GdkWindow *root;
|
||||
GdkPixbuf *new_pixbuf;
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
|
||||
0, 0, 0, 0, evt->width, evt->height);
|
||||
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
extern void pixbuf_init (void);
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GdkWindow *root;
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *drawing_area;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf_init ();
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gdk_rgb_set_verbose (TRUE);
|
||||
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
|
||||
0, 0, 0, 0, 150, 160);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "delete_event",
|
||||
G_CALLBACK (close_app), NULL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (close_app), NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
gtk_widget_set_size_request (GTK_WIDGET (drawing_area),
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_pixbuf_get_height (pixbuf));
|
||||
g_signal_connect (drawing_area, "expose_event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
|
||||
g_signal_connect (drawing_area, "configure_event",
|
||||
G_CALLBACK (configure_cb), NULL);
|
||||
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", pixbuf);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), drawing_area, TRUE, TRUE, 0);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
gtk_main ();
|
||||
return 0;
|
||||
}
|
||||
@@ -307,16 +307,21 @@ close_app (GtkWidget *widget, gpointer data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
draw_cb (GtkWidget *drawing_area, cairo_t *cr, gpointer data)
|
||||
static int
|
||||
expose_cb (GtkWidget *drawing_area, GdkEventExpose *evt, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
cairo_t *cr;
|
||||
|
||||
pixbuf = (GdkPixbuf *) g_object_get_data (G_OBJECT (drawing_area),
|
||||
"pixbuf");
|
||||
|
||||
cr = gdk_cairo_create (evt->window);
|
||||
gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
|
||||
cairo_paint (cr);
|
||||
gdk_cairo_rectangle (cr, &evt->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -335,8 +340,8 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
|
||||
GdkPixbuf *new_pixbuf;
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
new_pixbuf = gdk_pixbuf_get_from_window (root,
|
||||
0, 0, evt->width, evt->height);
|
||||
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
|
||||
0, 0, 0, 0, evt->width, evt->height);
|
||||
g_object_set_data_full (G_OBJECT (drawing_area), "pixbuf", new_pixbuf,
|
||||
(GDestroyNotify) g_object_unref);
|
||||
}
|
||||
@@ -356,8 +361,8 @@ main (int argc, char **argv)
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
pixbuf = gdk_pixbuf_get_from_window (root,
|
||||
0, 0, 150, 160);
|
||||
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
|
||||
0, 0, 0, 0, 150, 160);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "delete_event",
|
||||
@@ -365,15 +370,15 @@ main (int argc, char **argv)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (close_app), NULL);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
gtk_widget_set_size_request (GTK_WIDGET (drawing_area),
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_pixbuf_get_height (pixbuf));
|
||||
g_signal_connect (drawing_area, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
g_signal_connect (drawing_area, "expose_event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
|
||||
g_signal_connect (drawing_area, "configure_event",
|
||||
G_CALLBACK (configure_cb), NULL);
|
||||
|
||||
@@ -32,27 +32,30 @@ overall_changed_cb (GtkAdjustment *adjustment, gpointer data)
|
||||
}
|
||||
|
||||
gboolean
|
||||
draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *dest;
|
||||
int width, height;
|
||||
cairo_t *cr;
|
||||
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
|
||||
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
|
||||
gdk_window_set_back_pixmap (widget->window, NULL, FALSE);
|
||||
|
||||
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
|
||||
|
||||
gdk_pixbuf_composite_color (pixbuf, dest,
|
||||
0, 0, width, height,
|
||||
0, 0,
|
||||
(double) width / gdk_pixbuf_get_width (pixbuf),
|
||||
(double) height / gdk_pixbuf_get_height (pixbuf),
|
||||
0, 0, event->area.width, event->area.height,
|
||||
-event->area.x, -event->area.y,
|
||||
(double) widget->allocation.width / gdk_pixbuf_get_width (pixbuf),
|
||||
(double) widget->allocation.height / gdk_pixbuf_get_height (pixbuf),
|
||||
interp_type, overall_alpha,
|
||||
0, 0, 16, 0xaaaaaa, 0x555555);
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
|
||||
gdk_cairo_set_source_pixbuf (cr, dest, 0, 0);
|
||||
cairo_paint (cr);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
g_object_unref (dest);
|
||||
|
||||
return TRUE;
|
||||
@@ -98,7 +101,7 @@ main(int argc, char **argv)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
combo_box = gtk_combo_box_text_new ();
|
||||
@@ -117,17 +120,17 @@ main(int argc, char **argv)
|
||||
alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Overall Alpha:");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
|
||||
adjustment = gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0);
|
||||
adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0));
|
||||
g_signal_connect (adjustment, "value_changed",
|
||||
G_CALLBACK (overall_changed_cb), NULL);
|
||||
|
||||
hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
|
||||
hscale = gtk_hscale_new (adjustment);
|
||||
gtk_scale_set_digits (GTK_SCALE (hscale), 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), hscale, TRUE, TRUE, 0);
|
||||
|
||||
@@ -135,14 +138,13 @@ main(int argc, char **argv)
|
||||
gtk_widget_show_all (vbox);
|
||||
|
||||
/* Compute the size without the drawing area, so we know how big to make the default size */
|
||||
gtk_widget_get_preferred_size ( (vbox),
|
||||
&scratch_requisition, NULL);
|
||||
gtk_widget_size_request (vbox, &scratch_requisition);
|
||||
|
||||
darea = gtk_drawing_area_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), darea, TRUE, TRUE, 0);
|
||||
|
||||
g_signal_connect (darea, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
g_signal_connect (darea, "expose_event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
|
||||
646
demos/testpixbuf.c
Normal file
646
demos/testpixbuf.c
Normal file
@@ -0,0 +1,646 @@
|
||||
/* testpixbuf -- test program for gdk-pixbuf code
|
||||
* Copyright (C) 1999 Mark Crichton, Larry Ewing
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "test-inline-pixbufs.h"
|
||||
|
||||
typedef struct {
|
||||
FILE *imagefile;
|
||||
GdkPixbufLoader *loader;
|
||||
GtkWidget **rgbwin;
|
||||
guchar *buf;
|
||||
guint timeout;
|
||||
guint readlen;
|
||||
} ProgressFileStatus;
|
||||
|
||||
|
||||
#define DEFAULT_WIDTH 24
|
||||
#define DEFAULT_HEIGHT 24
|
||||
|
||||
static const unsigned char default_image[] = {
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xae, 0xb3, 0xb3, 0xc6, 0xc9, 0xcd, 0xd7, 0xd4, 0xdf,
|
||||
0xec, 0xde, 0xf3, 0xe7, 0xcb, 0xe9, 0xd9, 0xb5, 0xd3, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xb1, 0xb7, 0xa5,
|
||||
0xb0, 0xb8, 0xad, 0xb3, 0xb9, 0xb6, 0xc1, 0xc6, 0xc8, 0xd5, 0xd3, 0xdc,
|
||||
0xec, 0xde, 0xf3, 0xe5, 0xca, 0xe6, 0xe0, 0xbb, 0xd7, 0xe1, 0xad, 0xc2,
|
||||
0xe3, 0xac, 0xa3, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xca, 0xc1, 0xa4, 0xc5, 0xc7, 0xac,
|
||||
0xb7, 0xbe, 0xaf, 0xad, 0xb4, 0xaf, 0xbd, 0xc2, 0xc3, 0xd1, 0xd0, 0xd8,
|
||||
0xec, 0xde, 0xf3, 0xe5, 0xc7, 0xe4, 0xe0, 0xb6, 0xd1, 0xe7, 0xa9, 0xb4,
|
||||
0xed, 0xcd, 0xb6, 0xd6, 0xcf, 0xae, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xdf, 0xa7, 0x9f, 0xdd, 0xbf, 0xaa, 0xcf, 0xc5, 0xa9,
|
||||
0xc1, 0xc4, 0xac, 0xb2, 0xba, 0xaf, 0xb6, 0xbb, 0xbb, 0xcd, 0xce, 0xd4,
|
||||
0xec, 0xde, 0xf3, 0xe4, 0xc4, 0xe1, 0xe0, 0xaf, 0xc7, 0xea, 0xbc, 0xae,
|
||||
0xe1, 0xd6, 0xb6, 0xc7, 0xcc, 0xae, 0xa2, 0xab, 0x9a, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xe3, 0xab, 0xc0, 0xe6, 0xa3, 0xa7, 0xdf, 0xba, 0xa8,
|
||||
0xcf, 0xc5, 0xa9, 0xbd, 0xc2, 0xae, 0xad, 0xb4, 0xaf, 0xc6, 0xc9, 0xcd,
|
||||
0xec, 0xde, 0xf3, 0xe2, 0xbf, 0xdc, 0xe7, 0xa9, 0xb4, 0xe7, 0xd6, 0xb8,
|
||||
0xc7, 0xcc, 0xae, 0xac, 0xb6, 0xa6, 0x9d, 0xa8, 0x9f, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xd9, 0xaf, 0xcf, 0xe1, 0xb4, 0xd2, 0xe2, 0xb0, 0xcb, 0xe4, 0xa9, 0xbb,
|
||||
0xe2, 0xb2, 0xa6, 0xcf, 0xc5, 0xa9, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d,
|
||||
0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xed, 0xcd, 0xb6, 0xc7, 0xcc, 0xae,
|
||||
0xa6, 0xb1, 0xa3, 0x98, 0xa2, 0x9c, 0x8f, 0x97, 0x96, 0x7e, 0x84, 0x85,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe8, 0xc6, 0xe7, 0xe5, 0xc2, 0xe3, 0xe3, 0xbd, 0xdd, 0xe1, 0xb6, 0xd5,
|
||||
0xe2, 0xb0, 0xcb, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0x9d, 0xa8, 0x9f,
|
||||
0x8f, 0x97, 0x96, 0x8b, 0x90, 0x92, 0x97, 0x9e, 0xa2, 0xa0, 0xa7, 0xae,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe7, 0xd3, 0xed, 0xe8, 0xd1, 0xed, 0xe8, 0xce, 0xec, 0xe9, 0xcc, 0xeb,
|
||||
0xe8, 0xc6, 0xe7, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0x97, 0x9e, 0xa2,
|
||||
0xa7, 0xae, 0xb7, 0xb2, 0xb6, 0xc5, 0xba, 0xbc, 0xce, 0xbf, 0xbe, 0xd3,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0,
|
||||
0xe9, 0xdf, 0xf0, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0xe1, 0xd2, 0xf7,
|
||||
0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xca, 0xc7, 0xd2, 0xc5, 0xc4, 0xcd, 0xbf, 0xbf, 0xc7, 0xb8, 0xb9, 0xc0,
|
||||
0xae, 0xaf, 0xb6, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0xd5, 0xa8, 0xe1,
|
||||
0xd8, 0xb2, 0xe9, 0xd9, 0xb8, 0xed, 0xdb, 0xbd, 0xf0, 0xdc, 0xbf, 0xf1,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xa4, 0xa6, 0xac, 0xa8, 0xaa, 0xaf, 0xa0, 0xa6, 0xa8, 0x98, 0x9e, 0x9c,
|
||||
0xa1, 0xa8, 0x9e, 0xb1, 0xb6, 0xa1, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d,
|
||||
0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xc0, 0x8c, 0xad, 0xcc, 0x90, 0xb5,
|
||||
0xd3, 0x94, 0xca, 0xd6, 0xa2, 0xdb, 0xd5, 0xa8, 0xe1, 0xcf, 0xa7, 0xdf,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0x98, 0x9f, 0x9b, 0xa1, 0xa8, 0x9e, 0xac, 0xb3, 0xa0,
|
||||
0xb9, 0xb9, 0xa4, 0xd0, 0xb8, 0xa8, 0xc5, 0xb5, 0xb8, 0xb6, 0xbb, 0xad,
|
||||
0xe3, 0xd7, 0xb5, 0xdd, 0xb4, 0xa9, 0xcb, 0x89, 0xac, 0xc0, 0x8c, 0xad,
|
||||
0xc8, 0x91, 0xb5, 0xd1, 0x8d, 0xb7, 0xd3, 0x94, 0xca, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xa1, 0xa7, 0x98, 0xb1, 0xb6, 0xa1, 0xbd, 0xb9, 0xa5,
|
||||
0xd0, 0xb8, 0xa8, 0xca, 0xb5, 0xb7, 0xb8, 0xb1, 0xb1, 0xc2, 0xc8, 0xb2,
|
||||
0xe3, 0xd7, 0xb5, 0xe1, 0xbf, 0xaf, 0xdb, 0x92, 0x9a, 0xbe, 0x82, 0xa6,
|
||||
0xc0, 0x8c, 0xad, 0xc8, 0x91, 0xb4, 0xc7, 0x8b, 0xb0, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xbc, 0xb6, 0xa1, 0xd0, 0xb8, 0xa8,
|
||||
0xcd, 0xb6, 0xb7, 0xc0, 0xb4, 0xb5, 0xb1, 0xb1, 0xaa, 0xca, 0xd1, 0xb4,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xc1, 0xb0, 0xdb, 0xa8, 0xa3, 0xd2, 0x8a, 0xa9,
|
||||
0xb7, 0x7e, 0xa2, 0xbd, 0x89, 0xa9, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xc9, 0xaf, 0xaf,
|
||||
0xc5, 0xb5, 0xb8, 0xb8, 0xb1, 0xb1, 0xb6, 0xbb, 0xad, 0xd0, 0xd6, 0xb5,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xaf, 0xdd, 0xb4, 0xa9, 0xdb, 0x92, 0x9a,
|
||||
0xc6, 0x84, 0xa7, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xac, 0xaa, 0xa6, 0xbd, 0xc3, 0xb0, 0xd2, 0xd7, 0xb5,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xae, 0xdb, 0xb6, 0xa8, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff
|
||||
};
|
||||
|
||||
|
||||
static const char * book_open_xpm[] = {
|
||||
"16 16 4 1",
|
||||
" c None s None",
|
||||
". c black",
|
||||
"X c #808080",
|
||||
"o c white",
|
||||
" ",
|
||||
" .. ",
|
||||
" .Xo. ... ",
|
||||
" .Xoo. ..oo. ",
|
||||
" .Xooo.Xooo... ",
|
||||
" .Xooo.oooo.X. ",
|
||||
" .Xooo.Xooo.X. ",
|
||||
" .Xooo.oooo.X. ",
|
||||
" .Xooo.Xooo.X. ",
|
||||
" .Xooo.oooo.X. ",
|
||||
" .Xoo.Xoo..X. ",
|
||||
" .Xo.o..ooX. ",
|
||||
" .X..XXXXX. ",
|
||||
" ..X....... ",
|
||||
" .. ",
|
||||
" "};
|
||||
|
||||
static const char * book_closed_xpm[] = {
|
||||
"16 16 6 1",
|
||||
" c None s None",
|
||||
". c black",
|
||||
"X c red",
|
||||
"o c yellow",
|
||||
"O c #808080",
|
||||
"# c white",
|
||||
" ",
|
||||
" .. ",
|
||||
" ..XX. ",
|
||||
" ..XXXXX. ",
|
||||
" ..XXXXXXXX. ",
|
||||
".ooXXXXXXXXX. ",
|
||||
"..ooXXXXXXXXX. ",
|
||||
".X.ooXXXXXXXXX. ",
|
||||
".XX.ooXXXXXX.. ",
|
||||
" .XX.ooXXX..#O ",
|
||||
" .XX.oo..##OO. ",
|
||||
" .XX..##OO.. ",
|
||||
" .X.#OO.. ",
|
||||
" ..O.. ",
|
||||
" .. ",
|
||||
" "};
|
||||
|
||||
static const char * mini_page_xpm[] = {
|
||||
"16 16 4 1",
|
||||
" c None s None",
|
||||
". c black",
|
||||
"X c white",
|
||||
"o c #808080",
|
||||
" ",
|
||||
" ....... ",
|
||||
" .XXXXX.. ",
|
||||
" .XoooX.X. ",
|
||||
" .XXXXX.... ",
|
||||
" .XooooXoo.o ",
|
||||
" .XXXXXXXX.o ",
|
||||
" .XooooooX.o ",
|
||||
" .XXXXXXXX.o ",
|
||||
" .XooooooX.o ",
|
||||
" .XXXXXXXX.o ",
|
||||
" .XooooooX.o ",
|
||||
" .XXXXXXXX.o ",
|
||||
" ..........o ",
|
||||
" oooooooooo ",
|
||||
" "};
|
||||
|
||||
static const char * gtk_mini_xpm[] = {
|
||||
"15 20 17 1",
|
||||
" c None",
|
||||
". c #14121F",
|
||||
"+ c #278828",
|
||||
"@ c #9B3334",
|
||||
"# c #284C72",
|
||||
"$ c #24692A",
|
||||
"% c #69282E",
|
||||
"& c #37C539",
|
||||
"* c #1D2F4D",
|
||||
"= c #6D7076",
|
||||
"- c #7D8482",
|
||||
"; c #E24A49",
|
||||
"> c #515357",
|
||||
", c #9B9C9B",
|
||||
"' c #2FA232",
|
||||
") c #3CE23D",
|
||||
"! c #3B6CCB",
|
||||
" ",
|
||||
" ***> ",
|
||||
" >.*!!!* ",
|
||||
" ***....#*= ",
|
||||
" *!*.!!!**!!# ",
|
||||
" .!!#*!#*!!!!# ",
|
||||
" @%#!.##.*!!$& ",
|
||||
" @;%*!*.#!#')) ",
|
||||
" @;;@%!!*$&)'' ",
|
||||
" @%.%@%$'&)$+' ",
|
||||
" @;...@$'*'*)+ ",
|
||||
" @;%..@$+*.')$ ",
|
||||
" @;%%;;$+..$)# ",
|
||||
" @;%%;@$$$'.$# ",
|
||||
" %;@@;;$$+))&* ",
|
||||
" %;;;@+$&)&* ",
|
||||
" %;;@'))+> ",
|
||||
" %;@'&# ",
|
||||
" >%$$ ",
|
||||
" >= "};
|
||||
|
||||
const gchar ** xpms[] = {
|
||||
book_open_xpm,
|
||||
book_closed_xpm,
|
||||
mini_page_xpm,
|
||||
gtk_mini_xpm,
|
||||
NULL
|
||||
};
|
||||
|
||||
static void
|
||||
quit_func (GtkWidget *widget, gpointer dummy)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
static void
|
||||
expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *)g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
|
||||
|
||||
if (gdk_pixbuf_get_has_alpha (pixbuf)) {
|
||||
GdkPixbuf *dest;
|
||||
cairo_t *cr;
|
||||
|
||||
gdk_window_set_back_pixmap (drawing_area->window, NULL, FALSE);
|
||||
|
||||
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
|
||||
|
||||
gdk_pixbuf_composite_color (pixbuf, dest,
|
||||
0, 0, event->area.width, event->area.height,
|
||||
-event->area.x, -event->area.y,
|
||||
(double) drawing_area->allocation.width / gdk_pixbuf_get_width (pixbuf),
|
||||
(double) drawing_area->allocation.height / gdk_pixbuf_get_height (pixbuf),
|
||||
GDK_INTERP_BILINEAR, 255,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
cr = gdk_cairo_create (drawing_area->window);
|
||||
|
||||
gdk_cairo_set_source_pixbuf (cr, dest, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
g_object_unref (dest);
|
||||
} else {
|
||||
gdk_draw_rgb_image (drawing_area->window,
|
||||
drawing_area->style->white_gc,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width,
|
||||
event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
gdk_pixbuf_get_pixels (pixbuf)
|
||||
+ (event->area.y * gdk_pixbuf_get_rowstride (pixbuf))
|
||||
+ (event->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
|
||||
gdk_pixbuf_get_rowstride (pixbuf));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data)
|
||||
{
|
||||
#if 0
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *)g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
|
||||
|
||||
if (((event->width) != gdk_pixbuf_get_width (pixbuf)) ||
|
||||
((event->height) != gdk_pixbuf_get_height (pixbuf)))
|
||||
gdk_pixbuf_scale (pixbuf, event->width, event->height);
|
||||
#endif
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
new_testrgb_window (GdkPixbuf *pixbuf, gchar *title)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *temp_box;
|
||||
GtkWidget *button;
|
||||
GtkWidget *drawing_area;
|
||||
gint w, h;
|
||||
|
||||
g_return_val_if_fail (pixbuf != NULL, NULL);
|
||||
w = gdk_pixbuf_get_width (pixbuf);
|
||||
h = gdk_pixbuf_get_height (pixbuf);
|
||||
|
||||
window = g_object_new (gtk_window_get_type (),
|
||||
"GtkObject::user_data", NULL,
|
||||
"GtkWindow::type", GTK_WINDOW_TOPLEVEL,
|
||||
"GtkWindow::title", title ? title : "testrgb",
|
||||
"GtkWindow::allow_shrink", TRUE,
|
||||
NULL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (quit_func), NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
|
||||
if (title)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new (title),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
|
||||
temp_box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_widget_set_size_request (GTK_WIDGET (drawing_area), w, h);
|
||||
gtk_box_pack_start (GTK_BOX (temp_box), drawing_area, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), temp_box, FALSE, FALSE, 0);
|
||||
|
||||
|
||||
g_signal_connect (drawing_area, "expose_event",
|
||||
G_CALLBACK (expose_func), NULL);
|
||||
g_signal_connect (drawing_area, "configure_event",
|
||||
G_CALLBACK (config_func), NULL);
|
||||
|
||||
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", pixbuf);
|
||||
|
||||
gtk_widget_show (drawing_area);
|
||||
|
||||
button = gtk_button_new_with_label ("Quit");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
g_signal_connect_swapped (button, "clicked",
|
||||
G_CALLBACK (gtk_widget_destroy), window);
|
||||
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_widget_show_all (vbox);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
return drawing_area;
|
||||
}
|
||||
|
||||
|
||||
static gint
|
||||
update_timeout (gpointer data)
|
||||
{
|
||||
ProgressFileStatus *status = data;
|
||||
gboolean done;
|
||||
GError *error;
|
||||
|
||||
done = FALSE;
|
||||
error = NULL;
|
||||
|
||||
if (!feof (status->imagefile)) {
|
||||
gint nbytes;
|
||||
|
||||
nbytes = fread (status->buf, 1, status->readlen,
|
||||
status->imagefile);
|
||||
|
||||
|
||||
if (!gdk_pixbuf_loader_write (GDK_PIXBUF_LOADER (status->loader), status->buf, nbytes, &error)) {
|
||||
g_warning ("Error writing to loader: %s",
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
done = TRUE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
done = TRUE;
|
||||
|
||||
if (done) {
|
||||
/* ignoring errors, we should not do that. */
|
||||
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader), NULL);
|
||||
gtk_widget_queue_draw (*status->rgbwin);
|
||||
g_object_unref (status->loader);
|
||||
fclose (status->imagefile);
|
||||
g_free (status->buf);
|
||||
}
|
||||
|
||||
return !done;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
progressive_prepared_callback (GdkPixbufLoader* loader, gpointer data)
|
||||
{
|
||||
GtkWidget** retloc = data;
|
||||
GdkPixbuf* pixbuf;
|
||||
|
||||
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
|
||||
|
||||
g_assert (pixbuf != NULL);
|
||||
|
||||
g_object_ref (pixbuf); /* for the RGB window */
|
||||
|
||||
*retloc = new_testrgb_window (pixbuf, "Progressive");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
progressive_updated_callback (GdkPixbufLoader* loader, guint x, guint y, guint width, guint height, gpointer data)
|
||||
{
|
||||
GtkWidget** window_loc = data;
|
||||
|
||||
if (*window_loc != NULL)
|
||||
gtk_widget_queue_draw_area (*window_loc,
|
||||
x, y, width, height);
|
||||
return;
|
||||
}
|
||||
|
||||
static int readlen = 4096;
|
||||
|
||||
extern void pixbuf_init (void);
|
||||
|
||||
void size_func (GdkPixbufLoader *loader, gint width, gint height, gpointer data)
|
||||
{
|
||||
gdk_pixbuf_loader_set_size (loader, width*2, height*2);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
int found_valid = FALSE;
|
||||
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkPixbufLoader *pixbuf_loader;
|
||||
|
||||
pixbuf_init ();
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* gdk_rgb_set_verbose (TRUE);*/
|
||||
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
|
||||
|
||||
{
|
||||
char *tbf_readlen = getenv ("TBF_READLEN");
|
||||
if (tbf_readlen) readlen = atoi (tbf_readlen);
|
||||
}
|
||||
|
||||
{
|
||||
char *tbf_bps = getenv ("TBF_KBPS");
|
||||
guint bps;
|
||||
|
||||
if (tbf_bps) {
|
||||
bps = atoi (tbf_bps);
|
||||
g_print ("Simulating %d kBytes/sec\n", bps);
|
||||
readlen = (bps*1024)/10;
|
||||
}
|
||||
}
|
||||
|
||||
i = 1;
|
||||
if (argc == 1) {
|
||||
const gchar*** xpmp;
|
||||
GError *error = NULL;
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_data (default_image, GDK_COLORSPACE_RGB, FALSE, 8,
|
||||
DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_WIDTH * 3,
|
||||
NULL, NULL);
|
||||
new_testrgb_window (pixbuf, NULL);
|
||||
|
||||
xpmp = xpms;
|
||||
while (*xpmp) {
|
||||
pixbuf = gdk_pixbuf_new_from_xpm_data (*xpmp);
|
||||
new_testrgb_window (pixbuf, NULL);
|
||||
++xpmp;
|
||||
}
|
||||
|
||||
/* Test loading from inline data. */
|
||||
pixbuf = gdk_pixbuf_new_from_inline (-1, apple_red, FALSE, &error);
|
||||
if (!pixbuf)
|
||||
{
|
||||
fprintf (stderr, "failed to construct \"red apple\" pixbuf: %s\n",
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
new_testrgb_window (pixbuf, "Red apple from inlined RLE data");
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_inline (sizeof (gnome_foot), gnome_foot, TRUE, NULL);
|
||||
new_testrgb_window (pixbuf, "GNOME Foot from inlined RLE data");
|
||||
|
||||
found_valid = TRUE;
|
||||
} else {
|
||||
for (i = 1; i < argc; i++) {
|
||||
GError *error;
|
||||
|
||||
error = NULL;
|
||||
pixbuf = gdk_pixbuf_new_from_file (argv[i], &error);
|
||||
|
||||
if (pixbuf == NULL) {
|
||||
g_warning ("Error loading image: %s",
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
#if 0
|
||||
pixbuf = gdk_pixbuf_rotate (pixbuf, 10.0);
|
||||
#endif
|
||||
|
||||
if (pixbuf) {
|
||||
new_testrgb_window (pixbuf, "File");
|
||||
found_valid = TRUE;
|
||||
}
|
||||
}
|
||||
#if 1
|
||||
{
|
||||
GtkWidget* rgb_window = NULL;
|
||||
ProgressFileStatus status;
|
||||
|
||||
pixbuf_loader = gdk_pixbuf_loader_new ();
|
||||
status.loader = pixbuf_loader;
|
||||
|
||||
status.rgbwin = &rgb_window;
|
||||
|
||||
status.buf = g_malloc (readlen);
|
||||
|
||||
#if 0
|
||||
g_signal_connect (pixbuf_loader, "size_prepared",
|
||||
G_CALLBACK (size_func), NULL);
|
||||
#endif
|
||||
|
||||
g_signal_connect (pixbuf_loader, "area_prepared",
|
||||
G_CALLBACK (progressive_prepared_callback),
|
||||
&rgb_window);
|
||||
g_signal_connect (pixbuf_loader, "area_updated",
|
||||
G_CALLBACK (progressive_updated_callback),
|
||||
&rgb_window);
|
||||
|
||||
status.imagefile = fopen (argv[1], "r");
|
||||
g_assert (status.imagefile != NULL);
|
||||
|
||||
status.readlen = readlen;
|
||||
|
||||
status.timeout = gdk_threads_add_timeout (100, update_timeout, &status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (found_valid)
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,635 +0,0 @@
|
||||
GTK+ Coding Style
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This document is intended to be a short description of the preferred
|
||||
coding style to be used for the GTK+ source code. It was strongly
|
||||
inspired by Clutter's CODING_STYLE.
|
||||
|
||||
Coding style is a matter of consistency, readability and maintainance;
|
||||
coding style is also completely arbitrary and a matter of taste. This
|
||||
document will use examples at the very least to provide authoritative
|
||||
and consistent answers to common questions regarding the coding style,
|
||||
and will also try to identify the allowed exceptions.
|
||||
|
||||
The examples will show the preferred coding style; the negative examples
|
||||
will be clearly identified. Please, don't submit code to GTK+ that
|
||||
looks like any of these.
|
||||
|
||||
Part of the rationales for these coding style rules are available either
|
||||
in the kernel CodingStyle document or in Cairo's CODING_STYLE one.
|
||||
|
||||
When in doubt, check the surrounding code and try to imitate it.
|
||||
|
||||
+ Line width
|
||||
|
||||
The maximum line width for source files is 80 characters, whenever possible.
|
||||
Longer lines are usually an indication that you either need a function
|
||||
or a pre-processor macro.
|
||||
|
||||
+ Indentation
|
||||
|
||||
Each new level is indented 2 or more spaces than the previous level:
|
||||
|
||||
if (condition)
|
||||
single_statement ();
|
||||
|
||||
This can only be achieved using space characters. It may not be achieved
|
||||
using tab characters alone, or using a combination of spaces and tabs.
|
||||
|
||||
Do not change the editor's configuration to change the meaning of a
|
||||
tab character (see below); code using tabs to indent will not be accepted
|
||||
into GTK+.
|
||||
|
||||
Even if two spaces for each indentation level allows deeper nesting than
|
||||
8 spaces, GTK+ favours self-documenting function names that can take
|
||||
quite some space. For this reason you should avoid deeply nested code.
|
||||
|
||||
+ Tab characters
|
||||
|
||||
The tab character must always be expanded to spaces. If a literal
|
||||
tab must be used inside the source, the tab must always be interpreted
|
||||
according to its traditional meaning:
|
||||
|
||||
Advance to the next column which is a multiple of 8.
|
||||
[ these two lines should be aligned ]
|
||||
|
||||
+ Braces
|
||||
|
||||
Curly braces should not be used for single statement blocks:
|
||||
|
||||
if (condition)
|
||||
single_statement ();
|
||||
else
|
||||
another_single_statement (arg1);
|
||||
|
||||
In case of multiple statements, curly braces should be put on another
|
||||
indentation level:
|
||||
|
||||
if (condition)
|
||||
{
|
||||
statement_1 ();
|
||||
statement_2 ();
|
||||
statement_3 ();
|
||||
}
|
||||
|
||||
The "no block for single statements" rule has only four exceptions:
|
||||
|
||||
① if the single statement covers multiple lines, e.g. for functions with
|
||||
many arguments, and it is followed by else or else if:
|
||||
|
||||
/* valid */
|
||||
if (condition)
|
||||
{
|
||||
a_single_statement_with_many_arguments (some_lengthy_argument,
|
||||
another_lengthy_argument,
|
||||
and_another_one,
|
||||
plus_one);
|
||||
}
|
||||
else
|
||||
another_single_statement (arg1, arg2);
|
||||
|
||||
② if the condition is composed of many lines:
|
||||
|
||||
/* valid */
|
||||
if (condition1 ||
|
||||
(condition2 && condition3) ||
|
||||
condition4 ||
|
||||
(condition5 && (condition6 || condition7)))
|
||||
{
|
||||
a_single_statement ();
|
||||
}
|
||||
|
||||
③ Nested if's, in which case the block should be placed on the
|
||||
outermost if:
|
||||
|
||||
/* valid */
|
||||
if (condition)
|
||||
{
|
||||
if (another_condition)
|
||||
single_statement ();
|
||||
else
|
||||
another_single_statement ();
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
if (condition)
|
||||
if (another_condition)
|
||||
single_statement ();
|
||||
else if (yet_another_condition)
|
||||
another_single_statement ();
|
||||
|
||||
④ If either side of an if-else statement has braces, both sides
|
||||
should, to match up indentation:
|
||||
|
||||
/* valid */
|
||||
if (condition)
|
||||
{
|
||||
foo ();
|
||||
bar ();
|
||||
}
|
||||
else
|
||||
{
|
||||
baz ();
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
if (condition)
|
||||
{
|
||||
foo ();
|
||||
bar ();
|
||||
}
|
||||
else
|
||||
baz ();
|
||||
|
||||
In general, new blocks should be placed on a new indentation level,
|
||||
like:
|
||||
|
||||
int retval = 0;
|
||||
|
||||
statement_1 ();
|
||||
statement_2 ();
|
||||
|
||||
{
|
||||
int var1 = 42;
|
||||
gboolean res = FALSE;
|
||||
|
||||
res = statement_3 (var1);
|
||||
|
||||
retval = res ? -1 : 1;
|
||||
}
|
||||
|
||||
While curly braces for function definitions should rest on a new line
|
||||
they should not add an indentation level:
|
||||
|
||||
/* valid */
|
||||
static void
|
||||
my_function (int argument)
|
||||
{
|
||||
do_my_things ();
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
static void
|
||||
my_function (int argument) {
|
||||
do_my_things ();
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
static void
|
||||
my_function (int argument)
|
||||
{
|
||||
do_my_things ();
|
||||
}
|
||||
|
||||
Curly braces must not be placed on the same line as a condition:
|
||||
|
||||
/* invalid */
|
||||
if (condition) {
|
||||
statement_1 ();
|
||||
statement_2 ();
|
||||
}
|
||||
+ Conditions
|
||||
|
||||
Do not check boolean values for equality:
|
||||
|
||||
/* invalid */
|
||||
if (condition == TRUE)
|
||||
do_foo ();
|
||||
|
||||
/* valid */
|
||||
if (another_condition)
|
||||
do_bar ();
|
||||
|
||||
Even if C handles NULL equality like a boolean, be explicit:
|
||||
|
||||
/* valid */
|
||||
if (some_pointer == NULL)
|
||||
do_blah ();
|
||||
|
||||
/* invalid */
|
||||
if (some_other_pointer)
|
||||
do_blurp ();
|
||||
|
||||
In case of conditions split over multiple lines, the logical operators should
|
||||
always go at the end of the line:
|
||||
|
||||
/* invalid */
|
||||
if (condition1
|
||||
|| condition2
|
||||
|| condition3)
|
||||
{
|
||||
do_foo ();
|
||||
}
|
||||
|
||||
/* valid */
|
||||
if (condition1 &&
|
||||
condition2 &&
|
||||
(condition3 || (condition4 && condition5)))
|
||||
{
|
||||
do_blah ();
|
||||
}
|
||||
|
||||
+ Functions
|
||||
|
||||
Functions should be declared by placing the returned value on a separate
|
||||
line from the function name:
|
||||
|
||||
void
|
||||
my_function (void)
|
||||
{
|
||||
}
|
||||
|
||||
The arguments list must be broken into a new line for each argument,
|
||||
with the argument names right aligned, taking into account pointers:
|
||||
|
||||
void
|
||||
my_function (some_type_t type,
|
||||
another_type_t *a_pointer,
|
||||
final_type_t another_type)
|
||||
{
|
||||
}
|
||||
|
||||
The alignment also holds when invoking a function without breaking the
|
||||
80 characters limit:
|
||||
|
||||
align_function_arguments (first_argument,
|
||||
second_argument,
|
||||
third_argument);
|
||||
|
||||
To respect the 80 characters limit do not break the function name from
|
||||
the arguments:
|
||||
|
||||
/* invalid */
|
||||
a_very_long_function_name_with_long_parameters
|
||||
(argument_the_first, argument_the_second);
|
||||
|
||||
/* valid */
|
||||
first_a = argument_the_first;
|
||||
second_a = argument_the_second;
|
||||
a_very_long_function_name_with_long_parameters (first_a, second_a);
|
||||
|
||||
+ Whitespace
|
||||
|
||||
Always put a space before a parenthesis but never after:
|
||||
|
||||
/* valid */
|
||||
if (condition)
|
||||
do_my_things ();
|
||||
|
||||
/* valid */
|
||||
switch (condition)
|
||||
{
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
if(condition)
|
||||
do_my_things();
|
||||
|
||||
/* invalid */
|
||||
if ( condition )
|
||||
do_my_things ( );
|
||||
|
||||
A switch() should open a block on a new indentation level, and each case
|
||||
should start on the same indentation level as the curly braces, with the
|
||||
case block on a new indentation level:
|
||||
|
||||
/* valid */
|
||||
switch (condition)
|
||||
{
|
||||
case FOO:
|
||||
do_foo ();
|
||||
break;
|
||||
|
||||
case BAR:
|
||||
do_bar ();
|
||||
break;
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
switch (condition) {
|
||||
case FOO: do_foo (); break;
|
||||
case BAR: do_bar (); break;
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
switch (condition)
|
||||
{
|
||||
case FOO: do_foo ();
|
||||
break;
|
||||
case BAR: do_bar ();
|
||||
break;
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
switch (condition)
|
||||
{
|
||||
case FOO:
|
||||
do_foo ();
|
||||
break;
|
||||
case BAR:
|
||||
do_bar ();
|
||||
break;
|
||||
}
|
||||
|
||||
It is preferable, though not mandatory, to separate the various cases with
|
||||
a newline:
|
||||
|
||||
switch (condition)
|
||||
{
|
||||
case FOO:
|
||||
do_foo ();
|
||||
break;
|
||||
|
||||
case BAR:
|
||||
do_bar ();
|
||||
break;
|
||||
|
||||
default:
|
||||
do_default ();
|
||||
}
|
||||
|
||||
The 'break' statement for the default: case is not mandatory.
|
||||
|
||||
If a case block needs to declare new variables, the same rules as the
|
||||
inner blocks (see above) apply; the break statement should be placed
|
||||
outside of the inner block:
|
||||
|
||||
switch (condition)
|
||||
{
|
||||
case FOO:
|
||||
{
|
||||
int foo;
|
||||
|
||||
foo = do_foo ();
|
||||
}
|
||||
break;
|
||||
|
||||
...
|
||||
}
|
||||
|
||||
When declaring a structure type use newlines to separate logical sections
|
||||
of the structure:
|
||||
|
||||
struct _GtkWrapBoxPrivate
|
||||
{
|
||||
GtkOrientation orientation;
|
||||
GtkWrapAllocationMode mode;
|
||||
|
||||
GtkWrapBoxSpreading horizontal_spreading;
|
||||
GtkWrapBoxSpreading vertical_spreading;
|
||||
|
||||
guint16 vertical_spacing;
|
||||
guint16 horizontal_spacing;
|
||||
|
||||
guint16 minimum_line_children;
|
||||
guint16 natural_line_children;
|
||||
|
||||
GList *children;
|
||||
};
|
||||
|
||||
|
||||
Do not eliminate whitespace and newlines just because something would
|
||||
fit on 80 characters:
|
||||
|
||||
/* invalid */
|
||||
if (condition) foo (); else bar ();
|
||||
|
||||
Do eliminate trailing whitespace on any line, preferably as a separate
|
||||
patch or commit. Never use empty lines at the beginning or at the end of
|
||||
a file.
|
||||
|
||||
Do enable the default git pre-commit hook that detect trailing
|
||||
whitespace for you and help you to avoid corrupting GTK+'s tree with
|
||||
it. Do that as follows:
|
||||
|
||||
chmod a+x .git/hooks/pre-commit
|
||||
|
||||
You might also find the git-stripspace utility helpful which acts as a
|
||||
filter to remove trailing whitespace as well as initial, final, and
|
||||
duplicate blank lines.
|
||||
|
||||
+ Headers
|
||||
|
||||
Headers are special, for GTK+, in that they don't have to obey the
|
||||
80 characters limit. The only major rule for headers is that the function
|
||||
definitions should be vertically aligned in three columns:
|
||||
|
||||
return value function_name (type argument,
|
||||
type argument,
|
||||
type argument);
|
||||
|
||||
The maximum width of each column is given by the longest element in the
|
||||
column:
|
||||
|
||||
void gtk_type_set_property (GtkType *type,
|
||||
const gchar *value,
|
||||
GError **error);
|
||||
G_CONST_RETURN gchar *gtk_type_get_property (GtkType *type);
|
||||
|
||||
It is also possible to align the columns to the next tab:
|
||||
|
||||
void gtk_type_set_prop (GtkType *type,
|
||||
gfloat value);
|
||||
gfloat gtk_type_get_prop (GtkType *type);
|
||||
gint gtk_type_update_foobar (GtkType *type);
|
||||
|
||||
Public headers should never be included directly:
|
||||
|
||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
All headers should have inclusion guards (for internal usage)
|
||||
and C++ guards:
|
||||
|
||||
#ifndef __GTK_FOO_H__
|
||||
#define __GTK_FOO_H__
|
||||
|
||||
#include <gtk/gtk-bar.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
...
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_FOO_H__ */
|
||||
|
||||
+ Includes
|
||||
|
||||
GTK+ source files should never include the global gtk.h header, but
|
||||
instead include the individual headers that are needed. Every file must
|
||||
include config.h first, then its own header, then other GTK+ headers
|
||||
that it needs, then system and third-party headers that it needs.
|
||||
|
||||
/* valid */
|
||||
#include "config.h"
|
||||
|
||||
#include "gtkfoo.h"
|
||||
|
||||
#include "gtkwidget.h"
|
||||
#include "gtkbutton.h"
|
||||
|
||||
...
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
+ GObject
|
||||
|
||||
GObject classes definition and implementation require some additional
|
||||
coding style notices.
|
||||
|
||||
Typedef declarations should be placed at the beginning of the file:
|
||||
|
||||
typedef struct _GtkFoo GtkFoo;
|
||||
typedef struct _GtkFooClass GtkFooClass;
|
||||
typedef struct _GtkFooPrivate GtkFooPrivate;
|
||||
|
||||
This includes enumeration types:
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT,
|
||||
GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH
|
||||
} GtkSizeRequestMode;
|
||||
|
||||
And callback types:
|
||||
|
||||
typedef void (* GtkCallback) (GtkWidget *widget,
|
||||
gpointer user_data);
|
||||
|
||||
Instance structures should only contain the parent type and a pointer to a
|
||||
private data structure, and they should be annotated as "private":
|
||||
|
||||
struct _GtkFoo
|
||||
{
|
||||
/*< private >*/
|
||||
GtkWidget parent_instance;
|
||||
|
||||
GtkFooPrivate *priv;
|
||||
};
|
||||
|
||||
All the properties should be stored inside the private data structure, which
|
||||
is defined inside the source file - or, if needed, inside a private header
|
||||
file; the private header filename must end with "private.h" and must not be
|
||||
installed.
|
||||
|
||||
The private data structure should only be accessed internally using the
|
||||
pointer inside the instance structure, and never using the
|
||||
G_TYPE_INSTANCE_GET_PRIVATE() macro or the g_type_instance_get_private()
|
||||
function.
|
||||
|
||||
Always use the G_DEFINE_TYPE(), G_DEFINE_TYPE_WITH_CODE() macros, or
|
||||
their abstract variants G_DEFINE_ABSTRACT_TYPE() and
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_CODE(), and the similar macros for defining
|
||||
interfaces.
|
||||
|
||||
Interface types should always have the dummy typedef for cast purposes:
|
||||
|
||||
typedef struct _GtkFoo GtkFoo;
|
||||
|
||||
The interface structure should have "Interface" postfixed to the dummy typedef:
|
||||
|
||||
typedef struct _GtkFooInterface GtkFooInterface;
|
||||
|
||||
Interfaces must have the following macros:
|
||||
|
||||
- Macro: - Expands to:
|
||||
• GTK_TYPE_<iface_name> <iface_name>_get_type
|
||||
• GTK_<iface_name> G_TYPE_CHECK_INSTANCE_CAST
|
||||
• GTK_IS_<iface_name> G_TYPE_CHECK_INSTANCE_TYPE
|
||||
• GTK_<iface_name>_GET_IFACE G_TYPE_INSTANCE_GET_INTERFACE
|
||||
|
||||
+ Memory allocation
|
||||
|
||||
When dynamically allocating data on the heap either use g_new() or,
|
||||
if allocating multiple small data structures, g_slice_new().
|
||||
|
||||
Public structure types should always be returned after being zero-ed,
|
||||
either explicitly for each member, or by using g_new0() or g_slice_new0().
|
||||
|
||||
+ Macros
|
||||
|
||||
Try to avoid private macros unless strictly necessary. Remember to #undef
|
||||
them at the end of a block or a series of functions needing them.
|
||||
|
||||
Inline functions are usually preferable to private macros.
|
||||
|
||||
Public macros should not be used unless they evaluate to a constant.
|
||||
|
||||
+ Public API
|
||||
|
||||
Avoid exporting variables as public API, since this is cumbersome on some
|
||||
platforms. It is always preferable to add getters and setters instead.
|
||||
|
||||
All public functions must be listed in the gtk.symbols file.
|
||||
|
||||
+ Private API
|
||||
|
||||
Non-exported functions that are needed in more than one source file
|
||||
should be named "_gtk_...", and declared in a private header file.
|
||||
|
||||
Underscore-prefixed functions are never exported.
|
||||
|
||||
Non-exported functions that are only needed in one source file
|
||||
should be declared static.
|
||||
|
||||
+ Documentation
|
||||
|
||||
All public APIs must have gtk-doc comments. For functions, these should
|
||||
be placed in the source file, directly above the function.
|
||||
|
||||
/* valid */
|
||||
/**
|
||||
* gtk_get_flow:
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Gets the flow of a widget.
|
||||
*
|
||||
* Note that flows may be laminar or turbulent...
|
||||
*
|
||||
* Returns: (transfer none): the flow of @widget
|
||||
*/
|
||||
GtkFlow *
|
||||
gtk_get_flow (GtkWidget *widget)
|
||||
{
|
||||
|
||||
...
|
||||
|
||||
}
|
||||
|
||||
Doc comments for macros, function types, class structs, etc should be
|
||||
placed next to the definitions, typically in headers.
|
||||
|
||||
Section introductions should be placed in the source file they describe,
|
||||
after the license header:
|
||||
|
||||
/* valid */
|
||||
/**
|
||||
* SECTION:gtksizerequest
|
||||
* @Short_Description: Height-for-width geometry management
|
||||
* @Title: GtkSizeRequest
|
||||
*
|
||||
* The GtkSizeRequest interface is GTK+'s height-for-width (and
|
||||
* width-for-height) geometry management system.
|
||||
* ...
|
||||
*/
|
||||
|
||||
To properly document a new function, macro, function type or struct,
|
||||
it needs to be listed in the gtk3-sections.txt file.
|
||||
|
||||
To properly document a new class, it needs to be given its own section
|
||||
in gtk3-sections.txt, needs to be included in gtk-docs.sgml, and the
|
||||
get_type function needs to listed in gtk3.types.
|
||||
|
||||
+ Old code
|
||||
|
||||
New code that is being added to GTK+ should adhere to the style
|
||||
explained above. Existing GTK+ code does largely follow these
|
||||
conventions, but there are some differences, e.g. occurrences
|
||||
of tabs, etc.
|
||||
|
||||
It is ok to update the style of a code block or function when you
|
||||
are touching it anyway, but sweeping whitespace changes obscure the
|
||||
git history and should be avoided.
|
||||
@@ -1,25 +1,23 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = reference tools
|
||||
SUBDIRS = tutorial faq reference tools
|
||||
|
||||
EXTRA_DIST += \
|
||||
CODING-STYLE \
|
||||
defsformat.txt \
|
||||
developers.txt \
|
||||
dnd_internals.txt \
|
||||
focus_tracking.txt \
|
||||
generation.txt \
|
||||
gtkdocs_fix \
|
||||
make-todo \
|
||||
refcounting.txt \
|
||||
RELEASE-HOWTO \
|
||||
sizing-test.txt \
|
||||
styles.txt \
|
||||
text_widget_internals.txt \
|
||||
text_widget.txt \
|
||||
tree-column-sizing.png \
|
||||
text_widget_internals.txt \
|
||||
tree-column-sizing.txt \
|
||||
widget_geometry.txt \
|
||||
widget_system.txt
|
||||
widget_system.txt \
|
||||
generation.txt \
|
||||
gtkdocs_fix \
|
||||
RELEASE-HOWTO
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -26,21 +26,16 @@ Make sure that gtk-doc is the latest released version.
|
||||
committers, etc. Anybody who is mentioned in ChangeLog gets
|
||||
credits, but only real names, not email addresses or nicknames.
|
||||
|
||||
3) Update the pot files and commit the changes:
|
||||
|
||||
make -C po gtk30.pot
|
||||
make -C po-properties gtk30-properties.pot
|
||||
|
||||
4) In particular, if this is a major, stable, release, verify that
|
||||
3) In particular, if this is a major, stable, release, verify that
|
||||
README.in contains the relevant release notes and that the
|
||||
required versions of dependencies in INSTALL.in are in sync
|
||||
with configure.ac.
|
||||
with configure.in.
|
||||
|
||||
5) Verify that the version in configure.ac has been bumped after the last
|
||||
4) Verify that the version in configure.in has been bumped after the last
|
||||
release. (Note that this is critical, a slip-up here will cause the
|
||||
soname to change).
|
||||
|
||||
6) Make sure that make check is happy (If you don't do it here, make distcheck
|
||||
5) Make sure that make check is happy (If you don't do it here, make distcheck
|
||||
will also catch it, but it is kind of disheartening to see make distcheck
|
||||
fail due to an extraneous symbol after watching it build the docs for an
|
||||
hour...).
|
||||
@@ -54,7 +49,7 @@ Make sure that gtk-doc is the latest released version.
|
||||
using a function from a different library, which is not yet allowed
|
||||
by the filter in pltcheck.sh
|
||||
|
||||
7) If this is a devel release, make sure that the docs for new symbols
|
||||
6) If this is a devel release, make sure that the docs for new symbols
|
||||
are in good shape. Look at the -unused.txt files and add stuff found
|
||||
there to the corresponding -sections.txt file. Look at the
|
||||
-undocumented.txt files and see if there is anything in there that
|
||||
@@ -63,12 +58,12 @@ Make sure that gtk-doc is the latest released version.
|
||||
Since: tags, and that there is an index in the main -docs.sgml for
|
||||
the next stable version.
|
||||
|
||||
8) make distcheck
|
||||
7) make distcheck
|
||||
|
||||
9) Fix broken stuff found by 8), commit changes: git commit -a, repeat.
|
||||
8) Fix broken stuff found by 7), repeat
|
||||
|
||||
10) Once distcheck succeeds, verify that the tree is clean: git diff should
|
||||
come up empty.
|
||||
9) Commit all changes: git commit -a. You will have a bunch of po file
|
||||
changes, NEWS and maybe some doc changes too
|
||||
|
||||
10) Now you've got the tarball. Check that the tarball size looks
|
||||
reasonable compared to previous releases. If the size goes down
|
||||
@@ -83,7 +78,7 @@ Make sure that gtk-doc is the latest released version.
|
||||
|
||||
git push origin refs/tags/2.12.10
|
||||
|
||||
13) Bump the version number in configure.ac and commit and push this change
|
||||
13) Bump the version number in configure.in and commit and push this change
|
||||
|
||||
14) Upload the tarball to master.gnome.org and run install-module to transfer
|
||||
it to download.gnome.org. If you don't have an account on master.gnome.org,
|
||||
|
||||
338
docs/defsformat.txt
Normal file
338
docs/defsformat.txt
Normal file
@@ -0,0 +1,338 @@
|
||||
|
||||
The overall syntax is:
|
||||
|
||||
(type-of-thing-being-defined name-used-to-refer-to-this-thing
|
||||
(attribute-name attribute-value-depending-on-the-attribute)
|
||||
(attribute-name attribute-value-depending-on-the-attribute)
|
||||
(attribute-name attribute-value-depending-on-the-attribute))
|
||||
|
||||
Some definitions can have a c-declaration field that gives the C code
|
||||
we parsed to arrive at the definition. The c-declaration is a quoted
|
||||
string because it can contain parentheses and such.
|
||||
|
||||
Defined types and their attributes:
|
||||
|
||||
===
|
||||
(module module-name
|
||||
(submodule-of module-name)) ;; submodule is optional
|
||||
|
||||
Ex: (module Gtk)
|
||||
Ex: (module Rgb
|
||||
(submodule-of Gdk))
|
||||
|
||||
modules are later referred to with a list of module names, like
|
||||
(Gdk Rgb) or (Gtk)
|
||||
|
||||
Object and boxed type definitions automatically create a submodule.
|
||||
For example, GtkCList creates the module (module CList (submodule-of
|
||||
(Gtk))) which is referred to as module (Gtk CList).
|
||||
|
||||
===
|
||||
|
||||
(type
|
||||
(alias some-unique-identifier)
|
||||
(in-module module-name) ;; optional, gchar* is not in a module
|
||||
(gtk-type-id gtk-type-system-id) ;; optional, absent if this is not
|
||||
;; in the type system
|
||||
(is-parametric boolean) ;; optional default to #f
|
||||
(in-c-name name-of-symbol-in-C)
|
||||
(out-c-name name-of-symbol-in-C)
|
||||
(inout-c-name name-of-symbol-in-C))
|
||||
|
||||
Ex: (type
|
||||
(alias string)
|
||||
(gtk-type-id GTK_TYPE_STRING)
|
||||
(in-c-name "const gchar*")
|
||||
(out-c-name "gchar**") ;; actually I'm not sure how strings work out/inout
|
||||
(inout-c-name "gchar*"))
|
||||
|
||||
(type
|
||||
(alias list)
|
||||
(gtk-type-id GTK_TYPE_POINTER)
|
||||
(is-parametric #t)
|
||||
(in-c-name "GList*")
|
||||
(out-c-name "GList**")
|
||||
(inout-c-name "GList**"))
|
||||
|
||||
|
||||
;; This one would be implied by the (object) def for GtkWidget I
|
||||
;; think - (type) is only required for types that are not implied
|
||||
;; by other definitions, such as int/boolean/etc.
|
||||
|
||||
(type
|
||||
(alias GtkWidget)
|
||||
(in-module (Gtk))
|
||||
(gtk-type-id GTK_TYPE_WIDGET)
|
||||
(in-c-name "GtkWidget*")
|
||||
(inout-c-name "GtkWidget*")
|
||||
(out-c-name "GtkWidget**"))
|
||||
|
||||
"Type" bindings are automatically assumed for objects, boxed types,
|
||||
etc. as defined below.
|
||||
|
||||
The alias field is used to refer to the type later on.
|
||||
|
||||
Whenever a type alias can be used, it is also possible to use the
|
||||
keyword "native", which implies that the type in question is too
|
||||
C-specific to represent. Then a c-declaration will typically be
|
||||
available for use.
|
||||
|
||||
C types containing [] or () are function pointers or arrays. For
|
||||
arrays that don't specify a size, we just treat them as pointers. For
|
||||
function pointers, we need special (type) syntax/attributes of some
|
||||
kind, but since there basically aren't any of these right now in the
|
||||
libs we care about we can just ignore them. For arrays that specify a
|
||||
size ditto, you would handle them by adding an (array-size) attribute
|
||||
or something or using the "native" keyword and skipping the (type)
|
||||
stuff.
|
||||
|
||||
===
|
||||
(object object-name
|
||||
(in-module module-name-list)
|
||||
(parent object-name optional-module-name-if-different)
|
||||
(abstract boolean-is-abstract-class) ;; omit for default of #f
|
||||
(c-name name-of-the-object-in-C)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field)
|
||||
(access read-or-write-or-readwrite)))
|
||||
|
||||
|
||||
Ex: (object Widget
|
||||
(in-module (Gtk))
|
||||
(parent Object) ;; could say (parent Object (Gtk))
|
||||
(abstract #t)
|
||||
(c-name GtkWidget)
|
||||
(field (type-and-name GdkWindow* window) (access read)))
|
||||
|
||||
An "object" declaration automatically implies the type definition:
|
||||
|
||||
(type
|
||||
(alias concat-module-elements-and-object-name)
|
||||
(in-c-name pointer-to-c-name)
|
||||
(out-c-name pointer-to-pointer-to-c-name)
|
||||
(inout-c-name pointer-to-c-name))
|
||||
|
||||
Ex:
|
||||
(type (alias GtkWidget)
|
||||
(in-c-name GtkWidget*)
|
||||
(out-c-name GtkWidget**)
|
||||
(inout-c-name GtkWidget*))
|
||||
|
||||
It also implies a module that is the name broken into parts:
|
||||
(module CTree
|
||||
(submodule-of Gtk))
|
||||
|
||||
===
|
||||
|
||||
(function function-name
|
||||
(in-module module-name-list) ;; "static methods" go in their
|
||||
;; object's module
|
||||
(is-constructor-of object-type-alias) ;; optional, marks a constructor
|
||||
(c-name function-name)
|
||||
(return-type return-value-type) ;; defaults to void
|
||||
(caller-owns-return boolean-value) ;; defaults to #f
|
||||
(can-return-null boolean-value) ;; defaults to #t
|
||||
(parameter in-or-out-or-inout
|
||||
(type-and-name parameter-type-alias parameter-name)
|
||||
(type-parameter name-of-contained-type) ;; optional, requires parametric type
|
||||
(c-declaration "c-type-and-name")) ;; c-declaration only required
|
||||
;; if the type alias is "native"
|
||||
(varargs #t) ;; has varargs at the end
|
||||
)
|
||||
|
||||
Ex:
|
||||
(function init
|
||||
(in-module (Gdk Rgb)
|
||||
(c-name gdk_rgb_init)))
|
||||
|
||||
Ex:
|
||||
(function new
|
||||
(in-module (Gdk Rgb Cmap))
|
||||
(is-constructor-of GdkRgbCmap)
|
||||
(c-name gdk_rgb_cmap_new)
|
||||
(return-type GdkRgbCmap)
|
||||
(caller-owns-return #t) ;; perhaps this could be implied by is-constructor-of
|
||||
(parameter in (type-and-name array-of-guint32 colors))
|
||||
(parameter in (type-and-name gint n_colors)))
|
||||
|
||||
Ex:
|
||||
(function config_set_set_handler
|
||||
(in-module (Gnome))
|
||||
(c-name gnome_config_set_set_handler)
|
||||
(parameter in (type-and-name native func)
|
||||
(c-declaration "void (*func)(void*)"))
|
||||
(parameter in (type-and-name gpointer data)))
|
||||
|
||||
===
|
||||
(method method-name
|
||||
(of-object object-name module-name)
|
||||
;; retval/arg attributes as for (function), but with first parameter
|
||||
;; omitted for non-constructors
|
||||
)
|
||||
|
||||
Ex:
|
||||
(method set_text
|
||||
(of-object Label (Gtk))
|
||||
(parameter (type-and-name const-gchar* str)))
|
||||
|
||||
===
|
||||
(object-argument arg-name
|
||||
(of-object object-we-are-an-argument-of optional-objects-module)
|
||||
(type-id argument-type) ;; GTK_TYPE_OBJECT etc.
|
||||
;; flags all default to #f
|
||||
(readable bool-value)
|
||||
(writeable bool-value)
|
||||
(construct-only bool-value))
|
||||
|
||||
Ex:
|
||||
(object-argument label
|
||||
(of-object Label (Gtk))
|
||||
(type GTK_TYPE_STRING)
|
||||
(readable #t)
|
||||
(writeable #t))
|
||||
|
||||
===
|
||||
(signal signal-name
|
||||
(run-action bool-value)
|
||||
(run-first bool-value)
|
||||
(run-last bool-value)
|
||||
(of-object object-we-are-a-signal-of optional-objects-module)
|
||||
;; return value and parameters as for a function, omitting the object
|
||||
;; and user data parameters
|
||||
|
||||
;; what other properties matter for a signal?
|
||||
)
|
||||
|
||||
Ex:
|
||||
(signal select_row
|
||||
(of-object CList (Gtk))
|
||||
(run-first #t)
|
||||
;; return type defaults to void
|
||||
(parameter in (type-and-name gint row))
|
||||
(parameter in (type-and-name gint column))
|
||||
(parameter in (type-and-name GdkEvent* event)))
|
||||
|
||||
===
|
||||
(enum enum-name
|
||||
(in-module modname)
|
||||
(c-name name-in-c)
|
||||
(value (nick value-name-noprefixes-hyphen-lowercase) (c-name value-c-name)))
|
||||
|
||||
Ex:
|
||||
|
||||
(enum DirectionType
|
||||
(in-module Gtk)
|
||||
(c-name GtkDirectionType)
|
||||
(value (nick tab-forward) (c-name GTK_DIR_TAB_FORWARD))
|
||||
(value (nick tab-backward) (c-name GTK_DIR_TAB_BACKWARD))
|
||||
(value (nick up) (c-name GTK_DIR_UP))
|
||||
(value (nick down) (c-name GTK_DIR_DOWN))
|
||||
(value (nick left) (c-name GTK_DIR_LEFT))
|
||||
(value (nick right) (c-name GTK_DIR_RIGHT)))
|
||||
|
||||
(enum Pos
|
||||
(in-module (Gtk CTree))
|
||||
(c-name GtkCTreePos)
|
||||
(value (nick before) (c-name GTK_CTREE_POS_BEFORE))
|
||||
(value (nick as-child) (c-name GTK_CTREE_POS_AS_CHILD))
|
||||
(value (nick after) (c-name GTK_CTREE_POS_AFTER)))
|
||||
|
||||
===
|
||||
(flags) is just like enum, but some bindings may wrap enums and flags differently.
|
||||
|
||||
===
|
||||
|
||||
(boxed boxed-name
|
||||
(in-module modname)
|
||||
(c-name c-name)
|
||||
(ref-func func-to-increase-refcount)
|
||||
(copy-func func-to-copy)
|
||||
(release-func func-to-destroy-or-decrement-refcount)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
|
||||
|
||||
It is never OK to use memcpy() to copy a boxed type, or use
|
||||
malloc()/free() to alloc/free one.
|
||||
|
||||
Ex:
|
||||
|
||||
(boxed Pixmap
|
||||
(in-module (Gdk))
|
||||
(c-name GdkPixmap)
|
||||
(ref-func pixmap_ref)
|
||||
(release-func pixmap_unref))
|
||||
|
||||
An "object" declaration automatically implies the type definition:
|
||||
|
||||
(type
|
||||
(alias concat-module-elements-and-boxed-name)
|
||||
(in-c-name pointer-to-c-name)
|
||||
(out-c-name pointer-to-pointer-to-c-name)
|
||||
(inout-c-name pointer-to-c-name))
|
||||
|
||||
Ex:
|
||||
(type (alias GdkPixmap)
|
||||
(in-c-name GdkPixmap*)
|
||||
(out-c-name GdkPixmap**)
|
||||
(inout-c-name GdkPixmap*))
|
||||
|
||||
|
||||
===
|
||||
|
||||
(struct struct-name
|
||||
(in-module modname)
|
||||
(c-name c-name)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
|
||||
|
||||
Unlike a boxed type, a struct type can be copied with memcpy() and
|
||||
allocated on the stack or with g_malloc().
|
||||
|
||||
Ex:
|
||||
(struct Rectangle
|
||||
(in-module (Gdk))
|
||||
(c-name GdkRectangle)
|
||||
(field (type-and-name gint16 x) (access readwrite))
|
||||
(field (type-and-name gint16 y) (access readwrite))
|
||||
(field (type-and-name guint16 width) (access readwrite))
|
||||
(field (type-and-name guint16 height) (access readwrite)))
|
||||
|
||||
Implies GdkRectangle type alias:
|
||||
|
||||
(type (alias GdkRectangle)
|
||||
(in-c-name GdkRectangle*)
|
||||
(out-c-name GdkRectangle*) ;; note - not the same as boxed types
|
||||
(inout-c-name GdkRectangle*))
|
||||
|
||||
===
|
||||
|
||||
(user-function name
|
||||
(in-module module)
|
||||
(c-name c-typedef-name)
|
||||
;; return-type and parameters as for (function)
|
||||
)
|
||||
|
||||
Ex:
|
||||
|
||||
(user-function PrintFunc
|
||||
(in-module (Gtk))
|
||||
(parameter in (type-and-name gpointer func_data))
|
||||
(parameter in (type-and-name gchar* str)))
|
||||
|
||||
===
|
||||
|
||||
(typedef new-name
|
||||
(in-module module)
|
||||
(c-name c-full-name)
|
||||
(orig-type alias-of-orig-type))
|
||||
|
||||
Ex:
|
||||
|
||||
(typedef Type
|
||||
(in-module (Gtk))
|
||||
(c-name GtkType)
|
||||
(orig-type guint))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
44
docs/faq/Makefile.am
Normal file
44
docs/faq/Makefile.am
Normal file
@@ -0,0 +1,44 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST += \
|
||||
gtk-faq.sgml
|
||||
|
||||
if HAVE_DOCBOOK
|
||||
html:
|
||||
if test -w $(srcdir); then \
|
||||
(cd $(srcdir); \
|
||||
db2html gtk-faq.sgml; \
|
||||
test -d html && rm -r html; \
|
||||
mv gtk-faq html); \
|
||||
fi
|
||||
|
||||
pdf:
|
||||
if test -w $(srcdir); then \
|
||||
(cd $(srcdir); db2pdf gtk-faq.sgml); \
|
||||
fi
|
||||
|
||||
all-local: html
|
||||
|
||||
dist-hook: html
|
||||
cp -Rp $(srcdir)/html $(distdir)
|
||||
else
|
||||
html:
|
||||
echo "***"
|
||||
echo "*** Warning: FAQ not built"
|
||||
echo "***"
|
||||
|
||||
pdf:
|
||||
echo "***"
|
||||
echo "*** Warning: FAQ not built"
|
||||
echo "***"
|
||||
|
||||
dist-hook:
|
||||
echo "***"
|
||||
echo "*** Warning: FAQ not built"
|
||||
echo "*** DISTRIBUTION IS INCOMPLETE"
|
||||
echo "***"
|
||||
endif
|
||||
|
||||
.PHONY: html
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
3630
docs/faq/gtk-faq.sgml
Normal file
3630
docs/faq/gtk-faq.sgml
Normal file
File diff suppressed because it is too large
Load Diff
236
docs/gtk-config.txt
Normal file
236
docs/gtk-config.txt
Normal file
@@ -0,0 +1,236 @@
|
||||
CONFIGURING PACKAGES TO WORK WITH GTK
|
||||
-------------------------------------
|
||||
|
||||
Compiling a program successfully against the GTK, GDK, and GLIB
|
||||
libraries can require a large number of command line options
|
||||
to your compiler and linker that are hard to guess correctly.
|
||||
The additional libraries required may, for example, depend on the
|
||||
manner which GTK was configured
|
||||
|
||||
Several tools are included in this package to make process
|
||||
easier.
|
||||
|
||||
First, there is the shell script 'gtk-config' (installed in
|
||||
$exec_prefix/bin):
|
||||
|
||||
Invoking gtk-config
|
||||
-------------------
|
||||
|
||||
gtk-config takes the following flags:
|
||||
|
||||
--version
|
||||
Prints out the version of GTK installed
|
||||
|
||||
--cflags
|
||||
Prints '-I' flags pointing to the installed header files.
|
||||
|
||||
--libs
|
||||
Prints out the linker flags necessary to link a program against GTK
|
||||
|
||||
--prefix[=PREFIX]
|
||||
If PREFIX is specified, overrides the configured value of $prefix.
|
||||
(And of exec-prefix, unless --exec-prefix is also specified)
|
||||
Otherwise, prints out the configured value of $prefix
|
||||
|
||||
--exec-prefix[=PREFIX]
|
||||
If PREFIX is specified, overrides the configured value of $exec_prefix.
|
||||
Otherwise, prints out the configured value of $exec_prefix
|
||||
|
||||
You may also add to the command line a list of additional
|
||||
libraries that gtk-config should supply the CFLAGS and LIBS
|
||||
for. The only currently supported library is 'gthread'.
|
||||
|
||||
As an example of this latter usage, you can get the
|
||||
appropriate cflags for a threaded program with:
|
||||
|
||||
gtk-config --cflags gthread
|
||||
|
||||
|
||||
Example of using gtk-config
|
||||
---------------------------
|
||||
|
||||
Typically, gtk-config will be used within a configure script,
|
||||
as described below. It, however, can also be used directly
|
||||
from the command line to compile a simple program. For example:
|
||||
|
||||
cc -o simple `gtk-config --cflags` simple.c `gtk-config --libs`
|
||||
|
||||
This command line might expand to (for example):
|
||||
|
||||
cc -o simple -I/usr/local/lib/glib/include -I/usr/local/include \
|
||||
-I/usr/X11R6/include simple.c -L/usr/local/lib -L/usr/X11R6/lib \
|
||||
-lgtk -lgdk -lglib -lXi -lXext -lX11 -lm
|
||||
|
||||
Not only is the form using gtk-config easier to type, it will
|
||||
work on any system, no matter how GTK was configured.
|
||||
|
||||
|
||||
AM_PATH_GTK
|
||||
-----------
|
||||
|
||||
For packages configured using GNU automake, GTK also provides
|
||||
a macro to automate the process of running GTK.
|
||||
|
||||
AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
|
||||
This macro:
|
||||
|
||||
* Determines the location of GTK using gtk-config, which is either
|
||||
found in the user's path, or from the environment variable
|
||||
GTK_CONFIG
|
||||
|
||||
* Tests the installed libraries to make sure that there version
|
||||
is later than MINIMUM-VERSION. (A default version will be used
|
||||
if not specified)
|
||||
|
||||
* If the required version was found, sets the GTK_CFLAGS variable to
|
||||
the output of `gtk-config --cflags` and the GTK_LIBS variable to
|
||||
the output of `gtk-config --libs`, and calls AC_SUBST() for these
|
||||
variables so they can be used in generated makefiles, and then
|
||||
executes ACTION-IF-FOUND.
|
||||
|
||||
* If the required version was not found, sets GTK_CFLAGS and GTK_LIBS
|
||||
to empty strings, and executes ACTION-IF-NOT-FOUND.
|
||||
|
||||
This macro is in file 'gtk.m4' which is installed in $datadir/aclocal.
|
||||
Note that if automake was installed with a different --prefix than
|
||||
GTK, you will either have to manually move gtk.m4 to automake's
|
||||
$datadir/aclocal, or give aclocal the -I option when running it.
|
||||
|
||||
|
||||
Configuring a package that uses AM_PATH_GTK
|
||||
-------------------------------------------
|
||||
|
||||
Simply make sure that gtk-config is in your path, and run
|
||||
the configure script.
|
||||
|
||||
Notes:
|
||||
|
||||
* The directory where the GTK libraries are installed needs
|
||||
to be found by your system's dynamic linker.
|
||||
|
||||
This is generally done by
|
||||
|
||||
editing /etc/ld.so.conf and running ldconfig
|
||||
|
||||
Or by:
|
||||
|
||||
setting the environment variable LD_LIBRARY_PATH,
|
||||
|
||||
or, as a last resort,
|
||||
|
||||
Giving a -R or -rpath flag (depending on your linker) when
|
||||
running configure, for instance:
|
||||
|
||||
LDFLAGS=-R/usr/home/owen/lib ./configure
|
||||
|
||||
* You can also specify a gtk-config not in your path by
|
||||
setting the GTK_CONFIG environment variable to the
|
||||
name of the executable
|
||||
|
||||
* If you move the GTK package from its installed location,
|
||||
you will need either need to modify gtk-config script
|
||||
manually to point to the new location or rebuild GTK.
|
||||
|
||||
Advanced note:
|
||||
|
||||
* configure flags
|
||||
|
||||
--with-gtk-prefix=PREFIX
|
||||
--with-gtk-exec-prefix=PREFIX
|
||||
|
||||
are provided to override the prefix and exec-prefix that were stored
|
||||
in the gtk-config shell script by GTK's configure. You are generally
|
||||
better off configuring GTK with the right path to begin with.
|
||||
|
||||
Example of a package using AM_PATH_GTK
|
||||
--------------------------------------
|
||||
|
||||
The following shows how to build a simple package using automake
|
||||
and the AM_PATH_GTK macro. The program used here is the testinput.c
|
||||
|
||||
You should first read the introductory portions of the automake
|
||||
Manual, if you are not already familiar with it.
|
||||
|
||||
Two files are needed, 'configure.in', which is used to build the
|
||||
configure script:
|
||||
|
||||
==configure.in===
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(testinput.c)
|
||||
|
||||
AM_INIT_AUTOMAKE(testinput.c, 1.0.0)
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_PATH_GTK(0.99.5,
|
||||
[LIBS="$LIBS $GTK_LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"],
|
||||
AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
=================
|
||||
|
||||
The only command in this which is not standard for automake
|
||||
is the AM_PATH_GTK() macro.
|
||||
|
||||
That command does the following:
|
||||
|
||||
If a GTK version greater than 0.99.5 is found, adds $GTK_LIBS to
|
||||
$LIBS and $GTK_CFLAGS to $CFLAGS. Otherwise, dies with the error
|
||||
message "Cannot find GTK: Is gtk-config in path?"
|
||||
|
||||
And the 'Makefile.am', which will be used to build the Makefile.
|
||||
|
||||
== Makefile.am ==
|
||||
bin_PROGRAMS = testinput
|
||||
testinput_SOURCES = testinput.c
|
||||
=================
|
||||
|
||||
This Makefile.am, says that we are building a single executable,
|
||||
from a single sourcefile 'testinput.c'. Since every program
|
||||
we are building uses GTK we simply added the GTK options
|
||||
to $LIBS and $CFLAGS, but in other circumstances, we might
|
||||
want to specify them on a per-program basis: for instance by
|
||||
adding the lines:
|
||||
|
||||
testinput_LDADD = $(GTK_LIBS)
|
||||
INCLUDES = $(GTK_CFLAGS)
|
||||
|
||||
to the Makefile.am.
|
||||
|
||||
To try this example out, create a new directory, add the two
|
||||
files above two it, and copy the testinput.c file from
|
||||
the gtk/ subdirectory to the new directory. Edit the line:
|
||||
|
||||
#include "gtk.h"
|
||||
|
||||
in testgtk.c, to read:
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
Now execute the following commands:
|
||||
|
||||
automake --add-missing
|
||||
aclocal
|
||||
autoconf
|
||||
|
||||
You now have a package that can be built in the normal fashion
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
Notes:
|
||||
|
||||
* If you are converting a package that used a pre-1.0 version of
|
||||
GTK, you should remove the autoconf tests for X. The results
|
||||
of these tests are included in gtk-config and will be added
|
||||
to GTK_LIBS and GTK_CFLAGS by the AM_PATH_GTK macro.
|
||||
|
||||
Owen Taylor
|
||||
14 Mar 1997
|
||||
@@ -197,7 +197,7 @@ GtkOptionMenu looks like this:
|
||||
/* menu_item->ref_count == 1 and it is flagged as `floating'.
|
||||
*/
|
||||
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_menu_append (GTK_MENU (menu), menu_item);
|
||||
/* menu_item->ref_count still == 1, but it is no longer `floating'.
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ include $(top_srcdir)/Makefile.decl
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gdk3
|
||||
DOC_MODULE=gdk
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gdk-docs.sgml
|
||||
@@ -21,14 +21,17 @@ CFILE_GLOB=$(top_srcdir)/gdk/*.c
|
||||
|
||||
# Header files to ignore when scanning
|
||||
IGNORE_HFILES= \
|
||||
gdkalias.h \
|
||||
gdkintl.h \
|
||||
gdkmarshalers.h \
|
||||
gdkkeysyms.h \
|
||||
gdkinternals.h \
|
||||
gdkprivate.h \
|
||||
gdkpoly-generic.h \
|
||||
gdkregion-generic.h \
|
||||
keyname-table.h \
|
||||
win32 \
|
||||
directfb \
|
||||
x11 \
|
||||
quartz
|
||||
|
||||
|
||||
@@ -6,40 +6,64 @@
|
||||
]>
|
||||
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<bookinfo>
|
||||
<title>GDK Reference Manual</title>
|
||||
<title>GDK 2 Reference Manual</title>
|
||||
<releaseinfo>
|
||||
for GDK &version;
|
||||
The latest version of this documentation can be found on-line at
|
||||
<ulink role="online-location" url="http://library.gnome.org/devel/gdk/unstable/">http://library.gnome.org/devel/gdk/unstable/</ulink>.
|
||||
This document is for GDK 2 library; the latest versions can be found online at
|
||||
<ulink role="online-location"
|
||||
url="http://library.gnome.org/devel/gdk/">http://library.gnome.org/devel/gdk/</ulink>.
|
||||
If you're looking for the newer GDK 3 series of libraries,
|
||||
see <ulink role="online-location"
|
||||
url="http://library.gnome.org/devel/gdk3/">http://library.gnome.org/devel/gdk3/</ulink>.
|
||||
</releaseinfo>
|
||||
</bookinfo>
|
||||
|
||||
<reference id="reference">
|
||||
<title>API Reference</title>
|
||||
<xi:include href="xml/general.xml" />
|
||||
|
||||
<xi:include href="multihead.sgml" />
|
||||
<xi:include href="xml/gdkdisplay.xml" />
|
||||
<xi:include href="xml/gdkdisplaymanager.xml" />
|
||||
<xi:include href="xml/gdkscreen.xml" />
|
||||
|
||||
<xi:include href="xml/regions.xml" />
|
||||
<xi:include href="xml/gcs.xml" />
|
||||
<xi:include href="xml/drawing.xml" />
|
||||
|
||||
<xi:include href="xml/pixmaps.xml" />
|
||||
<xi:include href="xml/rgb.xml" />
|
||||
<xi:include href="xml/images.xml" />
|
||||
<xi:include href="xml/pixbufs.xml" />
|
||||
|
||||
<xi:include href="xml/colors.xml" />
|
||||
<xi:include href="xml/rgba_colors.xml" />
|
||||
<xi:include href="xml/visuals.xml" />
|
||||
|
||||
<xi:include href="xml/fonts.xml" />
|
||||
<xi:include href="xml/cursors.xml" />
|
||||
|
||||
<xi:include href="xml/windows.xml" />
|
||||
|
||||
<xi:include href="xml/events.xml" />
|
||||
<xi:include href="xml/event_structs.xml" />
|
||||
|
||||
<xi:include href="xml/keys.xml" />
|
||||
|
||||
<xi:include href="xml/selections.xml" />
|
||||
<xi:include href="xml/dnd.xml" />
|
||||
|
||||
<xi:include href="xml/properties.xml" />
|
||||
|
||||
<xi:include href="xml/threads.xml" />
|
||||
<xi:include href="xml/gdkdevicemanager.xml" />
|
||||
|
||||
<xi:include href="xml/input.xml" />
|
||||
<xi:include href="xml/input_devices.xml" />
|
||||
|
||||
<xi:include href="xml/pango_interaction.xml" />
|
||||
<xi:include href="xml/cairo_interaction.xml" />
|
||||
<xi:include href="xml/x_interaction.xml" />
|
||||
|
||||
<xi:include href="xml/gdkapplaunchcontext.xml" />
|
||||
|
||||
<xi:include href="xml/gdktesting.xml" />
|
||||
</reference>
|
||||
|
||||
@@ -51,9 +75,49 @@
|
||||
<title>Index of deprecated symbols</title>
|
||||
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-3-0" role="3.0">
|
||||
<title>Index of new symbols in 3.0</title>
|
||||
<xi:include href="xml/api-index-3.0.xml"><xi:fallback /></xi:include>
|
||||
<index id="api-index-2-2" role="2.2">
|
||||
<title>Index of new symbols in 2.2</title>
|
||||
<xi:include href="xml/api-index-2.2.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-4" role="2.4">
|
||||
<title>Index of new symbols in 2.4</title>
|
||||
<xi:include href="xml/api-index-2.4.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-6" role="2.6">
|
||||
<title>Index of new symbols in 2.6</title>
|
||||
<xi:include href="xml/api-index-2.6.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-8" role="2.8">
|
||||
<title>Index of new symbols in 2.8</title>
|
||||
<xi:include href="xml/api-index-2.8.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-10" role="2.10">
|
||||
<title>Index of new symbols in 2.10</title>
|
||||
<xi:include href="xml/api-index-2.10.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-12" role="2.12">
|
||||
<title>Index of new symbols in 2.12</title>
|
||||
<xi:include href="xml/api-index-2.12.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-14" role="2.14">
|
||||
<title>Index of new symbols in 2.14</title>
|
||||
<xi:include href="xml/api-index-2.14.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-16" role="2.16">
|
||||
<title>Index of new symbols in 2.16</title>
|
||||
<xi:include href="xml/api-index-2.16.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-18" role="2.18">
|
||||
<title>Index of new symbols in 2.18</title>
|
||||
<xi:include href="xml/api-index-2.18.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-20" role="2.20">
|
||||
<title>Index of new symbols in 2.20</title>
|
||||
<xi:include href="xml/api-index-2.20.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-22" role="2.22">
|
||||
<title>Index of new symbols in 2.22</title>
|
||||
<xi:include href="xml/api-index-2.22.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@ gdk_display_manager_get_type
|
||||
gdk_screen_get_type
|
||||
gdk_drawable_get_type
|
||||
gdk_window_object_get_type
|
||||
gdk_pango_renderer_get_type
|
||||
gdk_pixmap_get_type
|
||||
gdk_gc_get_type
|
||||
gdk_keymap_get_type
|
||||
gdk_device_get_type
|
||||
gdk_device_manager_get_type
|
||||
@@ -106,12 +106,12 @@ gtk_window_set_screen (window, second_screen);<!--
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="GdkDisplay">GdkDisplay</link></term>
|
||||
<term><link linkend="gdk-GdkDisplay">GdkDisplay</link></term>
|
||||
<listitem><para>the GDK Object used to represent and manipulate display
|
||||
related data</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><link linkend="GdkScreen">GdkScreen</link></term>
|
||||
<term><link linkend="gdk-GdkScreen">GdkScreen</link></term>
|
||||
<listitem><para>the GDK Object used to represent and query screen related
|
||||
data</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
23
docs/reference/gdk/tmpl/.gitignore
vendored
23
docs/reference/gdk/tmpl/.gitignore
vendored
@@ -1,23 +0,0 @@
|
||||
cairo_interaction.sgml
|
||||
colors.sgml
|
||||
cursors.sgml
|
||||
dnd.sgml
|
||||
drawing.sgml
|
||||
events.sgml
|
||||
event_structs.sgml
|
||||
gdkapplaunchcontext.sgml
|
||||
gdkdisplay.sgml
|
||||
gdkdisplaymanager.sgml
|
||||
gdkscreen.sgml
|
||||
gdktesting.sgml
|
||||
general.sgml
|
||||
keys.sgml
|
||||
pango_interaction.sgml
|
||||
properties.sgml
|
||||
pixbufs.sgml
|
||||
regions.sgml
|
||||
selections.sgml
|
||||
threads.sgml
|
||||
visuals.sgml
|
||||
windows.sgml
|
||||
x_interaction.sgml
|
||||
99
docs/reference/gdk/tmpl/cairo_interaction.sgml
Normal file
99
docs/reference/gdk/tmpl/cairo_interaction.sgml
Normal file
@@ -0,0 +1,99 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Cairo Interaction
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions to support using Cairo
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
<link href="http://cairographics.org">Cairo</link> is a graphics
|
||||
library that supports vector graphics and image compositing that
|
||||
can be used with GDK. Since 2.8, GTK+ does most of its drawing
|
||||
using Cairo.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK does not wrap the Cairo API, instead it allows to create Cairo
|
||||
contexts which can be used to draw on GDK drawables. Additional
|
||||
functions allow to convert GDK's rectangles and regions into
|
||||
Cairo paths and to use pixbufs as sources for drawing operations.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_set_source_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_set_source_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@pixbuf:
|
||||
@pixbuf_x:
|
||||
@pixbuf_y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_set_source_pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@pixmap:
|
||||
@pixmap_x:
|
||||
@pixmap_y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_rectangle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@rectangle:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@region:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_reset_clip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@drawable:
|
||||
|
||||
|
||||
299
docs/reference/gdk/tmpl/colors.sgml
Normal file
299
docs/reference/gdk/tmpl/colors.sgml
Normal file
@@ -0,0 +1,299 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Colormaps and Colors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Manipulation of colors and colormaps
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions are used to modify colormaps.
|
||||
A colormap is an object that contains the mapping
|
||||
between the color values stored in memory and
|
||||
the RGB values that are used to display color
|
||||
values. In general, colormaps only contain
|
||||
significant information for pseudo-color visuals,
|
||||
but even for other visual types, a colormap object
|
||||
is required in some circumstances.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are a couple of special colormaps that can
|
||||
be retrieved. The system colormap (retrieved
|
||||
with gdk_colormap_get_system()) is the default
|
||||
colormap of the system. If you are using GdkRGB,
|
||||
there is another colormap that is important - the
|
||||
colormap in which GdkRGB works, retrieved with
|
||||
gdk_rgb_get_colormap(). However, when using GdkRGB,
|
||||
it is not generally necessary to allocate colors
|
||||
directly.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In previous revisions of this interface, a number
|
||||
of functions that take a #GdkColormap parameter
|
||||
were replaced with functions whose names began
|
||||
with "gdk_colormap_". This process will probably
|
||||
be extended somewhat in the future -
|
||||
gdk_color_white(), gdk_color_black(), and
|
||||
gdk_color_change() will probably become aliases.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkColor ##### -->
|
||||
<para>
|
||||
The #GdkColor structure is used to describe an
|
||||
allocated or unallocated color.
|
||||
</para>
|
||||
|
||||
@pixel: For allocated colors, the value used to
|
||||
draw this color on the screen.
|
||||
@red: The red component of the color. This is
|
||||
a value between 0 and 65535, with 65535 indicating
|
||||
full intensitiy.
|
||||
@green: The green component of the color.
|
||||
@blue: The blue component of the color.
|
||||
|
||||
<!-- ##### STRUCT GdkColormap ##### -->
|
||||
<para>
|
||||
The colormap structure contains the following public fields.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_new ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@allocate:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cmap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cmap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system_size ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_change ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@ncolors:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@colors:
|
||||
@n_colors:
|
||||
@writeable:
|
||||
@best_match:
|
||||
@success:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@writeable:
|
||||
@best_match:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@colors:
|
||||
@n_colors:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_query_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@pixel:
|
||||
@result:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cmap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_store ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@colors:
|
||||
@ncolors:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_copy ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_free ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_alloc ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@contiguous:
|
||||
@planes:
|
||||
@nplanes:
|
||||
@pixels:
|
||||
@npixels:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_free ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@pixels:
|
||||
@npixels:
|
||||
@planes:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_white ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_black ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_parse ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@spec:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_alloc ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_change ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_equal ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colora:
|
||||
@colorb:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_hash ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colora:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_to_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
225
docs/reference/gdk/tmpl/cursors.sgml
Normal file
225
docs/reference/gdk/tmpl/cursors.sgml
Normal file
@@ -0,0 +1,225 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Cursors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Standard and pixmap cursors
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions are used to create and destroy cursors.
|
||||
There is a number of standard cursors, but it is also
|
||||
possible to construct new cursors from pixmaps and
|
||||
pixbufs. There may be limitations as to what kinds of
|
||||
cursors can be constructed on a given display, see
|
||||
gdk_display_supports_cursor_alpha(),
|
||||
gdk_display_supports_cursor_color(),
|
||||
gdk_display_get_default_cursor_size() and
|
||||
gdk_display_get_maximal_cursor_size().
|
||||
</para>
|
||||
<para>
|
||||
Cursors by themselves are not very interesting, they must be be
|
||||
bound to a window for users to see them. This is done with
|
||||
gdk_window_set_cursor() or by setting the cursor member of the
|
||||
#GdkWindowAttr struct passed to gdk_window_new().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkCursor ##### -->
|
||||
<para>
|
||||
A <type>GdkCursor</type> structure represents a cursor.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkCursorType ##### -->
|
||||
<para>
|
||||
The standard cursors available.
|
||||
</para>
|
||||
|
||||
@GDK_X_CURSOR: <inlinegraphic format="PNG" fileref="X_cursor.png"></inlinegraphic>
|
||||
@GDK_ARROW: <inlinegraphic format="PNG" fileref="arrow.png"></inlinegraphic>
|
||||
@GDK_BASED_ARROW_DOWN: <inlinegraphic format="PNG" fileref="based_arrow_down.png"></inlinegraphic>
|
||||
@GDK_BASED_ARROW_UP: <inlinegraphic format="PNG" fileref="based_arrow_up.png"></inlinegraphic>
|
||||
@GDK_BOAT: <inlinegraphic format="PNG" fileref="boat.png"></inlinegraphic>
|
||||
@GDK_BOGOSITY: <inlinegraphic format="PNG" fileref="bogosity.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_LEFT_CORNER: <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_SIDE: <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_TEE: <inlinegraphic format="PNG" fileref="bottom_tee.png"></inlinegraphic>
|
||||
@GDK_BOX_SPIRAL: <inlinegraphic format="PNG" fileref="box_spiral.png"></inlinegraphic>
|
||||
@GDK_CENTER_PTR: <inlinegraphic format="PNG" fileref="center_ptr.png"></inlinegraphic>
|
||||
@GDK_CIRCLE: <inlinegraphic format="PNG" fileref="circle.png"></inlinegraphic>
|
||||
@GDK_CLOCK: <inlinegraphic format="PNG" fileref="clock.png"></inlinegraphic>
|
||||
@GDK_COFFEE_MUG: <inlinegraphic format="PNG" fileref="coffee_mug.png"></inlinegraphic>
|
||||
@GDK_CROSS: <inlinegraphic format="PNG" fileref="cross.png"></inlinegraphic>
|
||||
@GDK_CROSS_REVERSE: <inlinegraphic format="PNG" fileref="cross_reverse.png"></inlinegraphic>
|
||||
@GDK_CROSSHAIR: <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic>
|
||||
@GDK_DIAMOND_CROSS: <inlinegraphic format="PNG" fileref="diamond_cross.png"></inlinegraphic>
|
||||
@GDK_DOT: <inlinegraphic format="PNG" fileref="dot.png"></inlinegraphic>
|
||||
@GDK_DOTBOX: <inlinegraphic format="PNG" fileref="dotbox.png"></inlinegraphic>
|
||||
@GDK_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="double_arrow.png"></inlinegraphic>
|
||||
@GDK_DRAFT_LARGE: <inlinegraphic format="PNG" fileref="draft_large.png"></inlinegraphic>
|
||||
@GDK_DRAFT_SMALL: <inlinegraphic format="PNG" fileref="draft_small.png"></inlinegraphic>
|
||||
@GDK_DRAPED_BOX: <inlinegraphic format="PNG" fileref="draped_box.png"></inlinegraphic>
|
||||
@GDK_EXCHANGE: <inlinegraphic format="PNG" fileref="exchange.png"></inlinegraphic>
|
||||
@GDK_FLEUR: <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic>
|
||||
@GDK_GOBBLER: <inlinegraphic format="PNG" fileref="gobbler.png"></inlinegraphic>
|
||||
@GDK_GUMBY: <inlinegraphic format="PNG" fileref="gumby.png"></inlinegraphic>
|
||||
@GDK_HAND1: <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic>
|
||||
@GDK_HAND2: <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic>
|
||||
@GDK_HEART: <inlinegraphic format="PNG" fileref="heart.png"></inlinegraphic>
|
||||
@GDK_ICON: <inlinegraphic format="PNG" fileref="icon.png"></inlinegraphic>
|
||||
@GDK_IRON_CROSS: <inlinegraphic format="PNG" fileref="iron_cross.png"></inlinegraphic>
|
||||
@GDK_LEFT_PTR: <inlinegraphic format="PNG" fileref="left_ptr.png"></inlinegraphic>
|
||||
@GDK_LEFT_SIDE: <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic>
|
||||
@GDK_LEFT_TEE: <inlinegraphic format="PNG" fileref="left_tee.png"></inlinegraphic>
|
||||
@GDK_LEFTBUTTON: <inlinegraphic format="PNG" fileref="leftbutton.png"></inlinegraphic>
|
||||
@GDK_LL_ANGLE: <inlinegraphic format="PNG" fileref="ll_angle.png"></inlinegraphic>
|
||||
@GDK_LR_ANGLE: <inlinegraphic format="PNG" fileref="lr_angle.png"></inlinegraphic>
|
||||
@GDK_MAN: <inlinegraphic format="PNG" fileref="man.png"></inlinegraphic>
|
||||
@GDK_MIDDLEBUTTON: <inlinegraphic format="PNG" fileref="middlebutton.png"></inlinegraphic>
|
||||
@GDK_MOUSE: <inlinegraphic format="PNG" fileref="mouse.png"></inlinegraphic>
|
||||
@GDK_PENCIL: <inlinegraphic format="PNG" fileref="pencil.png"></inlinegraphic>
|
||||
@GDK_PIRATE: <inlinegraphic format="PNG" fileref="pirate.png"></inlinegraphic>
|
||||
@GDK_PLUS: <inlinegraphic format="PNG" fileref="plus.png"></inlinegraphic>
|
||||
@GDK_QUESTION_ARROW: <inlinegraphic format="PNG" fileref="question_arrow.png"></inlinegraphic>
|
||||
@GDK_RIGHT_PTR: <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic>
|
||||
@GDK_RIGHT_SIDE: <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic>
|
||||
@GDK_RIGHT_TEE: <inlinegraphic format="PNG" fileref="right_tee.png"></inlinegraphic>
|
||||
@GDK_RIGHTBUTTON: <inlinegraphic format="PNG" fileref="rightbutton.png"></inlinegraphic>
|
||||
@GDK_RTL_LOGO: <inlinegraphic format="PNG" fileref="rtl_logo.png"></inlinegraphic>
|
||||
@GDK_SAILBOAT: <inlinegraphic format="PNG" fileref="sailboat.png"></inlinegraphic>
|
||||
@GDK_SB_DOWN_ARROW: <inlinegraphic format="PNG" fileref="sb_down_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_H_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_LEFT_ARROW: <inlinegraphic format="PNG" fileref="sb_left_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_RIGHT_ARROW: <inlinegraphic format="PNG" fileref="sb_right_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_UP_ARROW: <inlinegraphic format="PNG" fileref="sb_up_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_V_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic>
|
||||
@GDK_SHUTTLE: <inlinegraphic format="PNG" fileref="shuttle.png"></inlinegraphic>
|
||||
@GDK_SIZING: <inlinegraphic format="PNG" fileref="sizing.png"></inlinegraphic>
|
||||
@GDK_SPIDER: <inlinegraphic format="PNG" fileref="spider.png"></inlinegraphic>
|
||||
@GDK_SPRAYCAN: <inlinegraphic format="PNG" fileref="spraycan.png"></inlinegraphic>
|
||||
@GDK_STAR: <inlinegraphic format="PNG" fileref="star.png"></inlinegraphic>
|
||||
@GDK_TARGET: <inlinegraphic format="PNG" fileref="target.png"></inlinegraphic>
|
||||
@GDK_TCROSS: <inlinegraphic format="PNG" fileref="tcross.png"></inlinegraphic>
|
||||
@GDK_TOP_LEFT_ARROW: <inlinegraphic format="PNG" fileref="top_left_arrow.png"></inlinegraphic>
|
||||
@GDK_TOP_LEFT_CORNER: <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic>
|
||||
@GDK_TOP_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic>
|
||||
@GDK_TOP_SIDE: <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic>
|
||||
@GDK_TOP_TEE: <inlinegraphic format="PNG" fileref="top_tee.png"></inlinegraphic>
|
||||
@GDK_TREK: <inlinegraphic format="PNG" fileref="trek.png"></inlinegraphic>
|
||||
@GDK_UL_ANGLE: <inlinegraphic format="PNG" fileref="ul_angle.png"></inlinegraphic>
|
||||
@GDK_UMBRELLA: <inlinegraphic format="PNG" fileref="umbrella.png"></inlinegraphic>
|
||||
@GDK_UR_ANGLE: <inlinegraphic format="PNG" fileref="ur_angle.png"></inlinegraphic>
|
||||
@GDK_WATCH: <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic>
|
||||
@GDK_XTERM: <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic>
|
||||
@GDK_LAST_CURSOR: last cursor type
|
||||
@GDK_BLANK_CURSOR: Blank cursor. Since 2.16
|
||||
@GDK_CURSOR_IS_PIXMAP: type of cursors constructed with
|
||||
gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixmap ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@source:
|
||||
@mask:
|
||||
@fg:
|
||||
@bg:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@pixbuf:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@cursor_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_get_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_cursor_destroy ##### -->
|
||||
<para>
|
||||
Destroys a cursor, freeing any resources allocated for it.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
266
docs/reference/gdk/tmpl/dnd.sgml
Normal file
266
docs/reference/gdk/tmpl/dnd.sgml
Normal file
@@ -0,0 +1,266 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Drag and Drop
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for controlling drag and drop handling
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions provide a low level interface for drag and drop.
|
||||
The X backend of GDK supports both the Xdnd and Motif drag and drop protocols
|
||||
transparently, the Win32 backend supports the WM_DROPFILES protocol.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ provides a higher level abstraction based on top of these functions,
|
||||
and so they are not normally needed in GTK+ applications.
|
||||
See the <link linkend="gtk-Drag-and-Drop">Drag and Drop</link> section of
|
||||
the GTK+ documentation for more information.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_selection ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_abort ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drop_reply ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@ok:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_new ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_drop ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_find_window ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@drag_window:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_find_window_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@drag_window:
|
||||
@screen:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_ref ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_get_actions ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_get_selected_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_get_suggested_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_list_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_get_source_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_begin ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@targets:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_motion ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@suggested_action:
|
||||
@possible_actions:
|
||||
@time_:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drop_finish ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@success:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_protocol ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@xid:
|
||||
@protocol:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_protocol_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@xid:
|
||||
@protocol:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkDragProtocol ##### -->
|
||||
<para>
|
||||
Used in #GdkDragContext to indicate the protocol according to
|
||||
which DND is done.
|
||||
</para>
|
||||
|
||||
@GDK_DRAG_PROTO_MOTIF: The Motif DND protocol.
|
||||
@GDK_DRAG_PROTO_XDND: The Xdnd protocol.
|
||||
@GDK_DRAG_PROTO_ROOTWIN: An extension to the Xdnd protocol for
|
||||
unclaimed root window drops.
|
||||
@GDK_DRAG_PROTO_NONE: no protocol.
|
||||
@GDK_DRAG_PROTO_WIN32_DROPFILES: The simple WM_DROPFILES protocol.
|
||||
@GDK_DRAG_PROTO_OLE2: The complex OLE2 DND protocol (not implemented).
|
||||
@GDK_DRAG_PROTO_LOCAL: Intra-application DND.
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_unref ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDragContext ##### -->
|
||||
<para>
|
||||
A <structname>GdkDragContext</structname> holds information about a
|
||||
drag in progress. It is used on both source and destination sides.
|
||||
</para>
|
||||
|
||||
@parent_instance: the parent instance
|
||||
|
||||
<!-- ##### ENUM GdkDragAction ##### -->
|
||||
<para>
|
||||
Used in #GdkDragContext to indicate what the destination
|
||||
should do with the dropped data.
|
||||
</para>
|
||||
|
||||
@GDK_ACTION_DEFAULT: Means nothing, and should not be used.
|
||||
@GDK_ACTION_COPY: Copy the data.
|
||||
@GDK_ACTION_MOVE: Move the data, i.e. first copy it, then delete
|
||||
it from the source using the DELETE target of the X selection protocol.
|
||||
@GDK_ACTION_LINK: Add a link to the data. Note that this is only
|
||||
useful if source and destination agree on what it means.
|
||||
@GDK_ACTION_PRIVATE: Special action which tells the source that the
|
||||
destination will do something that the source doesn't understand.
|
||||
@GDK_ACTION_ASK: Ask the user what to do with the data.
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_status ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@action:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_drop_succeeded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
503
docs/reference/gdk/tmpl/drawing.sgml
Normal file
503
docs/reference/gdk/tmpl/drawing.sgml
Normal file
@@ -0,0 +1,503 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Drawing Primitives
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for drawing points, lines, arcs, and text
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions provide support for drawing points, lines, arcs and text
|
||||
onto what are called 'drawables'. Drawables, as the name suggests, are things
|
||||
which support drawing onto them, and are either #GdkWindow or #GdkPixmap
|
||||
objects.
|
||||
</para>
|
||||
<para>
|
||||
Many of the drawing operations take a #GdkGC argument, which represents a
|
||||
graphics context. This #GdkGC contains a number of drawing attributes such
|
||||
as foreground color, background color and line width, and is used to reduce
|
||||
the number of arguments needed for each drawing operation. See the
|
||||
<link linkend="gdk-Graphics-Contexts">Graphics Contexts</link> section for
|
||||
more information.
|
||||
</para>
|
||||
<para id="pango-data-structures">
|
||||
Some of the drawing operations take Pango data structures like #PangoContext,
|
||||
#PangoLayout or #PangoLayoutLine as arguments. If you're using GTK+, the ususal
|
||||
way to obtain these structures is via gtk_widget_create_pango_context() or
|
||||
gtk_widget_create_pango_layout().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDrawable ##### -->
|
||||
<para>
|
||||
An opaque structure representing an object that can be
|
||||
drawn onto. This can be a #GdkPixmap, a #GdkBitmap,
|
||||
or a #GdkWindow.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_set_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@key:
|
||||
@data:
|
||||
@destroy_func:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@key:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_set_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_visible_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_point ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_points ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@points:
|
||||
@n_points:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_line ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x1_:
|
||||
@y1_:
|
||||
@x2_:
|
||||
@y2_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_lines ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@points:
|
||||
lines.
|
||||
@n_points:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@pixbuf:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@dither:
|
||||
@x_dither:
|
||||
@y_dither:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_segments ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@segs:
|
||||
@n_segs:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkSegment ##### -->
|
||||
<para>
|
||||
Specifies the start and end point of a line for use by the gdk_draw_segments()
|
||||
function.
|
||||
</para>
|
||||
|
||||
@x1: the x coordinate of the start point.
|
||||
@y1: the y coordinate of the start point.
|
||||
@x2: the x coordinate of the end point.
|
||||
@y2: the y coordinate of the end point.
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_rectangle ##### -->
|
||||
<para>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@filled:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_arc ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@filled:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@angle1:
|
||||
@angle2:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_polygon ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@filled:
|
||||
@points:
|
||||
@n_points:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_trapezoids ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@trapezoids:
|
||||
@n_trapezoids:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkTrapezoid ##### -->
|
||||
<para>
|
||||
Specifies a trapezpoid for use by the gdk_draw_trapezoids().
|
||||
The trapezoids used here have parallel, horizontal top and
|
||||
bottom edges.
|
||||
</para>
|
||||
|
||||
@y1: the y coordinate of the start point.
|
||||
@x11: the x coordinate of the top left corner
|
||||
@x21: the x coordinate of the top right corner
|
||||
@y2: the y coordinate of the end point.
|
||||
@x12: the x coordinate of the bottom left corner
|
||||
@x22: the x coordinate of the bottom right corner
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_glyphs ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@font:
|
||||
@x:
|
||||
@y:
|
||||
@glyphs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_glyphs_transformed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@matrix:
|
||||
@font:
|
||||
@x:
|
||||
@y:
|
||||
@glyphs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_layout_line ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@line:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_layout_line_with_colors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@line:
|
||||
@foreground:
|
||||
@background:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_layout ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@layout:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_layout_with_colors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@layout:
|
||||
@foreground:
|
||||
@background:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_string ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@font:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@string:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_text ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@font:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@text:
|
||||
@text_length:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_text_wc ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@font:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@text:
|
||||
@text_length:
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_draw_pixmap ##### -->
|
||||
<para>
|
||||
Draws a pixmap, or a part of a pixmap, onto another drawable.
|
||||
</para>
|
||||
|
||||
@Deprecated: Use gdk_draw_drawable() instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@src:
|
||||
@xsrc:
|
||||
@ysrc:
|
||||
@xdest:
|
||||
@ydest:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_image ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@image:
|
||||
@xsrc:
|
||||
@ysrc:
|
||||
@xdest:
|
||||
@ydest:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_copy_to_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@image:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
549
docs/reference/gdk/tmpl/event_structs.sgml
Normal file
549
docs/reference/gdk/tmpl/event_structs.sgml
Normal file
@@ -0,0 +1,549 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Event Structures
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Data structures specific to each type of event
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The event structs contain data specific to each type of event in GDK.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
A common mistake is to forget to set the event mask of a widget so that the
|
||||
required events are received. See gtk_widget_set_events().
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### UNION GdkEvent ##### -->
|
||||
<para>
|
||||
The #GdkEvent struct contains a union of all of the event structs,
|
||||
and allows access to the data fields in a number of ways.
|
||||
</para>
|
||||
<para>
|
||||
The event type is always the first field in all of the event structs, and
|
||||
can always be accessed with the following code, no matter what type of event
|
||||
it is:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
GdkEventType type;
|
||||
|
||||
type = event->type;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To access other fields of the event structs, the pointer to the event can be
|
||||
cast to the appropriate event struct pointer, or the union member name can be
|
||||
used. For example if the event type is %GDK_BUTTON_PRESS then the x coordinate
|
||||
of the button press can be accessed with:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
gdouble x;
|
||||
|
||||
x = ((GdkEventButton*)event)->x;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
or:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
gdouble x;
|
||||
|
||||
x = event->button.x;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkEventAny ##### -->
|
||||
<para>
|
||||
Contains the fields which are common to all event structs.
|
||||
Any event pointer can safely be cast to a pointer to a #GdkEventAny to access
|
||||
these fields.
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
|
||||
<!-- ##### STRUCT GdkEventKey ##### -->
|
||||
<para>
|
||||
Describes a key press or key release event.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_KEY_PRESS or %GDK_KEY_RELEASE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@keyval: the key that was pressed or released. See the
|
||||
<filename><gdk/gdkkeysyms.h></filename>
|
||||
header file for a complete list of GDK key codes.
|
||||
@length: the length of @string.
|
||||
@string: a string containing the an approximation of the text that
|
||||
would result from this keypress. The only correct way to handle text
|
||||
input of text is using input methods (see #GtkIMContext), so this
|
||||
field is deprecated and should never be used.
|
||||
(gdk_unicode_to_keyval() provides a non-deprecated way of getting
|
||||
an approximate translation for a key.) The string is encoded in the encoding
|
||||
of the current locale (Note: this for backwards compatibility:
|
||||
strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated.
|
||||
In some cases, the translation of the key code will be a single
|
||||
NUL byte, in which case looking at @length is necessary to distinguish
|
||||
it from the an empty translation.
|
||||
@hardware_keycode: the raw code of the key that was pressed or released.
|
||||
@group: the keyboard group.
|
||||
@is_modifier: a flag that indicates if @hardware_keycode is mapped to a
|
||||
modifier. Since 2.10
|
||||
|
||||
<!-- ##### STRUCT GdkEventButton ##### -->
|
||||
<para>
|
||||
Used for button press and button release events. The
|
||||
<structfield>type</structfield> field will be one of %GDK_BUTTON_PRESS,
|
||||
%GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS, and %GDK_BUTTON_RELEASE.
|
||||
</para>
|
||||
<para>
|
||||
Double and triple-clicks result in a sequence of events being received.
|
||||
For double-clicks the order of events will be:
|
||||
<orderedlist>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
</orderedlist>
|
||||
Note that the first click is received just like a normal
|
||||
button press, while the second click results in a %GDK_2BUTTON_PRESS being
|
||||
received just after the %GDK_BUTTON_PRESS.
|
||||
</para>
|
||||
<para>
|
||||
Triple-clicks are very similar to double-clicks, except that %GDK_3BUTTON_PRESS
|
||||
is inserted after the third click. The order of the events is:
|
||||
<orderedlist>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_3BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
<para>
|
||||
For a double click to occur, the second button press must occur within 1/4 of
|
||||
a second of the first. For a triple click to occur, the third button press
|
||||
must also occur within 1/2 second of the first button press.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS,
|
||||
%GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the pointer relative to the window.
|
||||
@y: the y coordinate of the pointer relative to the window.
|
||||
@axes: @x, @y translated to the axes of @device, or %NULL if @device is
|
||||
the mouse.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@button: the button which was pressed or released, numbered from 1 to 5.
|
||||
Normally button 1 is the left mouse button, 2 is the middle button,
|
||||
and 3 is the right button. On 2-button mice, the middle button can often
|
||||
be simulated by pressing both mouse buttons together.
|
||||
@device: the device where the event originated.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
|
||||
<!-- ##### STRUCT GdkEventScroll ##### -->
|
||||
<para>
|
||||
Generated from button presses for the buttons 4 to 7. Wheel mice are
|
||||
usually configured to generate button press events for buttons 4 and 5
|
||||
when the wheel is turned.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_SCROLL).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the pointer relative to the window.
|
||||
@y: the y coordinate of the pointer relative to the window.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@direction: the direction to scroll to (one of %GDK_SCROLL_UP,
|
||||
%GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT and %GDK_SCROLL_RIGHT).
|
||||
@device: the device where the event originated.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
|
||||
<!-- ##### STRUCT GdkEventMotion ##### -->
|
||||
<para>
|
||||
Generated when the pointer moves.
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the pointer relative to the window.
|
||||
@y: the y coordinate of the pointer relative to the window.
|
||||
@axes: @x, @y translated to the axes of @device, or %NULL if @device is
|
||||
the mouse.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@is_hint: set to 1 if this event is just a hint, see the %GDK_POINTER_MOTION_HINT_MASK
|
||||
value of #GdkEventMask.
|
||||
@device: the device where the event originated.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
|
||||
<!-- ##### STRUCT GdkEventExpose ##### -->
|
||||
<para>
|
||||
Generated when all or part of a window becomes visible and needs to be
|
||||
redrawn.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_EXPOSE or %GDK_DAMAGE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@area: bounding box of @region.
|
||||
@region: the region that needs to be redrawn.
|
||||
@count: the number of contiguous %GDK_EXPOSE events following this one.
|
||||
The only use for this is "exposure compression", i.e. handling all contiguous
|
||||
%GDK_EXPOSE events in one go, though GDK performs some exposure compression
|
||||
so this is not normally needed.
|
||||
|
||||
<!-- ##### STRUCT GdkEventVisibility ##### -->
|
||||
<para>
|
||||
Generated when the window visibility status has changed.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_VISIBILITY_NOTIFY).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@state: the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED,
|
||||
%GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
|
||||
|
||||
<!-- ##### STRUCT GdkEventCrossing ##### -->
|
||||
<para>
|
||||
Generated when the pointer enters or leaves a window.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_ENTER_NOTIFY or %GDK_LEAVE_NOTIFY).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@subwindow: the window that was entered or left.
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the pointer relative to the window.
|
||||
@y: the y coordinate of the pointer relative to the window.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
@mode: the crossing mode (%GDK_CROSSING_NORMAL, %GDK_CROSSING_GRAB,
|
||||
%GDK_CROSSING_UNGRAB, %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB or
|
||||
%GDK_CROSSING_STATE_CHANGED). %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB,
|
||||
and %GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized,
|
||||
never native.
|
||||
@detail: the kind of crossing that happened (%GDK_NOTIFY_INFERIOR,
|
||||
%GDK_NOTIFY_ANCESTOR, %GDK_NOTIFY_VIRTUAL, %GDK_NOTIFY_NONLINEAR or
|
||||
%GDK_NOTIFY_NONLINEAR_VIRTUAL).
|
||||
@focus: %TRUE if @window is the focus window or an inferior.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
|
||||
<!-- ##### STRUCT GdkEventFocus ##### -->
|
||||
<para>
|
||||
Describes a change of keyboard focus.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_FOCUS_CHANGE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@in: %TRUE if the window has gained the keyboard focus, %FALSE if it has lost
|
||||
the focus.
|
||||
|
||||
<!-- ##### STRUCT GdkEventConfigure ##### -->
|
||||
<para>
|
||||
Generated when a window size or position has changed.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_CONFIGURE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@x: the new x coordinate of the window, relative to its parent.
|
||||
@y: the new y coordinate of the window, relative to its parent.
|
||||
@width: the new width of the window.
|
||||
@height: the new height of the window.
|
||||
|
||||
<!-- ##### STRUCT GdkEventProperty ##### -->
|
||||
<para>
|
||||
Describes a property change on a window.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_PROPERTY_NOTIFY).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@atom: the property that was changed.
|
||||
@time: the time of the event in milliseconds.
|
||||
@state: whether the property was changed (%GDK_PROPERTY_NEW_VALUE) or
|
||||
deleted (%GDK_PROPERTY_DELETE).
|
||||
|
||||
<!-- ##### STRUCT GdkEventSelection ##### -->
|
||||
<para>
|
||||
Generated when a selection is requested or ownership of a selection
|
||||
is taken over by another client application.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_SELECTION_CLEAR, %GDK_SELECTION_NOTIFY or
|
||||
%GDK_SELECTION_REQUEST).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@selection: the selection.
|
||||
@target: the target to which the selection should be converted.
|
||||
@property: the property in which to place the result of the conversion.
|
||||
@time: the time of the event in milliseconds.
|
||||
@requestor: the native window on which to place @property.
|
||||
|
||||
<!-- ##### TYPEDEF GdkNativeWindow ##### -->
|
||||
<para>
|
||||
Used to represent native windows (<type>Window</type>s for the X11 backend,
|
||||
<type>HWND</type>s for Win32).
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkEventDND ##### -->
|
||||
<para>
|
||||
Generated during DND operations.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_DRAG_ENTER, %GDK_DRAG_LEAVE,
|
||||
%GDK_DRAG_MOTION, %GDK_DRAG_STATUS, %GDK_DROP_START or %GDK_DROP_FINISHED).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@context: the #GdkDragContext for the current DND operation.
|
||||
@time: the time of the event in milliseconds.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen,
|
||||
only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen,
|
||||
only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
|
||||
|
||||
<!-- ##### STRUCT GdkEventProximity ##### -->
|
||||
<para>
|
||||
Proximity events are generated when using GDK's wrapper for the
|
||||
XInput extension. The XInput extension is an add-on for standard X
|
||||
that allows you to use nonstandard devices such as graphics tablets.
|
||||
A proximity event indicates that the stylus has moved in or out of
|
||||
contact with the tablet, or perhaps that the user's finger has moved
|
||||
in or out of contact with a touch screen.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_PROXIMITY_IN or %GDK_PROXIMITY_OUT).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@device: the device where the event originated.
|
||||
|
||||
<!-- ##### STRUCT GdkEventClient ##### -->
|
||||
<para>
|
||||
An event sent by another client application.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_CLIENT_EVENT).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@message_type: the type of the message, which can be defined by the
|
||||
application.
|
||||
@data_format: the format of the data, given as the number of bits in each
|
||||
data element, i.e. 8, 16, or 32. 8-bit data uses the b array of the data
|
||||
union, 16-bit data uses the s array, and 32-bit data uses the l array.
|
||||
|
||||
<!-- ##### STRUCT GdkEventNoExpose ##### -->
|
||||
<para>
|
||||
Generated when the area of a #GdkDrawable being copied, with gdk_draw_drawable()
|
||||
or gdk_window_copy_area(), was completely available.
|
||||
</para>
|
||||
<para>
|
||||
FIXME: add more here.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_NO_EXPOSE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
|
||||
<!-- ##### STRUCT GdkEventWindowState ##### -->
|
||||
<para>
|
||||
Generated when the state of a toplevel window changes.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_WINDOW_STATE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@changed_mask: mask specifying what flags have changed.
|
||||
@new_window_state: the new window state, a combination of #GdkWindowState bits.
|
||||
|
||||
<!-- ##### STRUCT GdkEventSetting ##### -->
|
||||
<para>
|
||||
Generated when a setting is modified.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_SETTING).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@action: what happened to the setting (%GDK_SETTING_ACTION_NEW,
|
||||
%GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
|
||||
@name: the name of the setting.
|
||||
|
||||
<!-- ##### STRUCT GdkEventOwnerChange ##### -->
|
||||
<para>
|
||||
Generated when the owner of a selection changes. On X11, this information is
|
||||
only available if the X server supports the XFIXES extension.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_OWNER_CHANGE).
|
||||
@window: the window which received the event
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@owner: the new owner of the selection
|
||||
@reason: the reason for the ownership change as a #GdkOwnerChange value
|
||||
@selection: the atom identifying the selection
|
||||
@time: the timestamp of the event
|
||||
@selection_time: the time at which the selection ownership was taken over
|
||||
@Since: 2.6
|
||||
|
||||
<!-- ##### STRUCT GdkEventGrabBroken ##### -->
|
||||
<para>
|
||||
Generated when a pointer or keyboard grab is broken. On X11, this happens
|
||||
when the grab window becomes unviewable (i.e. it or one of its ancestors
|
||||
is unmapped), or if the same application grabs the pointer or keyboard
|
||||
again. Note that implicit grabs (which are initiated by button presses)
|
||||
can also cause #GdkEventGrabBroken events.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_GRAB_BROKEN)
|
||||
@window: the window which received the event, i.e. the window
|
||||
that previously owned the grab
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@keyboard: %TRUE if a keyboard grab was broken, %FALSE if a pointer
|
||||
grab was broken
|
||||
@implicit: %TRUE if the broken grab was implicit
|
||||
@grab_window: If this event is caused by another grab in the same
|
||||
application, @grab_window contains the new grab window. Otherwise
|
||||
@grab_window is %NULL.
|
||||
@Since: 2.8
|
||||
|
||||
<!-- ##### ENUM GdkScrollDirection ##### -->
|
||||
<para>
|
||||
Specifies the direction for #GdkEventScroll.
|
||||
</para>
|
||||
|
||||
@GDK_SCROLL_UP: the window is scrolled up.
|
||||
@GDK_SCROLL_DOWN: the window is scrolled down.
|
||||
@GDK_SCROLL_LEFT: the window is scrolled to the left.
|
||||
@GDK_SCROLL_RIGHT: the window is scrolled to the right.
|
||||
|
||||
<!-- ##### ENUM GdkVisibilityState ##### -->
|
||||
<para>
|
||||
Specifies the visiblity status of a window for a #GdkEventVisibility.
|
||||
</para>
|
||||
|
||||
@GDK_VISIBILITY_UNOBSCURED: the window is completely visible.
|
||||
@GDK_VISIBILITY_PARTIAL: the window is partially visible.
|
||||
@GDK_VISIBILITY_FULLY_OBSCURED: the window is not visible at all.
|
||||
|
||||
<!-- ##### ENUM GdkCrossingMode ##### -->
|
||||
<para>
|
||||
Specifies the crossing mode for #GdkEventCrossing.
|
||||
</para>
|
||||
|
||||
@GDK_CROSSING_NORMAL: crossing because of pointer motion.
|
||||
@GDK_CROSSING_GRAB: crossing because a grab is activated.
|
||||
@GDK_CROSSING_UNGRAB: crossing because a grab is deactivated.
|
||||
@GDK_CROSSING_GTK_GRAB: crossing because a GTK+ grab is activated.
|
||||
@GDK_CROSSING_GTK_UNGRAB: crossing because a GTK+ grab is deactivated.
|
||||
@GDK_CROSSING_STATE_CHANGED: crossing because a GTK+ widget changed state (e.g.
|
||||
sensitivity).
|
||||
|
||||
<!-- ##### ENUM GdkNotifyType ##### -->
|
||||
<para>
|
||||
Specifies the kind of crossing for #GdkEventCrossing.
|
||||
</para>
|
||||
<para>
|
||||
See the X11 protocol specification of <type>LeaveNotify</type> for
|
||||
full details of crossing event generation.
|
||||
</para>
|
||||
|
||||
@GDK_NOTIFY_ANCESTOR: the window is entered from an ancestor or
|
||||
left towards an ancestor.
|
||||
@GDK_NOTIFY_VIRTUAL: the pointer moves between an ancestor and an
|
||||
inferior of the window.
|
||||
@GDK_NOTIFY_INFERIOR: the window is entered from an inferior or
|
||||
left towards an inferior.
|
||||
@GDK_NOTIFY_NONLINEAR: the window is entered from or left towards
|
||||
a window which is neither an ancestor nor an inferior.
|
||||
@GDK_NOTIFY_NONLINEAR_VIRTUAL: the pointer moves between two windows
|
||||
which are not ancestors of each other and the window is part of
|
||||
the ancestor chain between one of these windows and their least
|
||||
common ancestor.
|
||||
@GDK_NOTIFY_UNKNOWN: an unknown type of enter/leave event occurred.
|
||||
|
||||
<!-- ##### ENUM GdkPropertyState ##### -->
|
||||
<para>
|
||||
Specifies the type of a property change for a #GdkEventProperty.
|
||||
</para>
|
||||
|
||||
@GDK_PROPERTY_NEW_VALUE: the property value was changed.
|
||||
@GDK_PROPERTY_DELETE: the property was deleted.
|
||||
|
||||
<!-- ##### ENUM GdkWindowState ##### -->
|
||||
<para>
|
||||
Specifies the state of a toplevel window.
|
||||
</para>
|
||||
|
||||
@GDK_WINDOW_STATE_WITHDRAWN: the window is not shown.
|
||||
@GDK_WINDOW_STATE_ICONIFIED: the window is minimized.
|
||||
@GDK_WINDOW_STATE_MAXIMIZED: the window is maximized.
|
||||
@GDK_WINDOW_STATE_STICKY: the window is sticky.
|
||||
@GDK_WINDOW_STATE_FULLSCREEN: the window is maximized without decorations.
|
||||
@GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
|
||||
@GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
|
||||
|
||||
<!-- ##### ENUM GdkSettingAction ##### -->
|
||||
<para>
|
||||
Specifies the kind of modification applied to a setting in a #GdkEventSetting.
|
||||
</para>
|
||||
|
||||
@GDK_SETTING_ACTION_NEW: a setting was added.
|
||||
@GDK_SETTING_ACTION_CHANGED: a setting was changed.
|
||||
@GDK_SETTING_ACTION_DELETED: a setting was deleted.
|
||||
|
||||
<!-- ##### ENUM GdkOwnerChange ##### -->
|
||||
<para>
|
||||
Specifies why a selection ownership was changed.
|
||||
</para>
|
||||
|
||||
@GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
|
||||
@GDK_OWNER_CHANGE_DESTROY: the window was destroyed
|
||||
@GDK_OWNER_CHANGE_CLOSE: the client was closed
|
||||
|
||||
386
docs/reference/gdk/tmpl/events.sgml
Normal file
386
docs/reference/gdk/tmpl/events.sgml
Normal file
@@ -0,0 +1,386 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Events
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for handling events from the window system
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
This section describes functions dealing with events from the window system.
|
||||
</para>
|
||||
<para>
|
||||
In GTK+ applications the events are handled automatically in
|
||||
gtk_main_do_event() and passed on to the appropriate widgets, so these
|
||||
functions are rarely needed. Though some of the fields in the
|
||||
<link linkend="gdk-Event-Structures">Event Structures</link> are useful.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-Event-Structures">Event Structures</link></term>
|
||||
<listitem><para>
|
||||
The structs used for each type of event.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkEventType ##### -->
|
||||
<para>
|
||||
Specifies the type of the event.
|
||||
</para>
|
||||
<para>
|
||||
Do not confuse these events with the signals that GTK+ widgets emit.
|
||||
Although many of these events result in corresponding signals being emitted,
|
||||
the events are often transformed or filtered along the way.
|
||||
</para>
|
||||
|
||||
@GDK_NOTHING: a special code to indicate a null event.
|
||||
@GDK_DELETE: the window manager has requested that the toplevel window be
|
||||
hidden or destroyed, usually when the user clicks on a special icon in the
|
||||
title bar.
|
||||
@GDK_DESTROY: the window has been destroyed.
|
||||
@GDK_EXPOSE: all or part of the window has become visible and needs to be
|
||||
redrawn.
|
||||
@GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
|
||||
@GDK_BUTTON_PRESS: a mouse button has been pressed.
|
||||
@GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice
|
||||
within a short period of time). Note that each click also generates a
|
||||
%GDK_BUTTON_PRESS event.
|
||||
@GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
|
||||
of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
|
||||
@GDK_BUTTON_RELEASE: a mouse button has been released.
|
||||
@GDK_KEY_PRESS: a key has been pressed.
|
||||
@GDK_KEY_RELEASE: a key has been released.
|
||||
@GDK_ENTER_NOTIFY: the pointer has entered the window.
|
||||
@GDK_LEAVE_NOTIFY: the pointer has left the window.
|
||||
@GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
|
||||
@GDK_CONFIGURE: the size, position or stacking order of the window has changed.
|
||||
Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
|
||||
@GDK_MAP: the window has been mapped.
|
||||
@GDK_UNMAP: the window has been unmapped.
|
||||
@GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
|
||||
@GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
|
||||
@GDK_SELECTION_REQUEST: another application has requested a selection.
|
||||
@GDK_SELECTION_NOTIFY: a selection has been received.
|
||||
@GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
|
||||
surface (e.g. a touchscreen or graphics tablet).
|
||||
@GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
|
||||
surface.
|
||||
@GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
|
||||
@GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
|
||||
@GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
|
||||
progress.
|
||||
@GDK_DRAG_STATUS: the status of the drag operation initiated by the window
|
||||
has changed.
|
||||
@GDK_DROP_START: a drop operation onto the window has started.
|
||||
@GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
|
||||
@GDK_CLIENT_EVENT: a message has been received from another application.
|
||||
@GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
|
||||
@GDK_NO_EXPOSE: indicates that the source region was completely available
|
||||
when parts of a drawable were copied. This is not very useful.
|
||||
@GDK_SCROLL: the scroll wheel was turned
|
||||
@GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
|
||||
for the possible window states
|
||||
@GDK_SETTING: a setting has been modified.
|
||||
@GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
|
||||
was added in 2.6
|
||||
@GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
|
||||
was added in 2.8.
|
||||
@GDK_DAMAGE: the content of the window has been changed. This event type
|
||||
was added in 2.14.
|
||||
@GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
|
||||
|
||||
<!-- ##### ENUM GdkEventMask ##### -->
|
||||
<para>
|
||||
A set of bit-flags to indicate which events a window is to receive.
|
||||
Most of these masks map onto one or more of the #GdkEventType event types
|
||||
above.
|
||||
</para>
|
||||
<para>
|
||||
%GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
|
||||
number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY
|
||||
event is received each time the mouse moves. However, if the application
|
||||
spends a lot of time processing the event (updating the display, for example),
|
||||
it can lag behind the position of the mouse. When using
|
||||
%GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will be sent,
|
||||
some of which are marked as a hint (the is_hint member is %TRUE).
|
||||
To receive more motion events after a motion hint event, the application
|
||||
needs to asks for more, by calling gdk_event_request_motions().
|
||||
</para>
|
||||
|
||||
@GDK_EXPOSURE_MASK: receive expose events
|
||||
@GDK_POINTER_MOTION_MASK: receive all pointer motion events
|
||||
@GDK_POINTER_MOTION_HINT_MASK: see the explanation above
|
||||
@GDK_BUTTON_MOTION_MASK: receive pointer motion events while any button is pressed
|
||||
@GDK_BUTTON1_MOTION_MASK: receive pointer motion events while 1 button is pressed
|
||||
@GDK_BUTTON2_MOTION_MASK: receive pointer motion events while 2 button is pressed
|
||||
@GDK_BUTTON3_MOTION_MASK: receive pointer motion events while 3 button is pressed
|
||||
@GDK_BUTTON_PRESS_MASK: receive button press events
|
||||
@GDK_BUTTON_RELEASE_MASK: receive button release events
|
||||
@GDK_KEY_PRESS_MASK: receive key press events
|
||||
@GDK_KEY_RELEASE_MASK: receive key release events
|
||||
@GDK_ENTER_NOTIFY_MASK: receive window enter events
|
||||
@GDK_LEAVE_NOTIFY_MASK: receive window leave events
|
||||
@GDK_FOCUS_CHANGE_MASK: receive focus change events
|
||||
@GDK_STRUCTURE_MASK: receive events about window configuration change
|
||||
@GDK_PROPERTY_CHANGE_MASK: receive property change events
|
||||
@GDK_VISIBILITY_NOTIFY_MASK: receive visibility change events
|
||||
@GDK_PROXIMITY_IN_MASK: receive proximity in events
|
||||
@GDK_PROXIMITY_OUT_MASK: receive proximity out events
|
||||
@GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
|
||||
child windows
|
||||
@GDK_SCROLL_MASK: receive scroll events
|
||||
@GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
|
||||
|
||||
<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
|
||||
<para>
|
||||
Represents the current time, and can be used anywhere a time is expected.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PRIORITY_EVENTS ##### -->
|
||||
<para>
|
||||
This is the priority that events from the X server are given in the
|
||||
<link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PRIORITY_REDRAW ##### -->
|
||||
<para>
|
||||
This is the priority that the idle handler processing window updates
|
||||
is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_events_pending ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_peek ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_graphics_expose ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_put ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_copy ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_free ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event: a #GdkEvent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_time ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@state:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_axis ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@axis_use:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_coords ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@x_win:
|
||||
@y_win:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_root_coords ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_request_motions ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_handler_set ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@func:
|
||||
@data:
|
||||
@notify:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
|
||||
<para>
|
||||
Specifies the type of function passed to gdk_event_handler_set() to handle
|
||||
all GDK events.
|
||||
</para>
|
||||
|
||||
@event: the #GdkEvent to process.
|
||||
@data: user data set when the event handler was installed with
|
||||
gdk_event_handler_set().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@winid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_client_message_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@event:
|
||||
@winid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@message_type:
|
||||
@func:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_show_events ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_show_events ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@show_events:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_setting_get ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@name:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
586
docs/reference/gdk/tmpl/fonts.sgml
Normal file
586
docs/reference/gdk/tmpl/fonts.sgml
Normal file
@@ -0,0 +1,586 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Fonts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Loading and manipulating fonts
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GdkFont data type represents a font for drawing on
|
||||
the screen. These functions provide support for
|
||||
loading fonts, and also for determining the dimensions
|
||||
of characters and strings when drawn with a particular
|
||||
font.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Fonts in X are specified by a
|
||||
<firstterm>X Logical Font Description</firstterm>.
|
||||
The following description is considerably simplified.
|
||||
For definitive information about XLFD's see the
|
||||
X reference documentation. A X Logical Font Description (XLFD)
|
||||
consists of a sequence of fields separated (and surrounded by) '-'
|
||||
characters. For example, Adobe Helvetica Bold 12 pt, has the
|
||||
full description:
|
||||
<informalexample><programlisting>
|
||||
"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The fields in the XLFD are:
|
||||
|
||||
<informaltable pgwide="1" frame="none">
|
||||
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>Foundry</entry>
|
||||
<entry>the company or organization where the font originated.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Family</entry>
|
||||
<entry>the font family (a group of related font designs).</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Weight</entry>
|
||||
<entry>A name for the font's typographic weight
|
||||
For example, 'bold' or 'medium').</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Slant</entry>
|
||||
<entry>The slant of the font. Common values are 'R' for Roman,
|
||||
'I' for italoc, and 'O' for oblique.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Set Width</entry>
|
||||
<entry>A name for the width of the font. For example,
|
||||
'normal' or 'condensed'.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Add Style</entry>
|
||||
<entry>Additional information to distinguish a font from
|
||||
other fonts of the same family.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Pixel Size</entry>
|
||||
<entry>The body size of the font in pixels.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Point Size</entry>
|
||||
<entry>The body size of the font in 10ths of a point.
|
||||
(A <firstterm>point</firstterm> is 1/72.27 inch) </entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Resolution X</entry>
|
||||
<entry>The horizontal resolution that the font was designed for.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Resolution Y</entry>
|
||||
<entry>The vertical resolution that the font was designed for .</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Spacing</entry>
|
||||
<entry>The type of spacing for the font - can be 'p' for proportional,
|
||||
'm' for monospaced or 'c' for charcell.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Average Width</entry>
|
||||
<entry>The average width of a glyph in the font. For monospaced
|
||||
and charcell fonts, all glyphs in the font have this width</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Charset Registry</entry>
|
||||
<entry>The registration authority that owns the encoding for
|
||||
the font. Together with the Charset Encoding field, this
|
||||
defines the character set for the font.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Charset Encoding</entry>
|
||||
<entry>An identifier for the particular character set encoding.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When specifying a font via a X logical Font Description,
|
||||
'*' can be used as a wildcard to match any portion of
|
||||
the XLFD. For instance, the above example could
|
||||
also be specified as
|
||||
<informalexample><programlisting>
|
||||
"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
|
||||
</programlisting></informalexample>
|
||||
|
||||
It is generally a good idea to use wildcards for any
|
||||
portion of the XLFD that your program does not care
|
||||
about specifically, since that will improve the
|
||||
chances of finding a matching font.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A <firstterm>fontset</firstterm> is a list of fonts
|
||||
that is used for drawing international text that may
|
||||
contain characters from a number of different character
|
||||
sets. It is represented by a list of XLFD's.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The font for a given character set is determined by going
|
||||
through the list of XLFD's in order. For each one, if
|
||||
the registry and and encoding fields match the desired
|
||||
character set, then that font is used, otherwise if
|
||||
the XLFD contains wild-cards for the registry and encoding
|
||||
fields, the registry and encoding for the desired character
|
||||
set are substituted in and a lookup is done. If a match is found
|
||||
that font is used. Otherwise, processing continues
|
||||
on to the next font in the list.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The functions for determining the metrics of a string
|
||||
come in several varieties that can take a number
|
||||
of forms of string input:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>8-bit string</term>
|
||||
<listitem><para>
|
||||
When using functions like gdk_string_width() that
|
||||
take a <type>gchar *</type>, if the font is of type
|
||||
%GDK_FONT_FONT and is an 8-bit font, then each
|
||||
<type>gchar</type> indexes the glyphs in the font directly.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>16-bit string</term>
|
||||
<listitem><para>
|
||||
For functions taking a <type>gchar *</type>, if the
|
||||
font is of type %GDK_FONT_FONT, and is a 16-bit
|
||||
font, then the <type>gchar *</type> argument is
|
||||
interpreted as a <type>guint16 *</type> cast to
|
||||
a <type>gchar *</type> and each <type>guint16</type>
|
||||
indexes the glyphs in the font directly.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Multibyte string</term>
|
||||
<listitem><para>
|
||||
For functions taking a <type>gchar *</type>, if the
|
||||
font is of type %GDK_FONT_FONTSET, then the input
|
||||
string is interpreted as a <firstterm>multibyte</firstterm>
|
||||
encoded according to the current locale. (A multibyte
|
||||
string is one in which each character may consist
|
||||
of one or more bytes, with different lengths for different
|
||||
characters in the string). They can be converted to and
|
||||
from wide character strings (see below) using
|
||||
gdk_wcstombs() and gdk_mbstowcs().) The string will
|
||||
be rendered using one or more different fonts from
|
||||
the fontset.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Wide character string</term>
|
||||
<listitem><para>
|
||||
For a number of the text-measuring functions, GDK
|
||||
provides a variant (such as gdk_text_width_wc()) which
|
||||
takes a <type>GdkWChar *</type> instead of a
|
||||
<type>gchar *</type>. The input is then taken to
|
||||
be a wide character string in the encoding of the
|
||||
current locale. (A wide character string is a string
|
||||
in which each character consists of several bytes,
|
||||
and the width of each character in the string is
|
||||
constant.)
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK provides functions to determine a number of different
|
||||
measurements (metrics) for a given string. (Need diagram
|
||||
here).
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>ascent</term>
|
||||
<listitem><para>
|
||||
The vertical distance from the origin of the drawing
|
||||
opereration to the top of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>descent</term>
|
||||
<listitem><para>
|
||||
The vertical distance from the origin of the drawing
|
||||
opereration to the bottom of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>left bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the left-most part of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>right bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the right-most part of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>width bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the correct origin for drawing another
|
||||
string to follow the current one. Depending on the
|
||||
font, this could be greater than or less than the
|
||||
right bearing.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkFont ##### -->
|
||||
<para>
|
||||
The <structname>GdkFont</structname> structure represents a font or fontset. It
|
||||
contains the following public fields. A new <structname>GdkFont</structname>
|
||||
structure is returned by gdk_font_load() or gdk_fontset_load(),
|
||||
and is reference counted with gdk_font_ref() and gdk_font_unref()
|
||||
</para>
|
||||
|
||||
@type: a value of type #GdkFontType which indicates
|
||||
whether this font is a single font or a fontset.
|
||||
@ascent: the maximum distance that the font, when drawn,
|
||||
ascends above the baseline.
|
||||
@descent: the maximum distance that the font, when drawn,
|
||||
descends below the baseline.
|
||||
|
||||
<!-- ##### ENUM GdkFontType ##### -->
|
||||
<para>
|
||||
Indicates the type of a font. The possible values
|
||||
are currently:
|
||||
</para>
|
||||
|
||||
@GDK_FONT_FONT: the font is a single font.
|
||||
@GDK_FONT_FONTSET: the font is a fontset.
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_load ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_load_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@font_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_fontset_load ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@fontset_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_fontset_load_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@fontset_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_from_description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_desc:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_from_description_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@font_desc:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_ref ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_unref ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_id ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_equal ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@fonta:
|
||||
@fontb:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_extents ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@string:
|
||||
@lbearing:
|
||||
@rbearing:
|
||||
@width:
|
||||
@ascent:
|
||||
@descent:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_extents ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@lbearing:
|
||||
@rbearing:
|
||||
@width:
|
||||
@ascent:
|
||||
@descent:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_extents_wc ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@lbearing:
|
||||
@rbearing:
|
||||
@width:
|
||||
@ascent:
|
||||
@descent:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_width ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@string:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_width ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_width_wc ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_width ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@character:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_width_wc ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@character:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_measure ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@string:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_measure ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_measure ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@character:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_height ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@string:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_height ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_height ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@character:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkWChar ##### -->
|
||||
<para>
|
||||
Specifies a wide character type, used to represent character codes.
|
||||
This is needed since some native languages have character sets which have
|
||||
more than 256 characters (Japanese and Chinese, for example).
|
||||
</para>
|
||||
<para>
|
||||
Wide character values between 0 and 127 are always identical in meaning to
|
||||
the ASCII character codes. The wide character value 0 is often used to
|
||||
terminate strings of wide characters in a similar way to normal strings
|
||||
using the char type.
|
||||
</para>
|
||||
<para>
|
||||
An alternative to wide characters is multi-byte characters, which extend
|
||||
normal char strings to cope with larger character sets. As the name suggests,
|
||||
multi-byte characters use a different number of bytes to store different
|
||||
character codes. For example codes 0-127 (i.e. the ASCII codes) often
|
||||
use just one byte of memory, while other codes may use 2, 3 or even 4 bytes.
|
||||
Multi-byte characters have the advantage that they can often be used in an
|
||||
application with little change, since strings are still represented as arrays
|
||||
of char values. However multi-byte strings are much easier to manipulate since
|
||||
the character are all of the same size.
|
||||
</para>
|
||||
<para>
|
||||
Applications typically use wide characters to represent character codes
|
||||
internally, and multi-byte strings when saving the characters to a file.
|
||||
The gdk_wcstombs() and gdk_mbstowcs() functions can be used to convert from
|
||||
one representation to the other.
|
||||
</para>
|
||||
<para>
|
||||
See the 'Extended Characters' section of the GNU C Library Reference Manual
|
||||
for more detailed information on wide and multi-byte characters.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_wcstombs ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_mbstowcs ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@src:
|
||||
@dest_max:
|
||||
@Returns:
|
||||
|
||||
|
||||
464
docs/reference/gdk/tmpl/gcs.sgml
Normal file
464
docs/reference/gdk/tmpl/gcs.sgml
Normal file
@@ -0,0 +1,464 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Graphics Contexts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Objects to encapsulate drawing properties
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
All drawing operations in GDK take a
|
||||
<firstterm>graphics context</firstterm> (GC) argument.
|
||||
A graphics context encapsulates information about
|
||||
the way things are drawn, such as the foreground
|
||||
color or line width. By using graphics contexts,
|
||||
the number of arguments to each drawing call is
|
||||
greatly reduced, and communication overhead is
|
||||
minimized, since identical arguments do not need
|
||||
to be passed repeatedly.
|
||||
</para>
|
||||
<para>
|
||||
Most values of a graphics context can be set at
|
||||
creation time by using gdk_gc_new_with_values(),
|
||||
or can be set one-by-one using functions such
|
||||
as gdk_gc_set_foreground(). A few of the values
|
||||
in the GC, such as the dash pattern, can only
|
||||
be set by the latter method.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkGC ##### -->
|
||||
<para>
|
||||
The #GdkGC structure represents a graphics context.
|
||||
It is an opaque structure with no user-visible
|
||||
elements.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkGCValues ##### -->
|
||||
<para>
|
||||
The #GdkGCValues structure holds a set of values used
|
||||
to create or modify a graphics context.
|
||||
</para>
|
||||
|
||||
@foreground: the foreground color. Note that gdk_gc_get_values()
|
||||
only sets the pixel value.
|
||||
@background: the background color. Note that gdk_gc_get_values()
|
||||
only sets the pixel value.
|
||||
@font: the default font.
|
||||
@function: the bitwise operation used when drawing.
|
||||
@fill: the fill style.
|
||||
@tile: the tile pixmap.
|
||||
@stipple: the stipple bitmap.
|
||||
@clip_mask: the clip mask bitmap.
|
||||
@subwindow_mode: the subwindow mode.
|
||||
@ts_x_origin: the x origin of the tile or stipple.
|
||||
@ts_y_origin: the y origin of the tile or stipple.
|
||||
@clip_x_origin: the x origin of the clip mask.
|
||||
@clip_y_origin: the y origin of the clip mask.
|
||||
@graphics_exposures: whether graphics exposures are enabled.
|
||||
@line_width: the line width.
|
||||
@line_style: the way dashed lines are drawn.
|
||||
@cap_style: the way the ends of lines are drawn.
|
||||
@join_style: the way joins between lines are drawn.
|
||||
|
||||
<!-- ##### ENUM GdkGCValuesMask ##### -->
|
||||
<para>
|
||||
A set of bit flags used to indicate which fields
|
||||
#GdkGCValues structure are set.
|
||||
</para>
|
||||
|
||||
@GDK_GC_FOREGROUND: the @foreground is set.
|
||||
@GDK_GC_BACKGROUND: the @background is set.
|
||||
@GDK_GC_FONT: the @font is set.
|
||||
@GDK_GC_FUNCTION: the @function is set.
|
||||
@GDK_GC_FILL: the @fill is set.
|
||||
@GDK_GC_TILE: the @tile is set.
|
||||
@GDK_GC_STIPPLE: the @stipple is set.
|
||||
@GDK_GC_CLIP_MASK: the @clip_mask is set.
|
||||
@GDK_GC_SUBWINDOW: the @subwindow_mode is set.
|
||||
@GDK_GC_TS_X_ORIGIN: the @ts_x_origin is set.
|
||||
@GDK_GC_TS_Y_ORIGIN: the @ts_y_origin is set.
|
||||
@GDK_GC_CLIP_X_ORIGIN: the @clip_x_origin is set.
|
||||
@GDK_GC_CLIP_Y_ORIGIN: the @clip_y_origin is set.
|
||||
@GDK_GC_EXPOSURES: the @graphics_exposures is set.
|
||||
@GDK_GC_LINE_WIDTH: the @line_width is set.
|
||||
@GDK_GC_LINE_STYLE: the @line_style is set.
|
||||
@GDK_GC_CAP_STYLE: the @cap_style is set.
|
||||
@GDK_GC_JOIN_STYLE: the @join_style is set.
|
||||
|
||||
<!-- ##### ENUM GdkFunction ##### -->
|
||||
<para>
|
||||
Determines how the bit values for the source pixels are combined with
|
||||
the bit values for destination pixels to produce the final result. The
|
||||
sixteen values here correspond to the 16 different possible 2x2 truth
|
||||
tables. Only a couple of these values are usually useful; for colored
|
||||
images, only %GDK_COPY, %GDK_XOR and %GDK_INVERT are generally
|
||||
useful. For bitmaps, %GDK_AND and %GDK_OR are also useful.
|
||||
</para>
|
||||
|
||||
@GDK_COPY: <literal>dst = src</literal>
|
||||
@GDK_INVERT: <literal>dst = NOT dst</literal>
|
||||
@GDK_XOR: <literal>dst = src XOR dst</literal>
|
||||
@GDK_CLEAR: <literal>dst = 0</literal>
|
||||
@GDK_AND: <literal>dst = dst AND src</literal>
|
||||
@GDK_AND_REVERSE: <literal>dst = src AND (NOT dst)</literal>
|
||||
@GDK_AND_INVERT: <literal>dst = (NOT src) AND dst</literal>
|
||||
@GDK_NOOP: <literal>dst = dst</literal>
|
||||
@GDK_OR: <literal>dst = src OR dst</literal>
|
||||
@GDK_EQUIV: <literal>dst = (NOT src) XOR dst</literal>
|
||||
@GDK_OR_REVERSE: <literal>dst = src OR (NOT dst)</literal>
|
||||
@GDK_COPY_INVERT: <literal>dst = NOT src</literal>
|
||||
@GDK_OR_INVERT: <literal>dst = (NOT src) OR dst</literal>
|
||||
@GDK_NAND: <literal>dst = (NOT src) OR (NOT dst)</literal>
|
||||
@GDK_NOR: <literal>dst = (NOT src) AND (NOT dst)</literal>
|
||||
@GDK_SET: <literal>dst = 1</literal>
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_new ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_new_with_values ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@values:
|
||||
@values_mask:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_gc_destroy ##### -->
|
||||
<para>
|
||||
This function is obsolete and should not be used.
|
||||
</para>
|
||||
|
||||
@Deprecated: Use g_object_unref() instead
|
||||
<!-- # Unused Parameters # -->
|
||||
@gc: a #GdkGC.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_values ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@values:
|
||||
@values_mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_get_values ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@values:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_foreground ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_background ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_rgb_fg_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_rgb_bg_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_font ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@font:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_function ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@function:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_fill ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@fill:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkFill ##### -->
|
||||
<para>
|
||||
Determines how primitives are drawn.
|
||||
</para>
|
||||
|
||||
@GDK_SOLID: draw with the foreground color.
|
||||
@GDK_TILED: draw with a tiled pixmap.
|
||||
@GDK_STIPPLED: draw using the stipple bitmap. Pixels corresponding
|
||||
to bits in the stipple bitmap that are set will be drawn in the
|
||||
foreground color; pixels corresponding to bits that are
|
||||
not set will be left untouched.
|
||||
@GDK_OPAQUE_STIPPLED: draw using the stipple bitmap. Pixels corresponding
|
||||
to bits in the stipple bitmap that are set will be drawn in the
|
||||
foreground color; pixels corresponding to bits that are
|
||||
not set will be drawn with the background color.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_tile ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@tile:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_stipple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@stipple:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_ts_origin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_origin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_rectangle ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@rectangle:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@region:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_subwindow ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@mode:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkSubwindowMode ##### -->
|
||||
<para>
|
||||
Determines how drawing onto a window will affect child
|
||||
windows of that window.
|
||||
</para>
|
||||
|
||||
@GDK_CLIP_BY_CHILDREN: only draw onto the window itself.
|
||||
@GDK_INCLUDE_INFERIORS: draw onto the window and child windows.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_exposures ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@exposures:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_line_attributes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@line_width:
|
||||
@line_style:
|
||||
@cap_style:
|
||||
@join_style:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkLineStyle ##### -->
|
||||
<para>
|
||||
Determines how lines are drawn.
|
||||
</para>
|
||||
|
||||
@GDK_LINE_SOLID: lines are drawn solid.
|
||||
@GDK_LINE_ON_OFF_DASH: even segments are drawn; odd segments are not drawn.
|
||||
@GDK_LINE_DOUBLE_DASH: even segments are normally. Odd segments are drawn
|
||||
in the background color if the fill style is %GDK_SOLID, or in the background
|
||||
color masked by the stipple if the fill style is %GDK_STIPPLED.
|
||||
|
||||
<!-- ##### ENUM GdkCapStyle ##### -->
|
||||
<para>
|
||||
Determines how the end of lines are drawn.
|
||||
</para>
|
||||
|
||||
@GDK_CAP_NOT_LAST: the same as %GDK_CAP_BUTT for lines of non-zero width.
|
||||
for zero width lines, the final point on the line will not be drawn.
|
||||
@GDK_CAP_BUTT: the ends of the lines are drawn squared off and extending
|
||||
to the coordinates of the end point.
|
||||
@GDK_CAP_ROUND: the ends of the lines are drawn as semicircles with the
|
||||
diameter equal to the line width and centered at the end point.
|
||||
@GDK_CAP_PROJECTING: the ends of the lines are drawn squared off and extending
|
||||
half the width of the line beyond the end point.
|
||||
|
||||
<!-- ##### ENUM GdkJoinStyle ##### -->
|
||||
<para>
|
||||
Determines how the joins between segments of a polygon are drawn.
|
||||
</para>
|
||||
|
||||
@GDK_JOIN_MITER: the sides of each line are extended to meet at an angle.
|
||||
@GDK_JOIN_ROUND: the sides of the two lines are joined by a circular arc.
|
||||
@GDK_JOIN_BEVEL: the sides of the two lines are joined by a straight line which
|
||||
makes an equal angle with each line.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_dashes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@dash_offset:
|
||||
@dash_list:
|
||||
@n:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dst_gc:
|
||||
@src_gc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_get_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_offset ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@x_offset:
|
||||
@y_offset:
|
||||
|
||||
|
||||
978
docs/reference/gdk/tmpl/gdk-unused.sgml
Normal file
978
docs/reference/gdk/tmpl/gdk-unused.sgml
Normal file
@@ -0,0 +1,978 @@
|
||||
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
The #GdkColorContext type is used for allocating groups of colors.
|
||||
</para>
|
||||
<para>
|
||||
It is now deprecated in favor of the gdk_colormap_*() functions described in
|
||||
the <link linkend="gdk-Colormaps-and-Colors">Colormaps and Colors</link>
|
||||
section.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/color_contexts.sgml:See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Short_Description ##### -->
|
||||
routines for allocating colors (deprecated).
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Title ##### -->
|
||||
Color Contexts
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
A #GdkIC input context is used for each user interface element which supports
|
||||
internationalized text input. See the
|
||||
<link linkend="gdk-Input-Methods">Input Methods</link> section for an overview
|
||||
of how internationalized text input works in GTK+.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_contexts.sgml:See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Short_Description ##### -->
|
||||
internationalized text input properties.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Title ##### -->
|
||||
Input Contexts
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_methods.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
Input Methods provide a way for complex character sets to be used in GTK+.
|
||||
Languages such as Chinese, Japanese, and Korean (often abbreviated to CJK)
|
||||
use a large number of ideographs, making it impossible to support all
|
||||
characters with a simple keyboard. Instead, text is usually
|
||||
<emphasis>pre-edited</emphasis> using a phonetic alphabet and then
|
||||
<emphasis>composed</emphasis> to form the ideographs.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ makes use of the input method mechanism provided by the X Windows
|
||||
platform. When a GTK+ application is started, it opens a connection to the
|
||||
input method appropriate for the current locale (if any).
|
||||
</para>
|
||||
<para>
|
||||
Widgets which handle textual input, such as #GtkEntry, need to do a number of
|
||||
things to support internationalized text input:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>When the widget is realized:</term>
|
||||
<listitem><para>Check if an input method is being used with gdk_im_ready().
|
||||
If it is, create a new <link linkend="gdk-Input-Contexts">Input Context</link>
|
||||
using gdk_ic_new(). Find out which events the
|
||||
<link linkend="gdk-Input-Contexts">Input Context</link> needs to receive
|
||||
with gdk_ic_get_events(), and make sure that the widget's window receives
|
||||
these events using gdk_window_set_events().
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget's size, state or cursor position changes:</term>
|
||||
<listitem><para>
|
||||
Update the appropriate
|
||||
<link linkend="gdk-Input-Contexts">Input Context</link> attributes
|
||||
using gdk_ic_set_attr().
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the keyboard focus enters or leaves the widget:</term>
|
||||
<listitem><para>
|
||||
Call gdk_im_begin() or gdk_im_end() to start or finish editing the text.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget receives a key_press event:</term>
|
||||
<listitem><para>
|
||||
The <structfield>string</structfield> and <structfield>length</structfield>
|
||||
fields of the #GdkEventKey struct should be used to insert the composed text
|
||||
into the widget.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget is unrealized:</term>
|
||||
<listitem><para>
|
||||
Destroy the <link linkend="gdk-Input-Contexts">Input Context</link>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
<para>
|
||||
See the XLib reference manual for more detailed information on input methods,
|
||||
and the #GtkEntry and #GtkText widgets for some example code.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_methods.sgml:See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-Input-Contexts">Input Contexts</link></term>
|
||||
<listitem><para>
|
||||
Used for each widget that handles internationalized text input using the
|
||||
global input method.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_methods.sgml:Short_Description ##### -->
|
||||
support for internationalized text input.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_methods.sgml:Title ##### -->
|
||||
Input Methods
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_CORE_POINTER ##### -->
|
||||
<para>
|
||||
This macro contains an integer value representing
|
||||
the device ID for the core pointer device.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_GC_X11 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@object:
|
||||
|
||||
<!-- ##### MACRO GDK_GC_X11_GET_CLASS ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@obj:
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_FB ##### -->
|
||||
<para>
|
||||
This macro is defined if GDK is configured to use the Linux framebuffer backend.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_NANOX ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkColorContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@num_colors:
|
||||
@max_colors:
|
||||
@num_allocated:
|
||||
@mode:
|
||||
@need_to_free_colormap:
|
||||
@std_cmap_atom:
|
||||
@clut:
|
||||
@cmap:
|
||||
@color_hash:
|
||||
@palette:
|
||||
@num_palette:
|
||||
@fast_dither:
|
||||
|
||||
<!-- ##### STRUCT GdkColorContextDither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@fast_rgb:
|
||||
@fast_err:
|
||||
@fast_erg:
|
||||
@fast_erb:
|
||||
|
||||
<!-- ##### ENUM GdkColorContextMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_CC_MODE_UNDEFINED:
|
||||
@GDK_CC_MODE_BW:
|
||||
@GDK_CC_MODE_STD_CMAP:
|
||||
@GDK_CC_MODE_TRUE:
|
||||
@GDK_CC_MODE_MY_GRAY:
|
||||
@GDK_CC_MODE_PALETTE:
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceInfo ##### -->
|
||||
<para>
|
||||
The #GdkDeviceInfo structure contains information about a
|
||||
device. It has the following fields:
|
||||
</para>
|
||||
|
||||
@deviceid: a unique integer ID for this device.
|
||||
@name: the human-readable name for the device.
|
||||
@source: the type of device.
|
||||
@mode: a value indicating whether the device is enabled and
|
||||
how the device coordinates map to the screen.
|
||||
@has_cursor: if %TRUE, a cursor will be displayed indicating
|
||||
the current on-screen location to the user. Otherwise,
|
||||
the application is responsible for drawing a cursor
|
||||
itself.
|
||||
@num_axes: the number of axes for this device.
|
||||
@axes: a pointer to an array of GdkAxisUse values which
|
||||
give the mapping of axes onto the possible valuators
|
||||
for a GDK device.
|
||||
@num_keys: the number of macro buttons.
|
||||
@keys: a pointer to an array of #GdkDeviceKey structures
|
||||
which describe what key press events are generated
|
||||
for each macro button.
|
||||
|
||||
<!-- ##### STRUCT GdkDrawableClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkGCClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkIC ##### -->
|
||||
<para>
|
||||
The #GdkIC struct is an opaque structure representing an input context
|
||||
for use with the global <link linkend="gdk-Input-Methods">Input Method</link>.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkICAttr ##### -->
|
||||
<para>
|
||||
The #GdkICAttr struct is used when getting and setting attributes of the
|
||||
input context. It is used together with a #GdkICAttributesType mask which
|
||||
specifies which of the fields are being set or returned.
|
||||
</para>
|
||||
|
||||
@style: the pre-edit and status style. This attribute is required when
|
||||
creating the #GdkIC, and cannot be changed.
|
||||
@client_window: the #GdkWindow in which the input method will display its
|
||||
pre-edit and status areas or create subwindows.
|
||||
The preedit_area and status_area attributes are specified relative to this
|
||||
window. This attribute is required when creating the #GdkIC, and cannot be
|
||||
changed.
|
||||
@focus_window: the #GdkWindow which is to be used when editing text.
|
||||
gdk_im_begin() sets this attribute before starting the text input process,
|
||||
so it is normally not necessary to set it elsewhere.
|
||||
@filter_events: the mask of events that the input method requires.
|
||||
See the gdk_ic_get_events() function. This attribute is read-only and is
|
||||
never changed.
|
||||
@spot_location: the position of the insertion cursor, for use with the
|
||||
%GDK_IM_PREEDIT_POSITION style. The y coordinate specifies the baseline of
|
||||
the text.
|
||||
@line_spacing: the line spacing to be used in the pre-edit and status areas
|
||||
when displaying multi-line text.
|
||||
@cursor: the cursor to use in the input method's windows.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_fontset: the font to use for the pre-edit area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_area: the area in which the input method will display pre-editing
|
||||
data, used for the %GDK_IM_PREEDIT_POSITION and %GDK_IM_PREEDIT_AREA styles.
|
||||
@preedit_area_needed: the area that the input method requests for displaying
|
||||
pre-editing data, used for the %GDK_IM_PREEDIT_POSITION and
|
||||
%GDK_IM_PREEDIT_AREA styles.
|
||||
@preedit_foreground: the foreground color to use for the pre-edit area.
|
||||
This color must already be allocated in the preedit_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_background: the background color to use for the pre-edit area.
|
||||
This color must already be allocated in the preedit_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_pixmap: the background pixmap to use for the pre-edit area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_colormap: the colormap the input method should use to allocate colors.
|
||||
The default value is the colormap of client_window.
|
||||
@status_fontset: the font to use for the status area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_area: the are that the input method will display status information in.
|
||||
This is used for the %GDK_IM_STATUS_AREA style.
|
||||
@status_area_needed: the size that the input method requests for displaying
|
||||
status information, for the %GDK_IM_STATUS_AREA style.
|
||||
@status_foreground: the foreground color to use for the status area.
|
||||
This color must already be allocated in the status_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_background: the background color to use for the status area.
|
||||
This color must already be allocated in the status_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_pixmap: the background pixmap to use for the status area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_colormap: the colormap the input method should use to allocate colors.
|
||||
The default value is the colormap of client_window.
|
||||
|
||||
<!-- ##### ENUM GdkICAttributesType ##### -->
|
||||
<para>
|
||||
The #GdkICAttributesType contains a set of bit-flags which are used to
|
||||
specify which of the attributes in a #GdkICAttr are being set or returned.
|
||||
</para>
|
||||
<para>
|
||||
It also contains several combinations of the flags which specify required
|
||||
attributes for the various styles:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_ALL_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of attributes required for all styles.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_PREEDIT_AREA_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_PREEDIT_AREA pre-edit style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_PREEDIT_POSITION_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_PREEDIT_POSITION pre-edit style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_STATUS_AREA_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_STATUS_AREA status style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
@GDK_IC_STYLE:
|
||||
@GDK_IC_CLIENT_WINDOW:
|
||||
@GDK_IC_FOCUS_WINDOW:
|
||||
@GDK_IC_FILTER_EVENTS:
|
||||
@GDK_IC_SPOT_LOCATION:
|
||||
@GDK_IC_LINE_SPACING:
|
||||
@GDK_IC_CURSOR:
|
||||
@GDK_IC_PREEDIT_FONTSET:
|
||||
@GDK_IC_PREEDIT_AREA:
|
||||
@GDK_IC_PREEDIT_AREA_NEEDED:
|
||||
@GDK_IC_PREEDIT_FOREGROUND:
|
||||
@GDK_IC_PREEDIT_BACKGROUND:
|
||||
@GDK_IC_PREEDIT_PIXMAP:
|
||||
@GDK_IC_PREEDIT_COLORMAP:
|
||||
@GDK_IC_STATUS_FONTSET:
|
||||
@GDK_IC_STATUS_AREA:
|
||||
@GDK_IC_STATUS_AREA_NEEDED:
|
||||
@GDK_IC_STATUS_FOREGROUND:
|
||||
@GDK_IC_STATUS_BACKGROUND:
|
||||
@GDK_IC_STATUS_PIXMAP:
|
||||
@GDK_IC_STATUS_COLORMAP:
|
||||
@GDK_IC_ALL_REQ:
|
||||
@GDK_IC_PREEDIT_AREA_REQ:
|
||||
@GDK_IC_PREEDIT_POSITION_REQ:
|
||||
@GDK_IC_STATUS_AREA_REQ:
|
||||
|
||||
<!-- ##### ENUM GdkIMStyle ##### -->
|
||||
<para>
|
||||
A set of bit-flags used to specify the input method styles which are supported
|
||||
or which are currently in use. The flags can be divided into 2 groups, the
|
||||
pre-edit flags and the status flags.
|
||||
</para>
|
||||
<para>
|
||||
The pre-edit flags specify how pre-editing data is displayed.
|
||||
For example, this could display the text being typed in the phonetic
|
||||
alphabet before it is composed and inserted as an ideograph.
|
||||
</para>
|
||||
<para>
|
||||
The status flags specify how status information is displayed.
|
||||
The status information can be thought of as an extension of the
|
||||
standard keyboard mode indicators, such as the Caps Lock indicator.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The %GDK_IM_PREEDIT_CALLBACKS and %GDK_IM_STATUS_CALLBACKS styles are not
|
||||
currently supported in GTK+.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@GDK_IM_PREEDIT_AREA: The application provides the input method with an area
|
||||
in which to perform <emphasis>off-the-spot</emphasis> pre-editing.
|
||||
@GDK_IM_PREEDIT_CALLBACKS: The application registers a number of callback
|
||||
functions which are used to display pre-editing data.
|
||||
@GDK_IM_PREEDIT_POSITION: The application provides the input method with the
|
||||
position of the insertion cursor, for <emphasis>over-the-spot</emphasis>
|
||||
pre-editing. The input method creates its own window over the widget to
|
||||
display the pre-editing data.
|
||||
@GDK_IM_PREEDIT_NOTHING: The input method uses the root X window to perform
|
||||
pre-editing, so the application does not need to do anything.
|
||||
@GDK_IM_PREEDIT_NONE: No pre-editing is done by the input method, or no
|
||||
pre-editing data needs to be displayed.
|
||||
@GDK_IM_PREEDIT_MASK: A bit-mask containing all the pre-edit flags.
|
||||
@GDK_IM_STATUS_AREA: The application provides the input method with an area
|
||||
in which to display status information.
|
||||
@GDK_IM_STATUS_CALLBACKS: The applications registers a number of callback
|
||||
functions which are used to display status information.
|
||||
@GDK_IM_STATUS_NOTHING: The input method uses the root X window to display
|
||||
status information, so the application does not need to do anything.
|
||||
@GDK_IM_STATUS_NONE: The input method does not display status information.
|
||||
@GDK_IM_STATUS_MASK: A bit-mask containing all the status flags.
|
||||
|
||||
<!-- ##### STRUCT GdkKeyInfo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keycode:
|
||||
@group:
|
||||
@level:
|
||||
|
||||
<!-- ##### STRUCT GdkKeymapClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPixbufAlphaMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_ALPHA_BILEVEL:
|
||||
@GDK_PIXBUF_ALPHA_FULL:
|
||||
|
||||
<!-- ##### STRUCT GdkWindowRedirect ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_add_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@palette:
|
||||
@num_palette:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_free_dither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_index_from_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixel_from_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@reds:
|
||||
@greens:
|
||||
@blues:
|
||||
@ncolors:
|
||||
@colors:
|
||||
@nallocated:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixels_incremental ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@reds:
|
||||
@greens:
|
||||
@blues:
|
||||
@ncolors:
|
||||
@used:
|
||||
@colors:
|
||||
@nallocated:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_init_dither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_new_mono ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_query_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_query_colors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@colors:
|
||||
@num_colors:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### VARIABLE gdk_core_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_display_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_sm_client_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@sm_client_id:
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_full_name_free ##### -->
|
||||
<para>
|
||||
Frees a full font name obtained from gdk_font_full_name_get().
|
||||
</para>
|
||||
|
||||
@name: a full font name.
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_full_name_get ##### -->
|
||||
<para>
|
||||
Returns a comma-separated list of XLFDs for the
|
||||
fonts making up a given #GdkFont.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@Returns: a newly-allocated string containing a list of XLFDs,
|
||||
should be freed with gdk_font_full_name_free() when no longer needed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_client_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dpy:
|
||||
@win:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_default_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_destroy ##### -->
|
||||
<para>
|
||||
Destroys the given #GdkICAttr struct, freeing the allocated memory.
|
||||
</para>
|
||||
|
||||
@attr: a #GdkICAttr struct.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkICAttr struct, with all fields set to 0.
|
||||
The #GdkICAttr struct should be freed with gdk_ic_attr_destroy() when no
|
||||
longer needed.
|
||||
</para>
|
||||
|
||||
@Returns: a new #GdkICAttr struct.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_destroy ##### -->
|
||||
<para>
|
||||
Destroys the input context.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_attr ##### -->
|
||||
<para>
|
||||
Gets attributes of a #GdkIC.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@attr: a #GdkICAttr struct to contain the returned attributes.
|
||||
@mask: a #GdkICAttributesType mask specifying which attributes to get.
|
||||
@Returns: a #GdkICAttributesType mask specifying which of the attributes
|
||||
were not retrieved succesfully.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_events ##### -->
|
||||
<para>
|
||||
Returns the mask of events that the input method needs to function properly.
|
||||
This is typically called in a widget's realize method after creating the
|
||||
#GdkIC. The returned event mask is then combined with the widget's
|
||||
own event mask and applied using gdk_window_set_events().
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@Returns: the mask of events that the input method needs to function
|
||||
properly.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_style ##### -->
|
||||
<para>
|
||||
Returns the pre-edit and status style of the #GdkIC.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@Returns: the pre-edit and status style of the #GdkIC.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkIC using the given attributes.
|
||||
</para>
|
||||
|
||||
@attr: a #GdkICAttr struct containing attributes to use for the input context.
|
||||
@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr
|
||||
are set.
|
||||
@Returns: a new #GdkIC.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_set_attr ##### -->
|
||||
<para>
|
||||
Sets attributes of the #GdkIC.
|
||||
</para>
|
||||
<para>
|
||||
Note that the GDK_IC_STYLE and GDK_IC_CLIENT_WINDOW attributes can only be set
|
||||
when creating the #GdkIC, and the GDK_IC_FILTER_EVENTS attribute is read-only.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@attr: a #GdkICAttr struct containing attributes to use for the input context.
|
||||
@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr
|
||||
are set.
|
||||
@Returns: a #GdkICAttributesType mask indicating which of the attributes
|
||||
were not set successfully.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_begin ##### -->
|
||||
<para>
|
||||
Starts editing, using the given input context and #GdkWindow.
|
||||
This should be called when the widget receives the input focus, typically in
|
||||
the widget's focus_in_event method.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@window: the #GdkWindow which will be receiving the key press events.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_decide_style ##### -->
|
||||
<para>
|
||||
Decides which input method style should be used, by comparing the styles given
|
||||
in @supported_style with those of the available input method.
|
||||
</para>
|
||||
|
||||
@supported_style: styles which are supported by the widget.
|
||||
@Returns: the best style in @supported_style that is also supported by the
|
||||
available input method.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_end ##### -->
|
||||
<para>
|
||||
Stops editing using the input method.
|
||||
This should be called when the widget loses the input focus, typically in
|
||||
the widget's focus_out_event method.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_ready ##### -->
|
||||
<para>
|
||||
Checks if an input method is to be used for the current locale.
|
||||
If GTK+ has been compiled without support for input methods, or the current
|
||||
locale doesn't need an input method, then this will return FALSE.
|
||||
</para>
|
||||
|
||||
@Returns: TRUE if an input method is available and should be used.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_set_best_style ##### -->
|
||||
<para>
|
||||
Sets the best pre-edit and/or status style which should be used.
|
||||
This will affect the style chosen in gdk_im_decide_style().
|
||||
</para>
|
||||
<para>
|
||||
The order of the pre-edit styles is (from worst to best):
|
||||
%GDK_IM_PREEDIT_NONE, %GDK_IM_PREEDIT_NOTHING, %GDK_IM_PREEDIT_AREA,
|
||||
%GDK_IM_PREEDIT_POSITION, %GDK_IM_PREEDIT_CALLBACKS.
|
||||
The order of the status styles is:
|
||||
%GDK_IM_STATUS_NONE, %GDK_IM_STATUS_NOTHING, %GDK_IM_STATUS_AREA,
|
||||
%GDK_IM_STATUS_CALLBACKS.
|
||||
</para>
|
||||
<para>
|
||||
So, for example, to set the best allowed pre-edit style to %GDK_IM_PREEDIT_AREA
|
||||
you would do this:
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_AREA);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
Or to set the best allowed pre-edit style to %GDK_IM_PREEDIT_POSITION and the
|
||||
best allowed status style to %GDK_IM_STATUS_NOTHING you can do this:
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NOTHING);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
@best_allowed_style: a bit-mask with the best pre-edit style and/or the best
|
||||
status style to use. If 0 is used, then the current bit-mask of all allowed
|
||||
styles is returned.
|
||||
@Returns: a bit-mask of all the styles allowed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_list_devices ##### -->
|
||||
<para>
|
||||
Lists all available input devices, along with their
|
||||
configuration information.
|
||||
</para>
|
||||
|
||||
@Returns: A #GList of #GdkDeviceInfo structures. This list
|
||||
is internal data of GTK+ and should not be modified
|
||||
or freed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_motion_events ##### -->
|
||||
<para>
|
||||
Retrieves the motion history for a given device/window pair.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@deviceid: the device for which to retrieve motion history.
|
||||
@start: the start time.
|
||||
@stop: the stop time.
|
||||
@nevents_return: location to store the number of events returned.
|
||||
@Returns: a newly allocated array containing all the events
|
||||
from @start to @stop. This array should be freed
|
||||
with g_free() when you are finished using it.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_axes ##### -->
|
||||
<para>
|
||||
Sets the mapping of the axes (valuators) of a device
|
||||
onto the predefined valuator types that GTK+ understands.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@axes: an array of GdkAxisUse. This length of this array
|
||||
must match the number of axes for the device.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_key ##### -->
|
||||
<para>
|
||||
Sets the key event generated when a macro button is pressed.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@index_: the index of the macro button.
|
||||
@keyval: the key value for the #GdkKeypressEvent to generate.
|
||||
(a value of 0 means no event will be generated.)
|
||||
@modifiers: the modifier field for the generated
|
||||
#GdkKeyPressEvent.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_mode ##### -->
|
||||
<para>
|
||||
Enables or disables a device, and determines how the
|
||||
device maps onto the screen.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@mode: the new mode.
|
||||
@Returns: %TRUE if the device supports the given mode, otherwise
|
||||
%FALSE and the device's mode is unchanged.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_source ##### -->
|
||||
<para>
|
||||
Sets the source type for a device.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure
|
||||
@source: the new source type.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_window_get_pointer ##### -->
|
||||
<para>
|
||||
Returns information about the current position of the pointer
|
||||
within a window, including extended device information.
|
||||
Any of the return parameters may be %NULL, in which case,
|
||||
they will be ignored.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@deviceid: a device ID.
|
||||
@x: location to store current x postion.
|
||||
@y: location to store current y postion.
|
||||
@pressure: location to store current pressure.
|
||||
@xtilt: location to store current tilt in the x direction.
|
||||
@ytilt: location to store current tilt in the y direction.
|
||||
@mask: location to store the current modifier state.
|
||||
|
||||
<!-- ##### VARIABLE gdk_leader_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_open_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_name:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_set_as_cairo_source ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@cr:
|
||||
@pixbuf_x:
|
||||
@pixbuf_y:
|
||||
|
||||
<!-- ##### VARIABLE gdk_progclass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_close ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_window_at_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@win_x:
|
||||
@win_y:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_use_virtual_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### VARIABLE gdk_selection_property ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
<!-- ##### FUNCTION gdkx_visual_get_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@xvisualid:
|
||||
@Returns:
|
||||
|
||||
110
docs/reference/gdk/tmpl/gdkapplaunchcontext.sgml
Normal file
110
docs/reference/gdk/tmpl/gdkapplaunchcontext.sgml
Normal file
@@ -0,0 +1,110 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Application launching
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Startup notification for applications
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
GdkAppLaunchContext is an implementation of #GAppLaunchContext that
|
||||
handles launching an application in a graphical context. It provides
|
||||
startup notification and allows to launch applications on a specific
|
||||
screen or workspace.
|
||||
</para>
|
||||
<example>
|
||||
<title>Launching an application</title>
|
||||
<programlisting>
|
||||
GdkAppLaunchContext *context;
|
||||
|
||||
context = gdk_app_launch_context_new (<!-- -->);
|
||||
|
||||
gdk_app_launch_context_set_screen (my_screen);
|
||||
gdk_app_launch_context_set_timestamp (event->time);
|
||||
|
||||
if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error))
|
||||
g_warning ("Launching failed: %s\n", error->message);
|
||||
|
||||
g_object_unref (context);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkAppLaunchContext ##### -->
|
||||
<para>
|
||||
An opaque structure representing an application launch context.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_desktop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@desktop:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_timestamp ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@timestamp:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_icon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@icon:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@icon_name:
|
||||
|
||||
|
||||
411
docs/reference/gdk/tmpl/gdkdisplay.sgml
Normal file
411
docs/reference/gdk/tmpl/gdkdisplay.sgml
Normal file
@@ -0,0 +1,411 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkDisplay
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Controls the keyboard/mouse pointer grabs and a set of <type>GdkScreen</type>s
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GdkDisplay objects purpose are two fold:
|
||||
<itemizedlist>
|
||||
<listitem><para>To grab/ungrab keyboard focus and mouse pointer</para></listitem>
|
||||
<listitem><para>To manage and provide information about the #GdkScreen(s)
|
||||
available for this #GdkDisplay
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
#GdkDisplay objects are the GDK representation of the X Display which can be
|
||||
described as <emphasis>a workstation consisting of a keyboard a pointing
|
||||
device (such as a mouse) and one or more screens</emphasis>.
|
||||
It is used to open and keep track of various #GdkScreen objects currently
|
||||
instanciated by the application. It is also used to grab and release the keyboard
|
||||
and the mouse pointer.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplay ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplay</structname> struct is the GDK representation
|
||||
of an X display. All its fields are private and should not be accessed directly.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkDisplay::closed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkdisplay: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_open ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_n_screens ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_pointer_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_keyboard_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_pointer_is_grabbed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_beep ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_sync ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_flush ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_close ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_list_devices ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_peek_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_put_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_add_client_message_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@message_type:
|
||||
@func:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_double_click_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@msec:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_double_click_distance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@distance:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_window_at_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@win_x:
|
||||
@win_y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayPointerHooks ##### -->
|
||||
<para>
|
||||
A table of pointers to functions for getting quantities related to
|
||||
the current pointer position. Each #GdkDisplay has a table of this type,
|
||||
which can be set using gdk_display_set_pointer_hooks().
|
||||
</para>
|
||||
<para>
|
||||
This is only useful for such low-level tools as an event recorder.
|
||||
Applications should never have any reason to use this facility
|
||||
</para>
|
||||
|
||||
@get_pointer: Obtains the current pointer position and modifier state.
|
||||
The position is given in coordinates relative to the window containing
|
||||
the pointer, which is returned in @window.
|
||||
@window_get_pointer: Obtains the window underneath the mouse pointer.
|
||||
Current pointer position and modifier state are returned in @x, @y and
|
||||
@mask. The position is given in coordinates relative to @window.
|
||||
@window_at_pointer: Obtains the window underneath the mouse pointer,
|
||||
returning the location of that window in @win_x, @win_y. Returns %NULL
|
||||
if the window under the mouse pointer is not known to GDK (for example,
|
||||
belongs to another application).
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_pointer_hooks ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@new_hooks:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_warp_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_cursor_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_cursor_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_cursor_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_maximal_cursor_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_selection_notification ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_request_selection_notification ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@selection:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_clipboard_persistence ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_store_clipboard ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@clipboard_window:
|
||||
@time_:
|
||||
@targets:
|
||||
@n_targets:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_shapes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_input_shapes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_composite ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
90
docs/reference/gdk/tmpl/gdkdisplaymanager.sgml
Normal file
90
docs/reference/gdk/tmpl/gdkdisplaymanager.sgml
Normal file
@@ -0,0 +1,90 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkDisplayManager
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Maintains a list of all open <type>GdkDisplay</type>s
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The purpose of the #GdkDisplayManager singleton object is to offer
|
||||
notification when displays appear or disappear or the default display
|
||||
changes.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayManager ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplayManager</structname> struct has no interesting
|
||||
fields.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkDisplayManager::display-opened ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkdisplaymanager: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### ARG GdkDisplayManager:default-display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_get_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_set_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_list_displays ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_core_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
451
docs/reference/gdk/tmpl/gdkscreen.sgml
Normal file
451
docs/reference/gdk/tmpl/gdkscreen.sgml
Normal file
@@ -0,0 +1,451 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkScreen
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Object representing a physical screen
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GdkScreen objects are the GDK representation of a physical screen. It is used
|
||||
throughout GDK and GTK+ to specify which screen the top level windows
|
||||
are to be displayed on.
|
||||
It is also used to query the screen specification and default settings such as
|
||||
the default colormap (gdk_screen_get_default_colormap()),
|
||||
the screen width (gdk_screen_get_width()), etc.
|
||||
</para>
|
||||
<para>Note that a screen may consist of multiple monitors which are merged to
|
||||
form a large screen area.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkScreen ##### -->
|
||||
<para>
|
||||
This is a currently just a placeholder typedef for the first argument of
|
||||
the @window_at_pointer function in #GdkPointerHooks. It will be used
|
||||
when GDK gets multihead support.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkScreen::composited-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkscreen: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkScreen::monitors-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkscreen: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkScreen::size-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkscreen: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GdkScreen:font-options ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkScreen:resolution ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_default_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_set_default_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_system_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_system_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgb_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgb_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgba_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgba_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_is_composited ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_root_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_number ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_width_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_height_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_list_visuals ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_toplevel_windows ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_make_display_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_n_monitors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_primary_monitor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_geometry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@dest:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_at_point ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_at_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_height_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_width_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_plug_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_broadcast_client_message ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_setting ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@name:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_font_options ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_set_font_options ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@options:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_resolution ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_set_resolution ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@dpi:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_active_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_window_stack ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_on_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@working_directory:
|
||||
@argv:
|
||||
@envp:
|
||||
@flags:
|
||||
@child_setup:
|
||||
@user_data:
|
||||
@child_pid:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_on_screen_with_pipes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@working_directory:
|
||||
@argv:
|
||||
@envp:
|
||||
@flags:
|
||||
@child_setup:
|
||||
@user_data:
|
||||
@child_pid:
|
||||
@standard_input:
|
||||
@standard_output:
|
||||
@standard_error:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_command_line_on_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@command_line:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
59
docs/reference/gdk/tmpl/gdktesting.sgml
Normal file
59
docs/reference/gdk/tmpl/gdktesting.sgml
Normal file
@@ -0,0 +1,59 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Testing
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Test utilities
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section are intended to be used in test programs.
|
||||
They allow to simulate some user input.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_test_render_sync ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_test_simulate_button ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@button:
|
||||
@modifiers:
|
||||
@button_pressrelease:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_test_simulate_key ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@keyval:
|
||||
@modifiers:
|
||||
@key_pressrelease:
|
||||
@Returns:
|
||||
|
||||
|
||||
420
docs/reference/gdk/tmpl/general.sgml
Normal file
420
docs/reference/gdk/tmpl/general.sgml
Normal file
@@ -0,0 +1,420 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
General
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Library initialization and miscellaneous functions
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
This section describes the GDK initialization functions and miscellaneous
|
||||
utility functions.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_init ##### -->
|
||||
<para>
|
||||
Initializes the GDK library and connects to the X server.
|
||||
If initialization fails, a warning message is output and the application
|
||||
terminates with a call to <literal>exit(1)</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Any arguments used by GDK are removed from the array and @argc and @argv are
|
||||
updated accordingly.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
||||
by GTK+ applications.
|
||||
</para>
|
||||
|
||||
@argc: the number of command line arguments.
|
||||
@argv: the array of command line arguments.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_init_check ##### -->
|
||||
<para>
|
||||
Initializes the GDK library and connects to the X server, returning %TRUE on
|
||||
success.
|
||||
</para>
|
||||
<para>
|
||||
Any arguments used by GDK are removed from the array and @argc and @argv are
|
||||
updated accordingly.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
||||
by GTK+ applications.
|
||||
</para>
|
||||
|
||||
@argc: the number of command line arguments.
|
||||
@argv: the array of command line arguments.
|
||||
@Returns: %TRUE if initialization succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_parse_args ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_display_arg_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_locale ##### -->
|
||||
<para>
|
||||
Initializes the support for internationalization by calling the <function>setlocale()</function>
|
||||
system call. This function is called by gtk_set_locale() and so GTK+
|
||||
applications should use that instead.
|
||||
</para>
|
||||
<para>
|
||||
The locale to use is determined by the <envar>LANG</envar> environment variable,
|
||||
so to run an application in a certain locale you can do something like this:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
export LANG="fr"
|
||||
... run application ...
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
If the locale is not supported by X then it is reset to the standard "C"
|
||||
locale.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the resulting locale.
|
||||
@Deprecated:2.24: Use setlocale() directly
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_sm_client_id ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@sm_client_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_exit ##### -->
|
||||
<para>
|
||||
Exits the application using the <function>exit()</function> system call.
|
||||
</para>
|
||||
<para>
|
||||
This routine is provided mainly for backwards compatibility, since it used to
|
||||
perform tasks necessary to exit the application cleanly. Those tasks are now
|
||||
performed in a function which is automatically called on exit (via the use
|
||||
of g_atexit()).
|
||||
</para>
|
||||
|
||||
@error_code: the error code to pass to the <function>exit()</function> call.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_notify_startup_complete ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_notify_startup_complete_with_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@startup_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_program_class ##### -->
|
||||
<para>
|
||||
Gets the program class. Unless the program class has explicitly
|
||||
been set with gdk_set_program_class() or with the <option>--class</option>
|
||||
commandline option, the default value is the program name (determined
|
||||
with g_get_prgname()) with the first character converted to uppercase.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the program class.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_program_class ##### -->
|
||||
<para>
|
||||
Sets the program class. The X11 backend uses the program class to set
|
||||
the class name part of the <literal>WM_CLASS</literal> property on
|
||||
toplevel windows; see the ICCCM.
|
||||
</para>
|
||||
|
||||
@program_class: a string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_display ##### -->
|
||||
<para>
|
||||
Gets the name of the display, which usually comes from the <envar>DISPLAY</envar>
|
||||
environment variable or the <option>--display</option> command line option.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the name of the display.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_flush ##### -->
|
||||
<para>
|
||||
Flushes the X output buffer and waits until all requests have been processed
|
||||
by the server. This is rarely needed by applications. It's main use is for
|
||||
trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width_mm ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height_mm ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_grab ##### -->
|
||||
<para>
|
||||
Grabs the pointer (usually a mouse) so that all events are passed to this
|
||||
application until the pointer is ungrabbed with gdk_pointer_ungrab(), or
|
||||
the grab window becomes unviewable.
|
||||
This overrides any previous pointer grab by this client.
|
||||
</para>
|
||||
<para>
|
||||
Pointer grabs are used for operations which need complete control over mouse
|
||||
events, even if the mouse leaves the application.
|
||||
For example in GTK+ it is used for Drag and Drop, for dragging the handle in
|
||||
the #GtkHPaned and #GtkVPaned widgets, and for resizing columns in #GtkCList
|
||||
widgets.
|
||||
</para>
|
||||
<para>
|
||||
Note that if the event mask of an X window has selected both button press and
|
||||
button release events, then a button press event will cause an automatic
|
||||
pointer grab until the button is released.
|
||||
X does this automatically since most applications expect to receive button
|
||||
press and release events in pairs.
|
||||
It is equivalent to a pointer grab on the window with @owner_events set to
|
||||
%TRUE.
|
||||
</para>
|
||||
<para>
|
||||
If you set up anything at the time you take the grab that needs to be cleaned
|
||||
up when the grab ends, you should handle the #GdkEventGrabBroken events that
|
||||
are emitted when the grab ends unvoluntarily.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow which will own the grab (the grab window).
|
||||
@owner_events: if %FALSE then all pointer events are reported with respect to
|
||||
@window and are only reported if selected by @event_mask. If %TRUE then pointer
|
||||
events for this application are reported as normal, but pointer events outside
|
||||
this application are reported with respect to @window and only if selected by
|
||||
@event_mask. In either mode, unreported events are discarded.
|
||||
@event_mask: specifies the event mask, which is used in accordance with
|
||||
@owner_events. Note that only pointer events (i.e. button and motion events)
|
||||
may be selected.
|
||||
@confine_to: If non-%NULL, the pointer will be confined to this
|
||||
window during the grab. If the pointer is outside @confine_to, it will
|
||||
automatically be moved to the closest edge of @confine_to and enter
|
||||
and leave events will be generated as necessary.
|
||||
@cursor: the cursor to display while the grab is active. If this is %NULL then
|
||||
the normal cursors are used for @window and its descendants, and the cursor
|
||||
for @window is used for all other windows.
|
||||
@time_: the timestamp of the event which led to this pointer grab. This usually
|
||||
comes from a #GdkEventButton struct, though %GDK_CURRENT_TIME can be used if
|
||||
the time isn't known.
|
||||
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkGrabStatus ##### -->
|
||||
<para>
|
||||
Returned by gdk_pointer_grab() and gdk_keyboard_grab() to indicate
|
||||
success or the reason for the failure of the grab attempt.
|
||||
</para>
|
||||
|
||||
@GDK_GRAB_SUCCESS: the resource was successfully grabbed.
|
||||
@GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client.
|
||||
@GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the
|
||||
specified time.
|
||||
@GDK_GRAB_NOT_VIEWABLE: the grab window or the @confine_to window are not
|
||||
viewable.
|
||||
@GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_is_grabbed ##### -->
|
||||
<para>
|
||||
</para>
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_double_click_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@msec:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_grab ##### -->
|
||||
<para>
|
||||
Grabs the keyboard so that all events are passed to this
|
||||
application until the keyboard is ungrabbed with gdk_keyboard_ungrab().
|
||||
This overrides any previous keyboard grab by this client.
|
||||
</para>
|
||||
<para>
|
||||
If you set up anything at the time you take the grab that needs to be cleaned
|
||||
up when the grab ends, you should handle the #GdkEventGrabBroken events that
|
||||
are emitted when the grab ends unvoluntarily.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow which will own the grab (the grab window).
|
||||
@owner_events: if %FALSE then all keyboard events are reported with respect to
|
||||
@window. If %TRUE then keyboard events for this application are reported as
|
||||
normal, but keyboard events outside this application are reported with respect
|
||||
to @window. Both key press and key release events are always reported,
|
||||
independant of the event mask set by the application.
|
||||
@time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_ungrab ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_beep ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_use_xshm ##### -->
|
||||
<para>
|
||||
Returns %TRUE if GDK will attempt to use the MIT-SHM shared memory extension.
|
||||
</para>
|
||||
<para>
|
||||
The shared memory extension is used for #GdkImage, and consequently for
|
||||
<link linkend="gdk-GdkRGB">GdkRGB</link>.
|
||||
It enables much faster drawing by communicating with the X server through
|
||||
SYSV shared memory calls. However, it can only be used if the X client and
|
||||
server are on the same machine and the server supports it.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: %TRUE if use of the MIT shared memory extension will be attempted.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_use_xshm ##### -->
|
||||
<para>
|
||||
Sets whether the use of the MIT shared memory extension should be attempted.
|
||||
This function is mainly for internal use. It is only safe for an application
|
||||
to set this to %FALSE, since if it is set to %TRUE and the server does not
|
||||
support the extension it may cause warning messages to be output.
|
||||
</para>
|
||||
|
||||
@use_xshm: %TRUE if use of the MIT shared memory extension should be attempted.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
|
||||
<para>
|
||||
This function allows X errors to be trapped instead of the normal behavior
|
||||
of exiting the application. It should only be used if it is not possible to
|
||||
avoid the X error in any other way.
|
||||
</para>
|
||||
<example>
|
||||
<title>Trapping an X error</title>
|
||||
<programlisting>
|
||||
gdk_error_trap_push (<!-- -->);
|
||||
|
||||
/* ... Call the X function which may cause an error here ... */
|
||||
|
||||
/* Flush the X queue to catch errors now. */
|
||||
gdk_flush (<!-- -->);
|
||||
|
||||
if (gdk_error_trap_pop (<!-- -->))
|
||||
{
|
||||
/* ... Handle the error here ... */
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
|
||||
<para>
|
||||
Removes the X error trap installed with gdk_error_trap_push().
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the X error code, or 0 if no error occurred.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
|
||||
<para>
|
||||
This macro is defined if GDK is configured to use the X11 backend.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_WIN32 ##### -->
|
||||
<para>
|
||||
This macro is defined if GDK is configured to use the Win32 backend.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
188
docs/reference/gdk/tmpl/images.sgml
Normal file
188
docs/reference/gdk/tmpl/images.sgml
Normal file
@@ -0,0 +1,188 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Images
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A client-side area for bit-mapped graphics
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GdkImage type represents an area for drawing graphics.
|
||||
It has now been superceded to a large extent by the much more flexible
|
||||
<link linkend="gdk-GdkRGB">GdkRGB</link> functions.
|
||||
</para>
|
||||
<para>
|
||||
To create an empty #GdkImage use gdk_image_new().
|
||||
To create a #GdkImage from bitmap data use gdk_image_new_bitmap().
|
||||
To create an image from part of a #GdkWindow use gdk_drawable_get_image().
|
||||
</para>
|
||||
<para>
|
||||
The image can be manipulated with gdk_image_get_pixel() and
|
||||
gdk_image_put_pixel(), or alternatively by changing the actual pixel data.
|
||||
Though manipulating the pixel data requires complicated code to cope with
|
||||
the different formats that may be used.
|
||||
</para>
|
||||
<para>
|
||||
To draw a #GdkImage in a #GdkWindow or #GdkPixmap use gdk_draw_image().
|
||||
</para>
|
||||
<para>
|
||||
To destroy a #GdkImage use gdk_image_destroy().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-Bitmaps-and-Pixmaps">Bitmaps and Pixmaps</link></term>
|
||||
<listitem><para>
|
||||
Graphics which are stored on the X Windows server.
|
||||
Since these are stored on the server they can be drawn very quickly, and all
|
||||
of the <link linkend="gdk-Drawing-Primitives">Drawing Primitives</link> can be
|
||||
used to draw on them. Their main disadvantage is that manipulating individual
|
||||
pixels can be very slow.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-GdkRGB">GdkRGB</link></term>
|
||||
<listitem><para>
|
||||
Built on top of #GdkImage, this provides much more functionality,
|
||||
including the dithering of colors to produce better output on low-color
|
||||
displays.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkImage ##### -->
|
||||
<para>
|
||||
The #GdkImage struct contains information on the image and the pixel data.
|
||||
</para>
|
||||
|
||||
@parent_instance: the parent instance
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkImage.
|
||||
</para>
|
||||
|
||||
@type: the type of the #GdkImage, one of %GDK_IMAGE_NORMAL, %GDK_IMAGE_SHARED
|
||||
and %GDK_IMAGE_FASTEST. %GDK_IMAGE_FASTEST is probably the best choice, since
|
||||
it will try creating a %GDK_IMAGE_SHARED image first and if that fails it will
|
||||
then use %GDK_IMAGE_NORMAL.
|
||||
@visual: the #GdkVisual to use for the image.
|
||||
@width: the width of the image in pixels.
|
||||
@height: the height of the image in pixels.
|
||||
@Returns: a new #GdkImage, or %NULL if the image could not be created.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkImageType ##### -->
|
||||
<para>
|
||||
Specifies the type of a #GdkImage.
|
||||
</para>
|
||||
|
||||
@GDK_IMAGE_NORMAL: The original X image type, which is quite slow since the
|
||||
image has to be transferred from the client to the server to display it.
|
||||
@GDK_IMAGE_SHARED: A faster image type, which uses shared memory to transfer
|
||||
the image data between client and server. However this will only be available
|
||||
if client and server are on the same machine and the shared memory extension
|
||||
is supported by the server.
|
||||
@GDK_IMAGE_FASTEST: Specifies that %GDK_IMAGE_SHARED should be tried first,
|
||||
and if that fails then %GDK_IMAGE_NORMAL will be used.
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new_bitmap ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@data:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_get ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_image_destroy ##### -->
|
||||
<para>
|
||||
Destroys a #GdkImage, freeing any resources allocated for it.
|
||||
</para>
|
||||
|
||||
<!-- # Unused Parameters # -->
|
||||
@image: a #GdkImage.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_get_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_set_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_put_pixel ##### -->
|
||||
<para>
|
||||
Sets a pixel in a #GdkImage to a given pixel value.
|
||||
</para>
|
||||
|
||||
@image: a #GdkImage.
|
||||
@x: the x coordinate of the pixel to set.
|
||||
@y: the y coordinate of the pixel to set.
|
||||
@pixel: the pixel value to set.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_get_pixel ##### -->
|
||||
<para>
|
||||
Gets a pixel value at a specified position in a #GdkImage.
|
||||
</para>
|
||||
|
||||
@image: a #GdkImage.
|
||||
@x: the x coordinate of the pixel to get.
|
||||
@y: the y coordinate of the pixel to get.
|
||||
@Returns: the pixel value at the given position.
|
||||
|
||||
|
||||
106
docs/reference/gdk/tmpl/input.sgml
Normal file
106
docs/reference/gdk/tmpl/input.sgml
Normal file
@@ -0,0 +1,106 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Callbacks on file descriptors
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section are used to establish
|
||||
callbacks when some condition becomes true for
|
||||
a file descriptor. They are currently just wrappers around
|
||||
the <link linkend="glib-IO-Channels">IO Channel</link>
|
||||
facility.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link></term>
|
||||
<listitem><para>The main loop in which input callbacks run.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="glib-IO-Channels">IO Channels</link></term>
|
||||
<listitem><para>A newer and more flexible way of doing IO
|
||||
callbacks.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_add_full ##### -->
|
||||
|
||||
|
||||
@source:
|
||||
@condition:
|
||||
@function:
|
||||
@data:
|
||||
@destroy:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInputCondition ##### -->
|
||||
<para>
|
||||
A set of bit flags used to specify conditions for which
|
||||
an input callback will be triggered. The three members
|
||||
of this enumeration correspond to the @readfds,
|
||||
@writefds, and @exceptfds arguments to the
|
||||
<function>select</function> system call.
|
||||
</para>
|
||||
|
||||
@GDK_INPUT_READ: the file descriptor has become available for reading.
|
||||
(Or, as is standard in Unix, a socket or pipe was closed
|
||||
at the other end; this is the case if a subsequent read
|
||||
on the file descriptor returns a count of zero.)
|
||||
@GDK_INPUT_WRITE: the file descriptor has become available for writing.
|
||||
@GDK_INPUT_EXCEPTION: an exception was raised on the file descriptor.
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkInputFunction ##### -->
|
||||
<para>
|
||||
A callback function that will be called when some condition
|
||||
occurs.
|
||||
</para>
|
||||
|
||||
@data: the user data passed to gdk_input_add() or gdk_input_add_full().
|
||||
@source: the source where the condition occurred.
|
||||
@condition: the triggering condition.
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkDestroyNotify ##### -->
|
||||
<para>
|
||||
A callback function called when a piece of user data is
|
||||
no longer being stored by GDK. Will typically free the
|
||||
structure or object that @data points to.
|
||||
</para>
|
||||
|
||||
@data: the user data.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_add ##### -->
|
||||
|
||||
|
||||
@source:
|
||||
@condition:
|
||||
@function:
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_remove ##### -->
|
||||
<para>
|
||||
Remove a callback added with gdk_input_add() or
|
||||
gdk_input_add_full().
|
||||
</para>
|
||||
|
||||
@tag: the tag returned when the callback was set up.
|
||||
|
||||
|
||||
300
docs/reference/gdk/tmpl/input_devices.sgml
Normal file
300
docs/reference/gdk/tmpl/input_devices.sgml
Normal file
@@ -0,0 +1,300 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input Devices
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for handling extended input devices
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
In addition to the normal keyboard and mouse input devices, GTK+ also
|
||||
contains support for <firstterm>extended input devices</firstterm>. In
|
||||
particular, this support is targeted at graphics tablets. Graphics
|
||||
tablets typically return sub-pixel positioning information and possibly
|
||||
information about the pressure and tilt of the stylus. Under
|
||||
X, the support for extended devices is done through the
|
||||
<firstterm>XInput</firstterm> extension.
|
||||
</para>
|
||||
<para>
|
||||
Because handling extended input devices may involve considerable
|
||||
overhead, they need to be turned on for each #GdkWindow
|
||||
individually using gdk_input_set_extension_events().
|
||||
(Or, more typically, for GtkWidgets, using gtk_widget_set_extension_events()).
|
||||
As an additional complication, depending on the support from
|
||||
the windowing system, its possible that a normal mouse
|
||||
cursor will not be displayed for a particular extension
|
||||
device. If an application does not want to deal with displaying
|
||||
a cursor itself, it can ask only to get extension events
|
||||
from devices that will display a cursor, by passing the
|
||||
%GDK_EXTENSION_EVENTS_CURSOR value to
|
||||
gdk_input_set_extension_events(). Otherwise, the application
|
||||
must retrieve the device information using gdk_devices_list(),
|
||||
check the <structfield>has_cursor</structfield> field, and,
|
||||
if it is %FALSE, draw a cursor itself when it receives
|
||||
motion events.
|
||||
</para>
|
||||
<para>
|
||||
Each pointing device is assigned a unique integer ID; events from a
|
||||
particular device can be identified by the
|
||||
<structfield>deviceid</structfield> field in the event structure. The
|
||||
events generated by pointer devices have also been extended to contain
|
||||
<structfield>pressure</structfield>, <structfield>xtilt</structfield>
|
||||
and <structfield>ytilt</structfield> fields which contain the extended
|
||||
information reported as additional <firstterm>valuators</firstterm>
|
||||
from the device. The <structfield>pressure</structfield> field is a
|
||||
a double value ranging from 0.0 to 1.0, while the tilt fields are
|
||||
double values ranging from -1.0 to 1.0. (With -1.0 representing the
|
||||
maximum tilt to the left or up, and 1.0 representing the maximum
|
||||
tilt to the right or down.)
|
||||
</para>
|
||||
<para>
|
||||
One additional field in each event is the
|
||||
<structfield>source</structfield> field, which contains an
|
||||
enumeration value describing the type of device; this currently
|
||||
can be one of %GDK_SOURCE_MOUSE, %GDK_SOURCE_PEN, %GDK_SOURCE_ERASER,
|
||||
or %GDK_SOURCE_CURSOR. This field is present to allow simple
|
||||
applications to (for instance) delete when they detect eraser
|
||||
devices without having to keep track of complicated per-device
|
||||
settings.
|
||||
</para>
|
||||
<para>
|
||||
Various aspects of each device may be configured.
|
||||
The configuration of devices is queried using gdk_devices_list().
|
||||
Each device must be activated using gdk_device_set_mode(), which
|
||||
also controls whether the device's range is mapped to the
|
||||
entire screen or to a single window. The mapping of the valuators of
|
||||
the device onto the predefined valuator types is set using
|
||||
gdk_device_set_axis_use(). And the source type for each device
|
||||
can be set with gdk_device_set_source().
|
||||
</para>
|
||||
<para>
|
||||
Devices may also have associated <firstterm>keys</firstterm>
|
||||
or macro buttons. Such keys can be globally set to map
|
||||
into normal X keyboard events. The mapping is set using
|
||||
gdk_device_set_key().
|
||||
</para>
|
||||
<para>
|
||||
The interfaces in this section will most likely be considerably
|
||||
modified in the future to accomodate devices that may have different
|
||||
sets of additional valuators than the pressure <structfield>xtilt</structfield>
|
||||
and <structfield>ytilt</structfield>.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDevice ##### -->
|
||||
<para>
|
||||
A <structname>GdkDevice</structname> structure contains
|
||||
a detailed description of an extended input device. All
|
||||
fields are read-only; but you can use gdk_device_set_source(),
|
||||
gdk_device_set_mode(), gdk_device_set_key() and gdk_device_set_axis_use()
|
||||
to configure various aspects of the device.
|
||||
</para>
|
||||
|
||||
@parent_instance: the parent instance
|
||||
|
||||
<!-- ##### ENUM GdkInputSource ##### -->
|
||||
<para>
|
||||
An enumeration describing the type of an input device
|
||||
in general terms.
|
||||
</para>
|
||||
|
||||
@GDK_SOURCE_MOUSE: the device is a mouse. (This will be reported for the core
|
||||
pointer, even if it is something else, such as a trackball.)
|
||||
@GDK_SOURCE_PEN: the device is a stylus of a graphics tablet or similar device.
|
||||
@GDK_SOURCE_ERASER: the device is an eraser. Typically, this would be the other end
|
||||
of a stylus on a graphics tablet.
|
||||
@GDK_SOURCE_CURSOR: the device is a graphics tablet "puck" or similar device.
|
||||
|
||||
<!-- ##### ENUM GdkInputMode ##### -->
|
||||
<para>
|
||||
An enumeration that describes the mode of an input device.
|
||||
</para>
|
||||
|
||||
@GDK_MODE_DISABLED: the device is disabled and will not report any events.
|
||||
@GDK_MODE_SCREEN: the device is enabled. The device's coordinate space
|
||||
maps to the entire screen.
|
||||
@GDK_MODE_WINDOW: the device is enabled. The device's coordinate space
|
||||
is mapped to a single window. The manner in which this window
|
||||
is chosen is undefined, but it will typically be the same
|
||||
way in which the focus window for key events is determined.
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceKey ##### -->
|
||||
<para>
|
||||
The <structname>GdkDeviceKey</structname> structure contains information
|
||||
about the mapping of one device macro button onto a normal X key event.
|
||||
It has the following fields:
|
||||
</para>
|
||||
|
||||
@keyval: the keyval to generate when the macro button is pressed.
|
||||
If this is 0, no keypress will be generated.
|
||||
@modifiers: the modifiers set for the generated key event.
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceAxis ##### -->
|
||||
<para>
|
||||
The <structname>GdkDeviceAxis</structname> structure contains information
|
||||
about the range and mapping of a device axis.
|
||||
</para>
|
||||
|
||||
@use: specifies how the axis is used.
|
||||
@min: the minimal value that will be reported by this axis.
|
||||
@max: the maximal value that will be reported by this axis.
|
||||
|
||||
<!-- ##### ENUM GdkAxisUse ##### -->
|
||||
<para>
|
||||
An enumeration describing the way in which a device
|
||||
axis (valuator) maps onto the predefined valuator
|
||||
types that GTK+ understands.
|
||||
</para>
|
||||
|
||||
@GDK_AXIS_IGNORE: the axis is ignored.
|
||||
@GDK_AXIS_X: the axis is used as the x axis.
|
||||
@GDK_AXIS_Y: the axis is used as the y axis.
|
||||
@GDK_AXIS_PRESSURE: the axis is used for pressure information.
|
||||
@GDK_AXIS_XTILT: the axis is used for x tilt information.
|
||||
@GDK_AXIS_YTILT: the axis is used for x tilt information.
|
||||
@GDK_AXIS_WHEEL: the axis is used for wheel information.
|
||||
@GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
|
||||
|
||||
<!-- ##### FUNCTION gdk_devices_list ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_set_source ##### -->
|
||||
<para>
|
||||
Sets the source type for an input device.
|
||||
</para>
|
||||
|
||||
@device: a #GdkDevice.
|
||||
@source: the source type.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_set_mode ##### -->
|
||||
<para>
|
||||
Sets a the mode of an input device. The mode controls if the
|
||||
device is active and whether the device's range is mapped to the
|
||||
entire screen or to a single window.
|
||||
</para>
|
||||
|
||||
@device: a #GdkDevice.
|
||||
@mode: the input mode.
|
||||
@Returns: %TRUE if the mode was successfully changed.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_set_key ##### -->
|
||||
<para>
|
||||
Specifies the X key event to generate when a macro button of a device
|
||||
is pressed.
|
||||
</para>
|
||||
|
||||
@device: a #GdkDevice.
|
||||
@index_: the index of the macro button to set.
|
||||
@keyval: the keyval to generate.
|
||||
@modifiers: the modifiers to set.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_set_axis_use ##### -->
|
||||
<para>
|
||||
Specifies how an axis of a device is used.
|
||||
</para>
|
||||
|
||||
@device: a #GdkDevice.
|
||||
@index_: the index of the axis.
|
||||
@use: specifies how the axis is used.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_get_core_pointer ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_get_state ##### -->
|
||||
|
||||
|
||||
@device:
|
||||
@window:
|
||||
@axes:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_get_history ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@device:
|
||||
@window:
|
||||
@start:
|
||||
@stop:
|
||||
@events:
|
||||
@n_events:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_free_history ##### -->
|
||||
<para>
|
||||
Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history().
|
||||
</para>
|
||||
|
||||
@events: an array of #GdkTimeCoord.
|
||||
@n_events: the length of the array.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkTimeCoord ##### -->
|
||||
<para>
|
||||
The #GdkTimeCoord structure stores a single event in a
|
||||
motion history. It contains the following fields:
|
||||
</para>
|
||||
|
||||
@time: The timestamp for this event.
|
||||
@axes: the values of the device's axes.
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_get_axis ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@device:
|
||||
@axes:
|
||||
@use:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_extension_events ##### -->
|
||||
<para>
|
||||
Turns extension events on or off for a particular window,
|
||||
and specifies the event mask for extension events.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@mask: the event mask
|
||||
@mode: the type of extension events that are desired.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkExtensionMode ##### -->
|
||||
<para>
|
||||
An enumeration used to specify which extension events
|
||||
are desired for a particular widget.
|
||||
</para>
|
||||
|
||||
@GDK_EXTENSION_EVENTS_NONE: no extension events are desired.
|
||||
@GDK_EXTENSION_EVENTS_ALL: all extension events are desired.
|
||||
@GDK_EXTENSION_EVENTS_CURSOR: extension events are desired only if a cursor
|
||||
will be displayed for the device.
|
||||
|
||||
349
docs/reference/gdk/tmpl/keys.sgml
Normal file
349
docs/reference/gdk/tmpl/keys.sgml
Normal file
@@ -0,0 +1,349 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Key Values
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for manipulating keyboard codes
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Key values are the codes which are sent whenever a key is pressed or released.
|
||||
They appear in the <structfield>keyval</structfield> field of the
|
||||
#GdkEventKey structure, which is passed to signal handlers for the
|
||||
"key-press-event" and "key-release-event" signals.
|
||||
The complete list of key values can be found in the <filename><gdk/gdkkeysyms.h></filename>
|
||||
header file. <filename><gdk/gdkkeysyms.h></filename> is not included in <filename><gdk/gdk.h></filename>,
|
||||
it must be included independently, because the file is quite large.
|
||||
</para>
|
||||
<para>
|
||||
Key values are regularly updated from the upstream X.org X11 implementation,
|
||||
so new values are added regularly. They will be prefixed with GDK_ rather than
|
||||
XF86XK_ or XK_ (for older symbols).
|
||||
</para>
|
||||
<para>
|
||||
Key values can be converted into a string representation using
|
||||
gdk_keyval_name(). The reverse function, converting a string to a key value,
|
||||
is provided by gdk_keyval_from_name().
|
||||
</para>
|
||||
<para>
|
||||
The case of key values can be determined using gdk_keyval_is_upper() and
|
||||
gdk_keyval_is_lower(). Key values can be converted to upper or lower case
|
||||
using gdk_keyval_to_upper() and gdk_keyval_to_lower().
|
||||
</para>
|
||||
<para>
|
||||
When it makes sense, key values can be converted to and from
|
||||
Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
|
||||
</para>
|
||||
|
||||
<para id="key-group-explanation">
|
||||
One #GdkKeymap object exists for each user display. gdk_keymap_get_default()
|
||||
returns the #GdkKeymap for the default display; to obtain keymaps for other
|
||||
displays, use gdk_keymap_get_for_display(). A keymap
|
||||
is a mapping from #GdkKeymapKey to key values. You can think of a #GdkKeymapKey
|
||||
as a representation of a symbol printed on a physical keyboard key. That is, it
|
||||
contains three pieces of information. First, it contains the hardware keycode;
|
||||
this is an identifying number for a physical key. Second, it contains the
|
||||
<firstterm>level</firstterm> of the key. The level indicates which symbol on the
|
||||
key will be used, in a vertical direction. So on a standard US keyboard, the key
|
||||
with the number "1" on it also has the exclamation point ("!") character on
|
||||
it. The level indicates whether to use the "1" or the "!" symbol. The letter
|
||||
keys are considered to have a lowercase letter at level 0, and an uppercase
|
||||
letter at level 1, though only the uppercase letter is printed. Third, the
|
||||
#GdkKeymapKey contains a group; groups are not used on standard US keyboards,
|
||||
but are used in many other countries. On a keyboard with groups, there can be 3
|
||||
or 4 symbols printed on a single key. The group indicates movement in a
|
||||
horizontal direction. Usually groups are used for two different languages. In
|
||||
group 0, a key might have two English characters, and in group 1 it might have
|
||||
two Hebrew characters. The Hebrew characters will be printed on the key next to
|
||||
the English characters.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In order to use a keymap to interpret a key event, it's necessary to first
|
||||
convert the keyboard state into an effective group and level. This is done via a
|
||||
set of rules that varies widely according to type of keyboard and user
|
||||
configuration. The function gdk_keymap_translate_keyboard_state() accepts a
|
||||
keyboard state -- consisting of hardware keycode pressed, active modifiers, and
|
||||
active group -- applies the appropriate rules, and returns the group/level to be
|
||||
used to index the keymap, along with the modifiers which did not affect the
|
||||
group and level. i.e. it returns "unconsumed modifiers." The keyboard group may
|
||||
differ from the effective group used for keymap lookups because some keys don't
|
||||
have multiple groups - e.g. the Enter key is always in group 0 regardless of
|
||||
keyboard state.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that gdk_keymap_translate_keyboard_state() also returns the keyval, i.e. it
|
||||
goes ahead and performs the keymap lookup in addition to telling you which
|
||||
effective group/level values were used for the lookup. #GdkEventKey already
|
||||
contains this keyval, however, so you don't normally need to call
|
||||
gdk_keymap_translate_keyboard_state() just to get the keyval.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkKeymap ##### -->
|
||||
<para>
|
||||
A <structname>GdkKeymap</structname> defines the translation from keyboard state
|
||||
(including a hardware key, a modifier mask, and active keyboard group)
|
||||
to a keyval. This translation has two phases. The first phase is
|
||||
to determine the effective keyboard group and level for the keyboard
|
||||
state; the second phase is to look up the keycode/group/level triplet
|
||||
in the keymap and see what keyval it corresponds to.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GdkKeymap::direction-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkKeymap::keys-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkKeymap::state-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkkeymap: the object which received the signal.
|
||||
|
||||
<!-- ##### STRUCT GdkKeymapKey ##### -->
|
||||
<para>
|
||||
A <structname>GdkKeymapKey</structname> is a hardware key that can
|
||||
be mapped to a keyval.
|
||||
</para>
|
||||
|
||||
@keycode: the hardware keycode. This is an identifying number for a
|
||||
physical key.
|
||||
@group: indicates movement in a horizontal direction. Usually groups are used
|
||||
for two different languages. In group 0, a key might have two English
|
||||
characters, and in group 1 it might have two Hebrew characters. The Hebrew
|
||||
characters will be printed on the key next to the English characters.
|
||||
@level: indicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number "1" on it also has the
|
||||
exclamation point ("!") character on it. The level indicates whether to use
|
||||
the "1" or the "!" symbol. The letter keys are considered to have a lowercase
|
||||
letter at level 0, and an uppercase letter at level 1, though only the
|
||||
uppercase letter is printed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_lookup_key ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@key:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_translate_keyboard_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@hardware_keycode:
|
||||
@state:
|
||||
@group:
|
||||
@keyval:
|
||||
@effective_group:
|
||||
@level:
|
||||
@consumed_modifiers:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_entries_for_keyval ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@keyval:
|
||||
@keys:
|
||||
@n_keys:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_entries_for_keycode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@hardware_keycode:
|
||||
@keys:
|
||||
@keyvals:
|
||||
@n_entries:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_direction ##### -->
|
||||
<para>
|
||||
Returns the direction of the keymap.
|
||||
</para>
|
||||
|
||||
@keymap: a #GdkKeymap or %NULL to use the default keymap.
|
||||
Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL.
|
||||
@Returns: the direction of the keymap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_have_bidi_layouts ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_caps_lock_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_add_virtual_modifiers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@state:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_map_virtual_modifiers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@state:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_name ##### -->
|
||||
<para>
|
||||
Converts a key value into a symbolic name.
|
||||
The names are the same as those in the <filename><gdk/gdkkeysyms.h></filename> header file
|
||||
but without the leading "GDK_".
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: a string containing the name of the key, or %NULL if @keyval is not
|
||||
a valid key. The string should not be modified.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_from_name ##### -->
|
||||
<para>
|
||||
Converts a key name to a key value.
|
||||
</para>
|
||||
|
||||
@keyval_name: a key name.
|
||||
@Returns: the corresponding key value, or %GDK_VoidSymbol if the key name is
|
||||
not a valid key.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_convert_case ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@symbol:
|
||||
@lower:
|
||||
@upper:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_upper ##### -->
|
||||
<para>
|
||||
Converts a key value to upper case, if applicable.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: the upper case form of @keyval, or @keyval itself if it is already
|
||||
in upper case or it is not subject to case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_lower ##### -->
|
||||
<para>
|
||||
Converts a key value to lower case, if applicable.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: the lower case form of @keyval, or @keyval itself if it is already
|
||||
in lower case or it is not subject to case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_is_upper ##### -->
|
||||
<para>
|
||||
Returns %TRUE if the given key value is in upper case.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: %TRUE if @keyval is in upper case, or if @keyval is not subject to
|
||||
case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_is_lower ##### -->
|
||||
<para>
|
||||
Returns %TRUE if the given key value is in lower case.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: %TRUE if @keyval is in lower case, or if @keyval is not subject to
|
||||
case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_unicode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keyval:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_unicode_to_keyval ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@wc:
|
||||
@Returns:
|
||||
|
||||
|
||||
316
docs/reference/gdk/tmpl/pango_interaction.sgml
Normal file
316
docs/reference/gdk/tmpl/pango_interaction.sgml
Normal file
@@ -0,0 +1,316 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Pango Interaction
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Using Pango in GDK
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Pango is the text layout system used by GDK and GTK+. The functions
|
||||
and types in this section are used to render Pango objects to GDK.
|
||||
drawables, and also extend the set of Pango attributes to include
|
||||
stippling and embossing.
|
||||
</para>
|
||||
<para>
|
||||
Creating a #PangoLayout object is the first step in rendering text,
|
||||
and requires getting a handle to a #PangoContext. For GTK+ programs,
|
||||
you'll usually want to use gtk_widget_get_pango_context(), or
|
||||
gtk_widget_create_pango_layout(), rather than using the lowlevel
|
||||
gdk_pango_context_get_for_screen(). Once you have a #PangoLayout, you
|
||||
can set the text and attributes of it with Pango functions like
|
||||
pango_layout_set_text() and get its size with pango_layout_get_size().
|
||||
(Note that Pango uses a fixed point system internally, so converting
|
||||
between Pango units and pixels using <link
|
||||
linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link> or the PANGO_PIXELS() macro.)
|
||||
</para>
|
||||
<para>
|
||||
Rendering a Pango layout is done most simply with gdk_draw_layout();
|
||||
you can also draw pieces of the layout with gdk_draw_layout() or
|
||||
gdk_draw_glyphs(). #GdkPangoRenderer is a subclass of #PangoRenderer
|
||||
that is used internally to implement these functions. Using it
|
||||
directly or subclassing it can be useful in some cases. See the
|
||||
#GdkPangoRenderer documentation for details.
|
||||
</para>
|
||||
<example id="rotated-example">
|
||||
<title>Using #GdkPangoRenderer to draw transformed text</title>
|
||||
<!-- Note that this example is basically the same as
|
||||
demos/gtk-demo/rotated_text.c -->
|
||||
<programlisting>
|
||||
#define RADIUS 100
|
||||
#define N_WORDS 10
|
||||
#define FONT "Sans Bold 18"
|
||||
|
||||
GdkScreen *screen = gdk_drawable_get_screen (drawable);
|
||||
PangoRenderer *renderer;
|
||||
GdkGC *gc;
|
||||
|
||||
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
||||
PangoContext *context;
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
double device_radius;
|
||||
int width, height;
|
||||
int i;
|
||||
|
||||
/* Get the default renderer for the screen, and set it up for drawing */
|
||||
renderer = gdk_pango_renderer_get_default (screen);
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), drawable);
|
||||
|
||||
gc = gdk_gc_new (drawable);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), gc);
|
||||
|
||||
/* Set up a transformation matrix so that the user space coordinates for
|
||||
* where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
* We first center, then change the scale */
|
||||
gdk_drawable_get_size (drawable, &width, &height);
|
||||
device_radius = MIN (width, height) / 2.;
|
||||
|
||||
pango_matrix_translate (&matrix,
|
||||
device_radius + (width - 2 * device_radius) / 2,
|
||||
device_radius + (height - 2 * device_radius) / 2);
|
||||
pango_matrix_scale (&matrix, device_radius / RADIUS, device_radius / RADIUS);
|
||||
|
||||
/* Create a PangoLayout, set the font and text */
|
||||
context = gdk_pango_context_get_for_screen (screen);
|
||||
layout = pango_layout_new (context);
|
||||
pango_layout_set_text (layout, "Text", -1);
|
||||
desc = pango_font_description_from_string (FONT);
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
/* Draw the layout N_WORDS times in a circle */
|
||||
for (i = 0; i < N_WORDS; i++)
|
||||
{
|
||||
GdkColor color;
|
||||
PangoMatrix rotated_matrix = matrix;
|
||||
int width, height;
|
||||
double angle = (360. * i) / N_WORDS;
|
||||
|
||||
/* Gradient from red at angle == 60 to blue at angle == 300 */
|
||||
color.red = 65535 * (1 + cos ((angle - 60) * M_PI / 180.)) / 2;
|
||||
color.green = 0;
|
||||
color.blue = 65535 - color.red;
|
||||
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, &color);
|
||||
|
||||
pango_matrix_rotate (&rotated_matrix, angle);
|
||||
|
||||
pango_context_set_matrix (context, &rotated_matrix);
|
||||
|
||||
/* Inform Pango to re-layout the text with the new transformation matrix */
|
||||
pango_layout_context_changed (layout);
|
||||
|
||||
pango_layout_get_size (layout, &width, &height);
|
||||
pango_renderer_draw_layout (renderer, layout,
|
||||
- width / 2, - RADIUS * PANGO_SCALE);
|
||||
}
|
||||
|
||||
/* Clean up default renderer, since it is shared */
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, NULL);
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
|
||||
/* free the objects we created */
|
||||
g_object_unref (layout);
|
||||
g_object_unref (context);
|
||||
g_object_unref (gc);
|
||||
</programlisting>
|
||||
</example>
|
||||
<figure>
|
||||
<title>Output of <xref linkend="rotated-example"/></title>
|
||||
<graphic fileref="rotated-text.png" format="PNG"/>
|
||||
</figure>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPangoRenderer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GdkPangoRenderer:screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkPangoRendererClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_set_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdk_renderer:
|
||||
@drawable:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_set_gc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdk_renderer:
|
||||
@gc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_set_stipple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdk_renderer:
|
||||
@part:
|
||||
@stipple:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_set_override_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdk_renderer:
|
||||
@part:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_context_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_context_get_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_context_set_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPangoAttrEmbossed ##### -->
|
||||
<para>
|
||||
A Pango text attribute containing a embossed bitmap to be used when
|
||||
rendering the text.
|
||||
</para>
|
||||
|
||||
@attr: the #PangoAttribute.
|
||||
@embossed: the embossed bitmap.
|
||||
|
||||
<!-- ##### STRUCT GdkPangoAttrEmbossColor ##### -->
|
||||
<para>
|
||||
A Pango text attribute specifying the color to emboss text with.
|
||||
</para>
|
||||
|
||||
@attr: the #PangoAttribute
|
||||
@color: the color
|
||||
|
||||
<!-- ##### STRUCT GdkPangoAttrStipple ##### -->
|
||||
<para>
|
||||
A Pango text attribute containing a stipple bitmap to be used when
|
||||
rendering the text.
|
||||
</para>
|
||||
|
||||
@attr: the #PangoAttribute.
|
||||
@stipple: the stipple bitmap.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_attr_emboss_color_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_attr_embossed_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@embossed:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_attr_stipple_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@stipple:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_layout_get_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@layout:
|
||||
@x_origin:
|
||||
@y_origin:
|
||||
@index_ranges:
|
||||
@n_ranges:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_layout_line_get_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@line:
|
||||
@x_origin:
|
||||
@y_origin:
|
||||
@index_ranges:
|
||||
@n_ranges:
|
||||
@Returns:
|
||||
|
||||
|
||||
136
docs/reference/gdk/tmpl/pixbufs.sgml
Normal file
136
docs/reference/gdk/tmpl/pixbufs.sgml
Normal file
@@ -0,0 +1,136 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Pixbufs
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for rendering pixbufs on drawables
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions allow to render pixbufs on drawables. Pixbufs are
|
||||
client-side images. For details on how to create and manipulate
|
||||
pixbufs, see the #GdkPixbuf API documentation.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_threshold_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@bitmap:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@alpha_threshold:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_to_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@drawable:
|
||||
@gc:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@dither:
|
||||
@x_dither:
|
||||
@y_dither:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_to_drawable_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@drawable:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@alpha_mode:
|
||||
@alpha_threshold:
|
||||
@dither:
|
||||
@x_dither:
|
||||
@y_dither:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@pixmap_return:
|
||||
@mask_return:
|
||||
@alpha_threshold:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask_for_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@colormap:
|
||||
@pixmap_return:
|
||||
@mask_return:
|
||||
@alpha_threshold:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_from_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@src:
|
||||
@cmap:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_from_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@src:
|
||||
@cmap:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
185
docs/reference/gdk/tmpl/pixmaps.sgml
Normal file
185
docs/reference/gdk/tmpl/pixmaps.sgml
Normal file
@@ -0,0 +1,185 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Bitmaps and Pixmaps
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Offscreen drawables
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Pixmaps are offscreen drawables. They can be drawn upon with the
|
||||
standard drawing primitives, then copied to another drawable (such as
|
||||
a #GdkWindow) with gdk_pixmap_draw(). The depth of a pixmap
|
||||
is the number of bits per pixels. Bitmaps are simply pixmaps
|
||||
with a depth of 1. (That is, they are monochrome bitmaps - each
|
||||
pixel can be either on or off).
|
||||
</para>
|
||||
<para>
|
||||
GTK 3 will remove #GdkPixmap and #GdkBitmap. You should use cairo
|
||||
surfaces instead. However, because a lot of functions still use these
|
||||
types, they are not deprecated.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable.
|
||||
Pointers to structures of type #GdkPixmap, #GdkBitmap,
|
||||
and #GdkWindow, can often be used interchangeably.
|
||||
The type #GdkDrawable refers generically to any of
|
||||
these types.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_new ##### -->
|
||||
<para>
|
||||
Create a new pixmap with a given size and depth.
|
||||
</para>
|
||||
<para>
|
||||
Please use gdk_window_create_similar_surface() instead of this
|
||||
function if you're not forced to use a #GdkPixmap. It is intended
|
||||
as the replacement function for this function in GTK 3.
|
||||
</para>
|
||||
|
||||
@drawable: A #GdkDrawable, used to determine default values
|
||||
for the new pixmap. Can be %NULL if @depth is specified,
|
||||
@width: The width of the new pixmap in pixels.
|
||||
@height: The height of the new pixmap in pixels.
|
||||
@depth: The depth (number of bits per pixel) of the new pixmap.
|
||||
If -1, and @drawable is not %NULL, the depth of the new
|
||||
pixmap will be equal to that of @drawable.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
|
||||
<para>
|
||||
Creates a new bitmap from data in XBM format.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable, used to determine default values
|
||||
for the new pixmap. Can be %NULL, in which case the root
|
||||
window is used.
|
||||
@data: a pointer to the XBM data.
|
||||
@width: the width of the new pixmap in pixels.
|
||||
@height: the height of the new pixmap in pixels.
|
||||
@Returns: the #GdkBitmap
|
||||
|
||||
@Deprecated: 2.22: You can create a Cairo image surface using
|
||||
cairo_image_surface_create_for_data() instead. Specify
|
||||
%CAIRO_FORMAT_A1 as the format to get a bitmap. Keep in mind that
|
||||
Cairo images must have a rowstride of 4 bytes, so you will need
|
||||
to align your data properly. If you must use a pixmap, use
|
||||
gdk_pixmap_new() with a depth of 1 to create a bitmap and then use
|
||||
gdk_cairo_create(), cairo_set_source_surface() and cairo_paint()
|
||||
to draw the image surface to the bitmap.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
|
||||
<para>
|
||||
Create a two-color pixmap from data in XBM data.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable, used to determine default values
|
||||
for the new pixmap. Can be %NULL, if the depth is given.
|
||||
@data: a pointer to the data.
|
||||
@width: the width of the new pixmap in pixels.
|
||||
@height: the height of the new pixmap in pixels.
|
||||
@depth: the depth (number of bits per pixel) of the new pixmap.
|
||||
@fg: the foreground color.
|
||||
@bg: the background color.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
@Deprecated: 2.22: If you must replicate the functionality of this
|
||||
function, create a pixmap using gdk_pixmap_new(), cairo_paint() it
|
||||
with the background color and then create a Cairo image surface as
|
||||
pointed out in the docs to gdk_bitmap_create_from_data() and use
|
||||
this surface with cairo_mask_surface() to paint the foreground color.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
|
||||
|
||||
|
||||
@drawable:
|
||||
@mask:
|
||||
@transparent_color:
|
||||
@filename:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
|
||||
|
||||
|
||||
@drawable:
|
||||
@colormap:
|
||||
@mask:
|
||||
@transparent_color:
|
||||
@filename:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
|
||||
|
||||
|
||||
@drawable:
|
||||
@mask:
|
||||
@transparent_color:
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
|
||||
|
||||
|
||||
@drawable:
|
||||
@colormap:
|
||||
@mask:
|
||||
@transparent_color:
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_pixmap_ref ##### -->
|
||||
<para>
|
||||
Deprecated equivalent of g_object_ref().
|
||||
</para>
|
||||
|
||||
@Returns: @pixmap
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_pixmap_unref ##### -->
|
||||
<para>
|
||||
Deprecated equivalent of g_object_unref().
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkBitmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable of depth
|
||||
1. Pointers to structures of type #GdkPixmap, #GdkBitmap, and
|
||||
#GdkWindow, can often be used interchangeably. The type #GdkDrawable
|
||||
refers generically to any of these types.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_bitmap_ref ##### -->
|
||||
<para>
|
||||
Deprecated equivalent of g_object_ref().
|
||||
</para>
|
||||
|
||||
@Returns: @pixmap
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_bitmap_unref ##### -->
|
||||
<para>
|
||||
Deprecated equivalent of g_object_unref().
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user