Compare commits
659 Commits
css-variab
...
2.24.2
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 |
18
INSTALL.in
18
INSTALL.in
@@ -3,21 +3,11 @@ Prerequisites
|
||||
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, ATK and cairo libraries, available at the same
|
||||
location as GTK+. GTK+ @GTK_VERSION@ requires at least GLib 2.23.6,
|
||||
Pango 1.20, ATK 1.29.2 and cairo 1.6.0.
|
||||
- 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.6.7 or newer.
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
likely have these installed on your system already. If not
|
||||
these libraries are available from:
|
||||
|
||||
http://www.libtiff.org/
|
||||
http://www.libpng.org/
|
||||
http://www.ijg.org/
|
||||
|
||||
libtiff must be version 3.6.0 or higher.
|
||||
- gobject-introspection 0.9.3 or newer.
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## Makefile.am for GTK+
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
|
||||
SRC_SUBDIRS = gdk gtk modules demos tests perf
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||
|
||||
# require automake 1.4
|
||||
@@ -160,7 +160,7 @@ gdk-$(GDKTARGET)-2.0-uninstalled.pc: gdk-2.0-uninstalled.pc
|
||||
cp gdk-2.0-uninstalled.pc gdk-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA= gdk-pixbuf-2.0.pc gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc gail.pc
|
||||
pkgconfig_DATA= gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc gail.pc
|
||||
|
||||
if OS_UNIX
|
||||
pkgconfig_DATA += gtk+-unix-print-2.0.pc
|
||||
|
@@ -30,13 +30,17 @@ XVFB_START = \
|
||||
# call as: $(XVFB_START) && someprogram
|
||||
|
||||
# test: run all tests in cwd and subdirs
|
||||
test: ${TEST_PROGS}
|
||||
test: test-cwd test-recurse
|
||||
# test-cwd: run tests in cwd
|
||||
test-cwd: ${TEST_PROGS}
|
||||
@$(SKIP_GDKTARGET) || test -z "${TEST_PROGS}" || { \
|
||||
$(XVFB_START) && { set -e; ${GTESTER} --verbose ${TEST_PROGS}; }; \
|
||||
$(XVFB_START) && { set -e; $(TESTS_ENVIRONMENT) ${GTESTER} --verbose ${TEST_PROGS}; }; \
|
||||
}
|
||||
# test-recurse: run tests in subdirs
|
||||
test-recurse:
|
||||
@ for subdir in $(SUBDIRS) ; do \
|
||||
test "$$subdir" = "." -o "$$subdir" = "po" -o "$$subdir" = "po-properties" || \
|
||||
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
|
||||
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) test ) || exit $? ; \
|
||||
done
|
||||
# test-report: run tests in subdirs and generate report
|
||||
# perf-report: run tests in subdirs with -m perf and generate report
|
||||
@@ -77,6 +81,6 @@ test-report perf-report full-report: ${TEST_PROGS}
|
||||
rm -rf "$$GTESTER_LOGDIR"/ ; \
|
||||
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
|
||||
}
|
||||
.PHONY: test test-report perf-report full-report
|
||||
# run make test as part of make check
|
||||
check-local: test
|
||||
.PHONY: test test-cwd test-recurse test-report perf-report full-report
|
||||
# run make test-cwd as part of make check
|
||||
check-local: test-cwd
|
||||
|
501
NEWS
501
NEWS
@@ -1,3 +1,504 @@
|
||||
Overview of Changes from GTK+ 2.24.1 to 2.24.2
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
642905 reference lists 2 links for "Index of new symbols...
|
||||
643170 gtk_file_chooser_set_filename does not work...
|
||||
643216 Extraneous emits of GdkScreen::monitors-changed
|
||||
643416 Composited children of GtkScrolledWindow are drawn...
|
||||
644353 Missing annotations in Gtk/Gdk Window and gtk_acce...
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.24.0 to 2.24.1
|
||||
==============================================
|
||||
|
||||
* GTK+ now refuses to load modules that are linked against
|
||||
the wrong GTK+ version, preventing GTK_PATH accidents.
|
||||
|
||||
* A number of memory leaks and segfaults involving accessibility
|
||||
have been fixed.
|
||||
|
||||
* Bugs fixed:
|
||||
599907 Gail implementation of atk_add_key_event_listener return...
|
||||
626730 Check menu item does not set indeterminate state
|
||||
633291 Handle Shift-keys in X11 gdk_test_simulate_key()
|
||||
640487 crash on gtk_statusbar_remove_all()
|
||||
640992 Missed Return Type in gtk/gtkrange.c: gtk_range_set_round_digits
|
||||
642137 gtk+-2.24.0 requires Xcomposite.h
|
||||
642642 Missed include in gtk/gtkmodules.c
|
||||
642681 gtk_combo_box_text_get_active_text doesn't work as stated
|
||||
642772 GTK does not correctly process input sent via SendInput...
|
||||
|
||||
* Translation updates:
|
||||
Hungarian
|
||||
Polish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.23.90 to 2.24.0
|
||||
===============================================
|
||||
|
||||
* GtkBuilder has gained support for
|
||||
- items in GtkComboBoxText
|
||||
- tags in GtkTextTagTable
|
||||
- menus in GtkMenuToolButton
|
||||
|
||||
* The gtk-builder-convert script gained a
|
||||
--target-version option
|
||||
|
||||
* Many introspection annotation fixes
|
||||
|
||||
* Bugs fixed:
|
||||
351755 GTK_RANGE (range) -> round_digits should be exposed...
|
||||
590459 Text is sometimes not pasted at the right location
|
||||
639327 gtk-builder-convert needs to convert gtkcomboboxentry...
|
||||
634677 assertion in finalize assuring that buffer is NULL...
|
||||
|
||||
* Updated translations:
|
||||
British English
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.23.3 to 2.23.90
|
||||
===============================================
|
||||
|
||||
* New deprecations:
|
||||
- gdk_set_pointer_hooks(), gdk_display_set_pointer_hooks()
|
||||
- gtk_range_get/set_update_policy()
|
||||
- gtk_window_get/set_frame_dimensions() and
|
||||
gtk_window_get/set_has_frame()
|
||||
|
||||
* The cups print backend can now send print jobs directly in PDF if
|
||||
cups supports it
|
||||
|
||||
* Bugs fixed:
|
||||
144324 Leaking dnd contexts with XDnD
|
||||
165987 unsets DESKTOP_STARTUP_ID
|
||||
560177 Applications should send print jobs to CUPS in PDF format...
|
||||
562182 gtk_init() docs inaccurate
|
||||
622125 Note that gtk_show_uri needs gvfs to spawn URLs
|
||||
637691 Eating events breaks proxied DND
|
||||
637958 print dialog doesn't fit on netbook screen size
|
||||
637973 thunderbird crashes when copying text with gtk 2.23.3
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.23.2 to 2.23.3
|
||||
==============================================
|
||||
|
||||
* New deprecations:
|
||||
- GtkRuler (and subclasses)
|
||||
- gtk_widget_reset_shapes
|
||||
- gdk_set_sm_client_id
|
||||
- Foreign window APIs
|
||||
- gdk_spawn_*
|
||||
- gdkx_visual_get
|
||||
- gdk_net_wm_supports
|
||||
- gdk_set_locale, gtk_set_locale
|
||||
- Some GDK text conversion routines
|
||||
- gdk_drag_context_new
|
||||
- gdk_drag_find_window and gdk_drag_get_protocol
|
||||
- gdk_xid_table functions
|
||||
|
||||
* Bug fixes:
|
||||
629955 Deprecate / remove gtk_main and gtk_init_add / remove* API
|
||||
634558 Selecting "Search" should focus text box for keyboard entry
|
||||
634697 gdk: Add XSetting for "gtk-cursor-blink-timeout"
|
||||
634882 Usage of deprecated GLib API (g_source_get_current_time)
|
||||
635307 iconcache: Ensure we don't lose data on power loss
|
||||
635588 Clicking URL to be opened freezes the application for seconds
|
||||
636832 anoncvs.gnome.org does not exist
|
||||
637069 Custom print settings set in custom-widget-apply are lost
|
||||
637156 Optimize gtk_widget_shape_combine_region (widget, NULL, ...)
|
||||
|
||||
* Translation updates:
|
||||
Czech
|
||||
Norwegian bokmål
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.23.1 to 2.23.2
|
||||
==============================================
|
||||
|
||||
* Fix a branch messup
|
||||
* Readd the gtk_private_flags_get_type symbol
|
||||
* Fix crashes on 64-bit
|
||||
* Allow building with libtool 2.4
|
||||
|
||||
Overview of Changes from GTK+ 2.23.0 to 2.23.1
|
||||
==============================================
|
||||
|
||||
* New deprecations:
|
||||
- gtk_widget_hide_all
|
||||
|
||||
* New APIs added to aid migration to GTK+ 3:
|
||||
- gtk_combo_box_new_with_model_and_entry
|
||||
|
||||
* Bugs fixed:
|
||||
624025 gdk_draw_rectangle bogged down by ColorSync
|
||||
632381 gtk_combo_box_text_new_with_entry() adds two...
|
||||
632539 Do not install gtkprivate.h
|
||||
633050 need gtk_combo_box_new_with_model_and_entry
|
||||
634060 Support for GIcon pixbufs
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.22.0 to 2.23.0
|
||||
==============================================
|
||||
|
||||
* New deprecations:
|
||||
- gdk_cairo_set_source_pixmap
|
||||
- Misc GdkDrawable APIs
|
||||
- gtk_object_destroy
|
||||
- gtk_init_add, gtk_remove_add, etc
|
||||
- gtk_noteboook_set_window_creation_hook
|
||||
- gtk_notebook_set/get_group
|
||||
- gtk_link_button_set_uri_hook
|
||||
- gtk_about_dialog_set_url/email_hook
|
||||
- GtkComboBoxEntry
|
||||
- combo box text convenience API
|
||||
|
||||
* New APIs added to aid migration to GTK+ 3:
|
||||
- gdk_cairo_set_source_window
|
||||
- GdkWindow API to supersede GdkDrawable API
|
||||
- gtk_notebook_set/get_group_name
|
||||
- GtkLinkButton::activate-link signal
|
||||
- gtk_combo_box_new_with_entry
|
||||
- GtkComboBoxText
|
||||
|
||||
* Bugs fixed:
|
||||
423201i gtk_combo_box_entry_active_changed does not transform...
|
||||
612396 Implement GtkComboBoxText subclass to supersede "text"...
|
||||
613728 Rationalize GtkTreeView focus
|
||||
629722 save_entry_get_info_cb() doesn't behave correctly
|
||||
629955 Deprecate / remove gtk_main and gtk_init_add / remove* API
|
||||
630521 Remove some remaining API warts from tab dnd api
|
||||
631473 Fix GTK+3 documentation
|
||||
631697 [2.24] build warnings which might crash 64-bit
|
||||
632140 optionally take hotspot coordinates from the pixbuf...
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.8 to 2.22.0
|
||||
==============================================
|
||||
|
||||
* Lower the gobject-introspection requirement to 0.9.3
|
||||
|
||||
* Bug fixes
|
||||
629748 Fails to build without XComposite
|
||||
|
||||
* Translation updates
|
||||
Basque
|
||||
Brazilian
|
||||
Czech
|
||||
Danish
|
||||
Dutch
|
||||
German
|
||||
Greek
|
||||
Gujarati
|
||||
Indonesian
|
||||
Japanese
|
||||
Simplified Chinese
|
||||
Uighur
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.7 to 2.21.8
|
||||
==============================================
|
||||
|
||||
* Deprecations:
|
||||
- Various style properties have been deprecated:
|
||||
GtkEntry::state-hint
|
||||
GtkTreeView::row-ending-details
|
||||
GtkRange::trough-side-details
|
||||
GtkRange::stepper-position-details
|
||||
GtkRange::activate-slider
|
||||
- The GtkIconView::orientation property has been deprecated
|
||||
and renamed to item-orientation
|
||||
- Separator-related API in GtkDialog
|
||||
- API related to blinking status icons
|
||||
- The keysym names have been renamed from GDK_... to GDK_KEY_...
|
||||
- The GtkItem class
|
||||
- The gdk_display variable and the GDK_DISPLAY macro
|
||||
|
||||
* GTK+ now uses standard icon names for stock icons, where applicable
|
||||
|
||||
* Win32:
|
||||
- Fixes to the MS Windows theme engine
|
||||
|
||||
* Directfb:
|
||||
- Many fixes
|
||||
|
||||
* Bugs fixed:
|
||||
414712 gtk_container_set_focus_child leaks widget
|
||||
601731 Drag and Drop from Workspace to Activities Overview
|
||||
628049 Native windows don't work very well
|
||||
628110 gtranslator inserts unwanted line breaks
|
||||
628291 Drawing artifacts when used with a cairo 1.9.*
|
||||
628308 docs referencing non existing icons
|
||||
628656 _gdk_windowing_get_startup_notify_id memory leak
|
||||
628932 key typing causes core dump in VNC environment
|
||||
629093 [patch] prefix GDK key names
|
||||
629277 Hanging because do_syntheszie_crossing_event...
|
||||
|
||||
* Updated translations:
|
||||
Arabic
|
||||
Basque
|
||||
British English
|
||||
Estonian
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Hebrew
|
||||
Hungarian
|
||||
Indonesian
|
||||
Italian
|
||||
Japanese
|
||||
Kazakh
|
||||
Korean
|
||||
Norwegian bokmål
|
||||
Polish
|
||||
Portuguese
|
||||
Slovian
|
||||
Spanish
|
||||
Swedish
|
||||
Tradition Chinese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.6 to 2.21.7
|
||||
==============================================
|
||||
|
||||
* Deprecations:
|
||||
- GtkWidget::draw-border has been deprecated
|
||||
|
||||
* The Windows backend has seen quite a bit of work
|
||||
towards fixing CSW regressions.
|
||||
|
||||
* Bugs fixed:
|
||||
528257 File selector and stock string problems
|
||||
614006 File chooser crashes when creating a new folder...
|
||||
616401 Noneffective gdk_keymap_map_virtual_modifiers...
|
||||
626537 Toggle button does not set indeterminate state
|
||||
627139 gtkfilechooserentry shows completion progress tool...
|
||||
627843 set_active_iter: remove restriction on path length
|
||||
628049 Native windows don't work very well
|
||||
|
||||
* Updated translations:
|
||||
British English
|
||||
French
|
||||
Galician
|
||||
Hebrew
|
||||
Indonesian
|
||||
Hungarian
|
||||
Norwegian bokmål
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.5 to 2.21.6
|
||||
==============================================
|
||||
|
||||
* Most drawing done by GTK+ itself has been ported from
|
||||
GDK drawing APIs to cairo
|
||||
|
||||
* GtkExpander gained a ::label-fill property to make the label
|
||||
fill the entire horizontal space
|
||||
|
||||
* Deprecations:
|
||||
- GtkNotebookPage
|
||||
- The GtkRecenManager::limit property
|
||||
- All GDK drawing functions, ie gdk_draw_*. Use cairo instead
|
||||
- All GdkGC functions. Use cairo instead
|
||||
- All of GdkImage. Use cairo instead
|
||||
- All of GdkRGB. Use cairo instead
|
||||
- gdk_{bit,pix}map_create_from_data
|
||||
|
||||
* New accessors:
|
||||
- gdk_cursor_get_cursor_type
|
||||
- gdk_device_get_n_axes
|
||||
- gdk_display_is_closed
|
||||
- gtk_notebook_get_tab_[hv]border
|
||||
|
||||
* New cairo-related APIs:
|
||||
- gdk_window_create_similar_surface
|
||||
- gdk_window_get_background_pattern
|
||||
|
||||
* Accessiblity:
|
||||
- Make Gail work with custom treemodels
|
||||
- Implement GailAdjustment::get_minimum_increment
|
||||
|
||||
* Bugs fixed:
|
||||
599574 Crash in _cairo_surface_set_error
|
||||
604391 ...assertion `ancestor != NULL' when switching between tab
|
||||
618327 GtkNotebookPage should be deprecated
|
||||
623603 meld built with pygtk-2.16.0 giving warnings
|
||||
623865 gtkdnd: pointer grab may never finish (ungrab before grab)
|
||||
624087 Missing accessor for GdkCursor.type
|
||||
624221 Gtk-2.21 Missing accessor for GdkDevice.num_axis
|
||||
624224 Missing accessor for GdkDisplay.closed
|
||||
624333 Deprecate GtkRecentManager:limit
|
||||
624687 switch-page bug when activated from menu
|
||||
624779 GtkCalendar padding/margin/spacing/border/whatever is too hard...
|
||||
625491 Generate GdkX11-2.0.typelib (backported from HEAD)
|
||||
625650 Add annotations to gtk_tree_model_iter_next() and gtk_tree_sel...
|
||||
|
||||
* Translation updates:
|
||||
Norwegian bokmål
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.4 to 2.21.5
|
||||
==============================================
|
||||
|
||||
* Deprecations:
|
||||
- Deprecate GdkRegion apis that have no cairo equivalent
|
||||
- GtkWindow::allow-grow and ::allow-shrink properties
|
||||
|
||||
* New accessors:
|
||||
- gdk_window_has_native
|
||||
|
||||
* Introspection: misc annotation fixes
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.3 to 2.21.4
|
||||
==============================================
|
||||
|
||||
* Revert a change in GtkCalendar that broke the pygtk build
|
||||
|
||||
* Fix the building of input methods as modules
|
||||
|
||||
* Include gdk-pixbuf-2.0 in the .pc file requires
|
||||
|
||||
* Various OS X fixes
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.2 to 2.21.3
|
||||
==============================================
|
||||
|
||||
* gdk-pixbuf has been moved into a separate module
|
||||
|
||||
* gtk_init warns if it detects GTK2.x and GTK3 being used
|
||||
in the same process
|
||||
|
||||
* Misc new API:
|
||||
gtk_accessible_set_widget
|
||||
gtk_message_dialog_get_message_area
|
||||
gtk_font_selection_dialog_get_font_selection
|
||||
gtk_window_group_get_current_grab
|
||||
gtk_table_get_size
|
||||
gtk_button_get_event_window
|
||||
gdk_device_manager_get_client_pointer
|
||||
gdk_image_get_pixels
|
||||
|
||||
* Bugs fixed:
|
||||
522756 gnome-appearance-properties crashed with SIGSEGV...
|
||||
615666 GTK_OBJECT_FLAGS() should be deprecated
|
||||
621136 GtkCalendar: Some functions always return TRUE
|
||||
621250 Missing accessors for GtkRange has_stepper_X
|
||||
621414 Can't select file on file browser popup after...
|
||||
621683 gtk_menu_attach_to_widget() should emit...
|
||||
621775 Space symbol missed in Resources chapter
|
||||
622011 Don't handle "connecting-to-device" state reason
|
||||
622371 Need gtk_accessible_set_widget
|
||||
622581 GtkButton has no accessor for event_window
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.1 to 2.21.2
|
||||
==============================================
|
||||
|
||||
* The newly added gdk_drag_context_get_action function has been
|
||||
renamed to gdk_drag_context_get_selected_action to make the
|
||||
name less confusing.
|
||||
|
||||
* Introspection annotations have been added in many places
|
||||
|
||||
* New accessors for sealed struct members:
|
||||
gtk_viewport_get_view_window
|
||||
gdk_drag_context_get_source_window
|
||||
|
||||
* Bug fixes:
|
||||
608218 GtkOffscreenWindow causes bad window with GtkEntry
|
||||
611709 Add gtk_statusbar_remove_all
|
||||
596428 GtkAssistant: Support ending with a progress page
|
||||
620511 Use g_source_set_name for all custom GSources in GTK+
|
||||
608537 Make the file chooser's sort arrows consistent
|
||||
620863
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.21.0 to 2.21.1
|
||||
==============================================
|
||||
|
||||
* GDK has been sealed, with the addition of suitable accessors
|
||||
|
||||
* Bugs:
|
||||
613132 GtkBoxChild should probably be deprecated
|
||||
592580 GDK needs sealing
|
||||
607628 DnD operation doesn't work when using offscreen.
|
||||
565559 Incorrect leave-notify signals for treeview
|
||||
618162 Description of GdkColor
|
||||
614581 Gtk print dialog freezes on start up
|
||||
533946 GtkHScale does not update correctly
|
||||
618271 Add gtk_window_has_group()
|
||||
618000 Sync paper size fallbacks with CLDR 1.8.1
|
||||
551322 configure does not use -lm in jasper (JPEG2000) testing
|
||||
619114 undefined reference to `XkbBell'
|
||||
618093 typo in gtkprintoperation.c, "selecion" should be "selection"
|
||||
|
||||
* Updated translations:
|
||||
Italian
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.20.0 to 2.21.0
|
||||
==============================================
|
||||
|
||||
* Support tracker 0.8 and 0.9 in the filechooser search code
|
||||
|
||||
* New API:
|
||||
- add API to convert coords between parent and child windows
|
||||
- add gdk_window_get_effective_parent() and
|
||||
gdk_window_get_effective_toplevel() which are offscreen aware
|
||||
- add gtk_widget_send_focus_change
|
||||
- add accessors for GtkTextView adjustments
|
||||
- add API to reset the im context in GtkTextView and GtkEntry
|
||||
|
||||
* Bug fixes:
|
||||
614513 Func to substitute GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_GRAB)?
|
||||
614510 Needed func for GTK_WIDGET_SET_FLAGS (widget, TOPLEVEL) ?
|
||||
614515 Func to substitute GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_DEFAULT)?
|
||||
163251 GtkTextView derivatives need some way to set the need_im_reset flag.
|
||||
69872 GTK_WIDGET_SET_FLAGS should be deprecated
|
||||
615028 gdk/x11/gdkdnd-x11.c missing Xutil.h
|
||||
615128 gdk monitor order does not seem to be correct
|
||||
616565 Fix a typo in the offscreen windows docs
|
||||
616118 please expand documentation for gdk_event_free()
|
||||
615000 gtk_builder_value_from_string_type() returns FALSE without..
|
||||
580889 table cells do not implement action interface
|
||||
616053 GtkTextView lacks accessors for hadjustment and vadjustment
|
||||
613988 Compile error on DirectFB backend due to missing of gdk_...
|
||||
614894 Add heuristic for pre XRandR 1.3 drivers
|
||||
560147 GtkBuilder docs should say what GErrors they throw
|
||||
615999 Gail doesn't send state-changed events for ATK_STATE_ENABLED
|
||||
613974 GtkToolItemGroup devides by 0 when allocating space for...
|
||||
614540 configure wants gio-unix on all platform
|
||||
557689 In 'select folder' action, filechooser doesn't work when...
|
||||
615853 BadMatch when pressing keyboard volume keys while pointer...
|
||||
613887 Misprint in the description of the function gtk_cell_view_...
|
||||
615162 Fix tooltips on offscreen widgets
|
||||
616851 assertion `GTK_IS_MISC (misc)' failed
|
||||
607839 libpixbufloader-png.so not in library list
|
||||
605186 Use G_DEFINE_INTERFACE macro
|
||||
402349 FileChooser's default directory is not "active"
|
||||
missing break statement in gtk_tool_item_group_set_property
|
||||
missing default events in GtkToolItemGroup
|
||||
fix a filechooser crash when removing files
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
Bengali India
|
||||
Catalan
|
||||
Catalan (Valencian)
|
||||
Danish
|
||||
Galician
|
||||
Greek
|
||||
Indonesian
|
||||
Kannada
|
||||
Kazakh
|
||||
Latvian
|
||||
Marathi
|
||||
Thai
|
||||
Ukrainian
|
||||
|
||||
Overview of Changes from GTK+ 2.19.7 to 2.20.0
|
||||
==============================================
|
||||
|
||||
|
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>
|
||||
|
11
autogen.sh
11
autogen.sh
@@ -19,7 +19,7 @@ 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
|
||||
1.4*|1.5*|2.2*)
|
||||
1.4*|1.5*|2.2*|2.4*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
@@ -76,7 +76,12 @@ test $TEST_TYPE $FILE || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
# NOCONFIGURE is used by gnome-common; support both
|
||||
if ! test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
NOCONFIGURE=1
|
||||
fi
|
||||
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
@@ -120,7 +125,7 @@ $AUTOMAKE --add-missing || exit $?
|
||||
autoconf || exit $?
|
||||
cd $ORIGDIR || exit $?
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
$srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
|
||||
|
||||
echo
|
||||
|
@@ -1,12 +1,9 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST = \
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.vsprops \
|
||||
gdk-pixbuf.vcproj \
|
||||
gdk-pixbuf-csource.vcproj \
|
||||
gdk-pixbuf-query-loaders.vcproj \
|
||||
gdk-win32.vcproj \
|
||||
gdk.vcproj \
|
||||
gdk.vcprojin \
|
||||
|
@@ -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"
|
||||
@@ -72,7 +72,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@@ -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"
|
||||
@@ -107,7 +107,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@@ -128,7 +128,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GdkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -137,7 +137,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@@ -208,6 +208,7 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File RelativePath="..\..\..\gdk\win32\rc\gdk.rc" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
|
@@ -1,43 +1,25 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf", "gdk-pixbuf.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-csource", "gdk-pixbuf-csource.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-query-loaders", "gdk-pixbuf-query-loaders.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-win32", "gdk-win32.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-demo", "gtk-demo.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}
|
||||
@@ -51,30 +33,6 @@ Global
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|
@@ -8,13 +8,13 @@
|
||||
>
|
||||
<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"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
|
||||
AdditionalDependencies="gdk_pixbuf-2.0.lib gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
|
||||
AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
|
||||
/>
|
||||
<Tool
|
||||
@@ -45,18 +45,6 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
Name="GtkPrefixDefine"
|
||||
Value="GTK_PREFIX=\"$(GtkDummyPrefix)\""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkPixbufIncludedLoaderDefines"
|
||||
Value="INCLUDE_ani;INCLUDE_icns;INCLUDE_pcx;INCLUDE_ras;INCLUDE_tga;INCLUDE_png;INCLUDE_pnm;INCLUDE_wbmp;INCLUDE_xbm;INCLUDE_xpm;INCLUDE_gdiplus"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkPixbufDefines"
|
||||
Value="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND;$(GtkPrefixDefine);$(GdkPixbufIncludedLoaderDefines)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkPixbufLibdirDefine"
|
||||
Value="PIXBUF_LIBDIR=\"$(GtkDummyPrefix)/lib/gtk-$(GtkApiVersion)/$(GtkBinaryVersion)/loaders\""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkDefines"
|
||||
Value="GDK_COMPILATION;G_LOG_DOMAIN=\"Gdk\""
|
||||
@@ -67,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"
|
||||
@@ -75,24 +63,19 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
echo on

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

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

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

|
||||
|
||||
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

|
||||
|
||||
mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf

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

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

|
||||
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-enum-types.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf

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

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

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

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

|
||||
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-simple-anim.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf

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

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

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

|
||||
|
||||
mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

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

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

|
||||
@@ -112,10 +95,10 @@ copy ..\..\..\gdk\gdkimage.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk
&#x
|
||||
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\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\gdkpixmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

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

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

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

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

|
||||
@@ -159,6 +142,7 @@ copy ..\..\..\gtk\gtkcellrenderercombo.h $(OutDir)\include\gtk-$(GtkApiVersion)\
|
||||
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

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

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

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

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

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

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

|
||||
@@ -172,6 +156,7 @@ 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

|
||||
@@ -240,6 +225,7 @@ 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

|
||||
@@ -253,7 +239,6 @@ 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

|
||||
@@ -284,6 +269,7 @@ copy ..\..\..\gtk\gtksignal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
&#
|
||||
copy ..\..\..\gtk\gtksizegroup.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

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

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

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

|
||||
@@ -309,6 +295,8 @@ copy ..\..\..\gtk\gtktoggletoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\g
|
||||
copy ..\..\..\gtk\gtktoolbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

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

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

|
||||
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

|
||||
@@ -345,14 +333,14 @@ copy ..\..\..\gdk\gdkconfig.h $(OutDir)\lib\gtk-$(GtkApiVersion)\include
&#
|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGenerateGdkPixbufDef"
|
||||
Value="echo EXPORTS >"$(IntDir)\gdk-pixbuf.def" && cl /EP -DG_OS_WIN32 -DINCLUDE_VARIABLES -DALL_FILES -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= ..\..\..\gdk-pixbuf\gdk-pixbuf.symbols >>"$(IntDir)\gdk-pixbuf.def""
|
||||
/>
|
||||
<UserMacro
|
||||
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""
|
||||
@@ -377,11 +365,11 @@ copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\l
|
||||
GtkLibtoolCompatibleDllSuffix if that is what you want -->
|
||||
<UserMacro
|
||||
Name="GtkDllPrefix"
|
||||
Value="$(GtkLibtoolCompatibleDllPrefix)"
|
||||
Value="$(GtkSeparateVS9DllPrefix)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDllSuffix"
|
||||
Value="$(GtkLibtoolCompatibleDllSuffix)"
|
||||
Value="$(GtkSeparateVS9DllSuffix)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GlibEtcInstallRoot"
|
||||
|
@@ -76,9 +76,10 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
@@ -106,9 +107,10 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
@@ -138,9 +140,10 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
|
@@ -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,11 +203,12 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gtk.def"
|
||||
CommandLine="$(GtkGenerateGtkDef)"
|
||||
CommandLine="$(GtkGenerateGtkDefW64)"
|
||||
Outputs="$(IntDir)\gtk.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
|
492
configure.in
492
configure.in
@@ -11,9 +11,9 @@ AC_PREREQ(2.62)
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [21])
|
||||
m4_define([gtk_micro_version], [0])
|
||||
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],
|
||||
@@ -31,10 +31,11 @@ m4_define([gtk_api_version], [2.0])
|
||||
m4_define([gtk_binary_version], [2.10.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.23.6])
|
||||
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.6])
|
||||
+m4_define([gdk_pixbuf_required_version], [2.21.0])
|
||||
|
||||
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
@@ -108,19 +109,6 @@ 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])
|
||||
|
||||
#
|
||||
# gdk-pixbuf gets versioned separately, and for now, using standard
|
||||
# libtool versioning, not GTK+-style versioning
|
||||
#
|
||||
GDK_PIXBUF_MAJOR=gtk_major_version
|
||||
GDK_PIXBUF_MINOR=gtk_minor_version
|
||||
GDK_PIXBUF_MICRO=gtk_micro_version
|
||||
GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
|
||||
AC_SUBST(GDK_PIXBUF_MAJOR)
|
||||
AC_SUBST(GDK_PIXBUF_MINOR)
|
||||
AC_SUBST(GDK_PIXBUF_MICRO)
|
||||
AC_SUBST(GDK_PIXBUF_VERSION)
|
||||
|
||||
GETTEXT_PACKAGE=gtk20
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||
@@ -387,7 +375,8 @@ 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])
|
||||
cairo >= cairo_required_version dnl
|
||||
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
|
||||
|
||||
## In addition to checking that cairo is present, we also need to
|
||||
## check that the correct cairo backend is there. E.g. if the GDK
|
||||
@@ -407,7 +396,7 @@ if test "$os_win32" != yes; then
|
||||
# right now, symbols starting with _ are not exported
|
||||
LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
|
||||
else
|
||||
# We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
|
||||
# We currently use .def files on Windows (for gdk and gtk)
|
||||
LIBTOOL_EXPORT_OPTIONS=
|
||||
fi
|
||||
AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
|
||||
@@ -616,7 +605,7 @@ 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 gmodule-no-export-2.0"
|
||||
GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
|
||||
|
||||
AM_PATH_GLIB_2_0(glib_required_version, :,
|
||||
AC_MSG_ERROR([
|
||||
@@ -762,27 +751,7 @@ AC_MSG_RESULT($gtk_uxtheme_h)
|
||||
AC_CHECK_HEADERS(crt_externs.h)
|
||||
AC_CHECK_FUNCS(_NSGetEnviron)
|
||||
|
||||
|
||||
##################################################
|
||||
# Checks for gdk-pixbuf
|
||||
##################################################
|
||||
|
||||
dnl ********************************************************
|
||||
dnl * See whether we need to load our modules as .la files *
|
||||
dnl ********************************************************
|
||||
|
||||
use_la_modules=false
|
||||
case $host in
|
||||
*-aix*) use_la_modules=true
|
||||
esac
|
||||
|
||||
if $use_la_modules ; then
|
||||
AC_DEFINE(USE_LA_MODULES, 1,
|
||||
[Whether to load modules via .la files rather than directly])
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
|
||||
AC_MSG_CHECKING(whether to build dynamic modules)
|
||||
|
||||
AC_ARG_ENABLE(modules,
|
||||
[AC_HELP_STRING([--disable-modules],
|
||||
@@ -804,13 +773,13 @@ else
|
||||
dnl Now we check to see if our libtool supports shared lib deps
|
||||
dnl (in a rather ugly way even)
|
||||
if $dynworks; then
|
||||
pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
|
||||
pixbuf_deplibs_check=`$pixbuf_libtool_config | \
|
||||
module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
|
||||
module_deplibs_check=`$module_libtool_config | \
|
||||
grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
|
||||
sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
|
||||
if test "x$pixbuf_deplibs_check" = "xnone" || \
|
||||
test "x$pixbuf_deplibs_check" = "xunknown" || \
|
||||
test "x$pixbuf_deplibs_check" = "x"; then
|
||||
if test "x$module_deplibs_check" = "xnone" || \
|
||||
test "x$module_deplibs_check" = "xunknown" || \
|
||||
test "x$module_deplibs_check" = "x"; then
|
||||
dynworks=false
|
||||
fi
|
||||
fi
|
||||
@@ -824,297 +793,8 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl We allow people to disable image loaders explicitely, but if they don't we error
|
||||
dnl out so that people don't accidentally build without them.
|
||||
|
||||
AC_ARG_WITH(libpng,
|
||||
[AC_HELP_STRING([--without-libpng],
|
||||
[disable PNG loader for gdk-pixbuf])])
|
||||
AC_ARG_WITH(libjpeg,
|
||||
[AC_HELP_STRING([--without-libjpeg],
|
||||
[disable JPEG loader for gdk-pixbuf])])
|
||||
AC_ARG_WITH(libtiff,
|
||||
[AC_HELP_STRING([--without-libtiff],
|
||||
[disable TIFF loader for gdk-pixbuf])])
|
||||
AC_ARG_WITH(libjasper,
|
||||
[AC_HELP_STRING([--with-libjasper],
|
||||
[enable JPEG2000 loader for gdk-pixbuf])])
|
||||
|
||||
AC_ARG_ENABLE(gdiplus,
|
||||
[AC_HELP_STRING([--enable-gdiplus],
|
||||
[enble GDI+ loaders for gdk-pixbuf (currently known to be broken)])],,
|
||||
[enable_gdiplus=no])
|
||||
|
||||
AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
|
||||
|
||||
dnl Test for libtiff
|
||||
if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
|
||||
if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
|
||||
AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
|
||||
[AC_CHECK_HEADER(tiffio.h,
|
||||
TIFF='tiff'; LIBTIFF='-ltiff',
|
||||
AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
|
||||
[AC_CHECK_LIB(tiff, TIFFWriteScanline,
|
||||
[AC_CHECK_HEADER(tiffio.h,
|
||||
TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
|
||||
AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
|
||||
[AC_CHECK_LIB(tiff34, TIFFFlushData,
|
||||
[AC_CHECK_HEADER(tiffio.h,
|
||||
TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
|
||||
AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
|
||||
AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
|
||||
fi
|
||||
|
||||
if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
|
||||
AC_MSG_ERROR([
|
||||
*** Checks for TIFF loader failed. You can build without it by passing
|
||||
*** --without-libtiff to configure but some programs using GTK+ may
|
||||
*** not work properly])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Test for libjpeg
|
||||
if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
|
||||
if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
|
||||
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
|
||||
jpeg_ok=yes,
|
||||
jpeg_ok=no
|
||||
AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
|
||||
if test "$jpeg_ok" = yes; then
|
||||
AC_MSG_CHECKING([for jpeglib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#undef HAVE_STDLIB_H
|
||||
#include <jpeglib.h>],
|
||||
jpeg_ok=yes,
|
||||
jpeg_ok=no)
|
||||
AC_MSG_RESULT($jpeg_ok)
|
||||
if test "$jpeg_ok" = yes; then
|
||||
LIBJPEG='-ljpeg'
|
||||
AC_CHECK_LIB(jpeg, jpeg_simple_progression,
|
||||
AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1,
|
||||
[Define to 1 is libjpeg supports progressive JPEG]),
|
||||
AC_MSG_WARN(JPEG library does not support progressive saving.))
|
||||
else
|
||||
AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
|
||||
AC_MSG_ERROR([
|
||||
*** Checks for JPEG loader failed. You can build without it by passing
|
||||
*** --without-libjpeg to configure but some programs using GTK+ may
|
||||
*** not work properly])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Test for libpng
|
||||
if test x$with_libpng != xno && test -z "$LIBPNG"; then
|
||||
AC_MSG_CHECKING(for libpng12)
|
||||
if $PKG_CONFIG --exists libpng12 ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
PNG='png'
|
||||
PNG_DEP_CFLAGS_PACKAGES=libpng12
|
||||
LIBPNG=`$PKG_CONFIG --libs libpng12`
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_CHECK_LIB(png, png_read_info,
|
||||
[AC_CHECK_HEADER(png.h,
|
||||
png_ok=yes,
|
||||
png_ok=no)],
|
||||
AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
|
||||
if test "$png_ok" = yes; then
|
||||
AC_MSG_CHECKING([for png_structp in png.h])
|
||||
AC_TRY_COMPILE([#include <png.h>],
|
||||
[png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
|
||||
png_ok=yes,
|
||||
png_ok=no)
|
||||
AC_MSG_RESULT($png_ok)
|
||||
if test "$png_ok" = yes; then
|
||||
PNG='png'; LIBPNG='-lpng -lz'
|
||||
else
|
||||
AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$with_libpng != xno && test -z "$LIBPNG"; then
|
||||
AC_MSG_ERROR([
|
||||
*** Checks for PNG loader failed. You can build without it by passing
|
||||
*** --without-libpng to configure but many programs using GTK+ will
|
||||
*** not work properly. The PNG loader is also needed if you are compiling
|
||||
*** from CVS.])
|
||||
fi
|
||||
|
||||
dnl Test for libjasper
|
||||
if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
|
||||
AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
|
||||
fi
|
||||
|
||||
if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
|
||||
AC_MSG_ERROR([
|
||||
*** Checks for JPEG2000 loader failed. You can build without it by passing
|
||||
*** --without-libjasper to configure])
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBTIFF)
|
||||
AC_SUBST(LIBJPEG)
|
||||
AC_SUBST(LIBPNG)
|
||||
AC_SUBST(LIBJASPER)
|
||||
|
||||
AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
|
||||
|
||||
#
|
||||
# Allow building some or all gdk-pixbuf loaders included
|
||||
#
|
||||
AC_MSG_CHECKING(pixbuf loaders to build)
|
||||
|
||||
dnl due to an autoconf bug, commas in the first arg to
|
||||
dnl AC_HELP_STRING cause problems.
|
||||
dnl AC_HELP_STRING([--with-included-loaders=LOADER1 LOADER2 ...],
|
||||
dnl [build the specified loaders into gdk-pixbuf])
|
||||
AC_ARG_WITH(included_loaders,
|
||||
[ --with-included-loaders=LOADER1,LOADER2,...
|
||||
build the specified loaders into gdk-pixbuf])
|
||||
|
||||
if $dynworks; then
|
||||
:
|
||||
else
|
||||
## if the option was specified, leave it; otherwise disable included loaders
|
||||
if test x$with_included_loaders = xno; then
|
||||
with_included_loaders=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use the traditional png loader instead of the GDI+ one on Windows,
|
||||
# because some important apps like GIMP need to read and write
|
||||
# arbitrary tEXt chunks which doesn't seem to be possible through GDI+
|
||||
|
||||
all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm,qtif"
|
||||
if test x$with_libjasper != xno; then
|
||||
all_loaders="$all_loaders,jasper"
|
||||
fi
|
||||
if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then
|
||||
# Skip PNG, see comment above
|
||||
gdip_formats="bmp emf gif ico jpeg tiff wmf"
|
||||
for f in $gdip_formats; do
|
||||
all_loaders="$all_loaders,gdip-$f"
|
||||
done
|
||||
else
|
||||
all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
|
||||
fi
|
||||
included_loaders=""
|
||||
# If no loaders specified, include all
|
||||
if test "x$with_included_loaders" = xyes ; then
|
||||
included_loaders="$all_loaders"
|
||||
else
|
||||
included_loaders="$with_included_loaders"
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT($included_loaders)
|
||||
|
||||
INCLUDED_LOADER_OBJ=
|
||||
INCLUDED_LOADER_DEFINE=
|
||||
|
||||
IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
|
||||
for loader in $included_loaders; do
|
||||
if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([the specified loader $loader does not exist])
|
||||
fi
|
||||
|
||||
loader_underscores=`echo $loader | sed -e 's/-/_/g'`
|
||||
INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
|
||||
|
||||
# Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
|
||||
case $loader in
|
||||
gdip-*) ;;
|
||||
*) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
|
||||
esac
|
||||
eval INCLUDE_$loader_underscores=yes
|
||||
done
|
||||
|
||||
# Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
|
||||
# (except gdip-png, which isn't built at all)
|
||||
if test x"$INCLUDE_gdip_ico" = xyes; then
|
||||
INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
|
||||
fi
|
||||
|
||||
IFS="$gtk_save_ifs"
|
||||
AC_SUBST(INCLUDED_LOADER_OBJ)
|
||||
AC_SUBST(INCLUDED_LOADER_DEFINE)
|
||||
|
||||
AM_CONDITIONAL(INCLUDE_PNG, [test x"$INCLUDE_png" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_BMP, [test x"$INCLUDE_bmp" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_WBMP, [test x"$INCLUDE_wbmp" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_GIF, [test x"$INCLUDE_gif" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_ICO, [test x"$INCLUDE_ico" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_ANI, [test x"$INCLUDE_ani" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_JPEG, [test x"$INCLUDE_jpeg" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_PNM, [test x"$INCLUDE_pnm" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_RAS, [test x"$INCLUDE_ras" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_TIFF, [test x"$INCLUDE_tiff" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_XPM, [test x"$INCLUDE_xpm" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_XBM, [test x"$INCLUDE_xbm" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_QTIF, [test x"$INCLUDE_qtif" = xyes])
|
||||
# As all GDI+ loaders are either built-in or not, arbitrarily just
|
||||
# check one of the variables here
|
||||
AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
|
||||
|
||||
if test x$gio_can_sniff = x; then
|
||||
AC_MSG_CHECKING([if gio can sniff png])
|
||||
gtk_save_LIBS="$LIBS"
|
||||
gtk_save_CFLAGS="$CFLAGS"
|
||||
LIBS="`$PKG_CONFIG --libs gio-2.0`"
|
||||
CFLAGS="`$PKG_CONFIG --cflags gio-2.0`"
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <gio/gio.h>
|
||||
static const gsize data_size = 159;
|
||||
static const guint8 data[] =
|
||||
{
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
|
||||
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
|
||||
0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00,
|
||||
0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00,
|
||||
0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74,
|
||||
0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8,
|
||||
0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f,
|
||||
0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57,
|
||||
0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08,
|
||||
0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc,
|
||||
0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
|
||||
0x42, 0x60, 0x82
|
||||
};
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
char *content_type;
|
||||
char *image_png;
|
||||
content_type = g_content_type_guess (NULL, data, data_size, NULL);
|
||||
image_png = g_content_type_from_mime_type ("image/png");
|
||||
return !!strcmp (content_type, image_png);
|
||||
}]])],
|
||||
[gio_can_sniff=yes
|
||||
AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],
|
||||
[gio_can_sniff=no])
|
||||
AC_MSG_RESULT($gio_can_sniff)
|
||||
LIBS="$gtk_save_LIBS"
|
||||
CFLAGS="$gtk_save_CFLAGS"
|
||||
fi
|
||||
|
||||
#
|
||||
# Allow building some or all immodules included
|
||||
#
|
||||
@@ -1194,29 +874,6 @@ AC_HEADER_SYS_WAIT
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
|
||||
AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
|
||||
AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
|
||||
AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
|
||||
|
||||
if $dynworks ; then
|
||||
STATIC_LIB_DEPS=
|
||||
if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
|
||||
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
|
||||
fi
|
||||
if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
|
||||
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
|
||||
fi
|
||||
if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
|
||||
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
|
||||
fi
|
||||
if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
|
||||
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
|
||||
fi
|
||||
else
|
||||
STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
|
||||
fi
|
||||
|
||||
# Checks to see whether we should include mediaLib
|
||||
# support.
|
||||
#
|
||||
@@ -1249,64 +906,19 @@ fi
|
||||
AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
|
||||
AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
|
||||
|
||||
# Checks to see if we should compile in MMX support (there will be
|
||||
# a runtime test when the code is actually run to see if it should
|
||||
# be used - this just checks if we can compile it.)
|
||||
#
|
||||
# This code is partially taken from Mesa
|
||||
#
|
||||
AC_MSG_CHECKING(for x86 platform)
|
||||
case $host_cpu in
|
||||
i386|i486|i586|i686|i786|k6|k7)
|
||||
use_x86_asm=yes
|
||||
;;
|
||||
*)
|
||||
use_x86_asm=no
|
||||
esac
|
||||
AC_MSG_RESULT($use_x86_asm)
|
||||
|
||||
use_mmx_asm=no
|
||||
if test $use_x86_asm = yes; then
|
||||
save_ac_ext=$ac_ext
|
||||
ac_ext=S
|
||||
|
||||
AC_MSG_CHECKING(compiler support for MMX)
|
||||
cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
use_mmx_asm=yes
|
||||
fi
|
||||
|
||||
rm -rf conftest*
|
||||
|
||||
ac_ext=$save_ac_ext
|
||||
if test $use_mmx_asm = yes; then
|
||||
AC_DEFINE(USE_MMX, 1,
|
||||
[Define to 1 if XXM is available and should be used])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
|
||||
|
||||
REBUILD_PNGS=
|
||||
if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
|
||||
REBUILD_PNGS=#
|
||||
fi
|
||||
|
||||
dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
|
||||
|
||||
if test $cross_compiling = yes; then
|
||||
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
|
||||
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
|
||||
if test x$GTK_UPDATE_ICON_CACHE = xno; then
|
||||
REBUILD_PNGS=#
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
|
||||
|
||||
if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
|
||||
test "x$REBUILD_PNGS" = "x#" ; then
|
||||
AC_MSG_ERROR([
|
||||
@@ -1315,22 +927,10 @@ if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
|
||||
*** don't have a prebuilt gtk-update-icon-cache on the build system.])
|
||||
fi
|
||||
|
||||
AC_SUBST(REBUILD_PNGS)
|
||||
|
||||
GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
|
||||
GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
|
||||
GDK_PIXBUF_EXTRA_CFLAGS=
|
||||
GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
|
||||
GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
|
||||
|
||||
########################################
|
||||
# Windowing system checks
|
||||
########################################
|
||||
|
||||
GDK_PIXBUF_XLIB_PACKAGES=
|
||||
GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
|
||||
GDK_PIXBUF_XLIB_EXTRA_LIBS=
|
||||
|
||||
GDK_EXTRA_LIBS="$GDK_WLIBS"
|
||||
GDK_EXTRA_CFLAGS=
|
||||
|
||||
@@ -1368,8 +968,7 @@ if test "x$gdktarget" = "xx11"; then
|
||||
*) x_libs_for_checks="$x_libs_for_checks $I" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
GDK_PIXBUF_XLIB_PACKAGES="x11"
|
||||
|
||||
GTK_PACKAGES_FOR_X="x11"
|
||||
else
|
||||
have_base_x_pc=false
|
||||
@@ -1381,8 +980,6 @@ if test "x$gdktarget" = "xx11"; then
|
||||
x_cflags="$X_CFLAGS"
|
||||
x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
|
||||
|
||||
GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
|
||||
GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
|
||||
fi
|
||||
|
||||
@@ -1662,15 +1259,6 @@ else
|
||||
AM_CONDITIONAL(USE_QUARTZ, false)
|
||||
fi
|
||||
|
||||
GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
|
||||
GDK_PIXBUF_XLIB_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_PIXBUF_XLIB_EXTRA_CFLAGS"
|
||||
|
||||
AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
|
||||
AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
|
||||
AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
|
||||
AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
|
||||
AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
|
||||
if test "x$gdktarget" = "xdirectfb"; then
|
||||
DIRECTFB_REQUIRED_VERSION=1.0.0
|
||||
AC_MSG_CHECKING(for DirectFB)
|
||||
@@ -1721,19 +1309,19 @@ 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 cairo-$cairo_backend"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend"
|
||||
else
|
||||
GDK_PACKAGES="$PANGO_PACKAGES $X_PACKAGES cairo-$cairo_backend"
|
||||
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_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
|
||||
#
|
||||
# If we aren't writing explicit dependencies, then don't put the extra libraries we need
|
||||
# into the pkg-config files
|
||||
#
|
||||
if test $enable_explicit_deps != yes ; then
|
||||
GDK_PACKAGES="$PANGO_PACKAGES"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0"
|
||||
GDK_EXTRA_LIBS=
|
||||
fi
|
||||
|
||||
@@ -1773,14 +1361,14 @@ else
|
||||
LIBS="$gtk_save_LIBS"
|
||||
fi
|
||||
|
||||
GTK_PACKAGES="atk cairo 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_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
|
||||
GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_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"
|
||||
|
||||
if test x"$os_win32" = xyes; then
|
||||
GTK_EXTRA_CFLAGS="$msnative_struct"
|
||||
@@ -1791,16 +1379,6 @@ ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
|
||||
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
|
||||
CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
|
||||
|
||||
if test $enable_explicit_deps != yes ; then
|
||||
GDK_PIXBUF_EXTRA_LIBS=
|
||||
fi
|
||||
|
||||
AC_SUBST(GDK_PIXBUF_PACKAGES)
|
||||
AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
|
||||
AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
|
||||
AC_SUBST(GDK_PIXBUF_DEP_LIBS)
|
||||
AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
|
||||
|
||||
AC_SUBST(GTK_PACKAGES)
|
||||
AC_SUBST(GTK_EXTRA_LIBS)
|
||||
AC_SUBST(GTK_EXTRA_CFLAGS)
|
||||
@@ -1815,6 +1393,9 @@ AC_SUBST(CAIRO_PREFIX)
|
||||
AC_SUBST(GTK_DEBUG_FLAGS)
|
||||
AC_SUBST(GTK_XIM_FLAGS)
|
||||
|
||||
GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
|
||||
AC_SUBST(GDK_PIXBUF_LIBS)
|
||||
|
||||
########################
|
||||
# Checks needed for gail
|
||||
########################
|
||||
@@ -1976,8 +1557,6 @@ AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
|
||||
export SED
|
||||
export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
|
||||
if test -n "$export_dynamic"; then
|
||||
GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
fi
|
||||
@@ -1986,7 +1565,7 @@ fi
|
||||
# GObject introspection
|
||||
##################################################
|
||||
|
||||
GOBJECT_INTROSPECTION_CHECK([0.6.7])
|
||||
GOBJECT_INTROSPECTION_CHECK([0.9.3])
|
||||
|
||||
##################################################
|
||||
# Checks for gtk-doc and docbook-tools
|
||||
@@ -2109,12 +1688,10 @@ AC_CONFIG_FILES([
|
||||
config.h.win32
|
||||
gtk-zip.sh
|
||||
Makefile
|
||||
gdk-pixbuf-2.0.pc
|
||||
gdk-2.0.pc
|
||||
gtk+-2.0.pc
|
||||
gtk+-unix-print-2.0.pc
|
||||
gail.pc
|
||||
gdk-pixbuf-2.0-uninstalled.pc
|
||||
gdk-2.0-uninstalled.pc
|
||||
gtk+-2.0-uninstalled.pc
|
||||
gail-uninstalled.pc
|
||||
@@ -2127,8 +1704,6 @@ demos/gtk-demo/geninclude.pl
|
||||
tests/Makefile
|
||||
docs/Makefile
|
||||
docs/reference/Makefile
|
||||
docs/reference/gdk-pixbuf/Makefile
|
||||
docs/reference/gdk-pixbuf/version.xml
|
||||
docs/reference/gdk/Makefile
|
||||
docs/reference/gdk/version.xml
|
||||
docs/reference/gtk/Makefile
|
||||
@@ -2140,10 +1715,6 @@ docs/tutorial/Makefile
|
||||
build/Makefile
|
||||
build/win32/Makefile
|
||||
build/win32/vs9/Makefile
|
||||
gdk-pixbuf/Makefile
|
||||
gdk-pixbuf/gdk_pixbuf.rc
|
||||
gdk-pixbuf/gdk-pixbuf-features.h
|
||||
gdk-pixbuf/pixops/Makefile
|
||||
gdk/Makefile
|
||||
gdk/x11/Makefile
|
||||
gdk/win32/Makefile
|
||||
@@ -2176,9 +1747,6 @@ modules/printbackends/file/Makefile
|
||||
modules/printbackends/papi/Makefile
|
||||
modules/printbackends/test/Makefile
|
||||
perf/Makefile
|
||||
contrib/Makefile
|
||||
contrib/gdk-pixbuf-xlib/Makefile
|
||||
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
@@ -1,8 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS =
|
||||
if USE_X11
|
||||
SUBDIRS += gdk-pixbuf-xlib
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
@@ -1,354 +0,0 @@
|
||||
=== ChangeLog discontinued ===
|
||||
|
||||
With the move to git, GTK+ is switching from a ChangeLog file
|
||||
to relying on commit messages to provide change history. Please
|
||||
see README.commits for guidance on the expected message format.
|
||||
|
||||
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.16.0 ===
|
||||
|
||||
2009-03-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.15.5 ===
|
||||
|
||||
2009-02-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.15.4 ===
|
||||
|
||||
2009-02-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.15.3 ===
|
||||
|
||||
2009-01-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.15.2 ===
|
||||
|
||||
2009-01-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.15.1 ===
|
||||
|
||||
2009-01-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.15.0 ===
|
||||
|
||||
2008-09-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.2 ===
|
||||
|
||||
2008-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.1 ===
|
||||
|
||||
2008-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.0 ===
|
||||
|
||||
2008-08-18 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* ==== Released 2.13.7 ===
|
||||
|
||||
2008-08-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.13.6 ===
|
||||
|
||||
2008-07-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.13.5 ===
|
||||
|
||||
2008-07-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.13.4 ===
|
||||
|
||||
2008-06-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.13.3 ===
|
||||
|
||||
2008-06-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.13.2 ===
|
||||
|
||||
2008-05-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.13.1 ===
|
||||
|
||||
2008-05-26 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gdk-pixbuf-xlib.h
|
||||
* gdk-pixbuf-xlibrgb.h: use G_BEGIN/END_DECLS.
|
||||
|
||||
2008-02-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.13.0 ===
|
||||
|
||||
2007-10-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.12.1 ===
|
||||
|
||||
2007-09-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.12.0 ===
|
||||
|
||||
2007-07-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.11.6 ===
|
||||
|
||||
2007-07-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.11.5 ===
|
||||
|
||||
2007-06-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.11.4 ===
|
||||
|
||||
2007-06-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.11.3 ===
|
||||
|
||||
2007-06-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.11.2 ===
|
||||
|
||||
2007-06-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.11.1 ===
|
||||
|
||||
2007-05-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.11.0 ===
|
||||
|
||||
2006-10-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib.c: Apply a cleanup patch by
|
||||
Kjartan Maraas (#341812)
|
||||
|
||||
2006-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.2 ===
|
||||
|
||||
2006-07-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.1 ===
|
||||
|
||||
2006-07-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.0 ===
|
||||
|
||||
2006-06-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.9.4 ===
|
||||
|
||||
2006-06-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.9.3 ===
|
||||
|
||||
2006-06-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.9.2 ===
|
||||
|
||||
2006-05-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.9.1 ====
|
||||
|
||||
2006-05-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.9.0 ===
|
||||
|
||||
2005-11-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib-drawable.c:
|
||||
* gdk-pixbuf-xlibrgb.c: const correctness fixes
|
||||
found by Arjan van de Ven and gcc.
|
||||
|
||||
2005-10-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib-2.0.pc.in (Requires): Require
|
||||
gmodule-no-export-2.0 instead of gmodule-2.0
|
||||
|
||||
2005-08-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.2 ===
|
||||
|
||||
* === Released 2.8.1 ===
|
||||
|
||||
2005-08-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.0 ===
|
||||
|
||||
2005-08-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.7.5 ===
|
||||
|
||||
2005-07-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.7.4 ===
|
||||
|
||||
2005-07-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.7.3 ===
|
||||
|
||||
2005-07-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.7.2 ===
|
||||
|
||||
2005-07-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.7.1 ===
|
||||
|
||||
2005-06-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.7.0 ===
|
||||
|
||||
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.6.1 ===
|
||||
|
||||
2004-12-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.6.0 ===
|
||||
|
||||
2004-12-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.6 ===
|
||||
|
||||
2004-11-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.5 ===
|
||||
|
||||
2004-10-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.4 ===
|
||||
|
||||
2004-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.3 ===
|
||||
|
||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.2 ===
|
||||
|
||||
2004-08-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.1 ===
|
||||
|
||||
Tue Jul 20 23:26:10 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c: Include config.h first. (#148034)
|
||||
|
||||
Sun Jul 18 20:17:41 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* === released 2.5.0 ==
|
||||
|
||||
Tue Mar 9 09:33:54 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* === Released 2.3.6 ===
|
||||
|
||||
Wed Mar 3 15:50:28 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (libgdk_pixbuf_xlib_2_0_la_LIBADD): Add
|
||||
a shared library dependency on libgdk-pixbuf (#124687)
|
||||
|
||||
Tue Feb 24 14:45:03 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* === Released 2.3.3 ===
|
||||
|
||||
Fri Feb 13 10:32:09 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.h: Remove a couple of unneeded
|
||||
#includes. Isn't unsupported code fun?
|
||||
(133833, Gregory Merchan)
|
||||
|
||||
Tue Oct 7 23:30:00 2003 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk-pixbuf-xlib.h: Add C++ guards. (123955, Harring Figueiredo)
|
||||
|
||||
2002-08-06 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* Makefile.am (lib_LTLIBRARIES): link against xlibs
|
||||
|
||||
2002-01-25 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merge from gdk-pixbuf stable.
|
||||
|
||||
* gdk-pixbuf-xlib-drawable.c (rgb565msb): Fixed the endianness
|
||||
conversion --- swap the individual 16 bit values instead of taking
|
||||
everying as a 32 bit value.
|
||||
(rgb565lsb): Likewise.
|
||||
(rgb555lsb): Likewise.
|
||||
(rgb555msb): Likewise.
|
||||
|
||||
2001-11-26 Akira TAGOH <tagoh@redhat.com>
|
||||
|
||||
* Makefile.am (libgdk_pixbuf_xlib_1_3_la_LDFLAGS):
|
||||
Added -version-info.
|
||||
|
||||
2001-05-19 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c: docs
|
||||
|
||||
2001-06-04 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c (xlib_rgb_init): remove C++ comment,
|
||||
reported by Dan McNichol
|
||||
|
||||
Mon Jan 8 11:41:41 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (INCLUDES): Add @x_cflags@ (#36310)
|
||||
|
||||
2001-01-02 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib-2.0.pc.in (Description): fix up description a bit.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib.c: Put display/screen here, instead of in
|
||||
the main gdk-pixbuf library as it was in 1.0; since the io-xpm
|
||||
loader doesn't use these variables anymore it should be OK
|
||||
|
||||
2000-09-26 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-drawable.c
|
||||
(gdk_pixbuf_xlib_get_from_drawable): Do not use
|
||||
gdk_screen_{width,height}(). Thanks to John Harper for pointing
|
||||
this out.
|
||||
|
||||
2000-08-26 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlibrgb.c: Added API reference docs.
|
||||
|
||||
2000-08-25 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-drawable.c (handle_x_error): Return
|
||||
0.
|
||||
(xlib_window_is_viewable): Return FALSE in the last case.
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-render.c: Updated the inline docs.
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib.c: Added API docs.
|
||||
|
||||
2000-08-25 John Harper <john@dcs.warwick.ac.uk>
|
||||
|
||||
Work to create an Xlib version of gdk-pixbuf (with the Xlib
|
||||
port of GdkRGB for rendering):
|
||||
|
||||
* configure.in: check for X libraries, set and substitute
|
||||
GDK_PIXBUF_XLIB_{LIBDIR,INCLUDEDIR,LIBS} variables
|
||||
|
||||
* gdk_pixbuf_xlibConf.sh.in: new file -- gnome-config details
|
||||
for the gdk-pixbuf-xlib library
|
||||
* Makefile.am: build and install gdk_pixbuf_xlibConf.sh
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-render.c,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib.c, gdk-pixbuf/gdk-pixbuf-xlib.h,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib-private.h,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib-drawable.c: new files, ported the
|
||||
GDK dependent parts of gdk-pixbuf to use Xlib. Functions that
|
||||
were called gdk_pixbuf_FOO are now gdk_pixbuf_xlib_FOO
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlibrgb.c,
|
||||
gdk-pixbuf/gdk-pixbuf-xlibrgb.h: added Chris Blizzard's Xlib
|
||||
port of GdkRGB (from Mozilla CVS)
|
||||
|
||||
* gdk-pixbuf/Makefile.am: build a library libgdk_pixbuf_xlib.la
|
||||
including the non-GDK dependent objects from libgdk_pixbuf.la
|
||||
plus the Xlib ports and xlibrgb
|
@@ -1,42 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
if PLATFORM_WIN32
|
||||
no_undefined = -no-undefined
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES=libgdk_pixbuf_xlib-2.0.la
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) -I$(top_builddir) \
|
||||
-I$(top_srcdir)/gdk-pixbuf \
|
||||
-I$(top_srcdir)/contrib \
|
||||
$(GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_LDFLAGS = \
|
||||
-export-dynamic \
|
||||
$(no_undefined) \
|
||||
-version-info $(LT_VERSION_INFO)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_LIBADD = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(GDK_PIXBUF_XLIB_DEP_LIBS)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_SOURCES = \
|
||||
gdk-pixbuf-xlib-private.h \
|
||||
gdk-pixbuf-xlib.c \
|
||||
gdk-pixbuf-xlib-render.c \
|
||||
gdk-pixbuf-xlib-drawable.c \
|
||||
gdk-pixbuf-xlibrgb.c
|
||||
|
||||
libgdk_pixbuf_xlibincludedir=$(includedir)/gtk-2.0/gdk-pixbuf-xlib
|
||||
|
||||
libgdk_pixbuf_xlibinclude_HEADERS = \
|
||||
gdk-pixbuf-xlib.h \
|
||||
gdk-pixbuf-xlibrgb.h
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-pixbuf-xlib-2.0.pc
|
||||
|
||||
EXTRA_DIST += gdk-pixbuf-xlib-2.0.pc.in
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
@@ -1,11 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: GdkPixbuf Xlib
|
||||
Description: GdkPixbuf rendering for Xlib
|
||||
Version: @VERSION@
|
||||
Requires: gobject-2.0,gmodule-no-export-2.0,gdk-pixbuf-2.0
|
||||
Libs: -L${libdir} -lgdk_pixbuf_xlib-@GTK_API_VERSION@
|
||||
Cflags: -I${includedir}
|
File diff suppressed because it is too large
Load Diff
@@ -1,30 +0,0 @@
|
||||
/* GdkPixbuf library - Xlib header file
|
||||
*
|
||||
* Authors: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library 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.
|
||||
*/
|
||||
|
||||
#ifndef GDK_PIXBUF_XLIB_PRIVATE_H
|
||||
#define GDK_PIXBUF_XLIB_PRIVATE_H
|
||||
|
||||
#include "gdk-pixbuf-xlib.h"
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
extern Display *gdk_pixbuf_dpy;
|
||||
extern int gdk_pixbuf_screen;
|
||||
|
||||
#endif
|
@@ -1,398 +0,0 @@
|
||||
/* GdkPixbuf library - Rendering functions
|
||||
*
|
||||
* Copyright (C) 1999 The Free Software Foundation
|
||||
*
|
||||
* Author: Federico Mena-Quintero <federico@gimp.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library 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.
|
||||
*/
|
||||
|
||||
/* Trivially ported to Xlib(RGB) by John Harper. */
|
||||
|
||||
#include "config.h"
|
||||
#include "gdk-pixbuf-private.h"
|
||||
#include "gdk-pixbuf-xlib-private.h"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_threshold_alpha:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @bitmap: Bitmap where the bilevel mask will be painted to.
|
||||
* @src_x: Source X coordinate.
|
||||
* @src_y: source Y coordinate.
|
||||
* @dest_x: Destination X coordinate.
|
||||
* @dest_y: Destination Y coordinate.
|
||||
* @width: Width of region to threshold.
|
||||
* @height: Height of region to threshold.
|
||||
* @alpha_threshold: Opacity values below this will be painted as zero; all
|
||||
* other values will be painted as one.
|
||||
*
|
||||
* Takes the opacity values in a rectangular portion of a pixbuf and thresholds
|
||||
* them to produce a bi-level alpha mask that can be used as a clipping mask for
|
||||
* a drawable.
|
||||
*
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (GdkPixbuf *pixbuf, Pixmap bitmap,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
int alpha_threshold)
|
||||
{
|
||||
GC gc;
|
||||
XColor color;
|
||||
int x, y;
|
||||
guchar *p;
|
||||
int start, start_status;
|
||||
int status;
|
||||
XGCValues gcv;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (bitmap != 0);
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
g_return_if_fail (alpha_threshold >= 0 && alpha_threshold <= 255);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, bitmap, 0, &gcv);
|
||||
|
||||
if (!pixbuf->has_alpha) {
|
||||
color.pixel = (alpha_threshold == 255) ? 0 : 1;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
XFillRectangle (gdk_pixbuf_dpy, bitmap, gc,
|
||||
dest_x, dest_y, width, height);
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
return;
|
||||
}
|
||||
|
||||
color.pixel = 0;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
XFillRectangle (gdk_pixbuf_dpy, bitmap, gc,
|
||||
dest_x, dest_y, width, height);
|
||||
|
||||
color.pixel = 1;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
|
||||
for (y = 0; y < height; y++) {
|
||||
p = (pixbuf->pixels + (y + src_y) * pixbuf->rowstride + src_x * pixbuf->n_channels
|
||||
+ pixbuf->n_channels - 1);
|
||||
|
||||
start = 0;
|
||||
start_status = *p < alpha_threshold;
|
||||
|
||||
for (x = 0; x < width; x++) {
|
||||
status = *p < alpha_threshold;
|
||||
|
||||
if (status != start_status) {
|
||||
if (!start_status)
|
||||
XDrawLine (gdk_pixbuf_dpy, bitmap, gc,
|
||||
start + dest_x, y + dest_y,
|
||||
x - 1 + dest_x, y + dest_y);
|
||||
|
||||
start = x;
|
||||
start_status = status;
|
||||
}
|
||||
|
||||
p += pixbuf->n_channels;
|
||||
}
|
||||
|
||||
if (!start_status)
|
||||
XDrawLine (gdk_pixbuf_dpy, bitmap, gc,
|
||||
start + dest_x, y + dest_y,
|
||||
x - 1 + dest_x, y + dest_y);
|
||||
}
|
||||
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Creates a buffer by stripping the alpha channel of a pixbuf */
|
||||
static guchar *
|
||||
remove_alpha (GdkPixbuf *pixbuf, int x, int y, int width, int height, int *rowstride)
|
||||
{
|
||||
guchar *buf;
|
||||
int xx, yy;
|
||||
guchar *src, *dest;
|
||||
|
||||
g_assert (pixbuf->n_channels == 4);
|
||||
g_assert (pixbuf->has_alpha);
|
||||
g_assert (width > 0 && height > 0);
|
||||
g_assert (x >= 0 && x + width <= pixbuf->width);
|
||||
g_assert (y >= 0 && y + height <= pixbuf->height);
|
||||
|
||||
*rowstride = 4 * ((width * 3 + 3) / 4);
|
||||
|
||||
buf = g_new (guchar, *rowstride * height);
|
||||
|
||||
for (yy = 0; yy < height; yy++) {
|
||||
src = pixbuf->pixels + pixbuf->rowstride * (yy + y) + x * pixbuf->n_channels;
|
||||
dest = buf + *rowstride * yy;
|
||||
|
||||
for (xx = 0; xx < width; xx++) {
|
||||
*dest++ = *src++;
|
||||
*dest++ = *src++;
|
||||
*dest++ = *src++;
|
||||
src++;
|
||||
}
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_to_drawable:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @drawable: Destination drawable.
|
||||
* @gc: GC used for rendering.
|
||||
* @src_x: Source X coordinate within pixbuf.
|
||||
* @src_y: Source Y coordinate within pixbuf.
|
||||
* @dest_x: Destination X coordinate within drawable.
|
||||
* @dest_y: Destination Y coordinate within drawable.
|
||||
* @width: Width of region to render, in pixels.
|
||||
* @height: Height of region to render, in pixels.
|
||||
* @dither: Dithering mode for XlibRGB.
|
||||
* @x_dither: X offset for dither.
|
||||
* @y_dither: Y offset for dither.
|
||||
*
|
||||
* Renders a rectangular portion of a pixbuf to a drawable while using the
|
||||
* specified GC. This is done using XlibRGB, so the specified drawable must
|
||||
* have the XlibRGB visual and colormap. Note that this function will ignore
|
||||
* the opacity information for images with an alpha channel; the GC must already
|
||||
* have the clipping mask set if you want transparent regions to show through.
|
||||
*
|
||||
* For an explanation of dither offsets, see the XlibRGB documentation. In
|
||||
* brief, the dither offset is important when re-rendering partial regions of an
|
||||
* image to a rendered version of the full image, or for when the offsets to a
|
||||
* base position change, as in scrolling. The dither matrix has to be shifted
|
||||
* for consistent visual results. If you do not have any of these cases, the
|
||||
* dither offsets can be both zero.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf,
|
||||
Drawable drawable, GC gc,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither)
|
||||
{
|
||||
guchar *buf;
|
||||
int rowstride;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (drawable != 0);
|
||||
g_return_if_fail (gc != 0);
|
||||
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
/* This will have to be modified once we support other image types.
|
||||
* Also, GdkRGB does not have gdk_draw_rgb_32_image_dithalign(), so we
|
||||
* have to pack the buffer first. Sigh.
|
||||
*/
|
||||
|
||||
if (pixbuf->has_alpha)
|
||||
buf = remove_alpha (pixbuf, src_x, src_y, width, height, &rowstride);
|
||||
else {
|
||||
buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
|
||||
rowstride = pixbuf->rowstride;
|
||||
}
|
||||
|
||||
xlib_draw_rgb_image_dithalign (drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
buf, rowstride,
|
||||
x_dither, y_dither);
|
||||
|
||||
if (pixbuf->has_alpha)
|
||||
g_free (buf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_to_drawable_alpha:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @drawable: Destination drawable.
|
||||
* @src_x: Source X coordinate within pixbuf.
|
||||
* @src_y: Source Y coordinates within pixbuf.
|
||||
* @dest_x: Destination X coordinate within drawable.
|
||||
* @dest_y: Destination Y coordinate within drawable.
|
||||
* @width: Width of region to render, in pixels.
|
||||
* @height: Height of region to render, in pixels.
|
||||
* @alpha_mode: If the image does not have opacity information, this is ignored.
|
||||
* Otherwise, specifies how to handle transparency when rendering.
|
||||
* @alpha_threshold: If the image does have opacity information and @alpha_mode
|
||||
* is GDK_PIXBUF_ALPHA_BILEVEL, specifies the threshold value for opacity
|
||||
* values.
|
||||
* @dither: Dithering mode for XlibRGB.
|
||||
* @x_dither: X offset for dither.
|
||||
* @y_dither: Y offset for dither.
|
||||
*
|
||||
* Renders a rectangular portion of a pixbuf to a drawable. This is done using
|
||||
* XlibRGB, so the specified drawable must have the XlibRGB visual and colormap.
|
||||
*
|
||||
* When used with #GDK_PIXBUF_ALPHA_BILEVEL, this function has to create a bitmap
|
||||
* out of the thresholded alpha channel of the image and, it has to set this
|
||||
* bitmap as the clipping mask for the GC used for drawing. This can be a
|
||||
* significant performance penalty depending on the size and the complexity of
|
||||
* the alpha channel of the image. If performance is crucial, consider handling
|
||||
* the alpha channel yourself (possibly by caching it in your application) and
|
||||
* using gdk_pixbuf_xlib_render_to_drawable() or GdkRGB directly instead.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf, Drawable drawable,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
GdkPixbufAlphaMode alpha_mode,
|
||||
int alpha_threshold,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither)
|
||||
{
|
||||
Pixmap bitmap = 0;
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (drawable != 0);
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, drawable, 0, &gcv);
|
||||
|
||||
if (pixbuf->has_alpha) {
|
||||
/* Right now we only support GDK_PIXBUF_ALPHA_BILEVEL, so we
|
||||
* unconditionally create the clipping mask.
|
||||
*/
|
||||
|
||||
bitmap = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
width, height, 1);
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (pixbuf, bitmap,
|
||||
src_x, src_y,
|
||||
0, 0,
|
||||
width, height,
|
||||
alpha_threshold);
|
||||
|
||||
XSetClipMask (gdk_pixbuf_dpy, gc, bitmap);
|
||||
XSetClipOrigin (gdk_pixbuf_dpy, gc, dest_x, dest_y);
|
||||
}
|
||||
|
||||
gdk_pixbuf_xlib_render_to_drawable (pixbuf, drawable, gc,
|
||||
src_x, src_y,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
x_dither, y_dither);
|
||||
|
||||
if (bitmap)
|
||||
XFreePixmap (gdk_pixbuf_dpy, bitmap);
|
||||
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_pixmap_and_mask:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @pixmap_return: Return value for the created pixmap.
|
||||
* @mask_return: Return value for the created mask.
|
||||
* @alpha_threshold: Threshold value for opacity values.
|
||||
*
|
||||
* Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
|
||||
* and @mask_return arguments, respectively, and renders a pixbuf and its
|
||||
* corresponding tresholded alpha mask to them. This is merely a convenience
|
||||
* function; applications that need to render pixbufs with dither offsets or to
|
||||
* given drawables should use gdk_pixbuf_xlib_render_to_drawable_alpha() or
|
||||
* gdk_pixbuf_xlib_render_to_drawable(), and
|
||||
* gdk_pixbuf_xlib_render_threshold_alpha().
|
||||
*
|
||||
* If the pixbuf does not have an alpha channel, then *@mask_return will be set
|
||||
* to None.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
||||
Pixmap *pixmap_return,
|
||||
Pixmap *mask_return,
|
||||
int alpha_threshold)
|
||||
{
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
|
||||
if (pixmap_return) {
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
*pixmap_return = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
xlib_rgb_get_depth ());
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, *pixmap_return, 0, &gcv);
|
||||
gdk_pixbuf_xlib_render_to_drawable (pixbuf, *pixmap_return, gc,
|
||||
0, 0, 0, 0,
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
XLIB_RGB_DITHER_NORMAL,
|
||||
0, 0);
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
if (mask_return) {
|
||||
if (pixbuf->has_alpha) {
|
||||
*mask_return = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
pixbuf->width,
|
||||
pixbuf->height, 1);
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (pixbuf,
|
||||
*mask_return,
|
||||
0, 0, 0, 0,
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
alpha_threshold);
|
||||
} else
|
||||
*mask_return = 0;
|
||||
}
|
||||
}
|
@@ -1,63 +0,0 @@
|
||||
/* GdkPixbuf library - Initialization functions
|
||||
*
|
||||
* Author: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library 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 <X11/Xlib.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf-private.h>
|
||||
#include "gdk-pixbuf-xlib-private.h"
|
||||
|
||||
Display *gdk_pixbuf_dpy = NULL;
|
||||
int gdk_pixbuf_screen = -1;
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_init:
|
||||
* @display: X display to use.
|
||||
* @screen_num: Screen number.
|
||||
*
|
||||
* Initializes the gdk-pixbuf Xlib machinery by calling xlib_rgb_init(). This
|
||||
* function should be called near the beginning of your program, or before using
|
||||
* any of the gdk-pixbuf-xlib functions.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_init (Display *display, int screen_num)
|
||||
{
|
||||
xlib_rgb_init (display, ScreenOfDisplay (display, screen_num));
|
||||
gdk_pixbuf_dpy = display;
|
||||
gdk_pixbuf_screen = screen_num;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_init_with_depth:
|
||||
* @display: X display to use.
|
||||
* @screen_num: Screen number.
|
||||
* @prefDepth: Preferred depth for XlibRGB.
|
||||
*
|
||||
* Similar to gdk_pixbuf_xlib_init(), but also lets you specify the preferred
|
||||
* depth for XlibRGB if you do not want it to use the default depth it picks.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_init_with_depth (Display *display,
|
||||
int screen_num, int prefDepth)
|
||||
{
|
||||
xlib_rgb_init_with_depth (display, ScreenOfDisplay (display, screen_num),
|
||||
prefDepth);
|
||||
gdk_pixbuf_dpy = display;
|
||||
gdk_pixbuf_screen = screen_num;
|
||||
}
|
@@ -1,87 +0,0 @@
|
||||
/* GdkPixbuf library - Xlib header file
|
||||
*
|
||||
* Authors: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library 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.
|
||||
*/
|
||||
|
||||
#ifndef GDK_PIXBUF_XLIB_H
|
||||
#define GDK_PIXBUF_XLIB_H
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
|
||||
|
||||
/* init */
|
||||
|
||||
void gdk_pixbuf_xlib_init (Display *display, int screen_num);
|
||||
|
||||
void gdk_pixbuf_xlib_init_with_depth (Display *display, int screen_num,
|
||||
int prefDepth);
|
||||
|
||||
|
||||
|
||||
/* render */
|
||||
|
||||
void gdk_pixbuf_xlib_render_threshold_alpha (GdkPixbuf *pixbuf, Pixmap bitmap,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
int alpha_threshold);
|
||||
|
||||
void gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf,
|
||||
Drawable drawable, GC gc,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither);
|
||||
|
||||
|
||||
void gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf,
|
||||
Drawable drawable,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
GdkPixbufAlphaMode alpha_mode,
|
||||
int alpha_threshold,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither);
|
||||
|
||||
void gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
||||
Pixmap *pixmap_return,
|
||||
Pixmap *mask_return,
|
||||
int alpha_threshold);
|
||||
|
||||
|
||||
|
||||
/* drawable */
|
||||
|
||||
GdkPixbuf *gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
|
||||
Drawable src,
|
||||
Colormap cmap, Visual *visual,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GDK_PIXBUF_XLIB_H */
|
File diff suppressed because it is too large
Load Diff
@@ -1,188 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "MPL"); you may not use this file except in
|
||||
* compliance with the MPL. You may obtain a copy of the MPL at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the MPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* MPL.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the
|
||||
* terms of the GNU Library General Public License (the "LGPL"), in
|
||||
* which case the provisions of the LGPL are applicable instead of
|
||||
* those above. If you wish to allow use of your version of this file
|
||||
* only under the terms of the LGPL and not to allow others to use
|
||||
* your version of this file under the MPL, indicate your decision by
|
||||
* deleting the provisions above and replace them with the notice and
|
||||
* other provisions required by the LGPL. If you do not delete the
|
||||
* provisions above, a recipient may use your version of this file
|
||||
* under either the MPL or the LGPL.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code is derived from GdkRgb.
|
||||
* For more information on GdkRgb, see http://www.levien.com/gdkrgb/
|
||||
* Raph Levien <raph@acm.org>
|
||||
*/
|
||||
|
||||
/* Ported by Christopher Blizzard to Xlib. With permission from the
|
||||
* original authors of this file, the contents of this file are also
|
||||
* redistributable under the terms of the Mozilla Public license. For
|
||||
* information about the Mozilla Public License, please see the
|
||||
* license information at http://www.mozilla.org/MPL/
|
||||
*/
|
||||
|
||||
/* This code is copyright the following authors:
|
||||
* Raph Levien <raph@acm.org>
|
||||
* Manish Singh <manish@gtk.org>
|
||||
* Tim Janik <timj@gtk.org>
|
||||
* Peter Mattis <petm@xcf.berkeley.edu>
|
||||
* Spencer Kimball <spencer@xcf.berkeley.edu>
|
||||
* Josh MacDonald <jmacd@xcf.berkeley.edu>
|
||||
* Christopher Blizzard <blizzard@redhat.com>
|
||||
* Owen Taylor <otaylor@redhat.com>
|
||||
* Shawn T. Amundson <amundson@gtk.org>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XLIB_RGB_H__
|
||||
#define __XLIB_RGB_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
typedef struct _XlibRgbCmap XlibRgbCmap;
|
||||
|
||||
struct _XlibRgbCmap {
|
||||
unsigned int colors[256];
|
||||
unsigned char lut[256]; /* for 8-bit modes */
|
||||
};
|
||||
|
||||
void
|
||||
xlib_rgb_init (Display *display, Screen *screen);
|
||||
void
|
||||
xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth);
|
||||
|
||||
unsigned long
|
||||
xlib_rgb_xpixel_from_rgb (guint32 rgb);
|
||||
|
||||
void
|
||||
xlib_rgb_gc_set_foreground (GC gc, guint32 rgb);
|
||||
|
||||
void
|
||||
xlib_rgb_gc_set_background (GC gc, guint32 rgb);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XLIB_RGB_DITHER_NONE,
|
||||
XLIB_RGB_DITHER_NORMAL,
|
||||
XLIB_RGB_DITHER_MAX
|
||||
} XlibRgbDither;
|
||||
|
||||
void
|
||||
xlib_draw_rgb_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *rgb_buf,
|
||||
int rowstride);
|
||||
|
||||
void
|
||||
xlib_draw_rgb_image_dithalign (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *rgb_buf,
|
||||
int rowstride,
|
||||
int xdith,
|
||||
int ydith);
|
||||
|
||||
void
|
||||
xlib_draw_rgb_32_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride);
|
||||
|
||||
void
|
||||
xlib_draw_gray_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride);
|
||||
|
||||
XlibRgbCmap *
|
||||
xlib_rgb_cmap_new (guint32 *colors, int n_colors);
|
||||
|
||||
void
|
||||
xlib_rgb_cmap_free (XlibRgbCmap *cmap);
|
||||
|
||||
void
|
||||
xlib_draw_indexed_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride,
|
||||
XlibRgbCmap *cmap);
|
||||
|
||||
/* Below are some functions which are primarily useful for debugging
|
||||
and experimentation. */
|
||||
Bool
|
||||
xlib_rgb_ditherable (void);
|
||||
|
||||
void
|
||||
xlib_rgb_set_verbose (Bool verbose);
|
||||
|
||||
/* experimental colormap stuff */
|
||||
void
|
||||
xlib_rgb_set_install (Bool install);
|
||||
|
||||
void
|
||||
xlib_rgb_set_min_colors (int min_colors);
|
||||
|
||||
Colormap
|
||||
xlib_rgb_get_cmap (void);
|
||||
|
||||
Visual *
|
||||
xlib_rgb_get_visual (void);
|
||||
|
||||
XVisualInfo *
|
||||
xlib_rgb_get_visual_info (void);
|
||||
|
||||
int
|
||||
xlib_rgb_get_depth (void);
|
||||
|
||||
Display *
|
||||
xlib_rgb_get_display (void);
|
||||
|
||||
Screen *
|
||||
xlib_rgb_get_screen (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __XLIB_RGB_H__ */
|
@@ -12,12 +12,10 @@ INCLUDES = \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS) \
|
||||
@@ -32,21 +30,11 @@ noinst_PROGRAMS = \
|
||||
pixbuf-demo
|
||||
|
||||
# Need to build test-inline-pixbufs.h for testpixbuf
|
||||
if HAVE_PNG
|
||||
noinst_PROGRAMS += testpixbuf
|
||||
BUILT_SOURCES = test-inline-pixbufs.h
|
||||
endif
|
||||
|
||||
if CROSS_COMPILING
|
||||
pixbuf_csource=$(GDK_PIXBUF_CSOURCE)
|
||||
pixbuf_csource_deps=
|
||||
else
|
||||
pixbuf_csource=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource
|
||||
pixbuf_csource_deps=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource $(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders
|
||||
endif
|
||||
|
||||
test-inline-pixbufs.h: $(pixbuf_csource_deps) apple-red.png gnome-foot.png
|
||||
$(pixbuf_csource) --raw --build-list \
|
||||
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 \
|
||||
|
@@ -55,15 +55,14 @@ INCLUDES = \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS)
|
||||
$(GTK_DEP_LIBS) \
|
||||
-lm
|
||||
|
||||
bin_PROGRAMS = gtk-demo
|
||||
|
||||
|
@@ -57,25 +57,6 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate_email (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *text;
|
||||
text = g_strdup_printf ("send mail to %s", link);
|
||||
g_print ("%s\n", text);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_url (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
{
|
||||
g_print ("show url %s\n", link);
|
||||
}
|
||||
|
||||
static void
|
||||
about_cb (GtkAction *action,
|
||||
GtkWidget *window)
|
||||
@@ -126,8 +107,6 @@ about_cb (GtkAction *action,
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
gtk_about_dialog_set_email_hook (activate_email, NULL, NULL);
|
||||
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"program-name", "GTK+ Code Demos",
|
||||
"version", PACKAGE_VERSION,
|
||||
|
@@ -9,12 +9,35 @@
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkWidget *assistant = NULL;
|
||||
static GtkWidget *progress_bar = NULL;
|
||||
|
||||
static gboolean
|
||||
apply_changes_gradually (gpointer data)
|
||||
{
|
||||
gdouble fraction;
|
||||
|
||||
/* Work, work, work... */
|
||||
fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));
|
||||
fraction += 0.05;
|
||||
|
||||
if (fraction < 1.0)
|
||||
{
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Close automatically once changes are fully applied. */
|
||||
gtk_widget_destroy (assistant);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_assistant_apply (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
/* Apply here changes, this is a fictional
|
||||
example, so we just do nothing here */
|
||||
/* Start a timer to simulate changes taking a few seconds to apply. */
|
||||
g_timeout_add (100, apply_changes_gradually, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -38,6 +61,13 @@ on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data)
|
||||
title = g_strdup_printf ("Sample assistant (%d of %d)", current_page + 1, n_pages);
|
||||
gtk_window_set_title (GTK_WINDOW (widget), title);
|
||||
g_free (title);
|
||||
|
||||
/* The fourth page (counting from zero) is the progress page. The
|
||||
* user clicked Apply to get here so we tell the assistant to commit,
|
||||
* which means the changes up to this point are permanent and cannot
|
||||
* be cancelled or revisited. */
|
||||
if (current_page == 3)
|
||||
gtk_assistant_commit (GTK_ASSISTANT (widget));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -127,6 +157,26 @@ create_page3 (GtkWidget *assistant)
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
create_page4 (GtkWidget *assistant)
|
||||
{
|
||||
GtkWidget *page;
|
||||
|
||||
page = gtk_alignment_new (0.5, 0.5, 0.5, 0.0);
|
||||
|
||||
progress_bar = gtk_progress_bar_new ();
|
||||
gtk_container_add (GTK_CONTAINER (page), progress_bar);
|
||||
|
||||
gtk_widget_show_all (page);
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), page);
|
||||
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), page, GTK_ASSISTANT_PAGE_PROGRESS);
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Applying changes");
|
||||
|
||||
/* This prevents the assistant window from being
|
||||
* closed while we're "busy" applying changes. */
|
||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, FALSE);
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
do_assistant (GtkWidget *do_widget)
|
||||
{
|
||||
@@ -142,6 +192,7 @@ do_assistant (GtkWidget *do_widget)
|
||||
create_page1 (assistant);
|
||||
create_page2 (assistant);
|
||||
create_page3 (assistant);
|
||||
create_page4 (assistant);
|
||||
|
||||
g_signal_connect (G_OBJECT (assistant), "cancel",
|
||||
G_CALLBACK (on_assistant_close_cancel), &assistant);
|
||||
|
@@ -22,14 +22,17 @@ expose_event_callback (GtkWidget *widget,
|
||||
if (widget->window)
|
||||
{
|
||||
GtkStyle *style;
|
||||
cairo_t *cr;
|
||||
|
||||
style = gtk_widget_get_style (widget);
|
||||
|
||||
gdk_draw_rectangle (widget->window,
|
||||
style->bg_gc[GTK_STATE_NORMAL],
|
||||
TRUE,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height);
|
||||
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;
|
||||
|
@@ -238,12 +238,12 @@ is_capital_sensitive (GtkCellLayout *cell_layout,
|
||||
}
|
||||
|
||||
static void
|
||||
fill_combo_entry (GtkWidget *entry)
|
||||
fill_combo_entry (GtkWidget *combo)
|
||||
{
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "One");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Two");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "2\302\275");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Three");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "One");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Two");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "2\302\275");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Three");
|
||||
}
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_entry_new_text ();
|
||||
combo = gtk_combo_box_text_new_with_entry ();
|
||||
fill_combo_entry (combo);
|
||||
gtk_container_add (GTK_CONTAINER (box), combo);
|
||||
|
||||
|
@@ -17,52 +17,51 @@
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
/* Pixmap for scribble area, to store current scribbles */
|
||||
static GdkPixmap *pixmap = NULL;
|
||||
static cairo_surface_t *surface = NULL;
|
||||
|
||||
/* Create a new pixmap of the appropriate size to store our scribbles */
|
||||
/* Create a new surface of the appropriate size to store our scribbles */
|
||||
static gboolean
|
||||
scribble_configure_event (GtkWidget *widget,
|
||||
GdkEventConfigure *event,
|
||||
gpointer data)
|
||||
{
|
||||
if (pixmap)
|
||||
g_object_unref (pixmap);
|
||||
cairo_t *cr;
|
||||
|
||||
pixmap = gdk_pixmap_new (widget->window,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height,
|
||||
-1);
|
||||
if (surface)
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
/* Initialize the pixmap to white */
|
||||
gdk_draw_rectangle (pixmap,
|
||||
widget->style->white_gc,
|
||||
TRUE,
|
||||
0, 0,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
surface = gdk_window_create_similar_surface (widget->window,
|
||||
CAIRO_CONTENT_COLOR,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
|
||||
/* Initialize the surface to white */
|
||||
cr = cairo_create (surface);
|
||||
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
/* We've handled the configure event, no need for further processing. */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Redraw the screen from the pixmap */
|
||||
/* Redraw the screen from the surface */
|
||||
static gboolean
|
||||
scribble_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
/* We use the "foreground GC" for the widget since it already exists,
|
||||
* but honestly any GC would work. The only thing to worry about
|
||||
* is whether the GC has an inappropriate clip region set.
|
||||
*/
|
||||
cairo_t *cr;
|
||||
|
||||
gdk_draw_drawable (widget->window,
|
||||
widget->style->fg_gc[gtk_widget_get_state (widget)],
|
||||
pixmap,
|
||||
/* Only copy the area that was exposed. */
|
||||
event->area.x, event->area.y,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height);
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -74,18 +73,20 @@ draw_brush (GtkWidget *widget,
|
||||
gdouble y)
|
||||
{
|
||||
GdkRectangle update_rect;
|
||||
cairo_t *cr;
|
||||
|
||||
update_rect.x = x - 3;
|
||||
update_rect.y = y - 3;
|
||||
update_rect.width = 6;
|
||||
update_rect.height = 6;
|
||||
|
||||
/* Paint to the pixmap, where we store our state */
|
||||
gdk_draw_rectangle (pixmap,
|
||||
widget->style->black_gc,
|
||||
TRUE,
|
||||
update_rect.x, update_rect.y,
|
||||
update_rect.width, update_rect.height);
|
||||
/* Paint to the surface, where we store our state */
|
||||
cr = cairo_create (surface);
|
||||
|
||||
gdk_cairo_rectangle (cr, &update_rect);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
/* Now invalidate the affected region of the drawing area. */
|
||||
gdk_window_invalidate_rect (widget->window,
|
||||
@@ -98,7 +99,7 @@ scribble_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
{
|
||||
if (pixmap == NULL)
|
||||
if (surface == NULL)
|
||||
return FALSE; /* paranoia check, in case we haven't gotten a configure event */
|
||||
|
||||
if (event->button == 1)
|
||||
@@ -116,7 +117,7 @@ scribble_motion_notify_event (GtkWidget *widget,
|
||||
int x, y;
|
||||
GdkModifierType state;
|
||||
|
||||
if (pixmap == NULL)
|
||||
if (surface == NULL)
|
||||
return FALSE; /* paranoia check, in case we haven't gotten a configure event */
|
||||
|
||||
/* This call is very important; it requests the next motion event.
|
||||
@@ -146,8 +147,7 @@ checkerboard_expose (GtkWidget *da,
|
||||
gpointer data)
|
||||
{
|
||||
gint i, j, xcount, ycount;
|
||||
GdkGC *gc1, *gc2;
|
||||
GdkColor color;
|
||||
cairo_t *cr;
|
||||
|
||||
#define CHECK_SIZE 10
|
||||
#define SPACING 2
|
||||
@@ -159,21 +159,9 @@ checkerboard_expose (GtkWidget *da,
|
||||
* works.
|
||||
*/
|
||||
|
||||
/* It would be a bit more efficient to keep these
|
||||
* GC's around instead of recreating on each expose, but
|
||||
* this is the lazy/slow way.
|
||||
*/
|
||||
gc1 = gdk_gc_new (da->window);
|
||||
color.red = 30000;
|
||||
color.green = 0;
|
||||
color.blue = 30000;
|
||||
gdk_gc_set_rgb_fg_color (gc1, &color);
|
||||
|
||||
gc2 = gdk_gc_new (da->window);
|
||||
color.red = 65535;
|
||||
color.green = 65535;
|
||||
color.blue = 65535;
|
||||
gdk_gc_set_rgb_fg_color (gc2, &color);
|
||||
cr = gdk_cairo_create (da->window);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_clip (cr);
|
||||
|
||||
xcount = 0;
|
||||
i = SPACING;
|
||||
@@ -183,23 +171,17 @@ checkerboard_expose (GtkWidget *da,
|
||||
ycount = xcount % 2; /* start with even/odd depending on row */
|
||||
while (j < da->allocation.height)
|
||||
{
|
||||
GdkGC *gc;
|
||||
|
||||
if (ycount % 2)
|
||||
gc = gc1;
|
||||
cairo_set_source_rgb (cr, 0.45777, 0, 0.45777);
|
||||
else
|
||||
gc = gc2;
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
|
||||
/* 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.
|
||||
*/
|
||||
gdk_draw_rectangle (da->window,
|
||||
gc,
|
||||
TRUE,
|
||||
i, j,
|
||||
CHECK_SIZE,
|
||||
CHECK_SIZE);
|
||||
cairo_rectangle (cr, i, j, CHECK_SIZE, CHECK_SIZE);
|
||||
cairo_fill (cr);
|
||||
|
||||
j += CHECK_SIZE + SPACING;
|
||||
++ycount;
|
||||
@@ -209,8 +191,7 @@ checkerboard_expose (GtkWidget *da,
|
||||
++xcount;
|
||||
}
|
||||
|
||||
g_object_unref (gc1);
|
||||
g_object_unref (gc2);
|
||||
cairo_destroy (cr);
|
||||
|
||||
/* return TRUE because we've handled this event, so no
|
||||
* further processing is required.
|
||||
@@ -223,9 +204,9 @@ close_window (void)
|
||||
{
|
||||
window = NULL;
|
||||
|
||||
if (pixmap)
|
||||
g_object_unref (pixmap);
|
||||
pixmap = NULL;
|
||||
if (surface)
|
||||
g_object_unref (surface);
|
||||
surface = NULL;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@@ -292,7 +273,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||
|
||||
/* Signals used to handle backing pixmap */
|
||||
/* Signals used to handle backing surface */
|
||||
|
||||
g_signal_connect (da, "expose-event",
|
||||
G_CALLBACK (scribble_expose_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);
|
||||
}
|
||||
|
@@ -105,6 +105,7 @@ fill_store (GtkListStore *store)
|
||||
|
||||
name = g_dir_read_name (dir);
|
||||
}
|
||||
g_dir_close (dir);
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@@ -493,7 +493,7 @@ gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
|
||||
|
||||
/* clip */
|
||||
gdk_drawable_get_size (pixmap, &width, &height);
|
||||
gdk_pixmap_get_size (pixmap, &width, &height);
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_clip (cr);
|
||||
/* paint */
|
||||
|
@@ -381,7 +381,7 @@ gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
gdk_drawable_get_size (pixmap, &width, &height);
|
||||
gdk_pixmap_get_size (pixmap, &width, &height);
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
|
@@ -100,20 +100,15 @@ expose_cb (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
guchar *pixels;
|
||||
int rowstride;
|
||||
cairo_t *cr;
|
||||
|
||||
rowstride = gdk_pixbuf_get_rowstride (frame);
|
||||
cr = gdk_cairo_create (event->window);
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (frame) + rowstride * event->area.y + event->area.x * 3;
|
||||
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
gdk_draw_rgb_image_dithalign (widget->window,
|
||||
widget->style->black_gc,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
pixels, rowstride,
|
||||
event->area.x, event->area.y);
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -25,10 +25,10 @@ create_combo_box (const char **strings)
|
||||
GtkWidget *combo_box;
|
||||
const char **str;
|
||||
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
combo_box = gtk_combo_box_text_new ();
|
||||
|
||||
for (str = strings; *str; str++)
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), *str);
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), *str);
|
||||
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
|
||||
|
||||
|
@@ -14,17 +14,9 @@
|
||||
|
||||
static void easter_egg_callback (GtkWidget *button, gpointer data);
|
||||
|
||||
#define gray50_width 2
|
||||
#define gray50_height 2
|
||||
static char gray50_bits[] = {
|
||||
0x02, 0x01
|
||||
};
|
||||
|
||||
static void
|
||||
create_tags (GtkTextBuffer *buffer)
|
||||
{
|
||||
GdkBitmap *stipple;
|
||||
|
||||
/* Create a bunch of tags. Note that it's also possible to
|
||||
* create tags with gtk_text_tag_new() then add them to the
|
||||
* tag table for the buffer, gtk_text_buffer_create_tag() is
|
||||
@@ -74,18 +66,6 @@ create_tags (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_create_tag (buffer, "red_background",
|
||||
"background", "red", NULL);
|
||||
|
||||
stipple = gdk_bitmap_create_from_data (NULL,
|
||||
gray50_bits, gray50_width,
|
||||
gray50_height);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "background_stipple",
|
||||
"background_stipple", stipple, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "foreground_stipple",
|
||||
"foreground_stipple", stipple, NULL);
|
||||
|
||||
g_object_unref (stipple);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
|
||||
"pixels_above_lines", 30, NULL);
|
||||
|
||||
@@ -227,17 +207,9 @@ insert_text (GtkTextBuffer *buffer)
|
||||
"red_background", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a stippled red background", -1,
|
||||
"red_background",
|
||||
"background_stipple",
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a stippled blue foreground on solid red background", -1,
|
||||
"a blue foreground on red background", -1,
|
||||
"blue_foreground",
|
||||
"red_background",
|
||||
"foreground_stipple",
|
||||
NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
|
||||
|
||||
@@ -399,11 +371,11 @@ attach_widgets (GtkTextView *text_view)
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
widget = gtk_combo_box_new_text ();
|
||||
widget = gtk_combo_box_text_new ();
|
||||
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 1");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 2");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 3");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 1");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 2");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 3");
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
|
@@ -89,20 +89,14 @@ load_pixbufs (void)
|
||||
static gint
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
guchar *pixels;
|
||||
int rowstride;
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
rowstride = gdk_pixbuf_get_rowstride (frame);
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (frame) + rowstride * event->area.y + event->area.x * 3;
|
||||
|
||||
gdk_draw_rgb_image_dithalign (widget->window,
|
||||
widget->style->black_gc,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
pixels, rowstride,
|
||||
event->area.x, event->area.y);
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -111,8 +111,6 @@ main (int argc, char **argv)
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
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);
|
||||
|
@@ -1,4 +1,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int
|
||||
|
@@ -311,32 +311,18 @@ 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");
|
||||
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));
|
||||
}
|
||||
|
||||
cr = gdk_cairo_create (evt->window);
|
||||
gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &evt->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -374,8 +360,6 @@ main (int argc, char **argv)
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
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);
|
||||
|
@@ -35,6 +35,7 @@ gboolean
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *dest;
|
||||
cairo_t *cr;
|
||||
|
||||
gdk_window_set_back_pixmap (widget->window, NULL, FALSE);
|
||||
|
||||
@@ -48,11 +49,13 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
interp_type, overall_alpha,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
gdk_draw_pixbuf (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], dest,
|
||||
0, 0, event->area.x, event->area.y,
|
||||
event->area.width, event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
|
||||
|
||||
cr = gdk_cairo_create (event->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);
|
||||
|
||||
return TRUE;
|
||||
@@ -101,12 +104,12 @@ main(int argc, char **argv)
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
combo_box = gtk_combo_box_text_new ();
|
||||
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "NEAREST");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "BILINEAR");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "TILES");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "HYPER");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "NEAREST");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "BILINEAR");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "TILES");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "HYPER");
|
||||
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 1);
|
||||
|
||||
|
@@ -22,6 +22,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
@@ -322,6 +325,7 @@ expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
|
||||
|
||||
if (gdk_pixbuf_get_has_alpha (pixbuf)) {
|
||||
GdkPixbuf *dest;
|
||||
cairo_t *cr;
|
||||
|
||||
gdk_window_set_back_pixmap (drawing_area->window, NULL, FALSE);
|
||||
|
||||
@@ -335,11 +339,13 @@ expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
|
||||
GDK_INTERP_BILINEAR, 255,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
gdk_draw_pixbuf (drawing_area->window, drawing_area->style->fg_gc[GTK_STATE_NORMAL], dest,
|
||||
0, 0, event->area.x, event->area.y,
|
||||
event->area.width, event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
|
||||
|
||||
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,
|
||||
|
@@ -17,6 +17,8 @@ pdf:
|
||||
(cd $(srcdir); db2pdf gtk-faq.sgml); \
|
||||
fi
|
||||
|
||||
all-local: html
|
||||
|
||||
dist-hook: html
|
||||
cp -Rp $(srcdir)/html $(distdir)
|
||||
else
|
||||
|
@@ -345,11 +345,12 @@ command line option.</simpara>
|
||||
<title>Is there a Windows version of GTK+? <emphasis>[GTK 2.x]</emphasis></title>
|
||||
|
||||
<para>The Win32 port of GTK+ is maintained concurrently with the Xwindows
|
||||
version in CVS. As such it is a supported architecture.</para>
|
||||
version in Git. As such it is a supported architecture.</para>
|
||||
|
||||
<para>The Win32 port has been predominately done by Tor Lillqvist. Tor
|
||||
maintains some information on <ulink url="http://www.gimp.org/~tml/gimp/win32/">
|
||||
GTK+ and GIMP for Windows</ulink>.</para>
|
||||
maintains some information on the
|
||||
Windows <ulink url="http://www.gtk.org/download.html">download
|
||||
page</ulink> (32bit and 64bit).</para>
|
||||
|
||||
<para>There is a pre-compiled, easy-to-install version of GTK+ for
|
||||
windows on the <ulink url="http://www.dropline.net/gtk/">
|
||||
@@ -670,70 +671,56 @@ successful, try executing it.</para>
|
||||
<!-- ----------------------------------------------------------------- -->
|
||||
|
||||
<sect1>
|
||||
<title>Whats this CVS thing that everyone keeps talking about,
|
||||
<title>What's this Git thing that everyone keeps talking about,
|
||||
and how do I access it? <emphasis>[GTK 2.x]</emphasis></title>
|
||||
|
||||
<para>CVS is the Concurrent Version System and is a very
|
||||
<para>Git is a version control system and it is a very
|
||||
popular means of version control for software projects. It is
|
||||
designed to allow multiple authors to simultanously operate on the same
|
||||
source tree. This source tree is centrally maintained, but each
|
||||
developer has a local mirror of this repository that they make
|
||||
their changes to.</para>
|
||||
|
||||
<para>The GTK+ developers use a CVS repository to store the
|
||||
<para>The GTK+ developers use a Git repository to store the
|
||||
master copy of the current development version of GTK+. As
|
||||
such, people wishing to contribute patches to GTK+ should
|
||||
generate them against the CVS version. Normal people should
|
||||
generate them against the Git version. Normal people should
|
||||
use the packaged releases.</para>
|
||||
|
||||
<para>The CVS toolset is available as RPM packages from the
|
||||
usual RedHat sites. The latest version is available at <ulink
|
||||
url="http://download.cyclic.com/pub/">http://download.cyclic.com/pub/
|
||||
</ulink></para>
|
||||
<para>The Git toolset is available as a package on most distributions
|
||||
and the released tarballs are available
|
||||
from <ulink url="http://git-scm.com/">http://git-scm.com/</ulink>.</para>
|
||||
|
||||
<para>Anyone can download the latest CVS version of GTK+ by
|
||||
<para>Anyone can download the latest Git version of GTK+ by
|
||||
using anonymous access using the following steps:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><simpara> In a bourne shell descendant (e.g. bash) type:</simpara>
|
||||
<listitem><simpara>In a bourne shell descendant (e.g. bash) type:</simpara>
|
||||
<para><literallayout>
|
||||
<literal>CVSROOT=':pserver:anonymous@anoncvs.gnome.org:/cvs/gnome'</literal>
|
||||
<literal>export CVSROOT</literal>
|
||||
</literallayout></para>
|
||||
</listitem>
|
||||
|
||||
<listitem><simpara>Next, the first time the source tree is
|
||||
checked out, a cvs login is needed. </simpara>
|
||||
<para><literallayout>
|
||||
<literal>cvs login</literal>
|
||||
</literallayout></para>
|
||||
<para>This will ask you for a password. There is no
|
||||
password for cvs.gimp.org, so just enter a carriage return.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><simpara>To get the tree and place it in a subdir of your
|
||||
current working directory, issue the command:</simpara>
|
||||
<para><literallayout>
|
||||
<literal>cvs -z3 get gtk+</literal>
|
||||
<literal>git clone git://git.gnome.org/gtk+</literal>
|
||||
</literallayout></para>
|
||||
<para>Note that with the GTK+ 1.1 tree, glib has been moved to
|
||||
a separate CVS module, so if you don't have glib installed you will
|
||||
need to get that as well:</para>
|
||||
<para><literallayout>
|
||||
<literal>cvs -z3 get glib</literal>
|
||||
a separate Git module, so if you don't have glib installed you will
|
||||
need to get that as well:<literallayout>
|
||||
<literal>git clone git://git.gnome.org/glib</literal>
|
||||
</literallayout></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>The CVS archive stores both the current development version of
|
||||
GTK+ (the CVS HEAD branch) and all current and past stable versions.
|
||||
<para>The Git archive stores both the current development version of
|
||||
GTK+ (the Git master branch) and all current and past stable versions.
|
||||
If you want to retrieve a specific version of GTK+ you have to specify
|
||||
the CVS tag corresponding to the version you want to checkout. If you
|
||||
the Git tag corresponding to the version you want to checkout. If you
|
||||
want to checkout the current GTK+ 2.2 stable source code, you would need
|
||||
to use the following command:</para>
|
||||
|
||||
<para><literallayout>
|
||||
<literal>cvs -z3 get -r gtk-2-2 gtk+</literal>
|
||||
<literal>git checkout --track -b gtk-2-24 origin/gtk-2-24</literal>
|
||||
</literallayout></para>
|
||||
|
||||
<para>You can switch between branches once set up more easily using:</para>
|
||||
<para><literallayout>
|
||||
<literal>git checkout master</literal>
|
||||
</literallayout></para>
|
||||
</sect1>
|
||||
|
||||
@@ -789,7 +776,7 @@ disgrace to the widget set will gladly be included.</para>
|
||||
<para>The new widgets that get added to GTK+ are generally either
|
||||
replacements for existing widgets that are no longer
|
||||
deemed to be adequate, or have been developed externally to GTK+ but
|
||||
have been widely tested.
|
||||
have been widely tested.</para>
|
||||
|
||||
<para>Before you spend months of your valuable time implementing your
|
||||
revolutionary widget, it is highly recommended that you get some
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = gdk-pixbuf gdk gtk libgail-util
|
||||
SUBDIRS = gdk gtk libgail-util
|
||||
|
||||
GITIGNOREFILES = */*.1
|
||||
|
||||
|
@@ -1,99 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gdk-pixbuf
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gdk-pixbuf.sgml
|
||||
|
||||
# Extra options to supply to gtkdoc-scan
|
||||
SCAN_OPTIONS=--source-dir=../../../contrib/gdk-pixbuf-xlib --deprecated-guards="GDK_PIXBUF_ENABLE_BROKEN|GDK_PIXBUF_DISABLE_DEPRECATED"
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR=../../../gdk-pixbuf
|
||||
|
||||
# Used for dependencies
|
||||
HFILE_GLOB=$(top_srcdir)/gdk-pixbuf/*.h $(top_srcdir)/contrib/gdk-pixbuf-xlib/*.h
|
||||
CFILE_GLOB=$(top_srcdir)/gdk-pixbuf/*.c $(top_srcdir)/contrib/gdk-pixbuf-xlib/*.c
|
||||
|
||||
# Header files to ignore when scanning
|
||||
IGNORE_HFILES= \
|
||||
pixops \
|
||||
gdk-pixbuf-alias.h \
|
||||
gdk-pixbuf-marshal.h \
|
||||
gdk-pixbuf-xlib-private.h \
|
||||
gdk-pixbuf-i18n.h \
|
||||
gdk-pixbuf-private.h \
|
||||
io-gif-animation.h \
|
||||
io-ani-animation.h \
|
||||
xpm-color-table.h \
|
||||
test-images.h
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--main-sgml-file=$(DOC_MAIN_SGML_FILE) --sgml-mode --source-dir=../../../contrib/gdk-pixbuf-xlib --output-format=xml --name-space=gdk_pixbuf
|
||||
|
||||
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
|
||||
content_files = \
|
||||
version.xml \
|
||||
gdk-pixbuf-from-drawables.sgml \
|
||||
gdk-pixbuf-rendering.sgml \
|
||||
gdk-pixbuf.sgml \
|
||||
porting-from-imlib.sgml \
|
||||
gdk-pixbuf-csource.xml \
|
||||
gdk-pixbuf-query-loaders.xml
|
||||
|
||||
# Images to copy into HTML directory
|
||||
HTML_IMAGES = composite.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS= --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \
|
||||
--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib
|
||||
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in \
|
||||
composite.png \
|
||||
composite.dia \
|
||||
apple-red-1a.png \
|
||||
apple-red-2c.png \
|
||||
gnome-gmush-1.png
|
||||
|
||||
########################################################################
|
||||
|
||||
if ENABLE_MAN
|
||||
|
||||
man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1
|
||||
|
||||
%.1 : %.xml
|
||||
@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||
|
||||
BUILT_EXTRA_DIST = $(man_MANS)
|
||||
|
||||
endif
|
||||
|
||||
dist-hook-local: $(BUILT_EXTRA_DIST)
|
||||
files='$(BUILT_EXTRA_DIST)'; \
|
||||
for f in $$files; do \
|
||||
if test -f $$f; then d=.; else d=$(srcdir); fi; \
|
||||
cp $$d/$$f $(distdir) || exit 1; done
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
Binary file not shown.
Before Width: | Height: | Size: 29 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 104 KiB |
@@ -1,177 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gdk-pixbuf-csource">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gdk-pixbuf-csource</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gdk-pixbuf-csource</refname>
|
||||
<refpurpose>C code generation utility for GdkPixbuf images</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gdk-pixbuf-csource</command>
|
||||
<arg choice="opt">options</arg>
|
||||
<arg choice="opt">image</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdk-pixbuf-csource</command>
|
||||
<arg choice="opt">options</arg>
|
||||
<arg choice="plain">--build-list</arg>
|
||||
<arg rep="repeat">
|
||||
<arg>name</arg>
|
||||
<arg>image</arg>
|
||||
</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para>
|
||||
<command>gdk-pixbuf-csource</command> is a small utility that generates C code
|
||||
containing images, useful for compiling images directly into programs.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Invocation</title>
|
||||
<para>
|
||||
<command>gdk-pixbuf-csource</command> either takes as input one image file name
|
||||
to generate code for, or, using the <option>--build-list</option> option, a
|
||||
list of (<replaceable>name</replaceable>, <replaceable>image</replaceable>)
|
||||
pairs to generate code for a list of images into named variables.
|
||||
</para>
|
||||
<refsect2><title>Options</title>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--stream</option></term>
|
||||
<listitem><para>
|
||||
Generate pixbuf data stream (a single string containing a serialized
|
||||
<structname>GdkPixdata</structname> structure in network byte order).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--struct</option></term>
|
||||
<listitem><para>
|
||||
Generate GdkPixdata structure (needs the <structname>GdkPixdata</structname>
|
||||
structure definition from <filename>gdk-pixdata.h</filename>).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--macros</option></term>
|
||||
<listitem><para>
|
||||
Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and
|
||||
*_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--rle</option></term>
|
||||
<listitem><para>
|
||||
Enables run-length encoding for the generated pixel data (default).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--raw</option></term>
|
||||
<listitem><para>
|
||||
Disables run-length encoding for the generated pixel data.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--extern</option></term>
|
||||
<listitem><para>
|
||||
Generate extern symbols.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--static</option></term>
|
||||
<listitem><para>
|
||||
Generate static symbols (default).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--decoder</option></term>
|
||||
<listitem><para>
|
||||
Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition
|
||||
to decode run-length encoded image data.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--name=identifier</option></term>
|
||||
<listitem><para>
|
||||
Specifies the identifier name (prefix) for the generated variables or
|
||||
macros (useful only if <option>--build-list</option> was not specified).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--build-list</option></term>
|
||||
<listitem><para>
|
||||
Enables (<replaceable>name</replaceable>, <replaceable>image</replaceable>)
|
||||
pair parsing mode.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-h</option>, <option>--help</option></term>
|
||||
<listitem><para>
|
||||
Print brief help and exit.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-v</option>, <option>--version</option></term>
|
||||
<listitem><para>
|
||||
Print version and exit.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--g-fatal-warnings</option></term>
|
||||
<listitem><para>
|
||||
Make warnings fatal (causes the program to abort).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>See also</title>
|
||||
<para>
|
||||
The <structname>GdkPixbuf</structname> documentation, shipped with the
|
||||
Gtk+ distribution, available from <ulink url="http://www.gtk.org">www.gtk.org</ulink>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Bugs</title>
|
||||
<para>
|
||||
The runlength encoder gets out of sync with the pixel boundaries, since
|
||||
it includes the rowstride padding in the encoded stream. Furthermore, it
|
||||
generates pixbufs with suboptimal rowstride in some cases.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Author</title>
|
||||
<para>
|
||||
<command>gdk-pixbuf-csource</command> was written by Tim Janik
|
||||
<email>timj@gtk.org</email>.
|
||||
</para>
|
||||
<para>
|
||||
This manual page was provided by Tim Janik <email>timj@gtk.org</email>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gdk-pixbuf-gdk-pixbuf-from-drawables">
|
||||
<refmeta>
|
||||
<refentrytitle>Drawables to Pixbufs</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
<refmiscinfo>GDK-PIXBUF Library</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>Drawables to Pixbufs</refname><refpurpose>Getting parts of a GDK drawable's image data into a pixbuf.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
The functions to take the image data from a GDK drawable and dump it
|
||||
into a pixbuf are contained in GDK, see the
|
||||
<link linkend="gdk-Pixbufs">Pixbufs</link> section of the GDK
|
||||
documentation.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
|
||||
|
||||
</refentry>
|
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gdk-pixbuf-query-loaders">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gdk-pixbuf-query-loaders</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gdk-pixbuf-query-loaders</refname>
|
||||
<refpurpose>GdkPixbuf loader registration utility</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gdk-pixbuf-query-loaders</command>
|
||||
<arg choice="opt" rep="repeat">module</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para>
|
||||
<command>gdk-pixbuf-query-loaders</command> collects information about loadable
|
||||
modules for <application>gdk-pixbuf</application> and writes it to <filename>stdout</filename>.
|
||||
</para>
|
||||
<para>
|
||||
If called without arguments, it looks for modules in the
|
||||
<application>gdk-pixbuf</application> loader directory.
|
||||
</para>
|
||||
<para>
|
||||
If called with arguments, it looks for the specified modules. The arguments
|
||||
may be absolute or relative paths.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Environment</title>
|
||||
<para>
|
||||
The environment variable <envar>GDK_PIXBUF_MODULEDIR</envar> can be used
|
||||
to specify a different loader directory. The default <application>gdk-pixbuf</application> loader
|
||||
directory is <filename><replaceable>libdir</replaceable>/gtk-2.0/<replaceable>version</replaceable>/loaders</filename>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Bugs</title>
|
||||
<para>
|
||||
None known yet.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
|
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gdk-pixbuf-gdk-pixbuf-rendering">
|
||||
<refmeta>
|
||||
<refentrytitle>Rendering</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
<refmiscinfo>GDK-PIXBUF Library</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>Rendering</refname><refpurpose>Rendering a pixbuf to a GDK drawable.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
The functions to render pixbufs to GDK drawables are contained in
|
||||
GDK, see the <link linkend="gdk-Pixbufs">Pixbufs</link> section
|
||||
of the GDK documentation.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
|
||||
|
||||
</refentry>
|
||||
|
||||
|
||||
|
@@ -1,302 +0,0 @@
|
||||
<INCLUDE>gdk-pixbuf/gdk-pixbuf.h</INCLUDE>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Versioning</TITLE>
|
||||
<FILE>initialization_versions</FILE>
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_pixbuf_version
|
||||
gdk_pixbuf_major_version
|
||||
gdk_pixbuf_minor_version
|
||||
gdk_pixbuf_micro_version
|
||||
GDK_PIXBUF_VERSION
|
||||
GDK_PIXBUF_MAJOR
|
||||
GDK_PIXBUF_MINOR
|
||||
GDK_PIXBUF_MICRO
|
||||
|
||||
<SUBSECTION Private>
|
||||
GDK_PIXBUF_VAR
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf</FILE>
|
||||
GdkPixbufError
|
||||
GDK_PIXBUF_ERROR
|
||||
GdkColorspace
|
||||
GdkPixbufAlphaMode
|
||||
GdkPixbuf
|
||||
gdk_pixbuf_get_colorspace
|
||||
gdk_pixbuf_get_n_channels
|
||||
gdk_pixbuf_get_has_alpha
|
||||
gdk_pixbuf_get_bits_per_sample
|
||||
gdk_pixbuf_get_pixels
|
||||
gdk_pixbuf_get_width
|
||||
gdk_pixbuf_get_height
|
||||
gdk_pixbuf_get_rowstride
|
||||
gdk_pixbuf_get_option
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_PIXBUF_ERROR
|
||||
GDK_TYPE_COLORSPACE
|
||||
GDK_TYPE_PIXBUF_ALPHA_MODE
|
||||
GDK_PIXBUF
|
||||
GDK_TYPE_PIXBUF
|
||||
GDK_IS_PIXBUF
|
||||
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_pixbuf_get_type
|
||||
gdk_pixbuf_error_quark
|
||||
gdk_colorspace_get_type
|
||||
gdk_pixbuf_alpha_mode_get_type
|
||||
gdk_pixbuf_error_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>refcounting</FILE>
|
||||
gdk_pixbuf_ref
|
||||
gdk_pixbuf_unref
|
||||
GdkPixbufDestroyNotify
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>file-loading</FILE>
|
||||
gdk_pixbuf_new_from_file
|
||||
gdk_pixbuf_new_from_file_at_size
|
||||
gdk_pixbuf_new_from_file_at_scale
|
||||
gdk_pixbuf_get_file_info
|
||||
gdk_pixbuf_new_from_stream
|
||||
gdk_pixbuf_new_from_stream_at_scale
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>file-saving</FILE>
|
||||
gdk_pixbuf_savev
|
||||
gdk_pixbuf_save
|
||||
GdkPixbufSaveFunc
|
||||
gdk_pixbuf_save_to_callback
|
||||
gdk_pixbuf_save_to_callbackv
|
||||
gdk_pixbuf_save_to_buffer
|
||||
gdk_pixbuf_save_to_bufferv
|
||||
gdk_pixbuf_save_to_stream
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>creating</FILE>
|
||||
gdk_pixbuf_new
|
||||
gdk_pixbuf_new_from_data
|
||||
gdk_pixbuf_new_from_xpm_data
|
||||
gdk_pixbuf_new_from_inline
|
||||
gdk_pixbuf_new_subpixbuf
|
||||
gdk_pixbuf_copy
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gdk-pixbuf/gdk-pixdata.h</INCLUDE>
|
||||
<FILE>inline</FILE>
|
||||
GdkPixdata
|
||||
GdkPixdataType
|
||||
GdkPixdataDumpType
|
||||
GDK_PIXBUF_MAGIC_NUMBER
|
||||
GDK_PIXDATA_HEADER_LENGTH
|
||||
gdk_pixdata_from_pixbuf
|
||||
gdk_pixbuf_from_pixdata
|
||||
gdk_pixdata_serialize
|
||||
gdk_pixdata_deserialize
|
||||
gdk_pixdata_to_csource
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>util</FILE>
|
||||
gdk_pixbuf_add_alpha
|
||||
gdk_pixbuf_copy_area
|
||||
gdk_pixbuf_saturate_and_pixelate
|
||||
gdk_pixbuf_apply_embedded_orientation
|
||||
gdk_pixbuf_fill
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>animation</FILE>
|
||||
GdkPixbufAnimation
|
||||
GdkPixbufAnimationIter
|
||||
gdk_pixbuf_animation_new_from_file
|
||||
gdk_pixbuf_animation_ref
|
||||
gdk_pixbuf_animation_unref
|
||||
gdk_pixbuf_animation_get_width
|
||||
gdk_pixbuf_animation_get_height
|
||||
gdk_pixbuf_animation_get_iter
|
||||
gdk_pixbuf_animation_is_static_image
|
||||
gdk_pixbuf_animation_get_static_image
|
||||
gdk_pixbuf_animation_iter_advance
|
||||
gdk_pixbuf_animation_iter_get_delay_time
|
||||
gdk_pixbuf_animation_iter_on_currently_loading_frame
|
||||
gdk_pixbuf_animation_iter_get_pixbuf
|
||||
|
||||
<SUBSECTION>
|
||||
GdkPixbufSimpleAnim
|
||||
gdk_pixbuf_simple_anim_new
|
||||
gdk_pixbuf_simple_anim_add_frame
|
||||
gdk_pixbuf_simple_anim_set_loop
|
||||
gdk_pixbuf_simple_anim_get_loop
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_PIXBUF_ANIMATION
|
||||
GDK_TYPE_PIXBUF_ANIMATION
|
||||
GDK_IS_PIXBUF_ANIMATION
|
||||
GDK_IS_PIXBUF_ANIMATION_ITER
|
||||
GDK_PIXBUF_ANIMATION_ITER
|
||||
GDK_TYPE_PIXBUF_ANIMATION_ITER
|
||||
|
||||
GDK_PIXBUF_SIMPLE_ANIM_GET_CLASS
|
||||
GDK_IS_PIXBUF_SIMPLE_ANIM
|
||||
GDK_PIXBUF_SIMPLE_ANIM_CLASS
|
||||
GDK_IS_PIXBUF_SIMPLE_ANIM_CLASS
|
||||
GDK_TYPE_PIXBUF_SIMPLE_ANIM
|
||||
GDK_PIXBUF_SIMPLE_ANIM
|
||||
GDK_TYPE_PIXBUF_SCALED_ANIM
|
||||
GDK_TYPE_PIXBUF_SCALED_ANIM_ITER
|
||||
<SUBSECTION Private>
|
||||
gdk_pixbuf_non_anim_new
|
||||
|
||||
gdk_pixbuf_animation_get_type
|
||||
gdk_pixbuf_animation_iter_get_type
|
||||
|
||||
gdk_pixbuf_simple_anim_get_type
|
||||
gdk_pixbuf_simple_anim_iter_get_type
|
||||
GdkPixbufSimpleAnimClass
|
||||
gdk_pixbuf_scaled_anim_get_type
|
||||
gdk_pixbuf_scaled_anim_iter_get_type
|
||||
GdkPixbufScaledAnimClass
|
||||
GdkPixbufScaledAnim
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>scaling</FILE>
|
||||
GdkInterpType
|
||||
gdk_pixbuf_scale_simple
|
||||
gdk_pixbuf_scale
|
||||
gdk_pixbuf_composite_color_simple
|
||||
gdk_pixbuf_composite
|
||||
gdk_pixbuf_composite_color
|
||||
GdkPixbufRotation
|
||||
gdk_pixbuf_rotate_simple
|
||||
gdk_pixbuf_flip
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_INTERP_TYPE
|
||||
GDK_TYPE_PIXBUF_ROTATION
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_interp_type_get_type
|
||||
gdk_pixbuf_rotation_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf-loader</FILE>
|
||||
<TITLE>GdkPixbufLoader</TITLE>
|
||||
GdkPixbufLoader
|
||||
gdk_pixbuf_loader_new
|
||||
gdk_pixbuf_loader_new_with_type
|
||||
gdk_pixbuf_loader_new_with_mime_type
|
||||
gdk_pixbuf_loader_get_format
|
||||
gdk_pixbuf_loader_write
|
||||
gdk_pixbuf_loader_set_size
|
||||
gdk_pixbuf_loader_get_pixbuf
|
||||
gdk_pixbuf_loader_get_animation
|
||||
gdk_pixbuf_loader_close
|
||||
<SUBSECTION Standard>
|
||||
GDK_PIXBUF_LOADER
|
||||
GDK_PIXBUF_LOADER_GET_CLASS
|
||||
GDK_TYPE_PIXBUF_LOADER
|
||||
GDK_IS_PIXBUF_LOADER
|
||||
GDK_PIXBUF_LOADER_CLASS
|
||||
GDK_IS_PIXBUF_LOADER_CLASS
|
||||
<SUBSECTION Private>
|
||||
GdkPixbufLoaderClass
|
||||
gdk_pixbuf_loader_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Module Interface</TITLE>
|
||||
<FILE>module_interface</FILE>
|
||||
gdk_pixbuf_set_option
|
||||
gdk_pixbuf_get_formats
|
||||
gdk_pixbuf_format_get_name
|
||||
gdk_pixbuf_format_get_description
|
||||
gdk_pixbuf_format_get_mime_types
|
||||
gdk_pixbuf_format_get_extensions
|
||||
gdk_pixbuf_format_is_writable
|
||||
gdk_pixbuf_format_is_scalable
|
||||
gdk_pixbuf_format_is_disabled
|
||||
gdk_pixbuf_format_set_disabled
|
||||
gdk_pixbuf_format_get_license
|
||||
GdkPixbufFormat
|
||||
GdkPixbufFormatFlags
|
||||
GdkPixbufModulePattern
|
||||
GdkPixbufModuleFillVtableFunc
|
||||
GdkPixbufModuleFillInfoFunc
|
||||
GdkPixbufModuleSizeFunc
|
||||
GdkPixbufModulePreparedFunc
|
||||
GdkPixbufModuleUpdatedFunc
|
||||
GdkPixbufModule
|
||||
|
||||
<SUBSECTION Animation>
|
||||
GdkPixbufAnimationClass
|
||||
GdkPixbufAnimationIterClass
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_PIXBUF_ANIMATION_GET_CLASS
|
||||
GDK_IS_PIXBUF_ANIMATION_ITER_CLASS
|
||||
GDK_PIXBUF_ANIMATION_ITER_CLASS
|
||||
GDK_IS_PIXBUF_ANIMATION_CLASS
|
||||
GDK_PIXBUF_ANIMATION_ITER_GET_CLASS
|
||||
GDK_PIXBUF_ANIMATION_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf-xlib-init</FILE>
|
||||
gdk_pixbuf_xlib_init
|
||||
gdk_pixbuf_xlib_init_with_depth
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf-xlib-rendering</FILE>
|
||||
gdk_pixbuf_xlib_render_threshold_alpha
|
||||
gdk_pixbuf_xlib_render_to_drawable
|
||||
gdk_pixbuf_xlib_render_to_drawable_alpha
|
||||
gdk_pixbuf_xlib_render_pixmap_and_mask
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf-xlib-from-drawables</FILE>
|
||||
gdk_pixbuf_xlib_get_from_drawable
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf-xlib-rgb</FILE>
|
||||
XlibRgbCmap
|
||||
XlibRgbDither
|
||||
xlib_rgb_init
|
||||
xlib_rgb_init_with_depth
|
||||
xlib_rgb_xpixel_from_rgb
|
||||
xlib_rgb_gc_set_foreground
|
||||
xlib_rgb_gc_set_background
|
||||
xlib_draw_rgb_image
|
||||
xlib_draw_rgb_image_dithalign
|
||||
xlib_draw_rgb_32_image
|
||||
xlib_draw_gray_image
|
||||
xlib_rgb_cmap_new
|
||||
xlib_rgb_cmap_free
|
||||
xlib_draw_indexed_image
|
||||
xlib_rgb_ditherable
|
||||
xlib_rgb_set_verbose
|
||||
xlib_rgb_set_install
|
||||
xlib_rgb_set_min_colors
|
||||
xlib_rgb_get_cmap
|
||||
xlib_rgb_get_visual
|
||||
xlib_rgb_get_visual_info
|
||||
xlib_rgb_get_depth
|
||||
xlib_rgb_get_display
|
||||
xlib_rgb_get_screen
|
||||
</SECTION>
|
||||
|
@@ -1,192 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
|
||||
<!ENTITY gdk-pixbuf "<application>gdk-pixbuf</application>">
|
||||
<!ENTITY Imlib "<application>Imlib</application>">
|
||||
]>
|
||||
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<bookinfo>
|
||||
<title>GDK-PixBuf Reference Manual</title>
|
||||
<releaseinfo>
|
||||
Version &version;
|
||||
The latest version of this documentation can be found on-line at
|
||||
<ulink role="online-location" url="http://library.gnome.org/devel/gdk-pixbuf/unstable/">http://library.gnome.org/devel/gdk-pixbuf/unstable/</ulink>.
|
||||
</releaseinfo>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Federico</firstname>
|
||||
<surname>Mena Quintero</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>federico@gimp.org</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<holder>The Free Software Foundation</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the <citetitle>GNU Free
|
||||
Documentation License</citetitle>, Version 1.1 or any later
|
||||
version published by the Free Software Foundation with no
|
||||
Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
Texts. You may obtain a copy of the <citetitle>GNU Free
|
||||
Documentation License</citetitle> from the Free Software
|
||||
Foundation by visiting <ulink type="http"
|
||||
url="http://www.fsf.org">their Web site</ulink> or by writing
|
||||
to:
|
||||
|
||||
<address>
|
||||
The Free Software Foundation, Inc.,
|
||||
<street>59 Temple Place</street> - Suite 330,
|
||||
<city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>,
|
||||
<country>USA</country>
|
||||
</address>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Many of the names used by companies to distinguish their
|
||||
products and services are claimed as trademarks. Where those
|
||||
names appear in any GNOME documentation, and those trademarks
|
||||
are made aware to the members of the GNOME Documentation
|
||||
Project, the names have been printed in caps or initial caps.
|
||||
</para>
|
||||
</legalnotice>
|
||||
</bookinfo>
|
||||
|
||||
<reference>
|
||||
<title>API Reference</title>
|
||||
|
||||
<partintro>
|
||||
<para>
|
||||
This part presents the class and function reference for the
|
||||
&gdk-pixbuf; library. Classes are described together with
|
||||
their methods; individual functions are grouped by functional
|
||||
group.
|
||||
</para>
|
||||
</partintro>
|
||||
|
||||
<xi:include href="xml/initialization_versions.xml" />
|
||||
|
||||
<xi:include href="xml/gdk-pixbuf.xml" />
|
||||
<xi:include href="xml/refcounting.xml" />
|
||||
<xi:include href="xml/file-loading.xml" />
|
||||
<xi:include href="xml/file-saving.xml" />
|
||||
<xi:include href="xml/creating.xml" />
|
||||
<xi:include href="xml/inline.xml" />
|
||||
<xi:include href="xml/scaling.xml" />
|
||||
<xi:include href="gdk-pixbuf-rendering.sgml" />
|
||||
<xi:include href="gdk-pixbuf-from-drawables.sgml" />
|
||||
<xi:include href="xml/util.xml" />
|
||||
<xi:include href="xml/animation.xml" />
|
||||
|
||||
<xi:include href="xml/gdk-pixbuf-loader.xml" />
|
||||
<xi:include href="xml/module_interface.xml" />
|
||||
|
||||
<xi:include href="xml/gdk-pixbuf-xlib-init.xml" />
|
||||
<xi:include href="xml/gdk-pixbuf-xlib-rendering.xml" />
|
||||
<xi:include href="xml/gdk-pixbuf-xlib-from-drawables.xml" />
|
||||
<xi:include href="xml/gdk-pixbuf-xlib-rgb.xml" />
|
||||
</reference>
|
||||
|
||||
<reference>
|
||||
<title>Tools Reference</title>
|
||||
|
||||
<partintro>
|
||||
<para>
|
||||
This part presents the tools which are shipped with the
|
||||
&gdk-pixbuf; library.
|
||||
</para>
|
||||
</partintro>
|
||||
|
||||
<xi:include href="gdk-pixbuf-csource.xml" />
|
||||
<xi:include href="gdk-pixbuf-query-loaders.xml" />
|
||||
</reference>
|
||||
|
||||
<index id="api-index-full">
|
||||
<title>Index of all symbols</title>
|
||||
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-deprecated" role="deprecated">
|
||||
<title>Index of deprecated symbols</title>
|
||||
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<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>
|
||||
|
||||
<xi:include href="porting-from-imlib.sgml" />
|
||||
|
||||
<!-- License -->
|
||||
|
||||
<appendix id="license">
|
||||
<title>License</title>
|
||||
|
||||
<para>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the <citetitle>GNU Library General
|
||||
Public License</citetitle> as published by the Free Software
|
||||
Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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
|
||||
<citetitle>GNU Library General Public License</citetitle> for
|
||||
more details.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You may obtain a copy of the <citetitle>GNU Library General
|
||||
Public License</citetitle> from the Free Software Foundation by
|
||||
visiting <ulink type="http" url="http://www.fsf.org">their Web
|
||||
site</ulink> or by writing to:
|
||||
|
||||
<address>
|
||||
Free Software Foundation, Inc.
|
||||
<street>59 Temple Place</street> - Suite 330
|
||||
<city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
|
||||
<country>USA</country>
|
||||
</address>
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
</book>
|
@@ -1,8 +0,0 @@
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
gdk_pixbuf_get_type
|
||||
gdk_pixbuf_loader_get_type
|
||||
gdk_pixbuf_animation_get_type
|
||||
gdk_pixbuf_animation_iter_get_type
|
||||
gdk_pixbuf_simple_anim_get_type
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
@@ -1,358 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
<!ENTITY gdk-pixbuf "<application>gdk-pixbuf</application>">
|
||||
<!ENTITY Imlib "<application>Imlib</application>">
|
||||
]>
|
||||
<appendix>
|
||||
<title>Porting applications from &Imlib; to &gdk-pixbuf;</title>
|
||||
|
||||
<para>
|
||||
This appendix contains the basic steps needed to port an
|
||||
application that uses the &Imlib; library to use &gdk-pixbuf;
|
||||
instead.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
This appendix refers to version 1 of the &Imlib; library; this
|
||||
discussion is not relevant to Imlib 2. Also, we discuss the
|
||||
gdk_imlib API instead of the Xlib-based API.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<!-- Introduction -->
|
||||
|
||||
<sect1>
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>
|
||||
Prior to the GNOME 1.2 platform, the &Imlib; library was the
|
||||
preferred way of loading and rendering images in GNOME
|
||||
applications. Unfortunately, &Imlib; has important design
|
||||
limitations that make it hard to write efficient and highly
|
||||
modular applications.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The &gdk-pixbuf; library was designed as a solution to
|
||||
&Imlib;'s shortcomings. It provides a simple, orthogonal API
|
||||
and convenience functions for the most common operations. In
|
||||
addition, it supports full transparency information for
|
||||
images, or alpha channel. More importantly, it has
|
||||
well-defined semantics for memory management through the use
|
||||
of reference counting; &Imlib; has an intractably complex
|
||||
memory management mechanism and cache that will make your head
|
||||
spin.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Differences between Imlib and gdk-pixbuf -->
|
||||
|
||||
<sect1>
|
||||
<title>Differences between &Imlib; and &gdk-pixbuf;</title>
|
||||
|
||||
<para>
|
||||
Generally, applications that use &Imlib; do not have to be
|
||||
changed extensively to use &gdk-pixbuf;; its simple and
|
||||
flexible API makes things easy. This section describes the
|
||||
differences between &Imlib; and &gdk-pixbuf;; you should take
|
||||
these into account when modifying your applications to use
|
||||
&gdk-pixbuf;.
|
||||
</para>
|
||||
|
||||
<!-- Initialization -->
|
||||
|
||||
<sect2>
|
||||
<title>Initialization</title>
|
||||
|
||||
<para>
|
||||
The &gdk-pixbuf; library does not need to be initialized.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
In GNOME applications you normally don't need to
|
||||
initialize &Imlib;, as <function>gnome_init()</function>
|
||||
calls <function>gdk_imlib_init()</function> automatically.
|
||||
</para>
|
||||
</note>
|
||||
</sect2>
|
||||
|
||||
<!-- Memory management -->
|
||||
|
||||
<sect2>
|
||||
<title>Memory management</title>
|
||||
|
||||
<para>
|
||||
The &gdk-pixbuf; library provides a simple, well-defined
|
||||
memory management mechanism for images in the form of
|
||||
reference counting. This makes it very convenient to use
|
||||
for large-scale applications that need to share images
|
||||
between different parts of the program. In stark contrast,
|
||||
&Imlib; has a terribly complex mechanism of an image and
|
||||
pixmap cache which makes it very hard for applications to
|
||||
share image structures between different parts of the
|
||||
program. Unfortunately this mechanism makes things very
|
||||
prone to memory leaks and tricky bugs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The basic principle in &gdk-pixbuf; is that when you obtain
|
||||
a new <link linkend="GdkPixbuf">GdkPixbuf</link> structure,
|
||||
it is created with an initial reference count of 1. When
|
||||
another part of the program wants to keep a reference to the
|
||||
pixbuf, it should call <function>g_object_ref()</function>;
|
||||
this will increase the reference count by 1. When some part
|
||||
of the program does not need to keep a reference to a pixbuf
|
||||
anymore and wants to release the pixbuf, it should call
|
||||
<function>g_object_unref()</function>; this will decrease
|
||||
the reference count by 1. When the reference count drops to
|
||||
zero, the pixbuf gets destroyed or
|
||||
<emphasis>finalized</emphasis> and its memory is freed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For applications that need to implement a cache of loaded
|
||||
images, &gdk-pixbuf; provides a way to hook to the last
|
||||
unreference operation of a pixbuf; instead of finalizing the
|
||||
pixbuf, the user-installed hook can decide to keep it around
|
||||
in a cache instead.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Finally, &gdk-pixbuf; does not provide a cache of rendered
|
||||
pixmaps. This is unnecessary for most applications, since
|
||||
the scaling and rendering functions are quite fast and
|
||||
applications may need to use subtly different values each
|
||||
time they call these functions, for example, to take into
|
||||
account dithering and zooming offsets.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Most applications will simply need to call
|
||||
<function>g_object_ref()</function> when they want to keep
|
||||
an extra reference to a pixbuf, and then
|
||||
<function>g_object_unref()</function> when they are done
|
||||
with it.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<!-- The Rendering Process -->
|
||||
|
||||
<sect2>
|
||||
<title>The Rendering Process</title>
|
||||
|
||||
<para>
|
||||
The &gdk-pixbuf; library has the policy of always rendering
|
||||
pixbufs to GDK drawables you provide; it will not create
|
||||
them for you. This is in general more flexible than
|
||||
&Imlib;'s policy of always creating a pixmap and making you
|
||||
use that instead.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The disadvantage of always having a pixmap created for you
|
||||
is that it wastes memory in the X server if you intend to
|
||||
copy that rendered data onto another drawable, for example,
|
||||
the final destination window or a temporary pixmap for
|
||||
drawing. This is the most common case, unfortunately, so
|
||||
the &Imlib; policy introduces unnecessary copying.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Also, &Imlib; can only render pixmaps that are the whole
|
||||
size of the source image; you cannot render just a subset
|
||||
region of the image. This is inconvenient for applications
|
||||
that need to render small portions at a time, such as
|
||||
applications that do scrolling. Since the whole image must
|
||||
be rendered at a time, this can lead to performance and
|
||||
memory usage problems.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The &gdk-pixbuf; library lets you render any rectangular
|
||||
region from an image onto any drawable that you provide.
|
||||
This lets the application have fine control the way images
|
||||
are rendered.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<!-- Converting Applications to gdk-pixbuf -->
|
||||
|
||||
<sect1>
|
||||
<title>Converting Applications to &gdk-pixbuf;</title>
|
||||
|
||||
<para>
|
||||
This sections describes the actual changes you need to make in
|
||||
an &Imlib; program to make it use &gdk-pixbuf; instead.
|
||||
</para>
|
||||
|
||||
<!-- Image loading and creation -->
|
||||
|
||||
<sect2>
|
||||
<title>Image loading and creation</title>
|
||||
|
||||
<para>
|
||||
The &gdk-pixbuf; library can load image files synchronously
|
||||
(i.e. with a single function call), create images from RGB
|
||||
data in memory, and as a convenience, it can also create
|
||||
images from inline XPM data.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To load an image file in a single function call, simply use
|
||||
<function>gdk_pixbuf_new_from_file()</function>. Note that
|
||||
this will make the program block until the whole file has
|
||||
been read. This function effectively replaces
|
||||
<function>gdk_imlib_load_image()</function>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you have RGB data in memory, you can use
|
||||
<function>gdk_pixbuf_new_from_data()</function> to create a
|
||||
pixbuf out of it; this is a replacement for
|
||||
<function>gdk_imlib_create_image_from_data()</function>.
|
||||
&gdk-pixbuf; does not copy the image data; it is up to you
|
||||
to define the ownership policy by providing a destroy
|
||||
notification function that will be called when the image
|
||||
data needs to be freed. The function you provide can then
|
||||
free the data or do something else, as appropriate.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As a convenience, you can use the
|
||||
<function>gdk_pixbuf_new_from_xpm_data()</function> function
|
||||
to create a pixbuf out of inline XPM data that was compiled
|
||||
into your C program. This is a replacement for
|
||||
<function>gdk_imlib_create_image_from_xpm_data()</function>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After you have created a pixbuf, you can manipulate it in
|
||||
any way you please and then finally call
|
||||
<function>g_object_unref()</function> when you are done
|
||||
with it. This can be thought of as a replacement for
|
||||
<function>gdk_imlib_destroy_image()</function> but with much
|
||||
cleaner semantics.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<!-- Rendering Images -->
|
||||
|
||||
<sect2>
|
||||
<title>Rendering Images</title>
|
||||
|
||||
<para>
|
||||
Applications that use &Imlib; must first call
|
||||
<function>gdk_imlib_render()</function> to render the whole
|
||||
image data onto a pixmap that &Imlib; creates. Then they
|
||||
must copy that pixmap's data into the final destination for
|
||||
the image.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In contrast, &gdk-pixbuf; provides convenience functions to
|
||||
render arbitrary rectangular regions of an image onto a
|
||||
drawable that your application provides. You can use
|
||||
<function>gdk_draw_pixbuf()</function> to do this; having
|
||||
your application provide the destination drawable and
|
||||
specify an arbitrary region means your application has
|
||||
complete control over the way images are rendered.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As a convenience, &gdk-pixbuf; also provides the
|
||||
<function>gdk_pixbuf_render_pixmap_and_mask()</function>
|
||||
function; this will create new pixmap and mask drawables for
|
||||
a whole pixbuf and render the image data onto them. Only
|
||||
trivially simple applications should find a use for this
|
||||
function, since usually you want finer control of how things
|
||||
are rendered.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<!-- Scaling Images -->
|
||||
|
||||
<sect2>
|
||||
<title>Scaling Images</title>
|
||||
|
||||
<para>
|
||||
&Imlib; lets you render scaled image data at the time you
|
||||
call <function>gdk_imlib_render()</function>. Again, this
|
||||
unfortunately scales and renders the whole image onto a new
|
||||
pixmap.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
&gdk-pixbuf; provides a number of functions that do scaling
|
||||
of arbitrary regions of a source pixbuf onto a destination
|
||||
one. These functions can also perform compositing
|
||||
operations against the data in the destination pixbuf or
|
||||
against a solid color or a colored checkerboard.
|
||||
<footnote>
|
||||
<para>
|
||||
You can use a colored checkerboard as the background for
|
||||
compositing when you want to provide a visual indication
|
||||
that the image has partially opaque areas. This is
|
||||
normally used in image editing and viewing programs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Compositing against a single solid color is actually a
|
||||
special case of a checkerboard; it simply uses checks of
|
||||
the same color.
|
||||
</para>
|
||||
</footnote>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Very simple applications may find it sufficient to use
|
||||
<function>gdk_pixbuf_scale_simple()</function> or
|
||||
<function>gdk_pixbuf_composite_color_simple()</function>.
|
||||
These functions scale the whole source image at a time and
|
||||
create a new pixbuf with the result.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
More sophisticated applications will need to use
|
||||
<function>gdk_pixbuf_scale()</function>,
|
||||
<function>gdk_pixbuf_composite()</function>, or
|
||||
<function>gdk_pixbuf_composite_color()</function> instead.
|
||||
These functions let you scale and composite an arbitrary
|
||||
region of the source pixbuf onto a destination pixbuf that
|
||||
you provide.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<!-- Getting Image Data from a Drawable -->
|
||||
|
||||
<sect2>
|
||||
<title>Getting Image Data from a Drawable</title>
|
||||
|
||||
<para>
|
||||
&Imlib; lets you create an image by fetching a drawable's
|
||||
contents from the X server and converting those into RGB
|
||||
data. This is done with the
|
||||
<function>gdk_imlib_create_image_from_drawable()</function>
|
||||
function.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
&gdk-pixbuf; provides the
|
||||
<function>gdk_pixbuf_get_from_drawable()</function> function
|
||||
instead. It lets you specify a destination pixbuf instead
|
||||
of always creating a new one for you.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</appendix>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gdk-pixbuf.sgml" "book" "book" "")
|
||||
End:
|
||||
-->
|
||||
|
@@ -1,197 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Animations
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Animated images.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The &gdk-pixbuf; library provides a simple mechanism to load and represent
|
||||
animations. An animation is conceptually a series of frames to be displayed
|
||||
over time. Each frame is the same size. The animation may not be represented
|
||||
as a series of frames internally; for example, it may be stored as a
|
||||
sprite and instructions for moving the sprite around a background. To display
|
||||
an animation you don't need to understand its representation, however; you just
|
||||
ask &gdk-pixbuf; what should be displayed at a given point in time.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbufLoader
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimation ##### -->
|
||||
<para>
|
||||
An opaque struct representing an animation.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationIter ##### -->
|
||||
<para>
|
||||
An opaque struct representing an iterator which points to a
|
||||
certain position in an animation.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_new_from_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_get_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_get_height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_get_iter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@start_time:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_is_static_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_get_static_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_iter_advance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@iter:
|
||||
@current_time:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_iter_get_delay_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_iter_on_currently_loading_frame ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_iter_get_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufSimpleAnim ##### -->
|
||||
<para>
|
||||
An opaque struct representing a simple animation.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GdkPixbufSimpleAnim:loop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@width:
|
||||
@height:
|
||||
@rate:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_add_frame ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@pixbuf:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_set_loop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@loop:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_get_loop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
@@ -1,126 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Image Data in Memory
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Creating a pixbuf from image data that is already in memory.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The most basic way to create a pixbuf is to wrap an existing pixel
|
||||
buffer with a #GdkPixbuf structure. You can use the
|
||||
gdk_pixbuf_new_from_data() function to do this You need to specify
|
||||
the destroy notification function that will be called when the
|
||||
data buffer needs to be freed; this will happen when a #GdkPixbuf
|
||||
is finalized by the reference counting functions If you have a
|
||||
chunk of static data compiled into your application, you can pass
|
||||
in %NULL as the destroy notification function so that the data
|
||||
will not be freed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The gdk_pixbuf_new() function can be used as a convenience to
|
||||
create a pixbuf with an empty buffer. This is equivalent to
|
||||
allocating a data buffer using <function>malloc()</function> and
|
||||
then wrapping it with gdk_pixbuf_new_from_data(). The gdk_pixbuf_new()
|
||||
function will compute an optimal rowstride so that rendering can be
|
||||
performed with an efficient algorithm.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As a special case, you can use the gdk_pixbuf_new_from_xpm_data()
|
||||
function to create a pixbuf from inline XPM image data.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can also copy an existing pixbuf with the gdk_pixbuf_copy()
|
||||
function. This is not the same as just doing a g_object_ref()
|
||||
on the old pixbuf; the copy function will actually duplicate the
|
||||
pixel data in memory and create a new #GdkPixbuf structure for it.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
gdk_pixbuf_finalize().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorspace:
|
||||
@has_alpha:
|
||||
@bits_per_sample:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@colorspace:
|
||||
@has_alpha:
|
||||
@bits_per_sample:
|
||||
@width:
|
||||
@height:
|
||||
@rowstride:
|
||||
@destroy_fn:
|
||||
@destroy_fn_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_xpm_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_inline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data_length:
|
||||
@data:
|
||||
@copy_pixels:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_subpixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src_pixbuf:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
@@ -1,106 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
File Loading
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Loading a pixbuf from a file.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The &gdk-pixbuf; library provides a simple mechanism for loading
|
||||
an image from a file in synchronous fashion. This means that the
|
||||
library takes control of the application while the file is being
|
||||
loaded; from the user's point of view, the application will block
|
||||
until the image is done loading.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This interface can be used by applications in which blocking is
|
||||
acceptable while an image is being loaded. It can also be used to
|
||||
load small images in general. Applications that need progressive
|
||||
loading can use the #GdkPixbufLoader functionality instead.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbufLoader.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@error:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_file_at_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@width:
|
||||
@height:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_file_at_scale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@width:
|
||||
@height:
|
||||
@preserve_aspect_ratio:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_file_info ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_stream ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@stream:
|
||||
@cancellable:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_stream_at_scale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@stream:
|
||||
@width:
|
||||
@height:
|
||||
@preserve_aspect_ratio:
|
||||
@cancellable:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
@@ -1,140 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
File saving
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Saving a pixbuf to a file.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions allow to save a #GdkPixbuf in a number of
|
||||
file formats. The formatted data can be written to a file
|
||||
or to a memory buffer. &gdk-pixbuf; can also call a user-defined
|
||||
callback on the data, which allows to e.g. write the image
|
||||
to a socket or store it in a database.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_savev ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@filename:
|
||||
@type:
|
||||
@option_keys:
|
||||
@option_values:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@filename:
|
||||
@type:
|
||||
@error:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufSaveFunc ##### -->
|
||||
<para>
|
||||
Specifies the type of the function passed to
|
||||
gdk_pixbuf_save_to_callback(). It is called once for each block of
|
||||
bytes that is "written" by gdk_pixbuf_save_to_callback(). If
|
||||
successful it should return %TRUE. If an error occurs it should set
|
||||
@error and return %FALSE, in which case gdk_pixbuf_save_to_callback()
|
||||
will fail with the same error.
|
||||
</para>
|
||||
|
||||
@buf: bytes to be written.
|
||||
@count: number of bytes in @buf.
|
||||
@error: A location to return an error.
|
||||
@data: user data passed to gdk_pixbuf_save_to_callback().
|
||||
@Returns: %TRUE if successful, %FALSE (with @error set) if failed.
|
||||
@Since: 2.4
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_callback ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@save_func:
|
||||
@user_data:
|
||||
@type:
|
||||
@error:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_callbackv ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@save_func:
|
||||
@user_data:
|
||||
@type:
|
||||
@option_keys:
|
||||
@option_values:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@buffer:
|
||||
@buffer_size:
|
||||
@type:
|
||||
@error:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_bufferv ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@buffer:
|
||||
@buffer_size:
|
||||
@type:
|
||||
@option_keys:
|
||||
@option_values:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_stream ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@stream:
|
||||
@type:
|
||||
@cancellable:
|
||||
@error:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
@@ -1,205 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkPixbufLoader
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Application-driven progressive image loading.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GdkPixbufLoader provides a way for applications to drive the
|
||||
process of loading an image, by letting them send the image data
|
||||
directly to the loader instead of having the loader read the data
|
||||
from a file. Applications can use this functionality instead of
|
||||
gdk_pixbuf_new_from_file() or gdk_pixbuf_animation_new_from_file()
|
||||
when they need to parse image data in
|
||||
small chunks. For example, it should be used when reading an
|
||||
image from a (potentially) slow network connection, or when
|
||||
loading an extremely large file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To use #GdkPixbufLoader to load an image, just create a new one,
|
||||
and call gdk_pixbuf_loader_write() to send the data to it. When
|
||||
done, gdk_pixbuf_loader_close() should be called to end the stream
|
||||
and finalize everything. The loader will emit three important
|
||||
signals throughout the process. The first, "<link
|
||||
linkend="GdkPixbufLoader-size-prepared">size_prepared</link>",
|
||||
will be called as soon as the image has enough information to
|
||||
determine the size of the image to be used. If you want to scale
|
||||
the image while loading it, you can call gdk_pixbuf_loader_set_size()
|
||||
in response to this signal.
|
||||
</para>
|
||||
|
||||
<para>The second signal, "<link
|
||||
linkend="GdkPixbufLoader-area-prepared">area_prepared</link>",
|
||||
will be called as soon as the pixbuf of the desired has been
|
||||
allocated. You can obtain it by calling gdk_pixbuf_loader_get_pixbuf().
|
||||
If you want to use it, simply ref it.
|
||||
In addition, no actual information will be passed in yet, so the
|
||||
pixbuf can be safely filled with any temporary graphics (or an
|
||||
initial color) as needed. You can also call
|
||||
gdk_pixbuf_loader_get_pixbuf() later and get the same pixbuf.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The last signal, "<link
|
||||
linkend="GdkPixbufLoader-area-updated">area_updated</link>" gets
|
||||
called every time a region is updated. This way you can update a
|
||||
partially completed image. Note that you do not know anything
|
||||
about the completeness of an image from the area updated. For
|
||||
example, in an interlaced image, you need to make several passes
|
||||
before the image is done loading.
|
||||
</para>
|
||||
|
||||
<refsect2>
|
||||
<title>Loading an animation</title>
|
||||
|
||||
<para>
|
||||
Loading an animation is almost as easy as loading an
|
||||
image. Once the first "<link
|
||||
linkend="GdkPixbufLoader-area-prepared">area_prepared</link>" signal
|
||||
has been emitted, you can call gdk_pixbuf_loader_get_animation()
|
||||
to get the #GdkPixbufAnimation struct and gdk_pixbuf_animation_get_iter()
|
||||
to get an #GdkPixbufAnimationIter for displaying it.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
gdk_pixbuf_new_from_file(), gdk_pixbuf_animation_new_from_file()
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufLoader ##### -->
|
||||
<para>
|
||||
The <structname>GdkPixbufLoader</structname> struct contains only private
|
||||
fields.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader:
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader:
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader:
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::size-prepared ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader:
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_new_with_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_type:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_new_with_mime_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@mime_type:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_get_format ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_write ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@buf:
|
||||
@count:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_set_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_get_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_get_animation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_close ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
@@ -1,569 +0,0 @@
|
||||
<!-- ##### SECTION ./tmpl/from-drawables.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section allow you to take the image data
|
||||
from a GDK drawable and dump it into a #GdkPixbuf. This can be
|
||||
used for screenshots and other special effects. Note that these
|
||||
operations can be expensive, since the image data has to be
|
||||
transferred from the X server to the client program and converted.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/from-drawables.sgml:See_Also ##### -->
|
||||
<para>
|
||||
gdk_image_get().
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/from-drawables.sgml:Short_Description ##### -->
|
||||
Getting parts of a drawable's image data into a pixbuf.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/from-drawables.sgml:Title ##### -->
|
||||
Drawables to Pixbufs
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
This canvas item displays #GdkPixbuf images. It handles full
|
||||
affine transformations in both GDK and antialiased modes, and also
|
||||
supports the <ulink url="http://www.w3.org">W3C</ulink>'s <ulink
|
||||
url="http://www.w3.org/Graphics/SVG/">SVG</ulink>-like scaling and
|
||||
translation semantics for absolute pixel values.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
#GdkPixbuf structures may be shared among different pixbuf canvas
|
||||
items; the pixbuf item uses #GdkPixbuf's reference counting
|
||||
functions for this.
|
||||
</para>
|
||||
|
||||
<refsect2>
|
||||
<title>Custom Scaling and Translation</title>
|
||||
|
||||
<para>
|
||||
In addition to the normal affine transformations supported by
|
||||
canvas items, the #GnomeCanvasPixbuf item supports independent
|
||||
object arguments for scaling and translation. This is useful
|
||||
for explicitly setting a size to which the pixbuf's image will
|
||||
be scaled, and for specifying translation offsets that take
|
||||
place in the item's local coordinate system.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default, the pixbuf canvas item will attain the size in units
|
||||
of the #GdkPixbuf it contains. If a #GnomeCanvasPixbuf is
|
||||
configured to use a #GdkPixbuf that has a size of 300 by 200
|
||||
pixels, then the pixbuf item will automatically obtain a size of
|
||||
300 by 200 units in the item's local coordinate system. If the
|
||||
item is transformed with a scaling transformation of (0.5, 2.0),
|
||||
then the final image size will be of 150 by 400 pixels.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To set custom width and height values, you must set the <link
|
||||
linkend="GnomeCanvasPixbuf--width-set">width_set</link> or <link
|
||||
linkend="GnomeCanvasPixbuf--height-set">height_set</link>
|
||||
arguments to %TRUE, and then set the <link
|
||||
linkend="GnomeCanvasPixbuf--width">width</link> or <link
|
||||
linkend="GnomeCanvasPixbuf--height">height</link> arguments to
|
||||
the desired values. The former two arguments control whether
|
||||
the latter two are used when computing the final image's size;
|
||||
they are both %FALSE by default so that the pixbuf item will
|
||||
attain a size in units equal to the size in pixels of the
|
||||
#GdkPixbuf that the item contains.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The custom translation offsets are controlled by the <link
|
||||
linkend="GnomeCanvasPixbuf--x">x</link> and <link
|
||||
linkend="GnomeCanvasPixbuf--y">y</link> arguments. The logical
|
||||
upper-left vertex of the image will be translated by the
|
||||
specified distance, aligned with the item's local coordinate
|
||||
system.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Absolute Pixel Scaling and Translation</title>
|
||||
|
||||
<para>
|
||||
The <ulink url="http://www.w3.org/Graphics/SVG/">Scalable Vector
|
||||
Graphics</ulink> specification (SVG) of the <ulink
|
||||
url="http://www.w3.org">World Wide Web Consortium</ulink> also
|
||||
allows images to be translated and scaled by absolute pixel
|
||||
values that are independent of an item's normal affine
|
||||
transformation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Normally, the pixbuf item's translation and scaling arguments
|
||||
are interpreted in units, so they will be modified by the item's
|
||||
affine transformation. The <link
|
||||
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>,
|
||||
<link
|
||||
linkend="GnomeCanvasPixbuf--height-in-pixels">height_in_pixels</link>,
|
||||
<link
|
||||
linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>, and
|
||||
<link
|
||||
linkend="GnomeCanvasPixbuf--y-in-pixels">y_in_pixels</link>
|
||||
object arguments can be used to modify this behavior. If one of
|
||||
these arguments is %TRUE, then the corresponding scaling or
|
||||
translation value will not be affected lengthwise by the pixbuf
|
||||
item's affine transformation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For example, consider a pixbuf item whose size is (300, 200).
|
||||
If the item is modified with a scaling transformation of (0.5,
|
||||
2.0) but the <link
|
||||
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
|
||||
is set to %TRUE, then the item will appear to be (300, 400)
|
||||
pixels in size. This means that in this case the item's affine
|
||||
transformation only applies to the height value, while the width
|
||||
value is kept in absolute pixels.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Likewise, consider a pixbuf item whose (<link
|
||||
linkend="GnomeCanvasPixbuf--x">x</link>, <link
|
||||
linkend="GnomeCanvasPixbuf--y">y</link>) arguments are set to
|
||||
(30, 40). If the item is then modified by the same scaling
|
||||
transformation of (0.5, 2.0) but the <link
|
||||
linkend="GnomeCanvasPixbuf--y-in-pixels">y_in_pixels</link>
|
||||
argument is set to %TRUE, then the image's upper-left corner
|
||||
will appear to be at position (15, 40). In this case, the
|
||||
affine transformation is applied only to the x offset, while the
|
||||
y offset is kept in absolute pixels.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In short, these arguments control whether a particular dimension
|
||||
of a pixbuf item is scaled or not in the normal way by the
|
||||
item's affine transformation.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Resource Management</title>
|
||||
|
||||
<para>
|
||||
When you set the #GdkPixbuf structure that a #GnomeCanvasPixbuf
|
||||
item will use by setting the <link
|
||||
linkend="GnomeCanvasPixbuf--pixbuf">pixbuf</link> argument, a
|
||||
reference count will be added to that #GdkPixbuf structure.
|
||||
When the pixbuf item no longer needs the #GdkPixbuf structure,
|
||||
such as when the item is destroyed or when a new pixbuf
|
||||
structure is passed to it, then the old #GdkPixbuf structure
|
||||
will be automatically unreferenced.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This means that if an application just needs to load a pixbuf
|
||||
image and set it into a pixbuf canvas item, it can do the
|
||||
following to ‘forget’ about the pixbuf structure:
|
||||
|
||||
<programlisting>
|
||||
GdkPixbuf *pixbuf;
|
||||
GnomeCanvasItem *item;
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file ("foo.png");
|
||||
g_assert (pixbuf != NULL);
|
||||
|
||||
item = gnome_canvas_item_new (gnome_canvas_root (my_canvas),
|
||||
gnome_canvas_pixbuf_get_type (),
|
||||
"pixbuf", pixbuf,
|
||||
NULL);
|
||||
gdk_pixbuf_unref (pixbuf);
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After this happens, the reference count of the pixbuf structure
|
||||
will be 1: the gdk_pixbuf_new_from_file() function creates it
|
||||
with a reference count of 1, then setting the <link
|
||||
linkend="GnomeCanvasPixbuf--pixbuf">pixbuf</link> argument of
|
||||
the #GnomeCanvasPixbuf item increases it to 2, and then it is
|
||||
decremented to 1 by the call to gdk_pixbuf_unref(). When the
|
||||
canvas item is destroyed, it will automatically unreference the
|
||||
pixbuf structure again, causing its reference count to drop to
|
||||
zero and thus be freed.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:See_Also ##### -->
|
||||
<para>
|
||||
#GnomeCanvas, #GdkPixbuf
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:Short_Description ##### -->
|
||||
Canvas item to display #GdkPixbuf images.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:Title ##### -->
|
||||
GnomeCanvasPixbuf
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/rendering.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
The &gdk-pixbuf; library provides several convenience functions to
|
||||
render pixbufs to GDK drawables. It uses the GdkRGB to render the
|
||||
image data.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
At this point there is not a standard alpha channel extension for
|
||||
the X Window System, so it is not possible to use full opacity
|
||||
information when painting images to arbitrary drawables. The
|
||||
&gdk-pixbuf; convenience functions will threshold the opacity
|
||||
information to create a bi-level clipping mask (black and white),
|
||||
and use that to draw the image onto a drawable.
|
||||
</para>
|
||||
|
||||
<important>
|
||||
<para>
|
||||
Since these functions use GdkRGB for rendering, you must
|
||||
initialize GdkRGB before using any of them. You can do this by
|
||||
calling gdk_rgb_init() near the beginning of your program.
|
||||
</para>
|
||||
</important>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/rendering.sgml:See_Also ##### -->
|
||||
<para>
|
||||
GdkRGB
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/rendering.sgml:Short_Description ##### -->
|
||||
Rendering a pixbuf to a GDK drawable.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/rendering.sgml:Title ##### -->
|
||||
Rendering
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section allow you to take the image data
|
||||
from an X drawable and dump it into a #GdkPixbuf. This can be
|
||||
used for screenshots and other special effects. Note that these
|
||||
operations can be expensive, since the image data has to be
|
||||
transferred from the X server to the client program and converted.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These functions are analogous to those for the Gdk version of
|
||||
&gdk-pixbuf;.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Short_Description ##### -->
|
||||
Getting parts of an X drawable's image data into a pixbuf.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Title ##### -->
|
||||
X Drawables to Pixbufs
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-init.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
In addition to the normal Gdk-specific functions, the &gdk-pixbuf;
|
||||
package provides a small library that lets Xlib-only applications
|
||||
use #GdkPixbuf structures and render them to X drawables. The
|
||||
functions in this section are used to initialize the &gdk-pixbuf;
|
||||
Xlib library. This library must be initialized near the beginning
|
||||
or the program or before calling any of the other &gdk-pixbuf;
|
||||
Xlib functions; it cannot be initialized automatically since
|
||||
Xlib-only applications do not call gdk_rgb_init() like GNOME
|
||||
applications do.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-init.sgml:See_Also ##### -->
|
||||
<para>
|
||||
XlibRGB
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-init.sgml:Short_Description ##### -->
|
||||
Initializing the &gdk-pixbuf; Xlib library.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-init.sgml:Title ##### -->
|
||||
&gdk-pixbuf; Xlib initialization
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
The &gdk-pixbuf; Xlib library provides several convenience
|
||||
functions to render pixbufs to X drawables. It uses XlibRGB to
|
||||
render the image data.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These functions are analogous to those for the Gdk version of
|
||||
&gdk-pixbuf;.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:Short_Description ##### -->
|
||||
Rendering a pixbuf to an X drawable.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:Title ##### -->
|
||||
Xlib Rendering
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
The XlibRGB set of functions is a port of the GdkRGB library to
|
||||
use plain Xlib and X drawables. You can use these functions to
|
||||
render RGB buffers into drawables very quickly with high-quality
|
||||
dithering.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:See_Also ##### -->
|
||||
<para>
|
||||
GdkRGB
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Short_Description ##### -->
|
||||
Functions for rendering RGB buffers to X drawables.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Title ##### -->
|
||||
XlibRGB
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_LOADER ##### -->
|
||||
<para>
|
||||
Casts a #GtkObject to a #GdkPixbufLoader.
|
||||
</para>
|
||||
|
||||
@obj: A GTK+ object.
|
||||
|
||||
<!-- ##### MACRO GNOME_CANVAS_PIXBUF ##### -->
|
||||
<para>
|
||||
Casts a #GtkOjbect to a #GnomeCanvasPixbuf.
|
||||
</para>
|
||||
|
||||
@obj: A GTK+ object.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufFrame ##### -->
|
||||
<para>
|
||||
This object describes an individual frame of an animation.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPixbufFrameAction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_FRAME_RETAIN:
|
||||
@GDK_PIXBUF_FRAME_DISPOSE:
|
||||
@GDK_PIXBUF_FRAME_REVERT:
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufLastUnref ##### -->
|
||||
<para>
|
||||
A function of this type can be used to override the default
|
||||
operation when a pixbuf loses its last reference, i.e. when
|
||||
gdk_pixbuf_unref() is called on a #GdkPixbuf structure that has a
|
||||
reference count of 1. This function should determine whether to
|
||||
finalize the pixbuf by calling gdk_pixbuf_finalize(), or whether
|
||||
to just resume normal execution. The last unref handler for a
|
||||
#GdkPixbuf can be set using the
|
||||
gdk_pixbuf_set_last_unref_handler() function. By default, pixbufs
|
||||
will be finalized automatically if no last unref handler has been
|
||||
defined.
|
||||
</para>
|
||||
|
||||
@pixbuf: The pixbuf that is losing its last reference.
|
||||
@data: User closure data.
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:height ##### -->
|
||||
<para>
|
||||
Indicates the height the pixbuf will be scaled to. This argument
|
||||
will only be used if the <link
|
||||
linkend="GnomeCanvasPixbuf--height-set">height_set</link> argument
|
||||
is %TRUE. Works in the same way as the <link
|
||||
linkend="GnomeCanvasPixbuf--width">width</link> argument.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:height-in-pixels ##### -->
|
||||
<para>
|
||||
Works in the same way as the <link
|
||||
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
|
||||
argument. The default is %FALSE.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:height-pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:height-set ##### -->
|
||||
<para>
|
||||
Determines whether the <link
|
||||
linkend="GnomeCanvasPixbuf--height">height</link> argument is
|
||||
taken into account when scaling the pixbuf item. Works in the
|
||||
same way as the <link
|
||||
linkend="GnomeCanvasPixbuf--width-set">width_set</link> argument.
|
||||
The default is %FALSE.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:pixbuf ##### -->
|
||||
<para>
|
||||
Contains a pointer to a #GdkPixbuf structure that will be used by
|
||||
the pixbuf canvas item as an image source. When a pixbuf is set
|
||||
its reference count is incremented; if the pixbuf item kept a
|
||||
pointer to another #GdkPixbuf structure, the reference count of
|
||||
this structure will be decremented. Also, the GdkPixbuf's
|
||||
reference count will automatically be decremented when the
|
||||
#GnomeCanvasPixbuf item is destroyed. When a pixbuf is queried, a
|
||||
reference count will not be added to the return value; you must do
|
||||
this yourself if you intend to keep the pixbuf structure around.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:width ##### -->
|
||||
<para>
|
||||
Indicates the width the pixbuf will be scaled to. This argument
|
||||
will only be used if the <link
|
||||
linkend="GnomeCanvasPixbuf--width-set">width_set</link> argument
|
||||
is %TRUE. If the <link
|
||||
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
|
||||
argument is %FALSE, the width will be taken to be in canvas units,
|
||||
and thus will be scaled along with the canvas item's affine
|
||||
transformation. If width_in_pixels is %TRUE, the width will be
|
||||
taken to be in pixels, and will visually remain a constant size
|
||||
even if the item's affine transformation changes.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:width-in-pixels ##### -->
|
||||
<para>
|
||||
If this argument is %TRUE, then the width of the pixbuf will be
|
||||
considered to be in pixels, that is, it will not be visually
|
||||
scaled even if the item's affine transformation changes. If this
|
||||
is %FALSE, then the width of the pixbuf will be considered to be
|
||||
in canvas units, and so will be scaled normally by affine
|
||||
transformations. The default is %FALSE.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:width-pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:width-set ##### -->
|
||||
<para>
|
||||
Determines whether the <link
|
||||
linkend="GnomeCanvasPixbuf--width">width</link> argument is taken
|
||||
into account when scaling the pixbuf item. If this argument is
|
||||
%FALSE, then the width value of the pixbuf will be used instead.
|
||||
This argument is %FALSE by default.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:x ##### -->
|
||||
<para>
|
||||
Indicates the horizontal translation offset of the pixbuf item's
|
||||
image. This offset may not actually appear horizontal, since it
|
||||
will be affected by the item's affine transformation. The default
|
||||
is 0.0.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:x-in-pixels ##### -->
|
||||
<para>
|
||||
If this argument is %TRUE, the pixbuf's translation with respect
|
||||
to its logical origin in item-relative coordinates will be in
|
||||
pixels, that is, the visible offset will not change even if the
|
||||
item's affine transformation changes. If it is %FALSE, the
|
||||
pixbuf's translation will be taken to be in canvas units, and thus
|
||||
will change along with the item's affine transformation. The
|
||||
default is %FALSE.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:x-pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:x-set ##### -->
|
||||
<para>
|
||||
Determines whether the <link
|
||||
linkend="GnomeCanvasPixbuf--x">x</link> argument is used to
|
||||
translate the pixbuf from its logical origin in item-relative
|
||||
coordinates.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:y ##### -->
|
||||
<para>
|
||||
Indicates the vertical translation offset of the pixbuf item's
|
||||
image. Works in the same way as the <link
|
||||
linkend="GnomeCanvasPixbuf--x">x</link> argument. The default is
|
||||
0.0.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:y-in-pixels ##### -->
|
||||
<para>
|
||||
Works in the same way as the <link
|
||||
linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>
|
||||
argument, but controls whether the <link
|
||||
linkend="GnomeCanvasPixbuf--y">y</link> translation offset is
|
||||
scaled or not. The default is %FALSE.
|
||||
</para>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:y-pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:y-set ##### -->
|
||||
<para>
|
||||
Determines whether the <link
|
||||
linkend="GnomeCanvasPixbuf--y">y</link> argument is used to
|
||||
translate the pixbuf from its logical origin in item-relative
|
||||
coordinates. Works in the same way as the <link
|
||||
linkend="GnomeCanvasPixbuf--x-set">x_set</link> argument. The
|
||||
default is %FALSE.
|
||||
</para>
|
||||
|
||||
|
@@ -1,51 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
X Drawables to Pixbufs
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Getting parts of an X drawable's image data into a pixbuf.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section allow you to take the image data
|
||||
from an X drawable and dump it into a #GdkPixbuf. This can be
|
||||
used for screenshots and other special effects. Note that these
|
||||
operations can be expensive, since the image data has to be
|
||||
transferred from the X server to the client program and converted.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These functions are analogous to those for the GDK version of
|
||||
&gdk-pixbuf;.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_xlib_get_from_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@src:
|
||||
@cmap:
|
||||
@visual:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
@@ -1,49 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
&gdk-pixbuf; Xlib initialization
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Initializing the &gdk-pixbuf; Xlib library.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
In addition to the normal Gdk-specific functions, the &gdk-pixbuf;
|
||||
package provides a small library that lets Xlib-only applications
|
||||
use #GdkPixbuf structures and render them to X drawables. The
|
||||
functions in this section are used to initialize the &gdk-pixbuf;
|
||||
Xlib library. This library must be initialized near the beginning
|
||||
of the program or before calling any of the other &gdk-pixbuf;
|
||||
Xlib functions.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
XlibRGB
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_xlib_init ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen_num:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_xlib_init_with_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen_num:
|
||||
@prefDepth: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
@@ -1,97 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Xlib Rendering
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Rendering a pixbuf to an X drawable.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The &gdk-pixbuf; Xlib library provides several convenience
|
||||
functions to render pixbufs to X drawables. It uses XlibRGB to
|
||||
render the image data.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These functions are analogous to those for the GDK version of
|
||||
&gdk-pixbuf;.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_xlib_render_threshold_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@bitmap:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@alpha_threshold:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_xlib_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_xlib_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_xlib_render_pixmap_and_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@pixmap_return:
|
||||
@mask_return:
|
||||
@alpha_threshold: <!--
|
||||
Local variables:
|
||||
Kode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
@@ -1,280 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
XlibRGB
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Rendering RGB buffers to X drawables.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The XlibRGB set of functions is a port of the #GdkRGB library to
|
||||
use plain Xlib and X drawables. You can use these functions to
|
||||
render RGB buffers into drawables very quickly with high-quality
|
||||
dithering.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
GdkRGB
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT XlibRgbCmap ##### -->
|
||||
<para>
|
||||
FIXME: Describe this.
|
||||
</para>
|
||||
|
||||
@colors: FIXME.
|
||||
@lut: FIXME.
|
||||
|
||||
<!-- ##### ENUM XlibRgbDither ##### -->
|
||||
<para>
|
||||
These values are used to specify which dithering method should be
|
||||
used. <symbol>XLIB_RGB_DITHER_NONE</symbol> will use no dithering
|
||||
and simply map the colors in an RGB buffer to the closest colors
|
||||
that the display can provide.
|
||||
<symbol>XLIB_RGB_DITHER_NORMAL</symbol> will provide dithering
|
||||
only on pseudocolor displays.
|
||||
<symbol>XLIB_RGB_DITHER_MAX</symbol> will provide dithering on
|
||||
pseudocolor and 16-bit truecolor or “high color”
|
||||
displays.
|
||||
</para>
|
||||
|
||||
@XLIB_RGB_DITHER_NONE: Specifies no dithering.
|
||||
@XLIB_RGB_DITHER_NORMAL: Specifies dithering only on pseudocolor
|
||||
displays.
|
||||
@XLIB_RGB_DITHER_MAX: Specifies dithering on high color displays.
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_init ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_init_with_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen:
|
||||
@prefDepth:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_xpixel_from_rgb ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@rgb:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_gc_set_foreground ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@rgb:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_gc_set_background ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@rgb:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_draw_rgb_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@dith:
|
||||
@rgb_buf:
|
||||
@rowstride:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_draw_rgb_image_dithalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@dith:
|
||||
@rgb_buf:
|
||||
@rowstride:
|
||||
@xdith:
|
||||
@ydith:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_draw_rgb_32_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@dith:
|
||||
@buf:
|
||||
@rowstride:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_draw_gray_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@dith:
|
||||
@buf:
|
||||
@rowstride:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_cmap_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colors:
|
||||
@n_colors:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_cmap_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cmap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_draw_indexed_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@dith:
|
||||
@buf:
|
||||
@rowstride:
|
||||
@cmap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_ditherable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_set_verbose ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@verbose:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_set_install ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@install:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_set_min_colors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@min_colors:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_get_cmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_get_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_get_visual_info ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_get_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
@@ -1,291 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
The GdkPixbuf Structure
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Information that describes an image.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
|
||||
<para>
|
||||
The <structname>GdkPixbuf</structname> structure contains
|
||||
information that describes an image in memory.
|
||||
</para>
|
||||
|
||||
<section id="image-data">
|
||||
<title>Image Data</title>
|
||||
|
||||
<para>
|
||||
Image data in a pixbuf is stored in memory in uncompressed,
|
||||
packed format. Rows in the image are stored top to bottom, and
|
||||
in each row pixels are stored from left to right. There may be
|
||||
padding at the end of a row. The "rowstride" value of a pixbuf,
|
||||
as returned by gdk_pixbuf_get_rowstride(), indicates the number
|
||||
of bytes between rows.
|
||||
</para>
|
||||
|
||||
<example id="put-pixel">
|
||||
<title>put_pixel(<!-- -->) example</title>
|
||||
|
||||
<para>
|
||||
The following code illustrates a simple put_pixel(<!-- -->)
|
||||
function for RGB pixbufs with 8 bits per channel with an alpha
|
||||
channel. It is not included in the gdk-pixbuf library for
|
||||
performance reasons; rather than making several function calls
|
||||
for each pixel, your own code can take shortcuts.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
put_pixel (GdkPixbuf *pixbuf, int x, int y, guchar red, guchar green, guchar blue, guchar alpha)
|
||||
{
|
||||
int width, height, rowstride, n_channels;
|
||||
guchar *pixels, *p;
|
||||
|
||||
n_channels = gdk_pixbuf_get_n_channels (pixbuf);
|
||||
|
||||
g_assert (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB);
|
||||
g_assert (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8);
|
||||
g_assert (gdk_pixbuf_get_has_alpha (pixbuf));
|
||||
g_assert (n_channels == 4);
|
||||
|
||||
width = gdk_pixbuf_get_width (pixbuf);
|
||||
height = gdk_pixbuf_get_height (pixbuf);
|
||||
|
||||
g_assert (x >= 0 && x < width);
|
||||
g_assert (y >= 0 && y < height);
|
||||
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
|
||||
p = pixels + y * rowstride + x * n_channels;
|
||||
p[0] = red;
|
||||
p[1] = green;
|
||||
p[2] = blue;
|
||||
p[3] = alpha;
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
This function will not work for pixbufs with images that are
|
||||
other than 8 bits per sample or channel, but it will work for
|
||||
most of the pixbufs that GTK+ uses.
|
||||
</para>
|
||||
</example>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
If you are doing memcpy() of raw pixbuf data, note that the
|
||||
last row in the pixbuf may not be as wide as the full
|
||||
rowstride, but rather just as wide as the pixel data needs to
|
||||
be. That is, it is unsafe to do <literal>memcpy (dest,
|
||||
pixels, rowstride * height)</literal> to copy a whole pixbuf.
|
||||
Use gdk_pixbuf_copy() instead, or compute the width in bytes
|
||||
of the last row as <literal>width * ((n_channels *
|
||||
bits_per_sample + 7) / 8)</literal>.
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPixbufError ##### -->
|
||||
<para>
|
||||
An error code in the #GDK_PIXBUF_ERROR domain. Many &gdk-pixbuf;
|
||||
operations can cause errors in this domain, or in the #G_FILE_ERROR
|
||||
domain.
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_ERROR_CORRUPT_IMAGE: An image file was broken somehow.
|
||||
@GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY: Not enough memory.
|
||||
@GDK_PIXBUF_ERROR_BAD_OPTION: A bad option was passed to a pixbuf save module.
|
||||
@GDK_PIXBUF_ERROR_UNKNOWN_TYPE: Unknown image type.
|
||||
@GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION: Don't know how to perform the
|
||||
given operation on the type of image at hand.
|
||||
@GDK_PIXBUF_ERROR_FAILED: Generic failure code, something went wrong.
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_ERROR ##### -->
|
||||
<para>
|
||||
Error domain used for pixbuf operations. Indicates that the error code
|
||||
will be in the #GdkPixbufError enumeration. See #GError for
|
||||
information on error domains and error codes.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkColorspace ##### -->
|
||||
<para>
|
||||
This enumeration defines the color spaces that are supported by
|
||||
the &gdk-pixbuf; library. Currently only RGB is supported.
|
||||
</para>
|
||||
|
||||
@GDK_COLORSPACE_RGB: Indicates a red/green/blue additive color space.
|
||||
|
||||
<!-- ##### ENUM GdkPixbufAlphaMode ##### -->
|
||||
<para>
|
||||
These values can be passed to
|
||||
gdk_pixbuf_render_to_drawable_alpha() to control how the alpha
|
||||
channel of an image should be handled. This function can create a
|
||||
bilevel clipping mask (black and white) and use it while painting
|
||||
the image. In the future, when the X Window System gets an alpha
|
||||
channel extension, it will be possible to do full alpha
|
||||
compositing onto arbitrary drawables. For now both cases fall
|
||||
back to a bilevel clipping mask.
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_ALPHA_BILEVEL: A bilevel clipping mask (black and white)
|
||||
will be created and used to draw the image. Pixels below 0.5 opacity
|
||||
will be considered fully transparent, and all others will be
|
||||
considered fully opaque.
|
||||
@GDK_PIXBUF_ALPHA_FULL: For now falls back to #GDK_PIXBUF_ALPHA_BILEVEL.
|
||||
In the future it will do full alpha compositing.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbuf ##### -->
|
||||
<para>
|
||||
This is the main structure in the &gdk-pixbuf; library. It is
|
||||
used to represent images. It contains information about the
|
||||
image's pixel data, its color space, bits per sample, width and
|
||||
height, and the rowstride (the number of bytes between the start of
|
||||
one row and the start of the next).
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GdkPixbuf:bits-per-sample ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkPixbuf:colorspace ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkPixbuf:has-alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkPixbuf:height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkPixbuf:n-channels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkPixbuf:pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkPixbuf:rowstride ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkPixbuf:width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_colorspace ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_n_channels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_has_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_bits_per_sample ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_rowstride ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_option ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@key:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
@@ -1,103 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Initialization and Versions
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
Library version numbers.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These macros and variables let you check the version of &gdk-pixbuf;
|
||||
you're linking against.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_pixbuf_version ##### -->
|
||||
<para>
|
||||
Contains the full version of the &gdk-pixbuf; library as a string.
|
||||
This is the version currently in use by a running program.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_pixbuf_major_version ##### -->
|
||||
<para>
|
||||
The major version number of the &gdk-pixbuf; library. (e.g. in
|
||||
&gdk-pixbuf; version 1.2.5 this is 1.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This variable is in the library, so represents the
|
||||
&gdk-pixbuf; library you have linked against. Contrast with the
|
||||
#GDK_PIXBUF_MAJOR macro, which represents the major version of the
|
||||
&gdk-pixbuf; headers you have included.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_pixbuf_minor_version ##### -->
|
||||
<para>
|
||||
The minor version number of the &gdk-pixbuf; library. (e.g. in
|
||||
&gdk-pixbuf; version 1.2.5 this is 2.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This variable is in the library, so represents the
|
||||
&gdk-pixbuf; library you have linked against. Contrast with the
|
||||
#GDK_PIXBUF_MINOR macro, which represents the minor version of the
|
||||
&gdk-pixbuf; headers you have included.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_pixbuf_micro_version ##### -->
|
||||
<para>
|
||||
The micro version number of the &gdk-pixbuf; library. (e.g. in
|
||||
&gdk-pixbuf; version 1.2.5 this is 5.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This variable is in the library, so represents the
|
||||
&gdk-pixbuf; library you have linked against. Contrast with the
|
||||
#GDK_PIXBUF_MICRO macro, which represents the micro version of the
|
||||
&gdk-pixbuf; headers you have included.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_VERSION ##### -->
|
||||
<para>
|
||||
Contains the full version of the &gdk-pixbuf; header as a string.
|
||||
This is the version being compiled against; contrast with
|
||||
#gdk_pixbuf_version.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_MAJOR ##### -->
|
||||
<para>
|
||||
Major version of &gdk-pixbuf; library, that is the first "0" in
|
||||
"0.8.0" for example.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_MINOR ##### -->
|
||||
<para>
|
||||
Minor version of &gdk-pixbuf; library, that is the "8" in
|
||||
"0.8.0" for example.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_MICRO ##### -->
|
||||
<para>
|
||||
Micro version of &gdk-pixbuf; library, that is the last "0" in
|
||||
"0.8.0" for example.
|
||||
</para>
|
||||
|
||||
|
||||
|
@@ -1,134 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Inline data
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for inlined pixbuf handling.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Using #GdkPixdata, images can be compiled into an application,
|
||||
making it unnecessary to refer to external image files at runtime.
|
||||
&gdk-pixbuf; includes a utility named gdk-pixbuf-csource, which
|
||||
can be used to convert image files into #GdkPixdata structures suitable
|
||||
for inclusion in C sources. To convert the #GdkPixdata structures back
|
||||
into #GdkPixbuf<!-- -->s, use gdk_pixbuf_from_pixdata.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixdata ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@magic:
|
||||
@length:
|
||||
@pixdata_type:
|
||||
@rowstride:
|
||||
@width:
|
||||
@height:
|
||||
@pixel_data:
|
||||
|
||||
<!-- ##### ENUM GdkPixdataType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_PIXDATA_COLOR_TYPE_RGB:
|
||||
@GDK_PIXDATA_COLOR_TYPE_RGBA:
|
||||
@GDK_PIXDATA_COLOR_TYPE_MASK:
|
||||
@GDK_PIXDATA_SAMPLE_WIDTH_8:
|
||||
@GDK_PIXDATA_SAMPLE_WIDTH_MASK:
|
||||
@GDK_PIXDATA_ENCODING_RAW:
|
||||
@GDK_PIXDATA_ENCODING_RLE:
|
||||
@GDK_PIXDATA_ENCODING_MASK:
|
||||
|
||||
<!-- ##### ENUM GdkPixdataDumpType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_PIXDATA_DUMP_PIXDATA_STREAM:
|
||||
@GDK_PIXDATA_DUMP_PIXDATA_STRUCT:
|
||||
@GDK_PIXDATA_DUMP_MACROS:
|
||||
@GDK_PIXDATA_DUMP_GTYPES:
|
||||
@GDK_PIXDATA_DUMP_CTYPES:
|
||||
@GDK_PIXDATA_DUMP_STATIC:
|
||||
@GDK_PIXDATA_DUMP_CONST:
|
||||
@GDK_PIXDATA_DUMP_RLE_DECODER:
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_MAGIC_NUMBER ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXDATA_HEADER_LENGTH ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixdata_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixdata:
|
||||
@pixbuf:
|
||||
@use_rle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_from_pixdata ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixdata:
|
||||
@copy_pixels:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixdata_serialize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixdata:
|
||||
@stream_length_p:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixdata_deserialize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixdata:
|
||||
@stream_length:
|
||||
@stream:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixdata_to_csource ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixdata:
|
||||
@name:
|
||||
@dump_type:
|
||||
@Returns:
|
||||
|
||||
|
@@ -1,378 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Module Interface
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Extending &gdk-pixbuf;
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
If &gdk-pixbuf; has been compiled with GModule support, it can be extended by
|
||||
modules which can load (and perhaps also save) new image and animation
|
||||
formats. Each loadable module must export a
|
||||
#GdkPixbufModuleFillInfoFunc function named <function>fill_info</function> and
|
||||
a #GdkPixbufModuleFillVtableFunc function named
|
||||
<function>fill_vtable</function>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In order to make format-checking work before actually loading the modules
|
||||
(which may require dlopening image libraries), modules export their
|
||||
signatures (and other information) via the <function>fill_info</function>
|
||||
function. An external utility, <command>gdk-pixbuf-query-loaders</command>,
|
||||
uses this to create a text file containing a list of all available loaders and
|
||||
their signatures. This file is then read at runtime by &gdk-pixbuf; to obtain
|
||||
the list of available loaders and their signatures.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Modules may only implement a subset of the functionality available via
|
||||
#GdkPixbufModule. If a particular functionality is not implemented, the
|
||||
<function>fill_vtable</function> function will simply not set the corresponding
|
||||
function pointers of the #GdkPixbufModule structure. If a module supports
|
||||
incremental loading (i.e. provides #begin_load, #stop_load and
|
||||
#load_increment), it doesn't have to implement #load, since &gdk-pixbuf; can
|
||||
supply a generic #load implementation wrapping the incremental loading.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Installing a module is a two-step process:
|
||||
<itemizedlist>
|
||||
<listitem><para>copy the module file(s) to the loader directory (normally
|
||||
<filename><replaceable>libdir</replaceable>/gtk-2.0/<replaceable>version</replaceable>/loaders</filename>,
|
||||
unless overridden by the environment variable
|
||||
<envar>GDK_PIXBUF_MODULEDIR</envar>)
|
||||
</para></listitem>
|
||||
<listitem><para>call <command>gdk-pixbuf-query-loaders</command> to update the
|
||||
module file (normally
|
||||
<filename><replaceable>sysconfdir</replaceable>/gtk-2.0/gdk-pixbuf.loaders</filename>,
|
||||
unless overridden by the environment variable
|
||||
<envar>GDK_PIXBUF_MODULE_FILE</envar>)
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The &gdk-pixbuf; interfaces needed for implementing modules are contained in
|
||||
<filename>gdk-pixbuf-io.h</filename> (and
|
||||
<filename>gdk-pixbuf-animation.h</filename> if the module supports animations).
|
||||
They are not covered by the same stability guarantees as the regular
|
||||
&gdk-pixbuf; API. To underline this fact, they are protected by
|
||||
<literal>#ifdef GDK_PIXBUF_ENABLE_BACKEND</literal>.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_set_option ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@key:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_formats ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_mime_types ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_extensions ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_is_writable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_is_scalable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_is_disabled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_set_disabled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@disabled:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_license ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufFormat ##### -->
|
||||
<para>
|
||||
A #GdkPixbufFormat contains information about the image format accepted by a
|
||||
module. Only modules should access the fields directly, applications should
|
||||
use the <function>gdk_pixbuf_format_*</function> functions.
|
||||
</para>
|
||||
|
||||
@name: the name of the image format.
|
||||
@signature: the signature of the module.
|
||||
@domain: the message domain for the @description.
|
||||
@description: a description of the image format.
|
||||
@mime_types: a %NULL-terminated array of MIME types for the image format.
|
||||
@extensions: a %NULL-terminated array of typical filename extensions for the
|
||||
image format.
|
||||
@flags: a combination of #GdkPixbufFormatFlags.
|
||||
@disabled: a boolean determining whether the loader is disabled.
|
||||
@license: a string containing license information, typically set to
|
||||
shorthands like "GPL", "LGPL", etc.
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### ENUM GdkPixbufFormatFlags ##### -->
|
||||
<para>
|
||||
Flags which allow a module to specify further details about the supported
|
||||
operations.
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_FORMAT_WRITABLE: the module can write out images in the format.
|
||||
@GDK_PIXBUF_FORMAT_SCALABLE: the image format is scalable
|
||||
@GDK_PIXBUF_FORMAT_THREADSAFE: the module is threadsafe. If this flag is not
|
||||
set, &gdk-pixbuf; will use a lock to prevent multiple threads from using
|
||||
this module at the same time. (Since 2.6)
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufModulePattern ##### -->
|
||||
<para>
|
||||
The signature of a module is a set of prefixes. Prefixes are encoded as
|
||||
pairs of ordinary strings, where the second string, called the mask, if
|
||||
not %NULL, must be of the same length as the first one and may contain
|
||||
' ', '!', 'x', 'z', and 'n' to indicate bytes that must be matched,
|
||||
not matched, "don't-care"-bytes, zeros and non-zeros.
|
||||
Each prefix has an associated integer that describes the relevance of
|
||||
the prefix, with 0 meaning a mismatch and 100 a "perfect match".
|
||||
</para>
|
||||
<para>
|
||||
Starting with &gdk-pixbuf; 2.8, the first byte of the mask may be '*',
|
||||
indicating an unanchored pattern that matches not only at the beginning,
|
||||
but also in the middle. Versions prior to 2.8 will interpret the '*'
|
||||
like an 'x'.
|
||||
</para>
|
||||
<para>
|
||||
The signature of a module is stored as an array of
|
||||
#GdkPixbufModulePattern<!-- -->s. The array is terminated by a pattern
|
||||
where the @prefix is %NULL.
|
||||
</para>
|
||||
|
||||
<informalexample><programlisting>
|
||||
GdkPixbufModulePattern *signature[] = {
|
||||
{ "abcdx", " !x z", 100 },
|
||||
{ "bla", NULL, 90 },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
</programlisting>
|
||||
The example matches e.g. "auud\0" with relevance 100, and "blau" with
|
||||
relevance 90.</informalexample>
|
||||
|
||||
@prefix: the prefix for this pattern
|
||||
@mask: mask containing bytes which modify how the prefix is matched against
|
||||
test data
|
||||
@relevance: relevance of this pattern
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModuleFillVtableFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function used to set the vtable of a
|
||||
#GdkPixbufModule when it is loaded.
|
||||
</para>
|
||||
|
||||
@module: a #GdkPixbufModule.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModuleFillInfoFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function used to fill a
|
||||
#GdkPixbufFormat structure with information about a module.
|
||||
</para>
|
||||
|
||||
@info: a #GdkPixbufFormat.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModuleSizeFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function that gets called once the size
|
||||
of the loaded image is known.
|
||||
</para>
|
||||
<para>
|
||||
The function is expected to set @width and @height to the desired
|
||||
size to which the image should be scaled. If a module has no efficient
|
||||
way to achieve the desired scaling during the loading of the image, it may
|
||||
either ignore the size request, or only approximate it -- &gdk-pixbuf; will
|
||||
then perform the required scaling on the completely loaded image.
|
||||
</para>
|
||||
<para>
|
||||
If the function sets @width or @height to zero, the module should interpret
|
||||
this as a hint that it will be closed soon and shouldn't allocate further
|
||||
resources. This convention is used to implement gdk_pixbuf_get_file_info()
|
||||
efficiently.
|
||||
</para>
|
||||
|
||||
@width: pointer to a location containing the current image width
|
||||
@height: pointer to a location containing the current image height
|
||||
@user_data: the loader.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModulePreparedFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function that gets called once the initial
|
||||
setup of @pixbuf is done.
|
||||
</para>
|
||||
<para>
|
||||
#GdkPixbufLoader uses a function of this type to emit the
|
||||
"<link linkend="GdkPixbufLoader-area-prepared">area_prepared</link>"
|
||||
signal.
|
||||
</para>
|
||||
|
||||
@pixbuf: the #GdkPixbuf that is currently being loaded.
|
||||
@anim: if an animation is being loaded, the #GdkPixbufAnimation, else %NULL.
|
||||
@user_data: the loader.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModuleUpdatedFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function that gets called every time a region
|
||||
of @pixbuf is updated.
|
||||
</para>
|
||||
<para>
|
||||
#GdkPixbufLoader uses a function of this type to emit the
|
||||
"<link linkend="GdkPixbufLoader-area-updated">area_updated</link>"
|
||||
signal.
|
||||
</para>
|
||||
|
||||
@pixbuf: the #GdkPixbuf that is currently being loaded.
|
||||
@x: the X origin of the updated area.
|
||||
@y: the Y origin of the updated area.
|
||||
@width: the width of the updated area.
|
||||
@height: the height of the updated area.
|
||||
@user_data: the loader.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufModule ##### -->
|
||||
<para>
|
||||
A #GdkPixbufModule contains the necessary functions to load and save
|
||||
images in a certain file format.
|
||||
</para>
|
||||
<para>
|
||||
A #GdkPixbufModule can be loaded dynamically from a #GModule.
|
||||
Each loadable module must contain a #GdkPixbufModuleFillVtableFunc function
|
||||
named <function>fill_vtable</function>, which will get called when the module
|
||||
is loaded and must set the function pointers of the #GdkPixbufModule.
|
||||
</para>
|
||||
|
||||
@module_name: the name of the module, usually the same as the
|
||||
usual file extension for images of this type, eg. "xpm", "jpeg" or "png".
|
||||
@module_path: the path from which the module is loaded.
|
||||
@module: the loaded #GModule.
|
||||
@info: a #GdkPixbufFormat holding information about the module.
|
||||
@load: loads an image from a file.
|
||||
@load_xpm_data: loads an image from data in memory.
|
||||
@begin_load: begins an incremental load.
|
||||
@stop_load: stops an incremental load.
|
||||
@load_increment: continues an incremental load.
|
||||
@load_animation: loads an animation from a file.
|
||||
@save: saves a #GdkPixbuf to a file.
|
||||
@save_to_callback: saves a #GdkPixbuf by calling the given #GdkPixbufSaveFunc.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationClass ##### -->
|
||||
<para>
|
||||
Modules supporting animations must derive a type from
|
||||
#GdkPixbufAnimation, providing suitable implementations of the
|
||||
virtual functions.
|
||||
</para>
|
||||
|
||||
@parent_class: the parent class
|
||||
@is_static_image: returns whether the given animation is just a static image.
|
||||
@get_static_image: returns a static image representing the given animation.
|
||||
@get_size: fills @width and @height with the frame size of the animation.
|
||||
@get_iter: returns an iterator for the given animation.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationIterClass ##### -->
|
||||
<para>
|
||||
Modules supporting animations must derive a type from
|
||||
#GdkPixbufAnimationIter, providing suitable implementations of the
|
||||
virtual functions.
|
||||
</para>
|
||||
|
||||
@parent_class: the parent class
|
||||
@get_delay_time: returns the time in milliseconds that the current frame
|
||||
should be shown.
|
||||
@get_pixbuf: returns the current frame.
|
||||
@on_currently_loading_frame: returns whether the current frame of @iter is
|
||||
being loaded.
|
||||
@advance: advances the iterator to @current_time, possibly changing the
|
||||
current frame.
|
||||
|
@@ -1,81 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Reference Counting and Memory Mangement
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
Functions for reference counting and memory management on pixbufs.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GdkPixbuf structures are reference counted. This means that an
|
||||
application can share a single pixbuf among many parts of the
|
||||
code. When a piece of the program needs to keep a pointer to a
|
||||
pixbuf, it should add a reference to it by calling g_object_ref().
|
||||
When it no longer needs the pixbuf, it should subtract a reference
|
||||
by calling g_object_unref(). The pixbuf will be destroyed when
|
||||
its reference count drops to zero. Newly-created #GdkPixbuf
|
||||
structures start with a reference count of one.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
As #GdkPixbuf is derived from #GObject now, gdk_pixbuf_ref() and
|
||||
gdk_pixbuf_unref() are deprecated in favour of g_object_ref()
|
||||
and g_object_unref () resp.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
<emphasis>Finalizing</emphasis> a pixbuf means to free its pixel
|
||||
data and to free the #GdkPixbuf structure itself. Most of the
|
||||
library functions that create #GdkPixbuf structures create the
|
||||
pixel data by themselves and define the way it should be freed;
|
||||
you do not need to worry about those. The only function that lets
|
||||
you specify how to free the pixel data is
|
||||
gdk_pixbuf_new_from_data(). Since you pass it a pre-allocated
|
||||
pixel buffer, you must also specify a way to free that data. This
|
||||
is done with a function of type #GdkPixbufDestroyNotify. When a
|
||||
pixbuf created with gdk_pixbuf_new_from_data() is finalized, your
|
||||
destroy notification function will be called, and it is its
|
||||
responsibility to free the pixel array.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbuf, gdk_pixbuf_new_from_data().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufDestroyNotify ##### -->
|
||||
<para>
|
||||
A function of this type is responsible for freeing the pixel array
|
||||
of a pixbuf. The gdk_pixbuf_new_from_data() function lets you
|
||||
pass in a pre-allocated pixel array so that a pixbuf can be
|
||||
created from it; in this case you will need to pass in a function
|
||||
of #GdkPixbufDestroyNotify so that the pixel data can be freed
|
||||
when the pixbuf is finalized.
|
||||
</para>
|
||||
|
||||
@pixels: The pixel array of the pixbuf that is being finalized.
|
||||
@data: User closure data.
|
||||
|
||||
|
@@ -1,243 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Scaling
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Scaling pixbufs and scaling and compositing pixbufs
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The &gdk-pixbuf; contains functions to scale pixbufs, to scale
|
||||
pixbufs and composite against an existing image, and to scale
|
||||
pixbufs and composite against a solid color or checkerboard.
|
||||
Compositing a checkerboard is a common way to show an image with
|
||||
an alpha channel in image-viewing and editing software.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Since the full-featured functions (gdk_pixbuf_scale(),
|
||||
gdk_pixbuf_composite(), and gdk_pixbuf_composite_color()) are
|
||||
rather complex to use and have many arguments, two simple
|
||||
convenience functions are provided, gdk_pixbuf_scale_simple() and
|
||||
gdk_pixbuf_composite_color_simple() which create a new pixbuf of a
|
||||
given size, scale an original image to fit, and then return the
|
||||
new pixbuf.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Scaling and compositing functions take advantage of MMX hardware
|
||||
acceleration on systems where MMX is supported. If gdk-pixbuf is built
|
||||
with the Sun mediaLib library, these functions are instead accelerated
|
||||
using mediaLib, which provides hardware acceleration on Intel, AMD,
|
||||
and Sparc chipsets. If desired, mediaLib support can be turned off by
|
||||
setting the GDK_DISABLE_MEDIALIB environment variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following example demonstrates handling an expose event by
|
||||
rendering the appropriate area of a source image (which is scaled
|
||||
to fit the widget) onto the widget's window. The source image is
|
||||
rendered against a checkerboard, which provides a visual
|
||||
representation of the alpha channel if the image has one. If the
|
||||
image doesn't have an alpha channel, calling
|
||||
gdk_pixbuf_composite_color() function has exactly the same effect
|
||||
as calling gdk_pixbuf_scale().
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>Handling an expose event.</title>
|
||||
<programlisting>
|
||||
gboolean
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *dest;
|
||||
|
||||
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) widget->allocation.width / gdk_pixbuf_get_width (pixbuf),
|
||||
(double) widget->allocation.height / gdk_pixbuf_get_height (pixbuf),
|
||||
GDK_INTERP_BILINEAR, 255,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
gdk_draw_pixbuf (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], dest,
|
||||
0, 0, event->area.x, event->area.y,
|
||||
event->area.width, event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
|
||||
|
||||
gdk_pixbuf_unref (dest);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<link linkend="gdk-GdkRGB">GdkRGB</link>.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInterpType ##### -->
|
||||
<para>
|
||||
This enumeration describes the different interpolation modes that
|
||||
can be used with the scaling functions. @GDK_INTERP_NEAREST is
|
||||
the fastest scaling method, but has horrible quality when
|
||||
scaling down. @GDK_INTERP_BILINEAR is the best choice if you
|
||||
aren't sure what to choose, it has a good speed/quality balance.
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Cubic filtering is missing from the list; hyperbolic
|
||||
interpolation is just as fast and results in higher quality.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
|
||||
@GDK_INTERP_NEAREST: Nearest neighbor sampling; this is the fastest
|
||||
and lowest quality mode. Quality is normally unacceptable when scaling
|
||||
down, but may be OK when scaling up.
|
||||
@GDK_INTERP_TILES: This is an accurate simulation of the PostScript
|
||||
image operator without any interpolation enabled. Each pixel is
|
||||
rendered as a tiny parallelogram of solid color, the edges of which
|
||||
are implemented with antialiasing. It resembles nearest neighbor for
|
||||
enlargement, and bilinear for reduction.
|
||||
@GDK_INTERP_BILINEAR: Best quality/speed balance; use this mode by
|
||||
default. Bilinear interpolation. For enlargement, it is
|
||||
equivalent to point-sampling the ideal bilinear-interpolated image.
|
||||
For reduction, it is equivalent to laying down small tiles and
|
||||
integrating over the coverage area.
|
||||
@GDK_INTERP_HYPER: This is the slowest and highest quality
|
||||
reconstruction function. It is derived from the hyperbolic filters in
|
||||
Wolberg's "Digital Image Warping", and is formally defined as the
|
||||
hyperbolic-filter sampling the ideal hyperbolic-filter interpolated
|
||||
image (the filter is designed to be idempotent for 1:1 pixel mapping).
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_scale_simple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@interp_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_scale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@offset_x:
|
||||
@offset_y:
|
||||
@scale_x:
|
||||
@scale_y:
|
||||
@interp_type:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_composite_color_simple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@interp_type:
|
||||
@overall_alpha:
|
||||
@check_size:
|
||||
@color1:
|
||||
@color2:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_composite ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@offset_x:
|
||||
@offset_y:
|
||||
@scale_x:
|
||||
@scale_y:
|
||||
@interp_type:
|
||||
@overall_alpha:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_composite_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@offset_x:
|
||||
@offset_y:
|
||||
@scale_x:
|
||||
@scale_y:
|
||||
@interp_type:
|
||||
@overall_alpha:
|
||||
@check_x:
|
||||
@check_y:
|
||||
@check_size:
|
||||
@color1:
|
||||
@color2:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPixbufRotation ##### -->
|
||||
<para>
|
||||
The possible rotations which can be passed to gdk_pixbuf_rotate_simple().
|
||||
To make them easier to use, their numerical values are the actual degrees.
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_ROTATE_NONE: No rotation.
|
||||
@GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE: Rotate by 90 degrees.
|
||||
@GDK_PIXBUF_ROTATE_UPSIDEDOWN: Rotate by 180 degrees.
|
||||
@GDK_PIXBUF_ROTATE_CLOCKWISE: Rotate by 270 degrees.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_rotate_simple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@angle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_flip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@horizontal:
|
||||
@Returns:
|
||||
|
||||
|
@@ -1,84 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Utilities
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Utility and miscellaneous convenience functions.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions provide miscellaneous utilities for manipulating
|
||||
pixbufs. The pixel data in pixbufs may of course be manipulated
|
||||
directly by applications, but several common operations can be
|
||||
performed by these functions instead.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbuf
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_add_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@substitute_color:
|
||||
@r:
|
||||
@g:
|
||||
@b:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_copy_area ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src_pixbuf:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@width:
|
||||
@height:
|
||||
@dest_pixbuf:
|
||||
@dest_x:
|
||||
@dest_y: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_saturate_and_pixelate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
@saturation:
|
||||
@pixelate:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_apply_embedded_orientation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_fill ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@pixel:
|
||||
|
||||
|
@@ -1 +0,0 @@
|
||||
@GTK_VERSION@
|
@@ -142,7 +142,7 @@ HTML_IMAGES = \
|
||||
images/xterm.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html \
|
||||
FIXXREF_OPTIONS= \
|
||||
--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \
|
||||
--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib \
|
||||
--extra-dir=$(CAIRO_PREFIX)/share/gtk-doc/html/cairo
|
||||
|
@@ -6,11 +6,14 @@
|
||||
]>
|
||||
<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>
|
||||
|
||||
@@ -112,6 +115,10 @@
|
||||
<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>
|
||||
|
||||
|
@@ -132,6 +132,7 @@ gdk_display_beep
|
||||
gdk_display_sync
|
||||
gdk_display_flush
|
||||
gdk_display_close
|
||||
gdk_display_is_closed
|
||||
gdk_display_list_devices
|
||||
gdk_display_get_event
|
||||
gdk_display_peek_event
|
||||
@@ -258,6 +259,7 @@ gdk_pixmap_create_from_xpm
|
||||
gdk_pixmap_colormap_create_from_xpm
|
||||
gdk_pixmap_create_from_xpm_d
|
||||
gdk_pixmap_colormap_create_from_xpm_d
|
||||
gdk_pixmap_get_size
|
||||
gdk_pixmap_ref
|
||||
gdk_pixmap_unref
|
||||
GdkBitmap
|
||||
@@ -292,6 +294,16 @@ gdk_image_unref
|
||||
gdk_image_destroy
|
||||
gdk_image_get_colormap
|
||||
gdk_image_set_colormap
|
||||
gdk_image_get_bits_per_pixel
|
||||
gdk_image_get_bytes_per_pixel
|
||||
gdk_image_get_bytes_per_line
|
||||
gdk_image_get_byte_order
|
||||
gdk_image_get_depth
|
||||
gdk_image_get_height
|
||||
gdk_image_get_image_type
|
||||
gdk_image_get_visual
|
||||
gdk_image_get_width
|
||||
gdk_image_get_pixels
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_image_put_pixel
|
||||
@@ -603,6 +615,15 @@ gdk_visual_get_best_with_both
|
||||
gdk_visual_ref
|
||||
gdk_visual_unref
|
||||
gdk_visual_get_screen
|
||||
gdk_visual_get_bits_per_rgb
|
||||
gdk_visual_get_blue_pixel_details
|
||||
gdk_visual_get_byte_order
|
||||
gdk_visual_get_colormap_size
|
||||
gdk_visual_get_depth
|
||||
gdk_visual_get_green_pixel_details
|
||||
gdk_visual_get_red_pixel_details
|
||||
gdk_visual_get_visual_type
|
||||
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_BYTE_ORDER
|
||||
@@ -636,6 +657,11 @@ gdk_window_new
|
||||
gdk_window_destroy
|
||||
gdk_window_ref
|
||||
gdk_window_unref
|
||||
gdk_window_get_display
|
||||
gdk_window_get_screen
|
||||
gdk_window_get_visual
|
||||
gdk_window_get_width
|
||||
gdk_window_get_height
|
||||
gdk_window_get_window_type
|
||||
gdk_window_at_pointer
|
||||
gdk_window_show
|
||||
@@ -644,6 +670,8 @@ gdk_window_hide
|
||||
gdk_window_is_destroyed
|
||||
gdk_window_is_visible
|
||||
gdk_window_is_viewable
|
||||
gdk_window_is_shaped
|
||||
gdk_window_is_input_only
|
||||
gdk_window_get_state
|
||||
gdk_window_withdraw
|
||||
gdk_window_iconify
|
||||
@@ -658,12 +686,14 @@ gdk_window_set_keep_above
|
||||
gdk_window_set_keep_below
|
||||
gdk_window_set_opacity
|
||||
gdk_window_set_composited
|
||||
gdk_window_get_composited
|
||||
gdk_window_move
|
||||
gdk_window_resize
|
||||
gdk_window_move_resize
|
||||
gdk_window_scroll
|
||||
gdk_window_move_region
|
||||
gdk_window_flush
|
||||
gdk_window_has_native
|
||||
gdk_window_ensure_native
|
||||
gdk_window_reparent
|
||||
gdk_window_clear
|
||||
@@ -703,7 +733,9 @@ gdk_window_configure_finished
|
||||
gdk_window_set_user_data
|
||||
gdk_window_set_override_redirect
|
||||
gdk_window_set_accept_focus
|
||||
gdk_window_get_accept_focus
|
||||
gdk_window_set_focus_on_map
|
||||
gdk_window_get_focus_on_map
|
||||
gdk_window_add_filter
|
||||
gdk_window_remove_filter
|
||||
GdkFilterFunc
|
||||
@@ -722,6 +754,7 @@ gdk_window_set_hints
|
||||
gdk_window_set_title
|
||||
gdk_window_set_background
|
||||
gdk_window_set_back_pixmap
|
||||
gdk_window_get_background_pattern
|
||||
GDK_PARENT_RELATIVE
|
||||
gdk_window_set_cursor
|
||||
gdk_window_get_cursor
|
||||
@@ -731,6 +764,7 @@ gdk_window_get_geometry
|
||||
gdk_window_set_geometry_hints
|
||||
gdk_window_set_icon_list
|
||||
gdk_window_set_modal_hint
|
||||
gdk_window_get_modal_hint
|
||||
gdk_window_set_type_hint
|
||||
gdk_window_get_type_hint
|
||||
gdk_window_set_skip_taskbar_hint
|
||||
@@ -746,10 +780,14 @@ gdk_window_get_type
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_deskrelative_origin
|
||||
gdk_window_get_root_coords
|
||||
gdk_window_coords_from_parent
|
||||
gdk_window_coords_to_parent
|
||||
gdk_window_get_pointer
|
||||
GdkModifierType
|
||||
gdk_window_get_parent
|
||||
gdk_window_get_effective_parent
|
||||
gdk_window_get_toplevel
|
||||
gdk_window_get_effective_toplevel
|
||||
gdk_window_get_children
|
||||
gdk_window_peek_children
|
||||
gdk_window_get_events
|
||||
@@ -910,10 +948,12 @@ GdkPangoRendererPrivate
|
||||
<SECTION>
|
||||
<TITLE>Cairo Interaction</TITLE>
|
||||
<FILE>cairo_interaction</FILE>
|
||||
gdk_window_create_similar_surface
|
||||
gdk_cairo_create
|
||||
gdk_cairo_set_source_color
|
||||
gdk_cairo_set_source_pixbuf
|
||||
gdk_cairo_set_source_pixmap
|
||||
gdk_cairo_set_source_window
|
||||
gdk_cairo_rectangle
|
||||
gdk_cairo_region
|
||||
gdk_cairo_reset_clip
|
||||
@@ -1047,11 +1087,17 @@ GdkDeviceKey
|
||||
GdkDeviceAxis
|
||||
GdkAxisUse
|
||||
gdk_devices_list
|
||||
gdk_device_get_name
|
||||
gdk_device_set_source
|
||||
gdk_device_get_source
|
||||
gdk_device_set_mode
|
||||
gdk_device_get_mode
|
||||
gdk_device_set_key
|
||||
gdk_device_get_key
|
||||
gdk_device_set_axis_use
|
||||
gdk_device_get_axis_use
|
||||
gdk_device_get_core_pointer
|
||||
gdk_device_has_cursor
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_device_get_state
|
||||
@@ -1059,6 +1105,7 @@ gdk_device_get_history
|
||||
gdk_device_free_history
|
||||
GdkTimeCoord
|
||||
gdk_device_get_axis
|
||||
gdk_device_get_n_axes
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_input_set_extension_events
|
||||
@@ -1198,6 +1245,7 @@ gdk_cursor_new_from_name
|
||||
gdk_cursor_new_for_display
|
||||
gdk_cursor_get_display
|
||||
gdk_cursor_get_image
|
||||
gdk_cursor_get_cursor_type
|
||||
gdk_cursor_ref
|
||||
gdk_cursor_unref
|
||||
gdk_cursor_destroy
|
||||
@@ -1235,6 +1283,11 @@ gdk_drag_drop
|
||||
gdk_drag_find_window
|
||||
gdk_drag_find_window_for_screen
|
||||
gdk_drag_context_ref
|
||||
gdk_drag_context_get_actions
|
||||
gdk_drag_context_get_selected_action
|
||||
gdk_drag_context_get_suggested_action
|
||||
gdk_drag_context_list_targets
|
||||
gdk_drag_context_get_source_window
|
||||
gdk_drag_begin
|
||||
gdk_drag_motion
|
||||
gdk_drop_finish
|
||||
@@ -1354,6 +1407,9 @@ gdk_x11_get_xatom_by_name
|
||||
gdk_x11_get_xatom_by_name_for_display
|
||||
gdk_x11_get_xatom_name
|
||||
gdk_x11_get_xatom_name_for_display
|
||||
gdk_x11_set_sm_client_id
|
||||
gdk_x11_window_foreign_new_for_display
|
||||
gdk_x11_window_lookup_for_display
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_display
|
||||
|
@@ -27,6 +27,9 @@ Cairo paths and to use pixbufs as sources for drawing operations.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_create ##### -->
|
||||
<para>
|
||||
|
||||
|
@@ -46,6 +46,9 @@ gdk_color_change() will probably become aliases.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkColor ##### -->
|
||||
<para>
|
||||
The #GdkColor structure is used to describe an
|
||||
@@ -57,20 +60,14 @@ allocated or unallocated color.
|
||||
@red: The red component of the color. This is
|
||||
a value between 0 and 65535, with 65535 indicating
|
||||
full intensitiy.
|
||||
@green: The blue component of the color.
|
||||
@blue: The green component of the color.
|
||||
@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>
|
||||
|
||||
@size: For pseudo-color colormaps, the number of colors
|
||||
in the colormap.
|
||||
@colors: An array containing the current values in the
|
||||
colormap. This can be used to map from pixel values
|
||||
back to RGB values. This is only meaningful for
|
||||
pseudo-color colormaps.
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_new ##### -->
|
||||
<para>
|
||||
@@ -102,6 +99,7 @@ The colormap structure contains the following public fields.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -109,6 +107,7 @@ The colormap structure contains the following public fields.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@@ -31,12 +31,14 @@ gdk_window_set_cursor() or by setting the cursor member of the
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkCursor ##### -->
|
||||
<para>
|
||||
A <type>GdkCursor</type> structure represents a cursor.
|
||||
</para>
|
||||
|
||||
@type: the #GdkCursorType of the cursor
|
||||
|
||||
<!-- ##### ENUM GdkCursorType ##### -->
|
||||
<para>
|
||||
|
@@ -25,6 +25,9 @@ the GTK+ documentation for more information.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_selection ##### -->
|
||||
<para>
|
||||
</para>
|
||||
@@ -54,6 +57,7 @@ the GTK+ documentation for more information.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -98,6 +102,51 @@ the GTK+ documentation for more information.
|
||||
@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>
|
||||
@@ -180,16 +229,6 @@ drag in progress. It is used on both source and destination sides.
|
||||
</para>
|
||||
|
||||
@parent_instance: the parent instance
|
||||
@protocol: the DND protocol which governs this drag.
|
||||
@is_source: %TRUE if the context is used on the source side.
|
||||
@source_window: the source of this drag.
|
||||
@dest_window: the destination window of this drag.
|
||||
@targets: a list of targets offered by the source.
|
||||
@actions: a bitmask of actions proposed by the source when
|
||||
@suggested_action is %GDK_ACTION_ASK.
|
||||
@suggested_action: the action suggested by the source.
|
||||
@action: the action chosen by the destination.
|
||||
@start_time: a timestamp recording the start time of this drag.
|
||||
|
||||
<!-- ##### ENUM GdkDragAction ##### -->
|
||||
<para>
|
||||
|
@@ -34,6 +34,9 @@ gtk_widget_create_pango_layout().
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDrawable ##### -->
|
||||
<para>
|
||||
An opaque structure representing an object that can be
|
||||
|
@@ -23,6 +23,9 @@ required events are received. See gtk_widget_set_events().
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### UNION GdkEvent ##### -->
|
||||
<para>
|
||||
The #GdkEvent struct contains a union of all of the event structs,
|
||||
|
@@ -30,6 +30,9 @@ The structs used for each type of event.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkEventType ##### -->
|
||||
<para>
|
||||
Specifies the type of the event.
|
||||
@@ -165,6 +168,7 @@ is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -172,6 +176,7 @@ is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -179,6 +184,7 @@ is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -340,6 +346,7 @@ gdk_event_handler_set().
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@@ -264,6 +264,9 @@ here).
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkFont ##### -->
|
||||
<para>
|
||||
The <structname>GdkFont</structname> structure represents a font or fontset. It
|
||||
|
@@ -33,6 +33,9 @@ be set by the latter method.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkGC ##### -->
|
||||
<para>
|
||||
The #GdkGC structure represents a graphics context.
|
||||
|
@@ -36,6 +36,9 @@ g_object_unref (context);
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkAppLaunchContext ##### -->
|
||||
<para>
|
||||
An opaque structure representing an application launch context.
|
||||
@@ -47,6 +50,7 @@ An opaque structure representing an application launch context.
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@@ -31,6 +31,9 @@ Controls the keyboard/mouse pointer grabs and a set of <type>GdkScreen</type>s
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplay ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplay</structname> struct is the GDK representation
|
||||
@@ -61,6 +64,7 @@ of an X display. All its fields are private and should not be accessed directly.
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@@ -19,6 +19,9 @@ changes.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayManager ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplayManager</structname> struct has no interesting
|
||||
@@ -45,6 +48,7 @@ fields.
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@@ -25,6 +25,9 @@ form a large screen area.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkScreen ##### -->
|
||||
<para>
|
||||
This is a currently just a placeholder typedef for the first argument of
|
||||
@@ -70,6 +73,7 @@ when GDK gets multihead support.
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@@ -18,6 +18,9 @@ They allow to simulate some user input.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_test_render_sync ##### -->
|
||||
<para>
|
||||
|
||||
|
@@ -18,6 +18,9 @@ utility functions.
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_init ##### -->
|
||||
<para>
|
||||
Initializes the GDK library and connects to the X server.
|
||||
@@ -70,6 +73,7 @@ by GTK+ applications.
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -94,7 +98,9 @@ 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 ##### -->
|
||||
@@ -123,6 +129,7 @@ of g_atexit()).
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_notify_startup_complete_with_id ##### -->
|
||||
@@ -141,6 +148,7 @@ 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.
|
||||
|
||||
|
||||
@@ -160,6 +168,7 @@ 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.
|
||||
|
||||
|
||||
@@ -170,12 +179,14 @@ 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:
|
||||
|
||||
|
||||
@@ -183,6 +194,7 @@ trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -190,6 +202,7 @@ trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -197,6 +210,7 @@ trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -279,6 +293,7 @@ success or the reason for the failure of the grab attempt.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -324,6 +339,7 @@ available.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_use_xshm ##### -->
|
||||
@@ -338,6 +354,7 @@ 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.
|
||||
|
||||
|
||||
@@ -375,6 +392,7 @@ avoid the X error in any other way.
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
|
||||
@@ -382,12 +400,13 @@ avoid the X error in any other way.
|
||||
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 X backend.
|
||||
This macro is defined if GDK is configured to use the X11 backend.
|
||||
</para>
|
||||
|
||||
|
||||
|
@@ -58,23 +58,15 @@ displays.
|
||||
<!-- ##### 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
|
||||
@type: the type of the image.
|
||||
@visual: the visual.
|
||||
@byte_order: the byte order.
|
||||
@width: the width of the image in pixels.
|
||||
@height: the height of the image in pixels.
|
||||
@depth: the depth of the image, i.e. the number of bits per pixel.
|
||||
@bpp: the number of bytes per pixel.
|
||||
@bpl: the number of bytes per line of the image.
|
||||
@bits_per_pixel: the number of bits per pixel.
|
||||
@mem: the pixel data.
|
||||
@colormap: the #GdkColormap associated with the image
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new ##### -->
|
||||
<para>
|
||||
|
@@ -34,6 +34,9 @@ callbacks.</para></listitem>
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_add_full ##### -->
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user