Compare commits
537 Commits
GTK_1_2_1
...
GDK_PIXBUF
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a74de76f94 | ||
|
|
706e553eb7 | ||
|
|
72ee1f0c50 | ||
|
|
bb8a563730 | ||
|
|
2f27c99f36 | ||
|
|
65ae04e137 | ||
|
|
997868b7e2 | ||
|
|
5d9b2ed63f | ||
|
|
cf51b4790e | ||
|
|
b3a94afdd1 | ||
|
|
f4e1d05613 | ||
|
|
2ecc032847 | ||
|
|
be1161a97b | ||
|
|
4f0f733060 | ||
|
|
ef80871e0a | ||
|
|
c3491b7497 | ||
|
|
1f48e45e54 | ||
|
|
7bfdf70ae1 | ||
|
|
b09b772727 | ||
|
|
eb03ba506a | ||
|
|
64f06bf079 | ||
|
|
d961146335 | ||
|
|
0bce8ff54b | ||
|
|
82abdad4db | ||
|
|
4be016b20b | ||
|
|
6aba663522 | ||
|
|
00b598d267 | ||
|
|
84c85a1a11 | ||
|
|
0e86d28026 | ||
|
|
4bd671a87b | ||
|
|
519ee0665d | ||
|
|
a0a1584106 | ||
|
|
65de04cdb8 | ||
|
|
bba95de158 | ||
|
|
8f48c4b3cd | ||
|
|
cc76a598ba | ||
|
|
33e963e7af | ||
|
|
2bb20aee8b | ||
|
|
273089af2a | ||
|
|
0a60e2963c | ||
|
|
ad41b4ff94 | ||
|
|
19fd09725a | ||
|
|
fe3cc85202 | ||
|
|
d475580348 | ||
|
|
6e3522ab2c | ||
|
|
605c562ffb | ||
|
|
68a6e7befb | ||
|
|
3cc0db6440 | ||
|
|
e4ce74f5b7 | ||
|
|
39e00cbdf2 | ||
|
|
8c510f2ecf | ||
|
|
5ea5e527cd | ||
|
|
0733eb725d | ||
|
|
7b93fcab55 | ||
|
|
d3a63c533a | ||
|
|
d4984ede33 | ||
|
|
cd5f174a7e | ||
|
|
8dae68fbb3 | ||
|
|
24c7df792f | ||
|
|
73fc0b0ecd | ||
|
|
48fbaf72b5 | ||
|
|
f66ae10389 | ||
|
|
6c33d4dcec | ||
|
|
715902025d | ||
|
|
7df755b181 | ||
|
|
4f5b014220 | ||
|
|
913cb7cd85 | ||
|
|
9c00803e19 | ||
|
|
d723183795 | ||
|
|
0b0ebee941 | ||
|
|
a44d2e2e2c | ||
|
|
757fc193c4 | ||
|
|
6b23587aef | ||
|
|
880f5ade6b | ||
|
|
c6f25c2de8 | ||
|
|
a70843bab2 | ||
|
|
e7b2454ce3 | ||
|
|
71223ba41b | ||
|
|
a56ec79881 | ||
|
|
4460746adc | ||
|
|
f2b649691a | ||
|
|
6817444e14 | ||
|
|
cd1870cc83 | ||
|
|
e506cf37cb | ||
|
|
8a02827e39 | ||
|
|
0f5c8e857c | ||
|
|
3f00a28b6c | ||
|
|
a03ac28c6e | ||
|
|
631f507f58 | ||
|
|
d8b35eab3e | ||
|
|
a3bf693cd4 | ||
|
|
16502247df | ||
|
|
e5c1456525 | ||
|
|
1586dd5703 | ||
|
|
72868800d7 | ||
|
|
d6f51967de | ||
|
|
25a8142429 | ||
|
|
21f0dff4cd | ||
|
|
e026570571 | ||
|
|
bfa345c338 | ||
|
|
1284c3fc42 | ||
|
|
3a1f89dcf5 | ||
|
|
4d37cd3eed | ||
|
|
f5b3df2956 | ||
|
|
4aae90b5b1 | ||
|
|
f0e6c2b1f3 | ||
|
|
72fc042792 | ||
|
|
119a9f33ca | ||
|
|
1f6e4e7336 | ||
|
|
b85d11b3b7 | ||
|
|
104c12d28e | ||
|
|
b990b30723 | ||
|
|
0b793d2cc8 | ||
|
|
2421aab193 | ||
|
|
43bbf78a29 | ||
|
|
c8df698460 | ||
|
|
68f5479eb0 | ||
|
|
1bfdff1dcb | ||
|
|
4cbca90747 | ||
|
|
33da844e70 | ||
|
|
14237d13e2 | ||
|
|
89e63f0595 | ||
|
|
143002cac5 | ||
|
|
0652653292 | ||
|
|
7944e647c6 | ||
|
|
09240118e1 | ||
|
|
7b4d53a529 | ||
|
|
8e06c4d7f4 | ||
|
|
b6524a84f5 | ||
|
|
c00a9a84ea | ||
|
|
36a27c6759 | ||
|
|
974e54fc9a | ||
|
|
eec6970fe2 | ||
|
|
3a330a3d6b | ||
|
|
705168dab0 | ||
|
|
3a202479a8 | ||
|
|
f3fcdb4e0e | ||
|
|
e4a2092603 | ||
|
|
ee3d137660 | ||
|
|
e4df9fa95b | ||
|
|
9599825ea9 | ||
|
|
28bcddaca2 | ||
|
|
af73e9d21b | ||
|
|
be83b5c9d3 | ||
|
|
638ebcee70 | ||
|
|
7ca8753ac5 | ||
|
|
aee96e5e1b | ||
|
|
7e52fb900e | ||
|
|
25ae5a77a2 | ||
|
|
cfb0266518 | ||
|
|
23b50343c6 | ||
|
|
827c4c6d21 | ||
|
|
19b42c342f | ||
|
|
16aa7c4316 | ||
|
|
d23b21018c | ||
|
|
d2bfbdb99e | ||
|
|
12474a79ae | ||
|
|
57d2bf74a6 | ||
|
|
95d923f661 | ||
|
|
5a63c9488d | ||
|
|
a3a4606eab | ||
|
|
b835084dfa | ||
|
|
84477de7fc | ||
|
|
78141c328f | ||
|
|
39bb0d649c | ||
|
|
87a2044934 | ||
|
|
c9a347c8e9 | ||
|
|
9495faccfc | ||
|
|
f9615262f2 | ||
|
|
a1a2b8f0eb | ||
|
|
6c57e51ac9 | ||
|
|
aa09cabb94 | ||
|
|
5de53804a1 | ||
|
|
665096fcdf | ||
|
|
43529d911c | ||
|
|
b5f414a1a5 | ||
|
|
5491cd971d | ||
|
|
e9b6bfcc01 | ||
|
|
cd02981bf2 | ||
|
|
ce83490d75 | ||
|
|
6ef7f093d4 | ||
|
|
e11f22b55e | ||
|
|
0ad4aa57d6 | ||
|
|
559a8c8691 | ||
|
|
66d02a986a | ||
|
|
8db40e177c | ||
|
|
9ab8dfc3e4 | ||
|
|
b71e53b222 | ||
|
|
155f3e05e2 | ||
|
|
01fcce4cf9 | ||
|
|
f527b8909f | ||
|
|
9d8da16ee9 | ||
|
|
76f716cec7 | ||
|
|
085a27d330 | ||
|
|
38abc0dee0 | ||
|
|
4107506f65 | ||
|
|
5d0e9b4a2e | ||
|
|
d0ed72ee14 | ||
|
|
567305020d | ||
|
|
e9cebcd36a | ||
|
|
6a3f4d81e9 | ||
|
|
d5015025ba | ||
|
|
e03c0632ad | ||
|
|
58e68f9683 | ||
|
|
7cdf9176e1 | ||
|
|
5ee4989714 | ||
|
|
5869210788 | ||
|
|
317e8b06ae | ||
|
|
677a78b56a | ||
|
|
0b0e66db4b | ||
|
|
87a9022b72 | ||
|
|
d0e4efb401 | ||
|
|
80ce14813b | ||
|
|
ba718c979c | ||
|
|
6e0687de46 | ||
|
|
a8ec2c3b9f | ||
|
|
3d5a2b1230 | ||
|
|
afed181c0a | ||
|
|
66bf26d42d | ||
|
|
5a3e3916f5 | ||
|
|
59ab307a62 | ||
|
|
1c1e3424c1 | ||
|
|
8e6f4fc803 | ||
|
|
1588285e3a | ||
|
|
07c656cdf1 | ||
|
|
53d5c49dbb | ||
|
|
587d91caad | ||
|
|
cacae33871 | ||
|
|
d611593ffd | ||
|
|
b953e64bc6 | ||
|
|
966ae7b613 | ||
|
|
9efff07116 | ||
|
|
0dcfd50a96 | ||
|
|
dc999ba470 | ||
|
|
97688fd28e | ||
|
|
bf146c95a1 | ||
|
|
8c361eed9c | ||
|
|
d39cbe9c2b | ||
|
|
69fb59dd3b | ||
|
|
5dcc2ddd51 | ||
|
|
c3b9b0f7f4 | ||
|
|
827b818ed1 | ||
|
|
00c5e83871 | ||
|
|
241f9c9dab | ||
|
|
896d8ff3ce | ||
|
|
f3a218acc0 | ||
|
|
4adda6ef1f | ||
|
|
bcad6d8598 | ||
|
|
bcf6c51c4c | ||
|
|
2a2a599120 | ||
|
|
a44d5aeaab | ||
|
|
fcdf947205 | ||
|
|
40dfa38a36 | ||
|
|
05505d6a1d | ||
|
|
a4a876d70e | ||
|
|
a3fd5f8d9a | ||
|
|
5749f310e4 | ||
|
|
ece5ac121a | ||
|
|
7e96137070 | ||
|
|
9a1c50c961 | ||
|
|
0a810f950f | ||
|
|
941167e6d8 | ||
|
|
5a8b538ee1 | ||
|
|
53ffebed19 | ||
|
|
0eb096334e | ||
|
|
3176b6b3ea | ||
|
|
be374ad560 | ||
|
|
9ee4ff5eee | ||
|
|
54f017171f | ||
|
|
2ec115ea80 | ||
|
|
5ebe49fdbd | ||
|
|
23b0f15ee8 | ||
|
|
1a0a5d0399 | ||
|
|
e8242a24eb | ||
|
|
95e048c863 | ||
|
|
929c608714 | ||
|
|
14cb9e710a | ||
|
|
a9c16bfabd | ||
|
|
3f4bad9332 | ||
|
|
eacb3ad51f | ||
|
|
2ff92119aa | ||
|
|
3589986260 | ||
|
|
bfd0c12798 | ||
|
|
e5dfd2f5da | ||
|
|
c84756cf38 | ||
|
|
cfc2866019 | ||
|
|
4c9ee0caa9 | ||
|
|
e35d4c6d65 | ||
|
|
5f0ea34beb | ||
|
|
143d11f435 | ||
|
|
c3c9c72281 | ||
|
|
5cf2775f46 | ||
|
|
5f3ae6ad67 | ||
|
|
a3551cc3d0 | ||
|
|
9de0d0c9c3 | ||
|
|
04823f40c4 | ||
|
|
b1c28ea656 | ||
|
|
d8ce1977dd | ||
|
|
7ef5dec32d | ||
|
|
46da5c2bec | ||
|
|
65c1e7458d | ||
|
|
74268afdeb | ||
|
|
3b9835b5bb | ||
|
|
556f481ce9 | ||
|
|
748c5c5f0c | ||
|
|
da95365f93 | ||
|
|
018d098240 | ||
|
|
b39839820b | ||
|
|
a4013d86fb | ||
|
|
2501ca70d6 | ||
|
|
b55008d197 | ||
|
|
5a4cc5a6b1 | ||
|
|
c512d3864c | ||
|
|
2453bc3cca | ||
|
|
e41dd6a199 | ||
|
|
4649192c7a | ||
|
|
bab6969765 | ||
|
|
e29e536d20 | ||
|
|
4f771b6d26 | ||
|
|
bdcba96639 | ||
|
|
ed48ad3344 | ||
|
|
d23e3848a9 | ||
|
|
069932c2a8 | ||
|
|
0e8115218e | ||
|
|
6dc73a6184 | ||
|
|
b31b2734be | ||
|
|
3b348f74e9 | ||
|
|
0fef3d2f6d | ||
|
|
a8d8872c0c | ||
|
|
91f7a92ecd | ||
|
|
f903bdf1a7 | ||
|
|
344e8000a2 | ||
|
|
9c2dea004f | ||
|
|
ef088b50ab | ||
|
|
4c84db87d9 | ||
|
|
c50941c82d | ||
|
|
b196167dbc | ||
|
|
637a466d5c | ||
|
|
74d88d870a | ||
|
|
41be586333 | ||
|
|
f73d6ee34a | ||
|
|
95b3f3e460 | ||
|
|
c3e01fe599 | ||
|
|
442712ba50 | ||
|
|
b11177d6b0 | ||
|
|
9df3375f61 | ||
|
|
6c13b03a45 | ||
|
|
372c4d2627 | ||
|
|
9e7433487b | ||
|
|
de1cf2ecba | ||
|
|
be9abde533 | ||
|
|
6822cce08d | ||
|
|
4a9a849acb | ||
|
|
033bb597de | ||
|
|
4850edb29b | ||
|
|
08f1c75cf1 | ||
|
|
66779b9b26 | ||
|
|
6fce115b98 | ||
|
|
04f5c2a1e7 | ||
|
|
ad8f893e60 | ||
|
|
fc3c4005c4 | ||
|
|
0d0ce95c9a | ||
|
|
50778c9ad5 | ||
|
|
6050aecef6 | ||
|
|
d79f54c4ec | ||
|
|
2b91a5b73f | ||
|
|
60d735cdf2 | ||
|
|
d5facc4cc6 | ||
|
|
fc3cd85675 | ||
|
|
411e9361c2 | ||
|
|
17cb4bb2e6 | ||
|
|
aafd722b21 | ||
|
|
6ebe59ced3 | ||
|
|
24976900cf | ||
|
|
6c8ca48237 | ||
|
|
75ca8715c7 | ||
|
|
cf451eb447 | ||
|
|
b52072a7f8 | ||
|
|
3c67e83bb5 | ||
|
|
f66547c880 | ||
|
|
29b00ba8e5 | ||
|
|
70372ba8bd | ||
|
|
f29407afe8 | ||
|
|
a45a5dedba | ||
|
|
f7a50c4dc2 | ||
|
|
0072dd5508 | ||
|
|
6b126f35b1 | ||
|
|
e809774014 | ||
|
|
91a5956707 | ||
|
|
0455fa3029 | ||
|
|
0139b4a3dc | ||
|
|
60fbf3800b | ||
|
|
fa53582fef | ||
|
|
49ca2615f8 | ||
|
|
ecef1e1f2f | ||
|
|
0775c02e08 | ||
|
|
e8f8e0d484 | ||
|
|
91cb3bb665 | ||
|
|
0899b4718b | ||
|
|
3d679818a0 | ||
|
|
61f0ede138 | ||
|
|
6af18860b6 | ||
|
|
51046a9fbf | ||
|
|
b0a2c890a7 | ||
|
|
8681f36261 | ||
|
|
28fbb33386 | ||
|
|
45a3396064 | ||
|
|
0a07d3ba1f | ||
|
|
1f20f4ddca | ||
|
|
accce610ae | ||
|
|
276ec82df5 | ||
|
|
8194b3483b | ||
|
|
e0fe931832 | ||
|
|
6423183a63 | ||
|
|
e9ed2c18a7 | ||
|
|
f12fbc1b32 | ||
|
|
96ba724fc5 | ||
|
|
1922a3ed01 | ||
|
|
bd943182b7 | ||
|
|
de2313faf3 | ||
|
|
38aa9a941b | ||
|
|
7d03e87069 | ||
|
|
9b462c6024 | ||
|
|
1d146b0d58 | ||
|
|
6992607bb0 | ||
|
|
e3c310e538 | ||
|
|
af663f9a3a | ||
|
|
967288262c | ||
|
|
06c4493ef6 | ||
|
|
834de2994e | ||
|
|
38f428304e | ||
|
|
7befe28245 | ||
|
|
451d40642c | ||
|
|
c38f5f88eb | ||
|
|
c9b2958b6c | ||
|
|
68f895bd68 | ||
|
|
b10feaf1e9 | ||
|
|
8c2c39529a | ||
|
|
359820b98c | ||
|
|
5363075ebd | ||
|
|
d5d599c229 | ||
|
|
f178fb5bb7 | ||
|
|
d38c27bda1 | ||
|
|
8d072a4f58 | ||
|
|
6cf7477093 | ||
|
|
feb9789e64 | ||
|
|
a0b1a437cc | ||
|
|
42311804a4 | ||
|
|
a83f00d89e | ||
|
|
8854db3c4f | ||
|
|
fee33a543d | ||
|
|
b385831d65 | ||
|
|
127bfb203e | ||
|
|
ab49789a33 | ||
|
|
29e22ec9bd | ||
|
|
59f1b1cb96 | ||
|
|
e002a729ca | ||
|
|
ecafc70e02 | ||
|
|
1882f67a30 | ||
|
|
b60ff5b695 | ||
|
|
a6afd23c5b | ||
|
|
64c648d866 | ||
|
|
92cff811a1 | ||
|
|
e89ffda44e | ||
|
|
5134c92df6 | ||
|
|
f43e47dddc | ||
|
|
eefbd04215 | ||
|
|
1d375ea289 | ||
|
|
7b8b856639 | ||
|
|
16d002d074 | ||
|
|
e060cbf62a | ||
|
|
76c28cbbad | ||
|
|
34c2f20968 | ||
|
|
1c73fc83a2 | ||
|
|
330dd2f7c3 | ||
|
|
45dc3bcf82 | ||
|
|
bf21aecc91 | ||
|
|
f30c006cbb | ||
|
|
a313506013 | ||
|
|
1c84483f3e | ||
|
|
eedec945df | ||
|
|
05c3a18b37 | ||
|
|
ff0ec3ac91 | ||
|
|
a76ae0cc9a | ||
|
|
c1ba0be318 | ||
|
|
e2d3078d3c | ||
|
|
b76c1c7bd2 | ||
|
|
9ccee8a3fc | ||
|
|
42e38e41f7 | ||
|
|
578d91f381 | ||
|
|
d05cf752dc | ||
|
|
ef68de7b87 | ||
|
|
4ca8d37b82 | ||
|
|
900944ab01 | ||
|
|
57afb2b588 | ||
|
|
0dfcb2d2be | ||
|
|
8125476783 | ||
|
|
32f6e0a4ce | ||
|
|
55a5d2144d | ||
|
|
65204240f9 | ||
|
|
733c5614e5 | ||
|
|
8de14d3353 | ||
|
|
993d986ee2 | ||
|
|
f03d0014a3 | ||
|
|
d2922401e5 | ||
|
|
f3e95348be | ||
|
|
0b4d29fd6e | ||
|
|
d142187b38 | ||
|
|
9f513b1840 | ||
|
|
95931e18aa | ||
|
|
2d49bbb044 | ||
|
|
f045ba415a | ||
|
|
db30076b0b | ||
|
|
8599979585 | ||
|
|
43ab625770 | ||
|
|
cb8adfba87 | ||
|
|
90d69893fd | ||
|
|
0a23dccde4 | ||
|
|
c65508d272 | ||
|
|
044fd2db47 | ||
|
|
a3c5d33f26 | ||
|
|
0d81100af3 | ||
|
|
b82992851f | ||
|
|
700891684e | ||
|
|
0c178e965c | ||
|
|
ac7b6805f4 | ||
|
|
91ed4f809f | ||
|
|
6cda2a2021 | ||
|
|
ee03faee2a | ||
|
|
fd1b869a35 | ||
|
|
17dd9e43dc | ||
|
|
9f3b82e178 | ||
|
|
ced58eb136 | ||
|
|
209f5d5cd4 | ||
|
|
e84df313c4 | ||
|
|
78bb15f61e | ||
|
|
81161cd723 |
@@ -13,3 +13,8 @@ gtk-config
|
||||
config.cache
|
||||
ABOUT-NLS
|
||||
intl
|
||||
stamp-h.in
|
||||
gtk+.spec
|
||||
missing
|
||||
install-sh
|
||||
mkinstalldirs
|
||||
|
||||
9106
ChangeLog.pre-1-2
Normal file
9106
ChangeLog.pre-1-2
Normal file
File diff suppressed because it is too large
Load Diff
12028
ChangeLog.pre-2-0
12028
ChangeLog.pre-2-0
File diff suppressed because it is too large
Load Diff
12028
ChangeLog.pre-2-10
12028
ChangeLog.pre-2-10
File diff suppressed because it is too large
Load Diff
12028
ChangeLog.pre-2-2
12028
ChangeLog.pre-2-2
File diff suppressed because it is too large
Load Diff
12028
ChangeLog.pre-2-4
12028
ChangeLog.pre-2-4
File diff suppressed because it is too large
Load Diff
12028
ChangeLog.pre-2-6
12028
ChangeLog.pre-2-6
File diff suppressed because it is too large
Load Diff
12028
ChangeLog.pre-2-8
12028
ChangeLog.pre-2-8
File diff suppressed because it is too large
Load Diff
51
INSTALL
51
INSTALL
@@ -7,12 +7,12 @@ you got this package.
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-1.2.0.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-1.2.0 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
% gzip -cd gtk+-1.2.5.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-1.2.5 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK
|
||||
% make install # install GTK
|
||||
|
||||
The Nitty-Gritty
|
||||
================
|
||||
@@ -43,6 +43,13 @@ which form of support to use:
|
||||
|
||||
For more information, follow the link from http://www.gtk.org
|
||||
|
||||
* --disable-nls do not use Native Language Support
|
||||
|
||||
If this flag is not specified, GTK+ will try to find
|
||||
and use the gettext() set of functions to provide translations
|
||||
of the strings in the standard dialogs into the
|
||||
user's native language.
|
||||
|
||||
* --enable-xim support XIM [default=yes]
|
||||
|
||||
Specifying --disable-xim will disable support for entering
|
||||
@@ -50,7 +57,7 @@ internationalized text using X Input Methods. This will give some
|
||||
slight savings in speed and memory use and might be necessary
|
||||
with older versions of X.
|
||||
|
||||
* --with-locale=LOCALE locale name you want to use
|
||||
* --with-locale=LOCALE locale name you want to use
|
||||
|
||||
The --with-locale options is used to determine if your operating
|
||||
system has support for the locale you will be using. If not, X's
|
||||
@@ -84,19 +91,43 @@ or,
|
||||
|
||||
setenv CFLAGS -O2 ; ./configure # csh and variants
|
||||
|
||||
Native-Language Support and gettext()
|
||||
=====================================
|
||||
|
||||
Using an uninstalled copy of GLIB
|
||||
=================================
|
||||
To provide native-language support (NLS) GTK+ uses the
|
||||
gettext() set of functions. These functions are found
|
||||
in the C library on many systems, such as the Solaris
|
||||
C library and the GNU C Library, version 2.
|
||||
|
||||
If your C library does not provide the necessary functionality,
|
||||
you may wish to install the GNU gettext package. You'll
|
||||
need version 0.10.35 or better. Version 0.10.35 is
|
||||
available from ftp://alpha.gnu.org/pub/gnu
|
||||
|
||||
Generally, GTK+ will properly detect what is installed
|
||||
on your system and enable or disable NLS as appropriate.
|
||||
However, in rare cases, it may be necessary to disable
|
||||
NLS manually to get GTK+ to compile. You can do this
|
||||
by specifying the --disable-nls flag when configuring
|
||||
GTK+.
|
||||
|
||||
Using an uninstalled copy of GLIB [ Unsupported ]
|
||||
=================================================
|
||||
|
||||
You can compile GTK+ against a copy of GLIB that you have not
|
||||
yet installed. To do this, give the --with-glib=DIR options
|
||||
to ./configure. For instance:
|
||||
|
||||
./configure --with-glib=../glib-1.2.0
|
||||
./configure --with-glib=../glib-1.2.5
|
||||
|
||||
This, however, will not work if you built GLIB with different
|
||||
source and build directories.
|
||||
|
||||
It is recommended that you install GLIB before compiling
|
||||
GTK+. The --with-glib option is not regularly tested
|
||||
and may not function correctly. In addition,
|
||||
inter-library dependencies won't be generated when
|
||||
using --with-glib=.
|
||||
|
||||
Installation directories
|
||||
========================
|
||||
@@ -126,7 +157,7 @@ For complete details, see the file docs/gtk-config.txt
|
||||
Notes for using XIM support for Japanese input
|
||||
==============================================
|
||||
|
||||
* There is a bug in older versions of kinput2 that will cause GTK
|
||||
* There is a bug in older versions of kinput2 that will cause GTK+
|
||||
to hang when destroying a text entry. The latest versions of
|
||||
kinput is available from:
|
||||
|
||||
|
||||
187
INSTALL.in
Normal file
187
INSTALL.in
Normal file
@@ -0,0 +1,187 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK+ requires the GLIB library, available at the same location as
|
||||
you got this package.
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-@GTK_VERSION@.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-@GTK_VERSION@ # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK
|
||||
|
||||
The Nitty-Gritty
|
||||
================
|
||||
|
||||
The 'configure' script can be given a number of options to enable
|
||||
and disable various features. For a complete list, type:
|
||||
|
||||
./configure --help
|
||||
|
||||
A few of the more important ones:
|
||||
|
||||
* --prefix=PREFIX install architecture-independent files in PREFIX
|
||||
[ Defaults to /usr/local ]
|
||||
|
||||
* --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||
[ Defaults to the value given to --prefix ]
|
||||
|
||||
* --with-xinput=[no/gxi/xfree] support XInput [default=no]
|
||||
|
||||
The --with-xinput flag specifies whether to compile with support
|
||||
for the XInput extension (mainly used for graphics tablets), and
|
||||
which form of support to use:
|
||||
|
||||
no : no support
|
||||
gxi : Use generic XInput support
|
||||
xfree : Use special features in the Wacom drivers in XFree86 3.3.1
|
||||
and later.
|
||||
|
||||
For more information, follow the link from http://www.gtk.org
|
||||
|
||||
* --disable-nls do not use Native Language Support
|
||||
|
||||
If this flag is not specified, GTK+ will try to find
|
||||
and use the gettext() set of functions to provide translations
|
||||
of the strings in the standard dialogs into the
|
||||
user's native language.
|
||||
|
||||
* --enable-xim support XIM [default=yes]
|
||||
|
||||
Specifying --disable-xim will disable support for entering
|
||||
internationalized text using X Input Methods. This will give some
|
||||
slight savings in speed and memory use and might be necessary
|
||||
with older versions of X.
|
||||
|
||||
* --with-locale=LOCALE locale name you want to use
|
||||
|
||||
The --with-locale options is used to determine if your operating
|
||||
system has support for the locale you will be using. If not, X's
|
||||
built in locale support will be used.
|
||||
|
||||
Because of bugs in autoconf, it is necessary to specify this
|
||||
option even if your LANG environment variable is correctly set.
|
||||
|
||||
This option does not determine which locale GTK will use at
|
||||
runtime. That will be determined from the usual environment
|
||||
variables. If you will be using multiple locales with GTK,
|
||||
specify the one for which your operating system has the worst
|
||||
support for the --with-locale option.
|
||||
|
||||
|
||||
Options can be given to the compiler and linker by setting
|
||||
environment variables before running configure. A few of the more
|
||||
important ones:
|
||||
|
||||
CC : The C compiler to use
|
||||
CPPFLAGS : Flags for the C preprocesser such as -I and -D
|
||||
CFLAGS : C compiler flags
|
||||
|
||||
The most important use of this is to set the
|
||||
optimization/debugging flags. For instance, to compile with no
|
||||
debugging information at all, run configure as:
|
||||
|
||||
CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh)
|
||||
|
||||
or,
|
||||
|
||||
setenv CFLAGS -O2 ; ./configure # csh and variants
|
||||
|
||||
Native-Language Support and gettext()
|
||||
=====================================
|
||||
|
||||
To provide native-language support (NLS) GTK+ uses the
|
||||
gettext() set of functions. These functions are found
|
||||
in the C library on many systems, such as the Solaris
|
||||
C library and the GNU C Library, version 2.
|
||||
|
||||
If your C library does not provide the necessary functionality,
|
||||
you may wish to install the GNU gettext package. You'll
|
||||
need version 0.10.35 or better. Version 0.10.35 is
|
||||
available from ftp://alpha.gnu.org/pub/gnu
|
||||
|
||||
Generally, GTK+ will properly detect what is installed
|
||||
on your system and enable or disable NLS as appropriate.
|
||||
However, in rare cases, it may be necessary to disable
|
||||
NLS manually to get GTK+ to compile. You can do this
|
||||
by specifying the --disable-nls flag when configuring
|
||||
GTK+.
|
||||
|
||||
Using an uninstalled copy of GLIB [ Unsupported ]
|
||||
=================================================
|
||||
|
||||
You can compile GTK+ against a copy of GLIB that you have not
|
||||
yet installed. To do this, give the --with-glib=DIR options
|
||||
to ./configure. For instance:
|
||||
|
||||
./configure --with-glib=../glib-@GTK_VERSION@
|
||||
|
||||
This, however, will not work if you built GLIB with different
|
||||
source and build directories.
|
||||
|
||||
It is recommended that you install GLIB before compiling
|
||||
GTK+. The --with-glib option is not regularly tested
|
||||
and may not function correctly. In addition,
|
||||
inter-library dependencies won't be generated when
|
||||
using --with-glib=.
|
||||
|
||||
Installation directories
|
||||
========================
|
||||
|
||||
The location of the installed files is determined by the --prefix
|
||||
and --exec-prefix options given to configure. There are also more
|
||||
detailed flags to control individual directories. However, the
|
||||
use of these flags is not tested.
|
||||
|
||||
One particular detail to note, is that the architecture-dependent
|
||||
include file glibconfig.h is installed in:
|
||||
|
||||
$exec_pref/lib/glib/include/
|
||||
|
||||
if you have a version in $prefix/include, this is out of date
|
||||
and should be deleted.
|
||||
|
||||
A shell script gtk-config is created during the configure
|
||||
process, and installed in the bin/ directory
|
||||
($exec_prefix/bin). This is used to determine the location of GTK
|
||||
when building applications. If you move GTK after installation,
|
||||
it will be necessary to edit this file.
|
||||
|
||||
For complete details, see the file docs/gtk-config.txt
|
||||
|
||||
|
||||
Notes for using XIM support for Japanese input
|
||||
==============================================
|
||||
|
||||
* There is a bug in older versions of kinput2 that will cause GTK+
|
||||
to hang when destroying a text entry. The latest versions of
|
||||
kinput is available from:
|
||||
|
||||
ftp://ftp.sra.co.jp/pub/x11/kinput2
|
||||
|
||||
* The locale information file for the ja_JP EUC locale
|
||||
distributed with some recent versions of X11 specifies to use the
|
||||
C library multibyte functions. Unless your C library has support
|
||||
for Japanese locales, this is incorrect, and will cause problems
|
||||
for GTK's internationalization.
|
||||
|
||||
(In particular, this occurs with GNU libc 2.0 in which
|
||||
the multibyte functions always translate to and from UTF-8; but
|
||||
the problem may occur for other C libraries, and other operating
|
||||
systems as well.)
|
||||
|
||||
To fix this, change the line:
|
||||
|
||||
use_stdc_env True
|
||||
|
||||
to
|
||||
|
||||
use_stdc_env False
|
||||
|
||||
in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
|
||||
|
||||
|
||||
16
Makefile.am
16
Makefile.am
@@ -1,10 +1,13 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
## Makefile.am for GTK+
|
||||
|
||||
SRC_SUBDIRS = gdk gtk
|
||||
SUBDIRS = po $(SRC_SUBDIRS) docs
|
||||
|
||||
bin_SCRIPTS = gtk-config
|
||||
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
EXTRA_DIST = \
|
||||
HACKING \
|
||||
gtk+.spec.in \
|
||||
@@ -14,6 +17,7 @@ EXTRA_DIST = \
|
||||
NEWS.pre-1-0 \
|
||||
ChangeLog.pre-1-0 \
|
||||
README.cvs-commits \
|
||||
README.win32 \
|
||||
intl/libgettext.h \
|
||||
intl/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
@@ -97,8 +101,14 @@ EXTRA_DIST = \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
|
||||
dist-hook:
|
||||
cp gtk+.spec $(distdir)
|
||||
dist-hook: gtk+.spec
|
||||
if test -e $(srcdir)/INSTALL.in && test -e $(srcdir)/README.in ; then \
|
||||
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
|
||||
CONFIG_HEADERS= \
|
||||
$(SHELL) config.status \
|
||||
&& cp INSTALL README $(distdir) ; \
|
||||
fi \
|
||||
&& cp gtk+.spec $(distdir)
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = gtk.m4
|
||||
|
||||
96
NEWS
96
NEWS
@@ -1,3 +1,99 @@
|
||||
Overview of Changes in GTK+ 1.2.6:
|
||||
|
||||
* container queue_resize fixes
|
||||
* gtk[vh]scale: minor fixups
|
||||
* rename idle to idle_id in testgtk to avoid conflicts with
|
||||
broken libs
|
||||
* More consistant naming of gtkrc files
|
||||
* Added language support: ro, uk
|
||||
|
||||
Overview of Changes in GTK+ 1.2.5:
|
||||
|
||||
* more GtkCTree and GtkWindow bug fixes.
|
||||
* more redraw/resize queue fixes, better expose event
|
||||
discarding code.
|
||||
* more miscellaneous bugs fixed
|
||||
* new configure.in option --disable-rebuilds to completely disable
|
||||
rebuilds of autogenerated sources.
|
||||
* check for 5.002 now, to avoid failing autogeneration build rules due
|
||||
to old perl versions.
|
||||
* fonts (and fontsets) are cached now.
|
||||
* more autogeneration make rules and dependancy fixups, we should be
|
||||
save with autogeneration up to make -j12 now ;)
|
||||
* new window position GTK_WIN_POS_CENTER_ALWAYS, which will recenter the
|
||||
GtkWindow on every size change.
|
||||
* major rework of window manager hints handling code, fixed a bunch of
|
||||
races with the new resizing code.
|
||||
* the new wm hints and resizing code is absolutely perfect and bug free now,
|
||||
it only lacks testing ;)
|
||||
* fixed up various rc style memory prolems.
|
||||
* gtk_widget_modify_style() now properly changes the style of realized widgets
|
||||
and references the style passed into it. if people worked around this bug,
|
||||
this will introduce a slight memory leak in their code.
|
||||
The code should typically look like:
|
||||
GtkRcStyle *rc_style = gtk_rc_style_new ();
|
||||
[...]
|
||||
gtk_widget_modify_style (widget, rc_style);
|
||||
gtk_rc_style_unref (rc_style);
|
||||
* fix problems with positioning menus offscreen.
|
||||
* GtkText fixes for some crashes and drawing errors.
|
||||
* Better handling for unexpected window destroys in GDK and GTK+.
|
||||
This should make it possible to use a GtkPlug and catch the
|
||||
case where its parent socket is randomly killed.
|
||||
* FAQ updates.
|
||||
* FileSelection i18n patches, RadioButton fixups.
|
||||
* many translation improvements.
|
||||
* miscellaneous other bugs fixed.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.4:
|
||||
|
||||
* DnD improvements (drags can be canceled with Esc now).
|
||||
* suppressed configure event reordering in Gdk.
|
||||
* rewrite of Gtk's configure event handling.
|
||||
* major improvements for the object argument system (Elena Devdariani).
|
||||
* major bugfixes for threading, GtkNotebook, GtkItemFactory, GtkCList and
|
||||
GtkCTree.
|
||||
* tutorial/FAQ updates, new file generation.txt on autogenerated sources.
|
||||
* configure's --with-glib= is "officially" unsupported.
|
||||
* upgrade to libtool 1.3.3.
|
||||
* various buglets fixed.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.3:
|
||||
|
||||
* Upgrade to libtool 1.3
|
||||
* Check for dgettext (for systems with old versions of GNU Gettext)
|
||||
* Many bug fixes (see ChangeLog for details)
|
||||
|
||||
Overview of Changes in GTK+ 1.2.2:
|
||||
|
||||
* Improved Dnd behaviour with Motif applications.
|
||||
* Bug fixes for the Gtk selection code.
|
||||
* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
|
||||
* Bug fixes and leak plugs for the Gdk IM code.
|
||||
* Added gtk_object_get() facility to retrive object arguments easily.
|
||||
The var args list expects ("arg-name", &value) pairs.
|
||||
* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
|
||||
problems where closed pipes were no longer signalling GDK_INPUT_READ on
|
||||
systems with a native poll().
|
||||
* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
|
||||
anymore).
|
||||
* We don't attempt to lookup xpm color "None" anymore, this should prevent
|
||||
eXodus (commercial X windows server) from popping up a color dialog every
|
||||
time a transparent pixmap is created.
|
||||
* Fixed bug where Gtk timout/idle handlers would execute without the global
|
||||
Gdk lock being held.
|
||||
* Other minor bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.1:
|
||||
|
||||
* Many Bug fixes have been applied to the menu and accelerator code.
|
||||
* GtkItemFactory can "adopt" foreign menu items now and manage their
|
||||
accelerator installation. This is often required to get GtkItemFactory
|
||||
like accelerator propagation between different windows with the same
|
||||
menu heirarchy and for centralized parsing and saving of accelerators.
|
||||
* GtkCList/GtkCTree buttons should always display correctly now.
|
||||
* Miscellaneous other bug fixes.
|
||||
|
||||
What's New in GTK+ 1.2.0 (since 1.0.x):
|
||||
|
||||
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
|
||||
|
||||
101
README.in
Normal file
101
README.in
Normal file
@@ -0,0 +1,101 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version @GTK_VERSION@. GTK+, which stands for the Gimp ToolKit,
|
||||
is a library for creating graphical user interfaces for the X Window
|
||||
System. It is designed to be small, efficient, and flexible. GTK+ is
|
||||
written in C with a very object-oriented approach.
|
||||
|
||||
The official ftp site is:
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
|
||||
The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
A mailing list is located at:
|
||||
gtk-list@redhat.com
|
||||
|
||||
To subscribe: mail -s subscribe gtk-list-request@redhat.com < /dev/null
|
||||
(Send mail to gtk-list-request@redhat.com with the subject "subscribe")
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking
|
||||
system. (http://bugs.gnome.org). To report a problem
|
||||
about GTK+, send mail to submit@bugs.gnome.org.
|
||||
|
||||
The subject of the mail should describe your problem.
|
||||
In the body of the mail, you should first include
|
||||
a "pseudo-header" that gives the package and
|
||||
version number. This should be separated by a blank
|
||||
line from the actual headers.
|
||||
|
||||
Package: gtk+
|
||||
Version: @GTK_VERSION@
|
||||
|
||||
[ Please substitute @GTK_VERSION@ with the version of GTK+ that
|
||||
you have installed ]
|
||||
|
||||
Then describe the bug. Include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- What version of X
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with the testgtk program that is built
|
||||
in the gtk/ subdirectory, that will be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior.
|
||||
As a last resort, you can also provide a pointer to a larger piece
|
||||
of software that can be downloaded.
|
||||
|
||||
(Bugs that can be reproduced within the GIMP are almost as good
|
||||
as bugs that can be reproduced in testgtk. If you are reporting a
|
||||
bug found with the GIMP, please include the version number of the GIMP
|
||||
you are using)
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out
|
||||
when the crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but
|
||||
is not necessary. If you do send a stack trace, and the error
|
||||
is an X error, it will be more useful if the stacktrace
|
||||
is produced running the test program with the --sync command
|
||||
line option.
|
||||
|
||||
An example of a bug report:
|
||||
|
||||
====
|
||||
To: submit@bugs.gnome.org
|
||||
From: yourname@your.address.org
|
||||
Subject: handlebox test in testgtk is misnamed.
|
||||
|
||||
Package: gtk+
|
||||
Version: @GTK_VERSION@
|
||||
|
||||
When I run gtk/testgtk, the button "handle box"
|
||||
is misnamed. There are multiple handle boxes in
|
||||
the demo, so it should be "handle boxes", to
|
||||
be like "buttons" or "check buttons".
|
||||
===
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Patches can be uploaded to the incoming/ directory on
|
||||
ftp.gtk.org. Please follow the instructions there, and include
|
||||
your name and email address in the README file.
|
||||
|
||||
If the patch fixes a bug, it is usually a good idea to include
|
||||
all the information described in "How to Report Bugs".
|
||||
36
README.win32
Normal file
36
README.win32
Normal file
@@ -0,0 +1,36 @@
|
||||
The Win32 port of GTk+ is a work in progress, and not as stable or
|
||||
correct as the Unix/X11 version. For more information about the Win32
|
||||
port, see http://www.gimp.org/tml/gimp/win32/ or
|
||||
http://www.iki.fi/tml/gimp/win32/ .
|
||||
|
||||
To build GTk+ on Win32, you need either the Microsoft compiler and
|
||||
tools, or gcc-2.95 or later running under cygwin-b20.1 or
|
||||
later. Compile in gdk\win32 and gtk with `nmake -f makefile.msc` or
|
||||
`make -f makefile.cygwin`. Before doing a install, check the BIN
|
||||
definition in gdk\win32\makefile.msc (or makefile.cygwin) and
|
||||
gtk\makefile.msc (or makefile.cygwin).
|
||||
|
||||
See the README.win32 file in the GLib distribution for instructions
|
||||
how to build with gcc.
|
||||
|
||||
The same instructions are also useful if you want to build
|
||||
applications that use GTk+ on Win32.
|
||||
|
||||
The tablet support uses the Wintab API. The Wintab development kit can
|
||||
be downloaded from http://www.pointing.com. If you don't care for
|
||||
that, undefine HAVE_WINTAB in config.h.win32 and remove references to
|
||||
the wntab32x library from the makefile before building.
|
||||
|
||||
GTk+ wants to be built with the GNU "intl" library for
|
||||
internationalisation (i18n). Get the version ported to Win32 (not a
|
||||
very big deal) from tml's web site mentioned above. We build the
|
||||
"intl" library as a DLL called gnu-intl.dll (the "gnu" prefix is used
|
||||
to reduce name clash risks). If you don't want any i18n stuff,
|
||||
undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the
|
||||
config.h.win32 file, and remove references to the gnu-intl library
|
||||
from the makefiles.
|
||||
|
||||
Note that while the GNU gettext package is under the GPL, the "intl"
|
||||
part of it as distributed with GNU libc is under the LGPL (like GTk+
|
||||
or GLib). We want the LGPL one, even if they are the same, more or
|
||||
less.
|
||||
16
TODO
16
TODO
@@ -12,21 +12,14 @@ Outstanding items:
|
||||
* Make all widget attributes configurable after the widget is created (timj).
|
||||
|
||||
* Radio buttons need to display CAN/HAS_DEFAULT correctly, if draw_inidicator
|
||||
is TRUE.
|
||||
is TRUE. (Radio buttons do not need to CAN_DEFAULT! OWT)
|
||||
|
||||
* gdk_expose_compress: ala-Xt, this would really help for opaque moves and
|
||||
such
|
||||
|
||||
* More dialogs: Print, GtkFontSelector, maybe others...
|
||||
* More dialogs: Print, maybe others...
|
||||
|
||||
* make the gtk_main callbacks consistent in their add/remove behaviour.
|
||||
|
||||
* Check return values on all calls to XIC[Get/Set]Values
|
||||
|
||||
* Rewrite the interface to the i18n stuff so GTK widgets don't need to
|
||||
retrieve X values, and so they don't have to know the value of the
|
||||
XNxxx character constants.
|
||||
|
||||
* The "--geometry" option should be supported
|
||||
|
||||
- Having gdk_init() parse the geometry option. (putting it into
|
||||
@@ -70,6 +63,11 @@ Outstanding items:
|
||||
cause confusing presses to be sent to containers that actually
|
||||
want to get events on themselves.
|
||||
|
||||
* The menu code should skip separators during keyboard navigation,
|
||||
whether they are sensitive or insensitive.
|
||||
|
||||
* OwnerButtonPressGrab needs to go!
|
||||
|
||||
Text/Edit widget:
|
||||
|
||||
Bugs:
|
||||
|
||||
@@ -19,18 +19,19 @@
|
||||
#undef GTK_COMPILED_WITH_DEBUGGING
|
||||
|
||||
#undef HAVE_CATGETS
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_GETTEXT
|
||||
#undef HAVE_IPC_H
|
||||
#undef HAVE_LC_MESSAGES
|
||||
#undef HAVE_PWD_H
|
||||
#undef HAVE_SHM_H
|
||||
#undef HAVE_STPCPY
|
||||
#undef HAVE_XSHM_H
|
||||
#undef HAVE_SHAPE_EXT
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_SYS_TIME_H
|
||||
#undef HAVE_XCONVERTCASE
|
||||
|
||||
#undef WITH_SYMBOL_UNDERSCORE
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
||||
550
acinclude.m4
550
acinclude.m4
@@ -1,6 +1,6 @@
|
||||
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-1998 Free Software Foundation, Inc.
|
||||
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
@@ -21,31 +21,66 @@
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 29 AM_PROG_LIBTOOL
|
||||
AC_DEFUN(AM_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AM_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AM_PROG_LD])dnl
|
||||
AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AM_SYS_NM_PARSE])dnl
|
||||
AC_REQUIRE([AM_SYS_SYMBOL_UNDERSCORE])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
# serial 40 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags=
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
@@ -81,46 +116,31 @@ case "$host" in
|
||||
fi
|
||||
;;
|
||||
|
||||
*-*-cygwin32*)
|
||||
AM_SYS_LIBTOOL_CYGWIN32
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
|
||||
])
|
||||
esac
|
||||
|
||||
# enable the --disable-libtool-lock switch
|
||||
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock force libtool not to do file locking],
|
||||
need_locks=$enableval,
|
||||
need_locks=yes)
|
||||
|
||||
if test x"$need_locks" = xno; then
|
||||
libtool_flags="$libtool_flags --disable-lock"
|
||||
fi
|
||||
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
# AM_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AM_ENABLE_SHARED[(DEFAULT)]
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AM_ENABLE_SHARED,
|
||||
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
@@ -138,26 +158,22 @@ no) enable_shared=no ;;
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AM_DISABLE_SHARED,
|
||||
[AM_ENABLE_SHARED(no)])
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AM_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AM_DISABLE_STATIC,
|
||||
[AM_ENABLE_STATIC(no)])
|
||||
|
||||
# AM_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AM_ENABLE_STATIC[(DEFAULT)]
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AM_ENABLE_STATIC,
|
||||
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
@@ -175,12 +191,49 @@ no) enable_static=no ;;
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
# AM_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AM_PROG_LD,
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
@@ -195,47 +248,15 @@ if test "$ac_cv_prog_gcc" = yes; then
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
/* | [A-Za-z]:/*)
|
||||
# Canonicalize the path of ld
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%'
|
||||
changequote([,])dnl
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
case "$host_os" in
|
||||
cygwin*)
|
||||
# Convert to a UNC path for cygwin
|
||||
test -z "$LD" && LD=`echo X$ac_prog | sed -e "1s/^X//" -e "$sub_uncdrive"`
|
||||
;;
|
||||
*)
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
##
|
||||
## FIXME: The code fails later on if we try to use an $LD with
|
||||
## '\\' path separators.
|
||||
##
|
||||
changequote(,)dnl
|
||||
[A-Za-z]:[\\]*)
|
||||
# Canonicalize the path of ld
|
||||
re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)'
|
||||
sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%'
|
||||
changequote([,])dnl
|
||||
sub_uncdir='s%\\%/%g'
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"`
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
case "$host_os" in
|
||||
cygwin*)
|
||||
# Convert to a UNC path for cygwin
|
||||
test -z "$LD" && LD=`echo X$ac_prog | sed -e 's%^X%%' -e "$sub_uncdrive" -e "$sub_uncdir"`
|
||||
;;
|
||||
*)
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
esac
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
@@ -253,10 +274,10 @@ else
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog"; then
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
@@ -264,7 +285,7 @@ AC_CACHE_VAL(ac_cv_path_LD,
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -280,10 +301,10 @@ else
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AM_PROG_LD_GNU
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_PROG_LD_GNU,
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
@@ -293,29 +314,31 @@ else
|
||||
fi])
|
||||
])
|
||||
|
||||
# AM_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AM_PROG_NM,
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm; then
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM="$ac_dir/nm"
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
@@ -326,221 +349,82 @@ AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# AM_SYS_NM_PARSE - Check for command ro grab the raw symbol name followed
|
||||
# by C symbol name from nm.
|
||||
AC_DEFUN(AM_SYS_NM_PARSE,
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AM_PROG_NM])dnl
|
||||
# Check for command to grab the raw symbol name followed by C symbol from nm.
|
||||
AC_MSG_CHECKING([command to parse $NM output])
|
||||
AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
|
||||
[# These are sane defaults that work on at least a few old systems.
|
||||
# {They come from Ultrix. What could be older than Ultrix?!! ;)}
|
||||
|
||||
changequote(,)dnl
|
||||
# Character class describing NM global symbol codes.
|
||||
ac_symcode='[BCDEGRSTU]'
|
||||
|
||||
# Regexp to match symbols that can be accessed directly from C.
|
||||
ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
|
||||
|
||||
# Transform the above into a raw symbol and a C symbol.
|
||||
ac_symxfrm='\1 \1'
|
||||
|
||||
# Define system-specific variables.
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
ac_symcode='[BCDTU]'
|
||||
LIBM=
|
||||
case "$host" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
sunos* | cygwin32* | mingw32*)
|
||||
ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
|
||||
ac_symxfrm='_\1 \1'
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
irix*)
|
||||
# Cannot use undefined symbols on IRIX because inlined functions mess us up.
|
||||
ac_symcode='[BCDEGRST]'
|
||||
;;
|
||||
solaris*)
|
||||
ac_symcode='[BDTU]'
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# If we're using GNU nm, then use its standard symbol codes.
|
||||
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
ac_symcode='[ABCDGISTUW]'
|
||||
fi
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
])
|
||||
|
||||
case "$host_os" in
|
||||
cygwin32* | mingw32*)
|
||||
# We do not want undefined symbols on cygwin32. The user must
|
||||
# arrange to define them via -l arguments.
|
||||
ac_symcode='[ABCDGISTW]'
|
||||
;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
|
||||
# Write the raw and C identifiers.
|
||||
ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* $ac_symcode $ac_sympat$/$ac_symxfrm/p'"
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
ac_pipe_works=no
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
char nm_test_var;
|
||||
void nm_test_func(){}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
int main(){nm_test_var='a';nm_test_func;return 0;}
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
ac_nlist=conftest.nm
|
||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
|
||||
|
||||
# Try sorting and uniquifying the output.
|
||||
if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
|
||||
mv -f "$ac_nlist"T "$ac_nlist"
|
||||
ac_wcout=`wc "$ac_nlist" 2>/dev/null`
|
||||
changequote(,)dnl
|
||||
ac_count=`echo "X$ac_wcout" | sed -e 's,^X,,' -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
|
||||
changequote([,])dnl
|
||||
(test "$ac_count" -ge 0) 2>/dev/null || ac_count=-1
|
||||
else
|
||||
rm -f "$ac_nlist"T
|
||||
ac_count=-1
|
||||
fi
|
||||
|
||||
# Make sure that we snagged all the symbols we need.
|
||||
if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
|
||||
if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
|
||||
cat <<EOF > conftest.c
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EOF
|
||||
# Now generate the symbol file.
|
||||
sed 's/^.* \(.*\)$/extern char \1;/' < "$ac_nlist" >> conftest.c
|
||||
|
||||
cat <<EOF >> conftest.c
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# define __ptr_t void *
|
||||
#else
|
||||
# define __ptr_t char *
|
||||
#endif
|
||||
|
||||
/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
|
||||
int dld_preloaded_symbol_count = $ac_count;
|
||||
|
||||
/* The mapping between symbol names and symbols. */
|
||||
struct {
|
||||
char *name;
|
||||
__ptr_t address;
|
||||
}
|
||||
changequote(,)dnl
|
||||
dld_preloaded_symbols[] =
|
||||
changequote([,])dnl
|
||||
{
|
||||
EOF
|
||||
sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
|
||||
cat <<\EOF >> conftest.c
|
||||
{0, (__ptr_t) 0}
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
# Now try linking the two files.
|
||||
mv conftest.$ac_objext conftestm.$ac_objext
|
||||
ac_save_LIBS="$LIBS"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
LIBS="conftestm.$ac_objext"
|
||||
CFLAGS="$CFLAGS$no_builtin_flag"
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest; then
|
||||
ac_pipe_works=yes
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
LIBS="$ac_save_LIBS"
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
else
|
||||
echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
else
|
||||
echo "$progname: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
rm -rf conftest*
|
||||
|
||||
# Do not use the global_symbol_pipe unless it works.
|
||||
test "$ac_pipe_works" = yes || ac_cv_sys_global_symbol_pipe=
|
||||
])
|
||||
|
||||
ac_result=yes
|
||||
if test -z "$ac_cv_sys_global_symbol_pipe"; then
|
||||
ac_result=no
|
||||
fi
|
||||
AC_MSG_RESULT($ac_result)
|
||||
])
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
|
||||
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,
|
||||
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
])
|
||||
|
||||
# AM_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
|
||||
# with an underscore?
|
||||
AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE,
|
||||
[AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AM_SYS_NM_PARSE])dnl
|
||||
AC_MSG_CHECKING([for _ prefix in compiled symbols])
|
||||
AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
|
||||
[ac_cv_sys_symbol_underscore=no
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
void nm_test_func(){}
|
||||
int main(){nm_test_func;return 0;}
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
ac_nlist=conftest.nm
|
||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
|
||||
# See whether the symbols have a leading underscore.
|
||||
if egrep '^_nm_test_func' "$ac_nlist" >/dev/null; then
|
||||
ac_cv_sys_symbol_underscore=yes
|
||||
else
|
||||
if egrep '^nm_test_func ' "$ac_nlist" >/dev/null; then
|
||||
:
|
||||
else
|
||||
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
rm -rf conftest*
|
||||
])
|
||||
AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
|
||||
if test x$ac_cv_sys_symbol_underscore = xyes; then
|
||||
AC_DEFINE(WITH_SYMBOL_UNDERSCORE,1,
|
||||
[define if compiled symbols have a leading underscore])
|
||||
fi
|
||||
])
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
@@ -589,22 +473,22 @@ AC_DEFUN(AM_GTK_WITH_NLS,
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
|
||||
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
|
||||
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
|
||||
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for gettext in libintl],
|
||||
gt_cv_func_gettext_libintl,
|
||||
[AC_CHECK_LIB(intl, gettext,
|
||||
gt_cv_func_gettext_libintl=yes,
|
||||
gt_cv_func_gettext_libintl=no)],
|
||||
gt_cv_func_gettext_libintl=no)])
|
||||
[AC_CACHE_CHECK([for dgettext in libintl],
|
||||
gt_cv_func_dgettext_libintl,
|
||||
[AC_CHECK_LIB(intl, dgettext,
|
||||
gt_cv_func_dgettext_libintl=yes,
|
||||
gt_cv_func_dgettext_libintl=no)],
|
||||
gt_cv_func_dgettext_libintl=no)])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT)
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
@@ -624,8 +508,8 @@ AC_DEFUN(AM_GTK_WITH_NLS,
|
||||
fi
|
||||
|
||||
# Added by Martin Baulig 12/15/98 for libc5 systems
|
||||
if test "$gt_cv_func_gettext_libc" != "yes" \
|
||||
&& test "$gt_cv_func_gettext_libintl" = "yes"; then
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
INTLLIBS=-lintl
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
fi
|
||||
|
||||
10
autogen.sh
10
autogen.sh
@@ -20,14 +20,6 @@ DIE=0
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have libtool installed to compile $PROJECT."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/libtool-1.2b.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile $PROJECT."
|
||||
@@ -88,7 +80,7 @@ automake -a $am_opt
|
||||
autoconf
|
||||
cd $ORIGDIR
|
||||
|
||||
$srcdir/configure "$@"
|
||||
$srcdir/configure --enable-maintainer-mode "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
|
||||
286
config.guess
vendored
286
config.guess
vendored
@@ -1,6 +1,7 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -23,6 +24,7 @@
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
@@ -35,6 +37,20 @@
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
# Use $HOST_CC if defined. $CC may point to a cross-compiler
|
||||
if test x"$CC_FOR_BUILD" = x; then
|
||||
if test x"$HOST_CC" != x; then
|
||||
CC_FOR_BUILD="$HOST_CC"
|
||||
else
|
||||
if test x"$CC" != x; then
|
||||
CC_FOR_BUILD="$CC"
|
||||
else
|
||||
CC_FOR_BUILD=cc
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 8/24/94.)
|
||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||
@@ -46,7 +62,8 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
@@ -59,7 +76,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >dummy.s
|
||||
cat <<EOF >$dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
@@ -76,9 +93,9 @@ main:
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
@@ -97,8 +114,14 @@ EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||
# of the specific Alpha model?
|
||||
echo alpha-pc-interix
|
||||
exit 0 ;;
|
||||
21064:Windows_NT:50:3)
|
||||
echo alpha-dec-winnt3.5
|
||||
@@ -142,7 +165,7 @@ EOF
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
|
||||
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
|
||||
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
||||
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
||||
echo pyramid-pyramid-sysv3
|
||||
@@ -150,7 +173,7 @@ EOF
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
NILE:*:*:dcosx)
|
||||
NILE*:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
@@ -201,6 +224,32 @@ EOF
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
# The situation for MiNT is a little confusing. The machine name
|
||||
# can be virtually everything (everything which is not
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
|
||||
# to the lowercase version "mint" (or "freemint"). Finally
|
||||
# the system name "TOS" denotes a system which is actually not
|
||||
# MiNT. But MiNT is downward compatible to TOS, so this should
|
||||
# be no problem.
|
||||
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -234,12 +283,16 @@ EOF
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
2020:CLIX:*:*)
|
||||
2020:CLIX:*:* | 2430:CLIX:*:*)
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
int main (argc, argv) int argc; char **argv; {
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#if defined (host_mips) && defined (MIPSEB)
|
||||
#if defined (SYSTYPE_SYSV)
|
||||
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
|
||||
@@ -254,10 +307,10 @@ EOF
|
||||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy \
|
||||
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
@@ -309,7 +362,7 @@ EOF
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
@@ -320,8 +373,8 @@ EOF
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
@@ -368,25 +421,25 @@ EOF
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 )
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
9000/[678][0-9][0-9])
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
switch (cpu)
|
||||
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
@@ -394,20 +447,20 @@ EOF
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
|
||||
rm -f dummy.c dummy
|
||||
($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
rm -f $dummy.c $dummy
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
@@ -432,8 +485,8 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
@@ -442,6 +495,9 @@ EOF
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
*9??*:MPE/iX:*:*)
|
||||
echo hppa1.0-hp-mpeix
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
echo hppa1.1-hp-osf
|
||||
exit 0 ;;
|
||||
@@ -458,6 +514,9 @@ EOF
|
||||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
hppa*:OpenBSD:*:*)
|
||||
echo hppa-unknown-openbsd
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
@@ -490,11 +549,14 @@ EOF
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo t3e-cray-unicosmk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F300:UNIX_System_V:*:*)
|
||||
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
@@ -507,13 +569,22 @@ EOF
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
echo sparc-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
*:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
if test -x /usr/bin/objformat; then
|
||||
if test "elf" = "`/usr/bin/objformat`"; then
|
||||
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
@@ -523,13 +594,22 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin32
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit 0 ;;
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||
echo i386-pc-interix
|
||||
exit 0 ;;
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin32
|
||||
echo powerpcle-unknown-cygwin
|
||||
exit 0 ;;
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
@@ -541,12 +621,14 @@ EOF
|
||||
# uname on the ARM produces all sorts of strangeness, and we need to
|
||||
# filter it out.
|
||||
case "$UNAME_MACHINE" in
|
||||
armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
|
||||
arm* | sa110*) UNAME_MACHINE="arm" ;;
|
||||
esac
|
||||
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us.
|
||||
ld_help_string=`ld --help 2>&1`
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_help_string=`cd /; ld --help 2>&1`
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
@@ -559,11 +641,40 @@ EOF
|
||||
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
|
||||
elf32ppc)
|
||||
# Determine Lib Version
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#if defined(__GLIBC__)
|
||||
extern char __libc_version[];
|
||||
extern char __libc_release[];
|
||||
#endif
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#if defined(__GLIBC__)
|
||||
printf("%s %s\n", __libc_version, __libc_release);
|
||||
#else
|
||||
printf("unkown\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy | grep 1\.99 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.c $dummy
|
||||
echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
sed 's/^ //' <<EOF >dummy.s
|
||||
sed 's/^ //' <<EOF >$dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
@@ -581,9 +692,9 @@ EOF
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
@@ -600,22 +711,23 @@ EOF
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
objdump --private-headers dummy | \
|
||||
objdump --private-headers $dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
@@ -625,8 +737,8 @@ main(argc, argv)
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
@@ -645,12 +757,13 @@ EOF
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >dummy.c <<EOF
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
@@ -667,8 +780,8 @@ main(argc, argv)
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
@@ -690,6 +803,14 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:5:7*)
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
|
||||
(/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
|
||||
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
@@ -699,18 +820,15 @@ EOF
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:UnixWare:*:*)
|
||||
if /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
@@ -752,7 +870,7 @@ EOF
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:*)
|
||||
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
@@ -764,6 +882,9 @@ EOF
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:ReliantUNIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
@@ -794,7 +915,7 @@ EOF
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
@@ -810,12 +931,24 @@ EOF
|
||||
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
||||
echo i586-pc-beos
|
||||
exit 0 ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SX-5:SUPER-UX:*:*)
|
||||
echo sx5-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Rhapsody:*:*)
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >dummy.c <<EOF
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
@@ -853,7 +986,10 @@ main ()
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
@@ -913,8 +1049,8 @@ main ()
|
||||
}
|
||||
EOF
|
||||
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
||||
192
config.h.win32
Executable file
192
config.h.win32
Executable file
@@ -0,0 +1,192 @@
|
||||
/* config.h.win32. Handcrafted for Microsoft C and gcc -mno-cygwin */
|
||||
|
||||
#if ! (defined(_MSC_VER) || defined(__GNUC__))
|
||||
#error Unrecognized Win32 compiler, edit config.h.win32 by hand
|
||||
#endif
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
||||
This function is required for alloca.c support on those systems. */
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
#ifdef _MSC_VER
|
||||
#define alloca _alloca
|
||||
#elif defined (__GNUC__)
|
||||
#define alloca __builtin_alloca
|
||||
#endif
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define to empty, or __inline if that's what your compiler wants. */
|
||||
#define inline __inline
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
/* #undef _POSIX_SOURCE*/
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Other stuff */
|
||||
#define ENABLE_NLS 1
|
||||
#define GTK_COMPILED_WITH_DEBUGGING "minimum"
|
||||
|
||||
/* #undef HAVE_CATGETS */
|
||||
/* #undef HAVE_DIRENT_H */
|
||||
#define HAVE_GETTEXT 1
|
||||
/* #undef HAVE_IPC_H */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
/* #undef HAVE_PWD_H */
|
||||
/* #undef HAVE_SHM_H */
|
||||
/* #undef HAVE_STPCPY */
|
||||
/* #undef HAVE_XSHM_H */
|
||||
#define HAVE_SHAPE_EXT 1
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
/* #undef HAVE_XCONVERTCASE */
|
||||
|
||||
/* #undef NO_FD_SET */
|
||||
|
||||
/* #undef XINPUT_NONE */
|
||||
/* #undef XINPUT_GXI */
|
||||
/* #undef XINPUT_XFREE */
|
||||
#define XINPUT_WIN32 1
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define if you have the __argz_count function. */
|
||||
/* #undef HAVE___ARGZ_COUNT */
|
||||
|
||||
/* Define if you have the __argz_next function. */
|
||||
/* #undef HAVE___ARGZ_NEXT */
|
||||
|
||||
/* Define if you have the __argz_stringify function. */
|
||||
/* #undef HAVE___ARGZ_STRINGIFY */
|
||||
|
||||
/* Define if you have the broken_wctype function. */
|
||||
/* #undef HAVE_BROKEN_WCTYPE */
|
||||
|
||||
/* Define if you have the dcgettext function. */
|
||||
/* #undef HAVE_DCGETTEXT */
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the getpagesize function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define if you have the lstat function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define if you have the munmap function. */
|
||||
/* #undef HAVE_MUNMAP */
|
||||
|
||||
/* Define if you have the putenv function. */
|
||||
#define HAVE_PUTENV 1
|
||||
#define putenv _putenv
|
||||
|
||||
/* Define if you have the setenv function. */
|
||||
/* #undef HAVE_SETENV */
|
||||
|
||||
/* Define if you have the setlocale function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define if you have the stpcpy function. */
|
||||
/* #undef HAVE_STPCPY */
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define strcasecmp _stricmp
|
||||
|
||||
/* Define if you have the strchr function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the <argz.h> header file. */
|
||||
/* #undef HAVE_ARGZ_H */
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
/* #undef HAVE_DIRENT_H */
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <nl_types.h> header file. */
|
||||
/* #undef HAVE_NL_TYPES_H */
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
/* #undef HAVE_PWD_H */
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
|
||||
/* Define if you have the <wchar.h> header file. */
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* Define if you have the <wctype.h> header file. */
|
||||
#ifdef _MSC_VER
|
||||
#define HAVE_WCTYPE_H 1
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the i library (-li). */
|
||||
/* #undef HAVE_LIBI */
|
||||
|
||||
/* Define if you have the intl library (-lintl). */
|
||||
#define HAVE_LIBINTL 1
|
||||
|
||||
/* define if compiled symbols have a leading underscore */
|
||||
/* #undef WITH_SYMBOL_UNDERSCORE */
|
||||
|
||||
/* Define if you have the Wintab programmer's kit */
|
||||
#define HAVE_WINTAB 1
|
||||
|
||||
/* Define if you have the <dimm.h> header file
|
||||
* (available in the Platform SDK)
|
||||
*/
|
||||
/* #define HAVE_DIMM_H 1 */
|
||||
308
config.sub
vendored
308
config.sub
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
@@ -98,11 +98,21 @@ case $os in
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-sim | -cisco | -oki | -wec | -winbond)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-scout)
|
||||
;;
|
||||
-wrs)
|
||||
os=vxworks
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco5)
|
||||
os=sco3.2v5
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
@@ -121,6 +131,9 @@ case $os in
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-udk*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-isc)
|
||||
os=-isc2.2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@@ -151,14 +164,21 @@ case $basic_machine in
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \
|
||||
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
|
||||
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
|
||||
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| sparc | sparclet | sparclite | sparc64 | v850)
|
||||
| 580 | i960 | h8300 \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
|
||||
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | miprs64vr5000el \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
|
||||
| thumb | d10v)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
@@ -174,24 +194,41 @@ case $basic_machine in
|
||||
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
|
||||
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
|
||||
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
|
||||
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
|
||||
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
|
||||
| clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-*)
|
||||
| f301-* | armv*-* | t3e-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* )
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
386bsd)
|
||||
basic_machine=i386-unknown
|
||||
os=-bsd
|
||||
;;
|
||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||
basic_machine=m68000-att
|
||||
;;
|
||||
3b*)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
a29khif)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
adobe68k)
|
||||
basic_machine=m68010-adobe
|
||||
os=-scout
|
||||
;;
|
||||
alliant | fx80)
|
||||
basic_machine=fx80-alliant
|
||||
;;
|
||||
@@ -221,6 +258,10 @@ case $basic_machine in
|
||||
basic_machine=m68k-apollo
|
||||
os=-sysv
|
||||
;;
|
||||
apollo68bsd)
|
||||
basic_machine=m68k-apollo
|
||||
os=-bsd
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
@@ -297,6 +338,10 @@ case $basic_machine in
|
||||
encore | umax | mmax)
|
||||
basic_machine=ns32k-encore
|
||||
;;
|
||||
es1800 | OSE68k | ose68k | ose | OSE)
|
||||
basic_machine=m68k-ericsson
|
||||
os=-ose
|
||||
;;
|
||||
fx2800)
|
||||
basic_machine=i860-alliant
|
||||
;;
|
||||
@@ -315,6 +360,14 @@ case $basic_machine in
|
||||
basic_machine=h8300-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
h8300xray)
|
||||
basic_machine=h8300-hitachi
|
||||
os=-xray
|
||||
;;
|
||||
h8500hms)
|
||||
basic_machine=h8500-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
harris)
|
||||
basic_machine=m88k-harris
|
||||
os=-sysv3
|
||||
@@ -330,13 +383,30 @@ case $basic_machine in
|
||||
basic_machine=m68k-hp
|
||||
os=-hpux
|
||||
;;
|
||||
hp3k9[0-9][0-9] | hp9[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hp9k2[0-9][0-9] | hp9k31[0-9])
|
||||
basic_machine=m68000-hp
|
||||
;;
|
||||
hp9k3[2-9][0-9])
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
|
||||
hp9k6[0-9][0-9] | hp6[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hp9k7[0-79][0-9] | hp7[0-79][0-9])
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k78[0-9] | hp78[0-9])
|
||||
# FIXME: really hppa2.0-hp
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
|
||||
# FIXME: really hppa2.0-hp
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[0-9][13679] | hp8[0-9][13679])
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||
@@ -345,6 +415,14 @@ case $basic_machine in
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
hppaosf)
|
||||
basic_machine=hppa1.1-hp
|
||||
os=-osf
|
||||
;;
|
||||
hppro)
|
||||
basic_machine=hppa1.1-hp
|
||||
os=-proelf
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
@@ -366,6 +444,22 @@ case $basic_machine in
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
i386mach)
|
||||
basic_machine=i386-mach
|
||||
os=-mach
|
||||
;;
|
||||
i386-vsta | vsta)
|
||||
basic_machine=i386-unknown
|
||||
os=-vsta
|
||||
;;
|
||||
i386-go32 | go32)
|
||||
basic_machine=i386-unknown
|
||||
os=-go32
|
||||
;;
|
||||
i386-mingw32 | mingw32)
|
||||
basic_machine=i386-unknown
|
||||
os=-mingw32
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
@@ -394,6 +488,10 @@ case $basic_machine in
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
*mint | *MiNT)
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux-gnu
|
||||
@@ -408,10 +506,26 @@ case $basic_machine in
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-unknown
|
||||
os=-msdos
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
;;
|
||||
netbsd386)
|
||||
basic_machine=i386-unknown
|
||||
os=-netbsd
|
||||
;;
|
||||
netwinder)
|
||||
basic_machine=armv4l-corel
|
||||
os=-linux
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
basic_machine=m68k-sony
|
||||
os=-newsos
|
||||
@@ -424,6 +538,10 @@ case $basic_machine in
|
||||
basic_machine=mips-sony
|
||||
os=-newsos
|
||||
;;
|
||||
necv70)
|
||||
basic_machine=v70-nec
|
||||
os=-sysv
|
||||
;;
|
||||
next | m*-next )
|
||||
basic_machine=m68k-next
|
||||
case $os in
|
||||
@@ -449,9 +567,25 @@ case $basic_machine in
|
||||
basic_machine=i960-intel
|
||||
os=-nindy
|
||||
;;
|
||||
mon960)
|
||||
basic_machine=i960-intel
|
||||
os=-mon960
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
op50n-* | op60c-*)
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
os=-ose
|
||||
;;
|
||||
os68k)
|
||||
basic_machine=m68k-none
|
||||
os=-os68k
|
||||
;;
|
||||
pa-hitachi)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
@@ -469,19 +603,19 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | nexen)
|
||||
pentium | p5 | k5 | k6 | nexen)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | k6 | 6x86)
|
||||
pentiumpro | p6 | 6x86)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | nexen-*)
|
||||
pentium-* | p5-* | k5-* | k6-* | nexen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | k6-* | 6x86-*)
|
||||
pentiumpro-* | p6-* | 6x86-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
@@ -505,12 +639,20 @@ case $basic_machine in
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
rm[46]00)
|
||||
basic_machine=mips-siemens
|
||||
;;
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
@@ -518,6 +660,10 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sparclite-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
sps7)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv2
|
||||
@@ -525,6 +671,13 @@ case $basic_machine in
|
||||
spur)
|
||||
basic_machine=spur-unknown
|
||||
;;
|
||||
st2000)
|
||||
basic_machine=m68k-tandem
|
||||
;;
|
||||
stratus)
|
||||
basic_machine=i860-stratus
|
||||
os=-sysv4
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
@@ -569,6 +722,10 @@ case $basic_machine in
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=t3e-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
@@ -586,6 +743,10 @@ case $basic_machine in
|
||||
basic_machine=a29k-nyu
|
||||
os=-sym1
|
||||
;;
|
||||
v810 | necv810)
|
||||
basic_machine=v810-nec
|
||||
os=-none
|
||||
;;
|
||||
vaxv)
|
||||
basic_machine=vax-dec
|
||||
os=-sysv
|
||||
@@ -609,6 +770,14 @@ case $basic_machine in
|
||||
basic_machine=a29k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
w65*)
|
||||
basic_machine=w65-wdc
|
||||
os=-none
|
||||
;;
|
||||
w89k-*)
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
@@ -616,6 +785,10 @@ case $basic_machine in
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
@@ -623,6 +796,15 @@ case $basic_machine in
|
||||
|
||||
# Here we handle the default manufacturer of certain CPU types. It is in
|
||||
# some cases the only manufacturer, in others, it is the most popular.
|
||||
w89k)
|
||||
basic_machine=hppa1.1-winbond
|
||||
;;
|
||||
op50n)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
op60c)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
mips)
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
@@ -645,7 +827,7 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc)
|
||||
sparc | sparcv9)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -657,6 +839,16 @@ case $basic_machine in
|
||||
orion105)
|
||||
basic_machine=clipper-highlevel
|
||||
;;
|
||||
mac | mpw | mac-mpw)
|
||||
basic_machine=m68k-apple
|
||||
;;
|
||||
pmac | pmac-mpw)
|
||||
basic_machine=powerpc-apple
|
||||
;;
|
||||
c4x*)
|
||||
basic_machine=c4x-none
|
||||
os=-coff
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
@@ -710,13 +902,21 @@ case $os in
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos*)
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -macos* | -mpw* | -magic* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
@@ -741,6 +941,9 @@ case $os in
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
@@ -772,9 +975,18 @@ case $os in
|
||||
# This must come after -sysvr4.
|
||||
-sysv*)
|
||||
;;
|
||||
-ose*)
|
||||
os=-ose
|
||||
;;
|
||||
-es1800*)
|
||||
os=-ose
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
os=-mint
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
@@ -800,6 +1012,9 @@ case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
arm*-corel)
|
||||
os=-linux
|
||||
;;
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
@@ -821,6 +1036,15 @@ case $basic_machine in
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
@@ -833,6 +1057,15 @@ case $basic_machine in
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-wec)
|
||||
os=-proelf
|
||||
;;
|
||||
*-winbond)
|
||||
os=-proelf
|
||||
;;
|
||||
*-oki)
|
||||
os=-proelf
|
||||
;;
|
||||
*-hp)
|
||||
os=-hpux
|
||||
;;
|
||||
@@ -896,6 +1129,18 @@ case $basic_machine in
|
||||
f301-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*-rom68k)
|
||||
os=-coff
|
||||
;;
|
||||
*-*bug)
|
||||
os=-coff
|
||||
;;
|
||||
*-apple)
|
||||
os=-macos
|
||||
;;
|
||||
*-atari*)
|
||||
os=-mint
|
||||
;;
|
||||
*)
|
||||
os=-none
|
||||
;;
|
||||
@@ -917,9 +1162,15 @@ case $basic_machine in
|
||||
-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-beos*)
|
||||
vendor=be
|
||||
;;
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-mpeix*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
@@ -947,6 +1198,15 @@ case $basic_machine in
|
||||
-aux*)
|
||||
vendor=apple
|
||||
;;
|
||||
-hms*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
-mpw* | -macos*)
|
||||
vendor=apple
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
vendor=atari
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
|
||||
199
configure.in
199
configure.in
@@ -28,7 +28,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
#
|
||||
GTK_MAJOR_VERSION=1
|
||||
GTK_MINOR_VERSION=2
|
||||
GTK_MINOR_VERSION=3
|
||||
GTK_MICRO_VERSION=0
|
||||
GTK_INTERFACE_AGE=0
|
||||
GTK_BINARY_AGE=0
|
||||
@@ -95,6 +95,7 @@ AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
|
||||
, enable_xim="yes")
|
||||
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
|
||||
, enable_xim_inst="maybe")
|
||||
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
|
||||
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
|
||||
|
||||
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
|
||||
@@ -143,6 +144,9 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
# define a MAINT-like variable REBUILD which is set if Perl
|
||||
# and awk are found, so autogenerated sources can be rebuilt
|
||||
|
||||
@@ -153,20 +157,34 @@ AC_CHECK_PROGS(PERL, perl5 perl)
|
||||
AC_CHECK_PROG(INDENT, indent, indent)
|
||||
|
||||
REBUILD=\#
|
||||
if test -n "$PERL" && perl -v | grep 'version 5.' > /dev/null ; then
|
||||
if test -n "$AWK" ; then
|
||||
REBUILD=
|
||||
fi
|
||||
if test "x$enable_rebuilds" = "xyes" && \
|
||||
test -n "$PERL" && \
|
||||
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
|
||||
test -n "$AWK" ; then
|
||||
REBUILD=
|
||||
fi
|
||||
AC_SUBST(REBUILD)
|
||||
|
||||
AC_CHECK_FUNCS(lstat)
|
||||
|
||||
AC_MSG_CHECKING(whether make is GNU Make)
|
||||
STRIP_BEGIN=
|
||||
STRIP_END=
|
||||
if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
|
||||
STRIP_BEGIN='$(strip'
|
||||
STRIP_END=')'
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_SUBST(STRIP_BEGIN)
|
||||
AC_SUBST(STRIP_END)
|
||||
|
||||
# i18n stuff
|
||||
ALL_LINGUAS="cs de es fr hu it ja ko nl no pl pt ru sv"
|
||||
ALL_LINGUAS="ca cs da de el es et eu fi fr ga gl hr hu it ja ko nl no pl pt pt_BR ru sk sl sv tr uk wa zh_TW.Big5"
|
||||
AM_GTK_GNU_GETTEXT
|
||||
AC_CHECK_FUNC(gettext,
|
||||
,
|
||||
AC_CHECK_LIB(intl, gettext)
|
||||
)
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
|
||||
# AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
|
||||
# this is the directory where the *.{mo,gmo} files are installed
|
||||
gtklocaledir='${prefix}/${DATADIRNAME}/locale'
|
||||
@@ -189,11 +207,29 @@ AC_TRY_RUN([#include <math.h>
|
||||
AC_MSG_RESULT()
|
||||
CFLAGS=$gtk_save_CFLAGS
|
||||
AC_MSG_WARN(
|
||||
[No ANSI prototypes found in library. (-std1 didn't work.)])
|
||||
)
|
||||
[No ANSI prototypes found in library. (-std1 didn't work.)]),
|
||||
true
|
||||
),
|
||||
AC_MSG_RESULT(none needed)
|
||||
)
|
||||
LIBS=$gtk_save_LIBS
|
||||
|
||||
MATH_LIB=-lm
|
||||
GTK_LIBS_EXTRA=
|
||||
AC_MSG_CHECKING(for the BeOS)
|
||||
case $host in
|
||||
*-*-beos*)
|
||||
AC_MSG_RESULT(yes)
|
||||
GTK_LIBS_EXTRA="-L\$(top_builddir_full)/gdk/.libs -lgdk"
|
||||
MATH_LIB=
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(MATH_LIB)
|
||||
AC_SUBST(GTK_LIBS_EXTRA)
|
||||
|
||||
dnl NeXTStep cc seems to need this
|
||||
AC_MSG_CHECKING([for extra flags for POSIX compliance])
|
||||
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
||||
@@ -214,9 +250,9 @@ fi
|
||||
if test x$with_glib = x ; then
|
||||
# Look for separately installed glib
|
||||
|
||||
AM_PATH_GLIB(1.2.0,,
|
||||
AM_PATH_GLIB(1.3.0,,
|
||||
AC_MSG_ERROR([
|
||||
*** GLIB 1.2.0 or better is required. The latest version of GLIB
|
||||
*** GLIB 1.3.0 or better is required. The latest version of GLIB
|
||||
*** is always available from ftp://ftp.gtk.org/.]),
|
||||
gmodule gthread)
|
||||
|
||||
@@ -256,7 +292,7 @@ else
|
||||
esac
|
||||
|
||||
GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
|
||||
GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule.la"
|
||||
GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule/libgmodule.la"
|
||||
GLIB_DEPLIBS=
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
@@ -269,6 +305,10 @@ AC_SUBST(glib_thread_cflags)
|
||||
AC_SUBST(glib_thread_libs)
|
||||
AC_SUBST(GLIB_DEPLIBS)
|
||||
|
||||
AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
|
||||
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
|
||||
AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
|
||||
|
||||
# Find the X11 include and library directories
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
@@ -368,6 +408,9 @@ else
|
||||
AC_DEFINE(XINPUT_NONE)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XINPUT_GXI, test x$with_xinput = xgxi)
|
||||
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
|
||||
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
@@ -412,11 +455,12 @@ main ()
|
||||
return setlocale (LC_ALL, "${with_locale}") == NULL;
|
||||
}],
|
||||
need_x_locale=no,
|
||||
need_x_locale=yes)
|
||||
need_x_locale=yes,
|
||||
need_x_locale=no)
|
||||
AC_MSG_RESULT($need_x_locale)
|
||||
|
||||
if test $need_x_locale = yes; then
|
||||
GTK_LOCALE_CFLAGS="-DX_LOCALE"
|
||||
GTK_LOCALE_FLAGS="-DX_LOCALE"
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
||||
@@ -446,40 +490,29 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Duplicate `widechar' tests from `glib'.
|
||||
# Check for wchar.h
|
||||
if test x = y; then
|
||||
# will not be executed
|
||||
# hack so as not to update `acconfig.h'
|
||||
AC_CHECK_HEADERS(wchar.h wctype.h)
|
||||
AC_CHECK_FUNCS(broken_wctype)
|
||||
fi
|
||||
|
||||
# `widechar' tests for gdki18n.h
|
||||
AC_MSG_CHECKING(for wchar.h)
|
||||
AC_TRY_CPP([#include <wchar.h>], gtk_ok=yes, gtk_ok=no)
|
||||
if test $gtk_ok = yes; then
|
||||
ac_kludge=HAVE_WCHAR_H
|
||||
AC_DEFINE($ac_kludge)
|
||||
AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
|
||||
if test $gdk_wchar_h = yes; then
|
||||
AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
|
||||
fi
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
AC_MSG_RESULT($gdk_wchar_h)
|
||||
|
||||
# Check for wctype.h (for iswalnum)
|
||||
|
||||
AC_MSG_CHECKING(for wctype.h)
|
||||
AC_TRY_CPP([#include <wctype.h>], gtk_ok=yes, gtk_ok=no)
|
||||
if test $gtk_ok = yes; then
|
||||
ac_kludge=HAVE_WCTYPE_H
|
||||
AC_DEFINE($ac_kludge)
|
||||
AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
|
||||
if test $gdk_wctype_h = yes; then
|
||||
AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
|
||||
fi
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
AC_MSG_RESULT($gdk_wctype_h)
|
||||
|
||||
# in Solaris 2.5, `iswalnum' is in -lw
|
||||
GDK_WLIBS=
|
||||
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
|
||||
|
||||
# The following is necessary for Linux libc-5.4.38
|
||||
oLIBS="$LIBS"
|
||||
LIBS="$LIBS $GDK_WLIBS"
|
||||
# The following is necessary for Linux libc-5.4.38
|
||||
AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
|
||||
AC_TRY_LINK([#include <stdlib.h>],[
|
||||
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
|
||||
@@ -494,28 +527,108 @@ AC_TRY_LINK([#include <stdlib.h>],[
|
||||
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
|
||||
#endif
|
||||
iswalnum((wchar_t) 0);
|
||||
], gtk_ok=yes, gtk_ok=no)
|
||||
], gdk_working_wctype=yes, gdk_working_wctype=no)
|
||||
LIBS="$oLIBS"
|
||||
|
||||
if test $gtk_ok = no; then
|
||||
ac_kludge=HAVE_BROKEN_WCTYPE
|
||||
AC_DEFINE($ac_kludge)
|
||||
if test $gdk_working_wctype = no; then
|
||||
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
|
||||
GDK_WLIBS=
|
||||
fi
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
AC_MSG_RESULT($gdk_working_wctype)
|
||||
AC_SUBST(GDK_WLIBS)
|
||||
|
||||
AC_SUBST(GTK_DEBUG_FLAGS)
|
||||
AC_SUBST(GTK_XIM_FLAGS)
|
||||
AC_SUBST(GTK_LOCALE_FLAGS)
|
||||
|
||||
AC_OUTPUT_COMMANDS([
|
||||
|
||||
## Generate `gdk/gdkconfig.h' in two cases
|
||||
## 1. `config.status' is run either explicitly, or via configure.
|
||||
## Esp. not when it is run in `Makefile' to generate makefiles and
|
||||
## config.h
|
||||
## 2. CONFIG_OTHER is set explicitly
|
||||
##
|
||||
## Case 1 is difficult. We know that `automake' sets one of
|
||||
## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
|
||||
## only when AM_CONFIG_HEADER is set, however.
|
||||
|
||||
if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
|
||||
# Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
|
||||
CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
|
||||
fi
|
||||
case "$CONFIG_OTHER" in
|
||||
*gdk/gdkconfig.h*)
|
||||
echo creating gdk/gdkconfig.h
|
||||
outfile=gdkconfig.h-tmp
|
||||
cat > $outfile <<\_______EOF
|
||||
/* gdkconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify `configure.in'
|
||||
*/
|
||||
|
||||
#ifndef GDKCONFIG_H
|
||||
#define GDKCONFIG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
_______EOF
|
||||
|
||||
cat >>$outfile <<_______EOF
|
||||
$gdk_windowing
|
||||
$gdk_wc
|
||||
_______EOF
|
||||
|
||||
cat >>$outfile <<_______EOF
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* GDKCONFIG_H */
|
||||
_______EOF
|
||||
|
||||
|
||||
if cmp -s $outfile gdk/gdkconfig.h; then
|
||||
echo gdk/gdkconfig.h is unchanged
|
||||
rm -f $outfile
|
||||
else
|
||||
mv $outfile gdk/gdkconfig.h
|
||||
fi ;;
|
||||
esac
|
||||
],[
|
||||
# Currently we always use X11 on those systems where we run configure...
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_X11'
|
||||
if test x$gdk_wchar_h = xyes; then
|
||||
gdk_wc='
|
||||
#define GDK_HAVE_WCHAR_H 1'
|
||||
fi
|
||||
if test x$gdk_wctype_h = xyes; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_WCTYPE_H 1"
|
||||
fi
|
||||
if test x$gdk_working_wctype = xno; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_BROKEN_WCTYPE 1"
|
||||
fi
|
||||
|
||||
|
||||
])
|
||||
|
||||
AC_OUTPUT([
|
||||
gtk+.spec
|
||||
docs/gtk-config.1
|
||||
Makefile
|
||||
gtk-config
|
||||
po/Makefile.in
|
||||
docs/Makefile
|
||||
gdk/Makefile
|
||||
gdk/x11/Makefile
|
||||
gdk/win32/Makefile
|
||||
gtk/Makefile
|
||||
gtk/gtkfeatures.h
|
||||
gtk/gtkcompat.h
|
||||
], [chmod +x gtk-config])
|
||||
|
||||
462
demos/testanimation.c
Normal file
462
demos/testanimation.c
Normal file
@@ -0,0 +1,462 @@
|
||||
|
||||
/* testpixbuf -- test program for gdk-pixbuf code
|
||||
* Copyright (C) 1999 Mark Crichton, Larry Ewing
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU 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 <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "gdk-pixbuf.h"
|
||||
#include "gdk-pixbuf-io.h"
|
||||
#include "gdk-pixbuf-loader.h"
|
||||
|
||||
typedef struct {
|
||||
FILE *imagefile;
|
||||
GdkPixbufLoader *loader;
|
||||
GtkWidget **rgbwin;
|
||||
guchar *buf;
|
||||
guint timeout;
|
||||
guint readlen;
|
||||
|
||||
} ProgressFileStatus;
|
||||
|
||||
|
||||
#define DEFAULT_WIDTH 24
|
||||
#define DEFAULT_HEIGHT 24
|
||||
|
||||
static const unsigned char default_image[] = {
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xae, 0xb3, 0xb3, 0xc6, 0xc9, 0xcd, 0xd7, 0xd4, 0xdf,
|
||||
0xec, 0xde, 0xf3, 0xe7, 0xcb, 0xe9, 0xd9, 0xb5, 0xd3, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xb1, 0xb7, 0xa5,
|
||||
0xb0, 0xb8, 0xad, 0xb3, 0xb9, 0xb6, 0xc1, 0xc6, 0xc8, 0xd5, 0xd3, 0xdc,
|
||||
0xec, 0xde, 0xf3, 0xe5, 0xca, 0xe6, 0xe0, 0xbb, 0xd7, 0xe1, 0xad, 0xc2,
|
||||
0xe3, 0xac, 0xa3, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xca, 0xc1, 0xa4, 0xc5, 0xc7, 0xac,
|
||||
0xb7, 0xbe, 0xaf, 0xad, 0xb4, 0xaf, 0xbd, 0xc2, 0xc3, 0xd1, 0xd0, 0xd8,
|
||||
0xec, 0xde, 0xf3, 0xe5, 0xc7, 0xe4, 0xe0, 0xb6, 0xd1, 0xe7, 0xa9, 0xb4,
|
||||
0xed, 0xcd, 0xb6, 0xd6, 0xcf, 0xae, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xdf, 0xa7, 0x9f, 0xdd, 0xbf, 0xaa, 0xcf, 0xc5, 0xa9,
|
||||
0xc1, 0xc4, 0xac, 0xb2, 0xba, 0xaf, 0xb6, 0xbb, 0xbb, 0xcd, 0xce, 0xd4,
|
||||
0xec, 0xde, 0xf3, 0xe4, 0xc4, 0xe1, 0xe0, 0xaf, 0xc7, 0xea, 0xbc, 0xae,
|
||||
0xe1, 0xd6, 0xb6, 0xc7, 0xcc, 0xae, 0xa2, 0xab, 0x9a, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xe3, 0xab, 0xc0, 0xe6, 0xa3, 0xa7, 0xdf, 0xba, 0xa8,
|
||||
0xcf, 0xc5, 0xa9, 0xbd, 0xc2, 0xae, 0xad, 0xb4, 0xaf, 0xc6, 0xc9, 0xcd,
|
||||
0xec, 0xde, 0xf3, 0xe2, 0xbf, 0xdc, 0xe7, 0xa9, 0xb4, 0xe7, 0xd6, 0xb8,
|
||||
0xc7, 0xcc, 0xae, 0xac, 0xb6, 0xa6, 0x9d, 0xa8, 0x9f, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xd9, 0xaf, 0xcf, 0xe1, 0xb4, 0xd2, 0xe2, 0xb0, 0xcb, 0xe4, 0xa9, 0xbb,
|
||||
0xe2, 0xb2, 0xa6, 0xcf, 0xc5, 0xa9, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d,
|
||||
0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xed, 0xcd, 0xb6, 0xc7, 0xcc, 0xae,
|
||||
0xa6, 0xb1, 0xa3, 0x98, 0xa2, 0x9c, 0x8f, 0x97, 0x96, 0x7e, 0x84, 0x85,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe8, 0xc6, 0xe7, 0xe5, 0xc2, 0xe3, 0xe3, 0xbd, 0xdd, 0xe1, 0xb6, 0xd5,
|
||||
0xe2, 0xb0, 0xcb, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0x9d, 0xa8, 0x9f,
|
||||
0x8f, 0x97, 0x96, 0x8b, 0x90, 0x92, 0x97, 0x9e, 0xa2, 0xa0, 0xa7, 0xae,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe7, 0xd3, 0xed, 0xe8, 0xd1, 0xed, 0xe8, 0xce, 0xec, 0xe9, 0xcc, 0xeb,
|
||||
0xe8, 0xc6, 0xe7, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0x97, 0x9e, 0xa2,
|
||||
0xa7, 0xae, 0xb7, 0xb2, 0xb6, 0xc5, 0xba, 0xbc, 0xce, 0xbf, 0xbe, 0xd3,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0,
|
||||
0xe9, 0xdf, 0xf0, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0xe1, 0xd2, 0xf7,
|
||||
0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xca, 0xc7, 0xd2, 0xc5, 0xc4, 0xcd, 0xbf, 0xbf, 0xc7, 0xb8, 0xb9, 0xc0,
|
||||
0xae, 0xaf, 0xb6, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0xd5, 0xa8, 0xe1,
|
||||
0xd8, 0xb2, 0xe9, 0xd9, 0xb8, 0xed, 0xdb, 0xbd, 0xf0, 0xdc, 0xbf, 0xf1,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xa4, 0xa6, 0xac, 0xa8, 0xaa, 0xaf, 0xa0, 0xa6, 0xa8, 0x98, 0x9e, 0x9c,
|
||||
0xa1, 0xa8, 0x9e, 0xb1, 0xb6, 0xa1, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d,
|
||||
0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xc0, 0x8c, 0xad, 0xcc, 0x90, 0xb5,
|
||||
0xd3, 0x94, 0xca, 0xd6, 0xa2, 0xdb, 0xd5, 0xa8, 0xe1, 0xcf, 0xa7, 0xdf,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0x98, 0x9f, 0x9b, 0xa1, 0xa8, 0x9e, 0xac, 0xb3, 0xa0,
|
||||
0xb9, 0xb9, 0xa4, 0xd0, 0xb8, 0xa8, 0xc5, 0xb5, 0xb8, 0xb6, 0xbb, 0xad,
|
||||
0xe3, 0xd7, 0xb5, 0xdd, 0xb4, 0xa9, 0xcb, 0x89, 0xac, 0xc0, 0x8c, 0xad,
|
||||
0xc8, 0x91, 0xb5, 0xd1, 0x8d, 0xb7, 0xd3, 0x94, 0xca, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xa1, 0xa7, 0x98, 0xb1, 0xb6, 0xa1, 0xbd, 0xb9, 0xa5,
|
||||
0xd0, 0xb8, 0xa8, 0xca, 0xb5, 0xb7, 0xb8, 0xb1, 0xb1, 0xc2, 0xc8, 0xb2,
|
||||
0xe3, 0xd7, 0xb5, 0xe1, 0xbf, 0xaf, 0xdb, 0x92, 0x9a, 0xbe, 0x82, 0xa6,
|
||||
0xc0, 0x8c, 0xad, 0xc8, 0x91, 0xb4, 0xc7, 0x8b, 0xb0, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xbc, 0xb6, 0xa1, 0xd0, 0xb8, 0xa8,
|
||||
0xcd, 0xb6, 0xb7, 0xc0, 0xb4, 0xb5, 0xb1, 0xb1, 0xaa, 0xca, 0xd1, 0xb4,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xc1, 0xb0, 0xdb, 0xa8, 0xa3, 0xd2, 0x8a, 0xa9,
|
||||
0xb7, 0x7e, 0xa2, 0xbd, 0x89, 0xa9, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xc9, 0xaf, 0xaf,
|
||||
0xc5, 0xb5, 0xb8, 0xb8, 0xb1, 0xb1, 0xb6, 0xbb, 0xad, 0xd0, 0xd6, 0xb5,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xaf, 0xdd, 0xb4, 0xa9, 0xdb, 0x92, 0x9a,
|
||||
0xc6, 0x84, 0xa7, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xac, 0xaa, 0xa6, 0xbd, 0xc3, 0xb0, 0xd2, 0xd7, 0xb5,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xae, 0xdb, 0xb6, 0xa8, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff
|
||||
};
|
||||
|
||||
static void
|
||||
quit_func (GtkWidget *widget, gpointer dummy)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
static void
|
||||
expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf");
|
||||
|
||||
if (!pixbuf->art_pixbuf) {
|
||||
g_warning ("art_pixbuf is NULL in expose_func!!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (pixbuf->art_pixbuf->has_alpha) {
|
||||
gdk_draw_rgb_32_image (drawing_area->window,
|
||||
drawing_area->style->black_gc,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width,
|
||||
event->area.height,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
pixbuf->art_pixbuf->pixels
|
||||
+ (event->area.y * pixbuf->art_pixbuf->rowstride)
|
||||
+ (event->area.x * pixbuf->art_pixbuf->n_channels),
|
||||
pixbuf->art_pixbuf->rowstride);
|
||||
} else {
|
||||
gdk_draw_rgb_image (drawing_area->window,
|
||||
drawing_area->style->white_gc,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width,
|
||||
event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
pixbuf->art_pixbuf->pixels
|
||||
+ (event->area.y * pixbuf->art_pixbuf->rowstride)
|
||||
+ (event->area.x * pixbuf->art_pixbuf->n_channels),
|
||||
pixbuf->art_pixbuf->rowstride);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf");
|
||||
|
||||
g_print("X:%d Y:%d\n", event->width, event->height);
|
||||
|
||||
#if 0
|
||||
if (((event->width) != (pixbuf->art_pixbuf->width)) ||
|
||||
((event->height) != (pixbuf->art_pixbuf->height)))
|
||||
gdk_pixbuf_scale(pixbuf, event->width, event->height);
|
||||
#endif
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
new_testrgb_window (GdkPixbuf *pixbuf, gchar *title)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *temp_box;
|
||||
GtkWidget *button;
|
||||
GtkWidget *drawing_area;
|
||||
gint w, h;
|
||||
|
||||
w = pixbuf->art_pixbuf->width;
|
||||
h = pixbuf->art_pixbuf->height;
|
||||
|
||||
window = gtk_widget_new (gtk_window_get_type (),
|
||||
"GtkObject::user_data", NULL,
|
||||
"GtkWindow::type", GTK_WINDOW_TOPLEVEL,
|
||||
"GtkWindow::title", "testrgb",
|
||||
"GtkWindow::allow_shrink", TRUE,
|
||||
NULL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
(GtkSignalFunc) quit_func, NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
|
||||
if (title)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new (title),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
|
||||
temp_box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_drawing_area_size (GTK_DRAWING_AREA(drawing_area), w, h);
|
||||
gtk_box_pack_start (GTK_BOX (temp_box), drawing_area, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), temp_box, FALSE, FALSE, 0);
|
||||
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(drawing_area), "expose_event",
|
||||
GTK_SIGNAL_FUNC(expose_func), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(drawing_area), "configure_event",
|
||||
GTK_SIGNAL_FUNC (config_func), NULL);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(drawing_area), "pixbuf", pixbuf);
|
||||
|
||||
gtk_widget_show (drawing_area);
|
||||
|
||||
button = gtk_button_new_with_label ("Quit");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) gtk_widget_destroy,
|
||||
GTK_OBJECT (window));
|
||||
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_widget_show_all (vbox);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
static gint
|
||||
update_timeout(gpointer data)
|
||||
{
|
||||
ProgressFileStatus *status = data;
|
||||
gboolean done;
|
||||
|
||||
done = TRUE;
|
||||
if (!feof(status->imagefile)) {
|
||||
gint nbytes;
|
||||
|
||||
nbytes = fread(status->buf, 1, status->readlen,
|
||||
status->imagefile);
|
||||
|
||||
done = !gdk_pixbuf_loader_write (GDK_PIXBUF_LOADER (status->loader), status->buf, nbytes);
|
||||
|
||||
}
|
||||
|
||||
if (done) {
|
||||
gtk_widget_queue_draw(*status->rgbwin);
|
||||
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader));
|
||||
gtk_object_destroy (GTK_OBJECT(status->loader));
|
||||
fclose (status->imagefile);
|
||||
g_free (status->buf);
|
||||
}
|
||||
|
||||
return !done;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
progressive_prepared_callback(GdkPixbufLoader* loader, gpointer data)
|
||||
{
|
||||
GtkWidget** retloc = data;
|
||||
GdkPixbuf* pixbuf;
|
||||
|
||||
pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
|
||||
g_assert(pixbuf != NULL);
|
||||
|
||||
gdk_pixbuf_ref(pixbuf); /* for the RGB window */
|
||||
|
||||
*retloc = new_testrgb_window(pixbuf, "Progressive");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
progressive_updated_callback(GdkPixbufLoader* loader, guint x, guint y, guint width, guint height, gpointer data)
|
||||
{
|
||||
GtkWidget** window_loc = data;
|
||||
|
||||
/* g_print ("progressive_updated_callback:\n\t%d\t%d\t%d\t%d\n", x, y, width, height); */
|
||||
|
||||
if (*window_loc != NULL)
|
||||
gtk_widget_queue_draw_area(*window_loc,
|
||||
x, y, width, height);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int readlen = 4096;
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
int found_valid = FALSE;
|
||||
|
||||
GdkPixbufAnimation *animation;
|
||||
GdkPixbufLoader *pixbuf_loader;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
gdk_rgb_set_verbose (TRUE);
|
||||
|
||||
gdk_rgb_init ();
|
||||
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
|
||||
gtk_widget_set_default_visual (gdk_rgb_get_visual ());
|
||||
|
||||
{
|
||||
char *tbf_readlen = getenv("TBF_READLEN");
|
||||
if(tbf_readlen) readlen = atoi(tbf_readlen);
|
||||
}
|
||||
|
||||
{
|
||||
char *tbf_bps = getenv("TBF_KBPS");
|
||||
guint bps;
|
||||
|
||||
if (tbf_bps) {
|
||||
bps = atoi(tbf_bps);
|
||||
g_print ("Simulating %d kBytes/sec\n", bps);
|
||||
readlen = (bps*1024)/10;
|
||||
}
|
||||
}
|
||||
|
||||
i = 1;
|
||||
if (argc == 1) {
|
||||
g_print ("USAGE: testanimation FILE1 ...\n");
|
||||
return 0;
|
||||
} else {
|
||||
for (i = 1; i < argc; i++) {
|
||||
|
||||
animation = gdk_pixbuf_animation_new_from_file (argv[i]);
|
||||
|
||||
if (animation) {
|
||||
GList *listptr;
|
||||
for (listptr = animation->frames; listptr; listptr = listptr->next){
|
||||
g_print ("in a frame\n");
|
||||
new_testrgb_window (((GdkPixbufFrame *)listptr->data)->pixbuf, "File");
|
||||
}
|
||||
found_valid = TRUE;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
{
|
||||
GtkWidget* rgb_window = NULL;
|
||||
ProgressFileStatus status;
|
||||
|
||||
pixbuf_loader = gdk_pixbuf_loader_new ();
|
||||
status.loader = pixbuf_loader;
|
||||
|
||||
status.rgbwin = &rgb_window;
|
||||
|
||||
status.buf = g_malloc (readlen);
|
||||
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
|
||||
"area_prepared",
|
||||
GTK_SIGNAL_FUNC(progressive_prepared_callback),
|
||||
&rgb_window);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
|
||||
"area_updated",
|
||||
GTK_SIGNAL_FUNC(progressive_updated_callback),
|
||||
&rgb_window);
|
||||
|
||||
|
||||
status.imagefile = fopen (argv[1], "r");
|
||||
g_assert (status.imagefile != NULL);
|
||||
|
||||
status.readlen = readlen;
|
||||
|
||||
status.timeout = gtk_timeout_add(100, update_timeout, &status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (found_valid)
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
107
demos/testpixbuf-drawable.c
Normal file
107
demos/testpixbuf-drawable.c
Normal file
@@ -0,0 +1,107 @@
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include "gdk-pixbuf.h"
|
||||
|
||||
void close_app(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
void expose_cb(GtkWidget *drawing_area, GdkEventExpose *evt, gpointer
|
||||
data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *) gtk_object_get_data(GTK_OBJECT(drawing_area),
|
||||
"pixbuf");
|
||||
|
||||
if(pixbuf->art_pixbuf->has_alpha)
|
||||
{
|
||||
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,
|
||||
pixbuf->art_pixbuf->pixels +
|
||||
(evt->area.y * pixbuf->art_pixbuf->rowstride) +
|
||||
(evt->area.x * pixbuf->art_pixbuf->n_channels),
|
||||
pixbuf->art_pixbuf->rowstride);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_draw_rgb_image(drawing_area->window,
|
||||
drawing_area->style->white_gc,
|
||||
evt->area.x, evt->area.y,
|
||||
evt->area.width,
|
||||
evt->area.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
pixbuf->art_pixbuf->pixels +
|
||||
(evt->area.y * pixbuf->art_pixbuf->rowstride) +
|
||||
(evt->area.x * pixbuf->art_pixbuf->n_channels),
|
||||
pixbuf->art_pixbuf->rowstride);
|
||||
}
|
||||
}
|
||||
|
||||
void configure_cb(GtkWidget *drawing_area, GdkEventConfigure *evt,
|
||||
gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *) gtk_object_get_data(GTK_OBJECT(drawing_area),
|
||||
"pixbuf");
|
||||
|
||||
g_print("X:%d Y:%d\n", evt->width, evt->height);
|
||||
#if 0
|
||||
if(((evt->width) != (pixbuf->art_pixbuf->width)) ||
|
||||
((evt->height) != (pixbuf->art_pixbuf->height)))
|
||||
gdk_pixbuf_scale(pixbuf, evt->width, evt->height);
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
GdkWindow *root;
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *drawing_area;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
gdk_rgb_set_verbose(TRUE);
|
||||
gdk_rgb_init();
|
||||
|
||||
gtk_widget_set_default_colormap(gdk_rgb_get_cmap());
|
||||
gtk_widget_set_default_visual(gdk_rgb_get_visual());
|
||||
|
||||
root = gdk_window_foreign_new(GDK_ROOT_WINDOW());
|
||||
pixbuf = gdk_pixbuf_get_from_drawable(NULL, root, NULL,
|
||||
0, 0, 0, 0, 150, 160);
|
||||
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_signal_connect(GTK_OBJECT(window), "delete_event",
|
||||
GTK_SIGNAL_FUNC(close_app), NULL);
|
||||
gtk_signal_connect(GTK_OBJECT(window), "destroy",
|
||||
|
||||
GTK_SIGNAL_FUNC(close_app), NULL);
|
||||
|
||||
vbox = gtk_vbox_new(FALSE, 0);
|
||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||
|
||||
drawing_area = gtk_drawing_area_new();
|
||||
gtk_drawing_area_size(GTK_DRAWING_AREA(drawing_area),
|
||||
pixbuf->art_pixbuf->width,
|
||||
pixbuf->art_pixbuf->height);
|
||||
gtk_signal_connect(GTK_OBJECT(drawing_area), "expose_event",
|
||||
GTK_SIGNAL_FUNC(expose_cb), NULL);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(drawing_area), "configure_event",
|
||||
GTK_SIGNAL_FUNC(configure_cb), NULL);
|
||||
gtk_object_set_data(GTK_OBJECT(drawing_area), "pixbuf", pixbuf);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), drawing_area, TRUE, TRUE, 0);
|
||||
|
||||
gtk_widget_show_all(window);
|
||||
gtk_main();
|
||||
return 0;
|
||||
}
|
||||
156
demos/testpixbuf-scale.c
Normal file
156
demos/testpixbuf-scale.c
Normal file
@@ -0,0 +1,156 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include "gdk-pixbuf.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
ArtFilterLevel filter_level = ART_FILTER_BILINEAR;
|
||||
int overall_alpha = 255;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *darea;
|
||||
|
||||
void
|
||||
set_filter_level (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
filter_level = GPOINTER_TO_UINT (data);
|
||||
gtk_widget_queue_draw (darea);
|
||||
}
|
||||
|
||||
void
|
||||
overall_changed_cb (GtkAdjustment *adjustment, gpointer data)
|
||||
{
|
||||
if (adjustment->value != overall_alpha)
|
||||
{
|
||||
overall_alpha = adjustment->value;
|
||||
gtk_widget_queue_draw (darea);
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *dest;
|
||||
|
||||
gdk_window_set_back_pixmap (widget->window, NULL, FALSE);
|
||||
|
||||
dest = gdk_pixbuf_new (ART_PIX_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 / pixbuf->art_pixbuf->width,
|
||||
(double) widget->allocation.height / pixbuf->art_pixbuf->height,
|
||||
filter_level, overall_alpha,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
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;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window, *vbox;
|
||||
GtkWidget *menuitem, *optionmenu, *menu;
|
||||
GtkWidget *alignment;
|
||||
GtkWidget *hbox, *label, *hscale;
|
||||
GtkAdjustment *adjustment;
|
||||
GtkRequisition scratch_requisition;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gdk_rgb_init ();
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf (stderr, "Usage: testpixbuf-scale FILE\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file (argv[1]);
|
||||
if (!pixbuf) {
|
||||
fprintf (stderr, "Cannot load %s\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("NEAREST");
|
||||
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
|
||||
GTK_SIGNAL_FUNC (set_filter_level),
|
||||
GUINT_TO_POINTER (ART_FILTER_NEAREST));
|
||||
gtk_widget_show (menuitem);
|
||||
gtk_container_add (GTK_CONTAINER (menu), menuitem);
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("BILINEAR");
|
||||
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
|
||||
GTK_SIGNAL_FUNC (set_filter_level),
|
||||
GUINT_TO_POINTER (ART_FILTER_BILINEAR));
|
||||
gtk_widget_show (menuitem);
|
||||
gtk_container_add (GTK_CONTAINER (menu), menuitem);
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("TILES");
|
||||
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
|
||||
GTK_SIGNAL_FUNC (set_filter_level),
|
||||
GUINT_TO_POINTER (ART_FILTER_TILES));
|
||||
gtk_container_add (GTK_CONTAINER (menu), menuitem);
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("HYPER");
|
||||
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
|
||||
GTK_SIGNAL_FUNC (set_filter_level),
|
||||
GUINT_TO_POINTER (ART_FILTER_HYPER));
|
||||
gtk_container_add (GTK_CONTAINER (menu), menuitem);
|
||||
|
||||
optionmenu = gtk_option_menu_new ();
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
|
||||
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), 1);
|
||||
|
||||
alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Overall Alpha:");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
|
||||
adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0));
|
||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||
GTK_SIGNAL_FUNC (overall_changed_cb), NULL);
|
||||
|
||||
hscale = gtk_hscale_new (adjustment);
|
||||
gtk_scale_set_digits (GTK_SCALE (hscale), 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), hscale, TRUE, TRUE, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (alignment), optionmenu);
|
||||
gtk_widget_show_all (vbox);
|
||||
|
||||
/* Compute the size without the drawing area, so we know how big to make the default size */
|
||||
gtk_widget_size_request (vbox, &scratch_requisition);
|
||||
|
||||
darea = gtk_drawing_area_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), darea, TRUE, TRUE, 0);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (darea), "expose_event",
|
||||
GTK_SIGNAL_FUNC (expose_cb), NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
pixbuf->art_pixbuf->width,
|
||||
scratch_requisition.height + pixbuf->art_pixbuf->height);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
594
demos/testpixbuf.c
Normal file
594
demos/testpixbuf.c
Normal file
@@ -0,0 +1,594 @@
|
||||
|
||||
/* testpixbuf -- test program for gdk-pixbuf code
|
||||
* Copyright (C) 1999 Mark Crichton, Larry Ewing
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU 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 <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "gdk-pixbuf.h"
|
||||
#include "gdk-pixbuf-io.h"
|
||||
#include "gdk-pixbuf-loader.h"
|
||||
|
||||
typedef struct {
|
||||
FILE *imagefile;
|
||||
GdkPixbufLoader *loader;
|
||||
GtkWidget **rgbwin;
|
||||
guchar *buf;
|
||||
guint timeout;
|
||||
guint readlen;
|
||||
|
||||
} ProgressFileStatus;
|
||||
|
||||
|
||||
#define DEFAULT_WIDTH 24
|
||||
#define DEFAULT_HEIGHT 24
|
||||
|
||||
static const unsigned char default_image[] = {
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xae, 0xb3, 0xb3, 0xc6, 0xc9, 0xcd, 0xd7, 0xd4, 0xdf,
|
||||
0xec, 0xde, 0xf3, 0xe7, 0xcb, 0xe9, 0xd9, 0xb5, 0xd3, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xb1, 0xb7, 0xa5,
|
||||
0xb0, 0xb8, 0xad, 0xb3, 0xb9, 0xb6, 0xc1, 0xc6, 0xc8, 0xd5, 0xd3, 0xdc,
|
||||
0xec, 0xde, 0xf3, 0xe5, 0xca, 0xe6, 0xe0, 0xbb, 0xd7, 0xe1, 0xad, 0xc2,
|
||||
0xe3, 0xac, 0xa3, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xca, 0xc1, 0xa4, 0xc5, 0xc7, 0xac,
|
||||
0xb7, 0xbe, 0xaf, 0xad, 0xb4, 0xaf, 0xbd, 0xc2, 0xc3, 0xd1, 0xd0, 0xd8,
|
||||
0xec, 0xde, 0xf3, 0xe5, 0xc7, 0xe4, 0xe0, 0xb6, 0xd1, 0xe7, 0xa9, 0xb4,
|
||||
0xed, 0xcd, 0xb6, 0xd6, 0xcf, 0xae, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xdf, 0xa7, 0x9f, 0xdd, 0xbf, 0xaa, 0xcf, 0xc5, 0xa9,
|
||||
0xc1, 0xc4, 0xac, 0xb2, 0xba, 0xaf, 0xb6, 0xbb, 0xbb, 0xcd, 0xce, 0xd4,
|
||||
0xec, 0xde, 0xf3, 0xe4, 0xc4, 0xe1, 0xe0, 0xaf, 0xc7, 0xea, 0xbc, 0xae,
|
||||
0xe1, 0xd6, 0xb6, 0xc7, 0xcc, 0xae, 0xa2, 0xab, 0x9a, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xe3, 0xab, 0xc0, 0xe6, 0xa3, 0xa7, 0xdf, 0xba, 0xa8,
|
||||
0xcf, 0xc5, 0xa9, 0xbd, 0xc2, 0xae, 0xad, 0xb4, 0xaf, 0xc6, 0xc9, 0xcd,
|
||||
0xec, 0xde, 0xf3, 0xe2, 0xbf, 0xdc, 0xe7, 0xa9, 0xb4, 0xe7, 0xd6, 0xb8,
|
||||
0xc7, 0xcc, 0xae, 0xac, 0xb6, 0xa6, 0x9d, 0xa8, 0x9f, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xd9, 0xaf, 0xcf, 0xe1, 0xb4, 0xd2, 0xe2, 0xb0, 0xcb, 0xe4, 0xa9, 0xbb,
|
||||
0xe2, 0xb2, 0xa6, 0xcf, 0xc5, 0xa9, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d,
|
||||
0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xed, 0xcd, 0xb6, 0xc7, 0xcc, 0xae,
|
||||
0xa6, 0xb1, 0xa3, 0x98, 0xa2, 0x9c, 0x8f, 0x97, 0x96, 0x7e, 0x84, 0x85,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe8, 0xc6, 0xe7, 0xe5, 0xc2, 0xe3, 0xe3, 0xbd, 0xdd, 0xe1, 0xb6, 0xd5,
|
||||
0xe2, 0xb0, 0xcb, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0x9d, 0xa8, 0x9f,
|
||||
0x8f, 0x97, 0x96, 0x8b, 0x90, 0x92, 0x97, 0x9e, 0xa2, 0xa0, 0xa7, 0xae,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe7, 0xd3, 0xed, 0xe8, 0xd1, 0xed, 0xe8, 0xce, 0xec, 0xe9, 0xcc, 0xeb,
|
||||
0xe8, 0xc6, 0xe7, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0x97, 0x9e, 0xa2,
|
||||
0xa7, 0xae, 0xb7, 0xb2, 0xb6, 0xc5, 0xba, 0xbc, 0xce, 0xbf, 0xbe, 0xd3,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0,
|
||||
0xe9, 0xdf, 0xf0, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0xe1, 0xd2, 0xf7,
|
||||
0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xca, 0xc7, 0xd2, 0xc5, 0xc4, 0xcd, 0xbf, 0xbf, 0xc7, 0xb8, 0xb9, 0xc0,
|
||||
0xae, 0xaf, 0xb6, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0xd5, 0xa8, 0xe1,
|
||||
0xd8, 0xb2, 0xe9, 0xd9, 0xb8, 0xed, 0xdb, 0xbd, 0xf0, 0xdc, 0xbf, 0xf1,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0xa4, 0xa6, 0xac, 0xa8, 0xaa, 0xaf, 0xa0, 0xa6, 0xa8, 0x98, 0x9e, 0x9c,
|
||||
0xa1, 0xa8, 0x9e, 0xb1, 0xb6, 0xa1, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d,
|
||||
0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xc0, 0x8c, 0xad, 0xcc, 0x90, 0xb5,
|
||||
0xd3, 0x94, 0xca, 0xd6, 0xa2, 0xdb, 0xd5, 0xa8, 0xe1, 0xcf, 0xa7, 0xdf,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0x98, 0x9f, 0x9b, 0xa1, 0xa8, 0x9e, 0xac, 0xb3, 0xa0,
|
||||
0xb9, 0xb9, 0xa4, 0xd0, 0xb8, 0xa8, 0xc5, 0xb5, 0xb8, 0xb6, 0xbb, 0xad,
|
||||
0xe3, 0xd7, 0xb5, 0xdd, 0xb4, 0xa9, 0xcb, 0x89, 0xac, 0xc0, 0x8c, 0xad,
|
||||
0xc8, 0x91, 0xb5, 0xd1, 0x8d, 0xb7, 0xd3, 0x94, 0xca, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0x00, 0x00, 0x00, 0xa1, 0xa7, 0x98, 0xb1, 0xb6, 0xa1, 0xbd, 0xb9, 0xa5,
|
||||
0xd0, 0xb8, 0xa8, 0xca, 0xb5, 0xb7, 0xb8, 0xb1, 0xb1, 0xc2, 0xc8, 0xb2,
|
||||
0xe3, 0xd7, 0xb5, 0xe1, 0xbf, 0xaf, 0xdb, 0x92, 0x9a, 0xbe, 0x82, 0xa6,
|
||||
0xc0, 0x8c, 0xad, 0xc8, 0x91, 0xb4, 0xc7, 0x8b, 0xb0, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xbc, 0xb6, 0xa1, 0xd0, 0xb8, 0xa8,
|
||||
0xcd, 0xb6, 0xb7, 0xc0, 0xb4, 0xb5, 0xb1, 0xb1, 0xaa, 0xca, 0xd1, 0xb4,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xc1, 0xb0, 0xdb, 0xa8, 0xa3, 0xd2, 0x8a, 0xa9,
|
||||
0xb7, 0x7e, 0xa2, 0xbd, 0x89, 0xa9, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xc9, 0xaf, 0xaf,
|
||||
0xc5, 0xb5, 0xb8, 0xb8, 0xb1, 0xb1, 0xb6, 0xbb, 0xad, 0xd0, 0xd6, 0xb5,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xaf, 0xdd, 0xb4, 0xa9, 0xdb, 0x92, 0x9a,
|
||||
0xc6, 0x84, 0xa7, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xac, 0xaa, 0xa6, 0xbd, 0xc3, 0xb0, 0xd2, 0xd7, 0xb5,
|
||||
0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xae, 0xdb, 0xb6, 0xa8, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff
|
||||
};
|
||||
|
||||
|
||||
static const char * book_open_xpm[] = {
|
||||
"16 16 4 1",
|
||||
" c None s None",
|
||||
". c black",
|
||||
"X c #808080",
|
||||
"o c white",
|
||||
" ",
|
||||
" .. ",
|
||||
" .Xo. ... ",
|
||||
" .Xoo. ..oo. ",
|
||||
" .Xooo.Xooo... ",
|
||||
" .Xooo.oooo.X. ",
|
||||
" .Xooo.Xooo.X. ",
|
||||
" .Xooo.oooo.X. ",
|
||||
" .Xooo.Xooo.X. ",
|
||||
" .Xooo.oooo.X. ",
|
||||
" .Xoo.Xoo..X. ",
|
||||
" .Xo.o..ooX. ",
|
||||
" .X..XXXXX. ",
|
||||
" ..X....... ",
|
||||
" .. ",
|
||||
" "};
|
||||
|
||||
static const char * book_closed_xpm[] = {
|
||||
"16 16 6 1",
|
||||
" c None s None",
|
||||
". c black",
|
||||
"X c red",
|
||||
"o c yellow",
|
||||
"O c #808080",
|
||||
"# c white",
|
||||
" ",
|
||||
" .. ",
|
||||
" ..XX. ",
|
||||
" ..XXXXX. ",
|
||||
" ..XXXXXXXX. ",
|
||||
".ooXXXXXXXXX. ",
|
||||
"..ooXXXXXXXXX. ",
|
||||
".X.ooXXXXXXXXX. ",
|
||||
".XX.ooXXXXXX.. ",
|
||||
" .XX.ooXXX..#O ",
|
||||
" .XX.oo..##OO. ",
|
||||
" .XX..##OO.. ",
|
||||
" .X.#OO.. ",
|
||||
" ..O.. ",
|
||||
" .. ",
|
||||
" "};
|
||||
|
||||
static const char * mini_page_xpm[] = {
|
||||
"16 16 4 1",
|
||||
" c None s None",
|
||||
". c black",
|
||||
"X c white",
|
||||
"o c #808080",
|
||||
" ",
|
||||
" ....... ",
|
||||
" .XXXXX.. ",
|
||||
" .XoooX.X. ",
|
||||
" .XXXXX.... ",
|
||||
" .XooooXoo.o ",
|
||||
" .XXXXXXXX.o ",
|
||||
" .XooooooX.o ",
|
||||
" .XXXXXXXX.o ",
|
||||
" .XooooooX.o ",
|
||||
" .XXXXXXXX.o ",
|
||||
" .XooooooX.o ",
|
||||
" .XXXXXXXX.o ",
|
||||
" ..........o ",
|
||||
" oooooooooo ",
|
||||
" "};
|
||||
|
||||
static const char * gtk_mini_xpm[] = {
|
||||
"15 20 17 1",
|
||||
" c None",
|
||||
". c #14121F",
|
||||
"+ c #278828",
|
||||
"@ c #9B3334",
|
||||
"# c #284C72",
|
||||
"$ c #24692A",
|
||||
"% c #69282E",
|
||||
"& c #37C539",
|
||||
"* c #1D2F4D",
|
||||
"= c #6D7076",
|
||||
"- c #7D8482",
|
||||
"; c #E24A49",
|
||||
"> c #515357",
|
||||
", c #9B9C9B",
|
||||
"' c #2FA232",
|
||||
") c #3CE23D",
|
||||
"! c #3B6CCB",
|
||||
" ",
|
||||
" ***> ",
|
||||
" >.*!!!* ",
|
||||
" ***....#*= ",
|
||||
" *!*.!!!**!!# ",
|
||||
" .!!#*!#*!!!!# ",
|
||||
" @%#!.##.*!!$& ",
|
||||
" @;%*!*.#!#')) ",
|
||||
" @;;@%!!*$&)'' ",
|
||||
" @%.%@%$'&)$+' ",
|
||||
" @;...@$'*'*)+ ",
|
||||
" @;%..@$+*.')$ ",
|
||||
" @;%%;;$+..$)# ",
|
||||
" @;%%;@$$$'.$# ",
|
||||
" %;@@;;$$+))&* ",
|
||||
" %;;;@+$&)&* ",
|
||||
" %;;@'))+> ",
|
||||
" %;@'&# ",
|
||||
" >%$$ ",
|
||||
" >= "};
|
||||
|
||||
const gchar ** xpms[] = {
|
||||
book_open_xpm,
|
||||
book_closed_xpm,
|
||||
mini_page_xpm,
|
||||
gtk_mini_xpm,
|
||||
NULL
|
||||
};
|
||||
|
||||
static void
|
||||
quit_func (GtkWidget *widget, gpointer dummy)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
static void
|
||||
expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf");
|
||||
|
||||
if (!pixbuf->art_pixbuf) {
|
||||
g_warning ("art_pixbuf is NULL in expose_func!!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (pixbuf->art_pixbuf->has_alpha) {
|
||||
gdk_draw_rgb_32_image (drawing_area->window,
|
||||
drawing_area->style->black_gc,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width,
|
||||
event->area.height,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
pixbuf->art_pixbuf->pixels
|
||||
+ (event->area.y * pixbuf->art_pixbuf->rowstride)
|
||||
+ (event->area.x * pixbuf->art_pixbuf->n_channels),
|
||||
pixbuf->art_pixbuf->rowstride);
|
||||
} else {
|
||||
gdk_draw_rgb_image (drawing_area->window,
|
||||
drawing_area->style->white_gc,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width,
|
||||
event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
pixbuf->art_pixbuf->pixels
|
||||
+ (event->area.y * pixbuf->art_pixbuf->rowstride)
|
||||
+ (event->area.x * pixbuf->art_pixbuf->n_channels),
|
||||
pixbuf->art_pixbuf->rowstride);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf");
|
||||
|
||||
g_print("X:%d Y:%d\n", event->width, event->height);
|
||||
|
||||
#if 0
|
||||
if (((event->width) != (pixbuf->art_pixbuf->width)) ||
|
||||
((event->height) != (pixbuf->art_pixbuf->height)))
|
||||
gdk_pixbuf_scale(pixbuf, event->width, event->height);
|
||||
#endif
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
new_testrgb_window (GdkPixbuf *pixbuf, gchar *title)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *temp_box;
|
||||
GtkWidget *button;
|
||||
GtkWidget *drawing_area;
|
||||
gint w, h;
|
||||
|
||||
w = pixbuf->art_pixbuf->width;
|
||||
h = pixbuf->art_pixbuf->height;
|
||||
|
||||
window = gtk_widget_new (gtk_window_get_type (),
|
||||
"GtkObject::user_data", NULL,
|
||||
"GtkWindow::type", GTK_WINDOW_TOPLEVEL,
|
||||
"GtkWindow::title", "testrgb",
|
||||
"GtkWindow::allow_shrink", TRUE,
|
||||
NULL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
(GtkSignalFunc) quit_func, NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
|
||||
if (title)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new (title),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
|
||||
temp_box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_drawing_area_size (GTK_DRAWING_AREA(drawing_area), w, h);
|
||||
gtk_box_pack_start (GTK_BOX (temp_box), drawing_area, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), temp_box, FALSE, FALSE, 0);
|
||||
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(drawing_area), "expose_event",
|
||||
GTK_SIGNAL_FUNC(expose_func), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(drawing_area), "configure_event",
|
||||
GTK_SIGNAL_FUNC (config_func), NULL);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(drawing_area), "pixbuf", pixbuf);
|
||||
|
||||
gtk_widget_show (drawing_area);
|
||||
|
||||
button = gtk_button_new_with_label ("Quit");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) gtk_widget_destroy,
|
||||
GTK_OBJECT (window));
|
||||
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_widget_show_all (vbox);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
static gint
|
||||
update_timeout(gpointer data)
|
||||
{
|
||||
ProgressFileStatus *status = data;
|
||||
gboolean done;
|
||||
|
||||
done = TRUE;
|
||||
if (!feof(status->imagefile)) {
|
||||
gint nbytes;
|
||||
|
||||
nbytes = fread(status->buf, 1, status->readlen,
|
||||
status->imagefile);
|
||||
|
||||
done = !gdk_pixbuf_loader_write (GDK_PIXBUF_LOADER (status->loader), status->buf, nbytes);
|
||||
|
||||
}
|
||||
|
||||
if (done) {
|
||||
gtk_widget_queue_draw(*status->rgbwin);
|
||||
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader));
|
||||
gtk_object_destroy (GTK_OBJECT(status->loader));
|
||||
fclose (status->imagefile);
|
||||
g_free (status->buf);
|
||||
}
|
||||
|
||||
return !done;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
progressive_prepared_callback(GdkPixbufLoader* loader, gpointer data)
|
||||
{
|
||||
GtkWidget** retloc = data;
|
||||
GdkPixbuf* pixbuf;
|
||||
|
||||
pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
|
||||
g_assert(pixbuf != NULL);
|
||||
|
||||
gdk_pixbuf_ref(pixbuf); /* for the RGB window */
|
||||
|
||||
*retloc = new_testrgb_window(pixbuf, "Progressive");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
progressive_updated_callback(GdkPixbufLoader* loader, guint x, guint y, guint width, guint height, gpointer data)
|
||||
{
|
||||
GtkWidget** window_loc = data;
|
||||
|
||||
/* g_print ("progressive_updated_callback:\n\t%d\t%d\t%d\t%d\n", x, y, width, height); */
|
||||
|
||||
if (*window_loc != NULL)
|
||||
gtk_widget_queue_draw_area(*window_loc,
|
||||
x, y, width, height);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int readlen = 4096;
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
int found_valid = FALSE;
|
||||
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkPixbufLoader *pixbuf_loader;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
gdk_rgb_set_verbose (TRUE);
|
||||
|
||||
gdk_rgb_init ();
|
||||
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
|
||||
gtk_widget_set_default_visual (gdk_rgb_get_visual ());
|
||||
|
||||
{
|
||||
char *tbf_readlen = getenv("TBF_READLEN");
|
||||
if(tbf_readlen) readlen = atoi(tbf_readlen);
|
||||
}
|
||||
|
||||
{
|
||||
char *tbf_bps = getenv("TBF_KBPS");
|
||||
guint bps;
|
||||
|
||||
if (tbf_bps) {
|
||||
bps = atoi(tbf_bps);
|
||||
g_print ("Simulating %d kBytes/sec\n", bps);
|
||||
readlen = (bps*1024)/10;
|
||||
}
|
||||
}
|
||||
|
||||
i = 1;
|
||||
if (argc == 1) {
|
||||
const gchar*** xpmp;
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_data ((guchar *) default_image, ART_PIX_RGB, FALSE,
|
||||
DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_WIDTH * 3,
|
||||
NULL, NULL);
|
||||
new_testrgb_window (pixbuf, NULL);
|
||||
|
||||
xpmp = xpms;
|
||||
while (*xpmp) {
|
||||
pixbuf = gdk_pixbuf_new_from_xpm_data (*xpmp);
|
||||
new_testrgb_window (pixbuf, NULL);
|
||||
++xpmp;
|
||||
}
|
||||
|
||||
found_valid = TRUE;
|
||||
} else {
|
||||
for (i = 1; i < argc; i++) {
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file (argv[i]);
|
||||
#if 0
|
||||
pixbuf = gdk_pixbuf_rotate(pixbuf, 10.0);
|
||||
#endif
|
||||
|
||||
if (pixbuf) {
|
||||
new_testrgb_window (pixbuf, "File");
|
||||
found_valid = TRUE;
|
||||
}
|
||||
}
|
||||
#if 1
|
||||
{
|
||||
GtkWidget* rgb_window = NULL;
|
||||
ProgressFileStatus status;
|
||||
|
||||
pixbuf_loader = gdk_pixbuf_loader_new ();
|
||||
status.loader = pixbuf_loader;
|
||||
|
||||
status.rgbwin = &rgb_window;
|
||||
|
||||
status.buf = g_malloc (readlen);
|
||||
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
|
||||
"area_prepared",
|
||||
GTK_SIGNAL_FUNC(progressive_prepared_callback),
|
||||
&rgb_window);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
|
||||
"area_updated",
|
||||
GTK_SIGNAL_FUNC(progressive_updated_callback),
|
||||
&rgb_window);
|
||||
|
||||
|
||||
status.imagefile = fopen (argv[1], "r");
|
||||
g_assert (status.imagefile != NULL);
|
||||
|
||||
status.readlen = readlen;
|
||||
|
||||
status.timeout = gtk_timeout_add(100, update_timeout, &status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (found_valid)
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -18,3 +18,5 @@ Makefile.in
|
||||
*.vrs
|
||||
html
|
||||
text
|
||||
texinfo.tex
|
||||
gtk-config.1
|
||||
|
||||
11
docs/Changes-1.4.txt
Normal file
11
docs/Changes-1.4.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Incompatible Changes from GTK+-1.2 to GTK+-1.4:
|
||||
|
||||
- The gdk_time* functions have been removed. This functionality
|
||||
has been unused since the main loop was moved into GLib
|
||||
prior to 1.2.
|
||||
|
||||
- The signature for GtkPrintFunc (used for gtk_item_factory_dump_items)
|
||||
has been changed to take a 'const gchar *' instead of 'gchar *', to
|
||||
match what we do for glib, and other similar cases.
|
||||
|
||||
- The detail arguments in the GtkStyleClass structure are now 'const gchar *'.
|
||||
@@ -101,36 +101,7 @@ FAQ_FILES=html/gtkfaq.html \
|
||||
html/gtkfaq-7.html \
|
||||
text/gtkfaq.txt
|
||||
|
||||
EXTRA_DIST = \
|
||||
gtk-config.1 \
|
||||
texinfo.tex \
|
||||
macros.texi \
|
||||
gtkdocs_fix \
|
||||
gtkfaq.sgml \
|
||||
gtk-config.txt \
|
||||
gtk_tut.sgml \
|
||||
gtk_tut_it.sgml \
|
||||
gtk_tut_fr.sgml \
|
||||
debugging.txt \
|
||||
developers.txt \
|
||||
refcounting.txt \
|
||||
styles.txt \
|
||||
text_widget.txt \
|
||||
widget_system.txt \
|
||||
gtk_tut_packbox1.gif \
|
||||
gtk_tut_packbox2.gif \
|
||||
html/gtk_tut_table.gif \
|
||||
html/gtk_tut_packbox1.gif \
|
||||
html/gtk_tut_packbox2.gif \
|
||||
gtk_tut_table.gif \
|
||||
html/gdk.html \
|
||||
html/gdk_toc.html \
|
||||
html/gtk.html \
|
||||
html/gtk_toc.html \
|
||||
$(TUTORIAL_FILES) \
|
||||
$(TUTORIAL_FR_FILES) \
|
||||
$(TUTORIAL_IT_FILES) \
|
||||
$(FAQ_FILES)
|
||||
html/gtk_tut_table.gif: gdk.html gtk.html
|
||||
|
||||
.PHONY: html htmldir faq tutorial tutorial_it tutorial_fr files
|
||||
|
||||
@@ -195,3 +166,36 @@ files:
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
echo $$p; \
|
||||
done
|
||||
|
||||
EXTRA_DIST += \
|
||||
Changes-1.2.txt \
|
||||
debugging.txt \
|
||||
developers.txt \
|
||||
refcounting.txt \
|
||||
styles.txt \
|
||||
text_widget.txt \
|
||||
widget_system.txt \
|
||||
generation.txt \
|
||||
gtk-config.txt \
|
||||
gtk-config.1.in \
|
||||
texinfo.tex \
|
||||
macros.texi \
|
||||
gtkdocs_fix \
|
||||
gtkfaq.sgml \
|
||||
gtk_tut.sgml \
|
||||
gtk_tut_it.sgml \
|
||||
gtk_tut_fr.sgml \
|
||||
gtk_tut_packbox1.gif \
|
||||
gtk_tut_packbox2.gif \
|
||||
html/gtk_tut_table.gif \
|
||||
html/gtk_tut_packbox1.gif \
|
||||
html/gtk_tut_packbox2.gif \
|
||||
gtk_tut_table.gif \
|
||||
html/gdk.html \
|
||||
html/gdk_toc.html \
|
||||
html/gtk.html \
|
||||
html/gtk_toc.html \
|
||||
$(TUTORIAL_FILES) \
|
||||
$(TUTORIAL_FR_FILES) \
|
||||
$(TUTORIAL_IT_FILES) \
|
||||
$(FAQ_FILES)
|
||||
|
||||
2053
docs/faq/gtkfaq.sgml
2053
docs/faq/gtkfaq.sgml
File diff suppressed because it is too large
Load Diff
177
docs/generation.txt
Normal file
177
docs/generation.txt
Normal file
@@ -0,0 +1,177 @@
|
||||
Overview:
|
||||
========
|
||||
|
||||
This file describes the way that autogeneration
|
||||
works within the GTK+ source code.
|
||||
|
||||
The following files in the gdk/ subdirectory
|
||||
are autogenerated:
|
||||
|
||||
gdkkeysyms.h
|
||||
gdkcursors.h
|
||||
|
||||
The following files in the gtk/ subdirectory
|
||||
are autogenerated:
|
||||
|
||||
gtk.defs
|
||||
Description of GTK+ types (and some functions) in a lisp-style
|
||||
format.
|
||||
gtktypebuiltins.h
|
||||
Header file including declarations for internal types
|
||||
gtktypebuiltins_vars.c
|
||||
Variables for type values for internal types.
|
||||
gtktypebuiltins_ids.c
|
||||
Arrays holding information about each internal type.
|
||||
gtktypebuiltins_evals.c
|
||||
Arrays holding mapping between enumeration values
|
||||
and strings.
|
||||
|
||||
gtkmarshal.c
|
||||
gtkmarshal.h
|
||||
Autogenerated signal marshallers
|
||||
|
||||
GDK
|
||||
===
|
||||
|
||||
gdkkeysyms.h and gdkcursors.h are generated from
|
||||
the corresponding header files
|
||||
|
||||
X11/cursorfont.h
|
||||
X11/keysymdef.h
|
||||
|
||||
by some simple sed scripts. These are not actually
|
||||
run automatically because we want all the keysyms
|
||||
even on systems with a limited set.
|
||||
So the Gdk rule to generate both files (X-derived-headers)
|
||||
only needs to be rerun for every new release of the X Window
|
||||
System.
|
||||
|
||||
GTK+ - type definitions
|
||||
=======================
|
||||
|
||||
The type definitions are generated from several sources:
|
||||
|
||||
gtk-boxed.defs - definitions for boxed types
|
||||
GTK+ header files
|
||||
GDK header files
|
||||
|
||||
The makeenums.pl script does a heuristic parse of
|
||||
the header files and extracts all enumerations declarations.
|
||||
It also recognizes a number of pseudo-comments in the
|
||||
header files:
|
||||
|
||||
Two of these apply to individual enumeration values:
|
||||
|
||||
/*< skip >*/
|
||||
|
||||
This enumeration value should be skipped.
|
||||
|
||||
/*< nick=NICK >*/
|
||||
|
||||
The nickname for this value should NICK instead of the
|
||||
normally guessed value. For instance:
|
||||
|
||||
typedef enum {
|
||||
GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/
|
||||
GTK_TARGET_SAME_WIDGET = 1 << 1 /*< nick=same-widget >*/
|
||||
} GtkTargetFlags;
|
||||
|
||||
makes the nicks "same-app" and "same-widget", instead of
|
||||
"app" and "widget" that would normally be used.
|
||||
|
||||
The other two apply to entire enumeration declarations.
|
||||
|
||||
/*< prefix=PREFIX >*/
|
||||
|
||||
Specifies the prefix to be removed from the enumeration
|
||||
values to generate nicknames.
|
||||
|
||||
/*< flags >*/
|
||||
|
||||
Specifies that this enumeration is used as a bitfield.
|
||||
(makenums.pl normally guesses this from the presence of values
|
||||
with << operators). For instance:
|
||||
|
||||
typedef enum /*< flags >*/
|
||||
{
|
||||
GDK_IM_PREEDIT_AREA = 0x0001,
|
||||
GDK_IM_PREEDIT_CALLBACKS = 0x0002,
|
||||
[ ... ]
|
||||
} GdkIMStyle;
|
||||
|
||||
makeenums.pl can be run into two modes:
|
||||
|
||||
1) Generate the gtktypebuiltins_eval.c file (this
|
||||
contains arrays holding the mapping of
|
||||
string <=> enumeration value)
|
||||
|
||||
2) Generate the enumeration portion of gtk.defs.
|
||||
|
||||
The enumearation portion is added to the boxed type
|
||||
declarations in gtk-boxed.defs to create gtk.defs.
|
||||
|
||||
The makeetypes.awk program takes the gtk.defs file, and
|
||||
from that generates various files depending on the
|
||||
third parameter passed to it:
|
||||
|
||||
macros: gtktypebuiltins.h
|
||||
variables: gtktypebuiltins_vars.c
|
||||
entries: gtktypebuiltins_ids.c
|
||||
|
||||
GTK+ - marshallers
|
||||
==================
|
||||
|
||||
The files gtkmarshal.c and gtkmarshal.h include declarations
|
||||
and definitions for the marshallers needed inside of
|
||||
GTK+. The marshallers to be generated are listed in
|
||||
the file gtkmashal.list, which is processed
|
||||
by genmarshal.pl.
|
||||
|
||||
The format of this file is a list of lines:
|
||||
|
||||
<retval-type>:<arg1-type>,<arg2-type>,<arg3-type>
|
||||
|
||||
e.g.:
|
||||
|
||||
BOOL:POINTER,STRING,STRING,POINTER
|
||||
|
||||
A marshaller is generated for each line in the file.
|
||||
The possible types are:
|
||||
|
||||
NONE
|
||||
BOOL
|
||||
CHAR
|
||||
INT
|
||||
UINT
|
||||
LONG
|
||||
ULONG
|
||||
FLOAT
|
||||
DOUBLE
|
||||
STRING
|
||||
ENUM
|
||||
FLAGS
|
||||
BOXED
|
||||
POINTER
|
||||
OBJECT
|
||||
FOREIGN (gpointer data, GtkDestroyNotify notify)
|
||||
C_CALLBACK (GtkFunction func, gpointer func_data)
|
||||
SIGNAL (GtkSignalFunc f, gpointer data)
|
||||
ARGS (gint n_args, GtkArg *args)
|
||||
CALLBACK (GtkCallBackMarshal marshall,
|
||||
gpointer data,
|
||||
GtkDestroyNotify Notify)
|
||||
|
||||
Some of these types map to multiple return values - these
|
||||
are marked above with the return types in parantheses.
|
||||
|
||||
NOTES
|
||||
=====
|
||||
|
||||
When autogenerating GTK+ files, the autogenerated
|
||||
files are often rebuild resulting in the same result.
|
||||
|
||||
To prevent unecessary rebuilds of the entire directory, some files
|
||||
that multiple other source files depend on are not actually written
|
||||
to directly. Instead, an intermediate file is written, which
|
||||
is then compared to the old file, and only if it is different
|
||||
is it copied into the final location.
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH GTK+ 1 "25 October 1998" Version 1.2.0
|
||||
.TH GTK+ 1 "25 October 1998" Version @VERSION@
|
||||
.SH NAME
|
||||
gtk-config - script to get information about the installed version of GTK+
|
||||
.SH SYNOPSIS
|
||||
@@ -1109,7 +1109,7 @@ opaque.
|
||||
All widget creation routines in GTK return pointers to GtkWidget
|
||||
structures. In reality, all widget creation routines create structures
|
||||
that can be viewed as equivalent to the GtkWidget structure, but often
|
||||
have contain additional information. @xref{Object Implementation}
|
||||
have contain additional information. @xref{Object Implementation}.
|
||||
|
||||
The widgets available for use are implemented in a hierarchy. Several
|
||||
widgets exist solely as common bases for more specific widgets. For
|
||||
|
||||
2607
docs/gtk_tut.sgml
2607
docs/gtk_tut.sgml
File diff suppressed because it is too large
Load Diff
2053
docs/gtkfaq.sgml
2053
docs/gtkfaq.sgml
File diff suppressed because it is too large
Load Diff
@@ -240,7 +240,7 @@ Taking care of proper referencing
|
||||
---------------------------------
|
||||
|
||||
There are some cases where referencing of widgets from outside the toolkit
|
||||
(on the application side is needed).
|
||||
(on the application side) is needed.
|
||||
Once the application performes an operation on a widget that will cause
|
||||
its reference count to drop, if it wants to take further actions on the
|
||||
widget, it needs to hold a reference to it.
|
||||
|
||||
7
docs/reference/AUTHORS
Normal file
7
docs/reference/AUTHORS
Normal file
@@ -0,0 +1,7 @@
|
||||
Damon Chaplin <damon@karuna.freeserve.co.uk> and others.
|
||||
|
||||
See:
|
||||
|
||||
http://www.gtk.org/rdp/status.html
|
||||
|
||||
for a complete list.
|
||||
30
docs/reference/COPYING
Normal file
30
docs/reference/COPYING
Normal file
@@ -0,0 +1,30 @@
|
||||
This work may be reproduced and distributed in whole or in part, in
|
||||
any medium, physical or electronic, so as long as this copyright
|
||||
notice remains intact and unchanged on all copies. Commercial
|
||||
redistribution is permitted and encouraged, but you may not
|
||||
redistribute, in whole or in part, under terms more restrictive than
|
||||
those under which you received it. If you redistribute a modified or
|
||||
translated version of this work, you must also make the source code to
|
||||
the modified or translated version available in electronic form
|
||||
without charge. However, mere aggregation as part of a larger work
|
||||
shall not count as a modification for this purpose.
|
||||
|
||||
All code examples in this work are placed into the public domain,
|
||||
and may be used, modified and redistributed without restriction.
|
||||
|
||||
BECAUSE THIS WORK IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE WORK, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE WORK "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. SHOULD THE WORK PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY REPAIR OR CORRECTION.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE WORK AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
WORK, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
166
docs/reference/ChangeLog
Normal file
166
docs/reference/ChangeLog
Normal file
@@ -0,0 +1,166 @@
|
||||
2000-01-19 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkscrollbar.sgml: Started.
|
||||
|
||||
2000-01-08 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkclist.sgml: update from Paul Schifferer
|
||||
<isengard@geocities.com>
|
||||
|
||||
Wed Jan 5 10:23:41 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkprogress.sgml: Missing </listitem>, remove extra <para>
|
||||
* gtk/tmpl/gtkobject.sgml: dos2unix
|
||||
* gtk/tmpl/gtkcurve.sgml: missing </para>
|
||||
* gtk/tmpl/gtkarg.sgml: dos2unix, missing </para>
|
||||
* gtk/tmpl/gtkcolorsel.sgml: Missing </listitem>'s
|
||||
* gtk/tmpl/gtksignal.sgml (signal): dos2unix, missing </para>'s
|
||||
* gtk/tmpl/gtkmarshal.sgml: Missing </refsect2>
|
||||
|
||||
1999-11-16 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkmenubar.sgml: fixed minor error - using <em>.
|
||||
|
||||
* gtk/tmpl/gtknotebook.sgml:
|
||||
* gtk/tmpl/gtklist.sgml: new sections from
|
||||
Nicolas George <george@clipper.ens.fr>, with help from
|
||||
"Bob Springett" <bobspringett@claranet.fr>.
|
||||
|
||||
* gtk/tmpl/gtkobject.sgml:
|
||||
* gtk/tmpl/gtkarg.sgml: new sections from
|
||||
David Benson <daveb@idealab.com>.
|
||||
|
||||
* gtk/tmpl/gtkvbox.sgml:
|
||||
* gtk/tmpl/gtkhbox.sgml: fixed line endings.
|
||||
|
||||
* gtk/tmpl/gtkvbbox.sgml: update from Lee Mallabone
|
||||
<lee0@callnetuk.com>
|
||||
|
||||
* gdk/tmpl/drawing.sgml: fixed error in gdk_draw_arc() @angle2 param
|
||||
- it is relative to @angle1 rather than from the 3 o'clock position.
|
||||
|
||||
* gtk/tmpl/gtkfontseldlg.sgml: changed enums to use @ fields.
|
||||
|
||||
* gtk/tmpl/gtkcolorsel.sgml:
|
||||
* gtk/tmpl/gtkcolorseldlg.sgml:
|
||||
* gtk/tmpl/gtkprogress.sgml:
|
||||
* gtk/tmpl/gtkprogressbar.sgml: new sections from Tom Martone
|
||||
<tom@martoneconsulting.com>
|
||||
|
||||
* gtk/tmpl/gtkclist.sgml: partially written documentation from
|
||||
Paul Schifferer <isengard@geocities.com> who won't be able to finish it
|
||||
|
||||
1999-09-22 Martin Norbäck <d95mback@dtek.chalmers.se>
|
||||
|
||||
* gtk/tmpl/gtkclist.sgml: Added information about the sorting functions
|
||||
|
||||
Tue Oct 26 16:50:15 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkrc.sgml: Added information about widget
|
||||
paths and pattern matching.
|
||||
|
||||
1999-09-22 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/*.sgml: ran make templates, to fix problems with structs.
|
||||
|
||||
* gtk/gtk-sections.txt: rearranged GtkCombo section.
|
||||
|
||||
* gtk/tmpl/gtkvseparator.sgml:
|
||||
* gtk/tmpl/gtkhseparator.sgml:
|
||||
* gtk/tmpl/gtkgc.sgml:
|
||||
* gtk/tmpl/gtkfeatures.sgml:
|
||||
* gtk/tmpl/gtktipsquery.sgml:
|
||||
* gtk/tmpl/gtkitem.sgml:
|
||||
* gtk/tmpl/gtkinvisible.sgml:
|
||||
* gtk/tmpl/gtkgamma.sgml:
|
||||
* gtk/tmpl/gtkdata.sgml:
|
||||
* gtk/tmpl/gtkcurve.sgml:
|
||||
* gtk/tmpl/gtkcombo.sgml:
|
||||
* gtk/tmpl/gtkaccellabel.sgml: documented.
|
||||
|
||||
1999-09-20 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/gtk-docs.sgml: added role="no-toc" to the GTK+ Widgets & Objects
|
||||
chapter since we've created our own special contents page.
|
||||
|
||||
1999-09-19 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkmarshal.sgml:
|
||||
* gtk/tmpl/gtksignal.sgml: new sections from
|
||||
David Benson <daveb@idealab.com>.
|
||||
|
||||
* gtk/gtk-sections.txt: rearranged signal sections, and made most
|
||||
marshallers private. Moved GtkSignalRunType to signals section.
|
||||
|
||||
* gtk/tmpl/gtkradiobutton.sgml: new section from Lee Mallabone.
|
||||
|
||||
1999-09-17 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/gtk-docs.sgml: removed menu factory and debugging sections.
|
||||
|
||||
* gtk/gtk-sections.txt: made menu factory stuff private since it is
|
||||
deprecated. Also made debugging stuff private since it is only useful
|
||||
within GTK+.
|
||||
|
||||
1999-09-14 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkfilesel.sgml: fixed mismatched parentheses.
|
||||
|
||||
1999-09-02 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gdk/tmpl/event_structs.sgml:
|
||||
* gdk/tmpl/drawing.sgml: minor fixes.
|
||||
|
||||
1999-09-20 David C. Mason <dcm@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkimage.sgml: first pass at gtkimage... not complete
|
||||
|
||||
1999-08-28 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkbbox.sgml: new section from Lee Mallabone.
|
||||
|
||||
* gdk/gdk-sections.txt: rearranged rgb, regions, and drawing sections.
|
||||
|
||||
* gdk/tmpl/rgb.sgml: new section from Raph Levien, with a few changes
|
||||
by me, including a little example app.
|
||||
|
||||
* gdk/tmpl/regions.sgml:
|
||||
* gdk/tmpl/event_structs.sgml:
|
||||
* gdk/tmpl/drawing.sgml: my first attempt.
|
||||
* gdk/tmpl/cursors.sgml: tiny changes.
|
||||
|
||||
Tue Aug 17 09:14:01 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtktypeutils.sgml: Fix corrupted end tag.
|
||||
|
||||
* gtk/tmpl/gtkselection.sgml gtk/tmpl/gtkrc.sgml
|
||||
gtk/tmpl/gtkdnd.sgml gtk/tmpl/gtkarrow.sgml
|
||||
gtk/tmpl/gtkpaned.sgml gtk/tmpl/gtkmisc.sgml
|
||||
gtk/tmpl/gtkhandlebox.sgml gtk/tmpl/gtkctree.sgml:
|
||||
Added missing close tags.
|
||||
|
||||
Thu Aug 19 14:43:08 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/tmpl/gcs.sgml gdk/gdk-sections.txt: Added section.
|
||||
(Written a while ago but fell through the cracks)
|
||||
|
||||
* gtk/gtk-docs.sgml: Add a &hash; entity here as a
|
||||
temporary hack. (There is no standard entity
|
||||
for '#', and no way of escaping '#' in gtk-doc)
|
||||
|
||||
* gtk/tmpl/gtkrc.sgml: Use the above to fix up #rrggbb
|
||||
string literals.
|
||||
|
||||
* gtk/tmpl/gtkdrawingarea.sgml: Fixed a couple
|
||||
of errors in the example. (pointed out by
|
||||
Nick Lamb)
|
||||
|
||||
Mon Aug 16 6:60:53 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/tmpl/properties.sgml
|
||||
gdk/tmpl/selections.sgml
|
||||
gdk/tmpl/input_devices.sgml: Documented
|
||||
|
||||
* gdk/gdk-sections.txt: Moved around types for
|
||||
input devices properties and selections, marked
|
||||
a few functions as private.
|
||||
62
docs/reference/README
Normal file
62
docs/reference/README
Normal file
@@ -0,0 +1,62 @@
|
||||
This package contains the reference documentation
|
||||
for GTK+. For more information about GTK+
|
||||
see:
|
||||
|
||||
http://www.gtk.org
|
||||
|
||||
For information about contributing to the
|
||||
GLib/GTK+ reference documentation project, see:
|
||||
|
||||
http://www.gtk.org/rdp/
|
||||
|
||||
The GTK+ reference documentation is freely redistributable,
|
||||
see the file COPYING for details.
|
||||
|
||||
|
||||
REQUIREMENTS
|
||||
============
|
||||
|
||||
To build the documentation, you must have the gtk-doc
|
||||
package installed. To rebuild the template files,
|
||||
you must have the current version of the GTK+
|
||||
header files installed.
|
||||
|
||||
|
||||
BUILD
|
||||
=====
|
||||
|
||||
First, run configure to generate the makefiles for this
|
||||
module. There is one option specific to this package
|
||||
|
||||
--with-html-dir=DIR top of installed HTML documentation tree
|
||||
|
||||
|
||||
The Makefiles in the gdk/ and gtk/ subdirs each define three targets:
|
||||
|
||||
templates:
|
||||
|
||||
Scan the headers and merge the results with the current
|
||||
template files
|
||||
|
||||
sgml:
|
||||
|
||||
Generate SGML files using the DocBook DTD from
|
||||
the template files
|
||||
|
||||
html:
|
||||
|
||||
Generate HTML from the SGML files.
|
||||
|
||||
To build the documentation, do:
|
||||
|
||||
make sgml
|
||||
make html
|
||||
|
||||
You should only run the 'make templates' step if you
|
||||
need to regenerate the templates for a more recent
|
||||
version of the GTK+ sources.
|
||||
|
||||
INSTALLATION
|
||||
============
|
||||
|
||||
make install
|
||||
39
docs/reference/README.cvs-commits
Normal file
39
docs/reference/README.cvs-commits
Normal file
@@ -0,0 +1,39 @@
|
||||
Before making any changes to this module, please
|
||||
contact:
|
||||
|
||||
Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
This will ensure that duplicate work does not occur,
|
||||
and also make sure we know who has written what
|
||||
parts of the documentation. See
|
||||
|
||||
http://www.gtk.org/rdp/
|
||||
|
||||
for more information.
|
||||
|
||||
By contributing work to the Reference Documentation
|
||||
Project, you agree that it will be covered under the
|
||||
license terms described in the file COPYING
|
||||
included in this directory.
|
||||
|
||||
|
||||
Other notes:
|
||||
|
||||
- Do not run 'make templates' unless you have
|
||||
the latest cvs version of the gtk-1-2
|
||||
branch of GTK+ and the latest CVS version
|
||||
of gtk-doc.
|
||||
|
||||
(This is very important. Otherwise, the template
|
||||
files may be come corrupted.)
|
||||
|
||||
Make sure that gtk-config --prefix points
|
||||
to the correct version of GTK+.
|
||||
|
||||
- As always, ChangeLog entries should be made for
|
||||
each commit. These can be really brief
|
||||
"documented GHashTable"; but if you are editing
|
||||
something someone else wrote, please be specific.
|
||||
(Or better, send the changes to them for their
|
||||
approval, first)
|
||||
|
||||
5
docs/reference/gdk-pixbuf/.cvsignore
Normal file
5
docs/reference/gdk-pixbuf/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
html
|
||||
sgml
|
||||
gdk-pixbuf.html
|
||||
104
docs/reference/gdk-pixbuf/Makefile.am
Normal file
104
docs/reference/gdk-pixbuf/Makefile.am
Normal file
@@ -0,0 +1,104 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gdk-pixbuf
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gdk-pixbuf.sgml
|
||||
|
||||
# The directory containing the source code (if it contains documentation).
|
||||
DOC_SOURCE_DIR=$(GDK_PIXBUF_DIR)/gdk-pixbuf
|
||||
|
||||
CFLAGS=`gnome-config --cflags gnomeui gdk_pixbuf gnomecanvaspixbuf`
|
||||
LDFLAGS=`gnome-config --libs gnomeui gdk_pixbuf gnomecanvaspixbuf`
|
||||
|
||||
HTML_DIR=$(datadir)/gnome/html
|
||||
|
||||
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
||||
|
||||
tmpl_sources = \
|
||||
tmpl/animation.sgml \
|
||||
tmpl/creating.sgml \
|
||||
tmpl/file-loading.sgml \
|
||||
tmpl/from-drawables.sgml \
|
||||
tmpl/gdk-pixbuf-loader.sgml \
|
||||
tmpl/gdk-pixbuf-unused.sgml \
|
||||
tmpl/gdk-pixbuf.sgml \
|
||||
tmpl/gnome-canvas-pixbuf.sgml \
|
||||
tmpl/refcounting.sgml \
|
||||
tmpl/rendering.sgml \
|
||||
tmpl/scaling.sgml \
|
||||
tmpl/util.sgml
|
||||
|
||||
gdk_pixbuf_docdir = $(HTML_DIR)
|
||||
gdk_pixbuf_doc_DATA = \
|
||||
gdk-pixbuf.html \
|
||||
gdk-pixbuf.hierarchy \
|
||||
gdk-pixbuf.types \
|
||||
gdk-pixbuf-decl.txt \
|
||||
gdk-pixbuf-sections.txt
|
||||
|
||||
EXTRA_DIST = $(gdk_pixbuf_doc_DATA)
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
gdk-pixbuf.html: html/book1.html
|
||||
-cd $(srcdir) && cp html/book1.html gdk-pixbuf.html
|
||||
else
|
||||
gdk-pixbuf.html:
|
||||
endif
|
||||
|
||||
html/book1.html: sgml/gdk-pixbuf-doc.bottom
|
||||
$(MAKE) html
|
||||
|
||||
sgml/gdk-pixbuf-doc.bottom: $(tmpl_sources)
|
||||
$(MAKE) sgml
|
||||
|
||||
scan:
|
||||
-(cd $(srcdir) \
|
||||
&& env CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) \
|
||||
gtkdoc-scanobj --module=$(DOC_MODULE) \
|
||||
&& gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="pixops.h pixops-internal.h" )
|
||||
|
||||
templates: scan
|
||||
cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
|
||||
|
||||
sgml:
|
||||
cd $(srcdir) \
|
||||
&& gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
|
||||
|
||||
html:
|
||||
test -d $(srcdir)/html || mkdir $(srcdir)/html
|
||||
-cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak *.signals *-unused.txt
|
||||
|
||||
maintainer-clean-local: clean
|
||||
cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
|
||||
(installfiles=`echo $(srcdir)/html/*.html`; \
|
||||
if test "$$installfiles" = '$(srcdir)/html/*.html'; \
|
||||
then echo '-- Nothing to install' ; \
|
||||
else \
|
||||
for i in $$installfiles; do \
|
||||
echo '-- Installing '$$i ; \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
|
||||
done; \
|
||||
echo '-- Installing $(srcdir)/html/index.sgml' ; \
|
||||
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
|
||||
echo '-- Fixing Crossreferences' ; \
|
||||
gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \
|
||||
fi)
|
||||
|
||||
dist-hook:
|
||||
mkdir $(distdir)/html
|
||||
mkdir $(distdir)/sgml
|
||||
mkdir $(distdir)/tmpl
|
||||
-cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
|
||||
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
|
||||
-cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
|
||||
-cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml
|
||||
|
||||
.PHONY : html sgml templates scan
|
||||
414
docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt
Normal file
414
docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt
Normal file
@@ -0,0 +1,414 @@
|
||||
<USER_FUNCTION>
|
||||
<NAME>ModulePreparedNotifyFunc</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *pixbuf, gpointer user_data
|
||||
</USER_FUNCTION>
|
||||
<USER_FUNCTION>
|
||||
<NAME>ModuleUpdatedNotifyFunc</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *pixbuf,
|
||||
guint x, guint y,
|
||||
guint width, guint height,
|
||||
gpointer user_data
|
||||
</USER_FUNCTION>
|
||||
<USER_FUNCTION>
|
||||
<NAME>ModuleFrameDoneNotifyFunc</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbufFrame *frame,
|
||||
gpointer user_data
|
||||
</USER_FUNCTION>
|
||||
<USER_FUNCTION>
|
||||
<NAME>ModuleAnimationDoneNotifyFunc</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *pixbuf,
|
||||
gpointer user_data
|
||||
</USER_FUNCTION>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufModule</NAME>
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufModule</NAME>
|
||||
struct GdkPixbufModule {
|
||||
char *module_name;
|
||||
gboolean (* format_check) (guchar *buffer, int size);
|
||||
GModule *module;
|
||||
GdkPixbuf *(* load) (FILE *f);
|
||||
GdkPixbuf *(* load_xpm_data) (const char **data);
|
||||
|
||||
/* Incremental loading */
|
||||
|
||||
gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func,
|
||||
ModuleUpdatedNotifyFunc update_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
void (* stop_load) (gpointer context);
|
||||
gboolean (* load_increment) (gpointer context, const guchar *buf, guint size);
|
||||
|
||||
/* Animation loading */
|
||||
GdkPixbufAnimation *(* load_animation) (FILE *f);
|
||||
};
|
||||
</STRUCT>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_module</NAME>
|
||||
<RETURNS>GdkPixbufModule *</RETURNS>
|
||||
guchar *buffer, guint size
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_load_module</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbufModule *image_module
|
||||
</FUNCTION>
|
||||
<MACRO>
|
||||
<NAME>GDK_TYPE_PIXBUF_LOADER</NAME>
|
||||
#define GDK_TYPE_PIXBUF_LOADER (gdk_pixbuf_loader_get_type ())
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GDK_PIXBUF_LOADER</NAME>
|
||||
#define GDK_PIXBUF_LOADER(obj) (GTK_CHECK_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader))
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GDK_PIXBUF_LOADER_CLASS</NAME>
|
||||
#define GDK_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GDK_IS_PIXBUF_LOADER</NAME>
|
||||
#define GDK_IS_PIXBUF_LOADER(obj) (GTK_CHECK_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER))
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GDK_IS_PIXBUF_LOADER_CLASS</NAME>
|
||||
#define GDK_IS_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER))
|
||||
</MACRO>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufLoader</NAME>
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufLoader</NAME>
|
||||
struct GdkPixbufLoader
|
||||
{
|
||||
GtkObject object;
|
||||
|
||||
/* < Private > */
|
||||
gpointer private;
|
||||
};
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufLoaderClass</NAME>
|
||||
</STRUCT>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_loader_get_type</NAME>
|
||||
<RETURNS>GtkType </RETURNS>
|
||||
void
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_loader_new</NAME>
|
||||
<RETURNS>GdkPixbufLoader *</RETURNS>
|
||||
void
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_loader_write</NAME>
|
||||
<RETURNS>gboolean </RETURNS>
|
||||
GdkPixbufLoader *loader,const guchar *buf,size_t count
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_loader_get_pixbuf</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
GdkPixbufLoader *loader
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_loader_get_animation</NAME>
|
||||
<RETURNS>GdkPixbufAnimation *</RETURNS>
|
||||
GdkPixbufLoader *loader
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_loader_close</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbufLoader *loader
|
||||
</FUNCTION>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbuf</NAME>
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufFrame</NAME>
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufAnimation</NAME>
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbuf</NAME>
|
||||
struct GdkPixbuf {
|
||||
/* Reference count */
|
||||
int ref_count;
|
||||
|
||||
/* Libart pixbuf */
|
||||
ArtPixBuf *art_pixbuf;
|
||||
};
|
||||
</STRUCT>
|
||||
<ENUM>
|
||||
<NAME>GdkPixbufFrameAction</NAME>
|
||||
typedef enum {
|
||||
GDK_PIXBUF_FRAME_RETAIN,
|
||||
GDK_PIXBUF_FRAME_DISPOSE,
|
||||
GDK_PIXBUF_FRAME_REVERT
|
||||
} GdkPixbufFrameAction;
|
||||
</ENUM>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufFrame</NAME>
|
||||
struct GdkPixbufFrame {
|
||||
/* The pixbuf with this frame's image data */
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
/* Offsets for overlaying onto the animation's area */
|
||||
int x_offset;
|
||||
int y_offset;
|
||||
|
||||
/* Frame duration in ms */
|
||||
int delay_time;
|
||||
|
||||
/* Overlay mode */
|
||||
GdkPixbufFrameAction action;
|
||||
};
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkPixbufAnimation</NAME>
|
||||
struct GdkPixbufAnimation {
|
||||
/* Reference count */
|
||||
int ref_count;
|
||||
|
||||
/* Number of frames */
|
||||
int n_frames;
|
||||
|
||||
/* List of GdkPixbufFrame structures */
|
||||
GList *frames;
|
||||
};
|
||||
</STRUCT>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_format</NAME>
|
||||
<RETURNS>ArtPixFormat </RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_n_channels</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_has_alpha</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_bits_per_sample</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_pixels</NAME>
|
||||
<RETURNS>guchar *</RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_width</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_height</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_rowstride</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_ref</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_unref</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_new_from_art_pixbuf</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
ArtPixBuf *art_pixbuf
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_new</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
ArtPixFormat format, gboolean has_alpha, int bits_per_sample,int width, int height
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_new_from_file</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
const char *filename
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_new_from_data</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
guchar *data,ArtPixFormat format,gboolean has_alpha,int width, int height,int rowstride,ArtDestroyNotify dfunc,gpointer dfunc_data
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_new_from_xpm_data</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
const char **data
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_add_alpha</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
GdkPixbuf *pixbuf, gboolean substitute_color,guchar r, guchar g, guchar b
|
||||
</FUNCTION>
|
||||
<ENUM>
|
||||
<NAME>GdkPixbufAlphaMode</NAME>
|
||||
typedef enum {
|
||||
GDK_PIXBUF_ALPHA_BILEVEL,
|
||||
GDK_PIXBUF_ALPHA_FULL
|
||||
} GdkPixbufAlphaMode;
|
||||
</ENUM>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_render_threshold_alpha</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *pixbuf, GdkBitmap *bitmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height,int alpha_threshold
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_render_to_drawable</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *pixbuf,GdkDrawable *drawable, GdkGC *gc,int src_x, int src_y,int dest_x, int dest_y,int width, int height,GdkRgbDither dither,int x_dither, int y_dither
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_render_to_drawable_alpha</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *pixbuf, GdkDrawable *drawable,int src_x, int src_y,int dest_x, int dest_y,int width, int height,GdkPixbufAlphaMode alpha_mode,int alpha_threshold,GdkRgbDither dither,int x_dither, int y_dither
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_render_pixmap_and_mask</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *pixbuf,GdkPixmap **pixmap_return, GdkBitmap **mask_return,int alpha_threshold
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_get_from_drawable</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_copy_area</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *src_pixbuf,int src_x, int src_y,int width, int height,GdkPixbuf *dest_pixbuf,int dest_x, int dest_y
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_scale</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_composite</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level,int overall_alpha
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_composite_color</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level,int overall_alpha,int check_x,int check_y,int check_size,art_u32 color1,art_u32 color2
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_scale_simple</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
GdkPixbuf *src,int dest_width,int dest_height,ArtFilterLevel filter_level
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_composite_color_simple</NAME>
|
||||
<RETURNS>GdkPixbuf *</RETURNS>
|
||||
GdkPixbuf *src,int dest_width,int dest_height,ArtFilterLevel filter_level,int overall_alpha,int check_size,art_u32 color1,art_u32 color2
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_animation_new_from_file</NAME>
|
||||
<RETURNS>GdkPixbufAnimation *</RETURNS>
|
||||
const char *filename
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_animation_ref</NAME>
|
||||
<RETURNS>GdkPixbufAnimation *</RETURNS>
|
||||
GdkPixbufAnimation *animation
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_animation_unref</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
GdkPixbufAnimation *animation
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_preinit</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
gpointer app, gpointer modinfo
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>gdk_pixbuf_postinit</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
gpointer app, gpointer modinfo
|
||||
</FUNCTION>
|
||||
<MACRO>
|
||||
<NAME>GNOME_TYPE_CANVAS_PIXBUF</NAME>
|
||||
#define GNOME_TYPE_CANVAS_PIXBUF (gnome_canvas_pixbuf_get_type ())
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GNOME_CANVAS_PIXBUF</NAME>
|
||||
#define GNOME_CANVAS_PIXBUF(obj) (GTK_CHECK_CAST ((obj), \
|
||||
GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbuf))
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GNOME_CANVAS_PIXBUF_CLASS</NAME>
|
||||
#define GNOME_CANVAS_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \
|
||||
GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufClass))
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GNOME_IS_CANVAS_PIXBUF</NAME>
|
||||
#define GNOME_IS_CANVAS_PIXBUF(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_PIXBUF))
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GNOME_IS_CANVAS_PIXBUF_CLASS</NAME>
|
||||
#define GNOME_IS_CANVAS_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \
|
||||
GNOME_TYPE_CANVAS_PIXBUF))
|
||||
</MACRO>
|
||||
<STRUCT>
|
||||
<NAME>GnomeCanvasPixbuf</NAME>
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GnomeCanvasPixbufClass</NAME>
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GnomeCanvasPixbuf</NAME>
|
||||
struct GnomeCanvasPixbuf {
|
||||
GnomeCanvasItem item;
|
||||
|
||||
/* Private data */
|
||||
gpointer priv;
|
||||
};
|
||||
</STRUCT>
|
||||
<FUNCTION>
|
||||
<NAME>gnome_canvas_pixbuf_get_type</NAME>
|
||||
<RETURNS>GtkType </RETURNS>
|
||||
void
|
||||
</FUNCTION>
|
||||
<MACRO>
|
||||
<NAME>GDK_PIXBUF_MAJOR</NAME>
|
||||
#define GDK_PIXBUF_MAJOR (0)
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GDK_PIXBUF_MINOR</NAME>
|
||||
#define GDK_PIXBUF_MINOR (4)
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GDK_PIXBUF_MICRO</NAME>
|
||||
#define GDK_PIXBUF_MICRO (0)
|
||||
</MACRO>
|
||||
<MACRO>
|
||||
<NAME>GDK_PIXBUF_VERSION</NAME>
|
||||
#define GDK_PIXBUF_VERSION "0.4.0"
|
||||
</MACRO>
|
||||
<VARIABLE>
|
||||
<NAME>gdk_pixbuf_version</NAME>
|
||||
extern const char *gdk_pixbuf_version;
|
||||
</VARIABLE>
|
||||
105
docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt
Normal file
105
docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt
Normal file
@@ -0,0 +1,105 @@
|
||||
<INCLUDE>gdk-pixbuf/gdk-pixbuf.h</INCLUDE>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf</FILE>
|
||||
GdkPixbuf
|
||||
gdk_pixbuf_get_format
|
||||
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
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>refcounting</FILE>
|
||||
gdk_pixbuf_ref
|
||||
gdk_pixbuf_unref
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>file-loading</FILE>
|
||||
gdk_pixbuf_new_from_file
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>creating</FILE>
|
||||
gdk_pixbuf_new_from_art_pixbuf
|
||||
gdk_pixbuf_new
|
||||
gdk_pixbuf_new_from_data
|
||||
gdk_pixbuf_new_from_xpm_data
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>rendering</FILE>
|
||||
GdkPixbufAlphaMode
|
||||
gdk_pixbuf_render_to_drawable_alpha
|
||||
gdk_pixbuf_render_to_drawable
|
||||
gdk_pixbuf_render_threshold_alpha
|
||||
gdk_pixbuf_render_pixmap_and_mask
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>from-drawables</FILE>
|
||||
gdk_pixbuf_get_from_drawable
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>util</FILE>
|
||||
gdk_pixbuf_add_alpha
|
||||
gdk_pixbuf_copy_area
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>animation</FILE>
|
||||
GdkPixbufFrameAction
|
||||
GdkPixbufFrame
|
||||
GdkPixbufAnimation
|
||||
gdk_pixbuf_animation_new_from_file
|
||||
gdk_pixbuf_animation_ref
|
||||
gdk_pixbuf_animation_unref
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>scaling</FILE>
|
||||
gdk_pixbuf_scale
|
||||
gdk_pixbuf_composite
|
||||
gdk_pixbuf_composite_color
|
||||
gdk_pixbuf_scale_simple
|
||||
gdk_pixbuf_composite_color_simple
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf-loader</FILE>
|
||||
GDK_PIXBUF_LOADER
|
||||
<TITLE>GdkPixbufLoader</TITLE>
|
||||
gdk_pixbuf_loader_new
|
||||
gdk_pixbuf_loader_write
|
||||
gdk_pixbuf_loader_get_pixbuf
|
||||
gdk_pixbuf_loader_get_animation
|
||||
gdk_pixbuf_loader_close
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_PIXBUF_LOADER
|
||||
GDK_IS_PIXBUF_LOADER
|
||||
gdk_pixbuf_loader_get_type
|
||||
GDK_PIXBUF_LOADER_CLASS
|
||||
GDK_IS_PIXBUF_LOADER_CLASS
|
||||
<SUBSECTION Private>
|
||||
GdkPixbufLoader
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gnome-canvas-pixbuf</FILE>
|
||||
GNOME_CANVAS_PIXBUF
|
||||
<TITLE>GnomeCanvasPixbuf</TITLE>
|
||||
<SUBSECTION Standard>
|
||||
GNOME_TYPE_CANVAS_PIXBUF
|
||||
GNOME_IS_CANVAS_PIXBUF
|
||||
gnome_canvas_pixbuf_get_type
|
||||
GNOME_CANVAS_PIXBUF_CLASS
|
||||
GNOME_IS_CANVAS_PIXBUF_CLASS
|
||||
<SUBSECTION Private>
|
||||
GnomeCanvasPixbuf
|
||||
</SECTION>
|
||||
66
docs/reference/gdk-pixbuf/gdk-pixbuf.args
Normal file
66
docs/reference/gdk-pixbuf/gdk-pixbuf.args
Normal file
@@ -0,0 +1,66 @@
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::pixbuf</NAME>
|
||||
<TYPE>gpointer</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::width</NAME>
|
||||
<TYPE>gdouble</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::width_set</NAME>
|
||||
<TYPE>gboolean</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::width_in_pixels</NAME>
|
||||
<TYPE>gboolean</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::height</NAME>
|
||||
<TYPE>gdouble</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::height_set</NAME>
|
||||
<TYPE>gboolean</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::height_in_pixels</NAME>
|
||||
<TYPE>gboolean</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::x</NAME>
|
||||
<TYPE>gdouble</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::x_in_pixels</NAME>
|
||||
<TYPE>gboolean</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::y</NAME>
|
||||
<TYPE>gdouble</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GnomeCanvasPixbuf::y_in_pixels</NAME>
|
||||
<TYPE>gboolean</TYPE>
|
||||
<FLAGS>rw</FLAGS>
|
||||
</ARG>
|
||||
|
||||
4
docs/reference/gdk-pixbuf/gdk-pixbuf.hierarchy
Normal file
4
docs/reference/gdk-pixbuf/gdk-pixbuf.hierarchy
Normal file
@@ -0,0 +1,4 @@
|
||||
GtkObject
|
||||
GdkPixbufLoader
|
||||
GnomeCanvasItem
|
||||
GnomeCanvasPixbuf
|
||||
60
docs/reference/gdk-pixbuf/gdk-pixbuf.sgml
Normal file
60
docs/reference/gdk-pixbuf/gdk-pixbuf.sgml
Normal file
@@ -0,0 +1,60 @@
|
||||
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
|
||||
<!entity gdk-pixbuf-gdk-pixbuf SYSTEM "sgml/gdk-pixbuf.sgml">
|
||||
<!entity gdk-pixbuf-refcounting SYSTEM "sgml/refcounting.sgml">
|
||||
<!entity gdk-pixbuf-file-loading SYSTEM "sgml/file-loading.sgml">
|
||||
<!entity gdk-pixbuf-creating SYSTEM "sgml/creating.sgml">
|
||||
<!entity gdk-pixbuf-rendering SYSTEM "sgml/rendering.sgml">
|
||||
<!entity gdk-pixbuf-scaling SYSTEM "sgml/scaling.sgml">
|
||||
<!entity gdk-pixbuf-from-drawables SYSTEM "sgml/from-drawables.sgml">
|
||||
<!entity gdk-pixbuf-util SYSTEM "sgml/util.sgml">
|
||||
<!entity gdk-pixbuf-animation SYSTEM "sgml/animation.sgml">
|
||||
<!entity GdkPixbufLoader SYSTEM "sgml/gdk-pixbuf-loader.sgml">
|
||||
<!entity GnomeCanvasPixbuf SYSTEM "sgml/gnome-canvas-pixbuf.sgml">
|
||||
]>
|
||||
|
||||
<book>
|
||||
<bookinfo>
|
||||
<title>The GdkPixbuf Library</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Federico</firstname>
|
||||
<surname>Mena Quintero</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>federico@gimp.org</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>1999</year>
|
||||
<holder>The Free Software Foundation</holder>
|
||||
</copyright>
|
||||
</bookinfo>
|
||||
|
||||
<reference>
|
||||
<title>API Reference</title>
|
||||
|
||||
<partintro>
|
||||
<para>
|
||||
This part presents the class and function reference for the
|
||||
GdkPixbuf library. Classes are described together with their
|
||||
methods; individual functions are grouped by functional group.
|
||||
</para>
|
||||
</partintro>
|
||||
|
||||
&gdk-pixbuf-gdk-pixbuf;
|
||||
&gdk-pixbuf-refcounting;
|
||||
&gdk-pixbuf-file-loading;
|
||||
&gdk-pixbuf-creating;
|
||||
&gdk-pixbuf-rendering;
|
||||
&gdk-pixbuf-scaling;
|
||||
&gdk-pixbuf-from-drawables;
|
||||
&gdk-pixbuf-util;
|
||||
&gdk-pixbuf-animation;
|
||||
&GdkPixbufLoader;
|
||||
&GnomeCanvasPixbuf;
|
||||
</reference>
|
||||
</book>
|
||||
34
docs/reference/gdk-pixbuf/gdk-pixbuf.signals
Normal file
34
docs/reference/gdk-pixbuf/gdk-pixbuf.signals
Normal file
@@ -0,0 +1,34 @@
|
||||
<SIGNAL>
|
||||
<NAME>GdkPixbufLoader::area-updated</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
GdkPixbufLoader *gdkpixbufloader
|
||||
gint arg1
|
||||
gint arg2
|
||||
gint arg3
|
||||
gint arg4
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GdkPixbufLoader::area-prepared</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
GdkPixbufLoader *gdkpixbufloader
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GdkPixbufLoader::frame-done</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
GdkPixbufLoader *gdkpixbufloader
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GdkPixbufLoader::animation-done</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
GdkPixbufLoader *gdkpixbufloader
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GdkPixbufLoader::closed</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
GdkPixbufLoader *gdkpixbufloader
|
||||
</SIGNAL>
|
||||
|
||||
7
docs/reference/gdk-pixbuf/gdk-pixbuf.types
Normal file
7
docs/reference/gdk-pixbuf/gdk-pixbuf.types
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <gnome.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
|
||||
#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
|
||||
|
||||
gdk_pixbuf_loader_get_type
|
||||
gnome_canvas_pixbuf_get_type
|
||||
91
docs/reference/gdk-pixbuf/tmpl/animation.sgml
Normal file
91
docs/reference/gdk-pixbuf/tmpl/animation.sgml
Normal file
@@ -0,0 +1,91 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Animations
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Animations as multi-frame structures.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The GdkPixbuf library provides a simple mechanism to load and
|
||||
represent animations, primarily animated GIF files. Animations
|
||||
are represented as lists of #GdkPixbufFrame structures. Each
|
||||
frame structure contains a #GdkPixbuf structure and information
|
||||
about the frame's overlay mode and duration.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbufLoader
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkPixbufFrameAction ##### -->
|
||||
<para>
|
||||
Each animation frame can have several things happen to it when the
|
||||
next frame is displayed. The #GdkPixbufFrameAction determines this.
|
||||
If a frame as marked as #GDK_PIXBUF_FRAME_RETAIN, then the image
|
||||
will remain displayed, and will be potentially occluded by the next
|
||||
frame. If it is marked as #GDK_PIXBUF_FRAME_DISPOSE, then the
|
||||
animation is reverted to the setting before the frame was shown. If
|
||||
it is marked as #GDK_PIXBUF_FRAME_REVERT, then the animation is
|
||||
reverted to the first image before continuing.
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_FRAME_RETAIN:
|
||||
@GDK_PIXBUF_FRAME_DISPOSE:
|
||||
@GDK_PIXBUF_FRAME_REVERT:
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufFrame ##### -->
|
||||
<para>
|
||||
This structure describes a frame in a #GdkPixbufAnimation. Each
|
||||
frame consists of a #GdkPixbuf, an offset of the frame within the
|
||||
animation's bounding box, a duration, and an overlay mode or
|
||||
action.
|
||||
</para>
|
||||
|
||||
@pixbuf: The frame's image contents.
|
||||
@x_offset: X offset of the frame inside the animation's bounding box.
|
||||
@y_offset: Y offset of the frame inside the animation's bounding box.
|
||||
@delay_time: Duration of the frame in milliseconds.
|
||||
@action: Overlay mode.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimation ##### -->
|
||||
<para>
|
||||
This structure describes an animation, which is represented as a
|
||||
list of #GdkPixbufFrame structures.
|
||||
</para>
|
||||
|
||||
@ref_count: Reference count.
|
||||
@n_frames: Number of frames in the animation.
|
||||
@frames: List of #GdkPixbufFrame structures.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_new_from_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_animation_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
96
docs/reference/gdk-pixbuf/tmpl/creating.sgml
Normal file
96
docs/reference/gdk-pixbuf/tmpl/creating.sgml
Normal file
@@ -0,0 +1,96 @@
|
||||
<!-- ##### 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
|
||||
#ArtPixBuf structure with a #GdkPixbuf to add reference counting
|
||||
capabilities to it. The gdk_pixbuf_new_from_art_pixbuf() performs
|
||||
this operation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As a convenience, you can use the gdk_pixbuf_new_from_data()
|
||||
function to wrap an existing data buffer with a #GdkPixbuf. You
|
||||
need to specify the destroy notification function that will be
|
||||
called when the data buffer needs to be freed; this will happen
|
||||
when the pixbuf's reference count drops to zero and thus the
|
||||
#ArtPixBuf needs to be destroyed. 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 malloc() 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>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#ArtPixBuf
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_art_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@art_pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@has_alpha:
|
||||
@bits_per_sample:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@format:
|
||||
@has_alpha:
|
||||
@width:
|
||||
@height:
|
||||
@rowstride:
|
||||
@dfunc:
|
||||
@dfunc_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_xpm_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
41
docs/reference/gdk-pixbuf/tmpl/file-loading.sgml
Normal file
41
docs/reference/gdk-pixbuf/tmpl/file-loading.sgml
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
File Loading
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Loading a pixbuf from a file.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The GdkPixbuf 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>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
42
docs/reference/gdk-pixbuf/tmpl/from-drawables.sgml
Normal file
42
docs/reference/gdk-pixbuf/tmpl/from-drawables.sgml
Normal file
@@ -0,0 +1,42 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Drawables to Pixbufs
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Getting parts of a drawable's image data into a pixbuf.
|
||||
|
||||
<!-- ##### SECTION 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 See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbuf, gdk_image_get()
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_from_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@src:
|
||||
@cmap:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
70
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-io.sgml
Normal file
70
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-io.sgml
Normal file
@@ -0,0 +1,70 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
gdk-pixbuf-io
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### USER_FUNCTION ModulePreparedNotifyFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION ModuleUpdatedNotifyFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@user_data:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufModule ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@module_name:
|
||||
@format_check:
|
||||
@module:
|
||||
@load:
|
||||
@load_xpm_data:
|
||||
@begin_load:
|
||||
@stop_load:
|
||||
@load_increment:
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_module ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_load_module ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_module:
|
||||
|
||||
|
||||
182
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml
Normal file
182
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml
Normal file
@@ -0,0 +1,182 @@
|
||||
<!-- ##### 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. Applications can use this functionality instead of
|
||||
gdk_pixbuf_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 two important signals
|
||||
throughout the process. The first, #"area_prepared", will be called
|
||||
as soon as the image has enough information to determine the size of
|
||||
the image to be used. It will pass a @GdkPixbuf in. If you want to
|
||||
use it, you can 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 the gdk_pixbuf_loader_get_pixbuf() once this signal has been
|
||||
emitted and get the same pixbuf.
|
||||
</para>
|
||||
<para>
|
||||
The other signal, #"area_updated" 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 a little more complex then loading an
|
||||
image. In addition to the above signals, there is also a
|
||||
#"frame_done" signal, as well as an #"animation_done" signal. The
|
||||
first lets the application know that it is dealing with an
|
||||
animation, instead of a static image. It also passes a
|
||||
#GdkPixbufFrame in the signal. As before, if you want to keep the
|
||||
frame, you need to ref it. Once the first #"frame_done" signal
|
||||
has been emitted, you can call gdk_pixbuf_loader_get_animation()
|
||||
to get the #GdkPixbufAnimation struct. Each subsequent frame goes
|
||||
through a similar lifecycle. For example #"area_prepared" is
|
||||
re-emitted. Then #"area_updated" is emitted as many times as
|
||||
necessary. Finally, #"animation_done" is emitted as soon as all
|
||||
frames are done.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
gdk_pixbuf_new_from_file()
|
||||
</para>
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_LOADER ##### -->
|
||||
<para>
|
||||
Casts a #GtkObject to a #GdkPixbufLoader.
|
||||
</para>
|
||||
|
||||
@obj: A GTK+ object.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_write ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@buf:
|
||||
@count:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### 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:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
|
||||
<para>
|
||||
This signal is emitted when a significant area of the image being
|
||||
loaded has been updated. Normally it means that a complete
|
||||
scanline has been read in, but it could be a different area as
|
||||
well. Applications can use this signal to know when to repaint
|
||||
areas of an image that is being loaded.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
<!-- # Unused Parameters # -->
|
||||
@loader: Loader which emitted the signal.
|
||||
@x: X offset of upper-left corner of the updated area.
|
||||
@y: Y offset of upper-left corner of the updated area.
|
||||
@width: Width of updated area.
|
||||
@height: Height of updated area.
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
|
||||
<para>
|
||||
This signal is emitted when the pixbuf loader has been fed the
|
||||
initial amount of data that is required to figure out the size and
|
||||
format of the image that it will create. After this signal is
|
||||
emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to
|
||||
fetch the partially-loaded pixbuf.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
<!-- # Unused Parameters # -->
|
||||
@loader: Loader which emitted the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::frame-done ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::animation-done ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
|
||||
<para>
|
||||
This signal is emitted when gdk_pixbuf_loader_close() is called.
|
||||
It can be used by different parts of an application to receive
|
||||
notification when an image loader is closed by the code that
|
||||
drives it.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
<!-- # Unused Parameters # -->
|
||||
@loader: Loader which emitted the signal.
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
114
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
Normal file
114
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
Normal file
@@ -0,0 +1,114 @@
|
||||
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_load_module ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_module:
|
||||
|
||||
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Short_Description ##### -->
|
||||
|
||||
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufModule ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@module_name:
|
||||
@format_check:
|
||||
@module:
|
||||
@load:
|
||||
@load_xpm_data:
|
||||
@begin_load:
|
||||
@stop_load:
|
||||
@load_increment:
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:y_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION ModuleUpdatedNotifyFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@user_data:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Title ##### -->
|
||||
gdk-pixbuf-io
|
||||
|
||||
|
||||
<!-- ##### 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_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>
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION ModulePreparedNotifyFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@user_data:
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:x_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_module ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### ARG GnomeCanvasPixbuf:width_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
108
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml
Normal file
108
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml
Normal file
@@ -0,0 +1,108 @@
|
||||
<!-- ##### 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. It is actually a
|
||||
simple wrapper that adds reference counting capabilities to an
|
||||
#ArtPixBuf structure.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#ArtPixBuf
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkPixbuf ##### -->
|
||||
<para>
|
||||
This is the main structure in the GdkPixbuf library. This
|
||||
structure adds reference counting capabilities to an #ArtPixBuf
|
||||
structure.
|
||||
</para>
|
||||
|
||||
@ref_count: Reference count.
|
||||
@art_pixbuf: An #ArtPixBuf that actually contains the description of
|
||||
the image data.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_format ##### -->
|
||||
<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:
|
||||
-->
|
||||
|
||||
|
||||
302
docs/reference/gdk-pixbuf/tmpl/gnome-canvas-pixbuf.sgml
Normal file
302
docs/reference/gdk-pixbuf/tmpl/gnome-canvas-pixbuf.sgml
Normal file
@@ -0,0 +1,302 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GnomeCanvasPixbuf
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Canvas item to display #GdkPixbuf images.
|
||||
|
||||
<!-- ##### SECTION 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 See_Also ##### -->
|
||||
<para>
|
||||
#GnomeCanvas, #GdkPixbuf
|
||||
</para>
|
||||
|
||||
<!-- ##### MACRO GNOME_CANVAS_PIXBUF ##### -->
|
||||
<para>
|
||||
Casts a #GtkOjbect to a #GnomeCanvasPixbuf.
|
||||
</para>
|
||||
|
||||
@obj: A GTK+ object.
|
||||
|
||||
|
||||
<!-- ##### 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_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's #ArtPixBuf will be
|
||||
used instead. This argument is %FALSE by default.
|
||||
</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: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_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: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: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: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:
|
||||
-->
|
||||
|
||||
44
docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
Normal file
44
docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
Normal file
@@ -0,0 +1,44 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Reference Counting
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions to perform reference counting on a #GdkPixbuf.
|
||||
|
||||
<!-- ##### 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. When it no longer needs
|
||||
the pixbuf, it should subtract a reference. The pixbuf will be
|
||||
destroyed when its reference count drops to zero. Newly-created
|
||||
#GdkPixbuf structures start with a reference count of one.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbuf, #ArtPixBuf
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
128
docs/reference/gdk-pixbuf/tmpl/rendering.sgml
Normal file
128
docs/reference/gdk-pixbuf/tmpl/rendering.sgml
Normal file
@@ -0,0 +1,128 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Rendering
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Rendering a pixbuf to a GDK drawable.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The GdkPixbuf 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
|
||||
GdkPixbuf 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. If you are using
|
||||
GNOME, gnome_init() will do this for you automatically.
|
||||
Otherwise, you can do this by calling gdk_rgb_init() near the
|
||||
beginning of your program.
|
||||
|
||||
</para>
|
||||
</important>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
GdkRGB
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkPixbufAlphaMode ##### -->
|
||||
<para>
|
||||
These values can be passed to
|
||||
gdk_pixbuf_render_to_drawable_alpha() to control how the alpha
|
||||
chanel 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.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_to_drawable_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@drawable:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@alpha_mode:
|
||||
@alpha_threshold:
|
||||
@dither:
|
||||
@x_dither:
|
||||
@y_dither:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_to_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@drawable:
|
||||
@gc:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@dither:
|
||||
@x_dither:
|
||||
@y_dither:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_threshold_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@bitmap:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@alpha_threshold: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@pixmap_return:
|
||||
@mask_return:
|
||||
@alpha_threshold:
|
||||
|
||||
|
||||
162
docs/reference/gdk-pixbuf/tmpl/scaling.sgml
Normal file
162
docs/reference/gdk-pixbuf/tmpl/scaling.sgml
Normal file
@@ -0,0 +1,162 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Scaling
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Scaling pixbufs and scaling and compositing pixbufs
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
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 pixmap.
|
||||
</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>
|
||||
|
||||
<programlisting>
|
||||
gboolean
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkPixbuf *dest;
|
||||
|
||||
gdk_window_set_back_pixmap (widget->window, NULL, FALSE);
|
||||
|
||||
dest = gdk_pixbuf_new (ART_PIX_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 / pixbuf->art_pixbuf->width,
|
||||
(double) widget->allocation.height / pixbuf->art_pixbuf->height,
|
||||
filter_level, 255,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
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>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_scale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@offset_x:
|
||||
@offset_y:
|
||||
@scale_x:
|
||||
@scale_y:
|
||||
@filter_level:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_composite ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@offset_x:
|
||||
@offset_y:
|
||||
@scale_x:
|
||||
@scale_y:
|
||||
@filter_level:
|
||||
@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:
|
||||
@filter_level:
|
||||
@overall_alpha:
|
||||
@check_x:
|
||||
@check_y:
|
||||
@check_size:
|
||||
@color1:
|
||||
@color2:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_scale_simple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@filter_level:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_composite_color_simple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest_width:
|
||||
@dest_height:
|
||||
@filter_level:
|
||||
@overall_alpha:
|
||||
@check_size:
|
||||
@color1:
|
||||
@color2:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
52
docs/reference/gdk-pixbuf/tmpl/util.sgml
Normal file
52
docs/reference/gdk-pixbuf/tmpl/util.sgml
Normal file
@@ -0,0 +1,52 @@
|
||||
<!-- ##### 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>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_add_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@substitute_color:
|
||||
@r:
|
||||
@g:
|
||||
@b:
|
||||
@Returns: <!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_copy_area ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src_pixbuf:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@width:
|
||||
@height:
|
||||
@dest_pixbuf:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
|
||||
|
||||
6
docs/reference/gdk/.cvsignore
Normal file
6
docs/reference/gdk/.cvsignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
sgml
|
||||
html
|
||||
gdk-decl-list.txt
|
||||
gdk-unused.txt
|
||||
50
docs/reference/gdk/Makefile.am
Normal file
50
docs/reference/gdk/Makefile.am
Normal file
@@ -0,0 +1,50 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gdk
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gdk-docs.sgml
|
||||
|
||||
# We could alternatively use this for using installed headers.
|
||||
INCLUDE_DIR=`gtk-config --prefix`/include/gdk
|
||||
|
||||
|
||||
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
||||
|
||||
scan:
|
||||
gtkdoc-scan --module=$(DOC_MODULE) $(INCLUDE_DIR)/gdk.h $(INCLUDE_DIR)/gdktypes.h $(INCLUDE_DIR)/gdkrgb.h
|
||||
|
||||
templates: scan
|
||||
gtkdoc-mktmpl --module=$(DOC_MODULE)
|
||||
|
||||
sgml:
|
||||
gtkdoc-mkdb --module=$(DOC_MODULE)
|
||||
|
||||
html:
|
||||
if ! test -d html ; then mkdir html ; fi
|
||||
-cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt
|
||||
|
||||
maintainer-clean-local: clean
|
||||
rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
|
||||
|
||||
install-data-local:
|
||||
install -d -m 0755 $(TARGET_DIR)
|
||||
install -m 0644 html/*.html $(TARGET_DIR)
|
||||
install -m 0644 html/index.sgml $(TARGET_DIR)
|
||||
gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(DOC_MAIN_SGML_FILE) \
|
||||
$(DOC_MODULE)-sections.txt \
|
||||
gdk-overrides.txt \
|
||||
gdk-decl.txt
|
||||
|
||||
dist-hook:
|
||||
mkdir $(distdir)/tmpl
|
||||
cp -p tmpl/*.sgml $(distdir)/tmpl
|
||||
|
||||
.PHONY : html sgml templates scan
|
||||
2919
docs/reference/gdk/gdk-decl.txt
Normal file
2919
docs/reference/gdk/gdk-decl.txt
Normal file
File diff suppressed because it is too large
Load Diff
59
docs/reference/gdk/gdk-docs.sgml
Normal file
59
docs/reference/gdk/gdk-docs.sgml
Normal file
@@ -0,0 +1,59 @@
|
||||
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
|
||||
<!entity gdk-General SYSTEM "sgml/general.sgml">
|
||||
<!entity gdk-Bitmaps-and-Pixmaps SYSTEM "sgml/pixmaps.sgml">
|
||||
<!entity gdk-Images SYSTEM "sgml/images.sgml">
|
||||
<!entity gdk-GdkRGB SYSTEM "sgml/rgb.sgml">
|
||||
<!entity gdk-Colormaps-and-Colors SYSTEM "sgml/colors.sgml">
|
||||
<!entity gdk-Fonts SYSTEM "sgml/fonts.sgml">
|
||||
<!entity gdk-Drawing-Primitives SYSTEM "sgml/drawing.sgml">
|
||||
<!entity gdk-Graphics-Contexts SYSTEM "sgml/gcs.sgml">
|
||||
<!entity gdk-Visuals SYSTEM "sgml/visuals.sgml">
|
||||
<!entity gdk-Windows SYSTEM "sgml/windows.sgml">
|
||||
<!entity gdk-Selections SYSTEM "sgml/selections.sgml">
|
||||
<!entity gdk-Properties-and-Atoms SYSTEM "sgml/properties.sgml">
|
||||
<!entity gdk-Input-Methods SYSTEM "sgml/input_methods.sgml">
|
||||
<!entity gdk-Input-Contexts SYSTEM "sgml/input_contexts.sgml">
|
||||
<!entity gdk-Color-Contexts SYSTEM "sgml/color_contexts.sgml">
|
||||
<!entity gdk-Points-Rectangles-and-Regions SYSTEM "sgml/regions.sgml">
|
||||
<!entity gdk-Threads SYSTEM "sgml/threads.sgml">
|
||||
<!entity gdk-Key-Values SYSTEM "sgml/keys.sgml">
|
||||
<!entity gdk-Input-Devices SYSTEM "sgml/input_devices.sgml">
|
||||
<!entity gdk-Events SYSTEM "sgml/events.sgml">
|
||||
<!entity gdk-Event-Structures SYSTEM "sgml/event_structs.sgml">
|
||||
<!entity gdk-Cursors SYSTEM "sgml/cursors.sgml">
|
||||
<!entity gdk-Input SYSTEM "sgml/input.sgml">
|
||||
<!entity gdk-Drag-and-Drop SYSTEM "sgml/dnd.sgml">
|
||||
]>
|
||||
<book id="index">
|
||||
<bookinfo>
|
||||
<title>GDK Reference Manual</title>
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="gdk">
|
||||
<title>GDK</title>
|
||||
&gdk-General;
|
||||
&gdk-Bitmaps-and-Pixmaps;
|
||||
&gdk-Images;
|
||||
&gdk-GdkRGB;
|
||||
&gdk-Colormaps-and-Colors;
|
||||
&gdk-Fonts;
|
||||
&gdk-Drawing-Primitives;
|
||||
&gdk-Graphics-Contexts;
|
||||
&gdk-Visuals;
|
||||
&gdk-Windows;
|
||||
&gdk-Selections;
|
||||
&gdk-Properties-and-Atoms;
|
||||
&gdk-Input-Methods;
|
||||
&gdk-Input-Contexts;
|
||||
&gdk-Color-Contexts;
|
||||
&gdk-Points-Rectangles-and-Regions;
|
||||
&gdk-Threads;
|
||||
&gdk-Key-Values;
|
||||
&gdk-Input-Devices;
|
||||
&gdk-Events;
|
||||
&gdk-Event-Structures;
|
||||
&gdk-Cursors;
|
||||
&gdk-Input;
|
||||
&gdk-Drag-and-Drop;
|
||||
</chapter>
|
||||
</book>
|
||||
23
docs/reference/gdk/gdk-overrides.txt
Normal file
23
docs/reference/gdk/gdk-overrides.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
# GdkPixmap, GdkBitmap and GdkDrawable are the same as GdkWindow.
|
||||
<STRUCT>
|
||||
<NAME>GdkPixmap</NAME>
|
||||
struct GdkPixmap
|
||||
{
|
||||
gpointer user_data;
|
||||
};
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkBitmap</NAME>
|
||||
struct GdkBitmap
|
||||
{
|
||||
gpointer user_data;
|
||||
};
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkDrawable</NAME>
|
||||
struct GdkDrawable
|
||||
{
|
||||
gpointer user_data;
|
||||
};
|
||||
</STRUCT>
|
||||
588
docs/reference/gdk/gdk-sections.txt
Normal file
588
docs/reference/gdk/gdk-sections.txt
Normal file
@@ -0,0 +1,588 @@
|
||||
|
||||
<INCLUDE>gdk/gdk.h</INCLUDE>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>General</TITLE>
|
||||
<FILE>general</FILE>
|
||||
gdk_init
|
||||
gdk_init_check
|
||||
gdk_exit
|
||||
GdkStatus
|
||||
GDK_NONE
|
||||
GDK_CURRENT_TIME
|
||||
GDK_PRIORITY_EVENTS
|
||||
gdk_set_locale
|
||||
gdk_get_show_events
|
||||
gdk_set_show_events
|
||||
gdk_add_client_message_filter
|
||||
gdk_set_sm_client_id
|
||||
gdk_get_use_xshm
|
||||
gdk_set_use_xshm
|
||||
gdk_get_display
|
||||
gdk_screen_width
|
||||
gdk_screen_height
|
||||
gdk_screen_width_mm
|
||||
gdk_screen_height_mm
|
||||
gdk_pointer_grab
|
||||
gdk_pointer_ungrab
|
||||
gdk_keyboard_grab
|
||||
gdk_keyboard_ungrab
|
||||
gdk_pointer_is_grabbed
|
||||
gdk_flush
|
||||
gdk_beep
|
||||
gdk_key_repeat_disable
|
||||
gdk_key_repeat_restore
|
||||
gdk_error_trap_push
|
||||
gdk_error_trap_pop
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_time_get
|
||||
gdk_timer_get
|
||||
gdk_timer_set
|
||||
gdk_timer_enable
|
||||
gdk_timer_disable
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Bitmaps and Pixmaps</TITLE>
|
||||
<FILE>pixmaps</FILE>
|
||||
GdkPixmap
|
||||
gdk_pixmap_new
|
||||
gdk_bitmap_create_from_data
|
||||
gdk_pixmap_create_from_data
|
||||
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_ref
|
||||
gdk_pixmap_unref
|
||||
GdkBitmap
|
||||
gdk_bitmap_ref
|
||||
gdk_bitmap_unref
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Images</TITLE>
|
||||
<FILE>images</FILE>
|
||||
GdkImage
|
||||
GdkImageType
|
||||
gdk_image_new_bitmap
|
||||
gdk_image_new
|
||||
gdk_image_get
|
||||
gdk_image_put_pixel
|
||||
gdk_image_get_pixel
|
||||
gdk_image_destroy
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>GdkRGB</TITLE>
|
||||
<FILE>rgb</FILE>
|
||||
gdk_rgb_init
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_draw_rgb_image
|
||||
gdk_draw_rgb_image_dithalign
|
||||
gdk_draw_indexed_image
|
||||
gdk_draw_gray_image
|
||||
gdk_draw_rgb_32_image
|
||||
GdkRgbDither
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_rgb_cmap_new
|
||||
gdk_rgb_cmap_free
|
||||
GdkRgbCmap
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_rgb_gc_set_foreground
|
||||
gdk_rgb_gc_set_background
|
||||
gdk_rgb_xpixel_from_rgb
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_rgb_set_install
|
||||
gdk_rgb_set_min_colors
|
||||
gdk_rgb_get_visual
|
||||
gdk_rgb_get_cmap
|
||||
gdk_rgb_ditherable
|
||||
gdk_rgb_set_verbose
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Colormaps and Colors</TITLE>
|
||||
<FILE>colors</FILE>
|
||||
GdkColor
|
||||
GdkColormap
|
||||
gdk_colormap_new
|
||||
gdk_colormap_ref
|
||||
gdk_colormap_unref
|
||||
gdk_colormap_get_system
|
||||
gdk_colormap_get_system_size
|
||||
gdk_colormap_change
|
||||
gdk_colormap_alloc_colors
|
||||
gdk_colormap_alloc_color
|
||||
gdk_colormap_free_colors
|
||||
gdk_colormap_get_visual
|
||||
gdk_colors_store
|
||||
gdk_color_copy
|
||||
gdk_color_free
|
||||
gdk_colors_alloc
|
||||
gdk_colors_free
|
||||
gdk_color_white
|
||||
gdk_color_black
|
||||
gdk_color_parse
|
||||
gdk_color_alloc
|
||||
gdk_color_change
|
||||
gdk_color_equal
|
||||
gdk_color_hash
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Fonts</TITLE>
|
||||
<FILE>fonts</FILE>
|
||||
GdkFont
|
||||
GdkFontType
|
||||
gdk_font_load
|
||||
gdk_fontset_load
|
||||
gdk_font_ref
|
||||
gdk_font_unref
|
||||
gdk_font_id
|
||||
gdk_font_equal
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_string_extents
|
||||
gdk_text_extents
|
||||
gdk_text_extents_wc
|
||||
gdk_string_width
|
||||
gdk_text_width
|
||||
gdk_text_width_wc
|
||||
gdk_char_width
|
||||
gdk_char_width_wc
|
||||
gdk_string_measure
|
||||
gdk_text_measure
|
||||
gdk_char_measure
|
||||
gdk_string_height
|
||||
gdk_text_height
|
||||
gdk_char_height
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Drawing Primitives</TITLE>
|
||||
<FILE>drawing</FILE>
|
||||
GdkFill
|
||||
GdkLineStyle
|
||||
GdkCapStyle
|
||||
GdkJoinStyle
|
||||
|
||||
gdk_draw_point
|
||||
gdk_draw_points
|
||||
gdk_draw_line
|
||||
gdk_draw_lines
|
||||
gdk_draw_segments
|
||||
GdkSegment
|
||||
gdk_draw_rectangle
|
||||
gdk_draw_arc
|
||||
gdk_draw_polygon
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_draw_string
|
||||
gdk_draw_text
|
||||
gdk_draw_text_wc
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_draw_pixmap
|
||||
gdk_draw_bitmap
|
||||
gdk_draw_image
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Graphics Contexts</TITLE>
|
||||
<FILE>gcs</FILE>
|
||||
GdkGC
|
||||
GdkGCValues
|
||||
GdkGCValuesMask
|
||||
|
||||
GdkFunction
|
||||
|
||||
gdk_gc_new
|
||||
gdk_gc_new_with_values
|
||||
gdk_gc_ref
|
||||
gdk_gc_unref
|
||||
gdk_gc_destroy
|
||||
gdk_gc_get_values
|
||||
gdk_gc_set_foreground
|
||||
gdk_gc_set_background
|
||||
gdk_gc_set_font
|
||||
gdk_gc_set_function
|
||||
gdk_gc_set_fill
|
||||
gdk_gc_set_tile
|
||||
gdk_gc_set_stipple
|
||||
gdk_gc_set_ts_origin
|
||||
gdk_gc_set_clip_origin
|
||||
gdk_gc_set_clip_mask
|
||||
gdk_gc_set_clip_rectangle
|
||||
gdk_gc_set_clip_region
|
||||
gdk_gc_set_subwindow
|
||||
GdkSubwindowMode
|
||||
gdk_gc_set_exposures
|
||||
gdk_gc_set_line_attributes
|
||||
gdk_gc_set_dashes
|
||||
gdk_gc_copy
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Visuals</TITLE>
|
||||
<FILE>visuals</FILE>
|
||||
GdkVisual
|
||||
GdkVisualType
|
||||
GdkByteOrder
|
||||
gdk_query_depths
|
||||
gdk_query_visual_types
|
||||
gdk_list_visuals
|
||||
|
||||
gdk_visual_get_best_depth
|
||||
gdk_visual_get_best_type
|
||||
gdk_visual_get_system
|
||||
gdk_visual_get_best
|
||||
gdk_visual_get_best_with_depth
|
||||
gdk_visual_get_best_with_type
|
||||
gdk_visual_get_best_with_both
|
||||
gdk_visual_ref
|
||||
gdk_visual_unref
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Windows</TITLE>
|
||||
<FILE>windows</FILE>
|
||||
GdkWindowAttr
|
||||
GdkWindow
|
||||
GdkWindowType
|
||||
GdkWindowClass
|
||||
GdkWindowAttributesType
|
||||
GdkWindowHints
|
||||
GdkGeometry
|
||||
|
||||
gdk_window_new
|
||||
gdk_window_destroy
|
||||
gdk_window_ref
|
||||
gdk_window_unref
|
||||
gdk_window_at_pointer
|
||||
gdk_window_show
|
||||
gdk_window_hide
|
||||
gdk_window_is_visible
|
||||
gdk_window_is_viewable
|
||||
gdk_window_withdraw
|
||||
gdk_window_move
|
||||
gdk_window_resize
|
||||
gdk_window_move_resize
|
||||
gdk_window_reparent
|
||||
gdk_window_clear
|
||||
gdk_window_clear_area
|
||||
gdk_window_clear_area_e
|
||||
gdk_window_copy_area
|
||||
gdk_window_raise
|
||||
gdk_window_lower
|
||||
gdk_window_register_dnd
|
||||
gdk_window_set_user_data
|
||||
gdk_window_set_override_redirect
|
||||
gdk_window_add_filter
|
||||
gdk_window_remove_filter
|
||||
GdkFilterFunc
|
||||
GdkFilterReturn
|
||||
gdk_window_shape_combine_mask
|
||||
gdk_window_set_child_shapes
|
||||
gdk_window_merge_child_shapes
|
||||
gdk_window_set_static_gravities
|
||||
gdk_window_set_hints
|
||||
gdk_window_set_title
|
||||
gdk_window_set_background
|
||||
gdk_window_set_back_pixmap
|
||||
GDK_PARENT_RELATIVE
|
||||
gdk_window_set_cursor
|
||||
gdk_window_set_colormap
|
||||
gdk_window_get_user_data
|
||||
gdk_window_get_geometry
|
||||
gdk_window_set_geometry_hints
|
||||
gdk_window_get_position
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_size
|
||||
gdk_window_get_visual
|
||||
gdk_window_get_colormap
|
||||
gdk_window_get_type
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_deskrelative_origin
|
||||
gdk_window_get_pointer
|
||||
GdkModifierType
|
||||
gdk_window_get_parent
|
||||
gdk_window_get_toplevel
|
||||
gdk_window_get_children
|
||||
gdk_window_get_events
|
||||
gdk_window_set_events
|
||||
gdk_window_set_icon
|
||||
gdk_window_set_icon_name
|
||||
gdk_window_set_transient_for
|
||||
gdk_window_set_role
|
||||
gdk_window_set_group
|
||||
gdk_window_set_decorations
|
||||
GdkWMDecoration
|
||||
gdk_window_set_functions
|
||||
GdkWMFunction
|
||||
gdk_window_get_toplevels
|
||||
GdkDrawable
|
||||
gdk_drawable_set_data
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Selections</TITLE>
|
||||
<FILE>selections</FILE>
|
||||
GdkSelection
|
||||
GdkSelectionType
|
||||
GdkTarget
|
||||
gdk_selection_owner_set
|
||||
gdk_selection_owner_get
|
||||
gdk_selection_convert
|
||||
gdk_selection_property_get
|
||||
gdk_selection_send_notify
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Properties and Atoms</TITLE>
|
||||
<FILE>properties</FILE>
|
||||
GdkAtom
|
||||
gdk_text_property_to_text_list
|
||||
gdk_free_text_list
|
||||
gdk_string_to_compound_text
|
||||
gdk_free_compound_text
|
||||
gdk_atom_intern
|
||||
gdk_atom_name
|
||||
gdk_property_get
|
||||
gdk_property_change
|
||||
GdkPropMode
|
||||
gdk_property_delete
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Input Methods</TITLE>
|
||||
<FILE>input_methods</FILE>
|
||||
GdkIMStyle
|
||||
GdkWChar
|
||||
gdk_im_ready
|
||||
gdk_im_begin
|
||||
gdk_im_end
|
||||
gdk_im_decide_style
|
||||
gdk_im_set_best_style
|
||||
|
||||
gdk_wcstombs
|
||||
gdk_mbstowcs
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Input Contexts</TITLE>
|
||||
<FILE>input_contexts</FILE>
|
||||
GdkIC
|
||||
GdkICAttr
|
||||
GdkICAttributesType
|
||||
gdk_ic_new
|
||||
gdk_ic_destroy
|
||||
gdk_ic_get_style
|
||||
gdk_ic_set_attr
|
||||
gdk_ic_get_attr
|
||||
gdk_ic_get_events
|
||||
gdk_ic_attr_new
|
||||
gdk_ic_attr_destroy
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Color Contexts</TITLE>
|
||||
<FILE>color_contexts</FILE>
|
||||
GdkColorContext
|
||||
GdkColorContextDither
|
||||
GdkColorContextMode
|
||||
|
||||
gdk_color_context_new
|
||||
gdk_color_context_new_mono
|
||||
gdk_color_context_free
|
||||
gdk_color_context_get_pixel
|
||||
gdk_color_context_get_pixels
|
||||
gdk_color_context_get_pixels_incremental
|
||||
gdk_color_context_query_color
|
||||
gdk_color_context_query_colors
|
||||
gdk_color_context_add_palette
|
||||
gdk_color_context_init_dither
|
||||
gdk_color_context_free_dither
|
||||
gdk_color_context_get_pixel_from_palette
|
||||
gdk_color_context_get_index_from_palette
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Points, Rectangles and Regions</TITLE>
|
||||
<FILE>regions</FILE>
|
||||
GdkPoint
|
||||
|
||||
<SUBSECTION>
|
||||
GdkRectangle
|
||||
gdk_rectangle_intersect
|
||||
gdk_rectangle_union
|
||||
|
||||
<SUBSECTION>
|
||||
GdkRegion
|
||||
gdk_region_new
|
||||
gdk_region_polygon
|
||||
GdkFillRule
|
||||
gdk_region_destroy
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_regions_intersect
|
||||
gdk_regions_union
|
||||
gdk_regions_subtract
|
||||
gdk_regions_xor
|
||||
gdk_region_union_with_rect
|
||||
gdk_region_offset
|
||||
gdk_region_shrink
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_region_empty
|
||||
gdk_region_equal
|
||||
gdk_region_point_in
|
||||
gdk_region_rect_in
|
||||
GdkOverlapType
|
||||
gdk_region_get_clipbox
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Threads</TITLE>
|
||||
<FILE>threads</FILE>
|
||||
gdk_threads_mutex
|
||||
GDK_THREADS_ENTER
|
||||
GDK_THREADS_LEAVE
|
||||
gdk_threads_enter
|
||||
gdk_threads_leave
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Key Values</TITLE>
|
||||
<FILE>keys</FILE>
|
||||
gdk_keyval_name
|
||||
gdk_keyval_from_name
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_is_upper
|
||||
gdk_keyval_is_lower
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_to_upper
|
||||
gdk_keyval_to_lower
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Input Devices</TITLE>
|
||||
<FILE>input_devices</FILE>
|
||||
GDK_CORE_POINTER
|
||||
gdk_input_list_devices
|
||||
GdkDeviceInfo
|
||||
GdkDeviceKey
|
||||
gdk_input_set_extension_events
|
||||
GdkExtensionMode
|
||||
gdk_input_set_source
|
||||
GdkInputSource
|
||||
gdk_input_set_mode
|
||||
GdkInputMode
|
||||
gdk_input_set_axes
|
||||
GdkAxisUse
|
||||
gdk_input_set_key
|
||||
gdk_input_window_get_pointer
|
||||
gdk_input_motion_events
|
||||
GdkTimeCoord
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_input_init
|
||||
gdk_input_exit
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Events</TITLE>
|
||||
<FILE>events</FILE>
|
||||
GdkEventType
|
||||
GdkEventMask
|
||||
|
||||
gdk_events_pending
|
||||
gdk_event_peek
|
||||
gdk_event_get
|
||||
gdk_event_get_graphics_expose
|
||||
gdk_event_put
|
||||
gdk_event_copy
|
||||
gdk_event_free
|
||||
gdk_event_get_time
|
||||
gdk_event_handler_set
|
||||
gdk_event_send_client_message
|
||||
|
||||
GdkEventFunc
|
||||
|
||||
gdk_event_send_clientmessage_toall
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Event Structures</TITLE>
|
||||
<FILE>event_structs</FILE>
|
||||
GdkEventAny
|
||||
GdkEventExpose
|
||||
GdkEventNoExpose
|
||||
GdkEventVisibility
|
||||
GdkVisibilityState
|
||||
GdkEventMotion
|
||||
GdkEventButton
|
||||
GdkEventKey
|
||||
GdkEventCrossing
|
||||
GdkCrossingMode
|
||||
GdkNotifyType
|
||||
GdkEventFocus
|
||||
GdkEventConfigure
|
||||
GdkEventProperty
|
||||
GdkPropertyState
|
||||
GdkEventSelection
|
||||
GdkEventProximity
|
||||
GdkEventClient
|
||||
GdkEventDND
|
||||
GdkEvent
|
||||
GdkXEvent
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Cursors</TITLE>
|
||||
<FILE>cursors</FILE>
|
||||
GdkCursor
|
||||
GdkCursorType
|
||||
gdk_cursor_new
|
||||
gdk_cursor_new_from_pixmap
|
||||
gdk_cursor_destroy
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Input</TITLE>
|
||||
<FILE>input</FILE>
|
||||
gdk_input_add_full
|
||||
GdkInputCondition
|
||||
GdkInputFunction
|
||||
GdkDestroyNotify
|
||||
gdk_input_add
|
||||
gdk_input_remove
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Drag and Drop</TITLE>
|
||||
<FILE>dnd</FILE>
|
||||
gdk_drag_get_selection
|
||||
gdk_drag_abort
|
||||
gdk_drop_reply
|
||||
gdk_drag_context_new
|
||||
gdk_drag_drop
|
||||
gdk_drag_find_window
|
||||
gdk_drag_context_ref
|
||||
gdk_drag_begin
|
||||
gdk_drag_motion
|
||||
gdk_drop_finish
|
||||
gdk_drag_get_protocol
|
||||
GdkDragProtocol
|
||||
gdk_drag_context_unref
|
||||
GdkDragContext
|
||||
GdkDragAction
|
||||
gdk_drag_status
|
||||
</SECTION>
|
||||
202
docs/reference/gdk/tmpl/color_contexts.sgml
Normal file
202
docs/reference/gdk/tmpl/color_contexts.sgml
Normal file
@@ -0,0 +1,202 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Color Contexts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkColorContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@num_colors:
|
||||
@max_colors:
|
||||
@num_allocated:
|
||||
@mode:
|
||||
@need_to_free_colormap:
|
||||
@std_cmap_atom:
|
||||
@clut:
|
||||
@cmap:
|
||||
@color_hash:
|
||||
@palette:
|
||||
@num_palette:
|
||||
@fast_dither:
|
||||
|
||||
<!-- ##### STRUCT GdkColorContextDither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@fast_rgb:
|
||||
@fast_err:
|
||||
@fast_erg:
|
||||
@fast_erb:
|
||||
|
||||
<!-- ##### ENUM GdkColorContextMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_CC_MODE_UNDEFINED:
|
||||
@GDK_CC_MODE_BW:
|
||||
@GDK_CC_MODE_STD_CMAP:
|
||||
@GDK_CC_MODE_TRUE:
|
||||
@GDK_CC_MODE_MY_GRAY:
|
||||
@GDK_CC_MODE_PALETTE:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_new_mono ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@reds:
|
||||
@greens:
|
||||
@blues:
|
||||
@ncolors:
|
||||
@colors:
|
||||
@nallocated:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixels_incremental ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@reds:
|
||||
@greens:
|
||||
@blues:
|
||||
@ncolors:
|
||||
@used:
|
||||
@colors:
|
||||
@nallocated:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_query_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_query_colors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@colors:
|
||||
@num_colors:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_add_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@palette:
|
||||
@num_palette:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_init_dither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_free_dither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixel_from_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_index_from_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
|
||||
390
docs/reference/gdk/tmpl/colors.sgml
Normal file
390
docs/reference/gdk/tmpl/colors.sgml
Normal file
@@ -0,0 +1,390 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Colormaps and Colors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
manipulation of colors and colormaps.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions are used to modify colormaps.
|
||||
A colormap is an object that contains the mapping
|
||||
between the color values stored in memory and
|
||||
the RGB values that are used to display color
|
||||
values. In general, colormaps only contain
|
||||
significant information for pseudo-color visuals,
|
||||
but even for other visual types, a colormap object
|
||||
is required in some circumstances.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are a couple of special colormaps that can
|
||||
be retrieved. The system colormap (retrieved
|
||||
with gdk_colormap_get_system()) is the default
|
||||
colormap of the system. If you are using GdkRGB,
|
||||
there is another colormap that is important - the
|
||||
colormap in which GdkRGB works, retrieved with
|
||||
gdk_rgb_get_cmap(). However, when using GdkRGB,
|
||||
it is not generally necessary to allocate colors
|
||||
directly.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In previous revisions of this interface, a number
|
||||
of functions that take a #GdkColormap parameter
|
||||
were replaced with functions whose names began
|
||||
with "gdk_colormap_". This process will probably
|
||||
be extended somewhat in the future -
|
||||
gdk_color_white(), gdk_color_black(), and
|
||||
gdk_color_change() will probably become aliases.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkColor ##### -->
|
||||
<para>
|
||||
The #GdkColor structure is used to describe an
|
||||
allocated or unallocated color.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry><structfield>pixel</structfield></entry>
|
||||
<entry>For allocated colors, the value used to
|
||||
draw this color on the screen.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>red</structfield></entry>
|
||||
<entry>The red component of the color. This is
|
||||
a value between 0 and 65535, with 65535 indicating
|
||||
full intensitiy.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>green</structfield></entry>
|
||||
<entry>the blue component of the color.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>blue</structfield></entry>
|
||||
<entry>the green component of the color..</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@pixel:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
|
||||
<!-- ##### STRUCT GdkColormap ##### -->
|
||||
<para>
|
||||
The colormap structure contains the following public
|
||||
fields.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry><structfield>size</structfield></entry>
|
||||
<entry>For pseudo-color colormaps, the number of colors
|
||||
in the colormap..</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>colors</structfield></entry>
|
||||
<entry>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.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@colors:
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_new ##### -->
|
||||
<para>
|
||||
Create a new colormap for the given visual.
|
||||
</para>
|
||||
|
||||
@visual: a #GdkVisual.
|
||||
@allocate: if %TRUE, the newly created colormap will be
|
||||
a private colormap, and all colors in it will be
|
||||
allocated for the applications use.
|
||||
@Returns: the new #GdkColormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count of a colormap.
|
||||
</para>
|
||||
|
||||
@cmap: a #GdkColormap.
|
||||
@Returns: @cmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count of a colormap. If the
|
||||
resulting reference count is zero, destroys the colormap.
|
||||
</para>
|
||||
|
||||
@cmap: a #GdkColormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
|
||||
<para>
|
||||
Returns the system's default colormap.
|
||||
</para>
|
||||
|
||||
@Returns: the default colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system_size ##### -->
|
||||
<para>
|
||||
Returns the size of the system's default colormap.
|
||||
(See the description of struct #GdkColormap for an
|
||||
explanation of the size of a colormap.)
|
||||
</para>
|
||||
|
||||
@Returns: the size of the system's default colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_change ##### -->
|
||||
<para>
|
||||
Change the value of the first @ncolors in a private colormap
|
||||
to match the values in the <structfield>colors</structfield>
|
||||
array in the color map. This function is obsolete and
|
||||
should not be used. See gdk_color_change().
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@ncolors: the number of colors to change.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
|
||||
<para>
|
||||
Allocates colors from a colormap.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: The color values to allocate. On return, the pixel
|
||||
values for allocated colors will be filled in.
|
||||
@ncolors: The number of colors in @colors.
|
||||
@writeable: If %TRUE, the colors are allocated writeable
|
||||
(their values can later be changed using gdk_color_change()).
|
||||
Writeable colors cannot be shared between applications.
|
||||
@best_match: If %TRUE, GDK will attempt to do matching against
|
||||
existing colors if the colors cannot be allocated as
|
||||
requested.
|
||||
@success: An array of length @ncolors. On return, this
|
||||
indicates whether the corresponding color in @colors was
|
||||
sucessfully allocated or not.
|
||||
@Returns: The number of colors that were not sucessfully
|
||||
allocated.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
|
||||
<para>
|
||||
Allocate a single color from a colormap.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the color to allocate. On return the
|
||||
<structfield>pixel</structfield> field will be
|
||||
filled in if allocation succeeds.
|
||||
@writeable: If %TRUE, the color is allocated writeable
|
||||
(their values can later be changed using gdk_color_change()).
|
||||
Writeable colors cannot be shared between applications.
|
||||
@best_match: If %TRUE, GDK will attempt to do matching against
|
||||
existing colors if the color cannot be allocated as
|
||||
requested.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
|
||||
<para>
|
||||
Free previously allocated colors.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: the colors to free.
|
||||
@ncolors: the number of colors in @colors.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
|
||||
<para>
|
||||
Return the visual for which a given colormap was created.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@Returns: the visual of the colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_store ##### -->
|
||||
<para>
|
||||
Change the value of the first @ncolors colors in
|
||||
a private colormap. This function is obsolete and
|
||||
should not be used. See gdk_color_change().
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: the new color values.
|
||||
@ncolors: the number of colors to change.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_copy ##### -->
|
||||
<para>
|
||||
Make a copy of a color structure. The result
|
||||
must be freed using gdk_color_free().
|
||||
</para>
|
||||
|
||||
@color: a #GdkColor.
|
||||
@Returns: a copy of @color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_free ##### -->
|
||||
<para>
|
||||
Free a color structure created with
|
||||
gdk_color_copy().
|
||||
</para>
|
||||
|
||||
@color: a #GdkColor.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_alloc ##### -->
|
||||
<para>
|
||||
Allocate colors from a colormap. This function
|
||||
is obsolete. See gdk_colormap_alloc_colors().
|
||||
For full documentation of the fields, see
|
||||
the Xlib documentation for XAllocColorCells.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@contiguous: if %TRUE, the colors should be allocated
|
||||
in contiguous color cells.
|
||||
@planes: an array in which to store the plane masks.
|
||||
@nplanes: the number of planes to allocate. (Or zero,
|
||||
to indicate that the color allocation should not be
|
||||
planar.)
|
||||
@pixels: an array into which to store allocated pixel
|
||||
values.
|
||||
@npixels: the number of pixels in each plane to allocate.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_free ##### -->
|
||||
<para>
|
||||
Free colors allocated with gdk_colors_alloc(). This
|
||||
function is obsolete. See gdk_colormap_free_colors().
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@pixels: the pixel values of the colors to free.
|
||||
@npixels: the number of values in @pixels.
|
||||
@planes: the plane masks for all planes to free, OR'd
|
||||
together.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_white ##### -->
|
||||
<para>
|
||||
Return the white color for a given colormap. The resulting
|
||||
value has already allocated been allocated.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the location to store the color.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_black ##### -->
|
||||
<para>
|
||||
Return the black color for a given colormap. The resulting
|
||||
value has already benn allocated.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the location to store the color.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_parse ##### -->
|
||||
<para>
|
||||
Parse a textual specification of a color and fill in
|
||||
the <structfield>red</structfield>,
|
||||
<structfield>green</structfield>, and
|
||||
<structfield>blue</structfield> fields of a
|
||||
#GdkColor structure. The color is <emphasis>not</emphasis>
|
||||
allocated, you must call gdk_colormap_alloc_color() yourself.
|
||||
The text string can be in any of the forms accepted
|
||||
by <function>XParseColor</function>; these include
|
||||
name for a color from <filename>rgb.txt</filename>, such as
|
||||
<literal>DarkSlateGray</literal>, or a hex specification
|
||||
such as <literal>305050</literal>.
|
||||
</para>
|
||||
|
||||
@spec: the string specifying the color.
|
||||
@color: the #GdkColor to fill in
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_alloc ##### -->
|
||||
<para>
|
||||
Allocate a single color from a colormap.
|
||||
This function is obsolete. See gdk_colormap_alloc_color().
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: The color to allocate. On return, the
|
||||
<structfield>pixel</structfield> field will be
|
||||
filled in.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_change ##### -->
|
||||
<para>
|
||||
Change the value of a color that has already
|
||||
been allocated. If @colormap is not a private
|
||||
colormap, then the color must have been allocated
|
||||
using gdk_colormap_alloc_colors() with the
|
||||
@writeable set to %TRUE.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: a #GdkColor, with the color to change
|
||||
in the <structfield>pixel</structfield> field,
|
||||
and the new value in the remaining fields.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_equal ##### -->
|
||||
<para>
|
||||
Compare two colors.
|
||||
</para>
|
||||
|
||||
@colora: a #GdkColor.
|
||||
@colorb: another #GdkColor.
|
||||
@Returns: %TRUE if the two colors compare equal
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_hash ##### -->
|
||||
<para>
|
||||
A hash function suitable for using for a hash
|
||||
table that stores #GdkColor's.
|
||||
</para>
|
||||
|
||||
@colora: a #GdkColor.
|
||||
@colorb: NOT USED.
|
||||
@Returns: The hash function appled to @colora
|
||||
|
||||
|
||||
99
docs/reference/gdk/tmpl/cursors.sgml
Normal file
99
docs/reference/gdk/tmpl/cursors.sgml
Normal file
@@ -0,0 +1,99 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Cursors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
standard and pixmap cursors.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkCursor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
|
||||
<!-- ##### ENUM GdkCursorType ##### -->
|
||||
<para>
|
||||
The standard cursors available.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new ##### -->
|
||||
<para>
|
||||
Creates a new standard cursor.
|
||||
</para>
|
||||
|
||||
@cursor_type: the type of the cursor.
|
||||
@Returns: a new #GdkCursor.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixmap ##### -->
|
||||
<para>
|
||||
Creates a new cursor from a given pixmap and mask. Both the pixmap and mask
|
||||
must have a depth of 1 (i.e. each pixel has only 2 values - on or off).
|
||||
The standard cursor size is 16 by 16 pixels.
|
||||
</para>
|
||||
<example><title>Creating a custom cursor.</title>
|
||||
<programlisting>
|
||||
/* This data is in X bitmap format, and can be created with the 'bitmap'
|
||||
utility. */
|
||||
#define cursor1_width 16
|
||||
#define cursor1_height 16
|
||||
static unsigned char cursor1_bits[] = {
|
||||
0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20,
|
||||
0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10,
|
||||
0x10, 0x08, 0x20, 0x04, 0x40, 0x02, 0x80, 0x01};
|
||||
|
||||
static unsigned char cursor1mask_bits[] = {
|
||||
0x80, 0x01, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x8c, 0x31,
|
||||
0xc6, 0x63, 0x63, 0xc6, 0x63, 0xc6, 0xc6, 0x63, 0x8c, 0x31, 0x18, 0x18,
|
||||
0x30, 0x0c, 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01};
|
||||
|
||||
|
||||
GdkCursor *cursor;
|
||||
GdkPixmap *source, *mask;
|
||||
GdkColor fg = { 0, 65535, 0, 0 }; /* Red. */
|
||||
GdkColor bg = { 0, 0, 0, 65535 }; /* Blue. */
|
||||
|
||||
|
||||
source = gdk_bitmap_create_from_data (NULL, cursor1_bits,
|
||||
cursor1_width, cursor1_height);
|
||||
mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits,
|
||||
cursor1_width, cursor1_height);
|
||||
cursor = gdk_cursor_new_from_pixmap (source, mask, &fg, &bg, 8, 8);
|
||||
gdk_pixmap_unref (source);
|
||||
gdk_pixmap_unref (mask);
|
||||
|
||||
|
||||
gdk_window_set_cursor (widget->window, cursor);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
@source: the pixmap specifying the cursor.
|
||||
@mask: the pixmap specifying the mask, which must be the same size as @source.
|
||||
@fg: the foreground color, used for the bits in the source which are 1.
|
||||
The color does not have to be allocated first.
|
||||
@bg: the background color, used for the bits in the source which are 0.
|
||||
The color does not have to be allocated first.
|
||||
@x: the horizontal offset of the 'hotspot' of the cursor.
|
||||
@y: the vertical offset of the 'hotspot' of the cursor.
|
||||
@Returns: a new #GdkCursor.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_destroy ##### -->
|
||||
<para>
|
||||
Destroys a cursor, freeing any resources allocated for it.
|
||||
</para>
|
||||
|
||||
@cursor: a #GdkCursor.
|
||||
|
||||
|
||||
187
docs/reference/gdk/tmpl/dnd.sgml
Normal file
187
docs/reference/gdk/tmpl/dnd.sgml
Normal file
@@ -0,0 +1,187 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Drag and Drop
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_abort ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drop_reply ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@ok:
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_drop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_find_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@drag_window:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_begin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@targets:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@actions:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_motion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@suggested_action:
|
||||
@possible_actions:
|
||||
@time:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drop_finish ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@success:
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_protocol ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@xid:
|
||||
@protocol:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkDragProtocol ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_DRAG_PROTO_MOTIF:
|
||||
@GDK_DRAG_PROTO_XDND:
|
||||
@GDK_DRAG_PROTO_ROOTWIN:
|
||||
@GDK_DRAG_PROTO_NONE:
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDragContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@protocol:
|
||||
@is_source:
|
||||
@source_window:
|
||||
@dest_window:
|
||||
@targets:
|
||||
@actions:
|
||||
@suggested_action:
|
||||
@action:
|
||||
@start_time:
|
||||
|
||||
<!-- ##### ENUM GdkDragAction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_ACTION_DEFAULT:
|
||||
@GDK_ACTION_COPY:
|
||||
@GDK_ACTION_MOVE:
|
||||
@GDK_ACTION_LINK:
|
||||
@GDK_ACTION_PRIVATE:
|
||||
@GDK_ACTION_ASK:
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_status ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@action:
|
||||
@time:
|
||||
|
||||
|
||||
320
docs/reference/gdk/tmpl/drawing.sgml
Normal file
320
docs/reference/gdk/tmpl/drawing.sgml
Normal file
@@ -0,0 +1,320 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Drawing Primitives
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
functions for drawing points, lines, arcs, and text.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions provide support for drawing points, lines, arcs and text
|
||||
onto what are called 'drawables'. Drawables, as the name suggests, are things
|
||||
which support drawing onto them, and are either #GdkWindow or #GdkPixmap
|
||||
objects.
|
||||
</para>
|
||||
<para>
|
||||
Many of the drawing operations take a #GdkGC argument, which represents a
|
||||
graphics context. This #GdkGC contains a number of drawing attributes such
|
||||
as foreground color, background color and line width, and is used to reduce
|
||||
the number of arguments needed for each drawing operation. See the
|
||||
<link linkend="gdk-Graphics-Contexts">Graphics Contexts</link> section for
|
||||
more information.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkFill ##### -->
|
||||
<para>
|
||||
Used to specify the way in which drawing operations are performed.
|
||||
See gdk_gc_set_fill().
|
||||
</para>
|
||||
|
||||
@GDK_SOLID: graphics are drawn in a solid color, usually the foreground color
|
||||
of the #GdkGC.
|
||||
@GDK_TILED: graphics are drawn using a tile pixmap. See gdk_gc_set_tile().
|
||||
@GDK_STIPPLED: graphics are drawn with a stipple (a pixmap with a depth of 1).
|
||||
Bits set in the stipple are drawn in the foreground color. Bits not set in the
|
||||
stipple are left as they are. See gdk_gc_set_stipple().
|
||||
@GDK_OPAQUE_STIPPLED: graphics are drawn with a stipple, as in @GDK_STIPPLED,
|
||||
except that the bits not set in the stipple are drawn in the background color
|
||||
instead of being left as they are. See gdk_gc_set_stipple().
|
||||
|
||||
<!-- ##### ENUM GdkFillRule ##### -->
|
||||
<para>
|
||||
The method for determining which pixels are included in a region, when
|
||||
creating a #GdkRegion from a polygon.
|
||||
The fill rule is only relevant for polygons which overlap themselves.
|
||||
</para>
|
||||
|
||||
@GDK_EVEN_ODD_RULE: areas which are overlapped an odd number of times are
|
||||
included in the region, while areas overlapped an even number of times are not.
|
||||
@GDK_WINDING_RULE: overlapping areas are always included.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkLineStyle ##### -->
|
||||
<para>
|
||||
Used to specify how lines are drawn. See gdk_gc_set_line_attributes().
|
||||
</para>
|
||||
|
||||
@GDK_LINE_SOLID: lines are drawn in a solid color, the foreground color.
|
||||
@GDK_LINE_ON_OFF_DASH: dashed lines are drawn, with the pixels between the
|
||||
dashes left as they are. The #GdkCapStyle is applied to each end of the dashes.
|
||||
@GDK_LINE_DOUBLE_DASH: dashed lines are drawn, alternating between the
|
||||
foreground and background colors. The %GDK_CAP_BUTT style is used where
|
||||
dashes and gaps meet.
|
||||
|
||||
<!-- ##### ENUM GdkCapStyle ##### -->
|
||||
<para>
|
||||
Used to specify how the ends of lines and dashes are drawn.
|
||||
See gdk_gc_set_line_attributes().
|
||||
</para>
|
||||
|
||||
@GDK_CAP_NOT_LAST: this is equivalent to %GDK_CAP_BUTT, except that for a line
|
||||
width of 0 the final endpoint is not drawn.
|
||||
@GDK_CAP_BUTT: the ends of the line are square with no projection beyond the
|
||||
endpoint.
|
||||
@GDK_CAP_ROUND: the ends of the line are rounded using a circular arc centered
|
||||
on the endpoint. This is equivalent to %GDK_CAP_BUTT when the line width is 0.
|
||||
@GDK_CAP_PROJECTING: the ends of the line are square, but project beyond the
|
||||
endpoint to a distance of half the line width.
|
||||
This is equivalent to %GDK_CAP_BUTT when the line width is 0.
|
||||
|
||||
<!-- ##### ENUM GdkJoinStyle ##### -->
|
||||
<para>
|
||||
Used to specify how the the joins between lines are drawn.
|
||||
See gdk_gc_set_line_attributes().
|
||||
</para>
|
||||
|
||||
@GDK_JOIN_MITER: the ends of the lines are extended to meet at a point.
|
||||
If the angle between the lines is less than 11 degrees, %GDK_JOIN_BEVEL is
|
||||
used instead.
|
||||
@GDK_JOIN_ROUND: the ends of the lines are rounded with a circular arc
|
||||
centered on the joinpoint, with a diameter equal to the line width.
|
||||
@GDK_JOIN_BEVEL: the lines have %GDK_CAP_BUTT cap styles, with the triangular
|
||||
notch filled.
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_point ##### -->
|
||||
<para>
|
||||
Draws a point, using the foreground color and other attributes of the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the point.
|
||||
@y: the y coordinate of the point.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_line ##### -->
|
||||
<para>
|
||||
Draws a line, using the foreground color and other attributes of the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@x1: the x coordinate of the start point.
|
||||
@y1: the y coordinate of the start point.
|
||||
@x2: the x coordinate of the end point.
|
||||
@y2: the y coordinate of the end point.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_rectangle ##### -->
|
||||
<para>
|
||||
Draws a rectangular outline or filled rectangle, using the foreground color
|
||||
and other attributes of the #GdkGC.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
A rectangle drawn filled is 1 pixel smaller in both dimensions than a rectangle
|
||||
outlined. Calling gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20) results
|
||||
in a filled rectangle 20 pixels wide and 20 pixels high. Calling
|
||||
gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20) results in an outlined
|
||||
rectangle with corners at (0, 0), (0, 20), (20, 20), and (20, 0), which
|
||||
makes it 21 pixels wide and 21 pixels high.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: TRUE if the rectangle should be filled.
|
||||
@x: the x coordinate of the left edge of the rectangle.
|
||||
@y: the y coordinate of the top edge of the rectangle.
|
||||
@width: the width of the rectangle.
|
||||
@height: the height of the rectangle.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_arc ##### -->
|
||||
<para>
|
||||
Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
|
||||
rectangle of the entire ellipse, and the start and end angles of the part of
|
||||
the ellipse to be drawn.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: TRUE if the arc should be filled, producing a 'pie slice'.
|
||||
@x: the x coordinate of the left edge of the bounding rectangle.
|
||||
@y: the y coordinate of the top edge of the bounding rectangle.
|
||||
@width: the width of the bounding rectangle.
|
||||
@height: the height of the bounding rectangle.
|
||||
@angle1: the start angle of the arc, relative to the 3 o'clock position,
|
||||
counter-clockwise, in 1/64ths of a degree.
|
||||
@angle2: the end angle of the arc, relative to @angle1, in 1/64ths of a degree.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_polygon ##### -->
|
||||
<para>
|
||||
Draws an outlined or filled polygon.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: TRUE if the polygon should be filled. The polygon is closed
|
||||
automatically, connecting the last point to the first point if necessary.
|
||||
@points: an array of #GdkPoint structures specifying the points making up the
|
||||
polygon.
|
||||
@npoints: the number of points.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_string ##### -->
|
||||
<para>
|
||||
Draws a string of characters in the given font or fontset.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@string: the string of characters to draw.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_text ##### -->
|
||||
<para>
|
||||
Draws a number of characters in the given font or fontset.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@text: the characters to draw.
|
||||
@text_length: the number of characters of @text to draw.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_text_wc ##### -->
|
||||
<para>
|
||||
Draws a number of wide characters using the given font of fontset.
|
||||
If the font is a 1-byte font, the string is converted into 1-byte characters
|
||||
(discarding the high bytes) before output.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@text: the wide characters to draw.
|
||||
@text_length: the number of characters to draw.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_pixmap ##### -->
|
||||
<para>
|
||||
Draws a pixmap, or a part of a pixmap, onto another drawable.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@src: the source #GdkPixmap to draw.
|
||||
@xsrc: the left edge of the source rectangle within @src.
|
||||
@ysrc: the top of the source rectangle within @src.
|
||||
@xdest: the x coordinate of the destination within @drawable.
|
||||
@ydest: the y coordinate of the destination within @drawable.
|
||||
@width: the width of the area to be copied, or -1 to make the area extend to
|
||||
the right edge of the source pixmap.
|
||||
@height: the height of the area to be copied, or -1 to make the area extend
|
||||
to the bottom edge of the source pixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_bitmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc:
|
||||
@src:
|
||||
@xsrc:
|
||||
@ysrc:
|
||||
@xdest:
|
||||
@ydest:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc:
|
||||
@image:
|
||||
@xsrc:
|
||||
@ysrc:
|
||||
@xdest:
|
||||
@ydest:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_points ##### -->
|
||||
<para>
|
||||
Draws a number of points, using the foreground color and other attributes of
|
||||
the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@points: an array of #GdkPoint structures.
|
||||
@npoints: the number of points to be drawn.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_segments ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc:
|
||||
@segs:
|
||||
@nsegs:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkSegment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@x1:
|
||||
@y1:
|
||||
@x2:
|
||||
@y2:
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_lines ##### -->
|
||||
<para>
|
||||
Draws a series of lines connecting the given points.
|
||||
The way in which joins between lines are draw is determined by the
|
||||
#GdkCapStyle value in the #GdkGC. This can be set with
|
||||
gdk_gc_set_line_attributes().
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@points: an array of #GdkPoint structures specifying the endpoints of the
|
||||
lines.
|
||||
@npoints: the number of endpoints.
|
||||
|
||||
|
||||
296
docs/reference/gdk/tmpl/event_structs.sgml
Normal file
296
docs/reference/gdk/tmpl/event_structs.sgml
Normal file
@@ -0,0 +1,296 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Event Structures
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
A common mistake is to forget to set the event mask of a widget so that the
|
||||
required events are received. See gtk_widget_set_events().
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkEventAny ##### -->
|
||||
<para>
|
||||
Contains the fields which are common to all event structs.
|
||||
Any event can safely be cast to a #GdkEventAny to access these fields.
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
|
||||
<!-- ##### STRUCT GdkEventExpose ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@area:
|
||||
@count:
|
||||
|
||||
<!-- ##### STRUCT GdkEventNoExpose ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
|
||||
<!-- ##### STRUCT GdkEventVisibility ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@state:
|
||||
|
||||
<!-- ##### ENUM GdkVisibilityState ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_VISIBILITY_UNOBSCURED:
|
||||
@GDK_VISIBILITY_PARTIAL:
|
||||
@GDK_VISIBILITY_FULLY_OBSCURED:
|
||||
|
||||
<!-- ##### STRUCT GdkEventMotion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@time:
|
||||
@x:
|
||||
@y:
|
||||
@pressure:
|
||||
@xtilt:
|
||||
@ytilt:
|
||||
@state:
|
||||
@is_hint:
|
||||
@source:
|
||||
@deviceid:
|
||||
@x_root:
|
||||
@y_root:
|
||||
|
||||
<!-- ##### STRUCT GdkEventButton ##### -->
|
||||
<para>
|
||||
Used for button press and button release events. The
|
||||
<structfield>type</structfield> field will be one of %GDK_BUTTON_PRESS,
|
||||
%GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS, and %GDK_BUTTON_RELEASE.
|
||||
</para>
|
||||
<para>
|
||||
Double and treble-clicks result in a sequence of events being received.
|
||||
For double-clicks the order of events will be:
|
||||
<orderedlist>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
</orderedlist>
|
||||
Note that the first click is received just like a normal
|
||||
button press, while the second click results in a %GDK_2BUTTON_PRESS being
|
||||
received just after the %GDK_BUTTON_PRESS.
|
||||
</para>
|
||||
<para>
|
||||
Treble-clicks are very similar to double-clicks, except that %GDK_3BUTTON_PRESS
|
||||
is inserted after the third click. The order of the events is:
|
||||
<orderedlist>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_3BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@time: the time of the event in milliseconds. This wraps around roughly every
|
||||
50 days.
|
||||
@x: the x coordinate of the mouse relative to the window.
|
||||
@y: the y coordinate of the mouse relative to the window.
|
||||
@pressure: the pressure of the button press, intended for input devices such
|
||||
as graphics tablets. It defaults to 0.5.
|
||||
@xtilt:
|
||||
@ytilt:
|
||||
@state:
|
||||
@button:
|
||||
@source:
|
||||
@deviceid:
|
||||
@x_root: the x coordinate of the mouse relative to the root of the screen.
|
||||
@y_root: the y coordinate of the mouse relative to the root of the screen.
|
||||
|
||||
<!-- ##### STRUCT GdkEventKey ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@time:
|
||||
@state:
|
||||
@keyval:
|
||||
@length:
|
||||
@string:
|
||||
|
||||
<!-- ##### STRUCT GdkEventCrossing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@subwindow:
|
||||
@time:
|
||||
@x:
|
||||
@y:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@mode:
|
||||
@detail:
|
||||
@focus:
|
||||
@state:
|
||||
|
||||
<!-- ##### ENUM GdkCrossingMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_CROSSING_NORMAL:
|
||||
@GDK_CROSSING_GRAB:
|
||||
@GDK_CROSSING_UNGRAB:
|
||||
|
||||
<!-- ##### ENUM GdkNotifyType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_NOTIFY_ANCESTOR:
|
||||
@GDK_NOTIFY_VIRTUAL:
|
||||
@GDK_NOTIFY_INFERIOR:
|
||||
@GDK_NOTIFY_NONLINEAR:
|
||||
@GDK_NOTIFY_NONLINEAR_VIRTUAL:
|
||||
@GDK_NOTIFY_UNKNOWN:
|
||||
|
||||
<!-- ##### STRUCT GdkEventFocus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@in:
|
||||
|
||||
<!-- ##### STRUCT GdkEventConfigure ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
<!-- ##### STRUCT GdkEventProperty ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@atom:
|
||||
@time:
|
||||
@state:
|
||||
|
||||
<!-- ##### STRUCT GdkEventSelection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@selection:
|
||||
@target:
|
||||
@property:
|
||||
@requestor:
|
||||
@time:
|
||||
|
||||
<!-- ##### STRUCT GdkEventProximity ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@time:
|
||||
@source:
|
||||
@deviceid:
|
||||
|
||||
<!-- ##### STRUCT GdkEventClient ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@message_type:
|
||||
@data_format:
|
||||
|
||||
<!-- ##### STRUCT GdkEventDND ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@window:
|
||||
@send_event:
|
||||
@context:
|
||||
@time:
|
||||
@x_root:
|
||||
@y_root:
|
||||
|
||||
<!-- ##### UNION GdkEvent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkXEvent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
185
docs/reference/gdk/tmpl/events.sgml
Normal file
185
docs/reference/gdk/tmpl/events.sgml
Normal file
@@ -0,0 +1,185 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Events
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkEventType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_NOTHING:
|
||||
@GDK_DELETE:
|
||||
@GDK_DESTROY:
|
||||
@GDK_EXPOSE:
|
||||
@GDK_MOTION_NOTIFY:
|
||||
@GDK_BUTTON_PRESS:
|
||||
@GDK_2BUTTON_PRESS:
|
||||
@GDK_3BUTTON_PRESS:
|
||||
@GDK_BUTTON_RELEASE:
|
||||
@GDK_KEY_PRESS:
|
||||
@GDK_KEY_RELEASE:
|
||||
@GDK_ENTER_NOTIFY:
|
||||
@GDK_LEAVE_NOTIFY:
|
||||
@GDK_FOCUS_CHANGE:
|
||||
@GDK_CONFIGURE:
|
||||
@GDK_MAP:
|
||||
@GDK_UNMAP:
|
||||
@GDK_PROPERTY_NOTIFY:
|
||||
@GDK_SELECTION_CLEAR:
|
||||
@GDK_SELECTION_REQUEST:
|
||||
@GDK_SELECTION_NOTIFY:
|
||||
@GDK_PROXIMITY_IN:
|
||||
@GDK_PROXIMITY_OUT:
|
||||
@GDK_DRAG_ENTER:
|
||||
@GDK_DRAG_LEAVE:
|
||||
@GDK_DRAG_MOTION:
|
||||
@GDK_DRAG_STATUS:
|
||||
@GDK_DROP_START:
|
||||
@GDK_DROP_FINISHED:
|
||||
@GDK_CLIENT_EVENT:
|
||||
@GDK_VISIBILITY_NOTIFY:
|
||||
@GDK_NO_EXPOSE:
|
||||
|
||||
<!-- ##### ENUM GdkEventMask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_EXPOSURE_MASK:
|
||||
@GDK_POINTER_MOTION_MASK:
|
||||
@GDK_POINTER_MOTION_HINT_MASK:
|
||||
@GDK_BUTTON_MOTION_MASK:
|
||||
@GDK_BUTTON1_MOTION_MASK:
|
||||
@GDK_BUTTON2_MOTION_MASK:
|
||||
@GDK_BUTTON3_MOTION_MASK:
|
||||
@GDK_BUTTON_PRESS_MASK:
|
||||
@GDK_BUTTON_RELEASE_MASK:
|
||||
@GDK_KEY_PRESS_MASK:
|
||||
@GDK_KEY_RELEASE_MASK:
|
||||
@GDK_ENTER_NOTIFY_MASK:
|
||||
@GDK_LEAVE_NOTIFY_MASK:
|
||||
@GDK_FOCUS_CHANGE_MASK:
|
||||
@GDK_STRUCTURE_MASK:
|
||||
@GDK_PROPERTY_CHANGE_MASK:
|
||||
@GDK_VISIBILITY_NOTIFY_MASK:
|
||||
@GDK_PROXIMITY_IN_MASK:
|
||||
@GDK_PROXIMITY_OUT_MASK:
|
||||
@GDK_SUBSTRUCTURE_MASK:
|
||||
@GDK_ALL_EVENTS_MASK:
|
||||
|
||||
<!-- ##### FUNCTION gdk_events_pending ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_peek ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_graphics_expose ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_put ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_handler_set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@func:
|
||||
@data:
|
||||
@notify:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@xid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
581
docs/reference/gdk/tmpl/fonts.sgml
Normal file
581
docs/reference/gdk/tmpl/fonts.sgml
Normal file
@@ -0,0 +1,581 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Fonts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
loading and manipulating fonts
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The GdkFont data type represents a font for drawing on
|
||||
the screen. These functions provide support for
|
||||
loading fonts, and also for determining the dimensions
|
||||
of characters and strings when drawn with a particular
|
||||
font.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Fonts in X are specified by a
|
||||
<firstterm>X Logical Font Description</firstterm>.
|
||||
The following description is considerably simplified.
|
||||
For definitive information about XLFD's see the
|
||||
X reference documentation. A X Logical Font Description (XLFD)
|
||||
consists of a sequence of fields separated (and surrounded by) '-'
|
||||
characters. For example, Adobe Helvetica Bold 12 pt, has the
|
||||
full description:
|
||||
|
||||
<programlisting>
|
||||
"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The fields in the XLFD are:
|
||||
|
||||
<informaltable pgwide=1 frame="none">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>Foundry</entry>
|
||||
<entry>the company or organization where the font originated.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Family</entry>
|
||||
<entry>the font family (a group of related font designs).</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Weight</entry>
|
||||
<entry>A name for the font's typographic weight
|
||||
For example, 'bold' or 'medium').</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Slant</entry>
|
||||
<entry>The slant of the font. Common values are 'R' for Roman,
|
||||
'I' for italoc, and 'O' for oblique.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Set Width</entry>
|
||||
<entry>A name for the width of the font. For example,
|
||||
'normal' or 'condensed'.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Add Style</entry>
|
||||
<entry>Additional information to distinguish a font from
|
||||
other fonts of the same family.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Pixel Size</entry>
|
||||
<entry>The body size of the font in pixels.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Point Size</entry>
|
||||
<entry>The body size of the font in 10ths of a point.
|
||||
(A <firstterm>point</firstterm> is 1/72.27 inch) </entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Resolution X</entry>
|
||||
<entry>The horizontal resolution that the font was designed for.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Resolution Y</entry>
|
||||
<entry>The vertical resolution that the font was designed for .</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Spacing</entry>
|
||||
<entry>The type of spacing for the font - can be 'p' for proportional,
|
||||
'm' for monospaced or 'c' for charcell.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Average Width</entry>
|
||||
<entry>The average width of a glyph in the font. For monospaced
|
||||
and charcell fonts, all glyphs in the font have this width</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Charset Registry</entry>
|
||||
<entry>The registration authority that owns the encoding for
|
||||
the font. Together with the Charset Encoding field, this
|
||||
defines the character set for the font.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Charset Encoding</entry>
|
||||
<entry>An identifier for the particular character set encoding.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When specifying a font via a X logical Font Description,
|
||||
'*' can be used as a wildcard to match any portion of
|
||||
the XLFD. For instance, the above example could
|
||||
also be specified as
|
||||
|
||||
<programlisting>
|
||||
"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
|
||||
</programlisting>
|
||||
|
||||
It is generally a good idea to use wildcards for any
|
||||
portion of the XLFD that your program does not care
|
||||
about specifically, since that will improve the
|
||||
chances of finding a matching font.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A <firstterm>fontset</firstterm> is a list of fonts
|
||||
that is used for drawing international text that may
|
||||
contain characters from a number of different character
|
||||
sets. It is represented by a list of XLFD's.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The font for a given character set is determined by going
|
||||
through the list of XLFD's in order. For each one, if
|
||||
the registry and and encoding fields match the desired
|
||||
character set, then that font is used, otherwise if
|
||||
the XLFD contains wild-cards for the registry and encoding
|
||||
fields, the registry and encoding for the desired character
|
||||
set are subsituted in and a lookup is done. If a match is found
|
||||
that font is used. Otherwise, processing continues
|
||||
on to the next font in the list.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The functions for determining the metrics of a string
|
||||
come in several varieties that can take a number
|
||||
of forms of string input:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>8-bit string</term>
|
||||
<listitem><para>
|
||||
When using functions like gdk_string_width() that
|
||||
take a <type>gchar *</type>, if the font is of type
|
||||
%GDK_FONT_FONT and is an 8-bit font, then each
|
||||
<type>gchar</type> indexes the glyphs in the font directly.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>16-bit string</term>
|
||||
<listitem><para>
|
||||
For functions taking a <type>gchar *</type>, if the
|
||||
font is of type %GDK_FONT_FONT, and is a 16-bit
|
||||
font, then the <type>gchar *</type> argument is
|
||||
interpreted as a <type>guint16 *</type> cast to
|
||||
a <type>gchar *</type> and each <type>guint16</type>
|
||||
indexes the glyphs in the font directly.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Multibyte string</term>
|
||||
<listitem><para>
|
||||
For functions taking a <type>gchar *</type>, if the
|
||||
font is of type %GDK_FONT_FONTSET, then the input
|
||||
string is interpreted as a <firstterm>multibyte</firstterm>
|
||||
encoded according to the current locale. (A multibyte
|
||||
string is one in which each character may consist
|
||||
of one or more bytes, with different lengths for different
|
||||
characters in the string). They can be converted to and
|
||||
from wide character strings (see below) using
|
||||
gdk_wcstombs() and gdk_mbstowcs().) The string will
|
||||
be rendered using one or more different fonts from
|
||||
the fontset.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Wide character string</term>
|
||||
<listitem><para>
|
||||
For a number of the text-measuring functions, GTK+
|
||||
provides a variant (such as gdk_text_width_wc()) which
|
||||
takes a <type>GdkWChar *</type> instead of a
|
||||
<type>gchar *</type>. The input is then taken to
|
||||
be a wide character string in the encoding of the
|
||||
current locale. (A wide character string is a string
|
||||
in which each character consists of several bytes,
|
||||
and the width of each character in the string is
|
||||
constant.)
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK provides functions to determine a number of different
|
||||
measurements (metrics) for a given string. (Need diagram
|
||||
here).
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>ascent</term>
|
||||
<listitem><para>
|
||||
The vertical distance from the origin of the drawing
|
||||
opereration to the top of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>descent</term>
|
||||
<listitem><para>
|
||||
The vertical distance from the origin of the drawing
|
||||
opereration to the bottom of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>left bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the left-most part of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>right bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the right-most part of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>width bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the correct origin for drawing another
|
||||
string to follow the current one. Depending on the
|
||||
font, this could be greater than or less than the
|
||||
right bearing.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkFont ##### -->
|
||||
<para>
|
||||
The GdkFont structure represents a font or fontset. It
|
||||
contains the following public fields. A new GdkFont
|
||||
structure is returned by gdk_font_load() or gdk_fontset_load(),
|
||||
and is reference counted with gdk_font_ref() and gdk_font_unref()
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry><structfield>type</structfield></entry>
|
||||
<entry>a value of type #GdkFontType which indicates
|
||||
whether this font is a single font or a fontset.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>ascent</structfield></entry>
|
||||
<entry>the maximum distance that the font, when drawn,
|
||||
ascends above the baseline.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>descent</structfield></entry>
|
||||
<entry>the maximum distance that the font, when drawn,
|
||||
descends below the baseline.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@ascent:
|
||||
@descent:
|
||||
|
||||
<!-- ##### ENUM GdkFontType ##### -->
|
||||
<para>
|
||||
Indicates the type of a font. The possible values
|
||||
are currently:
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_FONT_FONT</entry>
|
||||
<entry>the font is a single font.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_FONT_FONT</entry>
|
||||
<entry>the font is a fontset.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_FONT_FONT:
|
||||
@GDK_FONT_FONTSET:
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_load ##### -->
|
||||
<para>
|
||||
Loads a font.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Currently, this function will always return a new
|
||||
font, however, in the future, it may be changed to
|
||||
look up the font in a cache. You should make no
|
||||
assumptions about the initial reference count.
|
||||
</para>
|
||||
|
||||
@font_name: a XLFD describing the font to load.
|
||||
@Returns: a #GdkFont, or NULL if the font could not be loaded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_fontset_load ##### -->
|
||||
<para>
|
||||
Loads a fontset.
|
||||
</para>
|
||||
<para>
|
||||
Currently this function will always return a new
|
||||
font, however, in the future, it may be changed to
|
||||
look up the font in a cache. You should make no
|
||||
assumptions about the initial reference count.
|
||||
</para>
|
||||
|
||||
@fontset_name: a comma-separated list of XLFDs describing
|
||||
the component fonts of the fontset to load.
|
||||
@Returns: a #GdkFont, or NULL if the fontset could not be loaded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count of a count by one.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@Returns: @font
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count of a count by one.
|
||||
If the result is zero, destroys the font.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_id ##### -->
|
||||
<para>
|
||||
Returns the X Font ID for the given font.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont.
|
||||
@Returns: the numeric X Font ID
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_equal ##### -->
|
||||
<para>
|
||||
Compares two fonts for equality. Single fonts compare equal
|
||||
if they have the same X font ID. This operation does
|
||||
not currently work correctly for fontsets.
|
||||
</para>
|
||||
|
||||
@fonta: a #GdkFont.
|
||||
@fontb: another #GdkFont.
|
||||
@Returns: %TRUE if the fonts are equal.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_extents ##### -->
|
||||
<para>
|
||||
Returns the metrics of a NULL-terminated string.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont.
|
||||
@string: the NULL-terminated string to measure.
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_extents ##### -->
|
||||
<para>
|
||||
Returns the metrics of a string.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure
|
||||
@text_length: the length of the text in bytes. (If the
|
||||
font is a 16-bit font, this is twice the length
|
||||
of the text in characters.)
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_extents_wc ##### -->
|
||||
<para>
|
||||
Returns the metrics of a string of wide characters.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in character.
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_width ##### -->
|
||||
<para>
|
||||
Determine the width of a NULL-terminated string.
|
||||
(The distance from the origin of the string to the
|
||||
point where the next string in a sequence of strings
|
||||
should be drawn)
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@string: the NULL-terminated string to measure
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_width ##### -->
|
||||
<para>
|
||||
Determine the width of a given string.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_width_wc ##### -->
|
||||
<para>
|
||||
Determine the width of a given wide-character string.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in characters.
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_width ##### -->
|
||||
<para>
|
||||
Determine the width of a given character.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the width of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_width_wc ##### -->
|
||||
<para>
|
||||
Determine the width of a given wide character. (Encoded
|
||||
in the wide-character encoding of the current locale).
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the width of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a NULL-terminated string when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
See gdk_string_width().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@string: the NULL-terminated string to measure.
|
||||
@Returns: the right bearing of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a string when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
See gdk_text_width().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the right bearing of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a character when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the right bearing of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given NULL-terminated
|
||||
string. This value is not generally useful, because you
|
||||
cannot determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_string_extents().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@string: the NULL-terminated string to measure.
|
||||
@Returns: the height of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given string.
|
||||
This value is not generally useful, because you cannot
|
||||
determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_text_extents().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the height of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given character.
|
||||
This value is not generally useful, because you cannot
|
||||
determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_text_extents().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the height of the character in pixels.
|
||||
|
||||
|
||||
637
docs/reference/gdk/tmpl/gcs.sgml
Normal file
637
docs/reference/gdk/tmpl/gcs.sgml
Normal file
@@ -0,0 +1,637 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Graphics Contexts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
objects to encapsulate drawing properties.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
All drawing operations in GDK take a
|
||||
<firstterm>graphics context</firstterm> (GC) argument.
|
||||
A graphics context encapsulates information about
|
||||
the way things are drawn, such as the foreground
|
||||
color or line width. By using graphics contexts,
|
||||
the number of arguments to each drawing call is
|
||||
greatly reduced, and communication overhead is
|
||||
minimized, since identical arguments do not need
|
||||
to be passed repeatedly.
|
||||
</para>
|
||||
<para>
|
||||
Most values of a graphics context can be set at
|
||||
creation time by using gdk_gc_new_with_values(),
|
||||
or can be set one-by-one using functions such
|
||||
as gdk_gc_set_foreground(). A few of the values
|
||||
in the GC, such as the dash pattern, can only
|
||||
be set by the latter method.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkGC ##### -->
|
||||
<para>
|
||||
The #GdkGC structure represents a graphics context.
|
||||
It is an opaque structure with no user-visible
|
||||
elements.
|
||||
</para>
|
||||
|
||||
@dummy_var:
|
||||
|
||||
<!-- ##### STRUCT GdkGCValues ##### -->
|
||||
<para>
|
||||
The #GdkGCValues structure holds a set of values used
|
||||
to create or modify a graphics context.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#GdkColor foreground;</entry>
|
||||
<entry>the foreground color.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkColor background;</entry>
|
||||
<entry>the background color.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkFont *font;</entry>
|
||||
<entry>the default font..</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkFunction function;</entry>
|
||||
<entry>the bitwise operation used when drawing.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkFill fill;</entry>
|
||||
<entry>the fill style.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkPixmap *tile;</entry>
|
||||
<entry>the tile pixmap.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkPixmap *stipple;</entry>
|
||||
<entry>the stipple bitmap.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkPixmap *clip_mask;</entry>
|
||||
<entry>the clip mask bitmap.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkSubwindowMode subwindow_mode;</entry>
|
||||
<entry>the subwindow mode.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint ts_x_origin;</entry>
|
||||
<entry>the x origin of the tile or stipple.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint ts_y_origin;</entry>
|
||||
<entry>the y origin of the tile or stipple.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint clip_x_origin;</entry>
|
||||
<entry>the x origin of the clip mask.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint clip_y_origin;</entry>
|
||||
<entry>the y origin of the clip mask.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint graphics_exposures;</entry>
|
||||
<entry>whether graphics exposures are enabled.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint line_width;</entry>
|
||||
<entry>the line width</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkLineStyle line_style;</entry>
|
||||
<entry>the way dashed lines are drawn</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkCapStyle cap_style;</entry>
|
||||
<entry>the way the ends of lines are drawn</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkJoinStyle join_style;</entry>
|
||||
<entry>the way joins between lines are drawn</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@foreground:
|
||||
@background:
|
||||
@font:
|
||||
@function:
|
||||
@fill:
|
||||
@tile:
|
||||
@stipple:
|
||||
@clip_mask:
|
||||
@subwindow_mode:
|
||||
@ts_x_origin:
|
||||
@ts_y_origin:
|
||||
@clip_x_origin:
|
||||
@clip_y_origin:
|
||||
@graphics_exposures:
|
||||
@line_width:
|
||||
@line_style:
|
||||
@cap_style:
|
||||
@join_style:
|
||||
|
||||
<!-- ##### ENUM GdkGCValuesMask ##### -->
|
||||
<para>
|
||||
A set of bit flags used to indicate which fields
|
||||
#GdkGCValues structure are set.
|
||||
</para>
|
||||
|
||||
@GDK_GC_FOREGROUND:
|
||||
@GDK_GC_BACKGROUND:
|
||||
@GDK_GC_FONT:
|
||||
@GDK_GC_FUNCTION:
|
||||
@GDK_GC_FILL:
|
||||
@GDK_GC_TILE:
|
||||
@GDK_GC_STIPPLE:
|
||||
@GDK_GC_CLIP_MASK:
|
||||
@GDK_GC_SUBWINDOW:
|
||||
@GDK_GC_TS_X_ORIGIN:
|
||||
@GDK_GC_TS_Y_ORIGIN:
|
||||
@GDK_GC_CLIP_X_ORIGIN:
|
||||
@GDK_GC_CLIP_Y_ORIGIN:
|
||||
@GDK_GC_EXPOSURES:
|
||||
@GDK_GC_LINE_WIDTH:
|
||||
@GDK_GC_LINE_STYLE:
|
||||
@GDK_GC_CAP_STYLE:
|
||||
@GDK_GC_JOIN_STYLE:
|
||||
|
||||
<!-- ##### ENUM GdkFill ##### -->
|
||||
<para>
|
||||
Determines how primitives are drawn.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_SOLID</entry>
|
||||
<entry>draw with the foreground color.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_TILED</entry>
|
||||
<entry>draw with a tiled pixmap.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_STIPPLED</entry>
|
||||
<entry>draw using the stipple bitmap. Pixels corresponding
|
||||
to bits in the stipple bitmap that are set will be drawn in the
|
||||
foreground color; pixels corresponding to bits that are
|
||||
not set will be left untouched.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_OPAQUE_STIPPLED</entry>
|
||||
<entry>draw using the stipple bitmap. Pixels corresponding
|
||||
to bits in the stipple bitmap that are set will be drawn in the
|
||||
foreground color; pixels corresponding to bits that are
|
||||
not set will be drawn with the background color.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_SOLID:
|
||||
@GDK_TILED:
|
||||
@GDK_STIPPLED:
|
||||
@GDK_OPAQUE_STIPPLED:
|
||||
|
||||
<!-- ##### ENUM GdkFunction ##### -->
|
||||
<para>
|
||||
Determines how the bit values for the source pixels are combined with
|
||||
the bit values for destination pixels to produce the final result. The
|
||||
sixteen values here correspond to the 16 different possible 2x2 truth
|
||||
tables. Only a couple of these values are usually useful; for colored
|
||||
images, only %GDK_COPY, %GDK_XOR and %GDK_INVERT are generally
|
||||
useful. For bitmaps, %GDK_AND and %GDK_OR are also useful.
|
||||
</para>
|
||||
|
||||
@GDK_COPY:
|
||||
@GDK_INVERT:
|
||||
@GDK_XOR:
|
||||
@GDK_CLEAR:
|
||||
@GDK_AND:
|
||||
@GDK_AND_REVERSE:
|
||||
@GDK_AND_INVERT:
|
||||
@GDK_NOOP:
|
||||
@GDK_OR:
|
||||
@GDK_EQUIV:
|
||||
@GDK_OR_REVERSE:
|
||||
@GDK_COPY_INVERT:
|
||||
@GDK_OR_INVERT:
|
||||
@GDK_NAND:
|
||||
@GDK_SET:
|
||||
|
||||
<!-- ##### ENUM GdkLineStyle ##### -->
|
||||
<para>
|
||||
Determines how lines are drawn.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_LINE_SOLID</entry>
|
||||
<entry>lines are drawn solid.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_LINE_ON_OFF_DASH</entry>
|
||||
<entry>even segments are drawn; odd segments are not drawn.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_LINE_DOUBLE_DASH</entry>
|
||||
<entry>even segments are normally. Odd segments are drawn
|
||||
in the background color if the fill style is %GDK_SOLID,
|
||||
or in the background color masked by the stipple if the
|
||||
fill style is %GDK_STIPPLED.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_LINE_SOLID:
|
||||
@GDK_LINE_ON_OFF_DASH:
|
||||
@GDK_LINE_DOUBLE_DASH:
|
||||
|
||||
<!-- ##### ENUM GdkCapStyle ##### -->
|
||||
<para>
|
||||
Determines how the end of lines are drawn.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CAP_NOT_LAST</entry>
|
||||
<entry>the same as %GDK_CAP_BUTT for lines of non-zero width.
|
||||
for zero width lines, the final point on the line
|
||||
will not be drawn.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CAP_BUTT</entry>
|
||||
<entry>the ends of the lines are drawn squared off and extending
|
||||
to the coordinates of the end point.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CAP_ROUND</entry>
|
||||
<entry>the ends of the lines are drawn as semicircles with the
|
||||
diameter equal to the line width and centered at the
|
||||
end point.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CAP_PROJECTING</entry>
|
||||
<entry>the ends of the lines are drawn squared off and extending
|
||||
half the width of the line beyond the end point.</entry>
|
||||
</row>
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_CAP_NOT_LAST:
|
||||
@GDK_CAP_BUTT:
|
||||
@GDK_CAP_ROUND:
|
||||
@GDK_CAP_PROJECTING:
|
||||
|
||||
<!-- ##### ENUM GdkJoinStyle ##### -->
|
||||
<para>
|
||||
Determines how the joins between segments of a polygon are drawn.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_JOIN_MITER</entry>
|
||||
<entry>the sides of each line are extended to meet at an angle.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_JOIN_ROUND</entry>
|
||||
<entry>the sides of the two lines are joined by a circular arc.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_JOIN_BEVEL</entry>
|
||||
<entry>the sides of the two lines are joined by a straight line which
|
||||
makes an equal angle with each line.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_JOIN_MITER:
|
||||
@GDK_JOIN_ROUND:
|
||||
@GDK_JOIN_BEVEL:
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_new ##### -->
|
||||
<para>
|
||||
Create a new graphics context with default values.
|
||||
</para>
|
||||
|
||||
@window: a #GdkDrawable. The created GC must always be used
|
||||
with drawables of the same depth as this one.
|
||||
@Returns: the new graphics context.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_new_with_values ##### -->
|
||||
<para>
|
||||
Create a new GC with the given initial values.
|
||||
</para>
|
||||
|
||||
@window: a #GdkDrawable. The created GC must always be used
|
||||
with drawables of the same depth as this one.
|
||||
@values: a structure containing initial values for the GC.
|
||||
@values_mask: a bit mask indicating which fields in @values
|
||||
are set.
|
||||
@Returns: the new graphics context.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count on a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@Returns: @gc.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count on a graphics context. If
|
||||
the resulting reference count is zero, the graphics
|
||||
context will be destroyed.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_destroy ##### -->
|
||||
<para>
|
||||
Identical to gdk_gc_unref(). This function is obsolete
|
||||
and should not be used.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_get_values ##### -->
|
||||
<para>
|
||||
Retrieves the current values from a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@values: the #GdkGCValues structure in which to store the results.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_foreground ##### -->
|
||||
<para>
|
||||
Sets the foreground color for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@color: the new foreground color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_background ##### -->
|
||||
<para>
|
||||
Sets the background color for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@color: the new background color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_font ##### -->
|
||||
<para>
|
||||
Sets the font for a graphics context. (Note that
|
||||
all text-drawing functions in GDK take a @font
|
||||
argument; the value set here is used when that
|
||||
argument is %NULL.)
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@font: the new font.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_function ##### -->
|
||||
<para>
|
||||
Determines how the current pixel values and the
|
||||
pixel values being drawn are combined to produce
|
||||
the final pixel values.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@function:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_fill ##### -->
|
||||
<para>
|
||||
Set the fill mode for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@fill: the new fill mode.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_tile ##### -->
|
||||
<para>
|
||||
Set a tile pixmap for a graphics context.
|
||||
This will only be used if the fill mode
|
||||
is %GDK_TILED.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@tile: the new tile pixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_stipple ##### -->
|
||||
<para>
|
||||
Set the stipple bitmap for a graphics context. The
|
||||
stipple will only be used if the fill mode is
|
||||
%GDK_STIPPLED or %GDK_OPAQUE_STIPPLED.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@stipple: the new stipple bitmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_ts_origin ##### -->
|
||||
<para>
|
||||
Set the origin when using tiles or stipples with
|
||||
the GC. The tile or stipple will be aligned such
|
||||
that the upper left corner of the tile or stipple
|
||||
will coincide with this point.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@x: the x-coordinate of the origin.
|
||||
@y: the y-coordinate of the origin.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_origin ##### -->
|
||||
<para>
|
||||
Sets the origin of the clip mask. The coordinates are
|
||||
interpreted relative to the upper-left corner of
|
||||
the destination drawable of the current operation.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@x: the x-coordinate of the origin.
|
||||
@y: the y-coordinate of the origin.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_mask ##### -->
|
||||
<para>
|
||||
Sets the clip mask for a graphics context from a bitmap.
|
||||
The clip mask is interpreted relative to the clip
|
||||
origin. (See gdk_gc_set_clip_origin()).
|
||||
</para>
|
||||
|
||||
@gc: the #GdkGC.
|
||||
@mask: a bitmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_rectangle ##### -->
|
||||
<para>
|
||||
Sets the clip mask for a graphics context from a
|
||||
rectangle. The clip mask is interpreted relative to the clip
|
||||
origin. (See gdk_gc_set_clip_origin()).
|
||||
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@rectangle: the rectangle to clip to.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_region ##### -->
|
||||
<para>
|
||||
Sets the clip mask for a graphics context from a region structure.
|
||||
The clip mask is interpreted relative to the clip origin. (See
|
||||
gdk_gc_set_clip_origin()).
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@region: the #GdkRegion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_subwindow ##### -->
|
||||
<para>
|
||||
Sets how drawing with this GC on a window will affect child
|
||||
windows of that window.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@mode: the subwindow mode.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkSubwindowMode ##### -->
|
||||
<para>
|
||||
|
||||
Determines how drawing onto a window will affect child
|
||||
windows of that window.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="3*"><colspec colwidth="7*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CLIP_BY_CHILDREN</entry>
|
||||
<entry>only draw onto the window itself.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_INCLUDE_INFERIORS</entry>
|
||||
<entry>Draw onto the window and child windows.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_CLIP_BY_CHILDREN:
|
||||
@GDK_INCLUDE_INFERIORS:
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_exposures ##### -->
|
||||
<para>
|
||||
Sets whether copying non-visible portions of a drawable
|
||||
using this graphics context generate exposure events
|
||||
for the corresponding regions of the destination
|
||||
drawable. (See gdk_draw_pixmap()).
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@exposures: if %TRUE, exposure events will be generated.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_line_attributes ##### -->
|
||||
<para>
|
||||
Sets various attributes of how lines are drawn. See
|
||||
the corresponding members of GdkGCValues for full
|
||||
explanations of the arguments.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@line_width: the width of lines.
|
||||
@line_style: the dash-style for lines.
|
||||
@cap_style: the manner in which the ends of lines are drawn.
|
||||
@join_style: the in which lines are joined together.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_dashes ##### -->
|
||||
<para>
|
||||
Sets the way dashed-lines are drawn. Lines will be
|
||||
drawn with alternating on and off segments of the
|
||||
lengths specified in @dash_list. The manner in
|
||||
which the on and off segments are drawn is determined
|
||||
by the @line_style value of the GC. (This can
|
||||
be changed with gdk_gc_set_line_attributes)
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@dash_offset: the
|
||||
@dash_list: an array of dash lengths.
|
||||
@n: the number of elements in @dash_list.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_copy ##### -->
|
||||
<para>
|
||||
Copy the set of values from one graphics context
|
||||
onto another graphics context.
|
||||
</para>
|
||||
|
||||
@dst_gc: the destination graphics context.
|
||||
@src_gc: the source graphics context.
|
||||
0
docs/reference/gdk/tmpl/gdk-unused.sgml
Normal file
0
docs/reference/gdk/tmpl/gdk-unused.sgml
Normal file
265
docs/reference/gdk/tmpl/general.sgml
Normal file
265
docs/reference/gdk/tmpl/general.sgml
Normal file
@@ -0,0 +1,265 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
General
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_init ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_init_check ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_exit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@error_code:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkStatus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_OK:
|
||||
@GDK_ERROR:
|
||||
@GDK_ERROR_PARAM:
|
||||
@GDK_ERROR_FILE:
|
||||
@GDK_ERROR_MEM:
|
||||
|
||||
<!-- ##### MACRO GDK_NONE ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PRIORITY_EVENTS ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_locale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_show_events ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_show_events ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@show_events:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@message_type:
|
||||
@func:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_sm_client_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@sm_client_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_use_xshm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_use_xshm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@use_xshm:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_grab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@owner_events:
|
||||
@event_mask:
|
||||
@confine_to:
|
||||
@cursor:
|
||||
@time:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_grab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@owner_events:
|
||||
@time:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_is_grabbed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_flush ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_beep ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_key_repeat_disable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_key_repeat_restore ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
107
docs/reference/gdk/tmpl/images.sgml
Normal file
107
docs/reference/gdk/tmpl/images.sgml
Normal file
@@ -0,0 +1,107 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Images
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkImage ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@visual:
|
||||
@byte_order:
|
||||
@width:
|
||||
@height:
|
||||
@depth:
|
||||
@bpp:
|
||||
@bpl:
|
||||
@mem:
|
||||
|
||||
<!-- ##### ENUM GdkImageType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_IMAGE_NORMAL:
|
||||
@GDK_IMAGE_SHARED:
|
||||
@GDK_IMAGE_FASTEST:
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new_bitmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@data:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@visual:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_put_pixel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@x:
|
||||
@y:
|
||||
@pixel:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_get_pixel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_destroy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
|
||||
|
||||
130
docs/reference/gdk/tmpl/input.sgml
Normal file
130
docs/reference/gdk/tmpl/input.sgml
Normal file
@@ -0,0 +1,130 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Callbacks on file descriptors.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section are used to establish
|
||||
callbacks when some condition becomes true for
|
||||
a file descriptor. They are currently just wrappers around
|
||||
the <link linkend="glib-IO-Channels">IO Channel</link>
|
||||
facility.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link></term>
|
||||
<listitem><para>The main loop in which input callbacks run.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="glib-IO-Channels">IO Channels</link></term>
|
||||
<listitem><para>A newer and more flexible way of doing IO
|
||||
callbacks.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_add_full ##### -->
|
||||
<para>
|
||||
Establish a callback when a condition becomes true on
|
||||
a file descriptor.
|
||||
</para>
|
||||
|
||||
@source: a file descriptor.
|
||||
@condition: the condition.
|
||||
@function: the callback function.
|
||||
@data: callback data passed to @function.
|
||||
@destroy: callback function to call with @data when the input
|
||||
handler is removed.
|
||||
@Returns: a tag that can later be used as an argument to
|
||||
gdk_input_remove().
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInputCondition ##### -->
|
||||
<para>
|
||||
A set of bit flags used to specify conditions for which
|
||||
an input callback will be triggered. The three members
|
||||
of this enumeration correspond to the @readfds,
|
||||
@writefds, and @exceptfds arguments to the
|
||||
<function>select</function> system call.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_INPUT_READ</entry>
|
||||
<entry>the file descriptor has become available for reading.
|
||||
(Or, as is standard in Unix, a socket or pipe was closed
|
||||
at the other end; this is the case if a subsequent read
|
||||
on the file descriptor returns a count of zero.)</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_INPUT_WRITE</entry>
|
||||
<entry>the file descriptor has become available for writing.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_INPUT_EXCEPTION</entry>
|
||||
<entry>an exception was raised on the file descriptor.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_INPUT_READ:
|
||||
@GDK_INPUT_WRITE:
|
||||
@GDK_INPUT_EXCEPTION:
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkInputFunction ##### -->
|
||||
<para>
|
||||
A callback function that will be called when some condition
|
||||
occurs.
|
||||
</para>
|
||||
|
||||
@data: the user data passed to gdk_input_add() or gdk_input_add_full().
|
||||
@source: the source where the condition occurred.
|
||||
@condition: the triggering condition.
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkDestroyNotify ##### -->
|
||||
<para>
|
||||
A callback function called when a piece of user data is
|
||||
no longer being stored by GDK. Will typically free the
|
||||
structure or object that @data points to.
|
||||
</para>
|
||||
|
||||
@data: the user data.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_add ##### -->
|
||||
<para>
|
||||
Establish a callback when a condition becomes true on
|
||||
a file descriptor.
|
||||
</para>
|
||||
|
||||
@source: a file descriptor.
|
||||
@condition: the condition.
|
||||
@function: the callback function.
|
||||
@data: callback data passed to @function.
|
||||
@Returns: a tag that can later be used as an argument to
|
||||
gdk_input_remove().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_remove ##### -->
|
||||
<para>
|
||||
Remove a callback added with gdk_input_add() or
|
||||
gdk_input_add_full().
|
||||
</para>
|
||||
|
||||
@tag: the tag returned when the callback was set up.
|
||||
|
||||
|
||||
154
docs/reference/gdk/tmpl/input_contexts.sgml
Normal file
154
docs/reference/gdk/tmpl/input_contexts.sgml
Normal file
@@ -0,0 +1,154 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input Contexts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkIC ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkICAttr ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@style:
|
||||
@client_window:
|
||||
@focus_window:
|
||||
@filter_events:
|
||||
@spot_location:
|
||||
@line_spacing:
|
||||
@cursor:
|
||||
@preedit_fontset:
|
||||
@preedit_area:
|
||||
@preedit_area_needed:
|
||||
@preedit_foreground:
|
||||
@preedit_background:
|
||||
@preedit_pixmap:
|
||||
@preedit_colormap:
|
||||
@status_fontset:
|
||||
@status_area:
|
||||
@status_area_needed:
|
||||
@status_foreground:
|
||||
@status_background:
|
||||
@status_pixmap:
|
||||
@status_colormap:
|
||||
|
||||
<!-- ##### ENUM GdkICAttributesType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_IC_STYLE:
|
||||
@GDK_IC_CLIENT_WINDOW:
|
||||
@GDK_IC_FOCUS_WINDOW:
|
||||
@GDK_IC_FILTER_EVENTS:
|
||||
@GDK_IC_SPOT_LOCATION:
|
||||
@GDK_IC_LINE_SPACING:
|
||||
@GDK_IC_CURSOR:
|
||||
@GDK_IC_PREEDIT_FONTSET:
|
||||
@GDK_IC_PREEDIT_AREA:
|
||||
@GDK_IC_PREEDIT_AREA_NEEDED:
|
||||
@GDK_IC_PREEDIT_FOREGROUND:
|
||||
@GDK_IC_PREEDIT_BACKGROUND:
|
||||
@GDK_IC_PREEDIT_PIXMAP:
|
||||
@GDK_IC_PREEDIT_COLORMAP:
|
||||
@GDK_IC_STATUS_FONTSET:
|
||||
@GDK_IC_STATUS_AREA:
|
||||
@GDK_IC_STATUS_AREA_NEEDED:
|
||||
@GDK_IC_STATUS_FOREGROUND:
|
||||
@GDK_IC_STATUS_BACKGROUND:
|
||||
@GDK_IC_STATUS_PIXMAP:
|
||||
@GDK_IC_STATUS_COLORMAP:
|
||||
@GDK_IC_ALL_REQ:
|
||||
@GDK_IC_PREEDIT_AREA_REQ:
|
||||
@GDK_IC_PREEDIT_POSITION_REQ:
|
||||
@GDK_IC_STATUS_AREA_REQ:
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@attr:
|
||||
@mask:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_destroy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ic:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ic:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_set_attr ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ic:
|
||||
@attr:
|
||||
@mask:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_attr ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ic:
|
||||
@attr:
|
||||
@mask:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_events ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ic:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_destroy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@attr:
|
||||
|
||||
|
||||
301
docs/reference/gdk/tmpl/input_devices.sgml
Normal file
301
docs/reference/gdk/tmpl/input_devices.sgml
Normal file
@@ -0,0 +1,301 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input Devices
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for handling extended input devices.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
In addition to the normal keyboard and mouse input devices, GTK+ also
|
||||
contains support for <firstterm>extended input devices</firstterm>. In
|
||||
particular, this support is targeted at graphics tablets. Graphics
|
||||
tablets typically return sub-pixel positioning information and possibly
|
||||
information about the pressure and tilt of the stylus. Under
|
||||
X, the support for extended devices is done through the
|
||||
<firstterm>XInput</firstterm> extension.
|
||||
</para>
|
||||
<para>
|
||||
Because handling extended input devices may involve considerable
|
||||
overhead, they need to be turned on for each #GdkWindow
|
||||
individually using gdk_input_set_extension_events().
|
||||
(Or, more typically, for GtkWidgets, using gtk_widget_set_extension_events()).
|
||||
As an additional complication, depending on the support from
|
||||
the windowing system, its possible that a normal mouse
|
||||
cursor will not be displayed for a particular extension
|
||||
device. If an application does not want to deal with displaying
|
||||
a cursor itself, it can ask only to get extension events
|
||||
from devices that will display a cursor, by passing the
|
||||
%GDK_EXTENSION_EVENTS_CURSOR value to
|
||||
gdk_input_set_extension_events(). Otherwise, the application
|
||||
must retrieve the device information using gdk_input_list_devices(),
|
||||
check the <structfield>has_cursor</structfield> field, and,
|
||||
if it is %FALSE, draw a cursor itself when it receives
|
||||
motion events.
|
||||
</para>
|
||||
<para>
|
||||
Each pointing device is assigned a unique integer ID; events from a
|
||||
particular device can be identified by the
|
||||
<structfield>deviceid</structfield> field in the event structure. The
|
||||
events generated by pointer devices have also been extended to contain
|
||||
<structfield>pressure</structfield>, <structfield>xtilt</structfield>
|
||||
and <structfield>ytilt</structfield> fields which contain the extended
|
||||
information reported as additional <firstterm>valuators</firstterm>
|
||||
from the device. The <structfield>pressure</structfield> field is a
|
||||
a double value ranging from 0.0 to 1.0, while the tilt fields are
|
||||
double values ranging from -1.0 to 1.0. (With -1.0 representing the
|
||||
maximum title to the left or up, and 1.0 representing the maximum
|
||||
tilt to the right or down.)
|
||||
</para>
|
||||
<para>
|
||||
One additional field in each event is the
|
||||
<structfield>source</structfield> field, which contains an
|
||||
enumeration value describing the type of device; this currently
|
||||
can be one of
|
||||
%GDK_SOURCE_MOUSE,
|
||||
%GDK_SOURCE_PEN,
|
||||
%GDK_SOURCE_ERASER,
|
||||
or %GDK_SOURCE_CURSOR. This field is present to allow simple
|
||||
applications to (for instance) delete when they detect eraser
|
||||
devices without having to keep track of complicated per-device
|
||||
settings.
|
||||
</para>
|
||||
<para>
|
||||
Various aspects of each device may be configured. The easiest way of
|
||||
creating a GUI to allow the user to conifigure such a device
|
||||
is to use to use the #GtkInputDialog widget in GTK+.
|
||||
However, even when using this widget, application writers
|
||||
will need to directly query and set the configuration parameters
|
||||
in order to save the state between invocations of the application.
|
||||
The configuration of devices is queried using gdk_input_list_devices.
|
||||
Each device must is activated using gdk_input_set_mode(), which
|
||||
also controls whether the device's range is mapped to the
|
||||
entire screen or to a single window. The mapping of the valuators of
|
||||
the device onto the predefined valuator types is set using
|
||||
gdk_input_set_axes. And the source type for each device
|
||||
can be set with gdk_input_set_source().
|
||||
</para>
|
||||
<para>
|
||||
Devices may also have associated <firstterm>keys</firstterm>
|
||||
or macro buttons. Such keys can be globally set to map
|
||||
into normal X keyboard events. The mapping is set using
|
||||
gdk_input_set_key().
|
||||
</para>
|
||||
<para>
|
||||
The interfaces in this section will most likely be considerably
|
||||
modified in the future to accomodate devices that may have different
|
||||
sets of additional valuators than the pressure xtilt and ytilt.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### MACRO GDK_CORE_POINTER ##### -->
|
||||
<para>
|
||||
This macro contains an integer value representing
|
||||
the device ID for the core pointer device.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_list_devices ##### -->
|
||||
<para>
|
||||
Lists all available input devices, along with their
|
||||
configuration information.
|
||||
</para>
|
||||
|
||||
@Returns: A #GList of #GdkDeviceInfo structures. This list
|
||||
is internal data of GTK+ and should not be modified
|
||||
or freed.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceInfo ##### -->
|
||||
<para>
|
||||
The #GdkDeviceInfo structure contains information about a
|
||||
device. It has the following fields:
|
||||
</para>
|
||||
|
||||
@deviceid: a unique integer ID for this device.
|
||||
@name: the human-readable name for the device.
|
||||
@source: the type of device.
|
||||
@mode: a value indicating whether the device is enabled and
|
||||
how the device coordinates map to the screen.
|
||||
@has_cursor: if %TRUE, a cursor will be displayed indicating
|
||||
the current on-screen location to the user. Otherwise,
|
||||
the application is responsible for drawing a cursor
|
||||
itself.
|
||||
@num_axes: the number of axes for this device.
|
||||
@axes: a pointer to an array of GdkAxisUse values which
|
||||
give the mapping of axes onto the possible valuators
|
||||
for a GDK device.
|
||||
@num_keys: the number of macro buttons.
|
||||
@keys: a pointer to an array of #GdkDeviceKey structures
|
||||
which describe what key press events are generated
|
||||
for each macro button.
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceKey ##### -->
|
||||
<para>
|
||||
The #GdkDeviceKey structure contains information
|
||||
about the mapping of one device macro button onto
|
||||
a normal X key event. It has the following fields:
|
||||
</para>
|
||||
|
||||
@keyval: the keyval to generate when the macro button is pressed.
|
||||
If this is 0, no keypress will be generated.
|
||||
@modifiers: the modifiers set for the generated key event.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_extension_events ##### -->
|
||||
<para>
|
||||
Turns extension events on or off for a particular window,
|
||||
and specifies the event mask for extension events.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@mask: the event mask
|
||||
@mode: the type of extension events that are desired.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkExtensionMode ##### -->
|
||||
<para>
|
||||
An enumeration used to specify which extension events
|
||||
are desired for a particular widget.
|
||||
</para>
|
||||
|
||||
@GDK_EXTENSION_EVENTS_NONE: no extension events are desired.
|
||||
@GDK_EXTENSION_EVENTS_ALL: all extension events are desired.
|
||||
@GDK_EXTENSION_EVENTS_CURSOR: extension events are desired only if a cursor
|
||||
will be displayed for the device.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_source ##### -->
|
||||
<para>
|
||||
Sets the source type for a device.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure
|
||||
@source: the new source type.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInputSource ##### -->
|
||||
<para>
|
||||
An enumeration describing the type of an input device
|
||||
in general terms.
|
||||
</para>
|
||||
|
||||
@GDK_SOURCE_MOUSE: the device is a mouse. (This will be reported for the core
|
||||
pointer, even if it is something else, such as a trackball.)
|
||||
@GDK_SOURCE_PEN: the device is a stylus of a graphics tablet or similar device.
|
||||
@GDK_SOURCE_ERASER: the device is an eraser. Typically, this would be the other end
|
||||
of a stylus on a graphics tablet.
|
||||
@GDK_SOURCE_CURSOR: the device is a graphics tablet "puck" or similar device.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_mode ##### -->
|
||||
<para>
|
||||
Enables or disables a device, and determines how the
|
||||
device maps onto the screen.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@mode: the new mode.
|
||||
@Returns: %TRUE if the device supports the given mode, otherwise
|
||||
%FALSE and the device's mode is unchanged.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInputMode ##### -->
|
||||
<para>
|
||||
An enumeration that describes the mode of an input device.
|
||||
</para>
|
||||
|
||||
@GDK_MODE_DISABLED: the device is disabled and will not report any events.
|
||||
@GDK_MODE_SCREEN: the device is enabled. The device's coordinate space
|
||||
maps to the entire screen.
|
||||
@GDK_MODE_WINDOW: the device is enabled. The device's coordinate space
|
||||
is mapped to a single window. The manner in which this window
|
||||
is chosen is undefined, but it will typically be the same
|
||||
way in which the focus window for key events is determined.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_axes ##### -->
|
||||
<para>
|
||||
Sets the mapping of the axes (valuators) of a device
|
||||
onto the predefined valuator types that GTK+ understands.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@axes: an array of GdkAxisUse. This length of this array
|
||||
must match the number of axes for the device.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkAxisUse ##### -->
|
||||
<para>
|
||||
An enumeration describing the way in which a device
|
||||
axis (valuator) maps onto the predefined valuator
|
||||
types that GTK+ understands.
|
||||
</para>
|
||||
|
||||
@GDK_AXIS_IGNORE: the axis is ignored.
|
||||
@GDK_AXIS_X: the axis is used as the x axis.
|
||||
@GDK_AXIS_Y: the axis is used as the y axis.
|
||||
@GDK_AXIS_PRESSURE: the axis is used for pressure information.
|
||||
@GDK_AXIS_XTILT: the axis is used for x tilt information.
|
||||
@GDK_AXIS_YTILT: the axis is used for x tilt information.
|
||||
@GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_key ##### -->
|
||||
<para>
|
||||
Sets the key event generated when a macro button is pressed.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@index: the index of the macro button.
|
||||
@keyval: the key value for the #GdkKeypressEvent to generate.
|
||||
(a value of 0 means no event will be generated.)
|
||||
@modifiers: the modifier field for the generated
|
||||
#GdkKeyPressEvent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_window_get_pointer ##### -->
|
||||
<para>
|
||||
Returns information about the current position of the pointer
|
||||
within a window, including extended device information.
|
||||
Any of the return parameters may be %NULL, in which case,
|
||||
they will be ignored.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@deviceid: a device ID.
|
||||
@x: location to store current x postion.
|
||||
@y: location to store current y postion.
|
||||
@pressure: location to store current pressure.
|
||||
@xtilt: location to store current tilt in the x direction.
|
||||
@ytilt: location to store current tilt in the y direction.
|
||||
@mask: location to store the current modifier state.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_motion_events ##### -->
|
||||
<para>
|
||||
Retrieves the motion history for a given device/window pair.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@deviceid: the device for which to retrieve motion history.
|
||||
@start: the start time.
|
||||
@stop: the stop time.
|
||||
@nevents_return: location to store the number of events returned.
|
||||
@Returns: a newly allocated array containing all the events
|
||||
from @start to @stop. This array should be freed
|
||||
with g_free() when you are finished using it.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkTimeCoord ##### -->
|
||||
<para>
|
||||
The #GdkTimeCoord structure stores a single event in a
|
||||
motion history. It contains the following fields:
|
||||
</para>
|
||||
|
||||
@time: The timestamp for this event.
|
||||
@x: the x position.
|
||||
@y: the y position.
|
||||
@pressure: the pressure.
|
||||
@xtilt: the tilt in the x direction.
|
||||
@ytilt: the tilt in the y direction.
|
||||
|
||||
101
docs/reference/gdk/tmpl/input_methods.sgml
Normal file
101
docs/reference/gdk/tmpl/input_methods.sgml
Normal file
@@ -0,0 +1,101 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input Methods
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkIMStyle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_IM_PREEDIT_AREA:
|
||||
@GDK_IM_PREEDIT_CALLBACKS:
|
||||
@GDK_IM_PREEDIT_POSITION:
|
||||
@GDK_IM_PREEDIT_NOTHING:
|
||||
@GDK_IM_PREEDIT_NONE:
|
||||
@GDK_IM_PREEDIT_MASK:
|
||||
@GDK_IM_STATUS_AREA:
|
||||
@GDK_IM_STATUS_CALLBACKS:
|
||||
@GDK_IM_STATUS_NOTHING:
|
||||
@GDK_IM_STATUS_NONE:
|
||||
@GDK_IM_STATUS_MASK:
|
||||
|
||||
<!-- ##### TYPEDEF GdkWChar ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_ready ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_begin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ic:
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_end ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_decide_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@supported_style:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_set_best_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@best_allowed_style:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_wcstombs ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_mbstowcs ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@src:
|
||||
@dest_max:
|
||||
@Returns:
|
||||
|
||||
|
||||
93
docs/reference/gdk/tmpl/keys.sgml
Normal file
93
docs/reference/gdk/tmpl/keys.sgml
Normal file
@@ -0,0 +1,93 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Key Values
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
functions for manipulating keyboard codes.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Key values are the codes which are sent whenever a key is pressed or released.
|
||||
They appear in the <structfield>keyval</structfield> field of the
|
||||
#GdkEventKey structure, which is passed to signal handlers for the
|
||||
"key-press-event" and "key-release-event" signals.
|
||||
The complete list of key values can be found in the <gdk/gdkkeysyms.h>
|
||||
header file.
|
||||
</para>
|
||||
<para>
|
||||
Key values can be converted into a string representation using
|
||||
gdk_keyval_name(). The reverse function, converting a string to a key value,
|
||||
is provided by gdk_keyval_from_name().
|
||||
</para>
|
||||
<para>
|
||||
The case of key values can be determined using gdk_keyval_is_upper() and
|
||||
gdk_keyval_is_lower(). Key values can be converted to upper or lower case
|
||||
using gdk_keyval_to_upper() and gdk_keyval_to_lower().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_name ##### -->
|
||||
<para>
|
||||
Converts a key value into a symbolic name.
|
||||
The names are the same as those in the <gdk/gdkkeysyms.h> header file
|
||||
but without the leading "GDK_".
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: a string containing the name of the key, or NULL if @keyval is not
|
||||
a valid key. The string should not be modified.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_from_name ##### -->
|
||||
<para>
|
||||
Converts a key name to a key value.
|
||||
</para>
|
||||
|
||||
@keyval_name: a key name.
|
||||
@Returns: the corresponding key value, or %GDK_VoidSymbol if the key name is
|
||||
not a valid key.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_is_upper ##### -->
|
||||
<para>
|
||||
Returns TRUE if the given key value is in upper case.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: TRUE if @keyval is in upper case, or if @keyval is not subject to
|
||||
case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_is_lower ##### -->
|
||||
<para>
|
||||
Returns TRUE if the given key value is in lower case.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: TRUE if @keyval is in lower case, or if @keyval is not subject to
|
||||
case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_upper ##### -->
|
||||
<para>
|
||||
Converts a key value to upper case, if applicable.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: the upper case form of @keyval, or @keyval itself if it is already
|
||||
in upper case or it is not subject to case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_lower ##### -->
|
||||
<para>
|
||||
Converts a key value to lower case, if applicable.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: the lower case form of @keyval, or @keyval itself if it is already
|
||||
in lower case or it is not subject to case conversion.
|
||||
|
||||
|
||||
196
docs/reference/gdk/tmpl/pixmaps.sgml
Normal file
196
docs/reference/gdk/tmpl/pixmaps.sgml
Normal file
@@ -0,0 +1,196 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Bitmaps and Pixmaps
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Offscreen drawables.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Pixmaps are offscreen drawables. They can be drawn upon with the
|
||||
standard drawing primitives, then copied to another drawable (such as
|
||||
a #GdkWindow) with gdk_pixmap_draw(). The depth of a pixmap
|
||||
is the number of bits per pixels. Bitmaps are simply pixmaps
|
||||
with a depth of 1. (That is, they are monochrome bitmaps - each
|
||||
pixel can be either on or off).
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkPixmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable.
|
||||
Pointers to structures of type #GdkPixmap, #GdkBitmap,
|
||||
and #GdkWindow, can often be used interchangeably.
|
||||
The type #GdkDrawable refers generically to any of
|
||||
these types.
|
||||
</para>
|
||||
|
||||
@user_data:
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_new ##### -->
|
||||
<para>
|
||||
Create a new pixmap with a given size and depth.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL if @depth is specified,
|
||||
@width: The width of the new pixmap in pixels.
|
||||
@height: The height of the new pixmap in pixels.
|
||||
@depth: The depth (number of bits per pixel) of the new pixmap.
|
||||
If -1, and @window is not %NULL, the depth of the new
|
||||
pixmap will be equal to that of @window.
|
||||
@Returns: the #GdkBitmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
|
||||
<para>
|
||||
Creates a new bitmap from data in XBM format.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL, in which case the root window is
|
||||
used.
|
||||
@data: a pointer to the XBM data.
|
||||
@width: the width of the new pixmap in pixels.
|
||||
@height: the height of the new pixmap in pixels.
|
||||
@Returns: the #GdkBitmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
|
||||
<para>
|
||||
Create a two-color pixmap from data in XBM data.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL, if the depth is given.
|
||||
@data: a pointer to the data.
|
||||
@width: the width of the new pixmap in pixels.
|
||||
@height: the height of the new pixmap in pixels.
|
||||
@depth: the depth (number of bits per pixel) of the new pixmap.
|
||||
@fg: the foreground color.
|
||||
@bg: the background color.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
|
||||
<para>
|
||||
Create a pixmap from a XPM file.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@filename: the filename of a file containing XPM data.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
|
||||
<para>
|
||||
Create a pixmap from a XPM file using a particular colormap.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL if @colormap is given.
|
||||
@colormap: the #GdkColormap that the new pixmap will be use.
|
||||
If omitted, the colormap for @window will be used.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@filename: the filename of a file containing XPM data.
|
||||
@Returns: the #GdkPixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
|
||||
<para>
|
||||
Create a pixmap from data in XPM format.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap.
|
||||
@mask: Pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: This color will be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL
|
||||
in which case a default color will be used.
|
||||
@data: Pointer to a string containing the XPM data.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
|
||||
<para>
|
||||
Create a pixmap from data in XPM format using a particular
|
||||
colormap.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL if @colormap is given.
|
||||
@colormap: the #GdkColormap that the new pixmap will be use.
|
||||
If omitted, the colormap for @window will be used.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@data: Pointer to a string containing the XPM data.
|
||||
@Returns: the #GdkPixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count of a pixmap.
|
||||
</para>
|
||||
|
||||
@pixmap: a #GdkPixmap
|
||||
@Returns: @pixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count of a pixmap. If the resulting
|
||||
reference count is zero, destroy the pixmap.
|
||||
</para>
|
||||
|
||||
@pixmap: a #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkBitmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable of depth
|
||||
1. Pointers to structures of type GdkPixmap, #GdkBitmap, and
|
||||
#GdkWindow, can often be used interchangeably. The type #GdkDrawable
|
||||
refers generically to any of these types.
|
||||
</para>
|
||||
|
||||
@user_data:
|
||||
|
||||
<!-- ##### FUNCTION gdk_bitmap_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count of a bitmap. An alias
|
||||
for gdk_pixmap_ref().
|
||||
</para>
|
||||
|
||||
@pixmap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_bitmap_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count of a bitmap. An alias
|
||||
for gdk_pixmap_unref().
|
||||
</para>
|
||||
|
||||
@pixmap:
|
||||
|
||||
|
||||
218
docs/reference/gdk/tmpl/properties.sgml
Normal file
218
docs/reference/gdk/tmpl/properties.sgml
Normal file
@@ -0,0 +1,218 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Properties and Atoms
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
functions to manipulate properties on windows.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Each window under X can have any number of associated
|
||||
<firstterm>properties</firstterm> attached to it.
|
||||
Properties are arbitrary chunks of data identified by
|
||||
<firstterm>atom</firstterm>s. (An <firstterm>atom</firstterm>
|
||||
is a numeric index into a string table on the X server. They are used
|
||||
to transfer strings efficiently between clients without
|
||||
having to transfer the entire string.) A property
|
||||
has an associated type, which is also identified
|
||||
using an atom.
|
||||
</para>
|
||||
<para>
|
||||
A property has an associated <firstterm>format</firstterm>,
|
||||
an integer describing how many bits are in each unit
|
||||
of data inside the property. It must be 8, 16, or 32.
|
||||
When data is transfered between the server and client,
|
||||
if they are of different endianesses it will be byteswapped
|
||||
as necessary according to the format of the property.
|
||||
Note that on the client side, properties of format 32
|
||||
will be stored with one unit per <emphasis>long</emphasis>,
|
||||
even if a long integer has more than 32 bits on the platform.
|
||||
(This decision was apparently made for Xlib to maintain
|
||||
compatibility with programs that assumed longs were 32
|
||||
bits, at the expense of programs that knew better.)
|
||||
</para>
|
||||
<para>
|
||||
The functions in this section are used to add, remove
|
||||
and change properties on windows, to convert atoms
|
||||
to and from strings and to manipulate some types of
|
||||
data commonly stored in X window properties.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### TYPEDEF GdkAtom ##### -->
|
||||
<para>
|
||||
A numeric type representing a string as an index into a table
|
||||
of strings on the X server.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_property_to_text_list ##### -->
|
||||
<para>
|
||||
Convert a text string from the encoding as it is stored in
|
||||
a property into an array of strings in the encoding of
|
||||
the current local. (The elements of the array represent
|
||||
the null-separated elements of the original text string.)
|
||||
</para>
|
||||
|
||||
@encoding: an atom representing the encoding. The most common
|
||||
values for this are <literal>STRING</literal>,
|
||||
or <literal>COMPOUND_TEXT</literal>. This is
|
||||
value used as the type for the property.
|
||||
@format: the format of the property.
|
||||
@text: the text data.
|
||||
@length: the length of the property, in item.s
|
||||
@list: location to store a terminated array of strings
|
||||
in the encoding of the current locale. This
|
||||
array should be freed using gdk_free_text_list().
|
||||
@Returns: the number of strings stored in @list, or 0,
|
||||
if the conversion failed.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_free_text_list ##### -->
|
||||
<para>
|
||||
Free the array of strings created by
|
||||
gdk_text_property_to_text_list().
|
||||
</para>
|
||||
|
||||
@list: the value stored in the @list parameter by
|
||||
a call to gdk_text_property_to_text_list().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_to_compound_text ##### -->
|
||||
<para>
|
||||
Convert a string from the encoding of the current locale
|
||||
into a form suitable for storing in a window property.
|
||||
</para>
|
||||
|
||||
@str: a null-terminated string.
|
||||
@encoding: location to store the encoding atom (to be used as the type for the property).
|
||||
@format: location to store the format for the property.
|
||||
@ctext: location to store newly allocated data for the property.
|
||||
@length: location to store the length of @ctext in items.
|
||||
@Returns: 0 upon sucess, non-zero upon failure.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_free_compound_text ##### -->
|
||||
<para>
|
||||
Free the data returned from gdk_string_to_compound_text().
|
||||
</para>
|
||||
|
||||
@ctext: The pointer stored in @ctext from a call to gdk_string_to_compound_text().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_atom_intern ##### -->
|
||||
<para>
|
||||
Find or create an atom corresponding to a given string.
|
||||
</para>
|
||||
|
||||
@atom_name: a string.
|
||||
@only_if_exists: if %TRUE, do not create a new atom, but
|
||||
just return the atom if it already exists.
|
||||
@Returns: the atom corresponding to @atom_name, or, if
|
||||
@only_if_exists is false, and an atom does not
|
||||
already exists for the string, %GDK_NONE.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_atom_name ##### -->
|
||||
<para>
|
||||
Determine the string corresponding to an atom.
|
||||
</para>
|
||||
|
||||
@atom: a #GdkAtom.
|
||||
@Returns: a newly allocated string containing the string
|
||||
corresponding to @atom. When you are done
|
||||
with the return value, you should free it
|
||||
using g_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_property_get ##### -->
|
||||
<para>
|
||||
Retrieves a portion of the contents of a property. If the
|
||||
property does not exist, then the function returns FALSE,
|
||||
and %GDK_NONE will be stored in @actual_property_type.
|
||||
|
||||
Note: the <function>XGetWindowProperty()</function>
|
||||
function that gdk_property_get()
|
||||
uses has a very confusing and complicated set of semantics.
|
||||
Unfortunately, gdk_property_get() makes the situation
|
||||
worse instead of better (the semantics should be considered
|
||||
undefined), and also prints warnings to stderr in cases where it
|
||||
should return a useful error to the program. You are advised to use
|
||||
<function>XGetWindowProperty()</function>
|
||||
directly until a replacement function for gdk_property_get()
|
||||
is provided.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@property: the property to retrieve.
|
||||
@type: the desired property type, or 0, if any type of data
|
||||
is acceptable. If this does not match the actual
|
||||
type, then @actual_format and @actual_length will
|
||||
be filled in, a warning will be printed to stderr
|
||||
and no data will be returned.
|
||||
@offset: the offset into the property at which to begin
|
||||
retrieving data. (in 4 byte units!)
|
||||
@length: the length of the data to delete. (in bytes, but
|
||||
the actual retrieved length will be the next
|
||||
integer multiple multiple of four greater than
|
||||
this!)
|
||||
@pdelete: if %TRUE, delete the property after retrieving the
|
||||
data.
|
||||
@actual_property_type: location to store the actual type of
|
||||
the property.
|
||||
@actual_format: location to store the actual format of the data.
|
||||
@actual_length: location to store the length of the retrieved
|
||||
data, in bytes.
|
||||
@data: location to store a pointer to the data. The retrieved
|
||||
data should be freed with g_free() when you are finished
|
||||
using it.
|
||||
@Returns: %TRUE if data was sucessfully received and stored
|
||||
in @data, otherwise %FALSE.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_property_change ##### -->
|
||||
<para>
|
||||
Change the contents of a property on a window.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@property: the property to change.
|
||||
@type: the new type for the property. If @mode is
|
||||
%GDK_PROP_MODE_REPLACE or %GDK_PROP_MODE_APPEND, then this
|
||||
must match the existing type or an error will occur.
|
||||
@format: the new format for the property. If @mode is
|
||||
%GDK_PROP_MODE_REPLACE or %GDK_PROP_MODE_APPEND, then this
|
||||
must match the existing format or an error will occur.
|
||||
@mode: a value describing how the new data is to be combined
|
||||
with the current data.
|
||||
@data: the data
|
||||
(a <literal>guchar *</literal>
|
||||
<literal>gushort *</literal>, or
|
||||
<literal>gulong *</literal>, depending on @format), cast to a
|
||||
<literal>guchar *</literal>.
|
||||
@nelements: the number of elements of size determined by the format,
|
||||
contained in @data.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPropMode ##### -->
|
||||
<para>
|
||||
Describes how existing data is combined with new data when
|
||||
using gdk_property_change().
|
||||
</para>
|
||||
|
||||
@GDK_PROP_MODE_REPLACE: the new data replaces the existing data.
|
||||
@GDK_PROP_MODE_PREPEND: the new data is prepended to the existing data.
|
||||
@GDK_PROP_MODE_APPEND: the new data is appended to the existing data.
|
||||
|
||||
<!-- ##### FUNCTION gdk_property_delete ##### -->
|
||||
<para>
|
||||
Delete a property from a window.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@property: the property to delete.
|
||||
|
||||
|
||||
247
docs/reference/gdk/tmpl/regions.sgml
Normal file
247
docs/reference/gdk/tmpl/regions.sgml
Normal file
@@ -0,0 +1,247 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Points, Rectangles and Regions
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
simple graphical data types.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
GDK provides the #GdkPoint, #GdkRectangle and #GdkRegion data types for
|
||||
representing pixels and sets of pixels on the screen.
|
||||
</para>
|
||||
<para>
|
||||
#GdkPoint is a simple structure containing an x and y coordinate of a point.
|
||||
</para>
|
||||
<para>
|
||||
#GdkRectangle is a structure holding the position and size of a rectangle.
|
||||
The intersection of two rectangles can be computed with
|
||||
gdk_rectangle_intersect(). To find the union of two rectangles use
|
||||
gdk_rectangle_union().
|
||||
</para>
|
||||
<para>
|
||||
#GdkRegion is an opaque data type holding a set of arbitrary pixels, and is
|
||||
usually used for clipping graphical operations (see gdk_gc_set_clip_region()).
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkPoint ##### -->
|
||||
<para>
|
||||
Defines the x and y coordinates of a point.
|
||||
Note that both are defined as #gint16 values, so the coordinates are limited
|
||||
to between -32,768 and 32,767.
|
||||
</para>
|
||||
|
||||
@x: the x coordinate of the point.
|
||||
@y: the y coordinate of the point.
|
||||
|
||||
<!-- ##### STRUCT GdkRectangle ##### -->
|
||||
<para>
|
||||
Defines the position and size of a rectangle.
|
||||
</para>
|
||||
|
||||
@x: the x coordinate of the left edge of the rectangle.
|
||||
@y: the y coordinate of the top of the rectangle.
|
||||
@width: the width of the rectangle.
|
||||
@height: the height of the rectangle.
|
||||
|
||||
<!-- ##### FUNCTION gdk_rectangle_intersect ##### -->
|
||||
<para>
|
||||
Calculates the intersection of two rectangles.
|
||||
</para>
|
||||
|
||||
@src1: a #GdkRectangle.
|
||||
@src2: a #GdkRectangle.
|
||||
@dest: the intersection of @src1 and @src2.
|
||||
@Returns: TRUE if the rectangles intersect.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rectangle_union ##### -->
|
||||
<para>
|
||||
Calculates the union of two rectangles.
|
||||
The union of rectangles @src1 and @src2 is the smallest rectangle which
|
||||
includes both @src1 and @src2 within it.
|
||||
</para>
|
||||
|
||||
@src1: a #GdkRectangle.
|
||||
@src2: a #GdkRectangle.
|
||||
@dest: the union of @src1 and @src2.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkRegion ##### -->
|
||||
<para>
|
||||
A GdkRegion represents a set of pixels on the screen.
|
||||
The only user-visible field of the structure is the user_data member, which
|
||||
can be used to attach arbitrary data to the #GdkRegion.
|
||||
</para>
|
||||
|
||||
@user_data: arbitrary data attached to the #GdkRegion.
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_new ##### -->
|
||||
<para>
|
||||
Creates a new empty #GdkRegion.
|
||||
</para>
|
||||
|
||||
@Returns: a new empty #GdkRegion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_destroy ##### -->
|
||||
<para>
|
||||
Destroys a #GdkRegion.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_get_clipbox ##### -->
|
||||
<para>
|
||||
Returns the smallest rectangle which includes the entire #GdkRegion.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@rectangle: returns the smallest rectangle which includes all of @region.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_empty ##### -->
|
||||
<para>
|
||||
Returns TRUE if the #GdkRegion is empty.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@Returns: TRUE if @region is empty.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_equal ##### -->
|
||||
<para>
|
||||
Returns TRUE if the two regions are the same.
|
||||
</para>
|
||||
|
||||
@region1: a #GdkRegion.
|
||||
@region2: a #GdkRegion.
|
||||
@Returns: TRUE if @region1 and @region2 are equal.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_point_in ##### -->
|
||||
<para>
|
||||
Returns TRUE if a point is in a region.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@x: the x coordinate of a point.
|
||||
@y: the y coordinate of a point.
|
||||
@Returns: TRUE if the point is in @region.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_rect_in ##### -->
|
||||
<para>
|
||||
Tests whether a rectangle is within a region.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@rect: a #GdkRectangle.
|
||||
@Returns: GDK_OVERLAP_RECTANGLE_IN, GDK_OVERLAP_RECTANGLE_OUT, or
|
||||
GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
|
||||
outside, or partly inside the #GdkRegion, respectively.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkOverlapType ##### -->
|
||||
<para>
|
||||
Specifies the possible values returned by gdk_region_rect_in().
|
||||
</para>
|
||||
|
||||
@GDK_OVERLAP_RECTANGLE_IN: if the rectangle is inside the #GdkRegion.
|
||||
@GDK_OVERLAP_RECTANGLE_OUT: if the rectangle is outside the #GdkRegion.
|
||||
@GDK_OVERLAP_RECTANGLE_PART: if the rectangle is partly inside the #GdkRegion.
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_polygon ##### -->
|
||||
<para>
|
||||
Creates a new #GdkRegion using the polygon defined by a number of points.
|
||||
|
||||
</para>
|
||||
|
||||
@points: an array of #GdkPoint structs.
|
||||
@npoints: the number of elements in the @points array.
|
||||
@fill_rule: specifies which pixels are included in the region when the polygon
|
||||
overlaps itself.
|
||||
@Returns: a new #GdkRegion based on the given polygon.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_offset ##### -->
|
||||
<para>
|
||||
Moves a region.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@dx: the distance to move the region horizontally.
|
||||
@dy: the distance to move the region vertically.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_shrink ##### -->
|
||||
<para>
|
||||
Resizes a region.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@dx:
|
||||
@dy:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_union_with_rect ##### -->
|
||||
<para>
|
||||
Returns the union of a region and a rectangle.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@rect: a #GdkRectangle.
|
||||
@Returns: the union of @region and @rect.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_regions_intersect ##### -->
|
||||
<para>
|
||||
Returns the intersection of two regions.
|
||||
</para>
|
||||
|
||||
@source1: a #GdkRegion.
|
||||
@source2: a #GdkRegion.
|
||||
@Returns: the intersection of @source1 and @source2.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_regions_union ##### -->
|
||||
<para>
|
||||
Returns the union of two regions.
|
||||
This is all pixels in either of @source1 or @source2.
|
||||
</para>
|
||||
|
||||
@source1: a #GdkRegion.
|
||||
@source2: a #GdkRegion.
|
||||
@Returns: the union of @source1 and @source2.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_regions_subtract ##### -->
|
||||
<para>
|
||||
Subtracts one region from another.
|
||||
The result is a region containing all the pixels which are in @source1, but
|
||||
which are not in @source2.
|
||||
</para>
|
||||
|
||||
@source1: a #GdkRegion.
|
||||
@source2: a #GdkRegion to subtract from @source1.
|
||||
@Returns: @source1 - @source2.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_regions_xor ##### -->
|
||||
<para>
|
||||
Returns the difference between the union and the intersection of two regions.
|
||||
This is a region containing the pixels that are in one of the source regions,
|
||||
but which are not in both.
|
||||
</para>
|
||||
|
||||
@source1: a #GdkRegion.
|
||||
@source2: a #GdkRegion.
|
||||
@Returns: the difference between the union and the intersection of @source1
|
||||
and @source2.
|
||||
|
||||
|
||||
450
docs/reference/gdk/tmpl/rgb.sgml
Normal file
450
docs/reference/gdk/tmpl/rgb.sgml
Normal file
@@ -0,0 +1,450 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkRGB
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
displays RGB images (as well as grayscale and colormapped) to
|
||||
the native window.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
GdkRgb converts RGB, grayscale, and colormapped images into the native
|
||||
window pixel format and displays them. It takes care of colormaps,
|
||||
visuals, dithering, and management of the temporary buffers.
|
||||
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You must call gdk_rgb_init() before using any GdkRgb functionality. If
|
||||
you fail to do so, expect coredumps. All Gtk+ widgets that use GdkRgb
|
||||
(including #GtkPreview) call gdk_rgb_init() in their class_init method.
|
||||
Thus, if you use GdkRgb only indirectly, you don't need to worry
|
||||
about it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GdkRgb tries to use the system default visual and colormap, but
|
||||
doesn't always succeed. Thus, you have to be prepared to install the
|
||||
visual and colormap generated by GdkRgb. The following code sequence
|
||||
(before any widgets are created) should work in most applications:
|
||||
</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_rgb_init ();
|
||||
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
|
||||
gtk_widget_set_default_visual (gdk_rgb_get_visual ());
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>
|
||||
You can also push the colormap and visual, but in general it doesn't
|
||||
work unless the push wraps the window creation call. If you wrap the
|
||||
push around a widget which is embedded in a window without the GdkRgb
|
||||
colormap and visual, it probably won't work, and is likely to cause
|
||||
colormap flashing, as well.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On 8-bit systems, the colormaps used by Imlib and GdkRgb may
|
||||
conflict. There is no good general solution to this other than phasing
|
||||
out the dependence on Imlib.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can set the threshold for installing colormaps with
|
||||
gdk_rgb_set_min_colors (). The default is 5x5x5 (125). If a colorcube
|
||||
of this size or larger can be allocated in the default colormap, then
|
||||
that's done. Otherwise, GdkRgb creates its own private colormap.
|
||||
Setting it to 0 means that it always tries to use the default
|
||||
colormap, and setting it to 256 means that it always creates a private
|
||||
one. Note, however, that setting it to 0 doesn't let you get away with
|
||||
ignoring the colormap and visual - a colormap is always created in
|
||||
grayscale and direct color modes, and the visual is changed in cases
|
||||
where a "better" visual than the default is available.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>A simple example program using GdkRGB.</title>
|
||||
<programlisting>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define IMAGE_WIDTH 256
|
||||
#define IMAGE_HEIGHT 256
|
||||
|
||||
guchar rgbbuf[IMAGE_WIDTH * IMAGE_HEIGHT * 3];
|
||||
|
||||
gboolean on_darea_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer user_data);
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window, *darea;
|
||||
gint x, y;
|
||||
guchar *pos;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gdk_rgb_init ();
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
darea = gtk_drawing_area_new ();
|
||||
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), IMAGE_WIDTH, IMAGE_HEIGHT);
|
||||
gtk_container_add (GTK_CONTAINER (window), darea);
|
||||
gtk_signal_connect (GTK_OBJECT (darea), "expose-event",
|
||||
GTK_SIGNAL_FUNC (on_darea_expose), NULL);
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
/* Set up the RGB buffer. */
|
||||
pos = rgbbuf;
|
||||
for (y = 0; y < IMAGE_HEIGHT; y++)
|
||||
{
|
||||
for (x = 0; x < IMAGE_WIDTH; x++)
|
||||
{
|
||||
*pos++ = x - x % 32; /* Red. */
|
||||
*pos++ = (x / 32) * 4 + y - y % 32; /* Green. */
|
||||
*pos++ = y - y % 32; /* Blue. */
|
||||
}
|
||||
}
|
||||
|
||||
gtk_main ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
on_darea_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
gdk_draw_rgb_image (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
0, 0, IMAGE_WIDTH, IMAGE_HEIGHT,
|
||||
GDK_RGB_DITHER_MAX, rgbbuf, IMAGE_WIDTH * 3);
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GdkColor</term>
|
||||
<listitem><para>The underlying Gdk mechanism for allocating
|
||||
colors.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkRgbCmap ##### -->
|
||||
<para>
|
||||
A private data structure which maps color indices to actual RGB
|
||||
colors. This is used only for gdk_draw_indexed_image().
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkRgbDither ##### -->
|
||||
<para>
|
||||
|
||||
Selects whether or not GdkRgb applies dithering
|
||||
to the image on display. There are three values:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
%GDK_RGB_DITHER_NONE: Never use dithering.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
%GDK_RGB_DITHER_NORMAL: Use dithering in 8 bits per pixel (and below)
|
||||
only.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
%GDK_RGB_DITHER_MAX: Use dithering in 16 bits per pixel and below.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
Since GdkRgb currently only handles images with 8 bits per component,
|
||||
dithering on 24 bit per pixel displays is a moot point.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_init ##### -->
|
||||
<para>
|
||||
Initializes GdkRgb statically. It may be called more than once with no
|
||||
ill effects. It must, however, be called before any other GdkRgb
|
||||
operations are performed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The GdkRgb "context" is allocated statically. Thus, GdkRgb may be used
|
||||
to drive only one visual in any given application. GdkRgb
|
||||
automatically selects a best visual and sets its own colormap, if
|
||||
necessary. gdk_rgb_get_visual() and gdk_rgb_get_cmap () retrieve
|
||||
the chosen visual and colormap, respectively.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_cmap_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkRgbCmap structure. The cmap maps color indexes to
|
||||
RGB colors. If @n_colors is less than 256, then images containing
|
||||
color values greater than or equal to @n_colors will produce undefined
|
||||
results, including possibly segfaults.
|
||||
</para>
|
||||
|
||||
@colors: The colors, represented as 0xRRGGBB integer values.
|
||||
@n_colors: The number of colors in the cmap.
|
||||
@Returns: The newly created #GdkRgbCmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_cmap_free ##### -->
|
||||
<para>
|
||||
Frees the memory associated with a #GdkRgbCmap created by gdk_rgb_cmap_new().
|
||||
</para>
|
||||
|
||||
@cmap: The #GdkRgbCmap to free.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_gc_set_foreground ##### -->
|
||||
<para>
|
||||
Sets the foreground color in @gc to the specified color (or the
|
||||
closest approximation, in the case of limited visuals).
|
||||
</para>
|
||||
|
||||
@gc: The @GdkGC to modify.
|
||||
@rgb: The color, represented as a 0xRRGGBB integer value.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_gc_set_background ##### -->
|
||||
<para>
|
||||
Sets the background color in @gc to the specified color (or the
|
||||
closest approximation, in the case of limited visuals).
|
||||
</para>
|
||||
|
||||
@gc: The @GdkGC to modify.
|
||||
@rgb: The color, represented as a 0xRRGGBB integer value.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_rgb_image ##### -->
|
||||
<para>
|
||||
Draws an RGB image in the drawable. This is the core GdkRgb
|
||||
function, and likely the only one you will need to use other than the
|
||||
initialization stuff.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The @rowstride parameter allows for lines to be aligned more flexibly.
|
||||
For example, lines may be allocated to begin on 32-bit boundaries,
|
||||
even if the width of the rectangle is odd. Rowstride is also useful
|
||||
when drawing a subrectangle of a larger image in memory. Finally, to
|
||||
replicate the same line a number of times, the trick of setting
|
||||
@rowstride to 0 is allowed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In general, for 0 <= i < @width and 0 <= j < height,
|
||||
the pixel (x + i, y + j) is colored with red value @rgb_buf[@j *
|
||||
@rowstride + @i * 3], green value @rgb_buf[@j * @rowstride + @i * 3 +
|
||||
1], and blue value @rgb_buf[@j * @rowstride + @i * 3 + 2].
|
||||
</para>
|
||||
|
||||
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
|
||||
@gc: The graphics context (all Gdk drawing operations require one; its
|
||||
contents are ignored).
|
||||
@x: The x coordinate of the top-left corner in the drawable.
|
||||
@y: The y coordinate of the top-left corner in the drawable.
|
||||
@width: The width of the rectangle to be drawn.
|
||||
@height: The height of the rectangle to be drawn.
|
||||
@dith: A #GdkRgbDither value, selecting the desired dither mode.
|
||||
@rgb_buf: The pixel data, represented as packed 24-bit data.
|
||||
@rowstride: The number of bytes from the start of one row in @rgb_buf to the
|
||||
start of the next.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_indexed_image ##### -->
|
||||
<para>
|
||||
Draws an indexed image in the drawable, using a #GdkRgbCmap to assign
|
||||
actual colors to the color indices.
|
||||
</para>
|
||||
|
||||
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
|
||||
@gc: The graphics context.
|
||||
@x: The x coordinate of the top-left corner in the drawable.
|
||||
@y: The y coordinate of the top-left corner in the drawable.
|
||||
@width: The width of the rectangle to be drawn.
|
||||
@height: The height of the rectangle to be drawn.
|
||||
@dith: A #GdkRgbDither value, selecting the desired dither mode.
|
||||
@buf: The pixel data, represented as 8-bit color indices.
|
||||
@rowstride: The number of bytes from the start of one row in @buf to the
|
||||
start of the next.
|
||||
@cmap: The #GdkRgbCmap used to assign colors to the color indices.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_gray_image ##### -->
|
||||
<para>
|
||||
Draws a grayscale image in the drawable.
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
|
||||
@gc: The graphics context.
|
||||
@x: The x coordinate of the top-left corner in the drawable.
|
||||
@y: The y coordinate of the top-left corner in the drawable.
|
||||
@width: The width of the rectangle to be drawn.
|
||||
@height: The height of the rectangle to be drawn.
|
||||
@dith: A #GdkRgbDither value, selecting the desired dither mode.
|
||||
@buf: The pixel data, represented as 8-bit gray values.
|
||||
@rowstride: The number of bytes from the start of one row in @buf to the
|
||||
start of the next.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_rgb_32_image ##### -->
|
||||
<para>
|
||||
Draws a padded RGB image in the drawable. The image is stored as one
|
||||
pixel per 32-bit word. It is laid out as a red byte, a green byte, a
|
||||
blue byte, and a padding byte.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It's unlikely that this function will give significant performance
|
||||
gains in practice. In my experience, the performance gain from having
|
||||
pixels aligned to 32-bit boundaries is cancelled out by the increased
|
||||
memory bandwidth.
|
||||
</para>
|
||||
|
||||
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
|
||||
@gc: The graphics context.
|
||||
@x: The x coordinate of the top-left corner in the drawable.
|
||||
@y: The y coordinate of the top-left corner in the drawable.
|
||||
@width: The width of the rectangle to be drawn.
|
||||
@height: The height of the rectangle to be drawn.
|
||||
@dith: A #GdkRgbDither value, selecting the desired dither mode.
|
||||
@buf: The pixel data, represented as padded 32-bit data.
|
||||
@rowstride: The number of bytes from the start of one row in @buf to the
|
||||
start of the next.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_rgb_image_dithalign ##### -->
|
||||
<para>
|
||||
Draws an RGB image in the drawable, with an adjustment for dither alignment.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This function is useful when drawing dithered images into a window
|
||||
that may be scrolled. Pixel (x, y) will be drawn dithered as if its
|
||||
actual location is (x + @xdith, y + @ydith). Thus, if you draw an
|
||||
image into a window using zero dither alignment, then scroll up one
|
||||
pixel, subsequent draws to the window should have @ydith = 1.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Setting the dither alignment correctly allows updating of small parts
|
||||
of the screen while avoiding visible "seams" between the different
|
||||
dither textures.
|
||||
</para>
|
||||
|
||||
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
|
||||
@gc: The graphics context.
|
||||
@x: The x coordinate of the top-left corner in the drawable.
|
||||
@y: The y coordinate of the top-left corner in the drawable.
|
||||
@width: The width of the rectangle to be drawn.
|
||||
@height: The height of the rectangle to be drawn.
|
||||
@dith: A #GdkRgbDither value, selecting the desired dither mode.
|
||||
@rgb_buf: The pixel data, represented as packed 24-bit data.
|
||||
@rowstride: The number of bytes from the start of one row in @rgb_buf to the
|
||||
start of the next.
|
||||
@xdith: An x offset for dither alignment.
|
||||
@ydith: A y offset for dither alignment.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_xpixel_from_rgb ##### -->
|
||||
<para>
|
||||
Finds the X pixel closest in color to the @rgb color specified. This
|
||||
value may be used to set the <structfield>pixel</structfield> field of
|
||||
a #GdkColor struct.
|
||||
</para>
|
||||
|
||||
@rgb: The color, represented as a 0xRRGGBB integer value.
|
||||
@Returns: The X pixel value.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_set_verbose ##### -->
|
||||
<para>
|
||||
Sets the "verbose" flag. This is generally only useful for debugging.
|
||||
</para>
|
||||
|
||||
@verbose: TRUE if verbose messages are desired.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_ditherable ##### -->
|
||||
<para>
|
||||
Determine whether the visual is ditherable. This function may be
|
||||
useful for presenting a user interface choice to the user about which
|
||||
dither mode is desired; if the display is not ditherable, it may make
|
||||
sense to gray out or hide the corresponding UI widget.
|
||||
</para>
|
||||
|
||||
@Returns: TRUE if the visual is ditherable.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_set_install ##### -->
|
||||
<para>
|
||||
If @install is TRUE, directs GdkRgb to always install a new "private"
|
||||
colormap rather than trying to find a best fit with the colors already
|
||||
allocated. Ordinarily, GdkRgb will install a colormap only if a
|
||||
sufficient cube cannot be allocated.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A private colormap has more colors, leading to better quality display,
|
||||
but also leads to the dreaded "colormap flashing" effect.
|
||||
</para>
|
||||
|
||||
@install: TRUE to set install mode.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_set_min_colors ##### -->
|
||||
<para>
|
||||
Sets the minimum number of colors for the color cube. Generally,
|
||||
GdkRgb tries to allocate the largest color cube it can. If it can't
|
||||
allocate a color cube at least as large as @min_colors, it installs a
|
||||
private colormap.
|
||||
</para>
|
||||
|
||||
@min_colors: The minimum number of colors accepted.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_get_visual ##### -->
|
||||
<para>
|
||||
Gets the visual chosen by GdkRgb. This visual and the corresponding
|
||||
colormap should be used when creating windows that will be drawn in by GdkRgb.
|
||||
</para>
|
||||
|
||||
@Returns: The @GdkVisual chosen by GdkRgb.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_get_cmap ##### -->
|
||||
<para>
|
||||
Gets the colormap set by GdkRgb. This colormap and the corresponding
|
||||
visual should be used when creating windows that will be drawn in by GdkRgb.
|
||||
</para>
|
||||
|
||||
@Returns: The @GdkColormap set by GdkRgb.
|
||||
|
||||
|
||||
183
docs/reference/gdk/tmpl/selections.sgml
Normal file
183
docs/reference/gdk/tmpl/selections.sgml
Normal file
@@ -0,0 +1,183 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Selections
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
functions for transfering data via the X selection mechanism.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The X selection mechanism provides a way to transfer
|
||||
arbitrary chunks of data between programs.
|
||||
A <firstterm>selection</firstterm> is a essentially
|
||||
a named clipboard, identified by a string interned
|
||||
as a #GdkAtom. By claiming ownership of a selection,
|
||||
an application indicates that it will be responsible
|
||||
for supplying its contents. The most common
|
||||
selections are <literal>PRIMARY</literal> and
|
||||
<literal>CLIPBOARD</literal>.
|
||||
</para>
|
||||
<para>
|
||||
The contents of a selection can be represented in
|
||||
a number of formats, called <firstterm>targets</firstterm>.
|
||||
Each target is identified by an atom. A list of
|
||||
all possible targets supported by the selection owner
|
||||
can be retrieved by requesting the special target
|
||||
<literal>TARGETS</literal>. When a selection is
|
||||
retrieved, the data is accompanied by a type
|
||||
(an atom), and a format (an integer, representing
|
||||
the number of bits per item). See <xref
|
||||
linkend="gdk-Properties-and-Atoms"> for more information.
|
||||
</para>
|
||||
<para>
|
||||
The functions in this section only contain the lowlevel
|
||||
parts of the selection protocol. A considerably more
|
||||
complicated implementation is needed on top of this.
|
||||
GTK+ contains such an implementation in the functions
|
||||
in <literal>gtkselection.h</literal> and programmers
|
||||
should use those functions instead of the ones presented
|
||||
here. If you plan to implement selection handling
|
||||
directly on top of the functions here, you should refer
|
||||
to the X Inter-client Communication Conventions Manual
|
||||
(ICCCM).
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkSelection ##### -->
|
||||
<para>
|
||||
The #GdkSelection enumeration contains predefined
|
||||
atom values for several common selections.
|
||||
</para>
|
||||
|
||||
@GDK_SELECTION_PRIMARY: The primary X selection. Programs
|
||||
typically claim this selection when the user
|
||||
selects text and paste its contents in response
|
||||
to a middle button press.
|
||||
@GDK_SELECTION_SECONDARY: An additional X selection.
|
||||
|
||||
<!-- ##### ENUM GdkSelectionType ##### -->
|
||||
<para>
|
||||
The #GdkSelectionType enumeration contains predefined
|
||||
atom values used to represent the types of data transferred
|
||||
in response to a request for a target. See the
|
||||
ICCCM for details about what data should be transferred
|
||||
for each of these types. Other atoms can be used,
|
||||
and the recommended practice for GTK+ is to to use mime
|
||||
types for this purpose. However, supporting these types
|
||||
may be useful for compatibility with older programs.
|
||||
</para>
|
||||
|
||||
@GDK_SELECTION_TYPE_ATOM: An atom. (format 32)
|
||||
@GDK_SELECTION_TYPE_BITMAP: A bitmap ID. (format 32)
|
||||
@GDK_SELECTION_TYPE_COLORMAP: A colormap ID. (format 32)
|
||||
@GDK_SELECTION_TYPE_DRAWABLE: A drawable ID. (format 32)
|
||||
@GDK_SELECTION_TYPE_INTEGER: An integer. (format 32)
|
||||
@GDK_SELECTION_TYPE_PIXMAP: A pixmap ID. (format 32)
|
||||
@GDK_SELECTION_TYPE_WINDOW: A window ID. (format 32)
|
||||
@GDK_SELECTION_TYPE_STRING: A string encoded
|
||||
in ISO Latin-1. (With the additional of <symbol>TAB</symbol>
|
||||
and <symbol>NEWLINE</symbol>.) (format 8)
|
||||
|
||||
<!-- ##### ENUM GdkTarget ##### -->
|
||||
<para>
|
||||
The #GdkTarget enumeration contains predefined atom values which are
|
||||
used to describe possible targets for a selection. Other atoms can be
|
||||
used, and the recommended practice for GTK+ is to to use mime types
|
||||
for this purpose. However, supporting these types may be useful for
|
||||
compatibility with older programs.
|
||||
</para>
|
||||
|
||||
@GDK_TARGET_BITMAP: A bitmap ID.
|
||||
@GDK_TARGET_COLORMAP: A colormap ID.
|
||||
@GDK_TARGET_DRAWABLE: A drawable ID.
|
||||
@GDK_TARGET_PIXMAP: A pixmap ID.
|
||||
@GDK_TARGET_STRING: A string encoded in ISO Latin-1.
|
||||
(With the additional of <symbol>TAB</symbol>
|
||||
and <symbol>NEWLINE</symbol>.)
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_owner_set ##### -->
|
||||
<para>
|
||||
Set the owner of the given selection.
|
||||
</para>
|
||||
|
||||
@owner: a #GdkWindow or NULL to indicate that the
|
||||
the owner for the given should be unset.
|
||||
@selection: an atom identifying a selection.
|
||||
@time: timestamp to use when setting the selection.
|
||||
If this is older than the timestamp given last
|
||||
time the owner was set for the given selection, the
|
||||
request will be ignored.
|
||||
@send_event: if %TRUE, and the new owner is different
|
||||
from the current owner, the current owner
|
||||
will be sent a SelectionClear event.
|
||||
@Returns: %TRUE if the selection owner was succesfully
|
||||
changed to @owner, otherwise %FALSE.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_owner_get ##### -->
|
||||
<para>
|
||||
Determine the owner of the given selection.
|
||||
</para>
|
||||
|
||||
@selection: an atom indentifying a selection.
|
||||
@Returns: if there is a selection owner for this window,
|
||||
and it is a window known to the current process,
|
||||
the #GdkWindow that owns the selection, otherwise
|
||||
NULL. Note that the return value may be owned
|
||||
by a different process if a foreign window
|
||||
was previously created for that window, but
|
||||
a new foreign window will never be created by
|
||||
this call.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_convert ##### -->
|
||||
<para>
|
||||
Retrieve the contents of a selection in a given
|
||||
form.
|
||||
</para>
|
||||
|
||||
@requestor: a #GdkWindow.
|
||||
@selection: an atom identifying the selection to get the
|
||||
contents of.
|
||||
@target: the form in which to retrieve the selection.
|
||||
@time: the timestamp to use when retrieving the
|
||||
selection. The selection owner may refuse the
|
||||
request if it did not own the selection at
|
||||
the time indicated by the timestamp.
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_property_get ##### -->
|
||||
<para>
|
||||
Retrieve selection data that was stored by the selection
|
||||
data in response to a call to gdk_selection_convert()
|
||||
</para>
|
||||
|
||||
@requestor: the window on which the data is stored
|
||||
@data: location to store a pointer to the retrieved data.
|
||||
If the retrieval failed, NULL we be stored here, otherwise, it
|
||||
will be non-NULL and the returned data should be freed with g_free()
|
||||
when you are finished using it. The length of the
|
||||
allocated memory is one more than the the length
|
||||
of the returned data, and the final byte will always
|
||||
be zero, to ensure null-termination of strings.
|
||||
@prop_type: location to store the type of the property.
|
||||
@prop_format: location to store the format of the property.
|
||||
@Returns: the length of the retrieved data.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_send_notify ##### -->
|
||||
<para>
|
||||
Send a response to SelectionRequest event.
|
||||
</para>
|
||||
|
||||
@requestor: window to which to deliver response.
|
||||
@selection: selection that was requested.
|
||||
@target: target that was selected.
|
||||
@property: property in which the selection owner stored the
|
||||
data, or %GDK_NONE to indicate that the request
|
||||
was rejected.
|
||||
@time: timestamp.
|
||||
|
||||
|
||||
50
docs/reference/gdk/tmpl/threads.sgml
Normal file
50
docs/reference/gdk/tmpl/threads.sgml
Normal file
@@ -0,0 +1,50 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Threads
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### VARIABLE gdk_threads_mutex ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_THREADS_ENTER ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_THREADS_LEAVE ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_enter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_leave ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
391
docs/reference/gdk/tmpl/visuals.sgml
Normal file
391
docs/reference/gdk/tmpl/visuals.sgml
Normal file
@@ -0,0 +1,391 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Visuals
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
manipulation of visuals.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The way that the data stored on the screen is stored
|
||||
in memory can vary considerably between different X
|
||||
servers; some X servers even support multiple formats
|
||||
used simultaneously. An X <firstterm>visual</firstterm>
|
||||
represents a particular format for screen data.
|
||||
It includes information about the number of bits
|
||||
used for each color, the way the bits are translated
|
||||
into an RGB value for display, and the way the bits
|
||||
are stored in memory.
|
||||
</para>
|
||||
<para>
|
||||
There are several standard visuals. The visual returned
|
||||
by gdk_visual_get_system() is the system's default
|
||||
visual. gdk_rgb_get_visual() return the visual most
|
||||
suited to displaying full-color image data. If you
|
||||
use the calls in GdkRGB, you should create your windows
|
||||
using this visual (and the colormap returned by
|
||||
gdk_rgb_get_colormap()).
|
||||
</para>
|
||||
<para>
|
||||
A number of functions are provided for determining
|
||||
the "best" available visual. For the purposes of
|
||||
making this determination, higher bit depths are
|
||||
considered better, and for visuals of the same
|
||||
bit depth, %GDK_VISUAL_PSEUDO_COLOR is preferred at
|
||||
8bpp, otherwise, the visual types are ranked in the
|
||||
order of (highest to lowest) %GDK_VISUAL_DIRECT_COLOR,
|
||||
%GDK_VISUAL_TRUE_COLOR, %GDK_VISUAL_PSEUDO_COLOR,
|
||||
%GDK_VISUAL_STATIC_COLOR, %GDK_VISUAL_GRAYSCALE,
|
||||
then %GDK_VISUAL_STATIC_GRAY.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkVisual ##### -->
|
||||
<para>
|
||||
The GdkVisual structure contains information about
|
||||
a particular visual. It contains the following
|
||||
public fields.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry><structfield>type</structfield></entry>
|
||||
<entry>The type of this visual.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>depth</structfield></entry>
|
||||
<entry>The number of bits per pixel.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>byte_order</structfield></entry>
|
||||
<entry>The byte-order for this visual.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>colormap_size</structfield></entry>
|
||||
<entry>The number of entries in the colormap, for
|
||||
visuals of type GDK_VISUAL_PSEUDO_COLOR or
|
||||
GDK_VISUAL_GRAY_SCALE. For other visual types, it
|
||||
is the number of possible levels per color component.
|
||||
If the visual has different numbers of levels for
|
||||
different components, the value of this field is
|
||||
undefined.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>bits_per_rgb</structfield></entry>
|
||||
<entry>
|
||||
The number of significant bits per red, green, or blue
|
||||
when specifying colors for this visual. (For instance,
|
||||
for gdk_colormap_alloc_color())
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>red_mask</structfield></entry>
|
||||
<entry>
|
||||
A mask giving the bits in a pixel value that
|
||||
correspond to the red field. Significant only for
|
||||
%GDK_VISUAL_PSEUDOCOLOR and %GDK_VISUAL_DIRECTCOLOR.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>red_shift, red_prec</structfield></entry>
|
||||
<entry>
|
||||
The <structfield>red_shift</structfield> and
|
||||
<structfield>red_prec</structfield> give an alternate presentation
|
||||
of the information in <structfield>red_mask</structfield>.
|
||||
<structfield>red_mask</structfield> is a contiguous sequence
|
||||
of <structfield>red_prec</structfield> starting at bit
|
||||
number <structfield>red_shift</structfield>. For example,
|
||||
<xref linkend="rgbmask"> shows constructing a pixel value
|
||||
out of three 16 bit color values.
|
||||
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>green_mask</structfield></entry>
|
||||
<entry>
|
||||
A mask giving the bits in a pixel value that
|
||||
correspond to the green field.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>green_shift, green_prec</structfield></entry>
|
||||
<entry>
|
||||
The <structfield>green_shift</structfield> and
|
||||
<structfield>green_prec</structfield> give an alternate presentation
|
||||
of the information in <structfield>green_mask</structfield>.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>blue_mask</structfield></entry>
|
||||
<entry>
|
||||
A mask giving the bits in a pixel value that
|
||||
correspond to the blue field.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>blue_shift, blue_prec</structfield></entry>
|
||||
<entry>
|
||||
The <structfield>blue_shift</structfield> and
|
||||
<structfield>blue_prec</structfield> give an alternate presentation
|
||||
of the information in <structfield>blue_mask</structfield>.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
<figure float="1" id="rgbmask">
|
||||
<title>Constructing a pixel value from components</title>
|
||||
<programlisting>
|
||||
guint
|
||||
pixel_from_rgb (GdkVisual *visual,
|
||||
guchar r, guchar b, guchar g)
|
||||
{
|
||||
return ((r >> (16 - visual->red_prec)) << visual->red_shift) |
|
||||
((g >> (16 - visual->green_prec)) << visual->green_shift) |
|
||||
((r >> (16 - visual->blue_prec)) << visual->blue_shift);
|
||||
}
|
||||
</programlisting>
|
||||
</figure>
|
||||
|
||||
@type:
|
||||
@depth:
|
||||
@byte_order:
|
||||
@colormap_size:
|
||||
@bits_per_rgb:
|
||||
@red_mask:
|
||||
@red_shift:
|
||||
@red_prec:
|
||||
@green_mask:
|
||||
@green_shift:
|
||||
@green_prec:
|
||||
@blue_mask:
|
||||
@blue_shift:
|
||||
@blue_prec:
|
||||
|
||||
<!-- ##### ENUM GdkVisualType ##### -->
|
||||
<para>
|
||||
A set of values that describe the manner in which the
|
||||
pixel values for a visual are converted into RGB
|
||||
values for display.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_VISUAL_STATIC_GRAY</entry>
|
||||
<entry>Each pixel value indexes a grayscale value directly.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_VISUAL_GRAYSCALE</entry>
|
||||
<entry>Each pixel is an index into a color map that maps
|
||||
pixel values into grayscale values. The color map can
|
||||
be changed by an application.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_VISUAL_STATIC_COLOR</entry>
|
||||
<entry>Each pixel value is an index into a predefined,
|
||||
unmodifiable color map that maps pixel values into
|
||||
rgb values.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_VISUAL_PSEUDO_COLOR</entry>
|
||||
<entry>Each pixel is an index into a color map that maps
|
||||
pixel values into rgb values. The color map can
|
||||
be changed by an application.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_TRUE_COLOR</entry>
|
||||
<entry>Each pixel value directly contains red, green,
|
||||
and blue components. The <structfield>red_mask</structfield>,
|
||||
<structfield>green_mask</structfield>, and
|
||||
<structfield>blue_mask</structfield> fields of the #GdkVisual
|
||||
structure describe how the components are assembled into
|
||||
a pixel value.
|
||||
.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_DIRECT_COLOR</entry>
|
||||
<entry>Each pixel value contains red, green, and blue
|
||||
components as for %GDK_TRUE_COLOR, but the components
|
||||
are mapped via a color table into the final output
|
||||
table instead of being converted directly..</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_VISUAL_STATIC_GRAY:
|
||||
@GDK_VISUAL_GRAYSCALE:
|
||||
@GDK_VISUAL_STATIC_COLOR:
|
||||
@GDK_VISUAL_PSEUDO_COLOR:
|
||||
@GDK_VISUAL_TRUE_COLOR:
|
||||
@GDK_VISUAL_DIRECT_COLOR:
|
||||
|
||||
<!-- ##### ENUM GdkByteOrder ##### -->
|
||||
<para>
|
||||
A set of values describing the possible byte-orders
|
||||
for storing pixel values in memory.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_LSB_FIRST</entry>
|
||||
<entry>The values are stored with the least-significant byte
|
||||
first. For instance, the 32-bit value 0xffeecc would be stored
|
||||
in memory as 0xcc, 0xee, 0xff, 0x00.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_MSB_FIRST</entry>
|
||||
<entry>The values are stored with the least-significant byte
|
||||
first. For instance, the 32-bit value 0xffeecc would be stored
|
||||
in memory as 0xff, 0xee, 0xcc, 0x00.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_LSB_FIRST:
|
||||
@GDK_MSB_FIRST:
|
||||
|
||||
<!-- ##### FUNCTION gdk_query_depths ##### -->
|
||||
<para>
|
||||
Lists the available color depths. The returned values
|
||||
are pointers to static storage and should not be
|
||||
modified or freed.
|
||||
</para>
|
||||
|
||||
@depths: a location to store a pointer to an array
|
||||
holding the available color depths.
|
||||
@count: a location to store the number of values in @depths.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_query_visual_types ##### -->
|
||||
<para>
|
||||
Lists the available visual types. The returned values
|
||||
are pointers to static storage and should not be
|
||||
modified or freed.
|
||||
</para>
|
||||
|
||||
@visual_types: a location to store a pointer to an
|
||||
array holding the available visual types.
|
||||
@count: a location to store the number of values in @visual types.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_list_visuals ##### -->
|
||||
<para>
|
||||
Lists the available visuals.
|
||||
</para>
|
||||
|
||||
@Returns: A #GList of the available visuals. The list
|
||||
should be freed this list with g_list_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_depth ##### -->
|
||||
<para>
|
||||
Returns the best available color depth.
|
||||
</para>
|
||||
|
||||
@Returns: the best available color depth.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_type ##### -->
|
||||
<para>
|
||||
Returns the best available visual type.
|
||||
</para>
|
||||
|
||||
@Returns: the best available visual type.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_system ##### -->
|
||||
<para>
|
||||
Returns the system's default visual.
|
||||
</para>
|
||||
|
||||
@Returns: the system's default visual.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best ##### -->
|
||||
<para>
|
||||
Returns the best available visual.
|
||||
</para>
|
||||
|
||||
@Returns: the best available visual.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_with_depth ##### -->
|
||||
<para>
|
||||
Returns the best available visual with a certain depth.
|
||||
</para>
|
||||
|
||||
@depth: the desired color depth
|
||||
@Returns: the best available visual with @depth bits per pixel
|
||||
or %NULL if no visuals with that type are available.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_with_type ##### -->
|
||||
<para>
|
||||
Returns the best available visual of a certain visual type.
|
||||
</para>
|
||||
|
||||
@visual_type: the desired visual type.
|
||||
@Returns: the visual of the given type with the highest depth
|
||||
or %NULL if no visuals of that type are available.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_with_both ##### -->
|
||||
<para>
|
||||
Returns the best available visual
|
||||
</para>
|
||||
|
||||
@depth: the desired visual type.
|
||||
@visual_type: the desired depth.
|
||||
@Returns: the best available visual with the given depth
|
||||
and visual type, or %NULL if no matching visuals are
|
||||
available.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_ref ##### -->
|
||||
<para>
|
||||
In theory, increases the reference count of a visual. However,
|
||||
the set of visuals is determined statically when GTK+ is
|
||||
initialized, so this operation does nothing.
|
||||
</para>
|
||||
|
||||
@visual: a #GdkVisual.
|
||||
@Returns: @visual.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_unref ##### -->
|
||||
<para>
|
||||
In theory, decreases the reference count of a visual. Like
|
||||
gdk_visual_ref(), this operation does nothing.
|
||||
</para>
|
||||
|
||||
@visual: a #GdkVisual.
|
||||
|
||||
|
||||
777
docs/reference/gdk/tmpl/windows.sgml
Normal file
777
docs/reference/gdk/tmpl/windows.sgml
Normal file
@@ -0,0 +1,777 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Windows
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkWindowAttr ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@title:
|
||||
@event_mask:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@wclass:
|
||||
@visual:
|
||||
@colormap:
|
||||
@window_type:
|
||||
@cursor:
|
||||
@wmclass_name:
|
||||
@wmclass_class:
|
||||
@override_redirect:
|
||||
|
||||
<!-- ##### STRUCT GdkWindow ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@user_data:
|
||||
|
||||
<!-- ##### ENUM GdkWindowType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_WINDOW_ROOT:
|
||||
@GDK_WINDOW_TOPLEVEL:
|
||||
@GDK_WINDOW_CHILD:
|
||||
@GDK_WINDOW_DIALOG:
|
||||
@GDK_WINDOW_TEMP:
|
||||
@GDK_WINDOW_PIXMAP:
|
||||
@GDK_WINDOW_FOREIGN:
|
||||
|
||||
<!-- ##### ENUM GdkWindowClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_INPUT_OUTPUT:
|
||||
@GDK_INPUT_ONLY:
|
||||
|
||||
<!-- ##### ENUM GdkWindowAttributesType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_WA_TITLE:
|
||||
@GDK_WA_X:
|
||||
@GDK_WA_Y:
|
||||
@GDK_WA_CURSOR:
|
||||
@GDK_WA_COLORMAP:
|
||||
@GDK_WA_VISUAL:
|
||||
@GDK_WA_WMCLASS:
|
||||
@GDK_WA_NOREDIR:
|
||||
|
||||
<!-- ##### ENUM GdkWindowHints ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_HINT_POS:
|
||||
@GDK_HINT_MIN_SIZE:
|
||||
@GDK_HINT_MAX_SIZE:
|
||||
@GDK_HINT_BASE_SIZE:
|
||||
@GDK_HINT_ASPECT:
|
||||
@GDK_HINT_RESIZE_INC:
|
||||
|
||||
<!-- ##### STRUCT GdkGeometry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@min_width:
|
||||
@min_height:
|
||||
@max_width:
|
||||
@max_height:
|
||||
@base_width:
|
||||
@base_height:
|
||||
@width_inc:
|
||||
@height_inc:
|
||||
@min_aspect:
|
||||
@max_aspect:
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@parent:
|
||||
@attributes:
|
||||
@attributes_mask:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_destroy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_at_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@win_x:
|
||||
@win_y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_show ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_hide ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_is_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_is_viewable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_withdraw ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_move ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_resize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_move_resize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_reparent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@new_parent:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_clear ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_clear_area ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_clear_area_e ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_copy_area ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@source_window:
|
||||
@source_x:
|
||||
@source_y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_raise ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_lower ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_register_dnd ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_user_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_override_redirect ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@override_redirect:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_add_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@function:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_remove_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@function:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkFilterFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@xevent:
|
||||
@event:
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkFilterReturn ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_FILTER_CONTINUE:
|
||||
@GDK_FILTER_TRANSLATE:
|
||||
@GDK_FILTER_REMOVE:
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_shape_combine_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@shape_mask:
|
||||
@offset_x:
|
||||
@offset_y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_child_shapes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_merge_child_shapes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_static_gravities ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@use_static:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_hints ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@min_width:
|
||||
@min_height:
|
||||
@max_width:
|
||||
@max_height:
|
||||
@flags:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@title:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_background ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_back_pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@pixmap:
|
||||
@parent_relative:
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PARENT_RELATIVE ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_cursor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@cursor:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_user_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_geometry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@depth:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_geometry_hints ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@geometry:
|
||||
@flags:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_position ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_root_origin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_origin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_deskrelative_origin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@mask:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkModifierType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_SHIFT_MASK:
|
||||
@GDK_LOCK_MASK:
|
||||
@GDK_CONTROL_MASK:
|
||||
@GDK_MOD1_MASK:
|
||||
@GDK_MOD2_MASK:
|
||||
@GDK_MOD3_MASK:
|
||||
@GDK_MOD4_MASK:
|
||||
@GDK_MOD5_MASK:
|
||||
@GDK_BUTTON1_MASK:
|
||||
@GDK_BUTTON2_MASK:
|
||||
@GDK_BUTTON3_MASK:
|
||||
@GDK_BUTTON4_MASK:
|
||||
@GDK_BUTTON5_MASK:
|
||||
@GDK_RELEASE_MASK:
|
||||
@GDK_MODIFIER_MASK:
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_toplevel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_children ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_events ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_events ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@event_mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_icon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@icon_window:
|
||||
@pixmap:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_transient_for ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@leader:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_role ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@role:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@leader:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_decorations ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@decorations:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkWMDecoration ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_DECOR_ALL:
|
||||
@GDK_DECOR_BORDER:
|
||||
@GDK_DECOR_RESIZEH:
|
||||
@GDK_DECOR_TITLE:
|
||||
@GDK_DECOR_MENU:
|
||||
@GDK_DECOR_MINIMIZE:
|
||||
@GDK_DECOR_MAXIMIZE:
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_functions ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@functions:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkWMFunction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_FUNC_ALL:
|
||||
@GDK_FUNC_RESIZE:
|
||||
@GDK_FUNC_MOVE:
|
||||
@GDK_FUNC_MINIMIZE:
|
||||
@GDK_FUNC_MAXIMIZE:
|
||||
@GDK_FUNC_CLOSE:
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_toplevels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDrawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@user_data:
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_set_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@key:
|
||||
@data:
|
||||
@destroy_func:
|
||||
|
||||
|
||||
6
docs/reference/gtk/.cvsignore
Normal file
6
docs/reference/gtk/.cvsignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
sgml
|
||||
html
|
||||
gtk-decl-list.txt
|
||||
gtk-unused.txt
|
||||
59
docs/reference/gtk/Makefile.am
Normal file
59
docs/reference/gtk/Makefile.am
Normal file
@@ -0,0 +1,59 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gtk
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gtk-docs.sgml
|
||||
|
||||
# We could alternatively use this for using installed headers.
|
||||
INCLUDE_DIR=`gtk-config --prefix`/include/gtk
|
||||
|
||||
|
||||
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
||||
|
||||
CFLAGS=`gtk-config --cflags`
|
||||
LDFLAGS=`gtk-config --libs`
|
||||
|
||||
scan:
|
||||
CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) gtkdoc-scanobj --module=$(DOC_MODULE)
|
||||
gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers='gtkintl.h' $(INCLUDE_DIR)/*.h
|
||||
|
||||
templates: scan
|
||||
gtkdoc-mktmpl --module=$(DOC_MODULE)
|
||||
|
||||
sgml:
|
||||
gtkdoc-mkdb --module=$(DOC_MODULE)
|
||||
|
||||
html:
|
||||
if ! test -d html ; then mkdir html ; fi
|
||||
-cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt
|
||||
|
||||
maintainer-clean-local: clean
|
||||
rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
|
||||
|
||||
install-data-local:
|
||||
install -d -m 0755 $(TARGET_DIR)
|
||||
install -m 0644 html/*.html $(TARGET_DIR)
|
||||
install -m 0644 html/index.sgml $(TARGET_DIR)
|
||||
gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(DOC_MAIN_SGML_FILE) \
|
||||
$(DOC_MODULE)-sections.txt \
|
||||
gtk-overrides.txt \
|
||||
gtk-decl.txt \
|
||||
gtk.hierarchy \
|
||||
gtk.signals \
|
||||
gtk.args \
|
||||
gtk.types \
|
||||
objects_grouped.sgml
|
||||
|
||||
dist-hook:
|
||||
mkdir $(distdir)/tmpl
|
||||
cp -p tmpl/*.sgml $(distdir)/tmpl
|
||||
|
||||
.PHONY : html sgml templates scan
|
||||
13819
docs/reference/gtk/gtk-decl.txt
Normal file
13819
docs/reference/gtk/gtk-decl.txt
Normal file
File diff suppressed because it is too large
Load Diff
293
docs/reference/gtk/gtk-docs.sgml
Normal file
293
docs/reference/gtk/gtk-docs.sgml
Normal file
@@ -0,0 +1,293 @@
|
||||
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
|
||||
<!entity hash "#">
|
||||
<!entity GtkAccelLabel SYSTEM "sgml/gtkaccellabel.sgml">
|
||||
<!entity GtkAdjustment SYSTEM "sgml/gtkadjustment.sgml">
|
||||
<!entity GtkAlignment SYSTEM "sgml/gtkalignment.sgml">
|
||||
<!entity GtkArrow SYSTEM "sgml/gtkarrow.sgml">
|
||||
<!entity GtkAspectFrame SYSTEM "sgml/gtkaspectframe.sgml">
|
||||
<!entity GtkButtonBox SYSTEM "sgml/gtkbbox.sgml">
|
||||
<!entity GtkBin SYSTEM "sgml/gtkbin.sgml">
|
||||
<!entity GtkBox SYSTEM "sgml/gtkbox.sgml">
|
||||
<!entity GtkButton SYSTEM "sgml/gtkbutton.sgml">
|
||||
<!entity GtkCalendar SYSTEM "sgml/gtkcalendar.sgml">
|
||||
<!entity GtkCheckButton SYSTEM "sgml/gtkcheckbutton.sgml">
|
||||
<!entity GtkCheckMenuItem SYSTEM "sgml/gtkcheckmenuitem.sgml">
|
||||
<!entity GtkCList SYSTEM "sgml/gtkclist.sgml">
|
||||
<!entity GtkColorSelection SYSTEM "sgml/gtkcolorsel.sgml">
|
||||
<!entity GtkColorSelectionDialog SYSTEM "sgml/gtkcolorseldlg.sgml">
|
||||
<!entity GtkCombo SYSTEM "sgml/gtkcombo.sgml">
|
||||
<!entity GtkContainer SYSTEM "sgml/gtkcontainer.sgml">
|
||||
<!entity GtkCTree SYSTEM "sgml/gtkctree.sgml">
|
||||
<!entity GtkCurve SYSTEM "sgml/gtkcurve.sgml">
|
||||
<!entity GtkData SYSTEM "sgml/gtkdata.sgml">
|
||||
<!entity GtkDialog SYSTEM "sgml/gtkdialog.sgml">
|
||||
<!entity GtkDrawingArea SYSTEM "sgml/gtkdrawingarea.sgml">
|
||||
<!entity GtkEditable SYSTEM "sgml/gtkeditable.sgml">
|
||||
<!entity GtkEntry SYSTEM "sgml/gtkentry.sgml">
|
||||
<!entity GtkEventBox SYSTEM "sgml/gtkeventbox.sgml">
|
||||
<!entity GtkFileSelection SYSTEM "sgml/gtkfilesel.sgml">
|
||||
<!entity GtkFixed SYSTEM "sgml/gtkfixed.sgml">
|
||||
<!entity GtkFontSelection SYSTEM "sgml/gtkfontsel.sgml">
|
||||
<!entity GtkFontSelectionDialog SYSTEM "sgml/gtkfontseldlg.sgml">
|
||||
<!entity GtkFrame SYSTEM "sgml/gtkframe.sgml">
|
||||
<!entity GtkGammaCurve SYSTEM "sgml/gtkgamma.sgml">
|
||||
<!entity GtkHandleBox SYSTEM "sgml/gtkhandlebox.sgml">
|
||||
<!entity GtkHButtonBox SYSTEM "sgml/gtkhbbox.sgml">
|
||||
<!entity GtkHBox SYSTEM "sgml/gtkhbox.sgml">
|
||||
<!entity GtkHPaned SYSTEM "sgml/gtkhpaned.sgml">
|
||||
<!entity GtkHRuler SYSTEM "sgml/gtkhruler.sgml">
|
||||
<!entity GtkHScale SYSTEM "sgml/gtkhscale.sgml">
|
||||
<!entity GtkHScrollbar SYSTEM "sgml/gtkhscrollbar.sgml">
|
||||
<!entity GtkHSeparator SYSTEM "sgml/gtkhseparator.sgml">
|
||||
<!entity GtkImage SYSTEM "sgml/gtkimage.sgml">
|
||||
<!entity GtkInputDialog SYSTEM "sgml/gtkinputdialog.sgml">
|
||||
<!entity GtkInvisible SYSTEM "sgml/gtkinvisible.sgml">
|
||||
<!entity GtkItem SYSTEM "sgml/gtkitem.sgml">
|
||||
<!entity GtkItemFactory SYSTEM "sgml/gtkitemfactory.sgml">
|
||||
<!entity GtkLabel SYSTEM "sgml/gtklabel.sgml">
|
||||
<!entity GtkLayout SYSTEM "sgml/gtklayout.sgml">
|
||||
<!entity GtkList SYSTEM "sgml/gtklist.sgml">
|
||||
<!entity GtkListItem SYSTEM "sgml/gtklistitem.sgml">
|
||||
<!entity GtkMenu SYSTEM "sgml/gtkmenu.sgml">
|
||||
<!entity GtkMenuBar SYSTEM "sgml/gtkmenubar.sgml">
|
||||
<!entity GtkMenuItem SYSTEM "sgml/gtkmenuitem.sgml">
|
||||
<!entity GtkMenuShell SYSTEM "sgml/gtkmenushell.sgml">
|
||||
<!entity GtkMisc SYSTEM "sgml/gtkmisc.sgml">
|
||||
<!entity GtkNotebook SYSTEM "sgml/gtknotebook.sgml">
|
||||
<!entity GtkObject SYSTEM "sgml/gtkobject.sgml">
|
||||
<!entity GtkOptionMenu SYSTEM "sgml/gtkoptionmenu.sgml">
|
||||
<!entity GtkPacker SYSTEM "sgml/gtkpacker.sgml">
|
||||
<!entity GtkPaned SYSTEM "sgml/gtkpaned.sgml">
|
||||
<!entity GtkPixmap SYSTEM "sgml/gtkpixmap.sgml">
|
||||
<!entity GtkPlug SYSTEM "sgml/gtkplug.sgml">
|
||||
<!entity GtkPreview SYSTEM "sgml/gtkpreview.sgml">
|
||||
<!entity GtkProgress SYSTEM "sgml/gtkprogress.sgml">
|
||||
<!entity GtkProgressBar SYSTEM "sgml/gtkprogressbar.sgml">
|
||||
<!entity GtkRadioButton SYSTEM "sgml/gtkradiobutton.sgml">
|
||||
<!entity GtkRadioMenuItem SYSTEM "sgml/gtkradiomenuitem.sgml">
|
||||
<!entity GtkRange SYSTEM "sgml/gtkrange.sgml">
|
||||
<!entity GtkRuler SYSTEM "sgml/gtkruler.sgml">
|
||||
<!entity GtkScale SYSTEM "sgml/gtkscale.sgml">
|
||||
<!entity GtkScrollbar SYSTEM "sgml/gtkscrollbar.sgml">
|
||||
<!entity GtkScrolledWindow SYSTEM "sgml/gtkscrolledwindow.sgml">
|
||||
<!entity GtkSeparator SYSTEM "sgml/gtkseparator.sgml">
|
||||
<!entity GtkSocket SYSTEM "sgml/gtksocket.sgml">
|
||||
<!entity GtkSpinButton SYSTEM "sgml/gtkspinbutton.sgml">
|
||||
<!entity GtkStatusbar SYSTEM "sgml/gtkstatusbar.sgml">
|
||||
<!entity GtkTable SYSTEM "sgml/gtktable.sgml">
|
||||
<!entity GtkTearoffMenuItem SYSTEM "sgml/gtktearoffmenuitem.sgml">
|
||||
<!entity GtkText SYSTEM "sgml/gtktext.sgml">
|
||||
<!entity GtkTipsQuery SYSTEM "sgml/gtktipsquery.sgml">
|
||||
<!entity GtkToggleButton SYSTEM "sgml/gtktogglebutton.sgml">
|
||||
<!entity GtkToolbar SYSTEM "sgml/gtktoolbar.sgml">
|
||||
<!entity GtkTooltips SYSTEM "sgml/gtktooltips.sgml">
|
||||
<!entity GtkTree SYSTEM "sgml/gtktree.sgml">
|
||||
<!entity GtkTreeItem SYSTEM "sgml/gtktreeitem.sgml">
|
||||
<!entity GtkVButtonBox SYSTEM "sgml/gtkvbbox.sgml">
|
||||
<!entity GtkVBox SYSTEM "sgml/gtkvbox.sgml">
|
||||
<!entity GtkViewport SYSTEM "sgml/gtkviewport.sgml">
|
||||
<!entity GtkVPaned SYSTEM "sgml/gtkvpaned.sgml">
|
||||
<!entity GtkVRuler SYSTEM "sgml/gtkvruler.sgml">
|
||||
<!entity GtkVScale SYSTEM "sgml/gtkvscale.sgml">
|
||||
<!entity GtkVScrollbar SYSTEM "sgml/gtkvscrollbar.sgml">
|
||||
<!entity GtkVSeparator SYSTEM "sgml/gtkvseparator.sgml">
|
||||
<!entity GtkWidget SYSTEM "sgml/gtkwidget.sgml">
|
||||
<!entity GtkWindow SYSTEM "sgml/gtkwindow.sgml">
|
||||
<!entity gtk-General SYSTEM "sgml/gtkmain.sgml">
|
||||
<!entity gtk-Feature-Test-Macros SYSTEM "sgml/gtkfeatures.sgml">
|
||||
<!entity gtk-Graphics-Contexts SYSTEM "sgml/gtkgc.sgml">
|
||||
<!entity gtk-Styles SYSTEM "sgml/gtkstyle.sgml">
|
||||
<!entity gtk-Themes SYSTEM "sgml/gtkthemes.sgml">
|
||||
<!entity gtk-Resource-Files SYSTEM "sgml/gtkrc.sgml">
|
||||
<!entity gtk-Keyboard-Accelerators SYSTEM "sgml/gtkaccelgroup.sgml">
|
||||
<!entity gtk-Selections SYSTEM "sgml/gtkselection.sgml">
|
||||
<!entity gtk-Drag-and-Drop SYSTEM "sgml/gtkdnd.sgml">
|
||||
<!entity gtk-Signals SYSTEM "sgml/gtksignal.sgml">
|
||||
<!entity gtk-Signal-Marshallers SYSTEM "sgml/gtkmarshal.sgml">
|
||||
<!entity gtk-Object-Properties SYSTEM "sgml/gtkarg.sgml">
|
||||
<!entity gtk-Types SYSTEM "sgml/gtktypeutils.sgml">
|
||||
<!entity gtk-Bindings SYSTEM "sgml/gtkbindings.sgml">
|
||||
<!entity gtk-Standard-Enumerations SYSTEM "sgml/gtkenums.sgml">
|
||||
<!entity gtk-Private-Information SYSTEM "sgml/gtkprivate.sgml">
|
||||
|
||||
<!entity index-Object-Tree SYSTEM "sgml/tree_index.sgml">
|
||||
|
||||
<!entity index-Objects-Grouped SYSTEM "objects_grouped.sgml">
|
||||
]>
|
||||
<book id="index">
|
||||
<bookinfo>
|
||||
<title>GTK+ Reference Manual</title>
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="gtk">
|
||||
<title>GTK+ </title>
|
||||
<para>
|
||||
GTK+ is a multi-platform open source GUI Toolkit. Everything about
|
||||
GTK+ from the object-oriented design to the Free Software LGPL
|
||||
licensing allows you to code your project with the most freedom
|
||||
possible. You can develop open software, free software, or even
|
||||
commercial non-free software without having to spend a dime for
|
||||
licenses or royalties.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ is a set of libraries to create graphical user interfaces. It
|
||||
works on many Unix-like platforms, and a Windows version is in
|
||||
development. GTK+ is released under the GNU Library General Public
|
||||
License (GNU LGPL), which allows for flexible licensing of client
|
||||
applications. GTK+ has a C-based object-oriented architecture that
|
||||
allows for maximum flexibility. Bindings for other languages have
|
||||
been written, including C++, Objective-C, Guile/Scheme, Perl, Python,
|
||||
TOM, Ada95, Free Pascal, and Eiffel.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ consists of the following component libraries:
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>GLib</term>
|
||||
<listitem><para>
|
||||
Provides many useful data types, macros, type conversions,
|
||||
string utilities and a lexical scanner. Includes Win32 support.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GDK</term>
|
||||
<listitem><para>
|
||||
A wrapper for low-level windowing functions.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GTK+</term>
|
||||
<listitem><para>
|
||||
An advanced widget set.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
>k-General;
|
||||
>k-Feature-Test-Macros;
|
||||
>k-Graphics-Contexts;
|
||||
>k-Styles;
|
||||
>k-Themes;
|
||||
>k-Resource-Files;
|
||||
>k-Keyboard-Accelerators;
|
||||
>k-Selections;
|
||||
>k-Drag-and-Drop;
|
||||
>k-Signals;
|
||||
>k-Signal-Marshallers;
|
||||
>k-Object-Properties;
|
||||
>k-Types;
|
||||
>k-Bindings;
|
||||
>k-Standard-Enumerations;
|
||||
>k-Private-Information;
|
||||
</chapter>
|
||||
|
||||
<chapter id="gtkobjects" role="no-toc">
|
||||
<title>GTK+ Widgets and Objects</title>
|
||||
&index-Objects-Grouped;
|
||||
|
||||
&GtkAccelLabel;
|
||||
&GtkAdjustment;
|
||||
&GtkAlignment;
|
||||
&GtkArrow;
|
||||
&GtkAspectFrame;
|
||||
&GtkButtonBox;
|
||||
&GtkBin;
|
||||
&GtkBox;
|
||||
&GtkButton;
|
||||
&GtkCalendar;
|
||||
&GtkCheckButton;
|
||||
&GtkCheckMenuItem;
|
||||
&GtkCList;
|
||||
&GtkColorSelection;
|
||||
&GtkColorSelectionDialog;
|
||||
&GtkCombo;
|
||||
&GtkContainer;
|
||||
&GtkCTree;
|
||||
&GtkCurve;
|
||||
&GtkData;
|
||||
&GtkDialog;
|
||||
&GtkDrawingArea;
|
||||
&GtkEditable;
|
||||
&GtkEntry;
|
||||
&GtkEventBox;
|
||||
&GtkFileSelection;
|
||||
&GtkFixed;
|
||||
&GtkFontSelection;
|
||||
&GtkFontSelectionDialog;
|
||||
&GtkFrame;
|
||||
&GtkGammaCurve;
|
||||
&GtkHandleBox;
|
||||
&GtkHButtonBox;
|
||||
&GtkHBox;
|
||||
&GtkHPaned;
|
||||
&GtkHRuler;
|
||||
&GtkHScale;
|
||||
&GtkHScrollbar;
|
||||
&GtkHSeparator;
|
||||
&GtkImage;
|
||||
&GtkInputDialog;
|
||||
&GtkInvisible;
|
||||
&GtkItem;
|
||||
&GtkItemFactory;
|
||||
&GtkLabel;
|
||||
&GtkLayout;
|
||||
&GtkList;
|
||||
&GtkListItem;
|
||||
&GtkMenu;
|
||||
&GtkMenuBar;
|
||||
&GtkMenuItem;
|
||||
&GtkMenuShell;
|
||||
&GtkMisc;
|
||||
&GtkNotebook;
|
||||
&GtkObject;
|
||||
&GtkOptionMenu;
|
||||
&GtkPacker;
|
||||
&GtkPaned;
|
||||
&GtkPixmap;
|
||||
&GtkPlug;
|
||||
&GtkPreview;
|
||||
&GtkProgress;
|
||||
&GtkProgressBar;
|
||||
&GtkRadioButton;
|
||||
&GtkRadioMenuItem;
|
||||
&GtkRange;
|
||||
&GtkRuler;
|
||||
&GtkScale;
|
||||
&GtkScrollbar;
|
||||
&GtkScrolledWindow;
|
||||
&GtkSeparator;
|
||||
&GtkSocket;
|
||||
&GtkSpinButton;
|
||||
&GtkStatusbar;
|
||||
&GtkTable;
|
||||
&GtkTearoffMenuItem;
|
||||
&GtkText;
|
||||
&GtkTipsQuery;
|
||||
&GtkToggleButton;
|
||||
&GtkToolbar;
|
||||
&GtkTooltips;
|
||||
&GtkTree;
|
||||
&GtkTreeItem;
|
||||
&GtkVButtonBox;
|
||||
&GtkVBox;
|
||||
&GtkViewport;
|
||||
&GtkVPaned;
|
||||
&GtkVRuler;
|
||||
&GtkVScale;
|
||||
&GtkVScrollbar;
|
||||
&GtkVSeparator;
|
||||
&GtkWidget;
|
||||
&GtkWindow;
|
||||
</chapter>
|
||||
|
||||
<chapter id="gtk-index">
|
||||
<title>Index</title>
|
||||
<sect1>
|
||||
<title>Object Hierarchy</title>
|
||||
&index-Object-Tree;
|
||||
</sect1>
|
||||
</chapter>
|
||||
</book>
|
||||
19
docs/reference/gtk/gtk-overrides.txt
Normal file
19
docs/reference/gtk/gtk-overrides.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
# These are manually-edited to override or add declarations to those scanned
|
||||
# from the GTK header files.
|
||||
|
||||
# These haven't been given parameter names in the header files.
|
||||
<USER_FUNCTION>
|
||||
<NAME>GtkArgGetFunc</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id
|
||||
</USER_FUNCTION>
|
||||
|
||||
<USER_FUNCTION>
|
||||
<NAME>GtkArgSetFunc</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id
|
||||
</USER_FUNCTION>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user