Compare commits
1258 Commits
native-lay
...
2.91.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6929db78a3 | ||
|
|
185bb2837b | ||
|
|
4acf92c08d | ||
|
|
b3a4095d55 | ||
|
|
6613fc7b36 | ||
|
|
88366ad5fe | ||
|
|
f114efcd10 | ||
|
|
3aabef6942 | ||
|
|
2fccd515f6 | ||
|
|
1b3cc80df8 | ||
|
|
f718f1bee6 | ||
|
|
1ddf183bac | ||
|
|
3ecc361f97 | ||
|
|
76ba033f59 | ||
|
|
6a93e3bbe1 | ||
|
|
692024940c | ||
|
|
9452b271a0 | ||
|
|
dc40e17af8 | ||
|
|
9dfeee8127 | ||
|
|
5400ec8168 | ||
|
|
3aad9f6617 | ||
|
|
d5593dec9e | ||
|
|
6cfd907290 | ||
|
|
c418ea89e5 | ||
|
|
aa4c96544b | ||
|
|
65536550c5 | ||
|
|
a9a7b60898 | ||
|
|
8f98c7f68c | ||
|
|
58ed78cbe0 | ||
|
|
1e9c091457 | ||
|
|
6e56d05cbc | ||
|
|
c08e7f01fe | ||
|
|
5efde9d6d0 | ||
|
|
f90bdb33c8 | ||
|
|
04ba8ef77a | ||
|
|
ef3cc732cb | ||
|
|
0e0c4ee129 | ||
|
|
cf71dbde90 | ||
|
|
c69075f170 | ||
|
|
a994a9f945 | ||
|
|
fcfd494b78 | ||
|
|
5071aa72ad | ||
|
|
f437507d4d | ||
|
|
d1829ecd74 | ||
|
|
897a333744 | ||
|
|
10f0e991da | ||
|
|
1c14268687 | ||
|
|
5daab52661 | ||
|
|
fbdcf193ae | ||
|
|
1f1e7c37ad | ||
|
|
4e0a50db9e | ||
|
|
dab457fbc6 | ||
|
|
b80322ba93 | ||
|
|
764f627733 | ||
|
|
d3aa89fc11 | ||
|
|
c4714662b1 | ||
|
|
d8d73163fd | ||
|
|
37dc91f012 | ||
|
|
586c5f0bb0 | ||
|
|
5dddcb1fa5 | ||
|
|
450b1f4322 | ||
|
|
69c7213ba9 | ||
|
|
1fad7eaf85 | ||
|
|
2f98a1c8b3 | ||
|
|
42910194a9 | ||
|
|
be703155aa | ||
|
|
9ff207bd25 | ||
|
|
816f08872a | ||
|
|
c59ca4f6b9 | ||
|
|
8eee2f9bce | ||
|
|
b2ff82d0a3 | ||
|
|
750a9f3225 | ||
|
|
a3f19ddae8 | ||
|
|
54a5e37136 | ||
|
|
d1a58b78be | ||
|
|
476b4c248c | ||
|
|
240e1b4b59 | ||
|
|
c6a379dc62 | ||
|
|
3a0afce509 | ||
|
|
81d7dd0774 | ||
|
|
cbbfd7beb6 | ||
|
|
b5abd10940 | ||
|
|
c5e9526faf | ||
|
|
cdda7f9151 | ||
|
|
ae71cf7209 | ||
|
|
338001ae48 | ||
|
|
73bac5af3b | ||
|
|
a9894d4cf4 | ||
|
|
b2207f6730 | ||
|
|
9795bd4c8c | ||
|
|
edec3e12dd | ||
|
|
630b2c58b4 | ||
|
|
570b90e218 | ||
|
|
217036975a | ||
|
|
8177ad320e | ||
|
|
b3a7d401a1 | ||
|
|
f00f120fd7 | ||
|
|
8d008790be | ||
|
|
e31304fb7b | ||
|
|
8154a5930d | ||
|
|
b2397d3d7e | ||
|
|
ac3fe174f7 | ||
|
|
8b512bd9dd | ||
|
|
a4d9d2c3d4 | ||
|
|
b1dec866e5 | ||
|
|
398728feb5 | ||
|
|
7da5cd5fe6 | ||
|
|
7018c2acc7 | ||
|
|
a863697784 | ||
|
|
4f9f52a6ea | ||
|
|
60feed7360 | ||
|
|
c41ec57fb0 | ||
|
|
18f46adb7d | ||
|
|
2f3e51389e | ||
|
|
7af16e8d91 | ||
|
|
1523509467 | ||
|
|
6e22c646c6 | ||
|
|
df4c566220 | ||
|
|
48d0be545c | ||
|
|
a84b81d4fe | ||
|
|
94c8390ad7 | ||
|
|
cb287cde00 | ||
|
|
d13bf0801d | ||
|
|
e3bf39b2e6 | ||
|
|
f5207ab647 | ||
|
|
fb0a72dc0f | ||
|
|
a41436c40f | ||
|
|
c33a2b7237 | ||
|
|
1132f54dcc | ||
|
|
8f9807ac15 | ||
|
|
cb34d4036d | ||
|
|
87dfa724eb | ||
|
|
17c1bb4e52 | ||
|
|
7a85a31cc4 | ||
|
|
1205f5a230 | ||
|
|
f7740fe580 | ||
|
|
add32bab71 | ||
|
|
1184295620 | ||
|
|
fc081e7847 | ||
|
|
7947f1933e | ||
|
|
d95f8ae2e2 | ||
|
|
2b728f66a8 | ||
|
|
9b60d27b83 | ||
|
|
d8051d1f94 | ||
|
|
80ac6c9701 | ||
|
|
9a80908c91 | ||
|
|
2dca7ad91d | ||
|
|
c8c3cf9beb | ||
|
|
814cd2c3ff | ||
|
|
7e3e0636aa | ||
|
|
393bd507bb | ||
|
|
ac1bb229d1 | ||
|
|
e45e9b187b | ||
|
|
4ca87168d4 | ||
|
|
86cb8d02d3 | ||
|
|
909a005cb2 | ||
|
|
58354f2036 | ||
|
|
2432bf4a58 | ||
|
|
3bb3dc72e3 | ||
|
|
f85543af98 | ||
|
|
8178e6016a | ||
|
|
d08e8aac62 | ||
|
|
e0e6d5b4df | ||
|
|
fca72da479 | ||
|
|
b69232e51b | ||
|
|
bb77ea4a2c | ||
|
|
9c7016ab87 | ||
|
|
5aea672e00 | ||
|
|
8dd7ae38f9 | ||
|
|
0b72acf78d | ||
|
|
f5615022a7 | ||
|
|
8991603c88 | ||
|
|
49446ed57c | ||
|
|
a93e79f8d2 | ||
|
|
783d18650b | ||
|
|
356cfaa084 | ||
|
|
fda588d10d | ||
|
|
49c409c498 | ||
|
|
209715f0ef | ||
|
|
3fe0fb4ed9 | ||
|
|
04c1337bda | ||
|
|
a7285e6435 | ||
|
|
7bbaa56f53 | ||
|
|
c406b6ed22 | ||
|
|
9c60da8978 | ||
|
|
d3f1745493 | ||
|
|
377e7179b8 | ||
|
|
366a37d8c1 | ||
|
|
503698f587 | ||
|
|
546be63ecc | ||
|
|
1d7aabee69 | ||
|
|
4a63814815 | ||
|
|
fdea6c5c19 | ||
|
|
52a7553b2c | ||
|
|
bcb23945f6 | ||
|
|
6153feb3b6 | ||
|
|
5e163f79d0 | ||
|
|
520a6aeb8f | ||
|
|
d7653e7c0c | ||
|
|
1be9b7f782 | ||
|
|
3e594dd845 | ||
|
|
7651c231e0 | ||
|
|
051dcde4bf | ||
|
|
ff5972c4cd | ||
|
|
ed63ae2bd3 | ||
|
|
0dd5eb4b61 | ||
|
|
d94adcf643 | ||
|
|
f89aaf9091 | ||
|
|
a94db5b3b9 | ||
|
|
ae6ba3adeb | ||
|
|
9fb36fff36 | ||
|
|
38dbb84095 | ||
|
|
96f2f2ff5b | ||
|
|
ec0c739520 | ||
|
|
8d3b36d534 | ||
|
|
e51daa79fe | ||
|
|
16cf23959f | ||
|
|
8f766d36f4 | ||
|
|
d2781bc74b | ||
|
|
d1140d0b1e | ||
|
|
5fbf20c2d8 | ||
|
|
1bbbd005a4 | ||
|
|
cb5b74e9c6 | ||
|
|
e351a48d6a | ||
|
|
684c9415ee | ||
|
|
ce06043f17 | ||
|
|
5a5f8081f0 | ||
|
|
c750003168 | ||
|
|
d2eac1bf81 | ||
|
|
09ec50af90 | ||
|
|
0d9ebb501d | ||
|
|
ce5a29bc38 | ||
|
|
5ef2b46d64 | ||
|
|
d6a73fd5b0 | ||
|
|
56d5b45443 | ||
|
|
8999053b5f | ||
|
|
1f77384ab3 | ||
|
|
3dc1f09772 | ||
|
|
585d7192fd | ||
|
|
d26ac6421b | ||
|
|
a46dec176e | ||
|
|
8e7aed9489 | ||
|
|
6d2e4c26bd | ||
|
|
8cd13d09e8 | ||
|
|
a9204e65dd | ||
|
|
8f0ae8e8a3 | ||
|
|
c10127156f | ||
|
|
a7465c3479 | ||
|
|
ba9efeda4b | ||
|
|
95610f2a14 | ||
|
|
b0fe3e49bb | ||
|
|
27b71e0143 | ||
|
|
03fc0dd5ca | ||
|
|
06758f1ab5 | ||
|
|
55196a705f | ||
|
|
86b3c1b65e | ||
|
|
5e8baa5f63 | ||
|
|
e428a0937a | ||
|
|
e6f95e9316 | ||
|
|
5862075e9d | ||
|
|
707d05bac0 | ||
|
|
715f57790b | ||
|
|
596da84312 | ||
|
|
e4654327df | ||
|
|
331323e5c7 | ||
|
|
f4d57dbe98 | ||
|
|
0a3fa74a52 | ||
|
|
c7e1f567b6 | ||
|
|
56d2590b49 | ||
|
|
3fcec464ac | ||
|
|
0f2d1547f8 | ||
|
|
c2f29f2cef | ||
|
|
ef9a6f205c | ||
|
|
55f76d8bee | ||
|
|
283f7ddd6c | ||
|
|
2cc059a0e7 | ||
|
|
9b34bf17e5 | ||
|
|
9f9edb662e | ||
|
|
9f035742e3 | ||
|
|
0219eea4d7 | ||
|
|
c5ebb61b6f | ||
|
|
9b3ee686ea | ||
|
|
d1a9d764a8 | ||
|
|
4824a73084 | ||
|
|
921f069269 | ||
|
|
6e4643de14 | ||
|
|
046ca498de | ||
|
|
8ac7f64123 | ||
|
|
a1134e5622 | ||
|
|
e09e8718f8 | ||
|
|
7eb42bbc7f | ||
|
|
04900c8caa | ||
|
|
bf4ee1b52b | ||
|
|
ab5fb5dee5 | ||
|
|
ff142ac2ef | ||
|
|
9e31ef616d | ||
|
|
3b8a264a5e | ||
|
|
3a55137709 | ||
|
|
6e90804b30 | ||
|
|
e0d7da3c8c | ||
|
|
206b41c6f6 | ||
|
|
d34b9ed192 | ||
|
|
8cca398a2f | ||
|
|
b613cc6478 | ||
|
|
8d456e3c50 | ||
|
|
6db62c6617 | ||
|
|
f891c58432 | ||
|
|
ba32934ea6 | ||
|
|
cc22469b69 | ||
|
|
f27d7bdea5 | ||
|
|
d2c6533107 | ||
|
|
47969615b2 | ||
|
|
b06f05e72c | ||
|
|
31abdf723a | ||
|
|
17cd0db6a8 | ||
|
|
a62e1b95bc | ||
|
|
098d23c096 | ||
|
|
f2ae6814e7 | ||
|
|
963f6c587a | ||
|
|
2dd3317522 | ||
|
|
c6c1871734 | ||
|
|
bd7e3852ac | ||
|
|
9ae2c1fcf9 | ||
|
|
39529dcfed | ||
|
|
4869aeb28d | ||
|
|
a0aed8402b | ||
|
|
4f9175d7fc | ||
|
|
f87b26a653 | ||
|
|
45c463e376 | ||
|
|
2dbfca9d02 | ||
|
|
88d74e23fa | ||
|
|
95e69afea8 | ||
|
|
d70b7f49b6 | ||
|
|
50cbd23d5b | ||
|
|
3e9bdf6fd9 | ||
|
|
3e2a259a78 | ||
|
|
43250e8faf | ||
|
|
e7f51ef6a4 | ||
|
|
99cfbecf46 | ||
|
|
8353754c17 | ||
|
|
a16722fc3a | ||
|
|
7a5a5e9c5d | ||
|
|
27ad64dccf | ||
|
|
80d3f1fcda | ||
|
|
8d05e74212 | ||
|
|
b5621b3c89 | ||
|
|
cbc358ead8 | ||
|
|
921fc8807c | ||
|
|
18578b33c5 | ||
|
|
f87023d8ee | ||
|
|
0ff28d72f6 | ||
|
|
ef7fddac3b | ||
|
|
28cb8583c3 | ||
|
|
f085c8b272 | ||
|
|
22d28ef47d | ||
|
|
56e797397b | ||
|
|
17ffcb0cc6 | ||
|
|
d7c7f010b0 | ||
|
|
479dc131ee | ||
|
|
aaf0f0f5c3 | ||
|
|
bda1f35585 | ||
|
|
88ef199ed7 | ||
|
|
9d644e9d2d | ||
|
|
e613d26448 | ||
|
|
9ff4f0819f | ||
|
|
733f1710c6 | ||
|
|
85e47b5c4e | ||
|
|
5cbb309841 | ||
|
|
aeec832f0e | ||
|
|
4fc31dd87a | ||
|
|
51820d3e34 | ||
|
|
e774e235d7 | ||
|
|
359818d6b7 | ||
|
|
3d31254fd9 | ||
|
|
34b117865a | ||
|
|
407b73dd80 | ||
|
|
4ca2632d42 | ||
|
|
9d9742f1e5 | ||
|
|
10c76c1c95 | ||
|
|
44cb3bcfed | ||
|
|
9612c64817 | ||
|
|
7c8ee80c5a | ||
|
|
7791013754 | ||
|
|
48de50df89 | ||
|
|
29ce9e679a | ||
|
|
8abb18f910 | ||
|
|
7597a35477 | ||
|
|
031856eb33 | ||
|
|
7d5a85c3ad | ||
|
|
9e661ed0e9 | ||
|
|
b36819957f | ||
|
|
dbdc9c99e5 | ||
|
|
f8b8c95f45 | ||
|
|
e3cc39cb98 | ||
|
|
5e1d8814ca | ||
|
|
803233cc14 | ||
|
|
a2e88f9b80 | ||
|
|
3b7cbaa47f | ||
|
|
af31afb906 | ||
|
|
6bdc9b7f8a | ||
|
|
4469d2cde1 | ||
|
|
25bf8ba4de | ||
|
|
d7c3d378eb | ||
|
|
c143105ae9 | ||
|
|
65c3fc9953 | ||
|
|
b58e3bb30c | ||
|
|
e732c16aab | ||
|
|
c7e024d160 | ||
|
|
abb25b7895 | ||
|
|
0a8abdcdf6 | ||
|
|
d8700a02f1 | ||
|
|
ec7c2acf7b | ||
|
|
4d63d96762 | ||
|
|
2853db41f8 | ||
|
|
eae3183f1c | ||
|
|
bef6c0a4a3 | ||
|
|
e85dad38e2 | ||
|
|
0e0d938cc3 | ||
|
|
f106d369a7 | ||
|
|
5a6ea62125 | ||
|
|
b23dc8477f | ||
|
|
36f1d08bce | ||
|
|
6899956770 | ||
|
|
cf1745a935 | ||
|
|
82712a150a | ||
|
|
e0c2a4e10f | ||
|
|
a4a7a611f2 | ||
|
|
519d758711 | ||
|
|
88cf547029 | ||
|
|
c250a7e673 | ||
|
|
4490aeddf7 | ||
|
|
70228649ee | ||
|
|
4588408268 | ||
|
|
c2ab54a31f | ||
|
|
cabc386252 | ||
|
|
71b4d83144 | ||
|
|
3f3d33ee6c | ||
|
|
ee58c6c37d | ||
|
|
9009683247 | ||
|
|
0afd8be7ef | ||
|
|
120a1006da | ||
|
|
6c258b863d | ||
|
|
ff2476152b | ||
|
|
9d750ad13e | ||
|
|
2f8f0d8eab | ||
|
|
de3e703444 | ||
|
|
f8b573766d | ||
|
|
6c537bd0bf | ||
|
|
31a45c957c | ||
|
|
0ebf090d9e | ||
|
|
9b9ccb56b1 | ||
|
|
f7418b1652 | ||
|
|
c113b8e229 | ||
|
|
5a7cfa7fb9 | ||
|
|
e9a7a2104b | ||
|
|
3267cd08e9 | ||
|
|
480b9f6b11 | ||
|
|
c1e9f4a798 | ||
|
|
2e98e37fe4 | ||
|
|
f8490e425f | ||
|
|
8ed725bad8 | ||
|
|
b04bceb47e | ||
|
|
fe9a45c413 | ||
|
|
f9265ea3b8 | ||
|
|
f6347baf64 | ||
|
|
368f0d0843 | ||
|
|
cadbdd32ba | ||
|
|
bbf189ca0d | ||
|
|
3c4d1cc856 | ||
|
|
e346d26f70 | ||
|
|
4196f56de9 | ||
|
|
e17b9ae8ba | ||
|
|
e3e243688a | ||
|
|
e1b00b52d2 | ||
|
|
22e9fcf6db | ||
|
|
c3851df92d | ||
|
|
718ccc9e4e | ||
|
|
60655a36dc | ||
|
|
04c630d0fd | ||
|
|
2a1650843d | ||
|
|
cc0ada40b5 | ||
|
|
1d21668ecc | ||
|
|
f7a20e35c1 | ||
|
|
2b348f9a48 | ||
|
|
0eab3a7ad7 | ||
|
|
eca2af5230 | ||
|
|
a472d1a400 | ||
|
|
90d9bfe086 | ||
|
|
f0039aa2a4 | ||
|
|
21eae6b6f3 | ||
|
|
8970b174dc | ||
|
|
97bdf55b6d | ||
|
|
9e869af6c5 | ||
|
|
a4c2018452 | ||
|
|
4e71a4df7b | ||
|
|
5a30dad531 | ||
|
|
13c4c554ef | ||
|
|
bbd80b671a | ||
|
|
b4f81fd612 | ||
|
|
a1ee7e7a30 | ||
|
|
846f774642 | ||
|
|
c4705377f4 | ||
|
|
2a9d299aa3 | ||
|
|
78bd97bfbe | ||
|
|
ccaf842919 | ||
|
|
3846988211 | ||
|
|
5fcf06bb91 | ||
|
|
5fbd77526a | ||
|
|
fcbe49829c | ||
|
|
6f3c3c3413 | ||
|
|
30a660213e | ||
|
|
e9c9193ff6 | ||
|
|
872ef111ec | ||
|
|
0555dd0645 | ||
|
|
9595501dbd | ||
|
|
4eac816898 | ||
|
|
8fdcd4bfb2 | ||
|
|
9a6c1e58b6 | ||
|
|
2d3d2a2626 | ||
|
|
fc2da1a137 | ||
|
|
86665897db | ||
|
|
e3957f559d | ||
|
|
0bca60fdd3 | ||
|
|
d35aa02dd5 | ||
|
|
28aa906681 | ||
|
|
32d1defc76 | ||
|
|
448d903c16 | ||
|
|
4e96a84c67 | ||
|
|
036aa0eea9 | ||
|
|
8f91329900 | ||
|
|
98b497eb99 | ||
|
|
f3716aa210 | ||
|
|
908bdf7941 | ||
|
|
0fa0e653d5 | ||
|
|
7c140feb6b | ||
|
|
f64e2df911 | ||
|
|
7203b72193 | ||
|
|
c6e58f84ee | ||
|
|
7acb4d0502 | ||
|
|
1b9029fc64 | ||
|
|
ad474edda8 | ||
|
|
14dc932fd1 | ||
|
|
1408bd9a37 | ||
|
|
82e6e32c77 | ||
|
|
72d48cbc61 | ||
|
|
7f88afef90 | ||
|
|
34ae2ea601 | ||
|
|
e141bd3287 | ||
|
|
b072ea220c | ||
|
|
42f480a537 | ||
|
|
948768c708 | ||
|
|
bf81be51eb | ||
|
|
32c80ca6a9 | ||
|
|
5ac6234815 | ||
|
|
d4fb25f6de | ||
|
|
d9c581900b | ||
|
|
65dee4e31b | ||
|
|
de89fe501d | ||
|
|
69240d9824 | ||
|
|
6c7daaf8b9 | ||
|
|
7adeca53b2 | ||
|
|
06773b1e8b | ||
|
|
f51f39af2a | ||
|
|
e0f290278b | ||
|
|
2b3574dda1 | ||
|
|
296824ecf3 | ||
|
|
3ae29e1d6b | ||
|
|
dec47f062e | ||
|
|
1b170a1a14 | ||
|
|
efefc4e794 | ||
|
|
f0d337a0ca | ||
|
|
7047502d84 | ||
|
|
de0428fe52 | ||
|
|
427226b083 | ||
|
|
e4a0a39a56 | ||
|
|
53214f2584 | ||
|
|
87e29c99d7 | ||
|
|
b81de973af | ||
|
|
d869a1e419 | ||
|
|
f53ad33994 | ||
|
|
eac1959d2c | ||
|
|
3b8184cfee | ||
|
|
945e97e505 | ||
|
|
d947178e42 | ||
|
|
e267ed84db | ||
|
|
aa8561aac2 | ||
|
|
f15860fb31 | ||
|
|
e16f9bc51c | ||
|
|
b8b6ceef16 | ||
|
|
18e489fedd | ||
|
|
b522a1b367 | ||
|
|
d3a90eae72 | ||
|
|
c34c05217c | ||
|
|
41e6da4075 | ||
|
|
bc3d3e6cf4 | ||
|
|
92732ffea0 | ||
|
|
bd4545c03a | ||
|
|
7a2010ae28 | ||
|
|
90beb8a514 | ||
|
|
e13d93a707 | ||
|
|
19d1377494 | ||
|
|
0795f1e0c9 | ||
|
|
e66129015d | ||
|
|
d9c9259861 | ||
|
|
f52a1fcfbd | ||
|
|
5b687d938a | ||
|
|
9403e167b4 | ||
|
|
aa70d351c4 | ||
|
|
cdba1f6519 | ||
|
|
15497825c0 | ||
|
|
ffa5587fb3 | ||
|
|
99eae4e208 | ||
|
|
64dddaf1fe | ||
|
|
f999c8dc29 | ||
|
|
21d6aba620 | ||
|
|
e10f5e9ad5 | ||
|
|
e25208825f | ||
|
|
f0c067063c | ||
|
|
fb43f590e9 | ||
|
|
dca859dfa1 | ||
|
|
6eb6135e2d | ||
|
|
2743f0bdcd | ||
|
|
a145deb083 | ||
|
|
2e5df3306a | ||
|
|
34c6e35152 | ||
|
|
7125712299 | ||
|
|
c5d309e596 | ||
|
|
f5ad38fdc4 | ||
|
|
9826c31a9f | ||
|
|
0a57863f73 | ||
|
|
f44f35548d | ||
|
|
e8e657725c | ||
|
|
6c971ac479 | ||
|
|
fd200f07f5 | ||
|
|
af32c9c9be | ||
|
|
f3ccf2fccf | ||
|
|
b7027d778c | ||
|
|
5f57cede3c | ||
|
|
b89920e203 | ||
|
|
1142c8bf18 | ||
|
|
ec6e97be4d | ||
|
|
67284a57de | ||
|
|
1d3f6b30b0 | ||
|
|
70e6aba0d0 | ||
|
|
326f887ae7 | ||
|
|
9aa4f417d0 | ||
|
|
7947b3faf8 | ||
|
|
45744d9a5f | ||
|
|
0acec382c8 | ||
|
|
0c285bad75 | ||
|
|
8929321cba | ||
|
|
45836db7a5 | ||
|
|
8aa402b610 | ||
|
|
256012bdbd | ||
|
|
e194bc14fd | ||
|
|
5442f5b9f2 | ||
|
|
0ab6956579 | ||
|
|
87940287aa | ||
|
|
38c932ace6 | ||
|
|
c42f6ff4bf | ||
|
|
e1571a5936 | ||
|
|
5625c20759 | ||
|
|
7c62a44324 | ||
|
|
ba21d3e687 | ||
|
|
e65b1cfd76 | ||
|
|
9cd83da6dc | ||
|
|
97b997d59e | ||
|
|
b271c76c06 | ||
|
|
ebba458336 | ||
|
|
f1171c9c07 | ||
|
|
c6f28c3dbc | ||
|
|
07d0c0b921 | ||
|
|
b8ebcdd0e0 | ||
|
|
7af767333e | ||
|
|
ec604d11ec | ||
|
|
dfd0ceab1c | ||
|
|
f8b420783d | ||
|
|
0ad2f57332 | ||
|
|
9c980372d2 | ||
|
|
eed9468e06 | ||
|
|
b452bb768d | ||
|
|
73b6ddbf47 | ||
|
|
9ef1dfc0a3 | ||
|
|
ef56ba83f8 | ||
|
|
3f10e45ea1 | ||
|
|
d207fd05e5 | ||
|
|
b0f078ba43 | ||
|
|
729f80b554 | ||
|
|
830cda9e32 | ||
|
|
b717f1b265 | ||
|
|
8f2fdec7d6 | ||
|
|
5f771c8a9f | ||
|
|
c54968e964 | ||
|
|
bec11c352d | ||
|
|
a4bbe4da10 | ||
|
|
b0c5302115 | ||
|
|
1b9f793311 | ||
|
|
15f48a818d | ||
|
|
67299ed106 | ||
|
|
e63d6dd379 | ||
|
|
fac27827c4 | ||
|
|
ff97485695 | ||
|
|
be8a398bb5 | ||
|
|
70bdbb3f4c | ||
|
|
66bd7c1578 | ||
|
|
6a0c31143f | ||
|
|
2e53b58b01 | ||
|
|
08d05f954d | ||
|
|
748d3d612d | ||
|
|
e0be884297 | ||
|
|
ee15f5aab1 | ||
|
|
c9c9d2ac15 | ||
|
|
79477e097d | ||
|
|
557b9d0b26 | ||
|
|
d992df0a47 | ||
|
|
6f6c81e527 | ||
|
|
475f96216d | ||
|
|
e6d1c8aeab | ||
|
|
1f640d127e | ||
|
|
fe4c61b1ec | ||
|
|
d17ba1d30a | ||
|
|
ce2d6cc015 | ||
|
|
5eabd8c6fa | ||
|
|
8af968946f | ||
|
|
bf8df2daea | ||
|
|
4a23b12911 | ||
|
|
e087fe7e99 | ||
|
|
01a1e16dcf | ||
|
|
f383e1f183 | ||
|
|
21099d31ed | ||
|
|
fadf269a36 | ||
|
|
ad030e1696 | ||
|
|
806bcb10ff | ||
|
|
c46ce97145 | ||
|
|
f94ff0b3b9 | ||
|
|
468e453a31 | ||
|
|
a5e487846a | ||
|
|
1c94efc921 | ||
|
|
f2d7e6c8d4 | ||
|
|
299d533376 | ||
|
|
782af63273 | ||
|
|
8fc35150a2 | ||
|
|
c8b16f66b6 | ||
|
|
ab781bd89b | ||
|
|
0d6461714b | ||
|
|
240ca0bb21 | ||
|
|
00375c7692 | ||
|
|
9daab81ab5 | ||
|
|
818005f3fe | ||
|
|
9a8c9d6579 | ||
|
|
a18ec3485c | ||
|
|
f525837e39 | ||
|
|
327a04807e | ||
|
|
bf3b4438bb | ||
|
|
f679516ce1 | ||
|
|
62f5fdc856 | ||
|
|
bc1cd6c5cb | ||
|
|
0cbe62f943 | ||
|
|
90379ed68a | ||
|
|
fb4ba51d44 | ||
|
|
4aefc82496 | ||
|
|
2e75cecd49 | ||
|
|
e605272436 | ||
|
|
745f110814 | ||
|
|
c85f91e14c | ||
|
|
1d5796c95b | ||
|
|
9233a08991 | ||
|
|
725749cd14 | ||
|
|
02572cdf7e | ||
|
|
ed996bcd68 | ||
|
|
0a6b7e5759 | ||
|
|
7121ec2880 | ||
|
|
c76221426a | ||
|
|
5228913f68 | ||
|
|
d13a2ad66a | ||
|
|
c412c1c752 | ||
|
|
696989d499 | ||
|
|
ec4be3619f | ||
|
|
867ab99b1a | ||
|
|
04e58c192e | ||
|
|
ee8788f766 | ||
|
|
f5a10b05b5 | ||
|
|
892593eff4 | ||
|
|
c68029b778 | ||
|
|
3bd8319a08 | ||
|
|
84671438b0 | ||
|
|
812d9b9948 | ||
|
|
5ea1d78857 | ||
|
|
7108586b16 | ||
|
|
9507670db4 | ||
|
|
d4f08efd57 | ||
|
|
39b376681c | ||
|
|
03cf19e8e2 | ||
|
|
0129b89153 | ||
|
|
0775b0a858 | ||
|
|
e624656c20 | ||
|
|
94f809d439 | ||
|
|
cf4cb4f6d9 | ||
|
|
04d5c477aa | ||
|
|
28b4567159 | ||
|
|
47ee996198 | ||
|
|
571e749d60 | ||
|
|
f08254074c | ||
|
|
eac72ec830 | ||
|
|
504a2d4194 | ||
|
|
b5097de481 | ||
|
|
2ee8fdb79b | ||
|
|
7f486231ac | ||
|
|
0f13411cb0 | ||
|
|
a6ef356107 | ||
|
|
ffed076891 | ||
|
|
a6e936788a | ||
|
|
9f47be2216 | ||
|
|
5b9bbf9de2 | ||
|
|
eee6c002d1 | ||
|
|
894d402c0f | ||
|
|
e316157671 | ||
|
|
a9f198082a | ||
|
|
3607a4c082 | ||
|
|
c51e8bd9e5 | ||
|
|
4701bdb2a8 | ||
|
|
fc52c9daf3 | ||
|
|
0a63e954af | ||
|
|
2fc80e6102 | ||
|
|
c64946c52d | ||
|
|
d7ede44dae | ||
|
|
4515f0803b | ||
|
|
59b227e123 | ||
|
|
913f3fcc9f | ||
|
|
600f52321b | ||
|
|
08e6fc11ad | ||
|
|
e8a6bad00b | ||
|
|
a38472c139 | ||
|
|
e06d04032b | ||
|
|
ce7379a8bd | ||
|
|
6a2124d566 | ||
|
|
b09019560b | ||
|
|
a520b4f372 | ||
|
|
a7208d675f | ||
|
|
c340fb7efd | ||
|
|
b479ff9cb5 | ||
|
|
522becccc0 | ||
|
|
f74f9b2766 | ||
|
|
cadcd029a1 | ||
|
|
4dd215f82d | ||
|
|
b7f2f9a678 | ||
|
|
18a4ed6fd0 | ||
|
|
9bcbdb7494 | ||
|
|
e6b74551d1 | ||
|
|
55c4cdab1a | ||
|
|
8d3319f088 | ||
|
|
2b4efe2690 | ||
|
|
47292f28d5 | ||
|
|
6607f2b794 | ||
|
|
e500f997db | ||
|
|
90b4b88629 | ||
|
|
36f0a96161 | ||
|
|
de2a4d1b1a | ||
|
|
4a9c32dc36 | ||
|
|
6453710266 | ||
|
|
332652f702 | ||
|
|
ebdf26e1d8 | ||
|
|
666539736d | ||
|
|
b69fdbbd04 | ||
|
|
d04bb38b28 | ||
|
|
6d27362620 | ||
|
|
2bedd205c5 | ||
|
|
804fd4b15a | ||
|
|
b370cb0d4c | ||
|
|
3ba78fed2a | ||
|
|
19bad9fecc | ||
|
|
d7335837e0 | ||
|
|
039e0c273a | ||
|
|
ca8a835874 | ||
|
|
99c82af20a | ||
|
|
8ac0e98f98 | ||
|
|
b186680a43 | ||
|
|
db47dd6197 | ||
|
|
f085bc67cd | ||
|
|
b259dd9aba | ||
|
|
e9dd3dc46a | ||
|
|
42947e3cdc | ||
|
|
e31e77eeb8 | ||
|
|
4138e86ad4 | ||
|
|
331999d84d | ||
|
|
ac48f2330d | ||
|
|
3d340d7449 | ||
|
|
3dfb47bc3c | ||
|
|
0d9d599b50 | ||
|
|
134683c9be | ||
|
|
20d1030823 | ||
|
|
84c77c0be3 | ||
|
|
603a840de9 | ||
|
|
5e4aaba482 | ||
|
|
2c1633699f | ||
|
|
c250b3fe1d | ||
|
|
95686cb704 | ||
|
|
547e2cc837 | ||
|
|
3d98537c2e | ||
|
|
6ab793da8d | ||
|
|
4b57560666 | ||
|
|
bfa6ad6e7c | ||
|
|
a7fec8cf46 | ||
|
|
806a7239ae | ||
|
|
8b4d50dd1d | ||
|
|
96b387599d | ||
|
|
6218c16ff8 | ||
|
|
0178bff5c0 | ||
|
|
6ef27387e0 | ||
|
|
dceb149ca4 | ||
|
|
37a62e9367 | ||
|
|
241f38992b | ||
|
|
c65bb2b3b4 | ||
|
|
da9b45be78 | ||
|
|
be1d190b2e | ||
|
|
81f15cf908 | ||
|
|
d80e2897b9 | ||
|
|
ff6e75adbc | ||
|
|
e5e228debf | ||
|
|
f0fd2e3a6e | ||
|
|
24304a2e93 | ||
|
|
4d4871203e | ||
|
|
45a2656e32 | ||
|
|
3f7b36d5cc | ||
|
|
e1544bcc7f | ||
|
|
f2dc8a26ed | ||
|
|
fed19bcf50 | ||
|
|
bea727a142 | ||
|
|
8c325f0d60 | ||
|
|
e59cbd5605 | ||
|
|
abaecf4308 | ||
|
|
07662f288d | ||
|
|
761a1932a6 | ||
|
|
e08d4258bb | ||
|
|
507f37b536 | ||
|
|
f7cfaee18a | ||
|
|
eda14b2d47 | ||
|
|
bbcb737b86 | ||
|
|
71991f339d | ||
|
|
5aad25aa42 | ||
|
|
3fd767c92d | ||
|
|
8b5bc9669b | ||
|
|
a98127fc12 | ||
|
|
92ededc9b4 | ||
|
|
cc9ac5b7ea | ||
|
|
bc6a3f8cd8 | ||
|
|
1773b6d50a | ||
|
|
7dde4d93ad | ||
|
|
93fd2b44c3 | ||
|
|
41f4fd94df | ||
|
|
26c93dc04b | ||
|
|
8578ff4b38 | ||
|
|
94e9a35a16 | ||
|
|
50971f704c | ||
|
|
3c19eea34b | ||
|
|
b47b1428b8 | ||
|
|
3557761fb3 | ||
|
|
65db1100ec | ||
|
|
c45985ae01 | ||
|
|
8026cd386b | ||
|
|
8736d31a04 | ||
|
|
76d7331578 | ||
|
|
84bae92928 | ||
|
|
381c14f1e2 | ||
|
|
61e9f570d9 | ||
|
|
e56a209077 | ||
|
|
aad77642be | ||
|
|
c9ca4beb35 | ||
|
|
b0713fb3bb | ||
|
|
0e1bba6ef5 | ||
|
|
bb90394147 | ||
|
|
fb62d6105f | ||
|
|
9ef738c4ab | ||
|
|
9c3d1080d6 | ||
|
|
59bc9e8860 | ||
|
|
0f88b6808c | ||
|
|
27bc88f7c2 | ||
|
|
ad48f4d52b | ||
|
|
eba2d6cf61 | ||
|
|
e976abe825 | ||
|
|
9e2996decd | ||
|
|
93e203e067 | ||
|
|
e0aa12eb0a | ||
|
|
ca251cf1d4 | ||
|
|
6ba904486c | ||
|
|
330bc154ed | ||
|
|
2ddfaeddad | ||
|
|
14e38da150 | ||
|
|
1592738d2f | ||
|
|
1aea318d0f | ||
|
|
bb7ffddff2 | ||
|
|
e8a60e6123 | ||
|
|
d14687ef4b | ||
|
|
def95d1319 | ||
|
|
743202261a | ||
|
|
ae3be469b3 | ||
|
|
bc7654826f | ||
|
|
1dcd209cdd | ||
|
|
8e117b6f3a | ||
|
|
6b4992d647 | ||
|
|
35e0ad72e4 | ||
|
|
92411d2c84 | ||
|
|
1243b4861c | ||
|
|
e32ab82069 | ||
|
|
c7d73ee587 | ||
|
|
b837ef5a6d | ||
|
|
4f3e5e6ebc | ||
|
|
8d5b4e9f6e | ||
|
|
de3512dbba | ||
|
|
19cab17c22 | ||
|
|
60c920f228 | ||
|
|
8c3900f420 | ||
|
|
ac051a7b2c | ||
|
|
809dbe9f99 | ||
|
|
15a5a231fc | ||
|
|
efbf04236e | ||
|
|
6e9349d858 | ||
|
|
54077d61e2 | ||
|
|
28c66ed9b0 | ||
|
|
bf19aa46e9 | ||
|
|
6aa8941b84 | ||
|
|
ab0e68e586 | ||
|
|
2f78aa3024 | ||
|
|
bf2a7ee1b6 | ||
|
|
8e72e9a7a0 | ||
|
|
67e6ac5af9 | ||
|
|
b9f66d9197 | ||
|
|
3e91238071 | ||
|
|
38e09dcbb1 | ||
|
|
896e249e8f | ||
|
|
560ca1eaad | ||
|
|
57e0b9a979 | ||
|
|
1110375f24 | ||
|
|
f5a06df3dc | ||
|
|
8345760fdb | ||
|
|
e3a8e29a6c | ||
|
|
15d46dd866 | ||
|
|
b140884fec | ||
|
|
a18e2370bf | ||
|
|
2ee532645f | ||
|
|
266476d32b | ||
|
|
8bfb1e0ab8 | ||
|
|
ab4ba69cc8 | ||
|
|
7b42d4feda | ||
|
|
032d3f0ada | ||
|
|
c22b80949d | ||
|
|
419e1548ab | ||
|
|
5ba6295a10 | ||
|
|
ff29972a48 | ||
|
|
b64e91adf0 | ||
|
|
0e484a83d1 | ||
|
|
8204fe6036 | ||
|
|
97ffc36540 | ||
|
|
450beef2a2 | ||
|
|
e02252cdd6 | ||
|
|
9e81022bf6 | ||
|
|
153bfacde0 | ||
|
|
96c3858b21 | ||
|
|
a79637f081 | ||
|
|
85ae875dcb | ||
|
|
a79d6676ac | ||
|
|
ecaa37529c | ||
|
|
31cd439385 | ||
|
|
0fc5433753 | ||
|
|
234d750bb3 | ||
|
|
d93ab58829 | ||
|
|
1dc9451b57 | ||
|
|
474f80442a | ||
|
|
85735112d7 | ||
|
|
daebca19da | ||
|
|
dc1940e99e | ||
|
|
cd2a19a68d | ||
|
|
9debfe243f | ||
|
|
cf68c2636a | ||
|
|
c29f0a1392 | ||
|
|
8960d64cc6 | ||
|
|
cf6eb47758 | ||
|
|
b3079c0d18 | ||
|
|
7e520d908a | ||
|
|
e3fafd7512 | ||
|
|
66e860b5d1 | ||
|
|
08dd02fe25 | ||
|
|
d3661589f4 | ||
|
|
ab248d7ca3 | ||
|
|
65b9fc3e5b | ||
|
|
6eae25e0b0 | ||
|
|
402e3bed47 | ||
|
|
056ec835cc | ||
|
|
e356769f33 | ||
|
|
da0975d5f2 | ||
|
|
6460fb6b3e | ||
|
|
e2a492cf80 | ||
|
|
36437a635d | ||
|
|
149b84dacf | ||
|
|
95eb4a868e | ||
|
|
2a27c90479 | ||
|
|
0dcaad3a85 | ||
|
|
001d16cb87 | ||
|
|
a6a036ce22 | ||
|
|
6624da6393 | ||
|
|
b0b8393f99 | ||
|
|
e748334327 | ||
|
|
7464a9ca08 | ||
|
|
0c662ecb9a | ||
|
|
ceca2ff10c | ||
|
|
73ea777c33 | ||
|
|
843be48572 | ||
|
|
f76fddb8a7 | ||
|
|
dd36afc207 | ||
|
|
91d0728dfa | ||
|
|
3bd93e5bfd | ||
|
|
72ac2175e2 | ||
|
|
e08c43faf4 | ||
|
|
913cdf3be7 | ||
|
|
03c19e37af | ||
|
|
bd277fad50 | ||
|
|
3dda0adf76 | ||
|
|
8fb5bc2583 | ||
|
|
1b0d2fcd51 | ||
|
|
016093d007 | ||
|
|
a76d198508 | ||
|
|
efaed1b8f1 | ||
|
|
f8cfb895ed | ||
|
|
d9e7680735 | ||
|
|
a338d5dea5 | ||
|
|
e4dc454f59 | ||
|
|
50ef420378 | ||
|
|
89e8f79f07 | ||
|
|
a48d28848e | ||
|
|
ec2f2c3daf | ||
|
|
0993bc4d1c | ||
|
|
29044f0f0e | ||
|
|
5533264958 | ||
|
|
d05d713068 | ||
|
|
2d0a655201 | ||
|
|
87141cf4c8 | ||
|
|
801875b805 | ||
|
|
2ab562a6f7 | ||
|
|
cb24bcc613 | ||
|
|
b654afcb48 | ||
|
|
9934007420 | ||
|
|
4e6a665e61 | ||
|
|
bc366cef52 | ||
|
|
eb81216e32 | ||
|
|
4a5e0a35b9 | ||
|
|
ca3348f8f1 | ||
|
|
3963d5aa76 | ||
|
|
319bc22c5c | ||
|
|
d04e557370 | ||
|
|
c78a23bdca | ||
|
|
eeaf576316 | ||
|
|
8a210673fb | ||
|
|
278957a5a4 | ||
|
|
d5278b5994 | ||
|
|
c50db9c208 | ||
|
|
d5c2cb7bcb | ||
|
|
87b192773c | ||
|
|
fc5b39a4b8 | ||
|
|
134f9774dd | ||
|
|
3c5f9fd1a2 | ||
|
|
2f966e8418 | ||
|
|
88a90b8abb | ||
|
|
d7d940c71e | ||
|
|
956a3f53e1 | ||
|
|
08ddea5069 | ||
|
|
e6da33a302 | ||
|
|
3b63ef0ac6 | ||
|
|
bf3b5f785e | ||
|
|
d8f3a162c8 | ||
|
|
7e78999034 | ||
|
|
78ccc74879 | ||
|
|
3fdb4f6069 | ||
|
|
9c2eca5b06 | ||
|
|
3685db091d | ||
|
|
fc46f2ca2f | ||
|
|
1be5f91491 | ||
|
|
d095448be3 | ||
|
|
f42814168c | ||
|
|
00ce32d940 | ||
|
|
6aa846cc4d | ||
|
|
03b6a9b6a0 | ||
|
|
18b47b6cd0 | ||
|
|
46f15e7d68 | ||
|
|
76b21033f9 | ||
|
|
d433a60611 | ||
|
|
97cd2500c3 | ||
|
|
a60a933ca6 | ||
|
|
ece148eec0 | ||
|
|
55d5d3679e | ||
|
|
2994fa11fb | ||
|
|
e78851b928 | ||
|
|
31b709d08a | ||
|
|
68568cff66 | ||
|
|
c9ccc7551b | ||
|
|
f2279d5e51 | ||
|
|
42a90aa00c | ||
|
|
6b5672c199 | ||
|
|
0ff6aedca0 | ||
|
|
3302f22da2 | ||
|
|
4230f7998b | ||
|
|
c3a19a4a14 | ||
|
|
e4af3782d3 | ||
|
|
1956cf8d28 | ||
|
|
d28af9cbb9 | ||
|
|
658f99b8ee | ||
|
|
095fb1afe4 | ||
|
|
399580f9e1 | ||
|
|
299454b7ed | ||
|
|
15ea566813 | ||
|
|
7670b13d19 | ||
|
|
6e5d65c9af | ||
|
|
5484211c90 | ||
|
|
7eadf45888 | ||
|
|
a47e5483b6 | ||
|
|
3a752e03a8 | ||
|
|
787df491f3 | ||
|
|
38fad43129 | ||
|
|
9074f74c6f | ||
|
|
94420f7110 | ||
|
|
267a2156d8 | ||
|
|
b00b1c33a3 | ||
|
|
9688665334 | ||
|
|
b04b1b2e84 | ||
|
|
5032cdf88f | ||
|
|
78dc2debc0 | ||
|
|
34c6ea0307 | ||
|
|
1810943d5d | ||
|
|
213f8e2f1b | ||
|
|
1a980d0be6 | ||
|
|
304b1a1f56 | ||
|
|
6250627d9e | ||
|
|
7879d5af11 | ||
|
|
cc06f3dde6 | ||
|
|
8da741f955 | ||
|
|
d8a90be370 | ||
|
|
e14560cf1e | ||
|
|
8476d22dea | ||
|
|
04e241fd85 | ||
|
|
4491bdbb9d | ||
|
|
972f617b77 | ||
|
|
bbf38a8ebd | ||
|
|
ba158a24fe | ||
|
|
86851b7ad3 | ||
|
|
f84707d6f9 | ||
|
|
6afa615690 | ||
|
|
a026b8227c | ||
|
|
87bf99dcc5 | ||
|
|
8d36170b8d | ||
|
|
29aa3818a4 | ||
|
|
af8539bf11 | ||
|
|
eb10e6b128 | ||
|
|
00438fea3d | ||
|
|
5d6b21e7b2 | ||
|
|
d2d344a531 | ||
|
|
6dd4f32f37 | ||
|
|
d45d970144 | ||
|
|
f733ab0e75 | ||
|
|
34a8213b0f |
@@ -5,9 +5,11 @@ GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, GdkPixbuf, ATK and cairo libraries, available at
|
||||
the same location as GTK+. GTK+ @GTK_VERSION@ requires at least
|
||||
GLib 2.23.6, Pango 1.20, GdkPixbuf 2.21.0 ATK 1.29.2 and cairo 1.6.0.
|
||||
GLib @GLIB_REQUIRED_VERSION@, Pango @PANGO_REQUIRED_VERSION@,
|
||||
GdkPixbuf @GDK_PIXBUF_REQUIRED_VERSION@, ATK @ATK_REQUIRED_VERSION@
|
||||
and cairo @CAIRO_REQUIRED_VERSION@.
|
||||
|
||||
- gobject-introspection 0.6.7 or newer.
|
||||
- gobject-introspection 0.9.3 or newer.
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
81
Makefile.am
81
Makefile.am
@@ -1,12 +1,13 @@
|
||||
## Makefile.am for GTK+
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SRC_SUBDIRS = gdk gtk modules demos tests perf
|
||||
SRC_SUBDIRS = gdk gtk modules demos tests perf examples
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
EXTRA_DIST += \
|
||||
autogen.sh \
|
||||
HACKING \
|
||||
makecopyright \
|
||||
NEWS.pre-1-0 \
|
||||
@@ -30,82 +31,8 @@ EXTRA_DIST += \
|
||||
gtk-zip.sh.in \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
po/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
examples/aspectframe/aspectframe.c \
|
||||
examples/Makefile \
|
||||
examples/README.1ST \
|
||||
examples/extract.awk \
|
||||
examples/extract.sh \
|
||||
examples/arrow/Makefile \
|
||||
examples/arrow/arrow.c \
|
||||
examples/base/Makefile \
|
||||
examples/base/base.c \
|
||||
examples/buttonbox/Makefile \
|
||||
examples/buttonbox/buttonbox.c \
|
||||
examples/buttons/Makefile \
|
||||
examples/buttons/buttons.c \
|
||||
examples/buttons/info.xpm \
|
||||
examples/calendar/Makefile \
|
||||
examples/calendar/calendar.c \
|
||||
examples/entry/Makefile \
|
||||
examples/entry/entry.c \
|
||||
examples/eventbox/Makefile \
|
||||
examples/eventbox/eventbox.c \
|
||||
examples/gtkdial/Makefile \
|
||||
examples/gtkdial/dial_test.c \
|
||||
examples/gtkdial/gtkdial.c \
|
||||
examples/gtkdial/gtkdial.h \
|
||||
examples/helloworld/Makefile \
|
||||
examples/helloworld/helloworld.c \
|
||||
examples/helloworld2/Makefile \
|
||||
examples/helloworld2/helloworld2.c \
|
||||
examples/label/Makefile \
|
||||
examples/label/label.c \
|
||||
examples/menu/Makefile \
|
||||
examples/menu/menu.c \
|
||||
examples/notebook/Makefile \
|
||||
examples/notebook/notebook.c \
|
||||
examples/packbox/Makefile \
|
||||
examples/packbox/packbox.c \
|
||||
examples/paned/Makefile \
|
||||
examples/paned/paned.c \
|
||||
examples/pixmap/Makefile \
|
||||
examples/pixmap/pixmap.c \
|
||||
examples/progressbar/Makefile \
|
||||
examples/progressbar/progressbar.c \
|
||||
examples/radiobuttons/Makefile \
|
||||
examples/radiobuttons/radiobuttons.c \
|
||||
examples/rangewidgets/Makefile \
|
||||
examples/rangewidgets/rangewidgets.c \
|
||||
examples/rulers/Makefile \
|
||||
examples/rulers/rulers.c \
|
||||
examples/scribble-simple/Makefile \
|
||||
examples/scribble-simple/scribble-simple.c \
|
||||
examples/scribble-xinput/Makefile \
|
||||
examples/scribble-xinput/scribble-xinput.c \
|
||||
examples/scrolledwin/Makefile \
|
||||
examples/scrolledwin/scrolledwin.c \
|
||||
examples/selection/Makefile \
|
||||
examples/selection/gettargets.c \
|
||||
examples/selection/setselection.c \
|
||||
examples/statusbar/Makefile \
|
||||
examples/statusbar/statusbar.c \
|
||||
examples/table/Makefile \
|
||||
examples/table/table.c \
|
||||
examples/tictactoe/Makefile \
|
||||
examples/tictactoe/tictactoe.c \
|
||||
examples/tictactoe/tictactoe.h \
|
||||
examples/tictactoe/ttt_test.c \
|
||||
examples/wheelbarrow/Makefile \
|
||||
examples/wheelbarrow/wheelbarrow.c \
|
||||
examples/fixed/fixed.c \
|
||||
examples/fixed/Makefile \
|
||||
examples/frame/frame.c \
|
||||
examples/frame/Makefile \
|
||||
examples/spinbutton/spinbutton.c \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
po/po2tbl.sed.in
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/INSTALL \
|
||||
$(srcdir)/README \
|
||||
|
||||
378
NEWS
378
NEWS
@@ -1,3 +1,381 @@
|
||||
Overview of Changes from GTK+ 2.91.3 to 2.91.4
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
609622 disappearing statusicon
|
||||
631331 window icons don't work anymore
|
||||
632894 Only show Desktop in file chooser button if there is one
|
||||
633670 Child minimum/natural size is not respected by GtkScrolledWindow
|
||||
633762 Correctly convert colors to CSS and deal with librsvg limitations
|
||||
633915 gtk_button_box_child_requisition() mishandles size allocations
|
||||
634060 Support for GIcon pixbufs
|
||||
634338 Move GtkPaned documentation to inline comments
|
||||
634339 Move GtkProgressBar documentation to inline comments
|
||||
634340 Move GtkPageSetup documentation to inline comments
|
||||
|
||||
* Translation updates
|
||||
Japanese
|
||||
Estonian
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.91.2 to 2.91.3
|
||||
==============================================
|
||||
|
||||
* The scrollable interface has gained some extra properties
|
||||
to influence scrolling behaviour: [hv]scroll-policy
|
||||
|
||||
* The size_request vfunc and signal have been deprecated and
|
||||
are no longer used inside GTK+ itself
|
||||
|
||||
* GtkAssistant has added a custom page type that gives full
|
||||
control of button visibility
|
||||
|
||||
* The homogeneous parameter has been removed from gtk_box_new
|
||||
|
||||
* Bugs fixed:
|
||||
61852 GtkTextBuffer needs a case insensitive search
|
||||
576498 GtkAssistant seals members without adding accessors
|
||||
612611 auto-mnemonics breaks menu scrolling
|
||||
633050 need gtk_combo_box_new_with_model_and_entry
|
||||
633216 Make gdk_rgba_to_string() take a const GdkRGBA
|
||||
633274 Add error trap around call to XFixesChangeSaveSet()
|
||||
633374 Port tests to GtkScrollable API...
|
||||
633500 statusbar labels behind resize grip on startup
|
||||
|
||||
* Updated translations:
|
||||
Catalan (Valencian)
|
||||
Estonian
|
||||
Galician
|
||||
Hebrew
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.91.1 to 2.91.2
|
||||
==============================================
|
||||
|
||||
* GtkApplication has been rewritten. It mostly relies on GApplication
|
||||
API now. Remaining functions include gtk_application_new() and
|
||||
gtk_window_set_application()
|
||||
|
||||
* A GtkScrollable interface has been added and implemented by all
|
||||
scrollable widgets. GtkScrolledWindow has ::min-display-width/height
|
||||
properties to control the minimal size of the content area.
|
||||
|
||||
* GtkComboBox changes:
|
||||
- Popups can be wider than the combo box itself
|
||||
- The deprecated GtkComboBoxEntry subclass has been removed
|
||||
- The deprecated combo box text convenience API has been removed
|
||||
|
||||
* GtkRecentManager changes:
|
||||
- Store xbel file in XDG_USER_DATA
|
||||
- Add gtk_recent_info_create_app_info()
|
||||
- Add gtk_recent_info_get_gicon()
|
||||
- Coalesce multiple changes
|
||||
|
||||
* GtkIconView allows tree models (ignoring anything below the root level)
|
||||
|
||||
* GtkProgressBar, GtkSpinButton, GtkEntry and GtkCalendar no longer have
|
||||
their own input-output window
|
||||
|
||||
* gtk_widget_hide_all() has been removed
|
||||
|
||||
* GtkGrid: A legacy-free, height-for-width grid container
|
||||
|
||||
* GDK gained a GdkRGBA color struct containing 4 doubles, and various
|
||||
GdkColor APIs have GdkRGBA counterparts now.
|
||||
|
||||
* Bugs fixed:
|
||||
324899 GtkComboBoxText needs API to remove all items
|
||||
438318 Deprecate and remove hide_all()
|
||||
524304 Use XDG_USER_DATA to store the recent files
|
||||
617174 gtkrecentinfo & GIcon
|
||||
632381 gtk_combo_box_text_new_with_entry() adds two text cell renderers
|
||||
632538 Move setting property registration in gtksettings.c
|
||||
632539 Do not install gtkprivate.h
|
||||
632677 restore copyright header
|
||||
632736 change the window class of entry from INPUT_OUTPUT to INPUT_ONLY
|
||||
632936 gtkcellrenderer gdkrgba changes not correct
|
||||
|
||||
* Translation updates:
|
||||
Arabic
|
||||
Galician
|
||||
Hebrew
|
||||
Japanese
|
||||
Norwegian bokmål
|
||||
Spanish
|
||||
Telugu
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.91.0 to 2.91.1
|
||||
==============================================
|
||||
|
||||
* GTK+ can now add a resize grip to any window. The resize
|
||||
grip functionality in GtkStatusbar has been removed.
|
||||
|
||||
* A very old bug in the handling of geometry widgets has
|
||||
been fixed, and a way to set geometry in terms of the
|
||||
geometry widget has been added: gtk_window_resize_to_geometry()
|
||||
|
||||
* The GtkFileChooser now uses GSettings to store its settings
|
||||
instead of the keyfile ~/.config/gtk-2.0/gtkfilechooser.ini
|
||||
|
||||
* GtkWrapBox has been dropped from GTK+ again. The widget
|
||||
will be available in libegg until clear use cases have
|
||||
been established.
|
||||
|
||||
* GtkWidget now has horizontal and vertical expand flags, in
|
||||
the form of ::hexpand and ::vexpand properties. These flags
|
||||
are intended to obsolete most custom container-specific
|
||||
expand child properties, over time.
|
||||
Expandability is inherited up the widget hierarchy.
|
||||
|
||||
* GtkComboBoxEntry has been deprecated in favor of a
|
||||
::has-entry property on GtkComboBox.
|
||||
|
||||
* The GtkComboBox text convenience API (gtk_combo_box_new_text(), etc)
|
||||
has been deprecated in favor of a new GtkComboBoxText class.
|
||||
|
||||
* GtkLinkButton has gained a ::activate-link signal that
|
||||
can be used to suppress the default behavior.
|
||||
|
||||
* The very outdated tutorial has been dropped from the GTK+ distribution,
|
||||
and a new 'Getting started' section has been added to the API
|
||||
documentation that will accumulate tutorial material over time.
|
||||
|
||||
* Bugs fixed:
|
||||
68668 Fix handling of geometry widget
|
||||
313350 Return type of gtk_accelerator_get_default_mod_mask...
|
||||
351247 GtkScrolledWindow is mis documented
|
||||
423201 gtk_combo_box_entry_active_changed does not transform...
|
||||
563002 Doesn't call 'update-preview' on set_filename
|
||||
612396 Implement GtkComboBoxText subclass to supersede "text"...
|
||||
613728 Rationalize GtkTreeView focus
|
||||
628902 use expand flags to determine window resizability
|
||||
629722 save_entry_get_info_cb() doesn't behave correctly
|
||||
629778 Scrolled window does not behave properly with height-for...
|
||||
629955 Deprecate / remove gtk_main and gtk_init_add / remove* API
|
||||
630850 Use GSettings for the filechooser settings
|
||||
630900 GtkCellRendererClass: unify const of GdkRectangle args
|
||||
631203 Scrolling in GtkTextView can use 100% cpu
|
||||
631311 Obvious fix for nasty crash in menu code
|
||||
631473 Fix GTK+3 documentation
|
||||
631475 Two old GDK_foo key macros left in gdk/quartz/gdkkeys-quartz.c
|
||||
631599 Allow to use arbitrary surfaces for offscreen windows
|
||||
631719 Action-based menu accelerators don't synch with GtkMenuItem
|
||||
631794 Warn when calling gtk_window_parse_geometry() on an empty...
|
||||
631976 Remove GtkWidgetAuxInfo from GtkScrolledWindow
|
||||
632059 Move the introduction of the tutorial in the reference
|
||||
632095 GtkTargetEntry: Add boxed type and constructor
|
||||
632140 optionally take hotspot coordinates from the pixbuf...
|
||||
632218 BadMatch when starting gnome-shell
|
||||
|
||||
* New or updated translations:
|
||||
Catalan
|
||||
Estonian
|
||||
Galician
|
||||
Greek
|
||||
Kazakh
|
||||
Kikongo
|
||||
Lithuanian
|
||||
Punjabi
|
||||
Slovenian
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.90.7 to 2.91.0
|
||||
==============================================
|
||||
|
||||
* The rendering cleanup work has landed. This is a large change that
|
||||
affects many APIs.
|
||||
- All gtkstyle functions have been changed to take a cairo_t argument
|
||||
instead of a window + area.
|
||||
- GdkPixmap is gone. APIs that took pixmaps are being replaced by ones
|
||||
that take pixbufs or cairo surfaces, or regions (where pixmaps were
|
||||
used as masks). In background handling, pixmaps have been replaced
|
||||
by cairo patterns, see gdk_window_set_background_pattern().
|
||||
- GdkColormap is gone. It is replaced by visuals, see
|
||||
gtk_widget_set_visual().
|
||||
- The ::expose-event signal on GtkWidget has been replaced by a
|
||||
::draw signal.
|
||||
- gtk_widget_get_snapshot() has been removed. Instead, gtk_widget_draw()
|
||||
can render a widget onto an cairo_t.
|
||||
|
||||
* The GtkSizeRequest interface has been merged into GtkWidget, and
|
||||
GtkCellSizeRequest has been merged into GtkCellRenderer. The wrapper
|
||||
functions have been renamed to include 'preferred', e.g
|
||||
gtk_size_request_get_width() is now gtk_widget_get_preferred_width()
|
||||
and gtk_cell_size_request_get_width_for_height() is now
|
||||
gtk_cell_renderer_get_preferred_width_for_height().
|
||||
|
||||
* GtkObject has been removed. The ::destroy signal has been moved
|
||||
to GtkWidget. At the same time, GtkWidgetFlags have been removed,
|
||||
they already had getters and setters anyway.
|
||||
|
||||
* GtkWidget has gained generic alignment and padding properties:
|
||||
halign, valign, margin-left, margin-right, margin-top, margin-bottom
|
||||
These can be used instead of container-specific child properties or
|
||||
GtkMisc and GtkAlignment widgets.
|
||||
|
||||
* Container widgets can now let GTK+ handle border-width for them, using
|
||||
gtk_container_class_handle_border_width()
|
||||
|
||||
* The GtkEditableClass struct has been renamed to GtkEditableInterface
|
||||
|
||||
* Mouse wheel scrolling has been removed from GtkNotebook
|
||||
|
||||
* The default policy for scrolled windows has been changed to 'automatic'
|
||||
|
||||
* Global url hooks have been removed from GtkAboutDialog and GtkLinkButton
|
||||
|
||||
* The global window creation hook has been removed from GtkNotebook
|
||||
|
||||
* The error handling in GDK has been modernized and avoids synchronizing
|
||||
X requests as much as possible
|
||||
|
||||
* Fixed Bugs:
|
||||
323904 GtkEditable header is slightly incorrect
|
||||
339745 Return value of gtk_link_button_set_uri_hook not usable
|
||||
468672 GTK_POLICY_AUTOMATIC should be the default policy...
|
||||
486839 Filechooser 'Places' items should not move up and down...
|
||||
601731 Drag and Drop from Workspace to Activities Overview
|
||||
617316 Move documentation to inline comments: GtkEditable
|
||||
621590 Add length to gtk_tree_path_get_indices
|
||||
623664 Missing accessors for gtk_menu_get_position_func{,_data}
|
||||
628829 Chain get_width_for_height default impl to vfunc...
|
||||
629177 Do not use deprecated gtk_widget_get_child_requisition()
|
||||
629277 Hanging because do_syntheszie_crossing_event is called...
|
||||
629387 Use gint16 for GtkBorder
|
||||
629598 Do not use deprecated gtk_widget_size_request()
|
||||
629608 Revamp and modernize X error traps
|
||||
629733 There is a misprint in the description of the gtk_check_...
|
||||
629748 Fails to build without XComposite
|
||||
629785 Do not use deprecated gtk_cell_renderer_get_size()
|
||||
630033 Improve tests for X error traps, fix two bugs
|
||||
630226 Removing tab scrolling from GtkNotebook
|
||||
630520 Don't try to unref event->dnd.context unconditionally...
|
||||
630521 Remove some remaining API warts from tab dnd api
|
||||
630532 invalid drop point in drag-data-received callback
|
||||
|
||||
Updated translations:
|
||||
Catalan
|
||||
Czech
|
||||
Danish
|
||||
Dutch
|
||||
German
|
||||
Gujarati
|
||||
Japanese
|
||||
Simplified Chinese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.90.6 to 2.90.7
|
||||
==============================================
|
||||
|
||||
* Various deprecated APIs have been removed:
|
||||
- the GtkWidget::draw-border style property
|
||||
- the GtkEntry::state-hint style property
|
||||
- the GtkTreeView::row-ending-details style property
|
||||
- the GtkRange::trough-side-details style property
|
||||
- the GtkRange::stepper-position-details style property
|
||||
- the GtkRange::activate-slider style property
|
||||
- the GTK_CALENDAR_WEEK_START_MONDAY option
|
||||
- the GtkFrame::shadow and GtkHandleBox::shadow properties
|
||||
- the GtkTextView::page-horizontally signal
|
||||
- the GDK_WINDOW_DIALOG window type
|
||||
- the GTK_SELECTION_EXTENDED selection mode
|
||||
- the GtkProgressBarOrientation, GtkAnchorType and GtkVisibility
|
||||
enumerations
|
||||
- GtkDialog separators, including the GtkDialog::has-separator
|
||||
property, including setter/getter, the GTK_DIALOG_NO_SEPARATOR
|
||||
flag and the GtkMessageDialog::use-separator style property
|
||||
- gtk_status_icon_set/get_blinking
|
||||
- gdk_window_et_deskrelative_origin
|
||||
- The GtkItem class has been removed. Its functionality has
|
||||
been merged into is sole subclass, GtkMenuItem
|
||||
|
||||
* The GtkIconView::orientation property has been renamed
|
||||
to 'item-orientation'
|
||||
|
||||
* GtkProgressBar and GtkCellRendererProgress implement GtkOrientable
|
||||
now, and their 'orientation' property have been split into
|
||||
a 'orientation' property of type GtkOrientation and a boolean
|
||||
'inverted' property
|
||||
|
||||
* GDK no longer exports variables: gdk_threads_lock, gdk_threads_unlock,
|
||||
gdk_threads_mutex and gdk_display are no longer available
|
||||
|
||||
* GTK no longer exports variables: gtk_major_version, gtk_minor_version,
|
||||
gtk_micro_version, gtk_binary_age, gtk_interface_age have been
|
||||
converted to functions. gtk_debug_flags has a getter and a setter.
|
||||
Misc. variables that had been exported by the semi-private text
|
||||
API have been removed.
|
||||
|
||||
* All GDK keysym names have been changed from GDK_keysym to GDK_KEY_keysym;
|
||||
the previous names are still available in gdkkeysyms-compat.h.
|
||||
|
||||
* GtkWrapBox is a new container, which distributes its children
|
||||
over multiple rows/columns
|
||||
|
||||
* GTK+ now uses standard icon names when looking up stock icons
|
||||
|
||||
* More widgets and cell renderers have been converted to support
|
||||
width-for-height: GtkCellRendererText, GtkAccelLabel, GtkCellView,
|
||||
GtkComboBox, GtkMenu, GtkMenuItem
|
||||
|
||||
* Button boxes are now semi-homogeneous.
|
||||
|
||||
* The directfb backend has been removed
|
||||
|
||||
* Bugs fixed:
|
||||
77669 GtkWrapBox for gtk itself, not gimp?
|
||||
84188 "Dialogue" button widths should not be homogenous
|
||||
414712 gtk_container_set_focus_child leaks widget
|
||||
527499 FileFilter combo becames too wide
|
||||
528257 File selector and stock string problems
|
||||
605186 Use G_DEFINE_INTERFACE macro
|
||||
614006 File chooser crashes when creating a new folder...
|
||||
616401 Noneffective gdk_keymap_map_virtual_modifiers in early use
|
||||
626710 GailScaleButton calculates wrong value for minimum increment
|
||||
627028 Marked state of calendar day is not accessible
|
||||
627139 gtkfilechooserentry shows completion progress tooltip on first show
|
||||
627445 Removal of GtkWidget::draw-border breaks gtk_widget_queue_draw()
|
||||
627580 GtkFontSelection: don't notify the non-existent "font" property
|
||||
627643 gtkaboutdialog gettext problem
|
||||
627828 Drag and drop between treeviews in different window groups broken...
|
||||
627843 set_active_iter doc: remove restriction on path length
|
||||
627867 tests/testsocket is broken
|
||||
627912 misprint in the desc. of "hover-expand" and "hover-selection"...
|
||||
628160 introspection: Update to new scanner API
|
||||
628308 docs referencing non existing icons
|
||||
628656 _gdk_windowing_get_startup_notify_id memory leak
|
||||
628807 Add more "reserved for expansion" fields to GtkWidgetClass
|
||||
628808 Warn if a widget requests minimum size > natural size
|
||||
628884 Use a bitfield for Widget::private_flags, ::state, ::saved_state
|
||||
628935 add gtk_radio_button_join_group method for bindings
|
||||
629110 gtk_spinner_accessible_get_type always returns null
|
||||
|
||||
* Translation updates
|
||||
Arabic
|
||||
Armenian
|
||||
Brazilian Portuguese
|
||||
British English
|
||||
Bulgarian
|
||||
Danish
|
||||
Estonian
|
||||
French
|
||||
Galician
|
||||
Hebrew
|
||||
Hungarian
|
||||
Indonesian
|
||||
Kazakh
|
||||
Norwegian bokmål
|
||||
Norwegian Nynorsk
|
||||
Portuguese
|
||||
Serbian
|
||||
Slovenian
|
||||
Spanish
|
||||
Telugu
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.90.5 to 2.90.6
|
||||
==============================================
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
|
||||
sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
|
||||
-e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
2.2*)
|
||||
2.*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
@@ -110,10 +110,11 @@ rm -rf autom4te.cache
|
||||
# regenerated from their corresponding *.in files by ./configure anyway.
|
||||
touch README INSTALL
|
||||
|
||||
gtkdocize || exit $?
|
||||
|
||||
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
|
||||
|
||||
libtoolize --force || exit $?
|
||||
gtkdocize || exit $?
|
||||
|
||||
autoheader || exit $?
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@@ -107,7 +107,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@@ -137,7 +137,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@@ -208,6 +208,7 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File RelativePath="..\..\..\gdk\win32\rc\gdk.rc" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\GdkPixbuf-2.0"
|
||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
||||
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
|
||||
AdditionalDependencies="gdk_pixbuf-2.0.lib gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
|
||||
AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
|
||||
/>
|
||||
<Tool
|
||||
@@ -31,7 +31,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

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

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

|
||||
echo on

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

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

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

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.exe $(OutDir)\bin

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

|
||||
@@ -108,9 +92,11 @@ copy ..\..\..\gdk\gdkevents.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk
&#
|
||||
copy ..\..\..\gdk\gdkfont.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

|
||||
@@ -239,6 +226,7 @@ copy ..\..\..\gtk\gtkmodules.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
&
|
||||
copy ..\..\..\gtk\gtkmountoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

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

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

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

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

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

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

|
||||
@@ -282,6 +270,7 @@ copy ..\..\..\gtk\gtkshow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
�
|
||||
copy ..\..\..\gtk\gtksignal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

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

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

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

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

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

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

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

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

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

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

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

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

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

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

|
||||
@@ -344,10 +335,6 @@ copy ..\..\..\gdk\gdkconfig.h $(OutDir)\lib\gtk-$(GtkApiVersion)\include
&#
|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGenerateGdkPixbufDef"
|
||||
Value="echo EXPORTS >"$(IntDir)\gdk-pixbuf.def" && cl /EP -DG_OS_WIN32 -DINCLUDE_VARIABLES -DALL_FILES -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= ..\..\..\gdk-pixbuf\gdk-pixbuf.symbols >>"$(IntDir)\gdk-pixbuf.def""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGenerateGdkDef"
|
||||
Value="echo EXPORTS >"$(IntDir)\gdk.def" && cl /EP -DGDK_WINDOWING_WIN32 -DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols >>"$(IntDir)\gdk.def""
|
||||
|
||||
@@ -76,9 +76,10 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
@@ -106,9 +107,10 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
@@ -138,9 +140,10 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
|
||||
129
configure.ac
129
configure.ac
@@ -2,6 +2,14 @@
|
||||
# require autoconf 2.54
|
||||
AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[gtk+])
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Making releases:
|
||||
# GTK_MICRO_VERSION += 1;
|
||||
# GTK_INTERFACE_AGE += 1;
|
||||
@@ -11,8 +19,8 @@ AC_PREREQ([2.62])
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [90])
|
||||
m4_define([gtk_micro_version], [7])
|
||||
m4_define([gtk_minor_version], [91])
|
||||
m4_define([gtk_micro_version], [4])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -31,21 +39,23 @@ m4_define([gtk_api_version], [3.0])
|
||||
m4_define([gtk_binary_version], [3.0.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.25.15])
|
||||
m4_define([glib_required_version], [2.27.3])
|
||||
m4_define([pango_required_version], [1.20])
|
||||
m4_define([atk_required_version], [1.29.2])
|
||||
m4_define([cairo_required_version], [1.9.10])
|
||||
m4_define([cairo_required_version], [1.10.0])
|
||||
m4_define([gdk_pixbuf_required_version], [2.21.0])
|
||||
GLIB_REQUIRED_VERSION=glib_required_version
|
||||
PANGO_REQUIRED_VERSION=pango_required_version
|
||||
ATK_REQUIRED_VERSION=atk_required_version
|
||||
CAIRO_REQUIRED_VERSION=cairo_required_version
|
||||
GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
|
||||
AC_SUBST(GLIB_REQUIRED_VERSION)
|
||||
AC_SUBST(PANGO_REQUIRED_VERSION)
|
||||
AC_SUBST(ATK_REQUIRED_VERSION)
|
||||
AC_SUBST(CAIRO_REQUIRED_VERSION)
|
||||
AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
|
||||
|
||||
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[gtk+])
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
@@ -55,7 +65,7 @@ AM_MAINTAINER_MODE([enable])
|
||||
# Support silent build rules, requires at least automake-1.11. Enable
|
||||
# by either passing --enable-silent-rules to configure or passing V=0
|
||||
# to make
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
#
|
||||
# For each of the libraries we build, we define the following
|
||||
@@ -227,10 +237,6 @@ AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
|
||||
[turn on debugging @<:@default=debug_default@:>@]),,
|
||||
enable_debug=debug_default)
|
||||
AC_ARG_ENABLE(shm,
|
||||
[AC_HELP_STRING([--enable-shm],
|
||||
[support shared memory if available [default=yes]])],,
|
||||
[enable_shm="yes"])
|
||||
AC_ARG_ENABLE(xkb,
|
||||
[AC_HELP_STRING([--enable-xkb],
|
||||
[support XKB [default=maybe]])],,
|
||||
@@ -243,10 +249,6 @@ AC_ARG_ENABLE(rebuilds,
|
||||
[AC_HELP_STRING([--disable-rebuilds],
|
||||
[disable all source autogeneration rules])],,
|
||||
[enable_rebuilds=yes])
|
||||
AC_ARG_ENABLE(visibility,
|
||||
[AC_HELP_STRING([--disable-visibility],
|
||||
[do not use ELF visibility attributes])],,
|
||||
[enable_visibility=yes])
|
||||
|
||||
AC_ARG_WITH(xinput,
|
||||
[AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
|
||||
@@ -284,11 +286,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if test "x$enable_visibility" = "xno"; then
|
||||
GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
|
||||
fi
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
|
||||
[Define if debugging is enabled])
|
||||
|
||||
@@ -365,6 +362,7 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
atk >= atk_required_version dnl
|
||||
pango >= pango_required_version dnl
|
||||
cairo >= cairo_required_version dnl
|
||||
cairo-gobject >= cairo_required_version dnl
|
||||
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
|
||||
|
||||
## In addition to checking that cairo is present, we also need to
|
||||
@@ -486,18 +484,6 @@ if test "$gtk_ok" = "yes"; then
|
||||
[Define if _NL_PAPER_WIDTH is available])
|
||||
fi
|
||||
|
||||
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
|
||||
AC_MSG_CHECKING(for sigsetjmp)
|
||||
AC_TRY_LINK([#include <setjmp.h>], [
|
||||
sigjmp_buf env;
|
||||
sigsetjmp(env, 0);
|
||||
], gtk_ok=yes, gtk_ok=no)
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
if test "$gtk_ok" = "yes"; then
|
||||
AC_DEFINE(HAVE_SIGSETJMP, 1,
|
||||
[Define to 1 if sigsetjmp is available])
|
||||
fi
|
||||
|
||||
# i18n stuff
|
||||
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
@@ -1050,54 +1036,6 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
CFLAGS="$gtk_save_CFLAGS"
|
||||
|
||||
# Xshm checks
|
||||
|
||||
if test "x$enable_shm" = "xyes"; then
|
||||
# Check for the XShm extension, normally in Xext
|
||||
AC_CHECK_FUNC(XShmAttach,
|
||||
:,
|
||||
# On AIX, it is in XextSam instead
|
||||
[AC_CHECK_LIB(XextSam, XShmAttach,
|
||||
[GTK_ADD_LIB(x_extra_libs,XextSam)])])
|
||||
fi
|
||||
|
||||
if test "x$enable_shm" = "xyes"; then
|
||||
# Check for shared memory
|
||||
AC_CHECK_HEADER(sys/ipc.h,
|
||||
AC_DEFINE(HAVE_IPC_H, 1,
|
||||
[Define to 1 if ipc.h is available]),
|
||||
no_sys_ipc=yes)
|
||||
AC_CHECK_HEADER(sys/shm.h,
|
||||
AC_DEFINE(HAVE_SHM_H, 1,
|
||||
[Define to 1 if shm.h is available]),
|
||||
no_sys_shm=yes)
|
||||
|
||||
# Check for the X shared memory extension header file
|
||||
have_xshm=no
|
||||
AC_MSG_CHECKING(X11/extensions/XShm.h)
|
||||
if test "x$no_xext_lib" = "xyes"; then
|
||||
:
|
||||
else
|
||||
gtk_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $x_cflags"
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
|
||||
CFLAGS="$gtk_save_CFLAGS"
|
||||
fi
|
||||
AC_MSG_RESULT($have_xshm)
|
||||
if test $have_xshm = yes ; then
|
||||
AC_DEFINE(HAVE_XSHM_H, 1,
|
||||
[Define to 1 if xshm.h is available])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_xinerama" = "xyes"; then
|
||||
# Check for Xinerama extension (Solaris impl or Xfree impl)
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
@@ -1287,9 +1225,9 @@ LDFLAGS="$saved_ldflags"
|
||||
|
||||
# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend cairo-gobject"
|
||||
else
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend cairo-gobject"
|
||||
fi
|
||||
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
|
||||
@@ -1339,7 +1277,7 @@ else
|
||||
LIBS="$gtk_save_LIBS"
|
||||
fi
|
||||
|
||||
GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0"
|
||||
GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
GTK_PACKAGES="$GTK_PACKAGES pangoft2"
|
||||
fi
|
||||
@@ -1539,11 +1477,17 @@ if test -n "$export_dynamic"; then
|
||||
GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
fi
|
||||
|
||||
#############
|
||||
# GSettings #
|
||||
#############
|
||||
|
||||
GLIB_GSETTINGS
|
||||
|
||||
##################################################
|
||||
# GObject introspection
|
||||
##################################################
|
||||
|
||||
GOBJECT_INTROSPECTION_CHECK([0.9.0])
|
||||
GOBJECT_INTROSPECTION_CHECK([0.9.3])
|
||||
|
||||
##################################################
|
||||
# Checks for gtk-doc and docbook-tools
|
||||
@@ -1696,6 +1640,7 @@ po-properties/Makefile.in
|
||||
demos/Makefile
|
||||
demos/gtk-demo/Makefile
|
||||
demos/gtk-demo/geninclude.pl
|
||||
examples/Makefile
|
||||
tests/Makefile
|
||||
docs/Makefile
|
||||
docs/reference/Makefile
|
||||
@@ -1704,9 +1649,7 @@ docs/reference/gdk/version.xml
|
||||
docs/reference/gtk/Makefile
|
||||
docs/reference/gtk/version.xml
|
||||
docs/reference/libgail-util/Makefile
|
||||
docs/faq/Makefile
|
||||
docs/tools/Makefile
|
||||
docs/tutorial/Makefile
|
||||
build/Makefile
|
||||
build/win32/Makefile
|
||||
build/win32/vs9/Makefile
|
||||
@@ -1746,4 +1689,4 @@ perf/Makefile
|
||||
AC_OUTPUT
|
||||
|
||||
echo "configuration:
|
||||
target: $gdktarget"
|
||||
target: $gdktarget"
|
||||
|
||||
@@ -67,25 +67,6 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate_email (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *text;
|
||||
text = g_strdup_printf ("send mail to %s", link);
|
||||
g_print ("%s\n", text);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_url (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
{
|
||||
g_print ("show url %s\n", link);
|
||||
}
|
||||
|
||||
static void
|
||||
about_cb (GtkAction *action,
|
||||
GtkWidget *window)
|
||||
@@ -120,11 +101,13 @@ about_cb (GtkAction *action,
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
gtk_about_dialog_set_email_hook (activate_email, NULL, NULL);
|
||||
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"program-name", "GTK+ Code Demos",
|
||||
"version", PACKAGE_VERSION,
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
||||
PACKAGE_VERSION,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ()),
|
||||
"copyright", "(C) 1997-2009 The GTK+ Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
@@ -401,23 +384,6 @@ mark_set_callback (GtkTextBuffer *buffer,
|
||||
update_statusbar (buffer, GTK_STATUSBAR (data));
|
||||
}
|
||||
|
||||
static void
|
||||
update_resize_grip (GtkWidget *widget,
|
||||
GdkEventWindowState *event,
|
||||
GtkStatusbar *statusbar)
|
||||
{
|
||||
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN))
|
||||
{
|
||||
gboolean maximized;
|
||||
|
||||
maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN);
|
||||
gtk_statusbar_set_has_resize_grip (statusbar, !maximized);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
do_appwindow (GtkWidget *do_widget)
|
||||
{
|
||||
@@ -586,12 +552,6 @@ do_appwindow (GtkWidget *do_widget)
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
g_signal_connect_object (window,
|
||||
"window_state_event",
|
||||
G_CALLBACK (update_resize_grip),
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ create_page1 (GtkWidget *assistant)
|
||||
GtkWidget *box, *label, *entry;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
box = gtk_hbox_new (FALSE, 12);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
|
||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||
@@ -121,7 +121,7 @@ create_page2 (GtkWidget *assistant)
|
||||
GtkWidget *box, *checkbutton;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
box = gtk_vbox_new (12, FALSE);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
|
||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||
|
||||
@@ -18,9 +18,9 @@ create_bbox (gint horizontal,
|
||||
frame = gtk_frame_new (title);
|
||||
|
||||
if (horizontal)
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
else
|
||||
bbox = gtk_vbutton_box_new ();
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||
@@ -63,13 +63,13 @@ do_button_box (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||
|
||||
@@ -92,7 +92,7 @@ do_button_box (GtkWidget *do_widget)
|
||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||
|
||||
|
||||
@@ -357,7 +357,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
|
||||
*frame = gtk_frame_new (title);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
||||
|
||||
@@ -375,7 +375,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
*button_vbox = gtk_vbox_new (FALSE, 5);
|
||||
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
|
||||
|
||||
if (!info->size_group)
|
||||
@@ -585,7 +585,7 @@ destroy_info (ChangeDisplayInfo *info)
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_cb (GtkObject *object,
|
||||
destroy_cb (GObject *object,
|
||||
ChangeDisplayInfo **info)
|
||||
{
|
||||
destroy_info (*info);
|
||||
@@ -610,7 +610,7 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
|
||||
info->window = gtk_dialog_new_with_buttons ("Change Screen or display",
|
||||
GTK_WINDOW (do_widget),
|
||||
GTK_DIALOG_NO_SEPARATOR,
|
||||
0,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
"Change", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
@@ -624,7 +624,7 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
@@ -219,7 +219,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
@@ -236,7 +236,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
@@ -253,7 +253,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
|
||||
@@ -15,28 +15,16 @@ static GtkWidget *frame;
|
||||
/* Expose callback for the drawing area
|
||||
*/
|
||||
static gboolean
|
||||
expose_event_callback (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
draw_callback (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GtkStyle *style;
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
if (window)
|
||||
{
|
||||
GtkStyle *style;
|
||||
cairo_t *cr;
|
||||
style = gtk_widget_get_style (widget);
|
||||
|
||||
style = gtk_widget_get_style (widget);
|
||||
|
||||
cr = gdk_cairo_create (window);
|
||||
|
||||
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
|
||||
cairo_paint (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -97,7 +85,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -112,8 +100,8 @@ do_colorsel (GtkWidget *do_widget)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
||||
g_signal_connect (da, "expose_event",
|
||||
G_CALLBACK (expose_event_callback), NULL);
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (draw_callback), NULL);
|
||||
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 200, 200);
|
||||
|
||||
@@ -238,12 +238,12 @@ is_capital_sensitive (GtkCellLayout *cell_layout,
|
||||
}
|
||||
|
||||
static void
|
||||
fill_combo_entry (GtkWidget *entry)
|
||||
fill_combo_entry (GtkWidget *combo)
|
||||
{
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "One");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Two");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "2\302\275");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Three");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "One");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Two");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "2\302\275");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Three");
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ struct _MaskEntryClass
|
||||
};
|
||||
|
||||
|
||||
static void mask_entry_editable_init (GtkEditableClass *iface);
|
||||
static void mask_entry_editable_init (GtkEditableInterface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (MaskEntry, mask_entry, GTK_TYPE_ENTRY,
|
||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
|
||||
@@ -316,7 +316,7 @@ mask_entry_class_init (MaskEntryClass *klass)
|
||||
|
||||
|
||||
static void
|
||||
mask_entry_editable_init (GtkEditableClass *iface)
|
||||
mask_entry_editable_init (GtkEditableInterface *iface)
|
||||
{
|
||||
iface->changed = mask_entry_changed;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/* A combobox demonstrating cell renderers, separators and
|
||||
@@ -354,7 +354,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Some stock icons");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
@@ -395,7 +395,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Where are we ?");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
@@ -424,11 +424,11 @@ do_combobox (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Editable");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_entry_new_text ();
|
||||
combo = gtk_combo_box_text_new_with_entry ();
|
||||
fill_combo_entry (combo);
|
||||
gtk_container_add (GTK_CONTAINER (box), combo);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ interactive_dialog_clicked (GtkButton *button,
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE, 0);
|
||||
|
||||
@@ -120,24 +120,25 @@ do_dialog (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Dialogs");
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
/* Standard message dialog */
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
button = gtk_button_new_with_mnemonic ("_Message Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (message_dialog_clicked), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
/* Interactive dialog*/
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
|
||||
@@ -51,19 +51,12 @@ scribble_configure_event (GtkWidget *widget,
|
||||
|
||||
/* Redraw the screen from the surface */
|
||||
static gboolean
|
||||
scribble_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
scribble_draw (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_paint (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -144,45 +137,38 @@ scribble_motion_notify_event (GtkWidget *widget,
|
||||
|
||||
|
||||
static gboolean
|
||||
checkerboard_expose (GtkWidget *da,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
checkerboard_draw (GtkWidget *da,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
gint i, j, xcount, ycount;
|
||||
cairo_t *cr;
|
||||
gint i, j, xcount, ycount, width, height;
|
||||
|
||||
#define CHECK_SIZE 10
|
||||
#define SPACING 2
|
||||
|
||||
/* At the start of an expose handler, a clip region of event->area
|
||||
* is set on the window, and event->area has been cleared to the
|
||||
/* At the start of a draw handler, a clip region has been set on
|
||||
* the Cairo context, and the contents have been cleared to the
|
||||
* widget's background color. The docs for
|
||||
* gdk_window_begin_paint_region() give more details on how this
|
||||
* works.
|
||||
*/
|
||||
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (da));
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_clip (cr);
|
||||
|
||||
gtk_widget_get_allocation (da, &allocation);
|
||||
xcount = 0;
|
||||
width = gtk_widget_get_allocated_width (da);
|
||||
height = gtk_widget_get_allocated_height (da);
|
||||
i = SPACING;
|
||||
while (i < allocation.width)
|
||||
while (i < width)
|
||||
{
|
||||
j = SPACING;
|
||||
ycount = xcount % 2; /* start with even/odd depending on row */
|
||||
while (j < allocation.height)
|
||||
while (j < height)
|
||||
{
|
||||
if (ycount % 2)
|
||||
cairo_set_source_rgb (cr, 0.45777, 0, 0.45777);
|
||||
else
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
|
||||
/* If we're outside event->area, this will do nothing.
|
||||
* It might be mildly more efficient if we handled
|
||||
* the clipping ourselves, but again we're feeling lazy.
|
||||
/* If we're outside the clip, this will do nothing.
|
||||
*/
|
||||
cairo_rectangle (cr, i, j, CHECK_SIZE, CHECK_SIZE);
|
||||
cairo_fill (cr);
|
||||
@@ -195,8 +181,6 @@ checkerboard_expose (GtkWidget *da,
|
||||
++xcount;
|
||||
}
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
/* return TRUE because we've handled this event, so no
|
||||
* further processing is required.
|
||||
*/
|
||||
@@ -209,7 +193,7 @@ close_window (void)
|
||||
window = NULL;
|
||||
|
||||
if (surface)
|
||||
g_object_unref (surface);
|
||||
cairo_surface_destroy (surface);
|
||||
surface = NULL;
|
||||
}
|
||||
|
||||
@@ -232,7 +216,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -255,8 +239,8 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||
|
||||
g_signal_connect (da, "expose-event",
|
||||
G_CALLBACK (checkerboard_expose), NULL);
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (checkerboard_draw), NULL);
|
||||
|
||||
/*
|
||||
* Create the scribble area
|
||||
@@ -279,8 +263,8 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
/* Signals used to handle backing surface */
|
||||
|
||||
g_signal_connect (da, "expose-event",
|
||||
G_CALLBACK (scribble_expose_event), NULL);
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (scribble_draw), NULL);
|
||||
g_signal_connect (da,"configure-event",
|
||||
G_CALLBACK (scribble_configure_event), NULL);
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
@@ -365,7 +365,8 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (sw), treeview);
|
||||
|
||||
/* some buttons */
|
||||
hbox = gtk_hbox_new (TRUE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
|
||||
@@ -34,7 +34,7 @@ do_entry_buffer (GtkWidget *do_widget)
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ do_entry_completion (GtkWidget *do_widget)
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ do_expander (GtkWidget *do_widget)
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
|
||||
@@ -113,8 +113,8 @@ key_press_event (GtkWidget *text_view,
|
||||
|
||||
switch (event->keyval)
|
||||
{
|
||||
case GDK_Return:
|
||||
case GDK_KP_Enter:
|
||||
case GDK_KEY_Return:
|
||||
case GDK_KEY_KP_Enter:
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
|
||||
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
|
||||
gtk_text_buffer_get_insert (buffer));
|
||||
|
||||
@@ -300,7 +300,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
GtkWidget *tool_bar;
|
||||
GtkToolItem *home_button;
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
tool_bar = gtk_toolbar_new ();
|
||||
|
||||
@@ -120,8 +120,8 @@ do_iconview_edit (GtkWidget *do_widget)
|
||||
|
||||
gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (icon_view),
|
||||
GTK_SELECTION_SINGLE);
|
||||
gtk_icon_view_set_orientation (GTK_ICON_VIEW (icon_view),
|
||||
GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_icon_view_set_item_orientation (GTK_ICON_VIEW (icon_view),
|
||||
GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_icon_view_set_columns (GTK_ICON_VIEW (icon_view), 2);
|
||||
gtk_icon_view_set_reorderable (GTK_ICON_VIEW (icon_view), TRUE);
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ start_progressive_loading (GtkWidget *image)
|
||||
}
|
||||
|
||||
static void
|
||||
cleanup_callback (GtkObject *object,
|
||||
cleanup_callback (GObject *object,
|
||||
gpointer data)
|
||||
{
|
||||
if (load_timeout)
|
||||
@@ -335,7 +335,7 @@ do_images (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ do_infobar (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
@@ -81,7 +81,7 @@ do_infobar (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 8);
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 8);
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||
|
||||
@@ -223,7 +223,6 @@ static gchar *types[] =
|
||||
"FALSE",
|
||||
"TRUE",
|
||||
"FILE ",
|
||||
"GtkObject ",
|
||||
"GtkColorSelection ",
|
||||
"GtkWidget ",
|
||||
"GtkButton ",
|
||||
@@ -279,7 +278,7 @@ static gchar *types[] =
|
||||
"GtkTreeStore ",
|
||||
"GtkEntry ",
|
||||
"GtkEditable ",
|
||||
"GtkEditableClass ",
|
||||
"GtkEditableInterface ",
|
||||
"GdkPixmap ",
|
||||
"GdkEventConfigure ",
|
||||
"GdkEventMotion ",
|
||||
@@ -955,7 +954,7 @@ main (int argc, char **argv)
|
||||
g_signal_connect_after (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
tree = create_tree ();
|
||||
|
||||
@@ -14,15 +14,15 @@ PERL = perl
|
||||
################################################################
|
||||
|
||||
# Possibly override versions from build/win32/module.defs
|
||||
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
|
||||
GDK_PIXBUF_VER = @GDK_PIXBUF_MAJOR@.@GDK_PIXBUF_MINOR@
|
||||
GTK_VER = 2.0
|
||||
GDK_PIXBUF_VER = 2.0
|
||||
|
||||
GDK_LIBS = ../../gdk/gdk-win32-$(GTK_VER).lib
|
||||
GTK_LIBS = ../../gtk/gtk-win32-$(GTK_VER).lib
|
||||
GDK_PIXBUF_LIBS = ../../gdk-pixbuf/gdk_pixbuf-$(GDK_PIXBUF_VER).lib
|
||||
|
||||
INCLUDES = -FImsvc_recommended_pragmas.h -I . -I ../.. -I ../../gdk -I ../../gdk-pixbuf -I ../../gtk
|
||||
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) $(ATK_CFLAGS)
|
||||
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) $(ATK_CFLAGS) $(CAIRO_CFLAGS)
|
||||
LDFLAGS = /link /machine:ix86 $(LINKDEBUG)
|
||||
DEFINES = -DG_LOG_DOMAIN=\"GtkDemo\" -DGTK_VERSION=\"$(GTK_VER)\" \
|
||||
-DDEMOCODEDIR=\".\"
|
||||
@@ -90,5 +90,6 @@ OBJECTS = \
|
||||
main.obj \
|
||||
|
||||
gtk-demo.exe : demos.h $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -Fegtk-demo.exe $(OBJECTS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -Fegtk-demo.exe $(OBJECTS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) \
|
||||
$(CAIRO_LIBS) $(PANGOCAIRO_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
|
||||
|
||||
|
||||
@@ -146,11 +146,11 @@ do_menus (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
box = gtk_hbox_new (FALSE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_show (box);
|
||||
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), box1);
|
||||
gtk_widget_show (box1);
|
||||
|
||||
@@ -176,7 +176,7 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
@@ -45,8 +45,8 @@ static void gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *offscreen);
|
||||
static gboolean gtk_rotated_bin_draw (GtkWidget *widget,
|
||||
cairo_t *cr);
|
||||
|
||||
static void gtk_rotated_bin_add (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
@@ -150,7 +150,7 @@ gtk_rotated_bin_class_init (GtkRotatedBinClass *klass)
|
||||
widget_class->unrealize = gtk_rotated_bin_unrealize;
|
||||
widget_class->size_request = gtk_rotated_bin_size_request;
|
||||
widget_class->size_allocate = gtk_rotated_bin_size_allocate;
|
||||
widget_class->expose_event = gtk_rotated_bin_expose;
|
||||
widget_class->draw = gtk_rotated_bin_draw;
|
||||
|
||||
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
|
||||
GTK_TYPE_ROTATED_BIN,
|
||||
@@ -252,10 +252,9 @@ gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
| GDK_LEAVE_NOTIFY_MASK;
|
||||
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
|
||||
|
||||
window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
@@ -392,7 +391,8 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
child_requisition.height = 0;
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
gtk_widget_get_preferred_size ( (bin->child),
|
||||
&child_requisition, NULL);
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
@@ -434,7 +434,8 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
|
||||
gtk_widget_get_child_requisition (bin->child, &child_requisition);
|
||||
gtk_widget_get_preferred_size (bin->child,
|
||||
&child_requisition, NULL);
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.height = child_requisition.height;
|
||||
@@ -469,65 +470,60 @@ gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
gtk_rotated_bin_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
GdkWindow *window;
|
||||
gint width, height;
|
||||
gdouble s, c;
|
||||
gdouble w, h;
|
||||
|
||||
if (gtk_widget_is_drawable (widget))
|
||||
window = gtk_widget_get_window (widget);
|
||||
if (gtk_cairo_should_draw_window (cr, window))
|
||||
{
|
||||
window = gtk_widget_get_window (widget);
|
||||
if (event->window == window)
|
||||
cairo_surface_t *surface;
|
||||
GtkAllocation child_area;
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
GtkAllocation child_area;
|
||||
cairo_t *cr;
|
||||
surface = gdk_offscreen_window_get_surface (bin->offscreen_window);
|
||||
gtk_widget_get_allocation (bin->child, &child_area);
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
gtk_widget_get_allocation (bin->child, &child_area);
|
||||
/* transform */
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
|
||||
cr = gdk_cairo_create (window);
|
||||
cairo_translate (cr, (w - child_area.width) / 2, (h - child_area.height) / 2);
|
||||
cairo_translate (cr, child_area.width / 2, child_area.height / 2);
|
||||
cairo_rotate (cr, bin->angle);
|
||||
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
|
||||
|
||||
/* transform */
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
|
||||
cairo_translate (cr, (w - child_area.width) / 2, (h - child_area.height) / 2);
|
||||
cairo_translate (cr, child_area.width / 2, child_area.height / 2);
|
||||
cairo_rotate (cr, bin->angle);
|
||||
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
|
||||
|
||||
/* clip */
|
||||
gdk_drawable_get_size (pixmap, &width, &height);
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_clip (cr);
|
||||
/* paint */
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
/* clip */
|
||||
cairo_rectangle (cr,
|
||||
0, 0,
|
||||
gdk_window_get_width (bin->offscreen_window),
|
||||
gdk_window_get_height (bin->offscreen_window));
|
||||
cairo_clip (cr);
|
||||
/* paint */
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
}
|
||||
else if (event->window == bin->offscreen_window)
|
||||
{
|
||||
gtk_paint_flat_box (gtk_widget_get_style (widget), event->window,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
&event->area, widget, "blah",
|
||||
0, 0, -1, -1);
|
||||
}
|
||||
if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
|
||||
{
|
||||
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
widget, "blah",
|
||||
0, 0,
|
||||
gdk_window_get_width (bin->offscreen_window),
|
||||
gdk_window_get_height (bin->offscreen_window));
|
||||
|
||||
if (bin->child)
|
||||
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
event);
|
||||
}
|
||||
if (bin->child)
|
||||
gtk_container_propagate_draw (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
cr);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -564,8 +560,9 @@ do_offscreen_window (GtkWidget *do_widget)
|
||||
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &black);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_vbox_new (0, FALSE);
|
||||
scale = gtk_hscale_new_with_range (0, G_PI/2, 0.01);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,
|
||||
0, G_PI/2, 0.01);
|
||||
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
|
||||
|
||||
button = gtk_button_new_with_label ("A Button");
|
||||
|
||||
@@ -41,8 +41,8 @@ static void gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *offscreen);
|
||||
static gboolean gtk_mirror_bin_draw (GtkWidget *widget,
|
||||
cairo_t *cr);
|
||||
|
||||
static void gtk_mirror_bin_add (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
@@ -88,7 +88,7 @@ gtk_mirror_bin_class_init (GtkMirrorBinClass *klass)
|
||||
widget_class->unrealize = gtk_mirror_bin_unrealize;
|
||||
widget_class->size_request = gtk_mirror_bin_size_request;
|
||||
widget_class->size_allocate = gtk_mirror_bin_size_allocate;
|
||||
widget_class->expose_event = gtk_mirror_bin_expose;
|
||||
widget_class->draw = gtk_mirror_bin_draw;
|
||||
|
||||
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
|
||||
GTK_TYPE_MIRROR_BIN,
|
||||
@@ -190,10 +190,9 @@ gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
| GDK_LEAVE_NOTIFY_MASK;
|
||||
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
|
||||
|
||||
window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
@@ -316,7 +315,8 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
child_requisition.height = 0;
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
gtk_widget_get_preferred_size ( (bin->child),
|
||||
&child_requisition, NULL);
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
requisition->width = border_width * 2 + child_requisition.width + 10;
|
||||
@@ -349,7 +349,8 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkRequisition child_requisition;
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
gtk_widget_get_child_requisition (bin->child, &child_requisition);
|
||||
gtk_widget_get_preferred_size (bin->child,
|
||||
&child_requisition, NULL);
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.height = child_requisition.height;
|
||||
@@ -375,78 +376,63 @@ gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
gtk_mirror_bin_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GdkWindow *window;
|
||||
gint width, height;
|
||||
|
||||
if (gtk_widget_is_drawable (widget))
|
||||
window = gtk_widget_get_window (widget);
|
||||
if (gtk_cairo_should_draw_window (cr, window))
|
||||
{
|
||||
window = gtk_widget_get_window (widget);
|
||||
if (event->window == window)
|
||||
cairo_surface_t *surface;
|
||||
cairo_matrix_t matrix;
|
||||
cairo_pattern_t *mask;
|
||||
int height;
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
cairo_t *cr;
|
||||
cairo_matrix_t matrix;
|
||||
cairo_pattern_t *mask;
|
||||
surface = gdk_offscreen_window_get_surface (bin->offscreen_window);
|
||||
height = gdk_window_get_height (bin->offscreen_window);
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
gdk_drawable_get_size (pixmap, &width, &height);
|
||||
/* paint the offscreen child */
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cr = gdk_cairo_create (window);
|
||||
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
|
||||
cairo_matrix_scale (&matrix, 1.0, -1.0);
|
||||
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
|
||||
cairo_transform (cr, &matrix);
|
||||
|
||||
cairo_save (cr);
|
||||
cairo_set_source_surface (cr, surface, 0, height);
|
||||
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_clip (cr);
|
||||
/* create linear gradient as mask-pattern to fade out the source */
|
||||
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
/* paint the offscreen child */
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
|
||||
cairo_paint (cr);
|
||||
/* paint the reflection */
|
||||
cairo_mask (cr, mask);
|
||||
|
||||
cairo_restore (cr);
|
||||
|
||||
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
|
||||
cairo_matrix_scale (&matrix, 1.0, -1.0);
|
||||
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
|
||||
cairo_transform (cr, &matrix);
|
||||
|
||||
cairo_rectangle (cr, 0, height, width, height);
|
||||
cairo_clip (cr);
|
||||
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, height);
|
||||
|
||||
/* create linear gradient as mask-pattern to fade out the source */
|
||||
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
/* paint the reflection */
|
||||
cairo_mask (cr, mask);
|
||||
|
||||
cairo_pattern_destroy (mask);
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
cairo_pattern_destroy (mask);
|
||||
}
|
||||
else if (event->window == bin->offscreen_window)
|
||||
{
|
||||
gtk_paint_flat_box (gtk_widget_get_style (widget), event->window,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
&event->area, widget, "blah",
|
||||
0, 0, -1, -1);
|
||||
}
|
||||
else if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
|
||||
{
|
||||
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
widget, "blah",
|
||||
0, 0,
|
||||
gdk_window_get_width (bin->offscreen_window),
|
||||
gdk_window_get_height (bin->offscreen_window));
|
||||
|
||||
if (bin->child)
|
||||
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
event);
|
||||
}
|
||||
if (bin->child)
|
||||
gtk_container_propagate_draw (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
cr);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -475,13 +461,13 @@ do_offscreen_window2 (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_vbox_new (0, FALSE);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
bin = gtk_mirror_bin_new ();
|
||||
|
||||
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
backbutton = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (backbutton),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_BACK, 4));
|
||||
|
||||
@@ -153,14 +153,14 @@ do_panes (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Panes");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
vpaned = gtk_vpaned_new ();
|
||||
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
|
||||
hpaned = gtk_hpaned_new ();
|
||||
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
|
||||
@@ -96,19 +96,12 @@ load_pixbufs (GError **error)
|
||||
|
||||
/* Expose callback for the drawing area */
|
||||
static gint
|
||||
expose_cb (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
draw_cb (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
|
||||
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_paint (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -193,7 +186,7 @@ timeout (gpointer data)
|
||||
static guint timeout_id;
|
||||
|
||||
static void
|
||||
cleanup_callback (GtkObject *object,
|
||||
cleanup_callback (GObject *object,
|
||||
gpointer data)
|
||||
{
|
||||
g_source_remove (timeout_id);
|
||||
@@ -246,8 +239,8 @@ do_pixbufs (GtkWidget *do_widget)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
||||
g_signal_connect (da, "expose-event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), da);
|
||||
|
||||
|
||||
@@ -91,39 +91,32 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
rotated_text_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
rotated_text_draw (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
{
|
||||
#define RADIUS 150
|
||||
#define N_WORDS 5
|
||||
#define FONT "Serif 18"
|
||||
|
||||
GtkAllocation allocation;
|
||||
|
||||
PangoContext *context;
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
cairo_t *cr;
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
PangoAttrList *attrs;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
double device_radius;
|
||||
int width, height;
|
||||
int i;
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
width = allocation.width;
|
||||
height = allocation.height;
|
||||
|
||||
/* Create a cairo context and set up a transformation matrix so that the user
|
||||
* space coordinates for the centered square where we draw are [-RADIUS, RADIUS],
|
||||
* [-RADIUS, RADIUS].
|
||||
* We first center, then change the scale. */
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
device_radius = MIN (width, height) / 2.;
|
||||
cairo_translate (cr,
|
||||
device_radius + (width - 2 * device_radius) / 2,
|
||||
@@ -173,7 +166,6 @@ rotated_text_expose_event (GtkWidget *widget,
|
||||
g_object_unref (layout);
|
||||
g_object_unref (context);
|
||||
cairo_pattern_destroy (pattern);
|
||||
cairo_destroy (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -198,7 +190,8 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 4 * RADIUS, 2 * RADIUS);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
box = gtk_hbox_new (TRUE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
/* Add a drawing area */
|
||||
@@ -209,8 +202,8 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
/* This overrides the background color from the theme */
|
||||
gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &white);
|
||||
|
||||
g_signal_connect (drawing_area, "expose-event",
|
||||
G_CALLBACK (rotated_text_expose_event), NULL);
|
||||
g_signal_connect (drawing_area, "draw",
|
||||
G_CALLBACK (rotated_text_draw), NULL);
|
||||
|
||||
/* And a label */
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ do_search_entry (GtkWidget *do_widget)
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
@@ -274,7 +274,7 @@ do_search_entry (GtkWidget *do_widget)
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 10);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ create_combo_box (const char **strings)
|
||||
GtkWidget *combo_box;
|
||||
const char **str;
|
||||
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
combo_box = gtk_combo_box_text_new ();
|
||||
|
||||
for (str = strings; *str; str++)
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), *str);
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), *str);
|
||||
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
|
||||
|
||||
@@ -118,7 +118,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
|
||||
@@ -50,12 +50,12 @@ do_spinner (GtkWidget *do_widget)
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
/* Sensitive */
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
spinner = gtk_spinner_new ();
|
||||
gtk_container_add (GTK_CONTAINER (hbox), spinner);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());
|
||||
@@ -63,7 +63,7 @@ do_spinner (GtkWidget *do_widget)
|
||||
spinner_sensitive = spinner;
|
||||
|
||||
/* Disabled */
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
spinner = gtk_spinner_new ();
|
||||
gtk_container_add (GTK_CONTAINER (hbox), spinner);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());
|
||||
|
||||
@@ -417,7 +417,7 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
@@ -486,7 +486,7 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Selected Item");
|
||||
gtk_container_add (GTK_CONTAINER (align), frame);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
|
||||
@@ -184,7 +184,8 @@ do_textscroll (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
|
||||
hbox = gtk_hbox_new (TRUE, 6);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
create_text_view (hbox, TRUE);
|
||||
|
||||
@@ -30,99 +30,99 @@ create_tags (GtkTextBuffer *buffer)
|
||||
* new copies of the same tags for every buffer.
|
||||
*
|
||||
* Tags are assigned default priorities in order of addition to the
|
||||
* tag table. That is, tags created later that affect the same text
|
||||
* tag table. That is, tags created later that affect the same text
|
||||
* property affected by an earlier tag will override the earlier
|
||||
* tag. You can modify tag priorities with
|
||||
* gtk_text_tag_set_priority().
|
||||
*/
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "heading",
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"size", 15 * PANGO_SCALE,
|
||||
NULL);
|
||||
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"size", 15 * PANGO_SCALE,
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "italic",
|
||||
"style", PANGO_STYLE_ITALIC, NULL);
|
||||
"style", PANGO_STYLE_ITALIC, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "bold",
|
||||
"weight", PANGO_WEIGHT_BOLD, NULL);
|
||||
|
||||
"weight", PANGO_WEIGHT_BOLD, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big",
|
||||
/* points times the PANGO_SCALE factor */
|
||||
"size", 20 * PANGO_SCALE, NULL);
|
||||
/* points times the PANGO_SCALE factor */
|
||||
"size", 20 * PANGO_SCALE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "xx-small",
|
||||
"scale", PANGO_SCALE_XX_SMALL, NULL);
|
||||
"scale", PANGO_SCALE_XX_SMALL, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "x-large",
|
||||
"scale", PANGO_SCALE_X_LARGE, NULL);
|
||||
|
||||
"scale", PANGO_SCALE_X_LARGE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "monospace",
|
||||
"family", "monospace", NULL);
|
||||
|
||||
"family", "monospace", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "blue_foreground",
|
||||
"foreground", "blue", NULL);
|
||||
"foreground", "blue", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "red_background",
|
||||
"background", "red", NULL);
|
||||
"background", "red", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
|
||||
"pixels_above_lines", 30, NULL);
|
||||
"pixels_above_lines", 30, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_after_line",
|
||||
"pixels_below_lines", 30, NULL);
|
||||
"pixels_below_lines", 30, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "double_spaced_line",
|
||||
"pixels_inside_wrap", 10, NULL);
|
||||
"pixels_inside_wrap", 10, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "not_editable",
|
||||
"editable", FALSE, NULL);
|
||||
|
||||
"editable", FALSE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "word_wrap",
|
||||
"wrap_mode", GTK_WRAP_WORD, NULL);
|
||||
"wrap_mode", GTK_WRAP_WORD, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "char_wrap",
|
||||
"wrap_mode", GTK_WRAP_CHAR, NULL);
|
||||
"wrap_mode", GTK_WRAP_CHAR, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "no_wrap",
|
||||
"wrap_mode", GTK_WRAP_NONE, NULL);
|
||||
|
||||
"wrap_mode", GTK_WRAP_NONE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "center",
|
||||
"justification", GTK_JUSTIFY_CENTER, NULL);
|
||||
"justification", GTK_JUSTIFY_CENTER, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "right_justify",
|
||||
"justification", GTK_JUSTIFY_RIGHT, NULL);
|
||||
"justification", GTK_JUSTIFY_RIGHT, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "wide_margins",
|
||||
"left_margin", 50, "right_margin", 50,
|
||||
NULL);
|
||||
|
||||
"left_margin", 50, "right_margin", 50,
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "strikethrough",
|
||||
"strikethrough", TRUE, NULL);
|
||||
|
||||
"strikethrough", TRUE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "underline",
|
||||
"underline", PANGO_UNDERLINE_SINGLE, NULL);
|
||||
"underline", PANGO_UNDERLINE_SINGLE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "double_underline",
|
||||
"underline", PANGO_UNDERLINE_DOUBLE, NULL);
|
||||
"underline", PANGO_UNDERLINE_DOUBLE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "superscript",
|
||||
"rise", 10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
"rise", 10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "subscript",
|
||||
"rise", -10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
"rise", -10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "rtl_quote",
|
||||
"wrap_mode", GTK_WRAP_WORD,
|
||||
"direction", GTK_TEXT_DIR_RTL,
|
||||
"indent", 30,
|
||||
"left_margin", 20,
|
||||
"right_margin", 20,
|
||||
NULL);
|
||||
"wrap_mode", GTK_WRAP_WORD,
|
||||
"direction", GTK_TEXT_DIR_RTL,
|
||||
"indent", 30,
|
||||
"left_margin", 20,
|
||||
"right_margin", 20,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -156,90 +156,99 @@ insert_text (GtkTextBuffer *buffer)
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = scaled;
|
||||
|
||||
|
||||
/* get start of buffer; each insertion will revalidate the
|
||||
* iterator to point to just after the inserted text.
|
||||
*/
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "The text widget can display text with all kinds of nifty attributes. It also supports multiple views of the same buffer; this demo is showing the same buffer in two places.\n\n", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"The text widget can display text with all kinds of nifty attributes. "
|
||||
"It also supports multiple views of the same buffer; this demo is "
|
||||
"showing the same buffer in two places.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Font styles. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Font styles. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "For example, you can have ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"italic", -1,
|
||||
"italic", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
"italic", -1,
|
||||
"italic", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"bold", -1,
|
||||
"bold", NULL);
|
||||
"bold", -1,
|
||||
"bold", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"monospace (typewriter)", -1,
|
||||
"monospace", NULL);
|
||||
"monospace (typewriter)", -1,
|
||||
"monospace", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"big", -1,
|
||||
"big", NULL);
|
||||
"big", -1,
|
||||
"big", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " text. ", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, "It's best not to hardcode specific text sizes; you can use relative sizes as with CSS, such as ", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"It's best not to hardcode specific text sizes; you can use relative "
|
||||
"sizes as with CSS, such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"xx-small", -1,
|
||||
"xx-small", NULL);
|
||||
"xx-small", -1,
|
||||
"xx-small", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"x-large", -1,
|
||||
"x-large", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " to ensure that your program properly adapts if the user changes the default font size.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Colors. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Colors such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground", -1,
|
||||
"blue_foreground", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a red background", -1,
|
||||
"red_background", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground on red background", -1,
|
||||
"blue_foreground",
|
||||
"red_background",
|
||||
NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
|
||||
"x-large", -1,
|
||||
"x-large", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
" to ensure that your program properly adapts if the user changes the "
|
||||
"default font size.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Underline, strikethrough, and rise. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Colors. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Colors such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Strikethrough", -1,
|
||||
"strikethrough", NULL);
|
||||
"a blue foreground", -1,
|
||||
"blue_foreground", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a red background", -1,
|
||||
"red_background", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground on red background", -1,
|
||||
"blue_foreground",
|
||||
"red_background",
|
||||
NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Underline, strikethrough, and rise. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Strikethrough", -1,
|
||||
"strikethrough", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"underline", -1,
|
||||
"underline", NULL);
|
||||
"underline", -1,
|
||||
"underline", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"double underline", -1,
|
||||
"double_underline", NULL);
|
||||
"double underline", -1,
|
||||
"double_underline", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"superscript", -1,
|
||||
"superscript", NULL);
|
||||
"superscript", -1,
|
||||
"superscript", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", and ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"subscript", -1,
|
||||
"subscript", NULL);
|
||||
"subscript", -1,
|
||||
"subscript", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " are all supported.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Images. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "The buffer can have images in it: ", -1);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
@@ -247,70 +256,126 @@ insert_text (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_insert (buffer, &iter, " for example.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Spacing. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "You can adjust the amount of space before each line.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has a whole lot of space before it.\n", -1,
|
||||
"big_gap_before_line", "wide_margins", NULL);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space after each line; this line has a whole lot of space after it.\n", -1,
|
||||
"big_gap_after_line", "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space between wrapped lines; this line has extra space between each wrapped line in the same paragraph. To show off wrapping, some filler text: the quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah blah blah.\n", -1,
|
||||
"double_spaced_line", "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Also note that those lines have extra-wide margins.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Editability. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line is 'locked down' and can't be edited by the user - just try it! You can't delete this line.\n\n", -1,
|
||||
"not_editable", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Wrapping. ", -1,
|
||||
"heading", NULL);
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"This line (and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has character-based wrapping, and can wrap between any two character glyphs. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", -1,
|
||||
"char_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has all wrapping turned off, so it makes the horizontal scrollbar appear.\n\n\n", -1,
|
||||
"no_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Justification. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has center justification.\n", -1,
|
||||
"center", NULL);
|
||||
"You can adjust the amount of space before each line.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has right justification.\n", -1,
|
||||
"right_justify", NULL);
|
||||
"This line has a whole lot of space before it.\n", -1,
|
||||
"big_gap_before_line", "wide_margins", NULL);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space after each line; "
|
||||
"this line has a whole lot of space after it.\n", -1,
|
||||
"big_gap_after_line", "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has big wide margins. Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.\n", -1,
|
||||
"wide_margins", NULL);
|
||||
"You can also adjust the amount of space between wrapped lines; "
|
||||
"this line has extra space between each wrapped line in the same "
|
||||
"paragraph. To show off wrapping, some filler text: the quick "
|
||||
"brown fox jumped over the lazy dog. Blah blah blah blah blah "
|
||||
"blah blah blah blah.\n", -1,
|
||||
"double_spaced_line", "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Internationalization. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew \327\251\327\234\327\225\327\235\nJapanese (\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n", -1);
|
||||
"Also note that those lines have extra-wide margins.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Here's a word-wrapped quote in a right-to-left language:\n", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "\331\210\331\202\330\257 \330\250\330\257\330\243 \330\253\331\204\330\247\330\253 \331\205\331\206 \330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \330\252\331\202\330\257\331\205\330\247 \331\201\331\212 \330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 \330\250\330\261\330\247\331\205\330\254\331\207\330\247 \331\203\331\205\331\206\330\270\331\205\330\247\330\252 \331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 \330\253\331\205 \330\252\330\255\331\210\331\204\330\252 \331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 \330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 \330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 \331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 \331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 \331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 \330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 \330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 \331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 \331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 \330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 \330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 \330\243\331\203\330\253\330\261 \331\207\330\260\331\207 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \331\206\330\254\330\247\330\255\330\247 \331\207\331\210 \302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 \331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
|
||||
"rtl_quote", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "You can put widgets in the buffer: Here's a button: ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Editability. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line is 'locked down' and can't be edited by the user - just "
|
||||
"try it! You can't delete this line.\n\n", -1,
|
||||
"not_editable", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Wrapping. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"This line (and most of the others in this buffer) is word-wrapped, "
|
||||
"using the proper Unicode algorithm. Word wrap should work in all "
|
||||
"scripts and languages that GTK+ supports. Let's make this a long "
|
||||
"paragraph to demonstrate: blah blah blah blah blah blah blah blah "
|
||||
"blah blah blah blah blah blah blah blah blah blah blah\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has character-based wrapping, and can wrap between any two "
|
||||
"character glyphs. Let's make this a long paragraph to demonstrate: "
|
||||
"blah blah blah blah blah blah blah blah blah blah blah blah blah blah "
|
||||
"blah blah blah blah blah\n\n", -1, "char_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has all wrapping turned off, so it makes the horizontal "
|
||||
"scrollbar appear.\n\n\n", -1, "no_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Justification. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has center justification.\n", -1,
|
||||
"center", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has right justification.\n", -1,
|
||||
"right_justify", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has big wide margins. Text text text text text text text "
|
||||
"text text text text text text text text text text text text text text "
|
||||
"text text text text text text text text text text text text text text "
|
||||
"text.\n", -1, "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Internationalization. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can put all sorts of Unicode text in the buffer.\n\nGerman "
|
||||
"(Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek "
|
||||
"(\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) "
|
||||
"\316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew "
|
||||
"\327\251\327\234\327\225\327\235\nJapanese "
|
||||
"(\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles "
|
||||
"bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, "
|
||||
"grapheme boundaries, and so on using the Pango internationalization "
|
||||
"framework.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Here's a word-wrapped quote in a right-to-left language:\n", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\331\210\331\202\330\257 \330\250\330\257\330\243 "
|
||||
"\330\253\331\204\330\247\330\253 \331\205\331\206 "
|
||||
"\330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\330\252\331\202\330\257\331\205\330\247 \331\201\331\212 "
|
||||
"\330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 "
|
||||
"\330\250\330\261\330\247\331\205\330\254\331\207\330\247 "
|
||||
"\331\203\331\205\331\206\330\270\331\205\330\247\330\252 "
|
||||
"\331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 "
|
||||
"\330\253\331\205 \330\252\330\255\331\210\331\204\330\252 "
|
||||
"\331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 "
|
||||
"\330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 "
|
||||
"\330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 "
|
||||
"\331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 "
|
||||
"\331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 "
|
||||
"\330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 "
|
||||
"\330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 "
|
||||
"\331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 "
|
||||
"\331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 "
|
||||
"\330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 "
|
||||
"\330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 "
|
||||
"\330\243\331\203\330\253\330\261 \331\207\330\260\331\207 "
|
||||
"\330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\331\206\330\254\330\247\330\255\330\247 \331\207\331\210 "
|
||||
"\302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 "
|
||||
"\331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
|
||||
"rtl_quote", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can put widgets in the buffer: Here's a button: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter, " and a menu: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
@@ -321,8 +386,12 @@ insert_text (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_insert (buffer, &iter, " finally a text entry: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter, ".\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text, tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; "
|
||||
"it leaves out, for example: invisible/hidden text, tab stops, "
|
||||
"application-drawn areas on the sides of the widget for displaying "
|
||||
"breakpoints and such...", -1);
|
||||
|
||||
/* Apply word_wrap tag to whole buffer */
|
||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||
@@ -348,7 +417,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
GtkTextIter iter;
|
||||
GtkTextBuffer *buffer;
|
||||
int i;
|
||||
|
||||
|
||||
buffer = gtk_text_view_get_buffer (text_view);
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
@@ -358,7 +427,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
{
|
||||
GtkTextChildAnchor *anchor;
|
||||
GtkWidget *widget;
|
||||
|
||||
|
||||
anchor = gtk_text_iter_get_child_anchor (&iter);
|
||||
|
||||
if (i == 0)
|
||||
@@ -371,23 +440,23 @@ attach_widgets (GtkTextView *text_view)
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
widget = gtk_combo_box_new_text ();
|
||||
widget = gtk_combo_box_text_new ();
|
||||
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 1");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 2");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 3");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 1");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 2");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 3");
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
widget = gtk_hscale_new (NULL);
|
||||
widget = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, NULL);
|
||||
gtk_range_set_range (GTK_RANGE (widget), 0, 100);
|
||||
gtk_widget_set_size_request (widget, 70, -1);
|
||||
}
|
||||
else if (i == 3)
|
||||
{
|
||||
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
|
||||
widget = gtk_image_new_from_file (filename);
|
||||
g_free (filename);
|
||||
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
|
||||
widget = gtk_image_new_from_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
else if (i == 4)
|
||||
{
|
||||
@@ -421,20 +490,20 @@ do_textview (GtkWidget *do_widget)
|
||||
GtkWidget *view2;
|
||||
GtkWidget *sw;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
|
||||
450, 450);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "TextView");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
vpaned = gtk_vpaned_new ();
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vpaned);
|
||||
|
||||
@@ -446,19 +515,19 @@ do_textview (GtkWidget *do_widget)
|
||||
view1 = gtk_text_view_new ();
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view1));
|
||||
view2 = gtk_text_view_new_with_buffer (buffer);
|
||||
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), sw);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), view1);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_paned_add2 (GTK_PANED (vpaned), sw);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), view2);
|
||||
@@ -468,7 +537,7 @@ do_textview (GtkWidget *do_widget)
|
||||
|
||||
attach_widgets (GTK_TEXT_VIEW (view1));
|
||||
attach_widgets (GTK_TEXT_VIEW (view2));
|
||||
|
||||
|
||||
gtk_widget_show_all (vpaned);
|
||||
}
|
||||
|
||||
@@ -494,10 +563,10 @@ recursive_attach_view (int depth,
|
||||
GtkWidget *event_box;
|
||||
GdkColor color;
|
||||
GtkWidget *align;
|
||||
|
||||
|
||||
if (depth > 4)
|
||||
return;
|
||||
|
||||
|
||||
child_view = gtk_text_view_new_with_buffer (gtk_text_view_get_buffer (view));
|
||||
|
||||
/* Event box is to add a black border around each child view */
|
||||
@@ -507,10 +576,10 @@ recursive_attach_view (int depth,
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (align), 1);
|
||||
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (event_box), align);
|
||||
gtk_container_add (GTK_CONTAINER (align), child_view);
|
||||
|
||||
|
||||
gtk_text_view_add_child_at_anchor (view, event_box, anchor);
|
||||
|
||||
recursive_attach_view (depth + 1, GTK_TEXT_VIEW (child_view), anchor);
|
||||
@@ -533,21 +602,21 @@ easter_egg_callback (GtkWidget *button,
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
buffer = gtk_text_buffer_new (NULL);
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"This buffer is shared by a set of nested text views.\n Nested view:\n", -1);
|
||||
"This buffer is shared by a set of nested text views.\n Nested view:\n", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"\nDon't do this in real applications, please.\n", -1);
|
||||
|
||||
view = gtk_text_view_new_with_buffer (buffer);
|
||||
|
||||
|
||||
recursive_attach_view (0, GTK_TEXT_VIEW (view), anchor);
|
||||
|
||||
|
||||
g_object_unref (buffer);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
@@ -563,7 +632,7 @@ easter_egg_callback (GtkWidget *button,
|
||||
g_object_add_weak_pointer (G_OBJECT (window), window_ptr);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
|
||||
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,22 +81,13 @@ canvas_item_draw (const CanvasItem *item,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
canvas_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
canvas_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
cairo_t *cr;
|
||||
GList *iter;
|
||||
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
gdk_cairo_region (cr, event->region);
|
||||
cairo_clip (cr);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
|
||||
cairo_fill (cr);
|
||||
cairo_paint (cr);
|
||||
|
||||
for (iter = canvas_items; iter; iter = iter->next)
|
||||
canvas_item_draw (iter->data, cr, FALSE);
|
||||
@@ -104,8 +95,6 @@ canvas_expose_event (GtkWidget *widget,
|
||||
if (drop_item)
|
||||
canvas_item_draw (drop_item, cr, TRUE);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -449,7 +438,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
/* Add widgets to control the ToolPalette appearance: */
|
||||
box = gtk_vbox_new (FALSE, 6);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
/* Orientation combo box: */
|
||||
@@ -518,7 +507,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
|
||||
|
||||
/* Add hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
|
||||
|
||||
/* Add and fill the ToolPalette: */
|
||||
@@ -572,7 +561,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_widget_set_app_paintable (contents, TRUE);
|
||||
|
||||
g_object_connect (contents,
|
||||
"signal::expose-event", canvas_expose_event, NULL,
|
||||
"signal::draw", canvas_draw, NULL,
|
||||
"signal::drag-data-received", passive_canvas_drag_data_received, NULL,
|
||||
NULL);
|
||||
|
||||
@@ -600,7 +589,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_widget_set_app_paintable (contents, TRUE);
|
||||
|
||||
g_object_connect (contents,
|
||||
"signal::expose-event", canvas_expose_event, NULL,
|
||||
"signal::draw", canvas_draw, NULL,
|
||||
"signal::drag-motion", interactive_canvas_drag_motion, NULL,
|
||||
"signal::drag-data-received", interactive_canvas_drag_data_received, NULL,
|
||||
"signal::drag-leave", interactive_canvas_drag_leave, NULL,
|
||||
|
||||
@@ -402,7 +402,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box1);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box1),
|
||||
@@ -209,11 +209,11 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
|
||||
|
||||
|
||||
separator = gtk_hseparator_new ();
|
||||
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
|
||||
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
|
||||
|
||||
@@ -86,17 +86,11 @@ load_pixbufs (void)
|
||||
}
|
||||
|
||||
/* Expose callback for the drawing area */
|
||||
static gint
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
static gboolean
|
||||
draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_paint (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -179,7 +173,7 @@ static guint timeout_id;
|
||||
|
||||
/* Destroy handler for the window */
|
||||
static void
|
||||
destroy_cb (GtkObject *object, gpointer data)
|
||||
destroy_cb (GObject *object, gpointer data)
|
||||
{
|
||||
g_source_remove (timeout_id);
|
||||
timeout_id = 0;
|
||||
@@ -214,8 +208,8 @@ main (int argc, char **argv)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
||||
g_signal_connect (da, "expose_event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), da);
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ do_image (const char *filename)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -384,7 +384,7 @@ do_nonprogressive (const gchar *filename)
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ main (int argc, char **argv)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
tree = create_tree ();
|
||||
@@ -369,16 +369,16 @@ main (int argc, char **argv)
|
||||
gtk_label_new ("Source"));
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "title");
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"font", "Sans 18",
|
||||
NULL);
|
||||
g_object_set (tag,
|
||||
"font", "Sans 18",
|
||||
NULL);
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "source");
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"font", "Courier 10",
|
||||
"pixels_above_lines", 0,
|
||||
"pixels_below_lines", 0,
|
||||
NULL);
|
||||
g_object_set (tag,
|
||||
"font", "Courier 10",
|
||||
"pixels_above_lines", 0,
|
||||
"pixels_below_lines", 0,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
@@ -112,8 +112,8 @@ main (int argc, char **argv)
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
|
||||
0, 0, 0, 0, 150, 160);
|
||||
pixbuf = gdk_pixbuf_get_from_window (root,
|
||||
0, 0, 150, 160);
|
||||
|
||||
/* PASS */
|
||||
g_debug ("try to save PNG with a profile");
|
||||
|
||||
@@ -307,21 +307,16 @@ close_app (GtkWidget *widget, gpointer data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
expose_cb (GtkWidget *drawing_area, GdkEventExpose *evt, gpointer data)
|
||||
static gboolean
|
||||
draw_cb (GtkWidget *drawing_area, cairo_t *cr, gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
cairo_t *cr;
|
||||
|
||||
pixbuf = (GdkPixbuf *) g_object_get_data (G_OBJECT (drawing_area),
|
||||
"pixbuf");
|
||||
|
||||
cr = gdk_cairo_create (evt->window);
|
||||
gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &evt->area);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_paint (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -340,8 +335,8 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
|
||||
GdkPixbuf *new_pixbuf;
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
|
||||
0, 0, 0, 0, evt->width, evt->height);
|
||||
new_pixbuf = gdk_pixbuf_get_from_window (root,
|
||||
0, 0, evt->width, evt->height);
|
||||
g_object_set_data_full (G_OBJECT (drawing_area), "pixbuf", new_pixbuf,
|
||||
(GDestroyNotify) g_object_unref);
|
||||
}
|
||||
@@ -361,8 +356,8 @@ main (int argc, char **argv)
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
|
||||
0, 0, 0, 0, 150, 160);
|
||||
pixbuf = gdk_pixbuf_get_from_window (root,
|
||||
0, 0, 150, 160);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "delete_event",
|
||||
@@ -370,15 +365,15 @@ main (int argc, char **argv)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (close_app), NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
gtk_widget_set_size_request (GTK_WIDGET (drawing_area),
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_pixbuf_get_height (pixbuf));
|
||||
g_signal_connect (drawing_area, "expose_event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
g_signal_connect (drawing_area, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
|
||||
g_signal_connect (drawing_area, "configure_event",
|
||||
G_CALLBACK (configure_cb), NULL);
|
||||
|
||||
@@ -32,33 +32,27 @@ overall_changed_cb (GtkAdjustment *adjustment, gpointer data)
|
||||
}
|
||||
|
||||
gboolean
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GdkPixbuf *dest;
|
||||
cairo_t *cr;
|
||||
int width, height;
|
||||
|
||||
gdk_window_set_back_pixmap (gtk_widget_get_window (widget),
|
||||
NULL, FALSE);
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
|
||||
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
|
||||
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
gdk_pixbuf_composite_color (pixbuf, dest,
|
||||
0, 0, event->area.width, event->area.height,
|
||||
-event->area.x, -event->area.y,
|
||||
(double) allocation.width / gdk_pixbuf_get_width (pixbuf),
|
||||
(double) allocation.height / gdk_pixbuf_get_height (pixbuf),
|
||||
0, 0, width, height,
|
||||
0, 0,
|
||||
(double) width / gdk_pixbuf_get_width (pixbuf),
|
||||
(double) height / gdk_pixbuf_get_height (pixbuf),
|
||||
interp_type, overall_alpha,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
0, 0, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
gdk_cairo_set_source_pixbuf (cr, dest, 0, 0);
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_fill (cr);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
g_object_unref (dest);
|
||||
|
||||
return TRUE;
|
||||
@@ -104,15 +98,15 @@ main(int argc, char **argv)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
combo_box = gtk_combo_box_text_new ();
|
||||
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "NEAREST");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "BILINEAR");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "TILES");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "HYPER");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "NEAREST");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "BILINEAR");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "TILES");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "HYPER");
|
||||
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 1);
|
||||
|
||||
@@ -123,17 +117,17 @@ main(int argc, char **argv)
|
||||
alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 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));
|
||||
adjustment = gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0);
|
||||
g_signal_connect (adjustment, "value_changed",
|
||||
G_CALLBACK (overall_changed_cb), NULL);
|
||||
|
||||
hscale = gtk_hscale_new (adjustment);
|
||||
hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
|
||||
gtk_scale_set_digits (GTK_SCALE (hscale), 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), hscale, TRUE, TRUE, 0);
|
||||
|
||||
@@ -141,13 +135,14 @@ main(int argc, char **argv)
|
||||
gtk_widget_show_all (vbox);
|
||||
|
||||
/* Compute the size without the drawing area, so we know how big to make the default size */
|
||||
gtk_widget_size_request (vbox, &scratch_requisition);
|
||||
gtk_widget_get_preferred_size ( (vbox),
|
||||
&scratch_requisition, NULL);
|
||||
|
||||
darea = gtk_drawing_area_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), darea, TRUE, TRUE, 0);
|
||||
|
||||
g_signal_connect (darea, "expose_event",
|
||||
G_CALLBACK (expose_cb), NULL);
|
||||
g_signal_connect (darea, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
|
||||
635
docs/CODING-STYLE
Normal file
635
docs/CODING-STYLE
Normal file
@@ -0,0 +1,635 @@
|
||||
GTK+ Coding Style
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This document is intended to be a short description of the preferred
|
||||
coding style to be used for the GTK+ source code. It was strongly
|
||||
inspired by Clutter's CODING_STYLE.
|
||||
|
||||
Coding style is a matter of consistency, readability and maintainance;
|
||||
coding style is also completely arbitrary and a matter of taste. This
|
||||
document will use examples at the very least to provide authoritative
|
||||
and consistent answers to common questions regarding the coding style,
|
||||
and will also try to identify the allowed exceptions.
|
||||
|
||||
The examples will show the preferred coding style; the negative examples
|
||||
will be clearly identified. Please, don't submit code to GTK+ that
|
||||
looks like any of these.
|
||||
|
||||
Part of the rationales for these coding style rules are available either
|
||||
in the kernel CodingStyle document or in Cairo's CODING_STYLE one.
|
||||
|
||||
When in doubt, check the surrounding code and try to imitate it.
|
||||
|
||||
+ Line width
|
||||
|
||||
The maximum line width for source files is 80 characters, whenever possible.
|
||||
Longer lines are usually an indication that you either need a function
|
||||
or a pre-processor macro.
|
||||
|
||||
+ Indentation
|
||||
|
||||
Each new level is indented 2 or more spaces than the previous level:
|
||||
|
||||
if (condition)
|
||||
single_statement ();
|
||||
|
||||
This can only be achieved using space characters. It may not be achieved
|
||||
using tab characters alone, or using a combination of spaces and tabs.
|
||||
|
||||
Do not change the editor's configuration to change the meaning of a
|
||||
tab character (see below); code using tabs to indent will not be accepted
|
||||
into GTK+.
|
||||
|
||||
Even if two spaces for each indentation level allows deeper nesting than
|
||||
8 spaces, GTK+ favours self-documenting function names that can take
|
||||
quite some space. For this reason you should avoid deeply nested code.
|
||||
|
||||
+ Tab characters
|
||||
|
||||
The tab character must always be expanded to spaces. If a literal
|
||||
tab must be used inside the source, the tab must always be interpreted
|
||||
according to its traditional meaning:
|
||||
|
||||
Advance to the next column which is a multiple of 8.
|
||||
[ these two lines should be aligned ]
|
||||
|
||||
+ Braces
|
||||
|
||||
Curly braces should not be used for single statement blocks:
|
||||
|
||||
if (condition)
|
||||
single_statement ();
|
||||
else
|
||||
another_single_statement (arg1);
|
||||
|
||||
In case of multiple statements, curly braces should be put on another
|
||||
indentation level:
|
||||
|
||||
if (condition)
|
||||
{
|
||||
statement_1 ();
|
||||
statement_2 ();
|
||||
statement_3 ();
|
||||
}
|
||||
|
||||
The "no block for single statements" rule has only four exceptions:
|
||||
|
||||
① if the single statement covers multiple lines, e.g. for functions with
|
||||
many arguments, and it is followed by else or else if:
|
||||
|
||||
/* valid */
|
||||
if (condition)
|
||||
{
|
||||
a_single_statement_with_many_arguments (some_lengthy_argument,
|
||||
another_lengthy_argument,
|
||||
and_another_one,
|
||||
plus_one);
|
||||
}
|
||||
else
|
||||
another_single_statement (arg1, arg2);
|
||||
|
||||
② if the condition is composed of many lines:
|
||||
|
||||
/* valid */
|
||||
if (condition1 ||
|
||||
(condition2 && condition3) ||
|
||||
condition4 ||
|
||||
(condition5 && (condition6 || condition7)))
|
||||
{
|
||||
a_single_statement ();
|
||||
}
|
||||
|
||||
③ Nested if's, in which case the block should be placed on the
|
||||
outermost if:
|
||||
|
||||
/* valid */
|
||||
if (condition)
|
||||
{
|
||||
if (another_condition)
|
||||
single_statement ();
|
||||
else
|
||||
another_single_statement ();
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
if (condition)
|
||||
if (another_condition)
|
||||
single_statement ();
|
||||
else if (yet_another_condition)
|
||||
another_single_statement ();
|
||||
|
||||
④ If either side of an if-else statement has braces, both sides
|
||||
should, to match up indentation:
|
||||
|
||||
/* valid */
|
||||
if (condition)
|
||||
{
|
||||
foo ();
|
||||
bar ();
|
||||
}
|
||||
else
|
||||
{
|
||||
baz ();
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
if (condition)
|
||||
{
|
||||
foo ();
|
||||
bar ();
|
||||
}
|
||||
else
|
||||
baz ();
|
||||
|
||||
In general, new blocks should be placed on a new indentation level,
|
||||
like:
|
||||
|
||||
int retval = 0;
|
||||
|
||||
statement_1 ();
|
||||
statement_2 ();
|
||||
|
||||
{
|
||||
int var1 = 42;
|
||||
gboolean res = FALSE;
|
||||
|
||||
res = statement_3 (var1);
|
||||
|
||||
retval = res ? -1 : 1;
|
||||
}
|
||||
|
||||
While curly braces for function definitions should rest on a new line
|
||||
they should not add an indentation level:
|
||||
|
||||
/* valid */
|
||||
static void
|
||||
my_function (int argument)
|
||||
{
|
||||
do_my_things ();
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
static void
|
||||
my_function (int argument) {
|
||||
do_my_things ();
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
static void
|
||||
my_function (int argument)
|
||||
{
|
||||
do_my_things ();
|
||||
}
|
||||
|
||||
Curly braces must not be placed on the same line as a condition:
|
||||
|
||||
/* invalid */
|
||||
if (condition) {
|
||||
statement_1 ();
|
||||
statement_2 ();
|
||||
}
|
||||
+ Conditions
|
||||
|
||||
Do not check boolean values for equality:
|
||||
|
||||
/* invalid */
|
||||
if (condition == TRUE)
|
||||
do_foo ();
|
||||
|
||||
/* valid */
|
||||
if (another_condition)
|
||||
do_bar ();
|
||||
|
||||
Even if C handles NULL equality like a boolean, be explicit:
|
||||
|
||||
/* valid */
|
||||
if (some_pointer == NULL)
|
||||
do_blah ();
|
||||
|
||||
/* invalid */
|
||||
if (some_other_pointer)
|
||||
do_blurp ();
|
||||
|
||||
In case of conditions split over multiple lines, the logical operators should
|
||||
always go at the end of the line:
|
||||
|
||||
/* invalid */
|
||||
if (condition1
|
||||
|| condition2
|
||||
|| condition3)
|
||||
{
|
||||
do_foo ();
|
||||
}
|
||||
|
||||
/* valid */
|
||||
if (condition1 &&
|
||||
condition2 &&
|
||||
(condition3 || (condition4 && condition5)))
|
||||
{
|
||||
do_blah ();
|
||||
}
|
||||
|
||||
+ Functions
|
||||
|
||||
Functions should be declared by placing the returned value on a separate
|
||||
line from the function name:
|
||||
|
||||
void
|
||||
my_function (void)
|
||||
{
|
||||
}
|
||||
|
||||
The arguments list must be broken into a new line for each argument,
|
||||
with the argument names right aligned, taking into account pointers:
|
||||
|
||||
void
|
||||
my_function (some_type_t type,
|
||||
another_type_t *a_pointer,
|
||||
final_type_t another_type)
|
||||
{
|
||||
}
|
||||
|
||||
The alignment also holds when invoking a function without breaking the
|
||||
80 characters limit:
|
||||
|
||||
align_function_arguments (first_argument,
|
||||
second_argument,
|
||||
third_argument);
|
||||
|
||||
To respect the 80 characters limit do not break the function name from
|
||||
the arguments:
|
||||
|
||||
/* invalid */
|
||||
a_very_long_function_name_with_long_parameters
|
||||
(argument_the_first, argument_the_second);
|
||||
|
||||
/* valid */
|
||||
first_a = argument_the_first;
|
||||
second_a = argument_the_second;
|
||||
a_very_long_function_name_with_long_parameters (first_a, second_a);
|
||||
|
||||
+ Whitespace
|
||||
|
||||
Always put a space before a parenthesis but never after:
|
||||
|
||||
/* valid */
|
||||
if (condition)
|
||||
do_my_things ();
|
||||
|
||||
/* valid */
|
||||
switch (condition)
|
||||
{
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
if(condition)
|
||||
do_my_things();
|
||||
|
||||
/* invalid */
|
||||
if ( condition )
|
||||
do_my_things ( );
|
||||
|
||||
A switch() should open a block on a new indentation level, and each case
|
||||
should start on the same indentation level as the curly braces, with the
|
||||
case block on a new indentation level:
|
||||
|
||||
/* valid */
|
||||
switch (condition)
|
||||
{
|
||||
case FOO:
|
||||
do_foo ();
|
||||
break;
|
||||
|
||||
case BAR:
|
||||
do_bar ();
|
||||
break;
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
switch (condition) {
|
||||
case FOO: do_foo (); break;
|
||||
case BAR: do_bar (); break;
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
switch (condition)
|
||||
{
|
||||
case FOO: do_foo ();
|
||||
break;
|
||||
case BAR: do_bar ();
|
||||
break;
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
switch (condition)
|
||||
{
|
||||
case FOO:
|
||||
do_foo ();
|
||||
break;
|
||||
case BAR:
|
||||
do_bar ();
|
||||
break;
|
||||
}
|
||||
|
||||
It is preferable, though not mandatory, to separate the various cases with
|
||||
a newline:
|
||||
|
||||
switch (condition)
|
||||
{
|
||||
case FOO:
|
||||
do_foo ();
|
||||
break;
|
||||
|
||||
case BAR:
|
||||
do_bar ();
|
||||
break;
|
||||
|
||||
default:
|
||||
do_default ();
|
||||
}
|
||||
|
||||
The 'break' statement for the default: case is not mandatory.
|
||||
|
||||
If a case block needs to declare new variables, the same rules as the
|
||||
inner blocks (see above) apply; the break statement should be placed
|
||||
outside of the inner block:
|
||||
|
||||
switch (condition)
|
||||
{
|
||||
case FOO:
|
||||
{
|
||||
int foo;
|
||||
|
||||
foo = do_foo ();
|
||||
}
|
||||
break;
|
||||
|
||||
...
|
||||
}
|
||||
|
||||
When declaring a structure type use newlines to separate logical sections
|
||||
of the structure:
|
||||
|
||||
struct _GtkWrapBoxPrivate
|
||||
{
|
||||
GtkOrientation orientation;
|
||||
GtkWrapAllocationMode mode;
|
||||
|
||||
GtkWrapBoxSpreading horizontal_spreading;
|
||||
GtkWrapBoxSpreading vertical_spreading;
|
||||
|
||||
guint16 vertical_spacing;
|
||||
guint16 horizontal_spacing;
|
||||
|
||||
guint16 minimum_line_children;
|
||||
guint16 natural_line_children;
|
||||
|
||||
GList *children;
|
||||
};
|
||||
|
||||
|
||||
Do not eliminate whitespace and newlines just because something would
|
||||
fit on 80 characters:
|
||||
|
||||
/* invalid */
|
||||
if (condition) foo (); else bar ();
|
||||
|
||||
Do eliminate trailing whitespace on any line, preferably as a separate
|
||||
patch or commit. Never use empty lines at the beginning or at the end of
|
||||
a file.
|
||||
|
||||
Do enable the default git pre-commit hook that detect trailing
|
||||
whitespace for you and help you to avoid corrupting GTK+'s tree with
|
||||
it. Do that as follows:
|
||||
|
||||
chmod a+x .git/hooks/pre-commit
|
||||
|
||||
You might also find the git-stripspace utility helpful which acts as a
|
||||
filter to remove trailing whitespace as well as initial, final, and
|
||||
duplicate blank lines.
|
||||
|
||||
+ Headers
|
||||
|
||||
Headers are special, for GTK+, in that they don't have to obey the
|
||||
80 characters limit. The only major rule for headers is that the function
|
||||
definitions should be vertically aligned in three columns:
|
||||
|
||||
return value function_name (type argument,
|
||||
type argument,
|
||||
type argument);
|
||||
|
||||
The maximum width of each column is given by the longest element in the
|
||||
column:
|
||||
|
||||
void gtk_type_set_property (GtkType *type,
|
||||
const gchar *value,
|
||||
GError **error);
|
||||
G_CONST_RETURN gchar *gtk_type_get_property (GtkType *type);
|
||||
|
||||
It is also possible to align the columns to the next tab:
|
||||
|
||||
void gtk_type_set_prop (GtkType *type,
|
||||
gfloat value);
|
||||
gfloat gtk_type_get_prop (GtkType *type);
|
||||
gint gtk_type_update_foobar (GtkType *type);
|
||||
|
||||
Public headers should never be included directly:
|
||||
|
||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
All headers should have inclusion guards (for internal usage)
|
||||
and C++ guards:
|
||||
|
||||
#ifndef __GTK_FOO_H__
|
||||
#define __GTK_FOO_H__
|
||||
|
||||
#include <gtk/gtk-bar.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
...
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_FOO_H__ */
|
||||
|
||||
+ Includes
|
||||
|
||||
GTK+ source files should never include the global gtk.h header, but
|
||||
instead include the individual headers that are needed. Every file must
|
||||
include config.h first, then its own header, then other GTK+ headers
|
||||
that it needs, then system and third-party headers that it needs.
|
||||
|
||||
/* valid */
|
||||
#include "config.h"
|
||||
|
||||
#include "gtkfoo.h"
|
||||
|
||||
#include "gtkwidget.h"
|
||||
#include "gtkbutton.h"
|
||||
|
||||
...
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
+ GObject
|
||||
|
||||
GObject classes definition and implementation require some additional
|
||||
coding style notices.
|
||||
|
||||
Typedef declarations should be placed at the beginning of the file:
|
||||
|
||||
typedef struct _GtkFoo GtkFoo;
|
||||
typedef struct _GtkFooClass GtkFooClass;
|
||||
typedef struct _GtkFooPrivate GtkFooPrivate;
|
||||
|
||||
This includes enumeration types:
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT,
|
||||
GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH
|
||||
} GtkSizeRequestMode;
|
||||
|
||||
And callback types:
|
||||
|
||||
typedef void (* GtkCallback) (GtkWidget *widget,
|
||||
gpointer user_data);
|
||||
|
||||
Instance structures should only contain the parent type and a pointer to a
|
||||
private data structure, and they should be annotated as "private":
|
||||
|
||||
struct _GtkFoo
|
||||
{
|
||||
/*< private >*/
|
||||
GtkWidget parent_instance;
|
||||
|
||||
GtkFooPrivate *priv;
|
||||
};
|
||||
|
||||
All the properties should be stored inside the private data structure, which
|
||||
is defined inside the source file - or, if needed, inside a private header
|
||||
file; the private header filename must end with "private.h" and must not be
|
||||
installed.
|
||||
|
||||
The private data structure should only be accessed internally using the
|
||||
pointer inside the instance structure, and never using the
|
||||
G_TYPE_INSTANCE_GET_PRIVATE() macro or the g_type_instance_get_private()
|
||||
function.
|
||||
|
||||
Always use the G_DEFINE_TYPE(), G_DEFINE_TYPE_WITH_CODE() macros, or
|
||||
their abstract variants G_DEFINE_ABSTRACT_TYPE() and
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_CODE(), and the similar macros for defining
|
||||
interfaces.
|
||||
|
||||
Interface types should always have the dummy typedef for cast purposes:
|
||||
|
||||
typedef struct _GtkFoo GtkFoo;
|
||||
|
||||
The interface structure should have "Interface" postfixed to the dummy typedef:
|
||||
|
||||
typedef struct _GtkFooInterface GtkFooInterface;
|
||||
|
||||
Interfaces must have the following macros:
|
||||
|
||||
- Macro: - Expands to:
|
||||
• GTK_TYPE_<iface_name> <iface_name>_get_type
|
||||
• GTK_<iface_name> G_TYPE_CHECK_INSTANCE_CAST
|
||||
• GTK_IS_<iface_name> G_TYPE_CHECK_INSTANCE_TYPE
|
||||
• GTK_<iface_name>_GET_IFACE G_TYPE_INSTANCE_GET_INTERFACE
|
||||
|
||||
+ Memory allocation
|
||||
|
||||
When dynamically allocating data on the heap either use g_new() or,
|
||||
if allocating multiple small data structures, g_slice_new().
|
||||
|
||||
Public structure types should always be returned after being zero-ed,
|
||||
either explicitly for each member, or by using g_new0() or g_slice_new0().
|
||||
|
||||
+ Macros
|
||||
|
||||
Try to avoid private macros unless strictly necessary. Remember to #undef
|
||||
them at the end of a block or a series of functions needing them.
|
||||
|
||||
Inline functions are usually preferable to private macros.
|
||||
|
||||
Public macros should not be used unless they evaluate to a constant.
|
||||
|
||||
+ Public API
|
||||
|
||||
Avoid exporting variables as public API, since this is cumbersome on some
|
||||
platforms. It is always preferable to add getters and setters instead.
|
||||
|
||||
All public functions must be listed in the gtk.symbols file.
|
||||
|
||||
+ Private API
|
||||
|
||||
Non-exported functions that are needed in more than one source file
|
||||
should be named "_gtk_...", and declared in a private header file.
|
||||
|
||||
Underscore-prefixed functions are never exported.
|
||||
|
||||
Non-exported functions that are only needed in one source file
|
||||
should be declared static.
|
||||
|
||||
+ Documentation
|
||||
|
||||
All public APIs must have gtk-doc comments. For functions, these should
|
||||
be placed in the source file, directly above the function.
|
||||
|
||||
/* valid */
|
||||
/**
|
||||
* gtk_get_flow:
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Gets the flow of a widget.
|
||||
*
|
||||
* Note that flows may be laminar or turbulent...
|
||||
*
|
||||
* Returns: (transfer none): the flow of @widget
|
||||
*/
|
||||
GtkFlow *
|
||||
gtk_get_flow (GtkWidget *widget)
|
||||
{
|
||||
|
||||
...
|
||||
|
||||
}
|
||||
|
||||
Doc comments for macros, function types, class structs, etc should be
|
||||
placed next to the definitions, typically in headers.
|
||||
|
||||
Section introductions should be placed in the source file they describe,
|
||||
after the license header:
|
||||
|
||||
/* valid */
|
||||
/**
|
||||
* SECTION:gtksizerequest
|
||||
* @Short_Description: Height-for-width geometry management
|
||||
* @Title: GtkSizeRequest
|
||||
*
|
||||
* The GtkSizeRequest interface is GTK+'s height-for-width (and
|
||||
* width-for-height) geometry management system.
|
||||
* ...
|
||||
*/
|
||||
|
||||
To properly document a new function, macro, function type or struct,
|
||||
it needs to be listed in the gtk3-sections.txt file.
|
||||
|
||||
To properly document a new class, it needs to be given its own section
|
||||
in gtk3-sections.txt, needs to be included in gtk-docs.sgml, and the
|
||||
get_type function needs to listed in gtk3.types.
|
||||
|
||||
+ Old code
|
||||
|
||||
New code that is being added to GTK+ should adhere to the style
|
||||
explained above. Existing GTK+ code does largely follow these
|
||||
conventions, but there are some differences, e.g. occurrences
|
||||
of tabs, etc.
|
||||
|
||||
It is ok to update the style of a code block or function when you
|
||||
are touching it anyway, but sweeping whitespace changes obscure the
|
||||
git history and should be avoided.
|
||||
@@ -1,23 +1,25 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = tutorial faq reference tools
|
||||
SUBDIRS = reference tools
|
||||
|
||||
EXTRA_DIST += \
|
||||
defsformat.txt \
|
||||
CODING-STYLE \
|
||||
developers.txt \
|
||||
dnd_internals.txt \
|
||||
make-todo \
|
||||
refcounting.txt \
|
||||
sizing-test.txt \
|
||||
styles.txt \
|
||||
text_widget.txt \
|
||||
text_widget_internals.txt \
|
||||
tree-column-sizing.txt \
|
||||
widget_geometry.txt \
|
||||
widget_system.txt \
|
||||
focus_tracking.txt \
|
||||
generation.txt \
|
||||
gtkdocs_fix \
|
||||
RELEASE-HOWTO
|
||||
make-todo \
|
||||
refcounting.txt \
|
||||
RELEASE-HOWTO \
|
||||
sizing-test.txt \
|
||||
styles.txt \
|
||||
text_widget_internals.txt \
|
||||
text_widget.txt \
|
||||
tree-column-sizing.png \
|
||||
tree-column-sizing.txt \
|
||||
widget_geometry.txt \
|
||||
widget_system.txt
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,338 +0,0 @@
|
||||
|
||||
The overall syntax is:
|
||||
|
||||
(type-of-thing-being-defined name-used-to-refer-to-this-thing
|
||||
(attribute-name attribute-value-depending-on-the-attribute)
|
||||
(attribute-name attribute-value-depending-on-the-attribute)
|
||||
(attribute-name attribute-value-depending-on-the-attribute))
|
||||
|
||||
Some definitions can have a c-declaration field that gives the C code
|
||||
we parsed to arrive at the definition. The c-declaration is a quoted
|
||||
string because it can contain parentheses and such.
|
||||
|
||||
Defined types and their attributes:
|
||||
|
||||
===
|
||||
(module module-name
|
||||
(submodule-of module-name)) ;; submodule is optional
|
||||
|
||||
Ex: (module Gtk)
|
||||
Ex: (module Rgb
|
||||
(submodule-of Gdk))
|
||||
|
||||
modules are later referred to with a list of module names, like
|
||||
(Gdk Rgb) or (Gtk)
|
||||
|
||||
Object and boxed type definitions automatically create a submodule.
|
||||
For example, GtkCList creates the module (module CList (submodule-of
|
||||
(Gtk))) which is referred to as module (Gtk CList).
|
||||
|
||||
===
|
||||
|
||||
(type
|
||||
(alias some-unique-identifier)
|
||||
(in-module module-name) ;; optional, gchar* is not in a module
|
||||
(gtk-type-id gtk-type-system-id) ;; optional, absent if this is not
|
||||
;; in the type system
|
||||
(is-parametric boolean) ;; optional default to #f
|
||||
(in-c-name name-of-symbol-in-C)
|
||||
(out-c-name name-of-symbol-in-C)
|
||||
(inout-c-name name-of-symbol-in-C))
|
||||
|
||||
Ex: (type
|
||||
(alias string)
|
||||
(gtk-type-id GTK_TYPE_STRING)
|
||||
(in-c-name "const gchar*")
|
||||
(out-c-name "gchar**") ;; actually I'm not sure how strings work out/inout
|
||||
(inout-c-name "gchar*"))
|
||||
|
||||
(type
|
||||
(alias list)
|
||||
(gtk-type-id GTK_TYPE_POINTER)
|
||||
(is-parametric #t)
|
||||
(in-c-name "GList*")
|
||||
(out-c-name "GList**")
|
||||
(inout-c-name "GList**"))
|
||||
|
||||
|
||||
;; This one would be implied by the (object) def for GtkWidget I
|
||||
;; think - (type) is only required for types that are not implied
|
||||
;; by other definitions, such as int/boolean/etc.
|
||||
|
||||
(type
|
||||
(alias GtkWidget)
|
||||
(in-module (Gtk))
|
||||
(gtk-type-id GTK_TYPE_WIDGET)
|
||||
(in-c-name "GtkWidget*")
|
||||
(inout-c-name "GtkWidget*")
|
||||
(out-c-name "GtkWidget**"))
|
||||
|
||||
"Type" bindings are automatically assumed for objects, boxed types,
|
||||
etc. as defined below.
|
||||
|
||||
The alias field is used to refer to the type later on.
|
||||
|
||||
Whenever a type alias can be used, it is also possible to use the
|
||||
keyword "native", which implies that the type in question is too
|
||||
C-specific to represent. Then a c-declaration will typically be
|
||||
available for use.
|
||||
|
||||
C types containing [] or () are function pointers or arrays. For
|
||||
arrays that don't specify a size, we just treat them as pointers. For
|
||||
function pointers, we need special (type) syntax/attributes of some
|
||||
kind, but since there basically aren't any of these right now in the
|
||||
libs we care about we can just ignore them. For arrays that specify a
|
||||
size ditto, you would handle them by adding an (array-size) attribute
|
||||
or something or using the "native" keyword and skipping the (type)
|
||||
stuff.
|
||||
|
||||
===
|
||||
(object object-name
|
||||
(in-module module-name-list)
|
||||
(parent object-name optional-module-name-if-different)
|
||||
(abstract boolean-is-abstract-class) ;; omit for default of #f
|
||||
(c-name name-of-the-object-in-C)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field)
|
||||
(access read-or-write-or-readwrite)))
|
||||
|
||||
|
||||
Ex: (object Widget
|
||||
(in-module (Gtk))
|
||||
(parent Object) ;; could say (parent Object (Gtk))
|
||||
(abstract #t)
|
||||
(c-name GtkWidget)
|
||||
(field (type-and-name GdkWindow* window) (access read)))
|
||||
|
||||
An "object" declaration automatically implies the type definition:
|
||||
|
||||
(type
|
||||
(alias concat-module-elements-and-object-name)
|
||||
(in-c-name pointer-to-c-name)
|
||||
(out-c-name pointer-to-pointer-to-c-name)
|
||||
(inout-c-name pointer-to-c-name))
|
||||
|
||||
Ex:
|
||||
(type (alias GtkWidget)
|
||||
(in-c-name GtkWidget*)
|
||||
(out-c-name GtkWidget**)
|
||||
(inout-c-name GtkWidget*))
|
||||
|
||||
It also implies a module that is the name broken into parts:
|
||||
(module CTree
|
||||
(submodule-of Gtk))
|
||||
|
||||
===
|
||||
|
||||
(function function-name
|
||||
(in-module module-name-list) ;; "static methods" go in their
|
||||
;; object's module
|
||||
(is-constructor-of object-type-alias) ;; optional, marks a constructor
|
||||
(c-name function-name)
|
||||
(return-type return-value-type) ;; defaults to void
|
||||
(caller-owns-return boolean-value) ;; defaults to #f
|
||||
(can-return-null boolean-value) ;; defaults to #t
|
||||
(parameter in-or-out-or-inout
|
||||
(type-and-name parameter-type-alias parameter-name)
|
||||
(type-parameter name-of-contained-type) ;; optional, requires parametric type
|
||||
(c-declaration "c-type-and-name")) ;; c-declaration only required
|
||||
;; if the type alias is "native"
|
||||
(varargs #t) ;; has varargs at the end
|
||||
)
|
||||
|
||||
Ex:
|
||||
(function init
|
||||
(in-module (Gdk Rgb)
|
||||
(c-name gdk_rgb_init)))
|
||||
|
||||
Ex:
|
||||
(function new
|
||||
(in-module (Gdk Rgb Cmap))
|
||||
(is-constructor-of GdkRgbCmap)
|
||||
(c-name gdk_rgb_cmap_new)
|
||||
(return-type GdkRgbCmap)
|
||||
(caller-owns-return #t) ;; perhaps this could be implied by is-constructor-of
|
||||
(parameter in (type-and-name array-of-guint32 colors))
|
||||
(parameter in (type-and-name gint n_colors)))
|
||||
|
||||
Ex:
|
||||
(function config_set_set_handler
|
||||
(in-module (Gnome))
|
||||
(c-name gnome_config_set_set_handler)
|
||||
(parameter in (type-and-name native func)
|
||||
(c-declaration "void (*func)(void*)"))
|
||||
(parameter in (type-and-name gpointer data)))
|
||||
|
||||
===
|
||||
(method method-name
|
||||
(of-object object-name module-name)
|
||||
;; retval/arg attributes as for (function), but with first parameter
|
||||
;; omitted for non-constructors
|
||||
)
|
||||
|
||||
Ex:
|
||||
(method set_text
|
||||
(of-object Label (Gtk))
|
||||
(parameter (type-and-name const-gchar* str)))
|
||||
|
||||
===
|
||||
(object-argument arg-name
|
||||
(of-object object-we-are-an-argument-of optional-objects-module)
|
||||
(type-id argument-type) ;; GTK_TYPE_OBJECT etc.
|
||||
;; flags all default to #f
|
||||
(readable bool-value)
|
||||
(writeable bool-value)
|
||||
(construct-only bool-value))
|
||||
|
||||
Ex:
|
||||
(object-argument label
|
||||
(of-object Label (Gtk))
|
||||
(type GTK_TYPE_STRING)
|
||||
(readable #t)
|
||||
(writeable #t))
|
||||
|
||||
===
|
||||
(signal signal-name
|
||||
(run-action bool-value)
|
||||
(run-first bool-value)
|
||||
(run-last bool-value)
|
||||
(of-object object-we-are-a-signal-of optional-objects-module)
|
||||
;; return value and parameters as for a function, omitting the object
|
||||
;; and user data parameters
|
||||
|
||||
;; what other properties matter for a signal?
|
||||
)
|
||||
|
||||
Ex:
|
||||
(signal select_row
|
||||
(of-object CList (Gtk))
|
||||
(run-first #t)
|
||||
;; return type defaults to void
|
||||
(parameter in (type-and-name gint row))
|
||||
(parameter in (type-and-name gint column))
|
||||
(parameter in (type-and-name GdkEvent* event)))
|
||||
|
||||
===
|
||||
(enum enum-name
|
||||
(in-module modname)
|
||||
(c-name name-in-c)
|
||||
(value (nick value-name-noprefixes-hyphen-lowercase) (c-name value-c-name)))
|
||||
|
||||
Ex:
|
||||
|
||||
(enum DirectionType
|
||||
(in-module Gtk)
|
||||
(c-name GtkDirectionType)
|
||||
(value (nick tab-forward) (c-name GTK_DIR_TAB_FORWARD))
|
||||
(value (nick tab-backward) (c-name GTK_DIR_TAB_BACKWARD))
|
||||
(value (nick up) (c-name GTK_DIR_UP))
|
||||
(value (nick down) (c-name GTK_DIR_DOWN))
|
||||
(value (nick left) (c-name GTK_DIR_LEFT))
|
||||
(value (nick right) (c-name GTK_DIR_RIGHT)))
|
||||
|
||||
(enum Pos
|
||||
(in-module (Gtk CTree))
|
||||
(c-name GtkCTreePos)
|
||||
(value (nick before) (c-name GTK_CTREE_POS_BEFORE))
|
||||
(value (nick as-child) (c-name GTK_CTREE_POS_AS_CHILD))
|
||||
(value (nick after) (c-name GTK_CTREE_POS_AFTER)))
|
||||
|
||||
===
|
||||
(flags) is just like enum, but some bindings may wrap enums and flags differently.
|
||||
|
||||
===
|
||||
|
||||
(boxed boxed-name
|
||||
(in-module modname)
|
||||
(c-name c-name)
|
||||
(ref-func func-to-increase-refcount)
|
||||
(copy-func func-to-copy)
|
||||
(release-func func-to-destroy-or-decrement-refcount)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
|
||||
|
||||
It is never OK to use memcpy() to copy a boxed type, or use
|
||||
malloc()/free() to alloc/free one.
|
||||
|
||||
Ex:
|
||||
|
||||
(boxed Pixmap
|
||||
(in-module (Gdk))
|
||||
(c-name GdkPixmap)
|
||||
(ref-func pixmap_ref)
|
||||
(release-func pixmap_unref))
|
||||
|
||||
An "object" declaration automatically implies the type definition:
|
||||
|
||||
(type
|
||||
(alias concat-module-elements-and-boxed-name)
|
||||
(in-c-name pointer-to-c-name)
|
||||
(out-c-name pointer-to-pointer-to-c-name)
|
||||
(inout-c-name pointer-to-c-name))
|
||||
|
||||
Ex:
|
||||
(type (alias GdkPixmap)
|
||||
(in-c-name GdkPixmap*)
|
||||
(out-c-name GdkPixmap**)
|
||||
(inout-c-name GdkPixmap*))
|
||||
|
||||
|
||||
===
|
||||
|
||||
(struct struct-name
|
||||
(in-module modname)
|
||||
(c-name c-name)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
|
||||
|
||||
Unlike a boxed type, a struct type can be copied with memcpy() and
|
||||
allocated on the stack or with g_malloc().
|
||||
|
||||
Ex:
|
||||
(struct Rectangle
|
||||
(in-module (Gdk))
|
||||
(c-name GdkRectangle)
|
||||
(field (type-and-name gint16 x) (access readwrite))
|
||||
(field (type-and-name gint16 y) (access readwrite))
|
||||
(field (type-and-name guint16 width) (access readwrite))
|
||||
(field (type-and-name guint16 height) (access readwrite)))
|
||||
|
||||
Implies GdkRectangle type alias:
|
||||
|
||||
(type (alias GdkRectangle)
|
||||
(in-c-name GdkRectangle*)
|
||||
(out-c-name GdkRectangle*) ;; note - not the same as boxed types
|
||||
(inout-c-name GdkRectangle*))
|
||||
|
||||
===
|
||||
|
||||
(user-function name
|
||||
(in-module module)
|
||||
(c-name c-typedef-name)
|
||||
;; return-type and parameters as for (function)
|
||||
)
|
||||
|
||||
Ex:
|
||||
|
||||
(user-function PrintFunc
|
||||
(in-module (Gtk))
|
||||
(parameter in (type-and-name gpointer func_data))
|
||||
(parameter in (type-and-name gchar* str)))
|
||||
|
||||
===
|
||||
|
||||
(typedef new-name
|
||||
(in-module module)
|
||||
(c-name c-full-name)
|
||||
(orig-type alias-of-orig-type))
|
||||
|
||||
Ex:
|
||||
|
||||
(typedef Type
|
||||
(in-module (Gtk))
|
||||
(c-name GtkType)
|
||||
(orig-type guint))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST += \
|
||||
gtk-faq.sgml
|
||||
|
||||
if HAVE_DOCBOOK
|
||||
html:
|
||||
if test -w $(srcdir); then \
|
||||
(cd $(srcdir); \
|
||||
db2html gtk-faq.sgml; \
|
||||
test -d html && rm -r html; \
|
||||
mv gtk-faq html); \
|
||||
fi
|
||||
|
||||
pdf:
|
||||
if test -w $(srcdir); then \
|
||||
(cd $(srcdir); db2pdf gtk-faq.sgml); \
|
||||
fi
|
||||
|
||||
all-local: html
|
||||
|
||||
dist-hook: html
|
||||
cp -Rp $(srcdir)/html $(distdir)
|
||||
else
|
||||
html:
|
||||
echo "***"
|
||||
echo "*** Warning: FAQ not built"
|
||||
echo "***"
|
||||
|
||||
pdf:
|
||||
echo "***"
|
||||
echo "*** Warning: FAQ not built"
|
||||
echo "***"
|
||||
|
||||
dist-hook:
|
||||
echo "***"
|
||||
echo "*** Warning: FAQ not built"
|
||||
echo "*** DISTRIBUTION IS INCOMPLETE"
|
||||
echo "***"
|
||||
endif
|
||||
|
||||
.PHONY: html
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,236 +0,0 @@
|
||||
CONFIGURING PACKAGES TO WORK WITH GTK
|
||||
-------------------------------------
|
||||
|
||||
Compiling a program successfully against the GTK, GDK, and GLIB
|
||||
libraries can require a large number of command line options
|
||||
to your compiler and linker that are hard to guess correctly.
|
||||
The additional libraries required may, for example, depend on the
|
||||
manner which GTK was configured
|
||||
|
||||
Several tools are included in this package to make process
|
||||
easier.
|
||||
|
||||
First, there is the shell script 'gtk-config' (installed in
|
||||
$exec_prefix/bin):
|
||||
|
||||
Invoking gtk-config
|
||||
-------------------
|
||||
|
||||
gtk-config takes the following flags:
|
||||
|
||||
--version
|
||||
Prints out the version of GTK installed
|
||||
|
||||
--cflags
|
||||
Prints '-I' flags pointing to the installed header files.
|
||||
|
||||
--libs
|
||||
Prints out the linker flags necessary to link a program against GTK
|
||||
|
||||
--prefix[=PREFIX]
|
||||
If PREFIX is specified, overrides the configured value of $prefix.
|
||||
(And of exec-prefix, unless --exec-prefix is also specified)
|
||||
Otherwise, prints out the configured value of $prefix
|
||||
|
||||
--exec-prefix[=PREFIX]
|
||||
If PREFIX is specified, overrides the configured value of $exec_prefix.
|
||||
Otherwise, prints out the configured value of $exec_prefix
|
||||
|
||||
You may also add to the command line a list of additional
|
||||
libraries that gtk-config should supply the CFLAGS and LIBS
|
||||
for. The only currently supported library is 'gthread'.
|
||||
|
||||
As an example of this latter usage, you can get the
|
||||
appropriate cflags for a threaded program with:
|
||||
|
||||
gtk-config --cflags gthread
|
||||
|
||||
|
||||
Example of using gtk-config
|
||||
---------------------------
|
||||
|
||||
Typically, gtk-config will be used within a configure script,
|
||||
as described below. It, however, can also be used directly
|
||||
from the command line to compile a simple program. For example:
|
||||
|
||||
cc -o simple `gtk-config --cflags` simple.c `gtk-config --libs`
|
||||
|
||||
This command line might expand to (for example):
|
||||
|
||||
cc -o simple -I/usr/local/lib/glib/include -I/usr/local/include \
|
||||
-I/usr/X11R6/include simple.c -L/usr/local/lib -L/usr/X11R6/lib \
|
||||
-lgtk -lgdk -lglib -lXi -lXext -lX11 -lm
|
||||
|
||||
Not only is the form using gtk-config easier to type, it will
|
||||
work on any system, no matter how GTK was configured.
|
||||
|
||||
|
||||
AM_PATH_GTK
|
||||
-----------
|
||||
|
||||
For packages configured using GNU automake, GTK also provides
|
||||
a macro to automate the process of running GTK.
|
||||
|
||||
AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
|
||||
This macro:
|
||||
|
||||
* Determines the location of GTK using gtk-config, which is either
|
||||
found in the user's path, or from the environment variable
|
||||
GTK_CONFIG
|
||||
|
||||
* Tests the installed libraries to make sure that there version
|
||||
is later than MINIMUM-VERSION. (A default version will be used
|
||||
if not specified)
|
||||
|
||||
* If the required version was found, sets the GTK_CFLAGS variable to
|
||||
the output of `gtk-config --cflags` and the GTK_LIBS variable to
|
||||
the output of `gtk-config --libs`, and calls AC_SUBST() for these
|
||||
variables so they can be used in generated makefiles, and then
|
||||
executes ACTION-IF-FOUND.
|
||||
|
||||
* If the required version was not found, sets GTK_CFLAGS and GTK_LIBS
|
||||
to empty strings, and executes ACTION-IF-NOT-FOUND.
|
||||
|
||||
This macro is in file 'gtk.m4' which is installed in $datadir/aclocal.
|
||||
Note that if automake was installed with a different --prefix than
|
||||
GTK, you will either have to manually move gtk.m4 to automake's
|
||||
$datadir/aclocal, or give aclocal the -I option when running it.
|
||||
|
||||
|
||||
Configuring a package that uses AM_PATH_GTK
|
||||
-------------------------------------------
|
||||
|
||||
Simply make sure that gtk-config is in your path, and run
|
||||
the configure script.
|
||||
|
||||
Notes:
|
||||
|
||||
* The directory where the GTK libraries are installed needs
|
||||
to be found by your system's dynamic linker.
|
||||
|
||||
This is generally done by
|
||||
|
||||
editing /etc/ld.so.conf and running ldconfig
|
||||
|
||||
Or by:
|
||||
|
||||
setting the environment variable LD_LIBRARY_PATH,
|
||||
|
||||
or, as a last resort,
|
||||
|
||||
Giving a -R or -rpath flag (depending on your linker) when
|
||||
running configure, for instance:
|
||||
|
||||
LDFLAGS=-R/usr/home/owen/lib ./configure
|
||||
|
||||
* You can also specify a gtk-config not in your path by
|
||||
setting the GTK_CONFIG environment variable to the
|
||||
name of the executable
|
||||
|
||||
* If you move the GTK package from its installed location,
|
||||
you will need either need to modify gtk-config script
|
||||
manually to point to the new location or rebuild GTK.
|
||||
|
||||
Advanced note:
|
||||
|
||||
* configure flags
|
||||
|
||||
--with-gtk-prefix=PREFIX
|
||||
--with-gtk-exec-prefix=PREFIX
|
||||
|
||||
are provided to override the prefix and exec-prefix that were stored
|
||||
in the gtk-config shell script by GTK's configure. You are generally
|
||||
better off configuring GTK with the right path to begin with.
|
||||
|
||||
Example of a package using AM_PATH_GTK
|
||||
--------------------------------------
|
||||
|
||||
The following shows how to build a simple package using automake
|
||||
and the AM_PATH_GTK macro. The program used here is the testinput.c
|
||||
|
||||
You should first read the introductory portions of the automake
|
||||
Manual, if you are not already familiar with it.
|
||||
|
||||
Two files are needed, 'configure.ac', which is used to build the
|
||||
configure script:
|
||||
|
||||
==configure.ac===
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(testinput.c)
|
||||
|
||||
AM_INIT_AUTOMAKE(testinput.c, 1.0.0)
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_PATH_GTK(0.99.5,
|
||||
[LIBS="$LIBS $GTK_LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"],
|
||||
AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
=================
|
||||
|
||||
The only command in this which is not standard for automake
|
||||
is the AM_PATH_GTK() macro.
|
||||
|
||||
That command does the following:
|
||||
|
||||
If a GTK version greater than 0.99.5 is found, adds $GTK_LIBS to
|
||||
$LIBS and $GTK_CFLAGS to $CFLAGS. Otherwise, dies with the error
|
||||
message "Cannot find GTK: Is gtk-config in path?"
|
||||
|
||||
And the 'Makefile.am', which will be used to build the Makefile.
|
||||
|
||||
== Makefile.am ==
|
||||
bin_PROGRAMS = testinput
|
||||
testinput_SOURCES = testinput.c
|
||||
=================
|
||||
|
||||
This Makefile.am, says that we are building a single executable,
|
||||
from a single sourcefile 'testinput.c'. Since every program
|
||||
we are building uses GTK we simply added the GTK options
|
||||
to $LIBS and $CFLAGS, but in other circumstances, we might
|
||||
want to specify them on a per-program basis: for instance by
|
||||
adding the lines:
|
||||
|
||||
testinput_LDADD = $(GTK_LIBS)
|
||||
INCLUDES = $(GTK_CFLAGS)
|
||||
|
||||
to the Makefile.am.
|
||||
|
||||
To try this example out, create a new directory, add the two
|
||||
files above two it, and copy the testinput.c file from
|
||||
the gtk/ subdirectory to the new directory. Edit the line:
|
||||
|
||||
#include "gtk.h"
|
||||
|
||||
in testgtk.c, to read:
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
Now execute the following commands:
|
||||
|
||||
automake --add-missing
|
||||
aclocal
|
||||
autoconf
|
||||
|
||||
You now have a package that can be built in the normal fashion
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
Notes:
|
||||
|
||||
* If you are converting a package that used a pre-1.0 version of
|
||||
GTK, you should remove the autoconf tests for X. The results
|
||||
of these tests are included in gtk-config and will be added
|
||||
to GTK_LIBS and GTK_CFLAGS by the AM_PATH_GTK macro.
|
||||
|
||||
Owen Taylor
|
||||
14 Mar 1997
|
||||
@@ -17,47 +17,29 @@
|
||||
<reference id="reference">
|
||||
<title>API Reference</title>
|
||||
<xi:include href="xml/general.xml" />
|
||||
|
||||
<xi:include href="multihead.sgml" />
|
||||
<xi:include href="xml/gdkdisplay.xml" />
|
||||
<xi:include href="xml/gdkdisplaymanager.xml" />
|
||||
<xi:include href="xml/gdkscreen.xml" />
|
||||
|
||||
<xi:include href="xml/regions.xml" />
|
||||
<xi:include href="xml/drawing.xml" />
|
||||
|
||||
<xi:include href="xml/pixmaps.xml" />
|
||||
<xi:include href="xml/pixbufs.xml" />
|
||||
|
||||
<xi:include href="xml/colors.xml" />
|
||||
<xi:include href="xml/rgba_colors.xml" />
|
||||
<xi:include href="xml/visuals.xml" />
|
||||
|
||||
<xi:include href="xml/fonts.xml" />
|
||||
<xi:include href="xml/cursors.xml" />
|
||||
|
||||
<xi:include href="xml/windows.xml" />
|
||||
|
||||
<xi:include href="xml/events.xml" />
|
||||
<xi:include href="xml/event_structs.xml" />
|
||||
|
||||
<xi:include href="xml/keys.xml" />
|
||||
|
||||
<xi:include href="xml/selections.xml" />
|
||||
<xi:include href="xml/dnd.xml" />
|
||||
|
||||
<xi:include href="xml/properties.xml" />
|
||||
|
||||
<xi:include href="xml/threads.xml" />
|
||||
|
||||
<xi:include href="xml/input.xml" />
|
||||
<xi:include href="xml/gdkdevicemanager.xml" />
|
||||
|
||||
<xi:include href="xml/pango_interaction.xml" />
|
||||
<xi:include href="xml/cairo_interaction.xml" />
|
||||
<xi:include href="xml/x_interaction.xml" />
|
||||
|
||||
<xi:include href="xml/gdkapplaunchcontext.xml" />
|
||||
|
||||
<xi:include href="xml/gdktesting.xml" />
|
||||
</reference>
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ gdk_beep
|
||||
<SUBSECTION>
|
||||
gdk_error_trap_push
|
||||
gdk_error_trap_pop
|
||||
gdk_error_trap_pop_ignored
|
||||
|
||||
<SUBSECTION>
|
||||
GDK_WINDOWING_X11
|
||||
@@ -189,11 +190,7 @@ gdk_display_manager_get_type
|
||||
<TITLE>GdkScreen</TITLE>
|
||||
GdkScreen
|
||||
gdk_screen_get_default
|
||||
gdk_screen_get_default_colormap
|
||||
gdk_screen_set_default_colormap
|
||||
gdk_screen_get_system_colormap
|
||||
gdk_screen_get_system_visual
|
||||
gdk_screen_get_rgba_colormap
|
||||
gdk_screen_get_rgba_visual
|
||||
gdk_screen_is_composited
|
||||
gdk_screen_get_root_window
|
||||
@@ -239,50 +236,17 @@ GdkScreenClass
|
||||
gdk_screen_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Bitmaps and Pixmaps</TITLE>
|
||||
<FILE>pixmaps</FILE>
|
||||
GdkPixmap
|
||||
gdk_pixmap_new
|
||||
GdkBitmap
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_PIXMAP
|
||||
GDK_PIXMAP_GET_CLASS
|
||||
GDK_PIXMAP_OBJECT
|
||||
GDK_TYPE_PIXMAP
|
||||
GDK_IS_PIXMAP
|
||||
GDK_PIXMAP_CLASS
|
||||
GDK_IS_PIXMAP_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_pixmap_get_type
|
||||
GdkPixmapObject
|
||||
GdkPixmapObjectClass
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Pixbufs</TITLE>
|
||||
<FILE>pixbufs</FILE>
|
||||
gdk_pixbuf_render_threshold_alpha
|
||||
gdk_pixbuf_render_pixmap_and_mask
|
||||
gdk_pixbuf_render_pixmap_and_mask_for_colormap
|
||||
gdk_pixbuf_get_from_drawable
|
||||
gdk_pixbuf_get_from_window
|
||||
gdk_pixbuf_get_from_surface
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Colormaps and Colors</TITLE>
|
||||
<TITLE>Colors</TITLE>
|
||||
<FILE>colors</FILE>
|
||||
GdkColor
|
||||
GdkColormap
|
||||
gdk_colormap_new
|
||||
gdk_colormap_get_system
|
||||
gdk_colormap_alloc_colors
|
||||
gdk_colormap_alloc_color
|
||||
gdk_colormap_free_colors
|
||||
gdk_colormap_get_visual
|
||||
gdk_colormap_get_screen
|
||||
gdk_color_copy
|
||||
gdk_color_free
|
||||
gdk_color_parse
|
||||
@@ -291,31 +255,29 @@ gdk_color_hash
|
||||
gdk_color_to_string
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_COLORMAP
|
||||
GDK_COLORMAP_GET_CLASS
|
||||
GDK_TYPE_COLORMAP
|
||||
GDK_IS_COLORMAP
|
||||
GDK_COLORMAP_CLASS
|
||||
GDK_IS_COLORMAP_CLASS
|
||||
GDK_TYPE_COLOR
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkColormapClass
|
||||
gdk_colormap_get_type
|
||||
gdk_color_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>RGBA Colors</TITLE>
|
||||
<FILE>rgba_colors</FILE>
|
||||
GdkRGBA
|
||||
gdk_rgba_copy
|
||||
gdk_rgba_free
|
||||
gdk_rgba_parse
|
||||
gdk_rgba_equal
|
||||
gdk_rgba_hash
|
||||
gdk_rgba_to_string
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_RGBA
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Drawing Primitives</TITLE>
|
||||
<FILE>drawing</FILE>
|
||||
GdkDrawable
|
||||
gdk_drawable_get_display
|
||||
gdk_drawable_get_screen
|
||||
gdk_drawable_get_visual
|
||||
gdk_drawable_set_colormap
|
||||
gdk_drawable_get_colormap
|
||||
gdk_drawable_get_depth
|
||||
gdk_drawable_get_size
|
||||
gdk_drawable_get_clip_region
|
||||
gdk_drawable_get_visible_region
|
||||
|
||||
@@ -388,6 +350,9 @@ GdkWindowAttributesType
|
||||
gdk_window_new
|
||||
gdk_window_destroy
|
||||
gdk_window_get_window_type
|
||||
gdk_window_get_display
|
||||
gdk_window_get_screen
|
||||
gdk_window_get_visual
|
||||
gdk_window_at_pointer
|
||||
gdk_window_show
|
||||
gdk_window_show_unraised
|
||||
@@ -421,9 +386,6 @@ gdk_window_flush
|
||||
gdk_window_has_native
|
||||
gdk_window_ensure_native
|
||||
gdk_window_reparent
|
||||
gdk_window_clear
|
||||
gdk_window_clear_area
|
||||
gdk_window_clear_area_e
|
||||
gdk_window_raise
|
||||
gdk_window_lower
|
||||
gdk_window_restack
|
||||
@@ -442,6 +404,7 @@ gdk_window_end_paint
|
||||
<SUBSECTION>
|
||||
gdk_window_invalidate_rect
|
||||
gdk_window_invalidate_region
|
||||
GdkWindowChildFunc
|
||||
gdk_window_invalidate_maybe_recurse
|
||||
gdk_window_get_update_area
|
||||
gdk_window_freeze_updates
|
||||
@@ -449,7 +412,6 @@ gdk_window_thaw_updates
|
||||
gdk_window_process_all_updates
|
||||
gdk_window_process_updates
|
||||
gdk_window_set_debug_updates
|
||||
gdk_window_get_internal_paint_info
|
||||
gdk_window_enable_synchronized_configure
|
||||
gdk_window_configure_finished
|
||||
|
||||
@@ -465,18 +427,17 @@ gdk_window_remove_filter
|
||||
GdkFilterFunc
|
||||
GdkFilterReturn
|
||||
GdkXEvent
|
||||
gdk_window_shape_combine_mask
|
||||
gdk_window_shape_combine_region
|
||||
gdk_window_set_child_shapes
|
||||
gdk_window_merge_child_shapes
|
||||
gdk_window_input_shape_combine_mask
|
||||
gdk_window_input_shape_combine_region
|
||||
gdk_window_set_child_input_shapes
|
||||
gdk_window_merge_child_input_shapes
|
||||
gdk_window_set_static_gravities
|
||||
gdk_window_set_title
|
||||
gdk_window_set_background
|
||||
gdk_window_set_back_pixmap
|
||||
gdk_window_set_background_rgba
|
||||
gdk_window_set_background_pattern
|
||||
gdk_window_get_background_pattern
|
||||
GDK_PARENT_RELATIVE
|
||||
gdk_window_set_cursor
|
||||
@@ -484,6 +445,8 @@ gdk_window_get_cursor
|
||||
gdk_window_get_user_data
|
||||
gdk_window_get_geometry
|
||||
gdk_window_set_geometry_hints
|
||||
gdk_window_get_width
|
||||
gdk_window_get_height
|
||||
gdk_window_set_icon_list
|
||||
gdk_window_set_modal_hint
|
||||
gdk_window_get_modal_hint
|
||||
@@ -496,7 +459,6 @@ gdk_window_get_position
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_frame_extents
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_deskrelative_origin
|
||||
gdk_window_get_root_coords
|
||||
gdk_window_get_pointer
|
||||
gdk_window_get_device_position
|
||||
@@ -507,7 +469,6 @@ gdk_window_get_children
|
||||
gdk_window_peek_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
|
||||
@@ -534,12 +495,10 @@ GdkPointerHooks
|
||||
gdk_set_pointer_hooks
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_offscreen_window_get_pixmap
|
||||
gdk_offscreen_window_get_surface
|
||||
gdk_offscreen_window_set_embedder
|
||||
gdk_offscreen_window_get_embedder
|
||||
gdk_window_geometry_changed
|
||||
gdk_window_redirect_to_drawable
|
||||
gdk_window_remove_redirection
|
||||
gdk_window_coords_from_parent
|
||||
gdk_window_coords_to_parent
|
||||
gdk_window_get_effective_parent
|
||||
@@ -650,12 +609,15 @@ gdk_pango_context_get_for_screen
|
||||
<FILE>cairo_interaction</FILE>
|
||||
gdk_window_create_similar_surface
|
||||
gdk_cairo_create
|
||||
gdk_cairo_get_clip_rectangle
|
||||
gdk_cairo_set_source_color
|
||||
gdk_cairo_set_source_rgba
|
||||
gdk_cairo_set_source_pixbuf
|
||||
gdk_cairo_set_source_pixmap
|
||||
gdk_cairo_set_source_window
|
||||
gdk_cairo_rectangle
|
||||
gdk_cairo_region
|
||||
gdk_cairo_reset_clip
|
||||
gdk_cairo_region_create_from_surface
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -680,7 +642,6 @@ GDK_THREADS_LEAVE
|
||||
gdk_threads_init
|
||||
gdk_threads_enter
|
||||
gdk_threads_leave
|
||||
gdk_threads_mutex
|
||||
gdk_threads_set_lock_functions
|
||||
gdk_threads_add_idle
|
||||
gdk_threads_add_idle_full
|
||||
@@ -939,7 +900,6 @@ gdk_owner_change_get_type
|
||||
GdkCursor
|
||||
GdkCursorType
|
||||
gdk_cursor_new
|
||||
gdk_cursor_new_from_pixmap
|
||||
gdk_cursor_new_from_pixbuf
|
||||
gdk_cursor_new_from_name
|
||||
gdk_cursor_new_for_display
|
||||
@@ -1006,35 +966,24 @@ gdk_drag_context_get_type
|
||||
<TITLE>X Window System Interaction</TITLE>
|
||||
<FILE>x_interaction</FILE>
|
||||
GDK_ROOT_WINDOW
|
||||
GDK_DISPLAY
|
||||
GDK_WINDOW_XDISPLAY
|
||||
GDK_WINDOW_XID
|
||||
GDK_PIXMAP_XDISPLAY
|
||||
GDK_PIXMAP_XID
|
||||
GDK_DISPLAY_XDISPLAY
|
||||
GDK_DRAWABLE_XDISPLAY
|
||||
GDK_DRAWABLE_XID
|
||||
GDK_COLORMAP_XDISPLAY
|
||||
GDK_COLORMAP_XCOLORMAP
|
||||
GDK_SCREEN_XDISPLAY
|
||||
GDK_SCREEN_XNUMBER
|
||||
GDK_SCREEN_XSCREEN
|
||||
GDK_VISUAL_XVISUAL
|
||||
GDK_CURSOR_XCURSOR
|
||||
GDK_CURSOR_XDISPLAY
|
||||
GDK_WINDOW_XWINDOW
|
||||
gdkx_visual_get
|
||||
gdk_pixmap_foreign_new
|
||||
gdk_pixmap_foreign_new_for_display
|
||||
gdk_pixmap_foreign_new_for_screen
|
||||
gdk_window_foreign_new
|
||||
gdk_window_foreign_new_for_display
|
||||
gdk_xid_table_lookup
|
||||
gdk_xid_table_lookup_for_display
|
||||
gdk_window_lookup
|
||||
gdk_window_lookup_for_display
|
||||
gdk_pixmap_lookup
|
||||
gdk_pixmap_lookup_for_display
|
||||
gdk_x11_lookup_xdisplay
|
||||
gdk_x11_get_server_time
|
||||
gdk_net_wm_supports
|
||||
@@ -1045,9 +994,6 @@ gdk_x11_screen_lookup_visual
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_move_to_current_desktop
|
||||
gdk_x11_display_get_user_time
|
||||
gdk_x11_colormap_foreign_new
|
||||
gdk_x11_colormap_get_xcolormap
|
||||
gdk_x11_colormap_get_xdisplay
|
||||
gdk_x11_cursor_get_xcursor
|
||||
gdk_x11_cursor_get_xdisplay
|
||||
gdk_x11_display_broadcast_startup_message
|
||||
@@ -1055,6 +1001,9 @@ gdk_x11_display_get_startup_notification_id
|
||||
gdk_x11_display_get_xdisplay
|
||||
gdk_x11_display_grab
|
||||
gdk_x11_display_ungrab
|
||||
gdk_x11_display_error_trap_push
|
||||
gdk_x11_display_error_trap_pop
|
||||
gdk_x11_display_error_trap_pop_ignored
|
||||
gdk_x11_display_set_cursor_theme
|
||||
gdk_x11_register_standard_event_type
|
||||
gdk_x11_drawable_get_xdisplay
|
||||
@@ -1077,10 +1026,8 @@ gdk_x11_get_xatom_name
|
||||
gdk_x11_get_xatom_name_for_display
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_display
|
||||
GDK_HAVE_WCHAR_H
|
||||
GDK_HAVE_WCTYPE_H
|
||||
gdk_x11_pixmap_get_drawable_impl
|
||||
gdk_x11_window_get_drawable_impl
|
||||
</SECTION>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ gdk_display_manager_get_type
|
||||
gdk_screen_get_type
|
||||
gdk_drawable_get_type
|
||||
gdk_window_object_get_type
|
||||
gdk_pixmap_get_type
|
||||
gdk_keymap_get_type
|
||||
gdk_device_get_type
|
||||
gdk_device_manager_get_type
|
||||
|
||||
@@ -106,12 +106,12 @@ gtk_window_set_screen (window, second_screen);<!--
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-GdkDisplay">GdkDisplay</link></term>
|
||||
<term><link linkend="GdkDisplay">GdkDisplay</link></term>
|
||||
<listitem><para>the GDK Object used to represent and manipulate display
|
||||
related data</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-GdkScreen">GdkScreen</link></term>
|
||||
<term><link linkend="GdkScreen">GdkScreen</link></term>
|
||||
<listitem><para>the GDK Object used to represent and query screen related
|
||||
data</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
4
docs/reference/gdk/tmpl/.gitignore
vendored
4
docs/reference/gdk/tmpl/.gitignore
vendored
@@ -1,2 +1,6 @@
|
||||
cairo_interaction.sgml
|
||||
colors.sgml
|
||||
dnd.sgml
|
||||
pixbufs.sgml
|
||||
regions.sgml
|
||||
windows.sgml
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Cairo Interaction
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions to support using Cairo
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
<link href="http://cairographics.org">Cairo</link> is a graphics
|
||||
library that supports vector graphics and image compositing that
|
||||
can be used with GDK. Since 2.8, GTK+ does most of its drawing
|
||||
using Cairo.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK does not wrap the Cairo API, instead it allows to create Cairo
|
||||
contexts which can be used to draw on GDK drawables. Additional
|
||||
functions allow to convert GDK's rectangles and regions into
|
||||
Cairo paths and to use pixbufs as sources for drawing operations.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_set_source_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_set_source_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@pixbuf:
|
||||
@pixbuf_x:
|
||||
@pixbuf_y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_set_source_pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@pixmap:
|
||||
@pixmap_x:
|
||||
@pixmap_y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_rectangle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@rectangle:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@region:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_reset_clip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@drawable:
|
||||
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Colormaps and Colors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Manipulation of colors and colormaps
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions are used to modify colormaps.
|
||||
A colormap is an object that contains the mapping
|
||||
between the color values stored in memory and
|
||||
the RGB values that are used to display color
|
||||
values. In general, colormaps only contain
|
||||
significant information for pseudo-color visuals,
|
||||
but even for other visual types, a colormap object
|
||||
is required in some circumstances.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are a couple of special colormaps that can
|
||||
be retrieved. The system colormap (retrieved
|
||||
with gdk_colormap_get_system()) is the default
|
||||
colormap of the system. If you are using GdkRGB,
|
||||
there is another colormap that is important - the
|
||||
colormap in which GdkRGB works, retrieved with
|
||||
gdk_rgb_get_colormap(). However, when using GdkRGB,
|
||||
it is not generally necessary to allocate colors
|
||||
directly.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In previous revisions of this interface, a number
|
||||
of functions that take a #GdkColormap parameter
|
||||
were replaced with functions whose names began
|
||||
with "gdk_colormap_".
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkColor ##### -->
|
||||
<para>
|
||||
The #GdkColor structure is used to describe an
|
||||
allocated or unallocated color.
|
||||
</para>
|
||||
|
||||
@pixel: For allocated colors, the value used to
|
||||
draw this color on the screen.
|
||||
@red: The red component of the color. This is
|
||||
a value between 0 and 65535, with 65535 indicating
|
||||
full intensitiy.
|
||||
@green: The green component of the color.
|
||||
@blue: The blue component of the color.
|
||||
|
||||
<!-- ##### STRUCT GdkColormap ##### -->
|
||||
<para>
|
||||
The colormap structure contains the following public fields.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_new ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@allocate:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@colors:
|
||||
@n_colors:
|
||||
@writeable:
|
||||
@best_match:
|
||||
@success:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@writeable:
|
||||
@best_match:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@colors:
|
||||
@n_colors:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cmap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_copy ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_free ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_parse ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@spec:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_equal ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colora:
|
||||
@colorb:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_hash ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@colora:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_to_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ Standard and pixmap cursors
|
||||
<para>
|
||||
These functions are used to create and destroy cursors.
|
||||
There is a number of standard cursors, but it is also
|
||||
possible to construct new cursors from pixmaps and
|
||||
pixbufs. There may be limitations as to what kinds of
|
||||
cursors can be constructed on a given display, see
|
||||
gdk_display_supports_cursor_alpha(),
|
||||
possible to construct new cursors from pixbufs. There
|
||||
may be limitations as to what kinds of cursors can be
|
||||
constructed on a given display, see
|
||||
gdk_display_supports_cursor_alpha(),
|
||||
gdk_display_supports_cursor_color(),
|
||||
gdk_display_get_default_cursor_size() and
|
||||
gdk_display_get_maximal_cursor_size().
|
||||
@@ -125,7 +125,7 @@ The standard cursors available.
|
||||
@GDK_LAST_CURSOR: last cursor type
|
||||
@GDK_BLANK_CURSOR: Blank cursor. Since 2.16
|
||||
@GDK_CURSOR_IS_PIXMAP: type of cursors constructed with
|
||||
gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
|
||||
gdk_cursor_new_from_pixbuf()
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new ##### -->
|
||||
<para>
|
||||
@@ -136,19 +136,6 @@ The standard cursors available.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixmap ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@source:
|
||||
@mask:
|
||||
@fg:
|
||||
@bg:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -45,70 +45,6 @@ or a #GdkWindow.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_set_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -77,33 +77,6 @@ when GDK gets multihead support.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_default_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_set_default_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_system_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_system_visual ##### -->
|
||||
<para>
|
||||
|
||||
@@ -113,15 +86,6 @@ when GDK gets multihead support.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgba_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgba_visual ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -329,37 +329,25 @@ available.
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
|
||||
<para>
|
||||
This function allows X errors to be trapped instead of the normal behavior
|
||||
of exiting the application. It should only be used if it is not possible to
|
||||
avoid the X error in any other way.
|
||||
|
||||
</para>
|
||||
<example>
|
||||
<title>Trapping an X error</title>
|
||||
<programlisting>
|
||||
gdk_error_trap_push (<!-- -->);
|
||||
|
||||
/* ... Call the X function which may cause an error here ... */
|
||||
|
||||
/* Flush the X queue to catch errors now. */
|
||||
gdk_flush (<!-- -->);
|
||||
|
||||
if (gdk_error_trap_pop (<!-- -->))
|
||||
{
|
||||
/* ... Handle the error here ... */
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
|
||||
<!-- ##### MACRO gdk_error_trap_pop ##### -->
|
||||
<para>
|
||||
Removes the X error trap installed with gdk_error_trap_push().
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_pop_ignored ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the X error code, or 0 if no error occurred.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
|
||||
|
||||
@@ -11,13 +11,12 @@ They appear in the <structfield>keyval</structfield> field of the
|
||||
#GdkEventKey structure, which is passed to signal handlers for the
|
||||
"key-press-event" and "key-release-event" signals.
|
||||
The complete list of key values can be found in the <filename><gdk/gdkkeysyms.h></filename>
|
||||
header file. <filename><gdk/gdkkeysyms.h></filename> is not included in <filename><gdk/gdk.h></filename>,
|
||||
it must be included independently, because the file is quite large.
|
||||
header file.
|
||||
</para>
|
||||
<para>
|
||||
Key values are regularly updated from the upstream X.org X11 implementation,
|
||||
so new values are added regularly. They will be prefixed with GDK_ rather than
|
||||
XF86XK_ or XK_ (for older symbols).
|
||||
so new values are added regularly. They will be prefixed with GDK_KEY_ rather
|
||||
than XF86XK_ or XK_ (for older symbols).
|
||||
</para>
|
||||
<para>
|
||||
Key values can be converted into a string representation using
|
||||
@@ -30,7 +29,7 @@ gdk_keyval_is_lower(). Key values can be converted to upper or lower case
|
||||
using gdk_keyval_to_upper() and gdk_keyval_to_lower().
|
||||
</para>
|
||||
<para>
|
||||
When it makes sense, key values can be converted to and from
|
||||
When it makes sense, key values can be converted to and from
|
||||
Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
|
||||
</para>
|
||||
|
||||
@@ -270,7 +269,7 @@ Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL.
|
||||
<para>
|
||||
Converts a key value into a symbolic name.
|
||||
The names are the same as those in the <filename><gdk/gdkkeysyms.h></filename> header file
|
||||
but without the leading "GDK_".
|
||||
but without the leading "GDK_KEY_".
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
|
||||
@@ -7,9 +7,9 @@ Using Pango in GDK
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Pango is the text layout system used by GDK and GTK+. The functions
|
||||
and types in this section are used to render Pango objects to GDK.
|
||||
drawables, and also extend the set of Pango attributes to include
|
||||
stippling and embossing.
|
||||
and types in this section are used to obtain clip regions for
|
||||
#PangoLayouts, and to get #PangoContexts that can be used with
|
||||
GDK.
|
||||
</para>
|
||||
<para>
|
||||
Creating a #PangoLayout object is the first step in rendering text,
|
||||
@@ -24,51 +24,38 @@ between Pango units and pixels using <link
|
||||
linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link> or the PANGO_PIXELS() macro.)
|
||||
</para>
|
||||
<para>
|
||||
Rendering a Pango layout is done most simply with gdk_draw_layout();
|
||||
you can also draw pieces of the layout with gdk_draw_layout().
|
||||
#GdkPangoRenderer is a subclass of #PangoRenderer that is used internally
|
||||
to implement these functions. Using it directly or subclassing it can be
|
||||
useful in some cases. See the #GdkPangoRenderer documentation for details.
|
||||
Rendering a Pango layout is done most simply with pango_cairo_show_layout();
|
||||
you can also draw pieces of the layout with pango_cairo_show_layout_line().
|
||||
</para>
|
||||
<example id="rotated-example">
|
||||
<title>Using #GdkPangoRenderer to draw transformed text</title>
|
||||
<title>Draw transformed text with Pango and cairo</title>
|
||||
<!-- Note that this example is basically the same as
|
||||
demos/gtk-demo/rotated_text.c -->
|
||||
<programlisting>
|
||||
#define RADIUS 100
|
||||
#define N_WORDS 10
|
||||
#define FONT "Sans Bold 18"
|
||||
|
||||
GdkScreen *screen = gdk_drawable_get_screen (drawable);
|
||||
PangoRenderer *renderer;
|
||||
GdkGC *gc;
|
||||
|
||||
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
||||
PangoContext *context;
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
double device_radius;
|
||||
double radius;
|
||||
int width, height;
|
||||
int i;
|
||||
|
||||
/* Get the default renderer for the screen, and set it up for drawing */
|
||||
renderer = gdk_pango_renderer_get_default (screen);
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), drawable);
|
||||
|
||||
gc = gdk_gc_new (drawable);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), gc);
|
||||
|
||||
/* Set up a transformation matrix so that the user space coordinates for
|
||||
* where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
* We first center, then change the scale */
|
||||
gdk_drawable_get_size (drawable, &width, &height);
|
||||
device_radius = MIN (width, height) / 2.;
|
||||
|
||||
pango_matrix_translate (&matrix,
|
||||
device_radius + (width - 2 * device_radius) / 2,
|
||||
device_radius + (height - 2 * device_radius) / 2);
|
||||
pango_matrix_scale (&matrix, device_radius / RADIUS, device_radius / RADIUS);
|
||||
width = gdk_window_get_width (window);
|
||||
height = gdk_window_get_height (window);
|
||||
radius = MIN (width, height) / 2.;
|
||||
|
||||
cairo_translate (cr,
|
||||
radius + (width - 2 * radius) / 2,
|
||||
radius + (height - 2 * radius) / 2);
|
||||
cairo_scale (cr, radius / RADIUS, radius / RADIUS);
|
||||
|
||||
/* Create a PangoLayout, set the font and text */
|
||||
context = gdk_pango_context_get_for_screen (screen);
|
||||
@@ -81,41 +68,32 @@ pango_font_description_free (desc);
|
||||
/* Draw the layout N_WORDS times in a circle */
|
||||
for (i = 0; i < N_WORDS; i++)
|
||||
{
|
||||
GdkColor color;
|
||||
PangoMatrix rotated_matrix = matrix;
|
||||
int width, height;
|
||||
double angle = (360. * i) / N_WORDS;
|
||||
double red, green, blue;
|
||||
double angle = 2 * G_PI * i / n_words;
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
/* Gradient from red at angle == 60 to blue at angle == 300 */
|
||||
color.red = 65535 * (1 + cos ((angle - 60) * M_PI / 180.)) / 2;
|
||||
color.green = 0;
|
||||
color.blue = 65535 - color.red;
|
||||
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, &color);
|
||||
|
||||
pango_matrix_rotate (&rotated_matrix, angle);
|
||||
red = (1 + cos (angle - 60)) / 2;
|
||||
green = 0;
|
||||
blue = 1 - red;
|
||||
|
||||
cairo_set_source_rgb (cr, red, green, blue);
|
||||
cairo_rotate (cr, angle);
|
||||
|
||||
pango_context_set_matrix (context, &rotated_matrix);
|
||||
|
||||
/* Inform Pango to re-layout the text with the new transformation matrix */
|
||||
pango_layout_context_changed (layout);
|
||||
|
||||
pango_cairo_update_layout (cr, layout);
|
||||
|
||||
pango_layout_get_size (layout, &width, &height);
|
||||
pango_renderer_draw_layout (renderer, layout,
|
||||
- width / 2, - RADIUS * PANGO_SCALE);
|
||||
|
||||
cairo_move_to (cr, - width / 2 / PANGO_SCALE, - DEFAULT_TEXT_RADIUS);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
/* Clean up default renderer, since it is shared */
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, NULL);
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
|
||||
/* free the objects we created */
|
||||
g_object_unref (layout);
|
||||
g_object_unref (context);
|
||||
g_object_unref (gc);
|
||||
</programlisting>
|
||||
</example>
|
||||
<figure>
|
||||
@@ -160,3 +138,21 @@ g_object_unref (gc);
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_context_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_context_get_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Pixbufs
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for rendering pixbufs on drawables
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions allow to render pixbufs on drawables. Pixbufs are
|
||||
client-side images. For details on how to create and manipulate
|
||||
pixbufs, see the #GdkPixbuf API documentation.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_threshold_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@bitmap:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@alpha_threshold:
|
||||
|
||||
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@pixmap_return:
|
||||
@mask_return:
|
||||
@alpha_threshold:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask_for_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@colormap:
|
||||
@pixmap_return:
|
||||
@mask_return:
|
||||
@alpha_threshold:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_from_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@src:
|
||||
@cmap:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_from_surface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@surface:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Points and Rectangles
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Simple graphical data types
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
GDK provides the #GdkPoint and #GdkRectangle data types for representing pixels
|
||||
and sets of pixels on the screen. Together with Cairo's #cairo_region_t data
|
||||
type, they make up the central types for representing graphical data.
|
||||
</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>
|
||||
#cairo_region_t is usually used for managing clipping of graphical operations.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPoint ##### -->
|
||||
<para>
|
||||
Defines the x and y coordinates of a point.
|
||||
</para>
|
||||
|
||||
@x: the x coordinate of the point.
|
||||
@y: the y coordinate of the point.
|
||||
|
||||
<!-- ##### TYPEDEF GdkRectangle ##### -->
|
||||
<para>
|
||||
Defines the position and size of a rectangle. It is identical to
|
||||
#cairo_rectangle_int_t.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rectangle_intersect ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src1:
|
||||
@src2:
|
||||
@dest:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rectangle_union ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src1:
|
||||
@src2:
|
||||
@dest:
|
||||
|
||||
|
||||
@@ -300,13 +300,6 @@ Leaves a critical region begun with gdk_threads_enter().
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_threads_mutex ##### -->
|
||||
<para>
|
||||
The #GMutex used to implement the critical region for
|
||||
gdk_threads_enter()/gdk_threads_leave().
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_set_lock_functions ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -18,12 +18,8 @@ of an RGB pixel may be in the top 8 bits of the pixel, or may be in the lower
|
||||
</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()).
|
||||
by gdk_screen_get_system_visual() is the system's default
|
||||
visual.
|
||||
</para>
|
||||
<para>
|
||||
A number of functions are provided for determining
|
||||
@@ -40,7 +36,7 @@ then %GDK_VISUAL_STATIC_GRAY.
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkColormap
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
@@ -6,7 +6,17 @@ X backend-specific functions
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
The functions in this section are specific to the GDK X11 backend.
|
||||
To use them, you need to include the <literal><gdk/gdkx.h></literal>
|
||||
header and use the X11-specific pkg-config files to build your application
|
||||
(either <literal>gdk-x11-3.0</literal> or <literal>gtk+-x11-3.0</literal>.
|
||||
To make your code compile with other GDK backends, guard backend-specific
|
||||
calls by an ifdef as follows:
|
||||
<informalexample><programlisting>
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
/* X11-specific calls here... */
|
||||
#endif
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
@@ -27,14 +37,6 @@ Obtains the Xlib window id of the root window of the current screen.
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_DISPLAY ##### -->
|
||||
<para>
|
||||
The current display.
|
||||
</para>
|
||||
|
||||
@Returns: an Xlib <type>Display*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOW_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkWindow.
|
||||
@@ -53,24 +55,6 @@ Returns the X window belonging to a #GdkWindow.
|
||||
@Returns: the Xlib <type>Window</type> of @win.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXMAP_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkPixmap.
|
||||
</para>
|
||||
|
||||
@pix: a #GdkPixmap.
|
||||
@Returns: an Xlib <type>Display*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXMAP_XID ##### -->
|
||||
<para>
|
||||
Returns the X pixmap belonging to a #GdkPixmap.
|
||||
</para>
|
||||
|
||||
@pix: a #GdkPixmap.
|
||||
@Returns: the Xlib <type>XPixmap</type> of @win.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_DISPLAY_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkDisplay.
|
||||
@@ -97,24 +81,6 @@ Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
|
||||
@Returns: the ID of @win's X resource.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_COLORMAP_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkColormap.
|
||||
</para>
|
||||
|
||||
@cmap: a #GdkColormap.
|
||||
@Returns: an Xlib <type>Display*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_COLORMAP_XCOLORMAP ##### -->
|
||||
<para>
|
||||
Returns the X colormap belonging to a #GdkColormap.
|
||||
</para>
|
||||
|
||||
@cmap: a #GdkColormap.
|
||||
@Returns: an Xlib <type>Colormap</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SCREEN_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkScreen.
|
||||
@@ -143,15 +109,6 @@ Returns the screen of a #GdkScreen.
|
||||
@Returns: an Xlib <type>Screen*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_VISUAL_XVISUAL ##### -->
|
||||
<para>
|
||||
Returns the X visual belonging to a #GdkVisual.
|
||||
</para>
|
||||
|
||||
@vis: a #GdkVisual.
|
||||
@Returns: an Xlib <type>Visual*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_CURSOR_XCURSOR ##### -->
|
||||
<para>
|
||||
Returns the X cursor belonging to a #GdkCursor.
|
||||
@@ -186,38 +143,6 @@ Another name for GDK_DRAWABLE_XID().
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_foreign_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@anid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_foreign_new_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@anid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_foreign_new_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@anid:
|
||||
@width:
|
||||
@height:
|
||||
@depth:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_foreign_new ##### -->
|
||||
<para>
|
||||
|
||||
@@ -274,24 +199,6 @@ Another name for GDK_DRAWABLE_XID().
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_lookup ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@anid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_lookup_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@anid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_lookup_xdisplay ##### -->
|
||||
<para>
|
||||
|
||||
@@ -384,34 +291,6 @@ Another name for GDK_DRAWABLE_XID().
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_colormap_foreign_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@xcolormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_colormap_get_xcolormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_colormap_get_xdisplay ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_cursor_get_xcursor ##### -->
|
||||
<para>
|
||||
|
||||
@@ -474,6 +353,22 @@ Another name for GDK_DRAWABLE_XID().
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_error_trap_push ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_error_trap_pop_ignored ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_set_cursor_theme ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ content_files = \
|
||||
glossary.xml \
|
||||
migrating-2to3.xml \
|
||||
migrating-checklist.sgml \
|
||||
migrating-GtkApplication.xml \
|
||||
objects_grouped.sgml \
|
||||
osx.sgml \
|
||||
question_index.sgml \
|
||||
@@ -132,138 +133,142 @@ content_files = \
|
||||
gtk-query-immodules-3.0.xml \
|
||||
gtk-update-icon-cache-3.0.xml \
|
||||
gtk-builder-convert-3.0.xml \
|
||||
visual_index.xml
|
||||
visual_index.xml \
|
||||
getting_started.xml \
|
||||
overview.xml
|
||||
|
||||
expand_content_files = \
|
||||
drawing-model.xml \
|
||||
getting_started.xml \
|
||||
glossary.xml \
|
||||
migrating-2to3.xml \
|
||||
migrating-checklist.sgml \
|
||||
tree_widget.sgml \
|
||||
migrating-GtkApplication.xml \
|
||||
question_index.sgml \
|
||||
text_widget.sgml \
|
||||
question_index.sgml
|
||||
tree_widget.sgml
|
||||
|
||||
# Images to copy into HTML directory
|
||||
HTML_IMAGES = \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-about.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-add.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/help-about.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/list-add.png \
|
||||
$(top_srcdir)/gtk/stock-icons/20/gtk-apply.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-bold.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-text-bold.png \
|
||||
$(top_srcdir)/gtk/stock-icons/20/gtk-cancel.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-caps-lock-warning.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-cdrom.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-clear.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-close.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-optical.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-clear.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/window-close.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-connect.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-convert.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-copy.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-cut.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-delete.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-authentication.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-error.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-info.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-question.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-warning.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-directory.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-copy.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-cut.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-delete.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/dialog-password.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/dialog-error.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/dialog-information.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/dialog-question.png \
|
||||
$(top_srcdir)/gtk/stock-icons/48/dialog-warning.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/folder.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-disconnect.png \
|
||||
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd.png \
|
||||
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd-multiple.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-edit.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-execute.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-file.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-find.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-find-and-replace.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-bottom.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-first-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-first-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-last-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-last-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-top.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-go-back-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-go-back-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-go-down.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-go-forward-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-go-forward-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-go-up.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-harddisk.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-network.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-help.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-home.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/system-run.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-x-generic.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-find.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-find-replace.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-bottom.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-first-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-first-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-last-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-last-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-top.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-previous-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-previous-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-down.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-next-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-next-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-up.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/drive-harddisk.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/network-idle.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/help-contents.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-home.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-index.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-indent-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-indent-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-unindent-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-unindent-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-italic.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-jump-to-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-jump-to-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-center.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-fill.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-left.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-right.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-missing-image.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-new.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-indent-more-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-indent-more-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-indent-less-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-indent-less-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-text-italic.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-jump-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-jump-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-justify-center.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-justify-fill.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-justify-left.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-justify-right.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/image-missing.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-new.png \
|
||||
$(top_srcdir)/gtk/stock-icons/20/gtk-no.png \
|
||||
$(top_srcdir)/gtk/stock-icons/20/gtk-ok.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-open.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-open.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-landscape.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-portrait.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-landscape.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-paste.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-paste.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-preferences.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-print.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-print-error.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-print-paused.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-print-preview.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-print-report.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-print-warning.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-properties.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-quit.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-redo-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-redo-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-refresh.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-remove.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-revert-to-saved-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-revert-to-saved-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-floppy.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-save.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-save-as.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-select-all.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-print.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/printer-error.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/printer-paused.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-print-preview.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/printer-info.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/printer-warning.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-properties.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/application-exit.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-redo-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-redo-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/view-refresh.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/list-remove.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-revert-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-revert-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-floppy.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-save.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-save-as.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-select-all.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-select-color.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-color-picker.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-font.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-sort-ascending.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-sort-descending.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-spell-check.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-stop.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-strikethrough.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/view-sort-ascending.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/view-sort-descending.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/tools-check-spelling.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/process-stop.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-text-strikethrough.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-underline.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-undo-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-undo-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/format-text-underline.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-undo-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-undo-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/20/gtk-yes.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-100.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-fit.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-in.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-out.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-forward-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-forward-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-next-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-next-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-pause.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-play-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-play-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-previous-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-previous-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-record.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-rewind-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-rewind-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-media-stop.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-fullscreen.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-leave-fullscreen.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-info.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/zoom-original.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/zoom-fit-best.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/zoom-in.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/zoom-out.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-seek-forward-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-seek-forward-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-skip-forward-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-skip-forward-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-playback-pause.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-playback-start-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-playback-start-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-seek-backward-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-seek-backward-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-record.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-skip-backward-ltr.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-skip-backward-rtl.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/media-playback-stop.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/view-fullscreen.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/view-restore.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
|
||||
$(srcdir)/images/aboutdialog.png \
|
||||
$(srcdir)/images/accel-label.png \
|
||||
$(srcdir)/images/assistant.png \
|
||||
@@ -315,7 +320,9 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/layout-rlbt.png \
|
||||
$(srcdir)/images/layout-rltb.png \
|
||||
$(srcdir)/images/layout-tblr.png \
|
||||
$(srcdir)/images/layout-tbrl.png
|
||||
$(srcdir)/images/layout-tbrl.png \
|
||||
$(srcdir)/images/window-default.png \
|
||||
$(srcdir)/images/hello-world.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
|
||||
|
||||
@@ -330,12 +330,8 @@ How to compile GTK+ itself
|
||||
<arg>--enable-debug=[no|minimum|yes]</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--disable-visibility</arg>
|
||||
<arg>--enable-visibility</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--disable-shm</arg>
|
||||
<arg>--enable-shm</arg>
|
||||
<arg>--disable-Bsymbolic</arg>
|
||||
<arg>--enable-Bsymbolic</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--disable-xkb</arg>
|
||||
@@ -398,7 +394,7 @@ How to compile GTK+ itself
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--enable-debug</systemitem></title>
|
||||
|
||||
|
||||
<para>
|
||||
Turns on various amounts of debugging support. Setting this to 'no'
|
||||
disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and
|
||||
@@ -415,15 +411,11 @@ How to compile GTK+ itself
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--disable-visibility</systemitem> and
|
||||
<systemitem>--enable-visibility</systemitem></title>
|
||||
<title><systemitem>--disable-Bsymbolic</systemitem> and
|
||||
<systemitem>--enable-Bsymbolic</systemitem></title>
|
||||
<para>
|
||||
The option <systemitem>--disable-visibility</systemitem>
|
||||
turns off the use of ELF visibility attributes for linking
|
||||
optimizations. This makes sense while changing GTK+ itself,
|
||||
since the way in which GTK+ uses visibility attributes
|
||||
forces a full rebuild of all source files for any header
|
||||
modification.
|
||||
The option <systemitem>--disable-Bsymbolic</systemitem>
|
||||
turns off the use of the -Bsymbolic-functions linker flag.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
@@ -452,17 +444,6 @@ How to compile GTK+ itself
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--disable-shm</systemitem> and
|
||||
<systemitem>--enable-shm</systemitem></title>
|
||||
|
||||
<para>
|
||||
These options can be used to control whether GTK+ will use shared
|
||||
memory to communicate with the X server when possible.
|
||||
The default is 'yes'.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--disable-xkb</systemitem> and
|
||||
<systemitem>--enable-xkb</systemitem></title>
|
||||
|
||||
108
docs/reference/gtk/getting_started.xml
Normal file
108
docs/reference/gtk/getting_started.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-getting-started" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<title>Getting Started with GTK+</title>
|
||||
|
||||
<para>This chapter is contains some tutorial information to get you
|
||||
started with GTK+ programming. It assumes that you have GTK+, its
|
||||
dependencies and a C compiler installed and ready to use. If you
|
||||
need to build GTK+ itself first, refer to the
|
||||
<link linkend="gtk-compiling">Compiling the GTK+ libraries</link>
|
||||
section in this reference.</para>
|
||||
|
||||
<para>To begin our introduction to GTK, we'll start with the simplest
|
||||
program possible. This program will create an empty 200x200 pixel
|
||||
window:</para>
|
||||
|
||||
<para>
|
||||
<inlinegraphic fileref="window-default.png" format="PNG"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
<informalexample><programlisting>
|
||||
<xi:include href="../../../../examples/window-default.c" parse="text">
|
||||
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
|
||||
</xi:include>
|
||||
</programlisting></informalexample>
|
||||
|
||||
<para>You can compile the program above with GCC using:</para>
|
||||
|
||||
<para><literallayout>
|
||||
<literal>gcc `pkg-config --cflags gtk+-3.0` -o window-default window-default.c `pkg-config --libs gtk+-3.0`</literal>
|
||||
</literallayout></para>
|
||||
|
||||
<note><para>For more information on how to compile a GTK+ application, please
|
||||
refer to the <link linkend="gtk-compiling">Compiling GTK+ Applications</link>
|
||||
section in this reference.</para></note>
|
||||
|
||||
<para>All GTK+ applications will, of course, include
|
||||
<filename>gtk/gtk.h</filename>, which declares functions, types and
|
||||
macros required by GTK+ applications.</para>
|
||||
|
||||
<warning><para>Even if GTK+ installs multiple header files, only the
|
||||
top-level <filename>gtk/gtk.h</filename> header can be directly included
|
||||
by third party code. The compiler will abort with an error if any other
|
||||
header will be included.</para></warning>
|
||||
|
||||
<para>We then proceed into the <function>main</function>() function of the
|
||||
application, and we declare a <varname>window</varname> variable as a pointer
|
||||
of type #GtkWidget.</para>
|
||||
|
||||
<para>The following line will call gtk_init(), which
|
||||
is the initialization function for GTK+; this function will set up GTK+,
|
||||
the type system, the connection to the windowing environment, etc. The
|
||||
gtk_init() takes as arguments the pointers to the command line arguments
|
||||
counter and string array; this allows GTK+ to parse specific command line
|
||||
arguments that control the behavior of GTK+ itself. The parsed arguments
|
||||
will be removed from the array, leaving the unrecognized ones for your
|
||||
application to parse.</para>
|
||||
|
||||
<note><para>For more information on which command line arguments GTK+
|
||||
recognizes, please refer to the <link linkend="gtk-running">Running GTK+
|
||||
Applications</link> section in this reference.</para></note>
|
||||
|
||||
<para>The call to gtk_window_new() will create a new #GtkWindow and store
|
||||
it inside the <varname>window</varname> variable. The type of the window
|
||||
is %GTK_WINDOW_TOPLEVEL, which means that the #GtkWindow will be managed
|
||||
by the windowing system: it will have a frame, a title bar and window
|
||||
controls, depending on the platform.</para>
|
||||
|
||||
<para>In order to terminate the application when the #GtkWindow is
|
||||
destroyed, we connect the #GtkWidget::destroy signal to the gtk_main_quit()
|
||||
function. This function will terminate the GTK+ main loop started by calling
|
||||
gtk_main() later. The #GtkWidget::destroy signal is emitted when a widget is
|
||||
destroyed, either by explicitly calling gtk_widget_destroy() or when the
|
||||
widget is unparented. Top-level #GtkWindow<!-- -->s are also destroyed when
|
||||
the Close window control button is clicked.</para>
|
||||
|
||||
<para>#GtkWidget<!-- -->s are hidden by default. By calling gtk_widget_show()
|
||||
on a #GtkWidget we are asking GTK+ to set the visibility attribute so that it
|
||||
can be displayed. All this work is done after the main loop has been
|
||||
started.</para>
|
||||
|
||||
<para>The last line of interest is the call to gtk_main(). This function will
|
||||
start the GTK+ main loop and will block the control flow of the
|
||||
<function>main</function>() until the gtk_main_quit() function is
|
||||
called.</para>
|
||||
|
||||
<para>The following example is slightly more complex, and tries to
|
||||
showcase some of the capabilities of GTK+.</para>
|
||||
|
||||
<para>In the long tradition of programming languages and libraries,
|
||||
it is called <emphasis>Hello, World</emphasis>.</para>
|
||||
|
||||
<para>
|
||||
<inlinegraphic fileref="hello-world.png" format="PNG"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
<example id="gtk-getting-started-hello-world">
|
||||
<title>Hello World in GTK+</title>
|
||||
<programlisting>
|
||||
<xi:include href="../../../../examples/hello-world.c" parse="text">
|
||||
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
|
||||
</xi:include>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
</chapter>
|
||||
@@ -4,7 +4,6 @@
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
]>
|
||||
<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
|
||||
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<bookinfo>
|
||||
<title>GTK+ Reference Manual</title>
|
||||
@@ -17,102 +16,8 @@
|
||||
|
||||
<part id="gtk">
|
||||
<title>GTK+ Overview</title>
|
||||
<partintro>
|
||||
<para>
|
||||
GTK+ is a library for creating graphical user interfaces. It
|
||||
works on many UNIX-like platforms, Windows, and on framebuffer
|
||||
devices. 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+ depends on the following libraries:
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>GLib</term>
|
||||
<listitem><para>
|
||||
A general-purpose utility library, not specific to graphical user interfaces.
|
||||
GLib provides many useful data types, macros, type conversions,
|
||||
string utilities, file utilities, a main loop abstraction, and so on.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GObject</term>
|
||||
<listitem><para>A library that provides a type system, a collection of
|
||||
fundamental types including an object type, a signal system.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GIO</term>
|
||||
<listitem><para>A modern, easy-to-use VFS API including abstractions for
|
||||
files, drives, volumes, stream IO, as well as network programming and
|
||||
DBus communication.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>cairo</term>
|
||||
<listitem><para>Cairo is a 2D graphics library with support for multiple
|
||||
output devices.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>Pango</term>
|
||||
<listitem><para>
|
||||
Pango is a library for internationalized text handling. It centers
|
||||
around the #PangoLayout object, representing a paragraph of text.
|
||||
Pango provides the engine for #GtkTextView, #GtkLabel, #GtkEntry, and
|
||||
other widgets that display text.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>ATK</term>
|
||||
<listitem><para>
|
||||
ATK is the Accessibility Toolkit. It provides a set of generic
|
||||
interfaces allowing accessibility technologies to interact with a
|
||||
graphical user interface. For example, a screen reader uses ATK to
|
||||
discover the text in an interface and read it to blind users. GTK+
|
||||
widgets have built-in support for accessibility using the ATK
|
||||
framework.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GdkPixbuf</term>
|
||||
<listitem><para>
|
||||
This is a small library which allows you to create #GdkPixbuf
|
||||
("pixel buffer") objects from image data or image files.
|
||||
Use a #GdkPixbuf in combination with #GtkImage to display images.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GDK</term>
|
||||
<listitem><para>
|
||||
GDK is the abstraction layer that allows GTK+ to support multiple
|
||||
windowing systems. GDK provides drawing and window system facilities
|
||||
on X11, Windows, and the Linux framebuffer device.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GTK+</term>
|
||||
<listitem><para>
|
||||
The GTK+ library itself contains <firstterm>widgets</firstterm>,
|
||||
that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</partintro>
|
||||
<xi:include href="overview.xml"/>
|
||||
<xi:include href="xml/getting_started.xml"/>
|
||||
<xi:include href="building.sgml" />
|
||||
<xi:include href="compiling.sgml" />
|
||||
<xi:include href="running.sgml" />
|
||||
@@ -128,6 +33,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<part id="gtkbase">
|
||||
<title>GTK+ Core Reference</title>
|
||||
<xi:include href="xml/gtkmain.xml" />
|
||||
<xi:include href="xml/gtkfeatures.xml" />
|
||||
<xi:include href="xml/gtkaccelgroup.xml" />
|
||||
<xi:include href="xml/gtkaccelmap.xml" />
|
||||
<xi:include href="xml/gtkclipboard.xml" />
|
||||
@@ -141,8 +47,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtkenums.xml" />
|
||||
<xi:include href="xml/gtkstyle.xml" />
|
||||
<xi:include href="xml/gtkselection.xml" />
|
||||
<xi:include href="xml/gtkfeatures.xml" />
|
||||
<xi:include href="xml/gtktypeutils.xml" />
|
||||
<xi:include href="xml/gtktesting.xml" />
|
||||
<xi:include href="xml/filesystem.xml" />
|
||||
</part>
|
||||
@@ -249,7 +153,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<chapter id="MenusAndCombos">
|
||||
<title>Menus, Combo Box, Toolbar</title>
|
||||
<xi:include href="xml/gtkcombobox.xml" />
|
||||
<xi:include href="xml/gtkcomboboxentry.xml" />
|
||||
<xi:include href="xml/gtkcomboboxtext.xml" />
|
||||
<xi:include href="xml/gtkmenu.xml" />
|
||||
<xi:include href="xml/gtkmenubar.xml" />
|
||||
<xi:include href="xml/gtkmenuitem.xml" />
|
||||
@@ -282,7 +186,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
</chapter>
|
||||
|
||||
<chapter id="SelectorWidgets">
|
||||
<title>Selectors (File/Font/Color/Input Devices)</title>
|
||||
<title>Selectors (Color/File/Font)</title>
|
||||
<xi:include href="xml/gtkcolorbutton.xml" />
|
||||
<xi:include href="xml/gtkcolorseldlg.xml" />
|
||||
<xi:include href="xml/gtkcolorsel.xml" />
|
||||
@@ -299,6 +203,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
|
||||
<chapter id="LayoutContainers">
|
||||
<title>Layout Containers</title>
|
||||
<xi:include href="xml/gtkgrid.xml" />
|
||||
<xi:include href="xml/gtkalignment.xml" />
|
||||
<xi:include href="xml/gtkaspectframe.xml" />
|
||||
<xi:include href="xml/gtkbox.xml" />
|
||||
@@ -316,7 +221,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtktable.xml" />
|
||||
<xi:include href="xml/gtkexpander.xml" />
|
||||
<xi:include href="xml/gtkorientable.xml" />
|
||||
<xi:include href="xml/gtksizerequest.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter id="Ornaments">
|
||||
@@ -333,6 +237,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtkhscrollbar.xml" />
|
||||
<xi:include href="xml/gtkvscrollbar.xml" />
|
||||
<xi:include href="xml/gtkscrolledwindow.xml" />
|
||||
<xi:include href="xml/gtkscrollable.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter id="Printing">
|
||||
@@ -366,14 +271,12 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
|
||||
<chapter id="AbstractObjects">
|
||||
<title>Abstract Base Classes</title>
|
||||
<xi:include href="xml/gtkbin.xml" />
|
||||
<xi:include href="xml/gtkwidget.xml" />
|
||||
<xi:include href="xml/gtkcontainer.xml" />
|
||||
<xi:include href="xml/gtkitem.xml" />
|
||||
<xi:include href="xml/gtkbin.xml" />
|
||||
<xi:include href="xml/gtkmenushell.xml" />
|
||||
<xi:include href="xml/gtkmisc.xml" />
|
||||
<xi:include href="xml/gtkobject.xml" />
|
||||
<xi:include href="xml/gtkrange.xml" />
|
||||
<xi:include href="xml/gtkwidget.xml" />
|
||||
<xi:include href="xml/gtkimcontext.xml" />
|
||||
</chapter>
|
||||
|
||||
@@ -427,6 +330,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
|
||||
<xi:include href="xml/migrating-checklist.sgml" />
|
||||
<xi:include href="xml/migrating-2to3.xml" />
|
||||
<xi:include href="xml/migrating-GtkApplication.xml" />
|
||||
</part>
|
||||
|
||||
<part>
|
||||
|
||||
@@ -37,9 +37,6 @@ gtk_about_dialog_get_logo
|
||||
gtk_about_dialog_set_logo
|
||||
gtk_about_dialog_get_logo_icon_name
|
||||
gtk_about_dialog_set_logo_icon_name
|
||||
GtkAboutDialogActivateLinkFunc
|
||||
gtk_about_dialog_set_email_hook
|
||||
gtk_about_dialog_set_url_hook
|
||||
gtk_show_about_dialog
|
||||
<SUBSECTION Standard>
|
||||
GTK_ABOUT_DIALOG
|
||||
@@ -92,6 +89,7 @@ GTK_IS_ACCEL_GROUP_CLASS
|
||||
GTK_ACCEL_GROUP_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GTK_ACCEL_GROUP_GET_PRIVATE
|
||||
GtkAccelGroupPrivate
|
||||
GtkAccelGroupEntry
|
||||
gtk_accel_group_get_type
|
||||
@@ -166,6 +164,7 @@ GTK_ACCESSIBLE_GET_CLASS
|
||||
GTK_IS_ACCESSIBLE
|
||||
GTK_IS_ACCESSIBLE_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkAccessiblePrivate
|
||||
gtk_accessible_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -400,6 +399,7 @@ GTK_ARROW_CLASS
|
||||
GTK_IS_ARROW_CLASS
|
||||
GTK_ARROW_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkArrowPrivate
|
||||
gtk_arrow_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -594,6 +594,7 @@ gtk_calendar_select_month
|
||||
gtk_calendar_select_day
|
||||
gtk_calendar_mark_day
|
||||
gtk_calendar_unmark_day
|
||||
gtk_calendar_get_day_is_marked
|
||||
gtk_calendar_clear_marks
|
||||
|
||||
<SUBSECTION>
|
||||
@@ -670,10 +671,13 @@ gtk_check_menu_item_get_type
|
||||
GtkColorButton
|
||||
gtk_color_button_new
|
||||
gtk_color_button_new_with_color
|
||||
gtk_color_button_new_with_rgba
|
||||
gtk_color_button_set_color
|
||||
gtk_color_button_get_color
|
||||
gtk_color_button_set_alpha
|
||||
gtk_color_button_get_alpha
|
||||
gtk_color_button_set_rgba
|
||||
gtk_color_button_get_rgba
|
||||
gtk_color_button_set_use_alpha
|
||||
gtk_color_button_get_use_alpha
|
||||
gtk_color_button_set_title
|
||||
@@ -730,6 +734,10 @@ gtk_color_selection_get_previous_alpha
|
||||
gtk_color_selection_set_previous_alpha
|
||||
gtk_color_selection_get_previous_color
|
||||
gtk_color_selection_set_previous_color
|
||||
gtk_color_selection_get_current_rgba
|
||||
gtk_color_selection_set_current_rgba
|
||||
gtk_color_selection_get_previous_rgba
|
||||
gtk_color_selection_set_previous_rgba
|
||||
gtk_color_selection_is_adjusting
|
||||
gtk_color_selection_palette_from_string
|
||||
gtk_color_selection_palette_to_string
|
||||
@@ -769,7 +777,9 @@ gtk_color_selection_dialog_get_type
|
||||
<TITLE>GtkComboBox</TITLE>
|
||||
GtkComboBox
|
||||
gtk_combo_box_new
|
||||
gtk_combo_box_new_with_entry
|
||||
gtk_combo_box_new_with_model
|
||||
gtk_combo_box_new_with_model_and_entry
|
||||
gtk_combo_box_get_wrap_width
|
||||
gtk_combo_box_set_wrap_width
|
||||
gtk_combo_box_get_row_span_column
|
||||
@@ -782,12 +792,6 @@ gtk_combo_box_get_active_iter
|
||||
gtk_combo_box_set_active_iter
|
||||
gtk_combo_box_get_model
|
||||
gtk_combo_box_set_model
|
||||
gtk_combo_box_new_text
|
||||
gtk_combo_box_append_text
|
||||
gtk_combo_box_insert_text
|
||||
gtk_combo_box_prepend_text
|
||||
gtk_combo_box_remove_text
|
||||
gtk_combo_box_get_active_text
|
||||
gtk_combo_box_popup_for_device
|
||||
gtk_combo_box_popup
|
||||
gtk_combo_box_popdown
|
||||
@@ -802,6 +806,11 @@ gtk_combo_box_set_focus_on_click
|
||||
gtk_combo_box_get_focus_on_click
|
||||
gtk_combo_box_set_button_sensitivity
|
||||
gtk_combo_box_get_button_sensitivity
|
||||
gtk_combo_box_get_has_entry
|
||||
gtk_combo_box_set_entry_text_column
|
||||
gtk_combo_box_get_entry_text_column
|
||||
gtk_combo_box_set_popup_fixed_width
|
||||
gtk_combo_box_get_popup_fixed_width
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_COMBO_BOX
|
||||
GTK_COMBO_BOX
|
||||
@@ -815,24 +824,29 @@ gtk_combo_box_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkcomboboxentry</FILE>
|
||||
<TITLE>GtkComboBoxEntry</TITLE>
|
||||
GtkComboBoxEntry
|
||||
gtk_combo_box_entry_new
|
||||
gtk_combo_box_entry_new_with_model
|
||||
gtk_combo_box_entry_new_text
|
||||
gtk_combo_box_entry_set_text_column
|
||||
gtk_combo_box_entry_get_text_column
|
||||
<FILE>gtkcomboboxtext</FILE>
|
||||
<TITLE>GtkComboBoxText</TITLE>
|
||||
GtkComboBoxText
|
||||
gtk_combo_box_text_new
|
||||
gtk_combo_box_text_new_with_entry
|
||||
gtk_combo_box_text_append_text
|
||||
gtk_combo_box_text_insert_text
|
||||
gtk_combo_box_text_prepend_text
|
||||
gtk_combo_box_text_remove
|
||||
gtk_combo_box_text_remove_all
|
||||
gtk_combo_box_text_get_active_text
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_COMBO_BOX_ENTRY
|
||||
GTK_COMBO_BOX_ENTRY
|
||||
GTK_COMBO_BOX_ENTRY_CLASS
|
||||
GTK_IS_COMBO_BOX_ENTRY
|
||||
GTK_IS_COMBO_BOX_ENTRY_CLASS
|
||||
GTK_COMBO_BOX_ENTRY_GET_CLASS
|
||||
GTK_TYPE_COMBO_BOX_TEXT
|
||||
GTK_COMBO_BOX_TEXT
|
||||
GTK_IS_COMBO_BOX_TEXT
|
||||
GTK_COMBO_BOX_TEXT_CLASS
|
||||
GTK_IS_COMBO_BOX_TEXT_CLASS
|
||||
GTK_COMBO_BOX_TEXT_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GtkComboBoxEntryPrivate
|
||||
gtk_combo_box_entry_get_type
|
||||
GtkComboBoxTextPrivate
|
||||
gtk_combo_box_text_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -867,13 +881,15 @@ gtk_container_child_set_valist
|
||||
gtk_container_forall
|
||||
gtk_container_get_border_width
|
||||
gtk_container_set_border_width
|
||||
gtk_container_propagate_expose
|
||||
gtk_container_propagate_draw
|
||||
gtk_container_get_focus_chain
|
||||
gtk_container_set_focus_chain
|
||||
gtk_container_unset_focus_chain
|
||||
gtk_container_class_find_child_property
|
||||
gtk_container_class_install_child_property
|
||||
gtk_container_class_list_child_properties
|
||||
gtk_container_class_handle_border_width
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CONTAINER
|
||||
GTK_IS_CONTAINER
|
||||
@@ -898,9 +914,7 @@ gtk_dialog_response
|
||||
gtk_dialog_add_button
|
||||
gtk_dialog_add_buttons
|
||||
gtk_dialog_add_action_widget
|
||||
gtk_dialog_get_has_separator
|
||||
gtk_dialog_set_default_response
|
||||
gtk_dialog_set_has_separator
|
||||
gtk_dialog_set_response_sensitive
|
||||
gtk_dialog_get_response_for_widget
|
||||
gtk_dialog_get_widget_for_response
|
||||
@@ -962,6 +976,7 @@ GTK_TYPE_EDITABLE
|
||||
GTK_EDITABLE_CLASS
|
||||
GTK_IS_EDITABLE_CLASS
|
||||
GTK_EDITABLE_GET_CLASS
|
||||
GTK_EDITABLE_GET_IFACE
|
||||
<SUBSECTION Private>
|
||||
gtk_editable_get_type
|
||||
</SECTION>
|
||||
@@ -977,6 +992,7 @@ gtk_entry_set_buffer
|
||||
gtk_entry_set_text
|
||||
gtk_entry_get_text
|
||||
gtk_entry_get_text_length
|
||||
gtk_entry_get_text_area
|
||||
gtk_entry_set_visibility
|
||||
gtk_entry_set_invisible_char
|
||||
gtk_entry_unset_invisible_char
|
||||
@@ -1032,8 +1048,7 @@ gtk_entry_set_icon_tooltip_markup
|
||||
gtk_entry_get_icon_tooltip_markup
|
||||
gtk_entry_set_icon_drag_source
|
||||
gtk_entry_get_current_icon_drag_source
|
||||
gtk_entry_get_icon_window
|
||||
gtk_entry_get_text_window
|
||||
gtk_entry_get_icon_area
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_ENTRY
|
||||
@@ -1612,8 +1627,8 @@ gtk_icon_view_get_cursor
|
||||
gtk_icon_view_selected_foreach
|
||||
gtk_icon_view_set_selection_mode
|
||||
gtk_icon_view_get_selection_mode
|
||||
gtk_icon_view_set_orientation
|
||||
gtk_icon_view_get_orientation
|
||||
gtk_icon_view_set_item_orientation
|
||||
gtk_icon_view_get_item_orientation
|
||||
gtk_icon_view_set_columns
|
||||
gtk_icon_view_get_columns
|
||||
gtk_icon_view_set_item_width
|
||||
@@ -1676,7 +1691,6 @@ GtkImage
|
||||
GtkImageType
|
||||
gtk_image_get_icon_set
|
||||
gtk_image_get_pixbuf
|
||||
gtk_image_get_pixmap
|
||||
gtk_image_get_stock
|
||||
gtk_image_get_animation
|
||||
gtk_image_get_icon_name
|
||||
@@ -1685,7 +1699,6 @@ gtk_image_get_storage_type
|
||||
gtk_image_new_from_file
|
||||
gtk_image_new_from_icon_set
|
||||
gtk_image_new_from_pixbuf
|
||||
gtk_image_new_from_pixmap
|
||||
gtk_image_new_from_stock
|
||||
gtk_image_new_from_animation
|
||||
gtk_image_new_from_icon_name
|
||||
@@ -1693,7 +1706,6 @@ gtk_image_new_from_gicon
|
||||
gtk_image_set_from_file
|
||||
gtk_image_set_from_icon_set
|
||||
gtk_image_set_from_pixbuf
|
||||
gtk_image_set_from_pixmap
|
||||
gtk_image_set_from_stock
|
||||
gtk_image_set_from_animation
|
||||
gtk_image_set_from_icon_name
|
||||
@@ -1833,24 +1845,6 @@ GTK_INVISIBLE_GET_CLASS
|
||||
gtk_invisible_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkitem</FILE>
|
||||
<TITLE>GtkItem</TITLE>
|
||||
GtkItem
|
||||
gtk_item_select
|
||||
gtk_item_deselect
|
||||
gtk_item_toggle
|
||||
<SUBSECTION Standard>
|
||||
GTK_ITEM
|
||||
GTK_IS_ITEM
|
||||
GTK_TYPE_ITEM
|
||||
GTK_ITEM_CLASS
|
||||
GTK_IS_ITEM_CLASS
|
||||
GTK_ITEM_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_item_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtklabel</FILE>
|
||||
<TITLE>GtkLabel</TITLE>
|
||||
@@ -1944,8 +1938,6 @@ gtk_link_button_new
|
||||
gtk_link_button_new_with_label
|
||||
gtk_link_button_get_uri
|
||||
gtk_link_button_set_uri
|
||||
GtkLinkButtonUriFunc
|
||||
gtk_link_button_set_uri_hook
|
||||
gtk_link_button_get_visited
|
||||
gtk_link_button_set_visited
|
||||
|
||||
@@ -2243,12 +2235,10 @@ gtk_notebook_get_tab_detachable
|
||||
gtk_notebook_get_tab_hborder
|
||||
gtk_notebook_get_tab_vborder
|
||||
gtk_notebook_set_current_page
|
||||
gtk_notebook_set_group
|
||||
gtk_notebook_get_group
|
||||
gtk_notebook_set_group_name
|
||||
gtk_notebook_get_group_name
|
||||
gtk_notebook_set_action_widget
|
||||
gtk_notebook_get_action_widget
|
||||
GtkNotebookWindowCreationFunc
|
||||
gtk_notebook_set_window_creation_hook
|
||||
<SUBSECTION Standard>
|
||||
GTK_NOTEBOOK
|
||||
GTK_IS_NOTEBOOK
|
||||
@@ -2262,34 +2252,12 @@ GtkNotebookTab
|
||||
GtkNotebookPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkobject</FILE>
|
||||
<TITLE>GtkObject</TITLE>
|
||||
GtkObject
|
||||
GtkObjectFlags
|
||||
GTK_OBJECT_FLAGS
|
||||
gtk_object_destroy
|
||||
<SUBSECTION Standard>
|
||||
GTK_OBJECT
|
||||
GTK_IS_OBJECT
|
||||
GTK_TYPE_OBJECT
|
||||
GTK_OBJECT_CLASS
|
||||
GTK_IS_OBJECT_CLASS
|
||||
GTK_OBJECT_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_object_get_type
|
||||
GTK_ARG_READWRITE
|
||||
GTK_OBJECT_SET_FLAGS
|
||||
GTK_OBJECT_UNSET_FLAGS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkoffscreenwindow</FILE>
|
||||
<TITLE>GtkOffscreenWindow</TITLE>
|
||||
GtkOffscreenWindow
|
||||
gtk_offscreen_window_new
|
||||
gtk_offscreen_window_get_pixmap
|
||||
gtk_offscreen_window_get_surface
|
||||
gtk_offscreen_window_get_pixbuf
|
||||
<SUBSECTION Standard>
|
||||
GTK_OFFSCREEN_WINDOW
|
||||
@@ -2360,9 +2328,8 @@ gtk_progress_bar_new
|
||||
gtk_progress_bar_pulse
|
||||
gtk_progress_bar_set_fraction
|
||||
gtk_progress_bar_get_fraction
|
||||
GtkProgressBarOrientation
|
||||
gtk_progress_bar_set_orientation
|
||||
gtk_progress_bar_get_orientation
|
||||
gtk_progress_bar_set_inverted
|
||||
gtk_progress_bar_get_inverted
|
||||
gtk_progress_bar_set_show_text
|
||||
gtk_progress_bar_get_show_text
|
||||
gtk_progress_bar_set_text
|
||||
@@ -2417,6 +2384,7 @@ gtk_radio_button_new_with_mnemonic
|
||||
gtk_radio_button_new_with_mnemonic_from_widget
|
||||
gtk_radio_button_set_group
|
||||
gtk_radio_button_get_group
|
||||
gtk_radio_button_join_group
|
||||
<SUBSECTION Standard>
|
||||
GTK_RADIO_BUTTON
|
||||
GTK_IS_RADIO_BUTTON
|
||||
@@ -2669,10 +2637,12 @@ gtk_recent_info_get_private_hint
|
||||
gtk_recent_info_get_application_info
|
||||
gtk_recent_info_get_applications
|
||||
gtk_recent_info_last_application
|
||||
gtk_recent_info_has_application
|
||||
gtk_recent_info_create_app_info
|
||||
gtk_recent_info_get_groups
|
||||
gtk_recent_info_has_group
|
||||
gtk_recent_info_has_application
|
||||
gtk_recent_info_get_icon
|
||||
gtk_recent_info_get_gicon
|
||||
gtk_recent_info_get_short_name
|
||||
gtk_recent_info_get_uri_display
|
||||
gtk_recent_info_get_age
|
||||
@@ -2735,8 +2705,6 @@ GTK_RULER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkRulerPrivate
|
||||
gtk_ruler_get_type
|
||||
gtk_ruler_draw_ticks
|
||||
gtk_ruler_draw_pos
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -2792,6 +2760,28 @@ GtkScaleButtonPrivate
|
||||
gtk_scale_button_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkscrollable</FILE>
|
||||
<TITLE>GtkScrollable</TITLE>
|
||||
GtkScrollable
|
||||
gtk_scrollable_get_hadjustment
|
||||
gtk_scrollable_set_hadjustment
|
||||
gtk_scrollable_get_vadjustment
|
||||
gtk_scrollable_set_vadjustment
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkScrollableIface
|
||||
GTK_IS_SCROLLABLE
|
||||
GTK_IS_SCROLLABLE_CLASS
|
||||
GTK_SCROLLABLE
|
||||
GTK_SCROLLABLE_CLASS
|
||||
GTK_SCROLLABLE_GET_IFACE
|
||||
GTK_TYPE_SCROLLABLE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_scrollable_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkscrollbar</FILE>
|
||||
<TITLE>GtkScrollbar</TITLE>
|
||||
@@ -2827,6 +2817,11 @@ gtk_scrolled_window_set_vadjustment
|
||||
gtk_scrolled_window_get_placement
|
||||
gtk_scrolled_window_get_policy
|
||||
gtk_scrolled_window_get_shadow_type
|
||||
gtk_scrolled_window_get_min_content_width
|
||||
gtk_scrolled_window_set_min_content_width
|
||||
gtk_scrolled_window_get_min_content_height
|
||||
gtk_scrolled_window_set_min_content_height
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_SCROLLED_WINDOW
|
||||
GTK_IS_SCROLLED_WINDOW
|
||||
@@ -3021,8 +3016,6 @@ gtk_statusbar_push
|
||||
gtk_statusbar_pop
|
||||
gtk_statusbar_remove
|
||||
gtk_statusbar_remove_all
|
||||
gtk_statusbar_set_has_resize_grip
|
||||
gtk_statusbar_get_has_resize_grip
|
||||
gtk_statusbar_get_message_area
|
||||
<SUBSECTION Standard>
|
||||
GTK_STATUSBAR
|
||||
@@ -3070,8 +3063,6 @@ gtk_status_icon_get_title
|
||||
gtk_status_icon_set_name
|
||||
gtk_status_icon_set_visible
|
||||
gtk_status_icon_get_visible
|
||||
gtk_status_icon_set_blinking
|
||||
gtk_status_icon_get_blinking
|
||||
gtk_status_icon_is_embedded
|
||||
gtk_status_icon_position_menu
|
||||
gtk_status_icon_get_geometry
|
||||
@@ -3848,6 +3839,7 @@ GtkToolPaletteDragTargets
|
||||
gtk_tool_palette_set_drag_source
|
||||
gtk_tool_palette_get_hadjustment
|
||||
gtk_tool_palette_get_vadjustment
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkToolPaletteClass
|
||||
GTK_TOOL_PALETTE
|
||||
@@ -4345,6 +4337,7 @@ gtk_cell_view_set_displayed_row
|
||||
gtk_cell_view_get_displayed_row
|
||||
gtk_cell_view_get_size_of_row
|
||||
gtk_cell_view_set_background_color
|
||||
gtk_cell_view_set_background_rgba
|
||||
<SUBSECTION Standard>
|
||||
GtkCellViewClass
|
||||
GTK_TYPE_CELL_VIEW
|
||||
@@ -4405,6 +4398,16 @@ gtk_cell_renderer_set_alignment
|
||||
gtk_cell_renderer_get_padding
|
||||
gtk_cell_renderer_set_padding
|
||||
|
||||
<SUBSECTION Width-for-height>
|
||||
gtk_cell_renderer_get_preferred_height
|
||||
gtk_cell_renderer_get_preferred_height_for_width
|
||||
gtk_cell_renderer_get_preferred_size
|
||||
gtk_cell_renderer_get_preferred_width
|
||||
gtk_cell_renderer_get_preferred_width_for_height
|
||||
gtk_cell_renderer_get_request_mode
|
||||
gtk_cell_view_get_desired_height_for_width_of_row
|
||||
gtk_cell_view_get_desired_width_of_row
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_RENDERER
|
||||
GTK_IS_CELL_RENDERER
|
||||
@@ -4772,30 +4775,26 @@ gtk_vseparator_get_type
|
||||
<TITLE>GtkWidget</TITLE>
|
||||
GtkWidget
|
||||
GtkWidgetClass
|
||||
GtkWidgetFlags
|
||||
GTK_WIDGET_FLAGS
|
||||
GTK_WIDGET_SET_FLAGS
|
||||
GTK_WIDGET_UNSET_FLAGS
|
||||
GtkCallback
|
||||
GtkRequisition
|
||||
GtkAllocation
|
||||
GtkSelectionData
|
||||
GtkWidgetAuxInfo
|
||||
GtkWidgetShapeInfo
|
||||
GtkWidgetHelpType
|
||||
gtk_widget_new
|
||||
gtk_widget_destroy
|
||||
gtk_widget_in_destruction
|
||||
gtk_widget_destroyed
|
||||
gtk_widget_unparent
|
||||
gtk_widget_show
|
||||
gtk_widget_show_now
|
||||
gtk_widget_hide
|
||||
gtk_widget_show_all
|
||||
gtk_widget_hide_all
|
||||
gtk_widget_map
|
||||
gtk_widget_unmap
|
||||
gtk_widget_realize
|
||||
gtk_widget_unrealize
|
||||
gtk_widget_draw
|
||||
gtk_widget_queue_draw
|
||||
gtk_widget_queue_resize
|
||||
gtk_widget_queue_resize_no_redraw
|
||||
@@ -4831,9 +4830,8 @@ gtk_widget_get_device_events
|
||||
gtk_widget_add_device_events
|
||||
gtk_widget_get_toplevel
|
||||
gtk_widget_get_ancestor
|
||||
gtk_widget_get_colormap
|
||||
gtk_widget_set_colormap
|
||||
gtk_widget_get_visual
|
||||
gtk_widget_set_visual
|
||||
gtk_widget_get_pointer
|
||||
gtk_widget_is_ancestor
|
||||
gtk_widget_translate_coordinates
|
||||
@@ -4842,19 +4840,14 @@ gtk_widget_set_style
|
||||
gtk_widget_ensure_style
|
||||
gtk_widget_get_style
|
||||
gtk_widget_reset_rc_styles
|
||||
gtk_widget_push_colormap
|
||||
gtk_widget_pop_colormap
|
||||
gtk_widget_set_default_colormap
|
||||
gtk_widget_get_default_style
|
||||
gtk_widget_get_default_colormap
|
||||
gtk_widget_get_default_visual
|
||||
gtk_widget_set_direction
|
||||
GtkTextDirection
|
||||
gtk_widget_get_direction
|
||||
gtk_widget_set_default_direction
|
||||
gtk_widget_get_default_direction
|
||||
gtk_widget_shape_combine_mask
|
||||
gtk_widget_input_shape_combine_mask
|
||||
gtk_widget_shape_combine_region
|
||||
gtk_widget_input_shape_combine_region
|
||||
gtk_widget_path
|
||||
gtk_widget_class_path
|
||||
gtk_widget_get_composite_name
|
||||
@@ -4874,12 +4867,12 @@ gtk_widget_render_icon
|
||||
gtk_widget_pop_composite_child
|
||||
gtk_widget_push_composite_child
|
||||
gtk_widget_queue_draw_area
|
||||
gtk_widget_queue_draw_region
|
||||
gtk_widget_reset_shapes
|
||||
gtk_widget_set_app_paintable
|
||||
gtk_widget_set_double_buffered
|
||||
gtk_widget_set_redraw_on_allocate
|
||||
gtk_widget_set_composite_name
|
||||
gtk_widget_set_scroll_adjustments
|
||||
gtk_widget_mnemonic_activate
|
||||
gtk_widget_class_install_style_property
|
||||
gtk_widget_class_install_style_property_parser
|
||||
@@ -4925,8 +4918,11 @@ gtk_widget_set_tooltip_window
|
||||
gtk_widget_get_has_tooltip
|
||||
gtk_widget_set_has_tooltip
|
||||
gtk_widget_trigger_tooltip_query
|
||||
gtk_widget_get_snapshot
|
||||
gtk_widget_get_window
|
||||
gtk_cairo_should_draw_window
|
||||
gtk_cairo_transform_to_window
|
||||
gtk_widget_get_allocated_width
|
||||
gtk_widget_get_allocated_height
|
||||
gtk_widget_get_allocation
|
||||
gtk_widget_set_allocation
|
||||
gtk_widget_get_app_paintable
|
||||
@@ -4965,6 +4961,44 @@ gtk_requisition_new
|
||||
gtk_requisition_copy
|
||||
gtk_requisition_free
|
||||
|
||||
<SUBSECTION Width-for-Height>
|
||||
GtkSizeRequestMode
|
||||
GtkRequestedSize
|
||||
gtk_widget_get_preferred_height
|
||||
gtk_widget_get_preferred_width
|
||||
gtk_widget_get_preferred_height_for_width
|
||||
gtk_widget_get_preferred_width_for_height
|
||||
gtk_widget_get_request_mode
|
||||
gtk_widget_get_preferred_size
|
||||
gtk_distribute_natural_allocation
|
||||
|
||||
<SUBSECTION Alignment and Margins>
|
||||
GtkAlign
|
||||
gtk_widget_get_halign
|
||||
gtk_widget_set_halign
|
||||
gtk_widget_get_valign
|
||||
gtk_widget_set_valign
|
||||
gtk_widget_get_margin_left
|
||||
gtk_widget_set_margin_left
|
||||
gtk_widget_get_margin_right
|
||||
gtk_widget_set_margin_right
|
||||
gtk_widget_get_margin_top
|
||||
gtk_widget_set_margin_top
|
||||
gtk_widget_get_margin_bottom
|
||||
gtk_widget_set_margin_bottom
|
||||
|
||||
<SUBSECTION Expand>
|
||||
gtk_widget_get_hexpand
|
||||
gtk_widget_set_hexpand
|
||||
gtk_widget_get_hexpand_set
|
||||
gtk_widget_set_hexpand_set
|
||||
gtk_widget_get_vexpand
|
||||
gtk_widget_set_vexpand
|
||||
gtk_widget_get_vexpand_set
|
||||
gtk_widget_set_vexpand_set
|
||||
gtk_widget_queue_compute_expand
|
||||
gtk_widget_compute_expand
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_WIDGET
|
||||
GTK_IS_WIDGET
|
||||
@@ -4974,6 +5008,7 @@ GTK_IS_WIDGET_CLASS
|
||||
GTK_WIDGET_GET_CLASS
|
||||
GTK_TYPE_REQUISITION
|
||||
<SUBSECTION Private>
|
||||
GtkWidgetPrivate
|
||||
gtk_widget_get_type
|
||||
gtk_requisition_get_type
|
||||
</SECTION>
|
||||
@@ -4993,6 +5028,7 @@ gtk_window_activate_focus
|
||||
gtk_window_activate_default
|
||||
gtk_window_set_modal
|
||||
gtk_window_set_default_size
|
||||
gtk_window_set_default_geometry
|
||||
gtk_window_set_geometry_hints
|
||||
gtk_window_set_gravity
|
||||
gtk_window_get_gravity
|
||||
@@ -5071,6 +5107,7 @@ gtk_window_move
|
||||
gtk_window_parse_geometry
|
||||
gtk_window_reshow_with_initial_size
|
||||
gtk_window_resize
|
||||
gtk_window_resize_to_geometry
|
||||
gtk_window_set_default_icon_list
|
||||
gtk_window_set_default_icon
|
||||
gtk_window_set_default_icon_from_file
|
||||
@@ -5084,6 +5121,13 @@ gtk_window_get_opacity
|
||||
gtk_window_set_opacity
|
||||
gtk_window_get_mnemonics_visible
|
||||
gtk_window_set_mnemonics_visible
|
||||
gtk_window_set_has_resize_grip
|
||||
gtk_window_get_has_resize_grip
|
||||
gtk_window_resize_grip_is_visible
|
||||
gtk_window_get_resize_grip_area
|
||||
gtk_window_get_application
|
||||
gtk_window_set_application
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_WINDOW
|
||||
GTK_IS_WINDOW
|
||||
@@ -5093,6 +5137,7 @@ GTK_IS_WINDOW_CLASS
|
||||
GTK_WINDOW_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GtkWindowPrivate
|
||||
gtk_window_get_type
|
||||
GtkWindowGeometryInfo
|
||||
gtk_window_remove_embedded_xid
|
||||
@@ -5156,9 +5201,12 @@ gtk_device_grab_add
|
||||
gtk_device_grab_remove
|
||||
|
||||
<SUBSECTION>
|
||||
GtkFunction
|
||||
gtk_init_add
|
||||
gtk_quit_add_destroy
|
||||
gtk_quit_add
|
||||
GtkCallbackMarshal
|
||||
GtkArg
|
||||
gtk_quit_add_full
|
||||
gtk_quit_remove
|
||||
gtk_quit_remove_by_data
|
||||
@@ -5189,11 +5237,11 @@ GTKMAIN_C_VAR
|
||||
<SECTION>
|
||||
<FILE>gtkfeatures</FILE>
|
||||
<TITLE>Feature Test Macros</TITLE>
|
||||
gtk_major_version
|
||||
gtk_minor_version
|
||||
gtk_micro_version
|
||||
gtk_binary_age
|
||||
gtk_interface_age
|
||||
gtk_get_major_version
|
||||
gtk_get_minor_version
|
||||
gtk_get_micro_version
|
||||
gtk_get_binary_age
|
||||
gtk_get_interface_age
|
||||
gtk_check_version
|
||||
|
||||
<SUBSECTION>
|
||||
@@ -5318,6 +5366,9 @@ GtkRcContext
|
||||
GtkTargetEntry
|
||||
GtkTargetList
|
||||
GtkTargetPair
|
||||
gtk_target_entry_new
|
||||
gtk_target_entry_copy
|
||||
gtk_target_entry_free
|
||||
gtk_target_list_new
|
||||
gtk_target_list_ref
|
||||
gtk_target_list_unref
|
||||
@@ -5369,6 +5420,7 @@ GTK_TYPE_TARGET_LIST
|
||||
<SUBSECTION Private>
|
||||
gtk_selection_data_get_type
|
||||
gtk_target_list_get_type
|
||||
gtk_target_entry_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -5444,14 +5496,13 @@ gtk_drag_unhighlight
|
||||
<SUBSECTION Source Side>
|
||||
gtk_drag_begin
|
||||
gtk_drag_set_icon_widget
|
||||
gtk_drag_set_icon_pixmap
|
||||
gtk_drag_set_icon_pixbuf
|
||||
gtk_drag_set_icon_stock
|
||||
gtk_drag_set_icon_surface
|
||||
gtk_drag_set_icon_name
|
||||
gtk_drag_set_icon_default
|
||||
gtk_drag_check_threshold
|
||||
gtk_drag_source_set
|
||||
gtk_drag_source_set_icon
|
||||
gtk_drag_source_set_icon_pixbuf
|
||||
gtk_drag_source_set_icon_stock
|
||||
gtk_drag_source_set_icon_name
|
||||
@@ -5463,17 +5514,6 @@ gtk_drag_source_add_image_targets
|
||||
gtk_drag_source_add_uri_targets
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtktypeutils</FILE>
|
||||
<TITLE>Types</TITLE>
|
||||
GtkFunction
|
||||
GtkCallbackMarshal
|
||||
GtkArg
|
||||
<SUBSECTION Private>
|
||||
GTK_TYPE_IDENTIFIER
|
||||
gtk_identifier_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkbindings</FILE>
|
||||
<TITLE>Bindings</TITLE>
|
||||
@@ -5498,7 +5538,6 @@ gtk_binding_set_add_path
|
||||
<FILE>gtkenums</FILE>
|
||||
<TITLE>Standard Enumerations</TITLE>
|
||||
GtkAccelFlags
|
||||
GtkAnchorType
|
||||
GtkArrowPlacement
|
||||
GtkArrowType
|
||||
GtkAttachOptions
|
||||
@@ -5525,11 +5564,8 @@ GtkScrollType
|
||||
GtkSelectionMode
|
||||
GtkShadowType
|
||||
GtkStateType
|
||||
GtkSubmenuDirection
|
||||
GtkSubmenuPlacement
|
||||
GtkToolbarStyle
|
||||
GtkUpdateType
|
||||
GtkVisibility
|
||||
GtkWindowPosition
|
||||
GtkWindowType
|
||||
GtkSortType
|
||||
@@ -6308,45 +6344,15 @@ GTK_TYPE_ORIENTABLE
|
||||
gtk_orientable_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtksizerequest</FILE>
|
||||
<TITLE>GtkSizeRequest</TITLE>
|
||||
GtkSizeRequest
|
||||
GtkSizeRequestIface
|
||||
GtkSizeRequestMode
|
||||
GtkRequestedSize
|
||||
gtk_size_request_get_height
|
||||
gtk_size_request_get_width
|
||||
gtk_size_request_get_height_for_width
|
||||
gtk_size_request_get_width_for_height
|
||||
gtk_size_request_get_request_mode
|
||||
gtk_size_request_get_size
|
||||
gtk_distribute_natural_allocation
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_SIZE_REQUEST
|
||||
GTK_SIZE_REQUEST_CLASS
|
||||
GTK_SIZE_REQUEST_GET_IFACE
|
||||
GTK_IS_SIZE_REQUEST
|
||||
GTK_TYPE_SIZE_REQUEST
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_size_request_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkapplication</FILE>
|
||||
<TITLE>GtkApplication</TITLE>
|
||||
GtkApplication
|
||||
|
||||
gtk_application_new
|
||||
gtk_application_run
|
||||
gtk_application_quit
|
||||
gtk_application_set_action_group
|
||||
gtk_application_get_window
|
||||
gtk_application_add_window
|
||||
gtk_application_remove_window
|
||||
gtk_application_get_windows
|
||||
gtk_application_create_window
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkApplicationClass
|
||||
@@ -6360,3 +6366,33 @@ GTK_APPLICATION_GET_CLASS
|
||||
gtk_application_get_type
|
||||
GtkApplicationPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkgrid</FILE>
|
||||
<TITLE>GtkGrid</TITLE>
|
||||
GtkGrid
|
||||
gtk_grid_new
|
||||
gtk_grid_attach
|
||||
gtk_grid_attach_next_to
|
||||
gtk_grid_set_row_homogeneous
|
||||
gtk_grid_get_row_homogeneous
|
||||
gtk_grid_set_row_spacing
|
||||
gtk_grid_get_row_spacing
|
||||
gtk_grid_set_column_homogeneous
|
||||
gtk_grid_get_column_homogeneous
|
||||
gtk_grid_set_column_spacing
|
||||
gtk_grid_get_column_spacing
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkGridClass
|
||||
GTK_TYPE_GRID
|
||||
GTK_GRID
|
||||
GTK_GRID_CLASS
|
||||
GTK_IS_GRID
|
||||
GTK_IS_GRID_CLASS
|
||||
GTK_GRID_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GtkGridPrivate
|
||||
gtk_grid_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -40,8 +40,8 @@ gtk_clipboard_get_type
|
||||
gtk_color_button_get_type
|
||||
gtk_color_selection_dialog_get_type
|
||||
gtk_color_selection_get_type
|
||||
gtk_combo_box_entry_get_type
|
||||
gtk_combo_box_get_type
|
||||
gtk_combo_box_text_get_type
|
||||
gtk_container_get_type
|
||||
gtk_dialog_get_type
|
||||
gtk_drawing_area_get_type
|
||||
@@ -61,6 +61,7 @@ gtk_font_button_get_type
|
||||
gtk_font_selection_dialog_get_type
|
||||
gtk_font_selection_get_type
|
||||
gtk_frame_get_type
|
||||
gtk_grid_get_type
|
||||
gtk_handle_box_get_type
|
||||
gtk_hbox_get_type
|
||||
gtk_hbutton_box_get_type
|
||||
@@ -80,7 +81,6 @@ gtk_im_context_simple_get_type
|
||||
gtk_im_multicontext_get_type
|
||||
gtk_info_bar_get_type
|
||||
gtk_invisible_get_type
|
||||
gtk_item_get_type
|
||||
gtk_label_get_type
|
||||
gtk_layout_get_type
|
||||
gtk_link_button_get_type
|
||||
@@ -94,7 +94,6 @@ gtk_message_dialog_get_type
|
||||
gtk_misc_get_type
|
||||
gtk_mount_operation_get_type
|
||||
gtk_notebook_get_type
|
||||
gtk_object_get_type
|
||||
gtk_offscreen_window_get_type
|
||||
gtk_orientable_get_type
|
||||
gtk_page_setup_get_type
|
||||
@@ -125,6 +124,7 @@ gtk_recent_manager_get_type
|
||||
gtk_ruler_get_type
|
||||
gtk_scale_button_get_type
|
||||
gtk_scale_get_type
|
||||
gtk_scrollable_get_type
|
||||
gtk_scrollbar_get_type
|
||||
gtk_scrolled_window_get_type
|
||||
gtk_separator_get_type
|
||||
@@ -132,7 +132,6 @@ gtk_separator_menu_item_get_type
|
||||
gtk_separator_tool_item_get_type
|
||||
gtk_settings_get_type
|
||||
gtk_size_group_get_type
|
||||
gtk_size_request_get_type
|
||||
gtk_socket_get_type
|
||||
gtk_spin_button_get_type
|
||||
gtk_spinner_get_type
|
||||
|
||||
BIN
docs/reference/gtk/images/hello-world.png
Normal file
BIN
docs/reference/gtk/images/hello-world.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
BIN
docs/reference/gtk/images/window-default.png
Normal file
BIN
docs/reference/gtk/images/window-default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -20,11 +20,11 @@
|
||||
|
||||
<para>
|
||||
The steps outlined in the following sections assume that your
|
||||
application is working with GTK+ 2.22, which is the final stable
|
||||
application is working with GTK+ 2.24, which is the final stable
|
||||
release of GTK+ 2.x. It includes all the necessary APIs and tools
|
||||
to help you port your application to GTK+ 3. If you are still using
|
||||
an older version of GTK+ 2.x, you should first get your application
|
||||
to build and work with 2.22.
|
||||
to build and work with 2.24.
|
||||
</para>
|
||||
|
||||
<section>
|
||||
@@ -44,10 +44,6 @@
|
||||
<term><filename>gtk/gtkunixprint.h</filename></term>
|
||||
<listitem>for low-level, UNIX-specific printing functions</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><filename>gdk-pixbuf/gdk-pixbuf.h</filename></term>
|
||||
<listitem>for GdkPixbuf</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><filename>gdk/gdk.h</filename></term>
|
||||
<listitem>for GDK</listitem>
|
||||
@@ -57,8 +53,8 @@
|
||||
<listitem>for GDK functions that are X11-specific</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><filename>gdk/gdkkeysyms.h</filename></term>
|
||||
<listitem>if you need the GDK keysym definitions</listitem>
|
||||
<term><filename>gdk/gdkwin32.h</filename></term>
|
||||
<listitem>for GDK functions that are Windows-specific</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
(these relative paths are assuming that you are using the include
|
||||
@@ -70,7 +66,7 @@
|
||||
you can use defines to disable inclusion of individual headers,
|
||||
as follows:
|
||||
<programlisting>
|
||||
make CFLAGS+="-DG_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
|
||||
make CFLAGS+="-DGTK_DISABLE_SINGLE_INCLUDES"
|
||||
</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
@@ -90,7 +86,7 @@
|
||||
you can use defines to remove deprecated symbols from the header files,
|
||||
as follows:
|
||||
<programlisting>
|
||||
make CFLAGS+="-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
|
||||
make CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
|
||||
</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
@@ -113,6 +109,19 @@
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Replace GDK_<keyname> with GDK_KEY_<keyname></title>
|
||||
|
||||
<para>
|
||||
Key constants have gained a <literal>_KEY_</literal> infix.
|
||||
For example, <literal>GDK_a</literal> is now
|
||||
<literal>GDK_KEY_a</literal>. In GTK+ 2, the old names continue
|
||||
to be available. In GTK+ 3 however, the old names will require
|
||||
an explicit include of the <literal>gdkkeysyms-compat.h</literal> header.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Use cairo for drawing</title>
|
||||
<para>
|
||||
@@ -122,7 +131,7 @@
|
||||
</para>
|
||||
<para>
|
||||
The #GdkGC and #GdkImage objects, as well as all the functions using
|
||||
them are gone. This includes the <literal>gdk_draw_</literal> family
|
||||
them, are gone. This includes the <literal>gdk_draw</literal> family
|
||||
of functions like gdk_draw_rectangle() and gdk_draw_drawable(). As
|
||||
#GdkGC is roughly equivalent to #cairo_t and #GdkImage was used for
|
||||
drawing images to GdkDrawables, which cairo supports automatically,
|
||||
@@ -236,7 +245,7 @@ cairo_destroy (cr);
|
||||
</para>
|
||||
</example>
|
||||
<section>
|
||||
<title>what should you be aware of ?</title>
|
||||
<title>What should you be aware of ?</title>
|
||||
<formalpara><title>No more stippling</title>
|
||||
<para>
|
||||
Stippling is the usage of a bi-level mask, called a #GdkBitmap.
|
||||
@@ -307,7 +316,7 @@ cairo_destroy (cr);
|
||||
development to be able to change your code.
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara><title>Using pango_cairo_show_layout() instead of gdk_draw_layout_with_colors()</title>
|
||||
<formalpara><title>Using pango_cairo_show_layout(<!-- -->) instead of gdk_draw_layout_with_colors(<!-- -->)</title>
|
||||
<para>
|
||||
GDK provided a way to ignore the color attributes of text and use
|
||||
a hardcoded text color with the gdk_draw_layout_with_colors()
|
||||
@@ -330,10 +339,193 @@ cairo_destroy (cr);
|
||||
<para>
|
||||
This section outlines porting tasks that you need to tackle when
|
||||
you get to the point that you actually build your application against
|
||||
GTK+ 3. Making it possible to prepare for these in GTK+ 2.22 would
|
||||
GTK+ 3. Making it possible to prepare for these in GTK+ 2.24 would
|
||||
have been either impossible or impractical.
|
||||
</para>
|
||||
|
||||
<section>
|
||||
<title>Replace size_request by get_preferred_width/height</title>
|
||||
|
||||
<para>
|
||||
The request-phase of the traditional GTK+ geometry management
|
||||
has been replaced by a more flexible height-for-width system,
|
||||
which is described in detail in the API documentation
|
||||
(see <xref linkend="geometry-management"/>). As a consequence,
|
||||
the ::size-request signal and vfunc has been removed from
|
||||
#GtkWidgetClass. The replacement for size_request() can
|
||||
take several levels of sophistication:
|
||||
<itemizedlist>
|
||||
<listitem>As a minimal replacement to keep current functionality,
|
||||
you can simply implement the get_preferred_width() and
|
||||
get_preferred_height() vfuncs by calling your existing
|
||||
size_request() function. So you go from
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
my_widget_class_init (MyWidgetClass *class)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
/* ... */
|
||||
|
||||
widget_class->size_request = my_widget_size_request;
|
||||
|
||||
/* ... */
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
to something that looks more like this:
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
my_widget_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimal_width,
|
||||
gint *natural_width)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
my_widget_size_request (widget, &requisition);
|
||||
|
||||
*minimal_width = *natural_width = requisition.width;
|
||||
}
|
||||
|
||||
static void
|
||||
my_widget_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimal_height,
|
||||
gint *natural_height)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
my_widget_size_request (widget, &requisition);
|
||||
|
||||
*minimal_height = *natural_height = requisition.height;
|
||||
}
|
||||
|
||||
/* ... */
|
||||
|
||||
static void
|
||||
my_widget_class_init (MyWidgetClass *class)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
/* ... */
|
||||
|
||||
widget_class->get_preferred_width = my_widget_get_preferred_width;
|
||||
widget_class->get_preferred_height = my_widget_get_preferred_height;
|
||||
|
||||
/* ... */
|
||||
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
Sometimes you can make things a little more streamlined
|
||||
by replacing your existing size_request() implementation by
|
||||
one that takes an orientation parameter:
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
my_widget_get_preferred_size (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
gint *minimal_size,
|
||||
gint *natural_size)
|
||||
{
|
||||
|
||||
/* do things that are common for both orientations ... */
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
/* do stuff that only applies to width... */
|
||||
|
||||
*minimal_size = *natural_size = ...
|
||||
}
|
||||
else
|
||||
{
|
||||
/* do stuff that only applies to height... */
|
||||
|
||||
*minimal_size = *natural_size = ...
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
my_widget_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimal_width,
|
||||
gint *natural_width)
|
||||
{
|
||||
my_widget_get_preferred_size (widget,
|
||||
GTK_ORIENTATION_HORIZONTAL,
|
||||
minimal_width,
|
||||
natural_width);
|
||||
}
|
||||
|
||||
static void
|
||||
my_widget_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimal_height,
|
||||
gint *natural_height)
|
||||
{
|
||||
my_widget_get_preferred_size (widget,
|
||||
GTK_ORIENTATION_VERTICAL,
|
||||
minimal_height,
|
||||
natural_height);
|
||||
}
|
||||
|
||||
/* ... */
|
||||
</programlisting></informalexample>
|
||||
</listitem>
|
||||
<listitem>If your widget can cope with a small size,
|
||||
but would appreciate getting some more space (a common
|
||||
example would be that it contains ellipsizable labels),
|
||||
you can do that by making your get_preferred_width()/height()
|
||||
functions return a smaller value for @minimal than for @natural.
|
||||
For @minimal, you probably want to return the same value
|
||||
that your size_request() function returned before (since
|
||||
size_request() was defined as returning the minimal size
|
||||
a widget can work with). A simple way to obtain good
|
||||
values for @natural, in the case of containers, is to use
|
||||
gtk_widget_get_preferred_width() and
|
||||
gtk_widget_get_preferred_height() on the children of the
|
||||
container, as in the following example:
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
gtk_fixed_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkFixed *fixed = GTK_FIXED (widget);
|
||||
GtkFixedPrivate *priv = fixed->priv;
|
||||
GtkFixedChild *child;
|
||||
GList *children;
|
||||
gint child_min, child_nat;
|
||||
|
||||
*minimum = 0;
|
||||
*natural = 0;
|
||||
|
||||
for (children = priv->children; children; children = children->next)
|
||||
{
|
||||
child = children->data;
|
||||
|
||||
if (!gtk_widget_get_visible (child->widget))
|
||||
continue;
|
||||
|
||||
gtk_widget_get_preferred_height (child->widget, &child_min, &child_nat);
|
||||
|
||||
*minimum = MAX (*minimum, child->y + child_min);
|
||||
*natural = MAX (*natural, child->y + child_nat);
|
||||
}
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
</listitem>
|
||||
<listitem>Note that the get_preferred_width()/height() functions
|
||||
only allow you to deal with one dimension at a time. If your
|
||||
size_request() handler is doing things that involve both
|
||||
width and height at the same time (e.g. limiting the aspect
|
||||
ratio), you will have to implement get_preferred_height_for_width()
|
||||
and get_preferred_width_for_height().
|
||||
</listitem>
|
||||
<listitem>To make full use of the new capabilities of the
|
||||
height-for-width geometry management, you need to additionally
|
||||
implement the get_preferred_height_for_width() and
|
||||
get_preferred_width_for_height(). For details on these functions,
|
||||
see <xref linkend="geometry-management"/>.
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Replace GdkRegion by cairo_region_t</title>
|
||||
|
||||
@@ -380,6 +572,314 @@ cairo_destroy (cr);
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Replace GdkPixmap by cairo surfaces</title>
|
||||
<para>
|
||||
The #GdkPixmap object and related functions have been removed.
|
||||
In the cairo-centric world of GTK+ 3, cairo surfaces take over
|
||||
the role of pixmaps.
|
||||
</para>
|
||||
<example>
|
||||
<title>Creating custom cursors</title>
|
||||
<para>
|
||||
One place where pixmaps were commonly used is to create custom
|
||||
cursors:
|
||||
<programlisting>
|
||||
GdkCursor *cursor;
|
||||
GdkPixmap *pixmap;
|
||||
cairo_t *cr;
|
||||
GdkColor fg = { 0, 0, 0, 0 };
|
||||
|
||||
pixmap = gdk_pixmap_new (NULL, 1, 1, 1);
|
||||
|
||||
cr = gdk_cairo_create (pixmap);
|
||||
cairo_rectangle (cr, 0, 0, 1, 1);
|
||||
cairo_fill (cr);
|
||||
cairo_destroy (cr);
|
||||
|
||||
cursor = gdk_cursor_new_from_pixmap (pixmap, pixmap, &fg, &fg, 0, 0);
|
||||
|
||||
g_object_unref (pixmap);
|
||||
</programlisting>
|
||||
The same can be achieved without pixmaps, by drawing onto
|
||||
an image surface:
|
||||
<programlisting>
|
||||
GdkCursor *cursor;
|
||||
cairo_surface_t *s;
|
||||
cairo_t *cr;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
s = cairo_image_surface_create (CAIRO_FORMAT_A1, 3, 3);
|
||||
cr = cairo_create (s);
|
||||
cairo_arc (cr, 1.5, 1.5, 1.5, 0, 2 * M_PI);
|
||||
cairo_fill (cr);
|
||||
cairo_destroy (cr);
|
||||
|
||||
pixbuf = gdk_pixbuf_get_from_surface (NULL, s,
|
||||
0, 0, 0, 0,
|
||||
3, 3);
|
||||
|
||||
cairo_surface_destroy (s);
|
||||
|
||||
cursor = gdk_cursor_new_from_pixbuf (display, pixbuf, 0, 0);
|
||||
|
||||
g_object_unref (pixbuf);
|
||||
</programlisting>
|
||||
</para>
|
||||
</example>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Replace colormaps by visuals</title>
|
||||
<para>
|
||||
For drawing with cairo, it is not necessary to allocate colors, and
|
||||
a #GdkVisual provides enough information for cairo to handle colors
|
||||
in 'native' surfaces. Therefore, #GdkColormap and related functions
|
||||
have been removed in GTK+ 3, and visuals are used instead. The
|
||||
colormap-handling functions of #GtkWidget (gtk_widget_set_colormap(),
|
||||
etc) have been removed and gtk_window_set_visual() has been added.
|
||||
</para>
|
||||
<example><title>Setting up a translucent window</title>
|
||||
<para>You might have a screen-changed handler like the following
|
||||
to set up a translucent window with an alpha-channel:
|
||||
</para>
|
||||
<programlisting>
|
||||
static void
|
||||
on_alpha_screen_changed (GtkWidget *widget,
|
||||
GdkScreen *old_screen,
|
||||
GtkWidget *label)
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (widget);
|
||||
GdkColormap *colormap = gdk_screen_get_rgba_colormap (screen);
|
||||
|
||||
if (colormap == NULL)
|
||||
colormap = gdk_screen_get_default_colormap (screen);
|
||||
|
||||
gtk_widget_set_colormap (widget, colormap);
|
||||
}
|
||||
</programlisting>
|
||||
<para>
|
||||
With visuals instead of colormaps, this will look as follows:
|
||||
</para>
|
||||
<programlisting>
|
||||
static void
|
||||
on_alpha_screen_changed (GtkWindow *window,
|
||||
GdkScreen *old_screen,
|
||||
GtkWidget *label)
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (window));
|
||||
GdkVisual *visual = gdk_screen_get_rgba_visual (screen);
|
||||
|
||||
if (visual == NULL)
|
||||
visual = gdk_screen_get_system_visual (screen);
|
||||
|
||||
gtk_window_set_visual (window, visual);
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>The GtkWidget::draw signal</title>
|
||||
<para>
|
||||
The GtkWidget #GtkWidget::expose-event signal has been replaced by
|
||||
a new #GtkWidget::draw signal, which takes a #cairo_t instead of
|
||||
an expose event. The cairo context is being set up so that the origin
|
||||
at (0, 0) coincides with the upper left corner of the widget, and
|
||||
is properly clipped.
|
||||
</para>
|
||||
<note><para>In other words, the cairo context of the draw signal is set
|
||||
up in 'widget coordinates', which is different from traditional expose
|
||||
event handlers, which always assume 'window coordinates'.
|
||||
</para></note>
|
||||
<para>
|
||||
The widget is expected to draw itself with its allocated size, which
|
||||
is available via the new gtk_widget_get_allocated_width() and
|
||||
gtk_widget_get_allocated_height() functions. It is not necessary to
|
||||
check for GTK_WIDGET_IS_DRAWABLE(), since GTK+ already does this check
|
||||
before emitting the ::draw signal.
|
||||
</para>
|
||||
<para>
|
||||
There are some special considerations for widgets with multiple windows.
|
||||
Expose events are window-specific, and widgets with multiple windows
|
||||
could expect to get an expose event for each window that needs to be
|
||||
redrawn. Therefore, multi-window expose event handlers typically look
|
||||
like this:
|
||||
<informalexample><programlisting>
|
||||
if (event->window == widget->window1)
|
||||
{
|
||||
/* ... draw window1 ... */
|
||||
}
|
||||
else if (event->window == widget->window2)
|
||||
{
|
||||
/* ... draw window2 ... */
|
||||
}
|
||||
...
|
||||
</programlisting></informalexample>
|
||||
In contrast, the ::draw signal handler may have to draw multiple
|
||||
windows in one call. GTK+ has a convenience function
|
||||
gtk_cairo_should_draw_window() that can be used to find out if
|
||||
a window needs to be drawn. With that, the example above would look
|
||||
like this (note that the 'else' is gone):
|
||||
<informalexample><programlisting>
|
||||
if (gtk_cairo_should_draw_window (cr, widget->window1)
|
||||
{
|
||||
/* ... draw window1 ... */
|
||||
}
|
||||
if (gtk_cairo_should_draw_window (cr, widget->window2)
|
||||
{
|
||||
/* ... draw window2 ... */
|
||||
}
|
||||
...
|
||||
</programlisting></informalexample>
|
||||
Another convenience function that can help when implementing
|
||||
::draw for multi-window widgets is gtk_cairo_transform_to_window(),
|
||||
which transforms a cairo context from widget-relative coordinates
|
||||
to window-relative coordinates.
|
||||
</para>
|
||||
<para>
|
||||
All GtkStyle drawing functions (gtk_paint_box(), etc) have been changed
|
||||
to take a #cairo_t instead of a window and a clip area. ::draw
|
||||
implementations will usually just use the cairo context that has been
|
||||
passed in for this.
|
||||
</para>
|
||||
<example><title>A simple ::draw function</title>
|
||||
<programlisting>
|
||||
gboolean
|
||||
gtk_arrow_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
gint extent;
|
||||
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
|
||||
extent = MIN (width - 2 * PAD, height - 2 * PAD);
|
||||
x = PAD;
|
||||
y = PAD;
|
||||
|
||||
gtk_paint_arrow (gtk_widget_get_style (widget),
|
||||
cr,
|
||||
gtk_widget_get_state (widget),
|
||||
GTK_SHADOW_OUT,
|
||||
widget,
|
||||
"arrow",
|
||||
widget->priv->arrow_type,
|
||||
TRUE,
|
||||
x, y, extent, extent);
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>GtkProgressBar orientation</title>
|
||||
|
||||
<para>
|
||||
In GTK+ 2.x, #GtkProgressBar and #GtkCellRendererProgress were using the
|
||||
GtkProgressBarOrientation enumeration to specify their orientation and
|
||||
direction. In GTK+ 3, both the widget and the cell renderer implement
|
||||
#GtkOrientable, and have an additional 'inverted' property to determine
|
||||
their direction. Therefore, a call to gtk_progress_bar_set_orientation()
|
||||
needs to be replaced by a pair of calls to
|
||||
gtk_orientable_set_orientation() and gtk_progress_bar_set_inverted().
|
||||
The following values correspond:
|
||||
<table>
|
||||
<tgroup cols="3">
|
||||
<colspec colname="1"/>
|
||||
<colspec colname="2"/>
|
||||
<colspec colname="3"/>
|
||||
<thead>
|
||||
<row><entry>GTK+ 2.x</entry><entry namest="2" nameend="3">GTK+ 3</entry></row>
|
||||
<row><entry>GtkProgressBarOrientation</entry><entry>GtkOrientation</entry><entry>inverted</entry></row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row><entry>GTK_PROGRESS_LEFT_TO_RIGHT</entry><entry>GTK_ORIENTATION_HORIZONTAL</entry><entry>FALSE</entry></row>
|
||||
<row><entry>GTK_PROGRESS_RIGHT_TO_LEFT</entry><entry>GTK_ORIENTATION_HORIZONTAL</entry><entry>TRUE</entry></row>
|
||||
<row><entry>GTK_PROGRESS_TOP_TO_BOTTOM</entry><entry>GTK_ORIENTATION_VERTICAL</entry><entry>FALSE</entry></row>
|
||||
<row><entry>GTK_PROGRESS_BOTTOM_TO_TOP</entry><entry>GTK_ORIENTATION_VERTICAL</entry><entry>TRUE</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Check your expand flags</title>
|
||||
|
||||
<para>
|
||||
The behaviour of expanding widgets has changed slightly in GTK+ 3,
|
||||
compared to GTK+ 2.x. It is now 'inherited', i.e. a container that
|
||||
has an expanding child is considered expanding itself. This is often
|
||||
the desired behaviour. In places where you don't want this to happen,
|
||||
setting the container explicity as not expanding will stop the
|
||||
expand flag of the child from being inherited. See
|
||||
gtk_widget_set_hexpand() and gtk_widget_set_vexpand().
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Scrolling changes</title>
|
||||
|
||||
<para>
|
||||
The default values for the #GtkScrolledWindow:hscrollbar-policy and
|
||||
#GtkScrolledWindow:vscrollbar-policy properties have been changed from
|
||||
'never' to 'automatic'. If your application was relying on the default
|
||||
value, you will have explicitly set it explicitly.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The ::set-scroll-adjustments signal on GtkWidget has been replaced
|
||||
by the #GtkScrollable interface which must be implemented by a widget
|
||||
that wants to be placed in a #GtkScrolledWindow. Instead of emitting
|
||||
::set-scroll-adjustments, the scrolled window simply sets the
|
||||
#GtkScrollable::hadjustment and #GtkScrollable::vadjustment properties.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>GtkObject is gone</title>
|
||||
|
||||
<para>
|
||||
GtkObject has been removed in GTK+ 3. Its remaining functionality,
|
||||
the ::destroy signal, has been moved to GtkWidget. If you have non-widget
|
||||
classes that are directly derived from GtkObject, you have to make
|
||||
them derive from #GInitiallyUnowned (or, if you don't need the floating
|
||||
functionality, #GObject). If you have widgets that override the
|
||||
destroy class handler, you have to adust your class_init function,
|
||||
since destroy is now a member of GtkWidgetClass:
|
||||
<informalexample><programlisting>
|
||||
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
|
||||
|
||||
object_class->destroy = my_destroy;
|
||||
</programlisting></informalexample>
|
||||
becomes
|
||||
<informalexample><programlisting>
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
widget_class->destroy = my_destroy;
|
||||
</programlisting></informalexample>
|
||||
In the unlikely case that you have a non-widget class that is derived
|
||||
from GtkObject and makes use of the destroy functionality, you have
|
||||
to implement ::destroy yourself.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Resize grips</title>
|
||||
|
||||
<para>
|
||||
The resize grip functionality has been moved from #GtkStatusbar
|
||||
to #GtkWindow. Any window can now have resize grips, regardless whether
|
||||
it has a statusbar or not. The functions
|
||||
gtk_statusbar_set_has_resize_grip() and gtk_statusbar_get_has_resize_grip()
|
||||
have disappeared, and instead there are now
|
||||
gtk_window_set_has_resize_grip() and gtk_window_get_has_resize_grip().
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Prevent mixed linkage</title>
|
||||
<para>
|
||||
|
||||
133
docs/reference/gtk/migrating-GtkApplication.xml
Normal file
133
docs/reference/gtk/migrating-GtkApplication.xml
Normal file
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkApplication">
|
||||
|
||||
<title>Migrating from libunique to GApplication or GtkApplication</title>
|
||||
|
||||
<para>
|
||||
libunique offers 'unique application' support as well as ways to
|
||||
communicate with a running application instance. This is implemented
|
||||
in various ways, either using D-Bus, or socket-based communication.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Starting with GLib 2.26, D-Bus support has been integrated into GIO
|
||||
in the form of GDBus, and #GApplication has been added to provide
|
||||
the same level of application support as libunique.
|
||||
</para>
|
||||
|
||||
<example><title>A unique application</title>
|
||||
<para>Here is a simple application using libunique:
|
||||
<programlisting>
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
UniqueApp *app;
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
app = unique_app_new ("org.gtk.TestApplication", NULL);
|
||||
|
||||
if (unique_app_is_running (app))
|
||||
{
|
||||
UniqueResponse response;
|
||||
|
||||
response = unique_app_send_message (app, UNIQUE_ACTIVATE, NULL);
|
||||
g_object_unref (app);
|
||||
|
||||
return response == UNIQUE_RESPONSE_OK ? 0 : 1;
|
||||
}
|
||||
|
||||
window = create_my_window ();
|
||||
|
||||
unique_app_watch_window (app, GTK_WINDOW (window));
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
g_object_unref (app);
|
||||
|
||||
return 0;
|
||||
}
|
||||
</programlisting>
|
||||
The same application using GtkApplication:
|
||||
<programlisting>
|
||||
static void
|
||||
activate (GtkApplication *app)
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
window = create_my_window ();
|
||||
gtk_window_set_application (GTK_WINDOW (window), app);
|
||||
gtk_widget_show (window);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkApplication *app;
|
||||
gint status;
|
||||
|
||||
app = gtk_application_new ("org.gtk.TestApplication", 0);
|
||||
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||
|
||||
status = g_application_run (app);
|
||||
|
||||
g_object_unref (app);
|
||||
|
||||
return status;
|
||||
}
|
||||
</programlisting>
|
||||
</para>
|
||||
</example>
|
||||
<section><title>Uniqueness</title>
|
||||
<para>
|
||||
Instead of creating a #UniqueApp with unique_app_new(), create
|
||||
a #GApplication with g_application_new() or a #GtkApplication
|
||||
with gtk_application_new(). The @name that was used with
|
||||
unique_app_new() is very likely usable as the @application_id for
|
||||
g_application_new() without any changes, and GtkApplication passes
|
||||
the <envar>DESKTOP_STARTUP_ID</envar> environment variable
|
||||
automatically.
|
||||
</para>
|
||||
<para>
|
||||
While libunique expects you to check for an already running instance
|
||||
yourself and activate it manually, GApplication handles all this on
|
||||
its own in g_application_run(). If you still need to find out if there
|
||||
is a running instance of your application, use
|
||||
g_application_get_is_remote() instead of unique_app_is_running().
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section><title>Commands and Messages</title>
|
||||
<para>
|
||||
libunique lets you send messages with commands to a running
|
||||
instance using unique_app_send_message(). The commands can be either
|
||||
predefined or custom. Some of the predefined libunique commands have
|
||||
equivalents in GApplication. Instead of sending the %UNIQUE_ACTIVATE
|
||||
command, call g_application_activate(), instead of sending the
|
||||
%UNIQUE_OPEN command, call g_application_open(). The
|
||||
%UNIQUE_NEW and %UNIQUE_CLOSE and user-defined commands don't
|
||||
have direct replacement at this time.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As a replacement for custom commands, GApplication implements the
|
||||
#GActionGroup interface and lets you add a group of actions with
|
||||
g_application_set_action_group(). The actions can then be invoked,
|
||||
either by using the D-Bus interface for #GAction directly, or by
|
||||
calling g_action_group_activate_action() from another instance of
|
||||
the GApplication. The #GApplication documentation contains an
|
||||
example for using GApplication with actions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more complex needs, GApplication supports passing entire
|
||||
commandlines to the running instance.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
@@ -265,7 +265,7 @@ my_widget_expose_event_handler (GtkWidget *widget, GdkEventExpose *event)
|
||||
static gboolean
|
||||
my_widget_key_press_event_handler (GtkWidget *widget, GdkEventKey *event)
|
||||
{
|
||||
guint modifiers;
|
||||
GdkModifierType modifiers;
|
||||
|
||||
modifiers = gtk_accelerator_get_default_mod_mask (<!-- -->);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ or environment variables.
|
||||
|
||||
<para>
|
||||
For up-to-date information about the current status of this port, see the
|
||||
<ulink url="http://developer.imendio.com/wiki/Gtk_Mac_OS_X">project page</ulink>.
|
||||
<ulink url="http://live.gnome.org/GTK+/OSX">project page</ulink>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
100
docs/reference/gtk/overview.xml
Normal file
100
docs/reference/gtk/overview.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE partintro PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<partintro>
|
||||
<para>
|
||||
GTK+ is a library for creating graphical user interfaces. It
|
||||
works on many UNIX-like platforms, Windows, and OS X.
|
||||
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 many other languages have
|
||||
been written, including C++, Objective-C, Guile/Scheme, Perl, Python,
|
||||
TOM, Ada95, Free Pascal, and Eiffel.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ depends on the following libraries:
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>GLib</term>
|
||||
<listitem><para>
|
||||
A general-purpose utility library, not specific to graphical user interfaces.
|
||||
GLib provides many useful data types, macros, type conversions,
|
||||
string utilities, file utilities, a main loop abstraction, and so on.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GObject</term>
|
||||
<listitem><para>A library that provides a type system, a collection of
|
||||
fundamental types including an object type, a signal system.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GIO</term>
|
||||
<listitem><para>A modern, easy-to-use VFS API including abstractions for
|
||||
files, drives, volumes, stream IO, as well as network programming and
|
||||
DBus communication.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>cairo</term>
|
||||
<listitem><para>Cairo is a 2D graphics library with support for multiple
|
||||
output devices.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>Pango</term>
|
||||
<listitem><para>
|
||||
Pango is a library for internationalized text handling. It centers
|
||||
around the PangoLayout object, representing a paragraph of text.
|
||||
Pango provides the engine for GtkTextView, GtkLabel, GtkEntry, and
|
||||
other widgets that display text.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>ATK</term>
|
||||
<listitem><para>
|
||||
ATK is the Accessibility Toolkit. It provides a set of generic
|
||||
interfaces allowing accessibility technologies to interact with a
|
||||
graphical user interface. For example, a screen reader uses ATK to
|
||||
discover the text in an interface and read it to blind users. GTK+
|
||||
widgets have built-in support for accessibility using the ATK
|
||||
framework.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GdkPixbuf</term>
|
||||
<listitem><para>
|
||||
This is a small library which allows you to create GdkPixbuf
|
||||
("pixel buffer") objects from image data or image files.
|
||||
Use a GdkPixbuf in combination with GtkImage to display images.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GDK</term>
|
||||
<listitem><para>
|
||||
GDK is the abstraction layer that allows GTK+ to support multiple
|
||||
windowing systems. GDK provides window system facilities on X11, Windows,
|
||||
and OS X.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GTK+</term>
|
||||
<listitem><para>
|
||||
The GTK+ library itself contains <firstterm>widgets</firstterm>,
|
||||
that is, GUI components such as GtkButton or GtkTextView.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</partintro>
|
||||
@@ -95,10 +95,10 @@ from functions?
|
||||
<answer>
|
||||
|
||||
<para>
|
||||
See the documentation for #GObject and #GtkObject. For #GObject note
|
||||
specifically g_object_ref() and g_object_unref(). #GtkObject is a subclass
|
||||
of #GObject so the same points apply, except that it has a "floating" state
|
||||
(explained in its documentation).
|
||||
See the documentation for #GObject and #GInitiallyUnowned. For #GObject note
|
||||
specifically g_object_ref() and g_object_unref(). #GInitiallyUnowned is a
|
||||
subclass of #GObject so the same points apply, except that it has a "floating"
|
||||
state (explained in its documentation).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -115,7 +115,7 @@ url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.)
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Why does my program leak memory, if I destroy a widget immediately
|
||||
Why does my program leak memory, if I destroy a widget immediately
|
||||
after creating it ?
|
||||
</para>
|
||||
</question>
|
||||
@@ -127,27 +127,26 @@ If <structname>GtkFoo</structname> isn't a toplevel window, then
|
||||
foo = gtk_foo_new (<!-- -->);
|
||||
gtk_widget_destroy (foo);
|
||||
</programlisting></informalexample>
|
||||
is a memory leak, because no one assumed the initial floating
|
||||
reference. If you are using a widget and you aren't immediately
|
||||
packing it into a container, then you probably want standard
|
||||
is a memory leak, because no one assumed the initial floating
|
||||
reference. If you are using a widget and you aren't immediately
|
||||
packing it into a container, then you probably want standard
|
||||
reference counting, not floating reference counting.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To to get this, you must acquire a reference to the widget and drop the
|
||||
floating reference (<quote>ref and sink</quote> in GTK+ parlance) after
|
||||
To to get this, you must acquire a reference to the widget and drop the
|
||||
floating reference (<quote>ref and sink</quote> in GTK+ parlance) after
|
||||
creating it:
|
||||
<informalexample><programlisting>
|
||||
foo = gtk_foo_new (<!-- -->);
|
||||
g_object_ref (foo);
|
||||
gtk_object_sink (GTK_OBJECT (foo));
|
||||
g_object_ref_sink (foo);
|
||||
</programlisting></informalexample>
|
||||
When you want to get rid of the widget, you must call gtk_widget_destroy()
|
||||
to break any external connections to the widget before dropping your
|
||||
to break any external connections to the widget before dropping your
|
||||
reference:
|
||||
<informalexample><programlisting>
|
||||
gtk_widget_destroy (foo);
|
||||
g_object_unref (foo);
|
||||
gtk_widget_destroy (foo);
|
||||
g_object_unref (foo);
|
||||
</programlisting></informalexample>
|
||||
When you immediately add a widget to a container, it takes care of
|
||||
assuming the initial floating reference and you don't have to worry
|
||||
|
||||
39
docs/reference/gtk/tmpl/.gitignore
vendored
39
docs/reference/gtk/tmpl/.gitignore
vendored
@@ -1,17 +1,41 @@
|
||||
gtkaccelmap.sgml
|
||||
gtkactiongroup.sgml
|
||||
gtkaboutdialog.sgml
|
||||
gtkadjustment.sgml
|
||||
gtkbbox.sgml
|
||||
gtkbox.sgml
|
||||
gtkbuilder.sgml
|
||||
gtkbutton.sgml
|
||||
gtkcalendar.sgml
|
||||
gtkcelleditable.sgml
|
||||
gtkcellrenderer.sgml
|
||||
gtkcellrenderertext.sgml
|
||||
gtkcellview.sgml
|
||||
gtkcolorbutton.sgml
|
||||
gtkcolorsel.sgml
|
||||
gtkcombobox.sgml
|
||||
gtkcomboboxentry.sgml
|
||||
gtkcontainer.sgml
|
||||
gtkeditable.sgml
|
||||
gtkentry.sgml
|
||||
gtkentrybuffer.sgml
|
||||
gtkhbox.sgml
|
||||
gtkiconview.sgml
|
||||
gtkimcontextsimple.sgml
|
||||
gtkimmulticontext.sgml
|
||||
gtkitemfactory.sgml
|
||||
gtklayout.sgml
|
||||
gtklinkbutton.sgml
|
||||
gtkmessagedialog.sgml
|
||||
gtknotebook.sgml
|
||||
gtkobject.sgml
|
||||
gtkorientable.sgml
|
||||
gtkpagesetup.sgml
|
||||
gtkpagesetupunixdialog.sgml
|
||||
gtkpaned.sgml
|
||||
gtkpapersize.sgml
|
||||
gtkprinter.sgml
|
||||
gtkprogressbar.sgml
|
||||
gtkradioaction.sgml
|
||||
gtkradiobutton.sgml
|
||||
gtkrange.sgml
|
||||
@@ -21,15 +45,30 @@ gtkrecentchooserdialog.sgml
|
||||
gtkrecentchoosermenu.sgml
|
||||
gtkrecentchooserwidget.sgml
|
||||
gtkrecentmanager.sgml
|
||||
gtkscale.sgml
|
||||
gtkscalebutton.sgml
|
||||
gtkscrollbar.sgml
|
||||
gtkscrolledwindow.sgml
|
||||
gtkseparator.sgml
|
||||
gtkseparatormenuitem.sgml
|
||||
gtkseparatortoolitem.sgml
|
||||
gtksettings.sgml
|
||||
gtkstatusbar.sgml
|
||||
gtkstyle.sgml
|
||||
gtktesting.sgml
|
||||
gtktextiter.sgml
|
||||
gtktexttagtable.sgml
|
||||
gtktextview.sgml
|
||||
gtktoggleaction.sgml
|
||||
gtktoolbar.sgml
|
||||
gtktoolitem.sgml
|
||||
gtktooltip.sgml
|
||||
gtktreednd.sgml
|
||||
gtktreemodelfilter.sgml
|
||||
gtktreeselection.sgml
|
||||
gtktreesortable.sgml
|
||||
gtktreestore.sgml
|
||||
gtktreeview.sgml
|
||||
gtktreeviewcolumn.sgml
|
||||
gtktypeutils.sgml
|
||||
gtkwindow.sgml
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Accelerator Maps
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Loadable keyboard accelerator specifications
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkAccelMap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkAccelMap::changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accelmap: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkAccelMapForeach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@accel_path:
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
@changed:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_add_entry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_path:
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_lookup_entry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_path:
|
||||
@key:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_change_entry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_path:
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
@replace:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_load ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@file_name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_save ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@file_name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_foreach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@foreach_func:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_load_fd ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@fd:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_save_fd ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@fd:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_load_scanner ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@scanner:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_add_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter_pattern:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_foreach_unfiltered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@foreach_func:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_lock_path ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_map_unlock_path ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_path:
|
||||
|
||||
|
||||
@@ -1,310 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkAdjustment
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A GtkObject representing an adjustable bounded value
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkAdjustment object represents a value which has an associated lower
|
||||
and upper bound, together with step and page increments, and a page size.
|
||||
It is used within several GTK+ widgets, including
|
||||
#GtkSpinButton, #GtkViewport, and #GtkRange (which is a base class for
|
||||
#GtkHScrollbar, #GtkVScrollbar, #GtkHScale, and #GtkVScale).
|
||||
</para>
|
||||
<para>
|
||||
The #GtkAdjustment object does not update the value itself. Instead
|
||||
it is left up to the owner of the #GtkAdjustment to control the value.
|
||||
</para>
|
||||
<para>
|
||||
The owner of the #GtkAdjustment typically calls the
|
||||
gtk_adjustment_value_changed() and gtk_adjustment_changed() functions
|
||||
after changing the value and its bounds. This results in the emission of the
|
||||
"value_changed" or "changed" signal respectively.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkAdjustment ##### -->
|
||||
<para>
|
||||
The #GtkAdjustment-struct struct contains the following fields.
|
||||
|
||||
<informaltable pgwide="1" frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#gdouble lower;</entry>
|
||||
<entry>the minimum value.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gdouble upper;</entry>
|
||||
<entry>the maximum value.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gdouble value;</entry>
|
||||
<entry>the current value.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gdouble step_increment;</entry>
|
||||
<entry>the increment to use to make minor changes to the value.
|
||||
In a #GtkScrollbar this increment is used when the mouse is clicked on the
|
||||
arrows at the top and bottom of the scrollbar, to scroll by a small amount.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gdouble page_increment;</entry>
|
||||
<entry>the increment to use to make major changes to the value.
|
||||
In a #GtkScrollbar this increment is used when the mouse is clicked in the
|
||||
trough, to scroll by a large amount.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gdouble page_size;</entry>
|
||||
<entry>the page size.
|
||||
In a #GtkScrollbar this is the size of the area which is currently visible.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkAdjustment::changed ##### -->
|
||||
<para>
|
||||
Emitted when one or more of the #GtkAdjustment fields have been changed,
|
||||
other than the value field.
|
||||
</para>
|
||||
|
||||
@adjustment: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkAdjustment::value-changed ##### -->
|
||||
<para>
|
||||
Emitted when the #GtkAdjustment value field has been changed.
|
||||
</para>
|
||||
|
||||
@adjustment: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkAdjustment:lower ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAdjustment:page-increment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAdjustment:page-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAdjustment:step-increment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAdjustment:upper ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAdjustment:value ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkAdjustment.
|
||||
</para>
|
||||
|
||||
@value: the initial value.
|
||||
@lower: the minimum value.
|
||||
@upper: the maximum value.
|
||||
@step_increment: the step increment.
|
||||
@page_increment: the page increment.
|
||||
@page_size: the page size.
|
||||
@Returns: a new #GtkAdjustment.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_get_value ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_set_value ##### -->
|
||||
<para>
|
||||
Sets the #GtkAdjustment value. The value is clamped to lie between
|
||||
<literal>adjustment->lower</literal> and
|
||||
<literal>adjustment->upper</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Note that for adjustments which are used in a #GtkScrollbar, the effective
|
||||
range of allowed values goes from <literal>adjustment->lower</literal> to
|
||||
<literal>adjustment->upper - adjustment->page_size</literal>.
|
||||
</para>
|
||||
|
||||
@adjustment: a #GtkAdjustment.
|
||||
@value: the new value.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_clamp_page ##### -->
|
||||
<para>
|
||||
Updates the #GtkAdjustment @value to ensure that the range between @lower
|
||||
and @upper is in the current page (i.e. between @value and @value +
|
||||
@page_size).
|
||||
If the range is larger than the page size, then only the start of it will
|
||||
be in the current page.
|
||||
A "changed" signal will be emitted if the value is changed.
|
||||
</para>
|
||||
|
||||
@adjustment: a #GtkAdjustment.
|
||||
@lower: the lower value.
|
||||
@upper: the upper value.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_changed ##### -->
|
||||
<para>
|
||||
Emits a "changed" signal from the #GtkAdjustment.
|
||||
This is typically called by the owner of the #GtkAdjustment after it has
|
||||
changed any of the #GtkAdjustment fields other than the value.
|
||||
</para>
|
||||
|
||||
@adjustment: a #GtkAdjustment
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_value_changed ##### -->
|
||||
<para>
|
||||
Emits a "value_changed" signal from the #GtkAdjustment.
|
||||
This is typically called by the owner of the #GtkAdjustment after it has
|
||||
changed the #GtkAdjustment value field.
|
||||
</para>
|
||||
|
||||
@adjustment: a #GtkAdjustment
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_configure ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@value:
|
||||
@lower:
|
||||
@upper:
|
||||
@step_increment:
|
||||
@page_increment:
|
||||
@page_size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_get_lower ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_get_page_increment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_get_page_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_get_step_increment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_get_upper ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_set_lower ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@lower:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_set_page_increment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@page_increment:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_set_page_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@page_size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_set_step_increment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@step_increment:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_adjustment_set_upper ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@upper:
|
||||
|
||||
|
||||
@@ -1,355 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellRenderer
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
An object for rendering a single cell on a GdkDrawable
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkCellRenderer is a base class of a set of objects used for
|
||||
rendering a cell to a #GdkDrawable. These objects are used primarily by
|
||||
the #GtkTreeView widget, though they aren't tied to them in any
|
||||
specific way. It is worth noting that #GtkCellRenderer is not a
|
||||
#GtkWidget and cannot be treated as such.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The primary use of a #GtkCellRenderer is for drawing a certain graphical
|
||||
elements on a #GdkDrawable. Typically, one cell renderer is used to
|
||||
draw many cells on the screen. To this extent, it isn't expected that a
|
||||
CellRenderer keep any permanent state around. Instead, any state is set
|
||||
just prior to use using #GObject<!-- -->s property system. Then, the
|
||||
cell is measured using gtk_cell_renderer_get_size(). Finally, the cell
|
||||
is rendered in the correct location using gtk_cell_renderer_render().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are a number of rules that must be followed when writing a new
|
||||
#GtkCellRenderer. First and formost, it's important that a certain set
|
||||
of properties will always yield a cell renderer of the same size,
|
||||
barring a #GtkStyle change. The #GtkCellRenderer also has a number of
|
||||
generic properties that are expected to be honored by all children.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Beyond merely rendering a cell, cell renderers can optionally
|
||||
provide active user interface elements. A cell renderer can be
|
||||
<firstterm>activatable</firstterm> like #GtkCellRendererToggle,
|
||||
which toggles when it gets activated by a mouse click, or it can be
|
||||
<firstterm>editable</firstterm> like #GtkCellRendererText, which
|
||||
allows the user to edit the text using a #GtkEntry.
|
||||
To make a cell renderer activatable or editable, you have to
|
||||
implement the @activate or @start_editing virtual functions,
|
||||
respectively.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkCellRendererText,#GtkCellRendererPixbuf,#GtkCellRendererToggle
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkCellRendererState ##### -->
|
||||
<para>
|
||||
Tells how a cell is to be rendererd.
|
||||
</para>
|
||||
|
||||
@GTK_CELL_RENDERER_SELECTED: The cell is currently selected, and
|
||||
probably has a selection colored background to render to.
|
||||
@GTK_CELL_RENDERER_PRELIT: The mouse is hovering over the cell.
|
||||
@GTK_CELL_RENDERER_INSENSITIVE: The cell is drawn in an insensitive manner
|
||||
@GTK_CELL_RENDERER_SORTED: The cell is in a sorted row
|
||||
@GTK_CELL_RENDERER_FOCUSED: The cell is in the focus row.
|
||||
|
||||
<!-- ##### ENUM GtkCellRendererMode ##### -->
|
||||
<para>
|
||||
Identifies how the user can interact with a particular cell.
|
||||
</para>
|
||||
|
||||
@GTK_CELL_RENDERER_MODE_INERT: The cell is just for display
|
||||
and cannot be interacted with. Note that this doesn't mean that eg. the
|
||||
row being drawn can't be selected -- just that a particular element of
|
||||
it cannot be individually modified.
|
||||
@GTK_CELL_RENDERER_MODE_ACTIVATABLE: The cell can be clicked.
|
||||
@GTK_CELL_RENDERER_MODE_EDITABLE: The cell can be edited or otherwise modified.
|
||||
|
||||
<!-- ##### STRUCT GtkCellRenderer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkCellRenderer::editing-canceled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cellrenderer: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkCellRenderer::editing-started ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cellrenderer: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:cell-background ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:cell-background-gdk ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:cell-background-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:editing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:is-expanded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:is-expander ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:mode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:xalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:xpad ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:yalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRenderer:ypad ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GtkCellRendererClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@parent_class:
|
||||
@get_size:
|
||||
@render:
|
||||
@activate:
|
||||
@start_editing:
|
||||
@editing_canceled:
|
||||
@editing_started:
|
||||
@_gtk_reserved1:
|
||||
@_gtk_reserved2:
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@widget:
|
||||
@cell_area:
|
||||
@x_offset:
|
||||
@y_offset:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_render ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@window:
|
||||
@widget:
|
||||
@background_area:
|
||||
@cell_area:
|
||||
@expose_area:
|
||||
@flags:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_activate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@event:
|
||||
@widget:
|
||||
@path:
|
||||
@background_area:
|
||||
@cell_area:
|
||||
@flags:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_start_editing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@event:
|
||||
@widget:
|
||||
@path:
|
||||
@background_area:
|
||||
@cell_area:
|
||||
@flags:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_stop_editing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@canceled:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_fixed_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_fixed_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@visible:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@sensitive:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_alignment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@xalign:
|
||||
@yalign:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_alignment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@xalign:
|
||||
@yalign:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@xpad:
|
||||
@ypad:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@xpad:
|
||||
@ypad:
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ The #GtkCellRendererProgress cell renderer was added in GTK+ 2.6.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkCellRendererProgress:orientation ##### -->
|
||||
<!-- ##### ARG GtkCellRendererProgress:inverted ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@@ -1,283 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellRendererText
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Renders text in a cell
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkCellRendererText renders a given text in its cell, using the font, color and
|
||||
style information provided by its properties. The text will be ellipsized if it is
|
||||
too long and the <link linkend="GtkCellRendererText--ellipsize">ellipsize</link>
|
||||
property allows it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If the <link linkend="GtkCellRenderer--mode">mode</link> is %GTK_CELL_RENDERER_MODE_EDITABLE,
|
||||
the #GtkCellRendererText allows to edit its text using an entry.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellRendererText ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkCellRendererText::edited ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cellrenderertext: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:align-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:alignment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:attributes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:background ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:background-gdk ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:background-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:editable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:editable-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:ellipsize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:ellipsize-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:family ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:family-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:font ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:font-desc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:foreground ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:foreground-gdk ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:foreground-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:language ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:language-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:rise ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:rise-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:scale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:scale-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:single-paragraph-mode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:size-points ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:size-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:stretch ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:stretch-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:strikethrough ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:strikethrough-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:style-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:underline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:underline-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:variant ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:variant-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:weight ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:weight-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:width-chars ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:wrap-mode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererText:wrap-width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_text_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_text_set_fixed_height_from_font ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@renderer:
|
||||
@number_of_rows:
|
||||
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellView
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A widget displaying a single row of a GtkTreeModel
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkCellView displays a single row of a #GtkTreeModel, using
|
||||
cell renderers just like #GtkTreeView. #GtkCellView doesn't support
|
||||
some of the more complex features of #GtkTreeView, like cell editing
|
||||
and drag and drop.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellView ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkCellView:background ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellView:background-gdk ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellView:background-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellView:model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_new_with_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@text:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_new_with_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@markup:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_new_with_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_set_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_view:
|
||||
@model:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_get_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_view:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_set_displayed_row ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_view:
|
||||
@path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_get_displayed_row ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_view:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_get_size_of_row ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_view:
|
||||
@path:
|
||||
@requisition:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_view_set_background_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_view:
|
||||
@color:
|
||||
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkColorButton
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A button to launch a color selection dialog
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkColorButton is a button which displays the currently selected color
|
||||
an allows to open a color selection dialog to change the color. It is suitable
|
||||
widget for selecting a color in a preference dialog.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkColorSelectionDialog, #GtkFontButton
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkColorButton ##### -->
|
||||
<para>
|
||||
The GtkColorButton struct has only private fields and
|
||||
should not be used directly.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkColorButton::color-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorbutton: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkColorButton:alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorButton:color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorButton:title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorButton:use-alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_new_with_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_set_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color_button:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_get_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color_button:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_set_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color_button:
|
||||
@alpha:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_get_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_set_use_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color_button:
|
||||
@use_alpha:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_get_use_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_set_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color_button:
|
||||
@title:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_button_get_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@color_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkColorSelection
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A widget used to select a color
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkColorSelection is a widget that is used to select
|
||||
a color. It consists of a color wheel and number of sliders
|
||||
and entry boxes for color parameters such as hue, saturation,
|
||||
value, red, green, blue, and opacity. It is found on the standard
|
||||
color selection dialog box #GtkColorSelectionDialog.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkColorSelection ##### -->
|
||||
<para>
|
||||
The #GtkColorSelection-struct struct contains private data only,
|
||||
and should be accessed using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkColorSelection::color-changed ##### -->
|
||||
<para>
|
||||
This signal is emitted when the color changes in the #GtkColorSelection
|
||||
according to its update policy.
|
||||
</para>
|
||||
|
||||
@colorselection: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkColorSelection:current-alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorSelection:current-color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorSelection:has-opacity-control ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorSelection:has-palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_set_has_opacity_control ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@has_opacity:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_get_has_opacity_control ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_set_has_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@has_palette:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_get_has_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_get_current_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_set_current_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@alpha:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_get_current_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_set_current_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_get_previous_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_set_previous_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@alpha:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_get_previous_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_set_previous_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_is_adjusting ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_palette_from_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@str:
|
||||
@colors:
|
||||
@n_colors:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_palette_to_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colors:
|
||||
@n_colors:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkColorSelectionChangePaletteFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colors:
|
||||
@n_colors:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_set_change_palette_with_screen_hook ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@func:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkColorSelectionChangePaletteWithScreenFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@colors:
|
||||
@n_colors:
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
@@ -1,222 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCombo
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A text entry field with a dropdown list
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkCombo widget consists of a single-line text entry field and a drop-down
|
||||
list. The drop-down list is displayed when the user clicks on a small arrow
|
||||
button to the right of the entry field.
|
||||
</para>
|
||||
<para>
|
||||
The drop-down list is a #GtkList widget and can be accessed using the
|
||||
<structfield>list</structfield> member of the #GtkCombo-struct.
|
||||
List elements can contain arbitrary widgets, but if an element is not a
|
||||
plain label, then you must use the gtk_list_set_item_string() function.
|
||||
This sets the string which will be placed in the text entry field when the
|
||||
item is selected.
|
||||
</para>
|
||||
<para>
|
||||
By default, the user can step through the items in the list using the
|
||||
arrow (cursor) keys, though this behaviour can be turned off with
|
||||
gtk_combo_set_use_arrows().
|
||||
</para>
|
||||
<para>
|
||||
As of GTK+ 2.4, #GtkCombo has been deprecated in favor of #GtkComboBoxEntry.
|
||||
</para>
|
||||
|
||||
<example id="gtkcombo-simple-example">
|
||||
<title>Creating a <structname>GtkCombo</structname> widget with simple text
|
||||
items.</title>
|
||||
<programlisting>
|
||||
GtkWidget *combo;
|
||||
GList *items = NULL;
|
||||
|
||||
items = g_list_append (items, "First Item");
|
||||
items = g_list_append (items, "Second Item");
|
||||
items = g_list_append (items, "Third Item");
|
||||
items = g_list_append (items, "Fourth Item");
|
||||
items = g_list_append (items, "Fifth Item");
|
||||
|
||||
combo = gtk_combo_new (<!-- -->);
|
||||
gtk_combo_set_popdown_strings (GTK_COMBO (combo), items);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Creating a <structname>GtkCombo</structname> widget with a complex item.</title>
|
||||
<programlisting>
|
||||
GtkWidget *combo, *item, *hbox, *arrow, *label;
|
||||
|
||||
combo = gtk_combo_new (<!-- -->);
|
||||
|
||||
item = gtk_list_item_new (<!-- -->);
|
||||
gtk_widget_show (item);
|
||||
|
||||
/* You can put almost anything into the GtkListItem widget. Here we will use
|
||||
a horizontal box with an arrow and a label in it. */
|
||||
hbox = gtk_hbox_new (FALSE, 3);
|
||||
gtk_container_add (GTK_CONTAINER (item), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
|
||||
gtk_widget_show (arrow);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), arrow, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("First Item");
|
||||
gtk_widget_show (label);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
|
||||
/* You must set the string to display in the entry field when the item is
|
||||
selected. */
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (item), "1st Item");
|
||||
|
||||
/* Now we simply add the item to the combo's list. */
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), item);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCombo ##### -->
|
||||
<para>
|
||||
The #GtkCombo-struct struct contains the following fields.
|
||||
(These fields should be considered read-only. They should never be set by
|
||||
an application.)
|
||||
</para>
|
||||
|
||||
@entry: the text entry field.
|
||||
@list: the list shown in the drop-down window.
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
<!-- ##### ARG GtkCombo:allow-empty ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCombo:case-sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCombo:enable-arrow-keys ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCombo:enable-arrows-always ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCombo:value-in-list ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkCombo.
|
||||
</para>
|
||||
|
||||
@Returns: a new #GtkCombo.
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_set_popdown_strings ##### -->
|
||||
<para>
|
||||
Convenience function to set all of the items in the popup list.
|
||||
(See the <link linkend="gtkcombo-simple-example">example</link> above.)
|
||||
</para>
|
||||
|
||||
@combo: a #GtkCombo.
|
||||
@strings: a list of strings, or %NULL to clear the popup list
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_set_value_in_list ##### -->
|
||||
<para>
|
||||
Specifies whether the value entered in the text entry field must match one of
|
||||
the values in the list. If this is set then the user will not be able to
|
||||
perform any other action until a valid value has been entered.
|
||||
</para>
|
||||
<para>
|
||||
If an empty field is acceptable, the @ok_if_empty parameter should be %TRUE.
|
||||
</para>
|
||||
|
||||
@combo: a #GtkCombo.
|
||||
@val: %TRUE if the value entered must match one of the values in the list.
|
||||
@ok_if_empty: %TRUE if an empty value is considered valid.
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_set_use_arrows ##### -->
|
||||
<para>
|
||||
Specifies if the arrow (cursor) keys can be used to step through the items in
|
||||
the list. This is on by default.
|
||||
</para>
|
||||
|
||||
@combo: a #GtkCombo.
|
||||
@val: %TRUE if the arrow keys can be used to step through the items in
|
||||
the list.
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_set_use_arrows_always ##### -->
|
||||
<para>
|
||||
Obsolete function, does nothing.
|
||||
</para>
|
||||
|
||||
@combo: a #GtkCombo.
|
||||
@val: unused
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_set_case_sensitive ##### -->
|
||||
<para>
|
||||
Specifies whether the text entered into the #GtkEntry field and the text in
|
||||
the list items is case sensitive.
|
||||
</para>
|
||||
<para>
|
||||
This may be useful, for example, when you have called
|
||||
gtk_combo_set_value_in_list() to limit the values entered, but you are not
|
||||
worried about differences in case.
|
||||
</para>
|
||||
|
||||
@combo: a #GtkCombo.
|
||||
@val: %TRUE if the text in the list items is case sensitive.
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_set_item_string ##### -->
|
||||
<para>
|
||||
Sets the string to place in the #GtkEntry field when a particular list item is
|
||||
selected. This is needed if the list item is not a simple label.
|
||||
</para>
|
||||
|
||||
@combo: a #GtkCombo.
|
||||
@item: a #GtkItem.
|
||||
@item_value: the string to place in the #GtkEntry when @item is selected.
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_disable_activate ##### -->
|
||||
<para>
|
||||
Stops the #GtkCombo widget from showing the popup list when the #GtkEntry
|
||||
emits the "activate" signal, i.e. when the Return key is pressed.
|
||||
This may be useful if, for example, you want the Return key to close a dialog
|
||||
instead.
|
||||
</para>
|
||||
|
||||
@combo: a #GtkCombo.
|
||||
@Deprecated: 2.4: Use #GtkComboBox instead.
|
||||
|
||||
|
||||
@@ -1,461 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkComboBox
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A widget used to choose from a list of items
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkComboBox is a widget that allows the user to choose from a
|
||||
list of valid choices. The #GtkComboBox displays the selected
|
||||
choice. When activated, the #GtkComboBox displays a popup
|
||||
which allows the user to make a new choice. The style in which
|
||||
the selected value is displayed, and the style of the popup is
|
||||
determined by the current theme. It may be similar to a #GtkOptionMenu,
|
||||
or similar to a Windows-style combo box.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Unlike its predecessors #GtkCombo and #GtkOptionMenu, the #GtkComboBox
|
||||
uses the model-view pattern; the list of valid choices is specified in the
|
||||
form of a tree model, and the display of the choices can be adapted to
|
||||
the data in the model by using cell renderers, as you would in a tree view.
|
||||
This is possible since #GtkComboBox implements the #GtkCellLayout interface.
|
||||
The tree model holding the valid choices is not restricted to a flat list,
|
||||
it can be a real tree, and the popup will reflect the tree structure.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In addition to the model-view API, #GtkComboBox offers a simple API which
|
||||
is suitable for text-only combo boxes, and hides the complexity of managing
|
||||
the data in a model. It consists of the functions gtk_combo_box_new_text(),
|
||||
gtk_combo_box_append_text(), gtk_combo_box_insert_text(),
|
||||
gtk_combo_box_prepend_text(), gtk_combo_box_remove_text() and
|
||||
gtk_combo_box_get_active_text().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkComboBoxEntry, #GtkTreeModel, #GtkCellRenderer
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkComboBox ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkComboBox::changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combobox: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkComboBox::move-active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combobox: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkComboBox::popdown ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combobox: the object which received the signal.
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkComboBox::popup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combobox: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkComboBox:active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:add-tearoffs ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:button-sensitivity ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:column-span-column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:focus-on-click ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:has-frame ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:popup-shown ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:row-span-column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:tearoff-title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:wrap-width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:appears-as-list ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:arrow-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkComboBox:shadow-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_new_with_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@model:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_wrap_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_wrap_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@width:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_row_span_column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_row_span_column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@row_span:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_column_span_column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_column_span_column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@column_span:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@index_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_active_iter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_active_iter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@iter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@model:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_new_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_append_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@text:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_insert_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@position:
|
||||
@text:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_prepend_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@text:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_remove_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@position:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_active_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_popup_for_device ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@device:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_popup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_popdown ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_popup_accessible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_row_separator_func ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_row_separator_func ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@func:
|
||||
@data:
|
||||
@destroy:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_add_tearoffs ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@add_tearoffs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_add_tearoffs ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@title:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_focus_on_click ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo:
|
||||
@focus_on_click:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_focus_on_click ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_set_button_sensitivity ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@sensitivity:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_get_button_sensitivity ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkComboBoxEntry
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A text entry field with a dropdown list
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkComboBoxEntry is a widget that allows the user to choose from a
|
||||
list of valid choices or enter a different value. It is very similar
|
||||
to a #GtkComboBox, but it displays the selected value in an entry to
|
||||
allow modifying it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In contrast to a #GtkComboBox, the underlying model of a #GtkComboBoxEntry
|
||||
must always have a text column (see gtk_combo_box_entry_set_text_column()),
|
||||
and the entry will show the content of the text column in the selected row.
|
||||
To get the text from the entry, use gtk_combo_box_get_active_text().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The changed signal will be emitted while typing into a GtkComboBoxEntry,
|
||||
as well as when selecting an item from the GtkComboBoxEntry's list. Use
|
||||
gtk_combo_box_get_active() or gtk_combo_box_get_active_iter() to discover
|
||||
whether an item was actually selected from the list.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Connect to the activate signal of the GtkEntry (use gtk_bin_get_child())
|
||||
to detect when the user actually finishes entering text.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The convenience API to construct simple text-only #GtkComboBox<!-- -->es
|
||||
can also be used with #GtkComboBoxEntry<!-- -->s which have been constructed
|
||||
with gtk_combo_box_entry_new_text().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you have special needs that go beyond a simple entry (e.g. input validation),
|
||||
it is possible to replace the child entry by a different widget using
|
||||
gtk_container_remove() and gtk_container_add().
|
||||
</para>
|
||||
|
||||
<refsect2 id="GtkComboBoxEntry-BUILDER-UI">
|
||||
<title>GtkComboBoxEntry as GtkBuildable</title>
|
||||
<para>
|
||||
Beyond the <attributes> support that is shared by all
|
||||
<link linkend="GtkCellLayout-BUILDER-UI">GtkCellLayout</link> implementation,
|
||||
GtkComboBoxEntry makes the entry available in UI definitions as an internal
|
||||
child with name "entry".
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkComboBox
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkComboBoxEntry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkComboBoxEntry:text-column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_entry_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_entry_new_with_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@model:
|
||||
@text_column:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_entry_new_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_entry_set_text_column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entry_box:
|
||||
@text_column:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_combo_box_entry_get_text_column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entry_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user