Compare commits
974 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0416d62aa2 | ||
|
|
32d59d174e | ||
|
|
39c714ddc0 | ||
|
|
036aada543 | ||
|
|
0b1a1e200f | ||
|
|
9be22cb574 | ||
|
|
45d6752a3c | ||
|
|
d22b79f1b6 | ||
|
|
582b281761 | ||
|
|
0bb51bca9b | ||
|
|
3e40146c04 | ||
|
|
36809d400f | ||
|
|
3959ae91d1 | ||
|
|
168e9d0708 | ||
|
|
21efe59aa0 | ||
|
|
b18afe9054 | ||
|
|
4d3b19fa7c | ||
|
|
cc5b22cc81 | ||
|
|
154be115ec | ||
|
|
397951cc85 | ||
|
|
028610b104 | ||
|
|
d3d7070995 | ||
|
|
c5621f857b | ||
|
|
de89bf3e71 | ||
|
|
e2f561aae0 | ||
|
|
ced22b1540 | ||
|
|
b6b64353a1 | ||
|
|
953d391a34 | ||
|
|
f649237bf2 | ||
|
|
5e5ab90a57 | ||
|
|
97d4b25d02 | ||
|
|
ab93e1b8e8 | ||
|
|
2421e641f4 | ||
|
|
13147323d7 | ||
|
|
f117777c20 | ||
|
|
3b336186ee | ||
|
|
2d8b8e054a | ||
|
|
f7cfe2bfea | ||
|
|
2105d946cf | ||
|
|
44adf811ea | ||
|
|
a2420c7db5 | ||
|
|
c51830f453 | ||
|
|
047a91322c | ||
|
|
a8715045ce | ||
|
|
7e4e2c636e | ||
|
|
64cd8c3f52 | ||
|
|
8005fd9e4d | ||
|
|
ca3b8e8eda | ||
|
|
145fdcbb9e | ||
|
|
ca75ead34a | ||
|
|
cc8927a589 | ||
|
|
0e52286d53 | ||
|
|
e6af9279f3 | ||
|
|
6c3aca7345 | ||
|
|
44469e4684 | ||
|
|
8d936d3cde | ||
|
|
25cf6517e8 | ||
|
|
591b37d7ce | ||
|
|
d30c31d6e1 | ||
|
|
6a278af6d2 | ||
|
|
3e5934e5c2 | ||
|
|
ec7187e039 | ||
|
|
786b3914cd | ||
|
|
de1c79c721 | ||
|
|
05b246accc | ||
|
|
858e6bcd65 | ||
|
|
1932f32ef2 | ||
|
|
41054425b9 | ||
|
|
51f140bfdc | ||
|
|
4a0f78b72f | ||
|
|
cf73930869 | ||
|
|
2400e1440e | ||
|
|
a2edc3c6bf | ||
|
|
ccf988e23d | ||
|
|
4739118988 | ||
|
|
1937d1df5c | ||
|
|
7cc8cf2888 | ||
|
|
c91cb2f71a | ||
|
|
33c70e9b52 | ||
|
|
a202dc2e9f | ||
|
|
c2546c859d | ||
|
|
c0084e2142 | ||
|
|
0ad0646daf | ||
|
|
9e12297d69 | ||
|
|
e6cfb7b19f | ||
|
|
9bad2f70a4 | ||
|
|
b09f8f6e30 | ||
|
|
23b88f26b9 | ||
|
|
9d1dc2dae9 | ||
|
|
c268892e39 | ||
|
|
37c3413beb | ||
|
|
1f446d0658 | ||
|
|
e8dcf330cc | ||
|
|
a79f929dd6 | ||
|
|
deda8b97f6 | ||
|
|
6dd6d44f98 | ||
|
|
17f9ba3a15 | ||
|
|
abf088f132 | ||
|
|
d1eea9cf1f | ||
|
|
c45c51ecd9 | ||
|
|
4449acbb82 | ||
|
|
7b4f09a589 | ||
|
|
105e0be70e | ||
|
|
a4a5d3da0e | ||
|
|
ebc6a00015 | ||
|
|
9976554c6e | ||
|
|
2f3cf2c449 | ||
|
|
bb8fbde89f | ||
|
|
6320b12e8c | ||
|
|
f84df976a7 | ||
|
|
e86fab56df | ||
|
|
7272169665 | ||
|
|
8de2dbb440 | ||
|
|
61ea6875d2 | ||
|
|
9d611b1435 | ||
|
|
16f72308ec | ||
|
|
0fe210c6da | ||
|
|
65ccceea9d | ||
|
|
0780a4975b | ||
|
|
e0a1e78a5a | ||
|
|
277d840616 | ||
|
|
02457e3a93 | ||
|
|
bbe16ec60f | ||
|
|
89a8fade6f | ||
|
|
e10db38f0d | ||
|
|
428d7bd27b | ||
|
|
bbd96c5161 | ||
|
|
dc7feb27e4 | ||
|
|
97ec7f76df | ||
|
|
e6e3d0adb3 | ||
|
|
feb9580621 | ||
|
|
7a76996606 | ||
|
|
c21373dbe2 | ||
|
|
3dc377a2ca | ||
|
|
9c151ba3e1 | ||
|
|
9389d53504 | ||
|
|
a84f36028e | ||
|
|
93c8b1fdee | ||
|
|
c930f3a748 | ||
|
|
270a95f12e | ||
|
|
be83e8789c | ||
|
|
30ffad76f5 | ||
|
|
f7185ec704 | ||
|
|
155140160c | ||
|
|
44b84fe12d | ||
|
|
528546733f | ||
|
|
03018f1d01 | ||
|
|
0696bc8e86 | ||
|
|
6cfb23d185 | ||
|
|
bd0755753a | ||
|
|
f1f7df6443 | ||
|
|
341b8a4752 | ||
|
|
a5f6b812be | ||
|
|
5c89bbf3de | ||
|
|
2ba836defb | ||
|
|
9f82243197 | ||
|
|
7667c4d8dc | ||
|
|
9ec4fb60f2 | ||
|
|
939e55223c | ||
|
|
e25ac0b5cb | ||
|
|
043ca236f2 | ||
|
|
8a517dc0bb | ||
|
|
a3ee8271a9 | ||
|
|
f019047402 | ||
|
|
ff558e2ec6 | ||
|
|
5745760450 | ||
|
|
c167c7a613 | ||
|
|
d2e14a7669 | ||
|
|
8ad5076d7e | ||
|
|
4327141289 | ||
|
|
ee67900024 | ||
|
|
d170ab22a6 | ||
|
|
e3bdf9291f | ||
|
|
860fdbe3ba | ||
|
|
4df049d218 | ||
|
|
bdffae7f6c | ||
|
|
f96d9132d6 | ||
|
|
dffb6283a0 | ||
|
|
fa21459066 | ||
|
|
60fa0da96d | ||
|
|
f30cfd729a | ||
|
|
70efa73311 | ||
|
|
527e0937a8 | ||
|
|
f04a410dc5 | ||
|
|
321c034cd6 | ||
|
|
67718230c7 | ||
|
|
4d49969d5f | ||
|
|
19c1c11322 | ||
|
|
0fc8c475a8 | ||
|
|
7f92684237 | ||
|
|
c68194b951 | ||
|
|
d878dc8e1a | ||
|
|
ec7c24d227 | ||
|
|
54863bbba6 | ||
|
|
69fc109c22 | ||
|
|
913c95a5b5 | ||
|
|
a6632e9499 | ||
|
|
f57e212695 | ||
|
|
ea746ed151 | ||
|
|
9124254974 | ||
|
|
dfe0c8c0ca | ||
|
|
8296bf7035 | ||
|
|
8a6bb818a4 | ||
|
|
c775906e4a | ||
|
|
d468aee5d9 | ||
|
|
eb0a5721d9 | ||
|
|
b514c6ac22 | ||
|
|
5002976fab | ||
|
|
549ffcbf5c | ||
|
|
ae37d2097e | ||
|
|
d769808cbb | ||
|
|
00c439dfcb | ||
|
|
f8171ce092 | ||
|
|
6e0af6c252 | ||
|
|
c44b0d2f7a | ||
|
|
94bc87c637 | ||
|
|
d4ac4f69d1 | ||
|
|
d6d39154a2 | ||
|
|
e87a9021a2 | ||
|
|
055c7aa454 | ||
|
|
39b960216c | ||
|
|
f29b9e2daf | ||
|
|
1fa297c82f | ||
|
|
ad3be19251 | ||
|
|
2f0dd2d806 | ||
|
|
5ab28ed9fa | ||
|
|
c009f49f93 | ||
|
|
8c8e1daefa | ||
|
|
1946086d8b | ||
|
|
493d386834 | ||
|
|
bd439f65e2 | ||
|
|
d743b2fbea | ||
|
|
a79ef0866b | ||
|
|
bce2a5173d | ||
|
|
069a593b0f | ||
|
|
ff10f9ce02 | ||
|
|
531c7e535b | ||
|
|
a4514f993e | ||
|
|
d75ccb5c0d | ||
|
|
2d79405118 | ||
|
|
6f0f5f8dc7 | ||
|
|
1811ecfb58 | ||
|
|
c035c122e2 | ||
|
|
6007761549 | ||
|
|
94f887390c | ||
|
|
1780361b79 | ||
|
|
4a73b41a34 | ||
|
|
f22239c4aa | ||
|
|
a96bf76db3 | ||
|
|
29870ca2f9 | ||
|
|
0e6d121b83 | ||
|
|
ed58c1028a | ||
|
|
d55ff39ad0 | ||
|
|
b50548e350 | ||
|
|
0f5f7539f3 | ||
|
|
00ff4d622b | ||
|
|
313b6f39a6 | ||
|
|
10e249f035 | ||
|
|
a7394dc887 | ||
|
|
45344cdf7c | ||
|
|
c5c87a918f | ||
|
|
31357a7ab6 | ||
|
|
4d2c165b75 | ||
|
|
f9a1bfb7b9 | ||
|
|
88d96c7246 | ||
|
|
a99a4d35e4 | ||
|
|
012ff55b84 | ||
|
|
a504784b4b | ||
|
|
ee876f94b1 | ||
|
|
de718dbe93 | ||
|
|
9660bfe9da | ||
|
|
9d69355e6f | ||
|
|
e71c5d3ab5 | ||
|
|
82ba9628e5 | ||
|
|
141e983d24 | ||
|
|
0c5e3b390b | ||
|
|
cfc27be34e | ||
|
|
f4d1246700 | ||
|
|
d84b575cd0 | ||
|
|
18048308e4 | ||
|
|
3c03683e09 | ||
|
|
82e609c2a0 | ||
|
|
36861cf608 | ||
|
|
bf78db5690 | ||
|
|
6e4aff8608 | ||
|
|
6b3613d30c | ||
|
|
dbc80f47b1 | ||
|
|
c564b3ef2b | ||
|
|
48f1b45b62 | ||
|
|
3484246dc3 | ||
|
|
267d209441 | ||
|
|
8430e215a7 | ||
|
|
d6afa6eff2 | ||
|
|
4f49287659 | ||
|
|
aa47fca68f | ||
|
|
a057c03889 | ||
|
|
ef8ce08edf | ||
|
|
e87db9e44a | ||
|
|
454160ad9e | ||
|
|
7adf894a29 | ||
|
|
b36b7000f1 | ||
|
|
ed2c837574 | ||
|
|
7cbb573ca9 | ||
|
|
027f411150 | ||
|
|
aa8693f2cb | ||
|
|
7efa439fb3 | ||
|
|
db4dabf5e7 | ||
|
|
cf08a43eaa | ||
|
|
dd0d0753e9 | ||
|
|
1e765d2df0 | ||
|
|
f3668e96e7 | ||
|
|
630441030f | ||
|
|
37b1a1acf6 | ||
|
|
40408e74dd | ||
|
|
33ada9e938 | ||
|
|
74ca4e2482 | ||
|
|
c28d6b84fa | ||
|
|
20dc8509f8 | ||
|
|
b923f9cf54 | ||
|
|
b2c8cb55c2 | ||
|
|
d0cf137ed9 | ||
|
|
d8d62ceb99 | ||
|
|
98cdcce349 | ||
|
|
51149246c0 | ||
|
|
7f83be8595 | ||
|
|
c41e36ad8a | ||
|
|
4d282879be | ||
|
|
6a98939720 | ||
|
|
143b55c3cb | ||
|
|
a47c0754d7 | ||
|
|
9a3af66a21 | ||
|
|
b5dab96b45 | ||
|
|
b29fb1e609 | ||
|
|
548f3a8c69 | ||
|
|
2bd2a024ed | ||
|
|
2686930bfd | ||
|
|
8f60176229 | ||
|
|
66ae394eb5 | ||
|
|
dffc1bf19d | ||
|
|
9e5b3a46b1 | ||
|
|
0e8fe66f09 | ||
|
|
ea3184f129 | ||
|
|
ecd961fcf7 | ||
|
|
8e9436daae | ||
|
|
e7737dbd19 | ||
|
|
e96c161643 | ||
|
|
52941c5089 | ||
|
|
b72960f12d | ||
|
|
4c2c45740d | ||
|
|
c99b4e775b | ||
|
|
e2000ac366 | ||
|
|
fcdeab5456 | ||
|
|
c6f9e39762 | ||
|
|
b97ccecd5d | ||
|
|
3750ecc821 | ||
|
|
26e67850a7 | ||
|
|
2c0e3be61f | ||
|
|
5b02063c9f | ||
|
|
31d6d3ea17 | ||
|
|
d7f18ddad9 | ||
|
|
417e5f86cf | ||
|
|
4ff4eb544d | ||
|
|
d0366e5160 | ||
|
|
c25ef64c70 | ||
|
|
66f108874b | ||
|
|
369ffae8dc | ||
|
|
b664c328b4 | ||
|
|
9063e5b3bf | ||
|
|
ccb09d1c6f | ||
|
|
0ef74c936f | ||
|
|
6ca5430a74 | ||
|
|
e6605b091c | ||
|
|
6445943ff9 | ||
|
|
8fbdbed18c | ||
|
|
2bb2820272 | ||
|
|
3d1f55b68d | ||
|
|
305979d5a1 | ||
|
|
9044ec9bb9 | ||
|
|
8031432c09 | ||
|
|
becb5057fc | ||
|
|
690af10d65 | ||
|
|
ba184fc5af | ||
|
|
57032100bf | ||
|
|
d0f4532d90 | ||
|
|
a003b1b5f2 | ||
|
|
eab02f697a | ||
|
|
9ef87ea11e | ||
|
|
a90d43bed6 | ||
|
|
8ebf278ebb | ||
|
|
a0ab93ca13 | ||
|
|
2de23ea6cf | ||
|
|
6fc6903c16 | ||
|
|
fb1aeab052 | ||
|
|
11ec2ede56 | ||
|
|
872152d56b | ||
|
|
b6b9004885 | ||
|
|
8c685884bd | ||
|
|
ba44717959 | ||
|
|
a7681f4c1a | ||
|
|
a338c0f5ea | ||
|
|
62db28607b | ||
|
|
52e3d2cf0e | ||
|
|
2678a454e5 | ||
|
|
5f12fe2b3b | ||
|
|
a7e48466d4 | ||
|
|
3b1a673ccd | ||
|
|
b55ac3523d | ||
|
|
b3969a3d75 | ||
|
|
27f972cd34 | ||
|
|
1c6cd91b64 | ||
|
|
93556ea899 | ||
|
|
91701d685a | ||
|
|
2163081bc6 | ||
|
|
200d5dde04 | ||
|
|
dab552dc22 | ||
|
|
42e7318b62 | ||
|
|
91868f5e76 | ||
|
|
a213b00d8b | ||
|
|
3b3e4e2a4b | ||
|
|
44bb1fb30e | ||
|
|
0e07d8b189 | ||
|
|
84c51a6089 | ||
|
|
cd58baa7e3 | ||
|
|
7e116727d7 | ||
|
|
23b1b350b0 | ||
|
|
1bc0954495 | ||
|
|
fbf0f2d0ec | ||
|
|
37957aea34 | ||
|
|
bff092a0d5 | ||
|
|
b11c4d9fae | ||
|
|
fbf73aada9 | ||
|
|
bbd62f4ad8 | ||
|
|
6b56aea518 | ||
|
|
8031910e21 | ||
|
|
837e16789f | ||
|
|
6ba2dd8d60 | ||
|
|
9503034262 | ||
|
|
584c9c8a02 | ||
|
|
bde64ecda2 | ||
|
|
6060dab77a | ||
|
|
2e3866b5b2 | ||
|
|
0111030586 | ||
|
|
038398d493 | ||
|
|
10bf7ca744 | ||
|
|
681c3c288b | ||
|
|
199582aed3 | ||
|
|
b1df568239 | ||
|
|
593d5441d4 | ||
|
|
3c97f037a9 | ||
|
|
5341efd4d4 | ||
|
|
11a96ce2f6 | ||
|
|
0c6f64a76c | ||
|
|
89e3a9bc08 | ||
|
|
413b39962f | ||
|
|
b50dfa6923 | ||
|
|
3b6cf72f39 | ||
|
|
d78f449deb | ||
|
|
8cca80d6a2 | ||
|
|
1a42be00b4 | ||
|
|
dea3b845b9 | ||
|
|
271a635a2f | ||
|
|
02ac8ea3af | ||
|
|
6c18c25adb | ||
|
|
adf8db68c7 | ||
|
|
655e0d8ddc | ||
|
|
4d49843317 | ||
|
|
64e7c7828d | ||
|
|
c84c0e92f8 | ||
|
|
0e548579de | ||
|
|
4e902cd223 | ||
|
|
a92c9ce9a5 | ||
|
|
986b78b667 | ||
|
|
43bc999e6d | ||
|
|
794f2815de | ||
|
|
f35c317b68 | ||
|
|
99b42cf006 | ||
|
|
cf1c6bc2ed | ||
|
|
955da9fc76 | ||
|
|
7969c1842a | ||
|
|
b093db8da9 | ||
|
|
8518aa2bf3 | ||
|
|
ca06216f20 | ||
|
|
724ab58244 | ||
|
|
839aa0421e | ||
|
|
a39b2dcee4 | ||
|
|
b436f5b8a3 | ||
|
|
515a0b61a1 | ||
|
|
d3ae855ce6 | ||
|
|
af219b818f | ||
|
|
8f57c91766 | ||
|
|
823151ba8c | ||
|
|
05cef0731f | ||
|
|
0e04566d54 | ||
|
|
0f00d3fdb0 | ||
|
|
374aa04954 | ||
|
|
52ca2f29cc | ||
|
|
56efcf62c4 | ||
|
|
f26fe5bb49 | ||
|
|
eb70b75118 | ||
|
|
3dcb40e6be | ||
|
|
3d527afadb | ||
|
|
6382eac6d8 | ||
|
|
68171b506f | ||
|
|
6fe357965a | ||
|
|
0c7a26690d | ||
|
|
3c75004474 | ||
|
|
7303f3c9fd | ||
|
|
1a385c50f0 | ||
|
|
c08bf93fe5 | ||
|
|
272c30bbc2 | ||
|
|
d50cfd192b | ||
|
|
3bf1c7adad | ||
|
|
c12a8388f6 | ||
|
|
6fc9f57848 | ||
|
|
d51132e584 | ||
|
|
09f41f5000 | ||
|
|
b645bb9e02 | ||
|
|
350757e78c | ||
|
|
6810564f42 | ||
|
|
f02dedde6d | ||
|
|
f6890e3b35 | ||
|
|
23fa53f1bc | ||
|
|
de3cc27706 | ||
|
|
362127c33c | ||
|
|
b6fc50c855 | ||
|
|
6abc52a29d | ||
|
|
21594f5574 | ||
|
|
ed33a20b29 | ||
|
|
2b3de3dd75 | ||
|
|
bc42bca9dd | ||
|
|
0532056349 | ||
|
|
2901695dfd | ||
|
|
1fe7308dd1 | ||
|
|
b9a27c2636 | ||
|
|
1d4cba6876 | ||
|
|
69a0611391 | ||
|
|
bb362f754a | ||
|
|
c98ebe3165 | ||
|
|
2accf2fd21 | ||
|
|
67632a578b | ||
|
|
d87dbd66d6 | ||
|
|
3f20ccd710 | ||
|
|
d44d5301a6 | ||
|
|
bd0e95081f | ||
|
|
a27e748586 | ||
|
|
de280cc5c8 | ||
|
|
56dfbd997e | ||
|
|
5dc6709ea0 | ||
|
|
278e5bd170 | ||
|
|
4987ca9235 | ||
|
|
b521039fc3 | ||
|
|
97dc802ec3 | ||
|
|
cf0ab196fe | ||
|
|
7b8d2096a2 | ||
|
|
766b97cf5a | ||
|
|
0135c33e48 | ||
|
|
8eed87383d | ||
|
|
a70f5ff12a | ||
|
|
20bc246960 | ||
|
|
89e187e7c1 | ||
|
|
4d54de336b | ||
|
|
a8549898ab | ||
|
|
8670fbdbaa | ||
|
|
904f0ccb7c | ||
|
|
f195fbc221 | ||
|
|
e1b52da0ab | ||
|
|
a01a4df697 | ||
|
|
9ae398f60e | ||
|
|
a12a583c99 | ||
|
|
9a4122a130 | ||
|
|
c981ddf92f | ||
|
|
beb617c206 | ||
|
|
c7a0a513f5 | ||
|
|
4b16b875db | ||
|
|
dccfd423ca | ||
|
|
8da1c40d72 | ||
|
|
a85fac7145 | ||
|
|
4d7bbd058e | ||
|
|
5bf51be576 | ||
|
|
4720bbc15e | ||
|
|
247e1945a0 | ||
|
|
55ee12c296 | ||
|
|
3302114358 | ||
|
|
961ab2e5c1 | ||
|
|
cd7afc14fd | ||
|
|
953be03acf | ||
|
|
9437138db2 | ||
|
|
4bcf3e59d5 | ||
|
|
609b03c517 | ||
|
|
1d739c2ff6 | ||
|
|
e123931a65 | ||
|
|
a84cc4e9f3 | ||
|
|
287b821705 | ||
|
|
597a24edf6 | ||
|
|
d2cd949ca1 | ||
|
|
64b8f4e039 | ||
|
|
47db0f0020 | ||
|
|
5964109ef3 | ||
|
|
ac0ed81b6f | ||
|
|
44690f17c8 | ||
|
|
d2ac65c8ba | ||
|
|
7b49379b55 | ||
|
|
2a87eb83d1 | ||
|
|
8166a0e1af | ||
|
|
d1f5050262 | ||
|
|
7372379c24 | ||
|
|
a6e3da1319 | ||
|
|
0b586a5ad7 | ||
|
|
44c7264bc7 | ||
|
|
8cb385cd31 | ||
|
|
6c76f8f6ce | ||
|
|
8a689f2e15 | ||
|
|
d1f921b5bc | ||
|
|
73a9c40b51 | ||
|
|
7698daf97a | ||
|
|
d0f887ddb1 | ||
|
|
48c8818fa2 | ||
|
|
96912b564f | ||
|
|
478cc88f8d | ||
|
|
1199b3f741 | ||
|
|
7437a79b85 | ||
|
|
e18a4fa047 | ||
|
|
bd84d95e63 | ||
|
|
e07d8adcca | ||
|
|
1eff9aba24 | ||
|
|
3969d1b969 | ||
|
|
bcf754ea1d | ||
|
|
a746df7d37 | ||
|
|
7fe8fb35b5 | ||
|
|
9b7fa7a904 | ||
|
|
122e0b40ba | ||
|
|
f64ef8ea51 | ||
|
|
94b63ec9b7 | ||
|
|
375d19aa92 | ||
|
|
5133d934f6 | ||
|
|
7ca16dad51 | ||
|
|
f253b6927c | ||
|
|
91190ce281 | ||
|
|
26c10075f9 | ||
|
|
67e0a44100 | ||
|
|
4134c346f9 | ||
|
|
e2bce0d630 | ||
|
|
c57fc80465 | ||
|
|
52325ccd66 | ||
|
|
5d8a4f78ab | ||
|
|
2e9385efe2 | ||
|
|
0fd185fa6d | ||
|
|
dc0dde995d | ||
|
|
ac9ea01ec9 | ||
|
|
ae94c371d1 | ||
|
|
2f60e18c70 | ||
|
|
563e8e8e1d | ||
|
|
9dbb30482b | ||
|
|
141ddd99f3 | ||
|
|
4fc49fd8db | ||
|
|
7cfda03395 | ||
|
|
038dfa53d0 | ||
|
|
e4d97d9652 | ||
|
|
556fb4dd5f | ||
|
|
f2d4669ff8 | ||
|
|
9426ba2735 | ||
|
|
339298b638 | ||
|
|
6fc6b8b4e8 | ||
|
|
a398c840be | ||
|
|
e5702523ff | ||
|
|
00524901e1 | ||
|
|
d183f44748 | ||
|
|
832be659b7 | ||
|
|
1fe0b8e906 | ||
|
|
5325959fe2 | ||
|
|
49e1700bb2 | ||
|
|
01946b5120 | ||
|
|
098a5b0500 | ||
|
|
637252af65 | ||
|
|
70d0129f48 | ||
|
|
2266d16148 | ||
|
|
b0b636ca85 | ||
|
|
f43a78a892 | ||
|
|
28a6068eb9 | ||
|
|
b33db85956 | ||
|
|
f1bb36c9d7 | ||
|
|
3c625fed07 | ||
|
|
39eb2c618e | ||
|
|
61af085938 | ||
|
|
11adc5a0d3 | ||
|
|
c28fabe3f6 | ||
|
|
553523048a | ||
|
|
db1e138952 | ||
|
|
ec0dd9f1ab | ||
|
|
fbfea09f37 | ||
|
|
1288ef1707 | ||
|
|
f4331caf83 | ||
|
|
49a0ec6e95 | ||
|
|
08961c4def | ||
|
|
d64b51de4d | ||
|
|
730a44a516 | ||
|
|
255756cfc8 | ||
|
|
255ec543b1 | ||
|
|
532818909c | ||
|
|
2c877d4c2d | ||
|
|
b48c9f37fb | ||
|
|
1208c2fa11 | ||
|
|
3fdd1333b2 | ||
|
|
a93c6cd6e1 | ||
|
|
97996ff00c | ||
|
|
0092c1ebf0 | ||
|
|
9af5f2b495 | ||
|
|
53b3343d1b | ||
|
|
6af4450641 | ||
|
|
05d3fc6bbd | ||
|
|
f0fb3f450f | ||
|
|
c35e0e11da | ||
|
|
51010ca066 | ||
|
|
e4b26d3231 | ||
|
|
3866ea0539 | ||
|
|
184dbd5782 | ||
|
|
fb3032af04 | ||
|
|
5742005aa1 | ||
|
|
5ccc8b2ff1 | ||
|
|
96bc993786 | ||
|
|
8690d19f03 | ||
|
|
7d51b4179d | ||
|
|
16b4c3ade8 | ||
|
|
aa20a6b0b5 | ||
|
|
490cbf84cd | ||
|
|
22da9d08da | ||
|
|
d35b723261 | ||
|
|
50a5f6046d | ||
|
|
a7b6139029 | ||
|
|
c72e93de16 | ||
|
|
53511cb653 | ||
|
|
fe3c410048 | ||
|
|
f51a3f5e33 | ||
|
|
6d1a8853c4 | ||
|
|
41d40786b1 | ||
|
|
651335bc7e | ||
|
|
aeeb54ddf0 | ||
|
|
64195589dc | ||
|
|
6d01d16d48 | ||
|
|
77ee2feda2 | ||
|
|
3c7a37d10d | ||
|
|
e6f2a809b2 | ||
|
|
f455b478e7 | ||
|
|
2c043566fc | ||
|
|
30f83d8398 | ||
|
|
65aef2099a | ||
|
|
a180f7588f | ||
|
|
f06d432ebe | ||
|
|
06e583e536 | ||
|
|
152614966f | ||
|
|
55c71f18a4 | ||
|
|
e8d6ac71b7 | ||
|
|
c36625879b | ||
|
|
ccd982f8bd | ||
|
|
79d9a8f960 | ||
|
|
3d72fe16c0 | ||
|
|
0fc2c36ee7 | ||
|
|
7abde8388f | ||
|
|
20c81eca6a | ||
|
|
53269a5042 | ||
|
|
7776c87f3f | ||
|
|
7b67393b8a | ||
|
|
025b6aa741 | ||
|
|
5be3f38535 | ||
|
|
d6ad734c7f | ||
|
|
26cbf87d7d | ||
|
|
526ff6dd68 | ||
|
|
abb7a32fbe | ||
|
|
1cc4712ea1 | ||
|
|
a6e647863d | ||
|
|
e631d2d2d4 | ||
|
|
089c9ca2f1 | ||
|
|
bfd29e62b5 | ||
|
|
177b53a079 | ||
|
|
8b7d8431aa | ||
|
|
33c0c1fba8 | ||
|
|
6e56179b03 | ||
|
|
d9fcda1072 | ||
|
|
de2d5f299d | ||
|
|
8de6ae26e4 | ||
|
|
e542f734a8 | ||
|
|
3eb2b62120 | ||
|
|
75cb664049 | ||
|
|
482b333d92 | ||
|
|
b272456023 | ||
|
|
a006d85928 | ||
|
|
a711f51629 | ||
|
|
fe6f46c589 | ||
|
|
cc32207534 | ||
|
|
5ca1865f5d | ||
|
|
016c5fd081 | ||
|
|
d2c1c0a8db | ||
|
|
24aa1620bf | ||
|
|
65b5644cda | ||
|
|
1a47356485 | ||
|
|
1ee03b35d0 | ||
|
|
72d4403eed | ||
|
|
95cbc754d4 | ||
|
|
9e0899bd2f | ||
|
|
19951c064e | ||
|
|
defc779df5 | ||
|
|
32a070d09a | ||
|
|
ca1aeff814 | ||
|
|
e24c9e291d | ||
|
|
19cd4d6af8 | ||
|
|
6a0d317866 | ||
|
|
cf54a2c68e | ||
|
|
290de401a5 | ||
|
|
e60af9d315 | ||
|
|
c0ad534d81 | ||
|
|
cb05af0a61 | ||
|
|
d267452bb7 | ||
|
|
3155fdcd41 | ||
|
|
4455db353f | ||
|
|
a9fd3ae249 | ||
|
|
815f0d7605 | ||
|
|
7da48afcaa | ||
|
|
89f1cb5178 | ||
|
|
08bc1864cc | ||
|
|
2ea8ea2f0d | ||
|
|
80c8976c28 | ||
|
|
7ab3435a58 | ||
|
|
f12a992be2 | ||
|
|
348abef6f2 | ||
|
|
edb35763a2 | ||
|
|
330e790fb2 | ||
|
|
32555badb5 | ||
|
|
54e6878001 | ||
|
|
c3637ab20f | ||
|
|
8e8aa53298 | ||
|
|
da8666d745 | ||
|
|
25b311bac3 | ||
|
|
4c01ca7ddd | ||
|
|
036e045d53 | ||
|
|
e7eb75c0ca | ||
|
|
257dea55a7 | ||
|
|
19b1f6a93a | ||
|
|
e9d3f22ac8 | ||
|
|
546a1e4cd6 | ||
|
|
5eacab593b | ||
|
|
0e1f51ecd1 | ||
|
|
a362be9979 | ||
|
|
cb8a3386c7 | ||
|
|
f080825430 | ||
|
|
47ed2c553d | ||
|
|
cede19dc65 | ||
|
|
68640f9e99 | ||
|
|
068b6f88e0 | ||
|
|
3f7e3a22f5 | ||
|
|
4cf7fe5832 | ||
|
|
93d1d51e3b | ||
|
|
27a80094bc | ||
|
|
ff86156762 | ||
|
|
1e5a22dabe | ||
|
|
f5806eac0c | ||
|
|
2517076f76 | ||
|
|
afdb3f2ee8 | ||
|
|
650223ca3b | ||
|
|
b20991af9b | ||
|
|
b1b358c820 | ||
|
|
774cebae69 | ||
|
|
1ee805f7be | ||
|
|
57214245da | ||
|
|
ff9822a833 | ||
|
|
13766991a7 | ||
|
|
4ec5b7648b | ||
|
|
d82cee80c3 | ||
|
|
8a0ef57ba3 | ||
|
|
7cebc68bde | ||
|
|
c2ee81ea86 | ||
|
|
50d9a9018a | ||
|
|
e718893611 | ||
|
|
b298ebc415 | ||
|
|
1084b8e6a1 | ||
|
|
5fa1855a83 | ||
|
|
905d328933 | ||
|
|
df4f4c14c7 | ||
|
|
6b15e248fa | ||
|
|
ed9cd90b72 | ||
|
|
3c5c7f4b4d | ||
|
|
c31ef39d76 | ||
|
|
9f3e348e32 | ||
|
|
ef3d1893b6 | ||
|
|
c967cabc35 | ||
|
|
cdb405dfcf | ||
|
|
c1884ce403 | ||
|
|
28c4518cca | ||
|
|
377ca19c9f | ||
|
|
cce1ff8eb8 | ||
|
|
e918b64088 | ||
|
|
78bbac87ed | ||
|
|
82b181e643 | ||
|
|
283160c712 | ||
|
|
d6ecaca166 | ||
|
|
764ceead66 | ||
|
|
1ad01acbf2 | ||
|
|
4d187531e4 | ||
|
|
4e207a0336 | ||
|
|
5378324a18 | ||
|
|
e63de13f40 | ||
|
|
40827b99db | ||
|
|
959d940812 | ||
|
|
26569bd54f | ||
|
|
c8bdac7508 | ||
|
|
acf1954f12 | ||
|
|
4202cc0c60 | ||
|
|
ed5564ee3a | ||
|
|
d73859fe16 | ||
|
|
9f2c97dd80 | ||
|
|
4a0cb4a240 | ||
|
|
76e23f00da | ||
|
|
4442463481 | ||
|
|
f6e1b0ac17 | ||
|
|
a38e797941 | ||
|
|
890503099f | ||
|
|
d7e369c27a | ||
|
|
e14e05addc | ||
|
|
4ba2b181bf | ||
|
|
062da50b9f | ||
|
|
0d540e935b | ||
|
|
0ba99e6e7b | ||
|
|
36ce54878b | ||
|
|
f22211c881 | ||
|
|
d093be43e7 | ||
|
|
83ee69740e | ||
|
|
7b2b9a0219 | ||
|
|
f2b50ff638 | ||
|
|
b771c9924d | ||
|
|
afc81c9e64 | ||
|
|
d74d94ce69 | ||
|
|
1f5e104495 | ||
|
|
5587130d48 | ||
|
|
1babb5400b | ||
|
|
dc0e339697 | ||
|
|
ee4211b9a8 | ||
|
|
62a52f8fd3 | ||
|
|
191e8d1587 | ||
|
|
a9ca08f6eb | ||
|
|
bb709321f0 | ||
|
|
2fa6f32d8e | ||
|
|
7536708c4b | ||
|
|
533d3058b8 | ||
|
|
ede9c2cf74 | ||
|
|
077eab6edf | ||
|
|
ec5d176278 | ||
|
|
891440d288 | ||
|
|
b6e84d3105 | ||
|
|
ac637d9d15 | ||
|
|
be863a9056 | ||
|
|
51d4efd8d2 | ||
|
|
c7554a2c76 | ||
|
|
b647c6e5fd | ||
|
|
864649157d | ||
|
|
e9ee842db1 | ||
|
|
5ff017e64e | ||
|
|
6a82287005 | ||
|
|
47acf79494 | ||
|
|
2e3661e453 | ||
|
|
3a6d68e836 | ||
|
|
aee3c571b0 | ||
|
|
2b9dc3338a | ||
|
|
d47ee4d797 | ||
|
|
f39bdc7e0f | ||
|
|
07f76be87a | ||
|
|
6b1d7fd53d | ||
|
|
346acdca54 | ||
|
|
ec4f8baa08 | ||
|
|
d326a638fb | ||
|
|
32cd341f60 | ||
|
|
8fc7a9547c | ||
|
|
579d81dc01 | ||
|
|
e2d31e1447 | ||
|
|
eabac453e6 | ||
|
|
e2a2ba9d98 |
34
Makefile.am
34
Makefile.am
@@ -118,6 +118,26 @@ EXTRA_DIST += \
|
||||
examples/spinbutton/spinbutton.c \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/INSTALL \
|
||||
$(srcdir)/README \
|
||||
$(srcdir)/aclocal.m4 \
|
||||
$(srcdir)/autoscan.log \
|
||||
$(srcdir)/compile \
|
||||
$(srcdir)/config.guess \
|
||||
$(srcdir)/config.h.in \
|
||||
$(srcdir)/config.sub \
|
||||
$(srcdir)/configure.scan \
|
||||
$(srcdir)/depcomp \
|
||||
$(srcdir)/install-sh \
|
||||
$(srcdir)/ltmain.sh \
|
||||
$(srcdir)/missing \
|
||||
$(srcdir)/mkinstalldirs \
|
||||
$(srcdir)/omf.make \
|
||||
$(srcdir)/xmldocs.make \
|
||||
$(srcdir)/gtk-doc.make \
|
||||
$(srcdir)/ChangeLog \
|
||||
`find "$(srcdir)" -type f -name Makefile.in -print`
|
||||
|
||||
GDKTARGET=@gdktarget@
|
||||
|
||||
@@ -156,7 +176,7 @@ DISTCLEANFILES = \
|
||||
config.lt
|
||||
|
||||
distclean-local:
|
||||
if test $(srdcir) = .; then :; else \
|
||||
if test "$(srcdir)" = "."; then :; else \
|
||||
rm -f ChangeLog; \
|
||||
fi
|
||||
|
||||
@@ -223,3 +243,15 @@ snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds
|
||||
|
||||
GITIGNOREFILES = \
|
||||
po-properties/Makefile.in.in \
|
||||
po-properties/Makefile.in \
|
||||
po-properties/Makefile \
|
||||
po-properties/*.gmo \
|
||||
po-properties/*.mo \
|
||||
po-properties/POTFILES \
|
||||
po-properties/stamp-it \
|
||||
po-properties/.intltool-merge-cache
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
468
NEWS
468
NEWS
@@ -1,3 +1,471 @@
|
||||
Overview of Changes from GTK+ 2.17.9 to 2.17.10
|
||||
===============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Regression fixes continue
|
||||
- Multiple clipping issues have been fixed
|
||||
- gdk_window_beep() works again
|
||||
- gtk-demo now has a few offscreen window demos
|
||||
|
||||
* GSEAL:
|
||||
- Several more getters and setters have been added:
|
||||
gtk_widget_is_toplevel(), gtk_widget_is_drawable(), gtk_widget_set_window()
|
||||
|
||||
* Bugs fixed:
|
||||
592752 aisleriot card drag start makes card appear behind...
|
||||
592901 Crash in JPEG pixbuf loader instead of error
|
||||
592263 redraw problem in text view
|
||||
593011 Cannot move applet with middle click
|
||||
592624 BadAccess from gdk_window_x11_set_events
|
||||
592606 Activate the default button in a respose-request callback
|
||||
593249 emacs and acroread don't work properly
|
||||
592883 Spin cell rendererer problem with double click
|
||||
588199 GtkTreeView rendering glitch while using a default...
|
||||
543310 set_enable_tree_lines doesn't work when a cellrenderer...
|
||||
589636 csw broke DND from panel menus
|
||||
593595 broken clip handling in GtkLabel
|
||||
590921 NULL should not be a valid return value for gdk_window_new()
|
||||
590861 cups_printer_create_cairo_surface() sets a fallback resolution...
|
||||
544724 delete new line requires two keystrokes
|
||||
593001 Emit 'update-custom-widget' on page setup change
|
||||
593317 gtkwindow leaks startup ID
|
||||
593080 mem leak
|
||||
593481 GtkEntryCompletion action-activated signal is emitted...
|
||||
593135 gtk_entry_set_icon_from_pixbuf only works one time
|
||||
593012 configure doesn't handle --enable-{cups,papi} correctly
|
||||
592862 There is a misprint on the returning value of gdk_pixmap_lookup()
|
||||
586466 GtkPrintOperation printing fails if it is the only event source
|
||||
434318 printer detail acquisition needs events
|
||||
593712 configure fails to to check properly for cups...
|
||||
|
||||
* Translation updates:
|
||||
Asturian
|
||||
Basque
|
||||
Bengali India
|
||||
Czech
|
||||
Finnish
|
||||
Hindi
|
||||
Kannada
|
||||
Oriya
|
||||
Polish
|
||||
Serbian
|
||||
Tamil
|
||||
Telugu
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.8 to 2.17.9
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Add a compatibility mode that falls back to always using native windows,
|
||||
triggered by the GDK_NATIVE_WINDOWS environment variable
|
||||
|
||||
* Bugs fixed:
|
||||
589367 gedit crashed with SIGSEGV in IA__g_list_last()
|
||||
478519 GtkTooltip segfaults on NULL gdk-display-current-tooltip.
|
||||
592461 preserve errno and use g_strerror
|
||||
592403 crash when close the second terminal...
|
||||
591549 Default printer in a network
|
||||
526149 GtkCellRendererAccel editing conflicts with mnemonics
|
||||
528283 Problems when using PageUp & PageDown to navigate Playlists pane
|
||||
|
||||
* Updated translations:
|
||||
Bengali
|
||||
Brazilian Portuguese
|
||||
Breton
|
||||
Bulgarian
|
||||
Catalan
|
||||
Estonian
|
||||
Galician
|
||||
Irish
|
||||
Korean
|
||||
Norwegian bokmål
|
||||
Portuguese
|
||||
Punjabi
|
||||
Spanish
|
||||
Swedish
|
||||
Thai
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.7 to 2.17.8
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- various fixes to expose handling
|
||||
- fix memory leaks
|
||||
|
||||
* Minor API additions:
|
||||
- New setter as part of the GSEAL effort: gtk_widget_set_allocation
|
||||
|
||||
* Bugs fixed:
|
||||
585211 Add accessor function for GtkWidget->allocation
|
||||
588437 gtk 2.17.3 causes dragging in firefox bookmarks sidebar t...
|
||||
589367 gedit crashed with SIGSEGV in IA__g_list_last()
|
||||
589877 Client side windows leak gdk regions
|
||||
590959 Set child_has_focus flag properly
|
||||
591432 There is incomplete information on the returning value of...
|
||||
591434 firefox-3.5 crashed with SIGSEGV in _gdk_window_process_u...
|
||||
591526 Accelerator keys with <super> modifier also triggered by ...
|
||||
591751 bad memory access with duplicated id
|
||||
591998 Support silent build rules with automake 1.11
|
||||
592003 Shift+click should always modify selection
|
||||
|
||||
* Updated translations:
|
||||
Brazilian
|
||||
Bulgarian
|
||||
Irish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.6 to 2.17.7
|
||||
==============================================
|
||||
|
||||
* Client-side windows: a number of regressions related to embedding
|
||||
have been fixed
|
||||
|
||||
* Printing: The file backend supports SVG output
|
||||
|
||||
* Minor API additions:
|
||||
- GtkIconView gained an icon-padding property that can be used to fine-tune
|
||||
how much space each column needs
|
||||
- GtkTreeViewColumn grew a sort-column-id property that can be used to set
|
||||
up sort columns in GtkBuilder files
|
||||
- GdkWindow gained a cursor property and associated getter
|
||||
- GtkFileChooser has a create-folders property to allow disabling the
|
||||
"New Folder" button
|
||||
- gtk_print_operation_get_n_pages_to_print: returns the number of pages
|
||||
that are being printed
|
||||
- New getters and setters as part of the GSEAL effort:
|
||||
gtk_widget_get_allocation, gtk_widget_get_visible, gtk_widget_set_visible
|
||||
|
||||
* Bugs fixed:
|
||||
589336 Add GtkTreeViewColumn:sort-column-id property
|
||||
534462 Disable interactive search in the file chooser's shortcuts pane
|
||||
161489 n the file chooser, let the left/right arrow keys switch focus...
|
||||
514260 Better filtering for "Recently Used" files
|
||||
509650 ATK_STATE_SHOWING state is not set properly on menu items
|
||||
586374 code does not follow documentation (-> carshes when using...
|
||||
590442 csw broke gvim x11 embedding
|
||||
498010 gtk_tree_view_set_cursor fails if model!=NULL
|
||||
555109 Synthesized crossing events should have proper coordinates
|
||||
570516 Can't disable folder creation
|
||||
573321 additional check in gtk_tree_model_filter_convert_child_i...
|
||||
576601 Double clicking prints to the wrong printer
|
||||
586100 ITEM_PADDING breaks vertical icon views
|
||||
588438 awn uses 100% cpu with gtk+ 2.17.3 (csw)
|
||||
589732 behavior change of gdk_window_get_type_hint
|
||||
589745 Apply message in GtkAssistant
|
||||
590084 print to FILE with multiple pages per sheet has bad results
|
||||
590086 configure.in is broken on non-X platforms
|
||||
590309 Default cover pages for CUPS printers incorrectly set
|
||||
590448 [win32] build fails because gdk-pixbuf manges a path
|
||||
590959 Set child_has_focus flag properly
|
||||
591288 compat problem with draw_drawable being NULL
|
||||
539377 Unnecessary warnings when GtkTreeView is not realized.
|
||||
546005 priv->tree is not created for unrealized (I think) treeview
|
||||
564695 Pressing enter key in print to file "Name" box does not p...
|
||||
591218 Remove some unused variables
|
||||
357655 "Print to SVG file" for GtkPrintOperation
|
||||
591462 gdk_window_set_cursor doesn't work on the root window
|
||||
|
||||
* Updated translations:
|
||||
Basque
|
||||
Brazilian Portuguese
|
||||
Breton
|
||||
Estonian
|
||||
Galician
|
||||
Hebrew
|
||||
Norwegian bokmål
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.5 to 2.17.6
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Several optimizations, such as client-side tracking of
|
||||
viewable windows
|
||||
- Clipping for drawing pixbufs on windows has been fixed
|
||||
- Rendering to large subwindows has been fixed
|
||||
|
||||
* Changes that are relevant for translators:
|
||||
- Markup has been removed from several strings
|
||||
|
||||
* Bugs fixed:
|
||||
588398 Leak with testgtk::preview_(color|gray) and more
|
||||
588943 set correct selection before emitting cursor-changed...
|
||||
588076 Gnumeric fonts stopped working on upgrading gtk+ 2.17.2 -...
|
||||
574674 GtkMenuItem gets Selected and Focused states when SelectC...
|
||||
582674 Menu item and menu accessibles retain "showing" state aft...
|
||||
588553 [csw] gdk_draw_pixbuf doesnt draw outside expose events s...
|
||||
588897 Strange include x11/gdkx.h
|
||||
588958 Typo in startup-id window property
|
||||
589035 Context needed for a propoer translation
|
||||
589275 [csw] Trying to destroy NULL regions
|
||||
588964 Remove markup from translatable string in gtkfilechooserd...
|
||||
587337 Suggest to use Glade instead gtk-builder-convert script
|
||||
|
||||
* Updated translations:
|
||||
Estonian
|
||||
French
|
||||
Spanish
|
||||
Swedish
|
||||
Thai
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.4 to 2.17.5
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Quite a few fixes have happened for the win32 and directfb backends
|
||||
|
||||
* GSEAL:
|
||||
- Accessors have been added for sealed members in GtkCellRenderer and
|
||||
GtkWidget
|
||||
|
||||
* Changes that are relevant for distributors:
|
||||
- The jpeg2000 pixbuf loader is now optional. Pass --with-libjasper
|
||||
to configure to build it
|
||||
|
||||
* Bugs fixed
|
||||
588373 Menus broken by client-side-windows
|
||||
588379 testgtk::panes does not change the cursor on mouse over
|
||||
588388 shape rendering is back
|
||||
588461 gtk_editable_get_chars() behaviour change in 2.17.4
|
||||
588666 Incorrect clamping of max_length
|
||||
588665 insert-text signal is not emitted
|
||||
588395 Crash when opening a GtkBuilder file
|
||||
524066 Mandatory jpeg2000?
|
||||
527583 GtkAssistant should set buttons as default widget
|
||||
588694 Missing % in C code
|
||||
588484 Iconview DnD fails when Destination is empty
|
||||
583522 Trivial error in GtkBuilder migration documentation
|
||||
150951 collapsed save dialog needs to indicate filesystem...
|
||||
|
||||
* Updated translations:
|
||||
Brazilian Portuguese
|
||||
Norwegian bokmål
|
||||
Spanish
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.3 to 2.17.4
|
||||
==============================================
|
||||
|
||||
* GtkEntry now has model-view separation, with GtkEntryBuffer.
|
||||
One intended use case for this is to support 'secure memory'
|
||||
for password entries.
|
||||
|
||||
* The print dialog can now optionally include the page setup
|
||||
controls, avoiding the need for a separate page setup dialog
|
||||
in many applications.
|
||||
|
||||
* Coloring of visited links in GtkLabel can now be turned off, with
|
||||
the ::track-visited-links property.
|
||||
|
||||
* Support for clipmasks in gdk_draw_pixbuf now works, this will
|
||||
introduce visual changes in code that uses clipmasks when drawing
|
||||
pixbufs. However, since this never worked that is unlikely to happen.
|
||||
Old code using gdk_pixbuf_render_threshold_alpha masks when rendering
|
||||
pixbufs will now produce truncated results at the edges.
|
||||
|
||||
* A number of regressions from the client-side window merge have
|
||||
been fixed.
|
||||
|
||||
* The directfb GDK backend has been fixed to build with csw.
|
||||
|
||||
* Bugs fixed:
|
||||
569393 gtk calendar localization YM note is wrong
|
||||
587559 Popup closes immediately
|
||||
551409 Print dialog should include page size and orientation
|
||||
588115 gvim clipboard broken
|
||||
|
||||
* Updated translations:
|
||||
Dutch
|
||||
Estonian
|
||||
Spanish
|
||||
Ukrainian
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.2 to 2.17.3
|
||||
==============================================
|
||||
|
||||
* GtkFileChooser:
|
||||
- Shows the size column by default now
|
||||
|
||||
* GtkStatusIcon:
|
||||
- Has a title property, which can be used by ATs when they
|
||||
read status icons
|
||||
|
||||
* GtkInfoBar:
|
||||
- The default theme now includes color definitions for infobars
|
||||
- The ::use-tooltip-style style property has been removed
|
||||
|
||||
* GtkMountOperation now supports interaction during unmount operations.
|
||||
|
||||
* The client-side windows branch has been merged; GDK now maintains
|
||||
its own window hierarchy client-side, and only uses X windows where
|
||||
unavoidable. Some of the benefits of this change are
|
||||
- Reduced flicker
|
||||
- The ability to do transformed and animated rendering of widgets
|
||||
- Easier embedding of GTK+ widgets e.g. into Clutter scene graphs
|
||||
This is a fundamental change to the way GDK works, so watch out for
|
||||
regressions.
|
||||
|
||||
* Bugs fixed:
|
||||
586315 Crash in GTK+ 2.14 when calling gtk.FileChooser.list_shor...
|
||||
461944 pressing the volume icon in full screen shuts down the sound
|
||||
490724 iconview item's height would be changed event with same m...
|
||||
564063 regression: Left margin in popup menus
|
||||
582025 Accelerators fail for submenus
|
||||
585626 Setting widget tooltip hammers X11 server on any TCP/IP X...
|
||||
585802 Add API to make GtkStatusIcon accessible with a name
|
||||
585858 right-click Add-to-Booksmarks is sometimes greyed out
|
||||
586330 GtkButton ignores user_underline when an image is set
|
||||
318807 Offscreen windows and window redirection
|
||||
587716 GtkInfoBar broken on resize
|
||||
587485 GMountOperation::show-processes support
|
||||
|
||||
* Updated translations
|
||||
Brazilian Portuguese
|
||||
Estonian
|
||||
Hebrew
|
||||
Spanish
|
||||
Swedish
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.1 to 2.17.2
|
||||
==============================================
|
||||
|
||||
* GtkInfoBar: A new widget to show a transient 'message area'
|
||||
inside a content pane. The API is similar to GtkDialog and
|
||||
supports theming for different message types (warnings,
|
||||
errors, etc)
|
||||
|
||||
* GtkFileChooser:
|
||||
- Improve path bar by ellipsizing long names and preventing
|
||||
vertical size changes
|
||||
- Backup files are now hidden by default
|
||||
- GTK+ remembers the file chooser sorting state now
|
||||
|
||||
* GtkButtonBox: Implements the GtkOrientable interface now.
|
||||
|
||||
* Printing:
|
||||
- GTK+ supports printing an application-defined 'selection' now,
|
||||
in addition to usual page ranges.
|
||||
|
||||
* Changes that are relevant for theme authors:
|
||||
- The new GtkInfoBar widget uses symbolic colors for theming
|
||||
its background color depending on the message type. By default,
|
||||
it uses the same background color as tooltips. This can be turned
|
||||
off with style property.
|
||||
- The GTK+ file chooser (as well as nautilus and other users of GIO
|
||||
icon information) can now show different icons for xdg user dirs.
|
||||
The icon names are folder-documents, folder-download, folder-music,
|
||||
folder-pictures, folder-publicshare, folder-templates, folder-videos,
|
||||
with an automatic fallback to the standard folder icon.
|
||||
|
||||
* Bugs fixed:
|
||||
584021 titchy leak
|
||||
579590 gtk_entry_set_icon_from_stock should warn when invalid st...
|
||||
584125 GtkAssistant asserts if last page is GTK_ASSISTANT_PAGE_C...
|
||||
171416 Resume editing if name of new folder is "Type name of new...
|
||||
420335 Page assignment when printing 4 pages to a sheet
|
||||
161670 Bad behaviour from gtk_file_chooser_set_filename
|
||||
327152 Long names in the FileChooserDialog directory buttons sho...
|
||||
355851 File Dialog shows Backup Files
|
||||
390312 Gtk grabs keyboard on DND
|
||||
486839 Filechooser 'Places' items should not move up and down th...
|
||||
562335 Deprecate gtk_tree_view_column_get_cell_renderers and gtk...
|
||||
565317 Resulting image of GtkCellRendererPixbuf depends on order...
|
||||
565998 configure script doesn't check for cairo-xlib.pc
|
||||
580079 Better configure detection of Xinerama on Solaris
|
||||
580511 gdk_x11_atom_to_xatom_for_display translates GDK_NONE as ...
|
||||
580560 Backspace key does not go to the parent directory
|
||||
584598 GtkButtonBox silently ignores gtk_orientable_set_orientation
|
||||
584637 Missing conditionals for X11 shape extension in GdkWindow
|
||||
584805 GtkEntryCompletion selection reset when calling gtk_entry...
|
||||
584832 Duplicate the exec string returned by gtk_recent_info_get...
|
||||
585024 some gtksettings properties need extra initialisation
|
||||
585371 Add additional sizes to the font selector
|
||||
585791 use g_*gettext instead of *gettext directly
|
||||
562579 [Patch] Remove error dialog when directory does not exist
|
||||
344519 custom print ranges
|
||||
484922 Should remember the sort state of columns
|
||||
555344 consider adding a message area widget
|
||||
|
||||
* Updated translations:
|
||||
Danish
|
||||
Brazilian Portuguese
|
||||
Estonian
|
||||
Oriya
|
||||
Bengali India
|
||||
Norwegian bokmål
|
||||
Hindi
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.0 to 2.17.1
|
||||
==============================================
|
||||
|
||||
* GtkLabel:
|
||||
- GtkLabel can show embedded URLs, much like SexyUrlLabel
|
||||
|
||||
* Printing:
|
||||
- GTK+ includes a print backend that works with the PAPI
|
||||
printing service.
|
||||
- The file and lpr backends can print multiple pages per sheet.
|
||||
|
||||
* Changes that are relevant for theme authors:
|
||||
- The URL support in GtkLabel uses the link-color / visited-link-color
|
||||
style properties
|
||||
|
||||
* Bugs fixed:
|
||||
576091 GtkTooltip destroy the custom widget
|
||||
315462 GtkButton doesn't center its child when the child is too ...
|
||||
390331 "Pages per sheet" does not work for LPR printing
|
||||
531490 gdk_window_set_events (0) will _ADD_ events to the root w...
|
||||
574386 Remove deprecated call to gtk_status_icon_set_tooltip in ...
|
||||
576678 cups printbackend doesn't list printers on NetBSD
|
||||
579366 gtkbuilderparser leaks RequiresInfo objects.
|
||||
579884 casting problem in gmodule
|
||||
580511 gdk_x11_atom_to_xatom_for_display translates GDK_NONE as ...
|
||||
581876 Remove deprecated call to gtk_action_connect_proxy in tes...
|
||||
581878 Remove deprecated call to gtk_scale_button_get_orientatio...
|
||||
582003 Calling gdk_window_get_events() changes the event mask, b...
|
||||
582488 GtkNotebook behaves poorly when allocated less than reque...
|
||||
582950 Use number of pages to print when showing printing progress
|
||||
582963 Crash when printing from a thread
|
||||
583050 unclear disposition of function gtk_combo_box_get_active...
|
||||
583522 Trivial error in GtkBuilder migration documentation
|
||||
535557 gdk_window_set_icon_name should accept NULL to unset
|
||||
549859 "file" printer doesn't support n-up
|
||||
|
||||
* Updated translations:
|
||||
Arabic
|
||||
British English
|
||||
Catalan
|
||||
Czech
|
||||
Danish
|
||||
Estonian
|
||||
French
|
||||
German
|
||||
Greek
|
||||
Hungarian
|
||||
Irish
|
||||
Italian
|
||||
Kannada
|
||||
Portuguese
|
||||
Russian
|
||||
Slovenian
|
||||
Spanish
|
||||
Ukrainian
|
||||
Simplified Chinese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.16.x to 2.17.0
|
||||
==============================================
|
||||
|
||||
|
||||
24
README.in
24
README.in
@@ -27,6 +27,24 @@ Installation
|
||||
See the file 'INSTALL'
|
||||
|
||||
|
||||
Release notes for 2.18
|
||||
======================
|
||||
|
||||
* gtk_tooltip_set_custom now accept a NULL custom_widget to unset the
|
||||
old custom_widget. Custom_widget does not get destroyed when the
|
||||
tooltip goes away.
|
||||
|
||||
* JPEG2000 support is no longer enabled by default. It must be
|
||||
explicitly turned on, by passing --with-libjasper to configure.
|
||||
|
||||
* GDK has been reworked to implement 'client-side windows'. This offers
|
||||
exciting new possibilities, such as transformed, offscreen rendering,
|
||||
but it breaks some long-standing assumptions that applications may
|
||||
have about GDK windows. Setting the environment variable
|
||||
GDK_NATIVE_WINDOWS makes GDK create a native X11 window for each
|
||||
GDK window, which might make problematic applications work better.
|
||||
|
||||
|
||||
Release notes for 2.16
|
||||
======================
|
||||
|
||||
@@ -419,8 +437,4 @@ report.
|
||||
Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK+ programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
||||
Patches should be in unified diff form. (The -up option to GNU diff.)
|
||||
|
||||
301
README.win32
301
README.win32
@@ -1,117 +1,184 @@
|
||||
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
|
||||
|
||||
For prebuilt runtime and developer packages see
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/
|
||||
|
||||
Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
|
||||
zlib, libtiff at least. See
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
|
||||
1) GNU tools, ./configure && make install
|
||||
-----------------------------------------
|
||||
|
||||
This requires you have mingw and MSYS.
|
||||
|
||||
Use the configure script, and the resulting Makefiles (which use
|
||||
libtool and gcc to do the compilation). I use this myself, but it can
|
||||
be hard to setup correctly.
|
||||
|
||||
The full script I run to build GTK+ 2.10 unpacked from a source
|
||||
distribution is as below. This is from bulding GTK+ 2.10.9, slightly
|
||||
edited to make it match this 2.11 development branch. Actually I don't
|
||||
use any script like this to build the development branch, as I don't
|
||||
distribute any binaries from development branches.
|
||||
|
||||
MOD=gtk+
|
||||
VER=2.10.9
|
||||
THIS=$MOD-$VER
|
||||
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
|
||||
TARGET=c:/devel/target/$HEX
|
||||
DEPS="`/devel/src/tml/latest.sh glib atk cairo pango`"
|
||||
sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
|
||||
usedev
|
||||
usemsvs6
|
||||
MY_PKG_CONFIG_PATH=""
|
||||
for D in $DEPS; do
|
||||
PATH=/devel/dist/$D/bin:$PATH
|
||||
MY_PKG_CONFIG_PATH=/devel/dist/$D/lib/pkgconfig:$MY_PKG_CONFIG_PATH
|
||||
done
|
||||
PKG_CONFIG_PATH=$MY_PKG_CONFIG_PATH:$PKG_CONFIG_PATH CC='gcc -mtune=pentium3 -mthreads' CPPFLAGS='-I/opt/gnu/include -I/opt/gnuwin32/include -I/opt/misc/include' LDFLAGS='-L/opt/gnu/lib -L/opt/gnuwin32/lib -L/opt/misc/lib -Wl,--enable-auto-image-base' LIBS=-lintl CFLAGS=-O2 ./configure --with-gdktarget=win32 --enable-debug=yes --disable-gtk-doc --disable-static --prefix=$TARGET &&
|
||||
libtoolcacheize &&
|
||||
unset MY_PKG_CONFIG_PATH &&
|
||||
PATH=/devel/target/$HEX/bin:.libs:$PATH make install &&
|
||||
(cd $TARGET/bin; strip --strip-unneeded *.dll *.exe) &&
|
||||
(cd $TARGET/lib/gtk-2.0/2.10.0/loaders; strip --strip-unneeded *.dll) &&
|
||||
(cd $TARGET/lib/gtk-2.0/2.10.0/immodules; strip --strip-unneeded *.dll) &&
|
||||
(cd $TARGET/lib/gtk-2.0/2.10.0/engines; strip --strip-unneeded *.dll) &&
|
||||
PATH=$TARGET/bin:$PATH gdk-pixbuf-query-loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
|
||||
./gtk-zip.sh &&
|
||||
(cd /devel/src/tml && zip /tmp/$MOD-dev-$VER.zip make/$THIS.make) &&
|
||||
manifestify /tmp/$MOD*-$VER.zip
|
||||
|
||||
You should not just copy the above blindly. There are some things in
|
||||
the script that are very specific to *my* build setup on *my* current
|
||||
machine. For instance the "latest.sh" script, the "usedev" and
|
||||
"usemsvs6" shell functions, the /devel/dist folder. The above script
|
||||
is really just meant for reference, to give an idea. You really need
|
||||
to understand what things like PKG_CONFIG_PATH are and set them up
|
||||
properly after installing the dependencies before building GTK+.
|
||||
|
||||
As you see above, after running configure, one can just say "make
|
||||
install", like on Unix. A post-build fix is needed, running
|
||||
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
|
||||
file.
|
||||
|
||||
2) Microsoft's tools
|
||||
--------------------
|
||||
|
||||
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||
makefile.msc files, and the makefile snippets in build/win32.
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
I use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
makefiles. At times, we disagree a bit about various issues, and for
|
||||
instance the makefile.msc files might not produce identically named
|
||||
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
|
||||
To use GTK+ on Win32, you also need either one of the above mentioned
|
||||
compilers. Other compilers might work, but don't count on it. Look for
|
||||
prebuilt developer packages (DLLs, import libraries, headers) on the
|
||||
above website.
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
===================================
|
||||
|
||||
Multi-threaded GTK+ programs might work on Windows in special simple
|
||||
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
|
||||
in the same thread, it might work. Otherwise, probably not at
|
||||
all. Possible ways to fix this are being investigated.
|
||||
|
||||
Wintab
|
||||
======
|
||||
|
||||
The tablet support uses the Wintab API. The Wintab development kit is
|
||||
no longer required. The wintab.h header file is bundled with GTK+
|
||||
sources. Unfortunately it seems that only Wacom tablets come with
|
||||
support for the Wintab API nowadays.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
|
||||
|
||||
For prebuilt runtime and developer packages see
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/
|
||||
|
||||
Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
|
||||
zlib, libtiff at least. See
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
|
||||
1) GNU tools, ./configure && make install
|
||||
-----------------------------------------
|
||||
|
||||
This requires you have mingw and MSYS.
|
||||
|
||||
Use the configure script, and the resulting Makefiles (which use
|
||||
libtool and gcc to do the compilation). I use this myself, but it can
|
||||
be hard to setup correctly.
|
||||
|
||||
The full script I run to build GTK+ 2.16 unpacked from a source
|
||||
distribution is as below. This is from bulding GTK+ 2.16.5. I don't
|
||||
use any script like this to build the development branch, as I don't
|
||||
distribute any binaries from development branches.
|
||||
|
||||
# This is a shell script that calls functions and scripts from
|
||||
# tml@iki.fi's personal work envíronment. It is not expected to be
|
||||
# usable unmodified by others, and is included only for reference.
|
||||
|
||||
MOD=gtk+
|
||||
VER=2.16.5
|
||||
REV=1
|
||||
ARCH=win32
|
||||
|
||||
THIS=${MOD}_${VER}-${REV}_${ARCH}
|
||||
|
||||
RUNZIP=${MOD}_${VER}-${REV}_${ARCH}.zip
|
||||
DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip
|
||||
|
||||
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
|
||||
TARGET=c:/devel/target/$HEX
|
||||
|
||||
usedev
|
||||
usemsvs6
|
||||
|
||||
(
|
||||
|
||||
set -x
|
||||
|
||||
DEPS=`latest --arch=${ARCH} glib atk cairo pango libpng zlib libtiff jpeg`
|
||||
PROXY_LIBINTL=`latest --arch=${ARCH} proxy-libintl`
|
||||
|
||||
PKG_CONFIG_PATH=
|
||||
for D in $DEPS; do
|
||||
PATH=/devel/dist/${ARCH}/$D/bin:$PATH
|
||||
[ -d /devel/dist/${ARCH}/$D/lib/pkgconfig ] && PKG_CONFIG_PATH=/devel/dist/${ARCH}/$D/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
done
|
||||
|
||||
LIBPNG=`latest --arch=${ARCH} libpng`
|
||||
ZLIB=`latest --arch=${ARCH} zlib`
|
||||
LIBTIFF=`latest --arch=${ARCH} libtiff`
|
||||
JPEG=`latest --arch=${ARCH} jpeg`
|
||||
|
||||
patch -p0 <<'EOF'
|
||||
EOF
|
||||
|
||||
lt_cv_deplibs_check_method='pass_all' \
|
||||
CC='gcc -mtune=pentium3 -mthreads' \
|
||||
CPPFLAGS="-I/devel/dist/${ARCH}/${LIBPNG}/include \
|
||||
-I/devel/dist/${ARCH}/${ZLIB}/include \
|
||||
-I/devel/dist/${ARCH}/${LIBTIFF}/include \
|
||||
-I/devel/dist/${ARCH}/${JPEG}/include \
|
||||
-I/devel/dist/${ARCH}/${PROXY_LIBINTL}/include" \
|
||||
LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
|
||||
-L/devel/dist/${ARCH}/${ZLIB}/lib \
|
||||
-L/devel/dist/${ARCH}/${LIBTIFF}/lib \
|
||||
-L/devel/dist/${ARCH}/${JPEG}/lib \
|
||||
-L/devel/dist/${ARCH}/${PROXY_LIBINTL}/lib -Wl,--exclude-libs=libintl.a \
|
||||
-Wl,--enable-auto-image-base" \
|
||||
LIBS=-lintl \
|
||||
CFLAGS=-O2 \
|
||||
./configure \
|
||||
--with-gdktarget=win32 \
|
||||
--disable-gdiplus \
|
||||
--with-included-immodules \
|
||||
--without-libjasper \
|
||||
--enable-debug=yes \
|
||||
--enable-explicit-deps=no \
|
||||
--disable-gtk-doc \
|
||||
--disable-static \
|
||||
--prefix=$TARGET &&
|
||||
|
||||
libtoolcacheize &&
|
||||
rm gtk/gtk.def &&
|
||||
(PATH="$PWD/gdk-pixbuf/.libs:/devel/target/$HEX/bin:$PATH" make -j3 install || (rm .libtool-cache* && PATH="/devel/target/$HEX/bin:$PATH" make -j3 install)) &&
|
||||
|
||||
PATH="/devel/target/$HEX/bin:$PATH" gdk-pixbuf-query-loaders >/devel/target/$HEX/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
|
||||
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
|
||||
|
||||
./gtk-zip.sh &&
|
||||
|
||||
mv /tmp/${MOD}-${VER}.zip /tmp/$RUNZIP &&
|
||||
mv /tmp/${MOD}-dev-${VER}.zip /tmp/$DEVZIP
|
||||
|
||||
) 2>&1 | tee /devel/src/tml/packaging/$THIS.log
|
||||
|
||||
(cd /devel && zip /tmp/$DEVZIP src/tml/packaging/$THIS.{sh,log}) &&
|
||||
manifestify /tmp/$RUNZIP /tmp/$DEVZIP
|
||||
|
||||
You should not just copy the above blindly. There are some things in
|
||||
the script that are very specific to *my* build setup on *my* current
|
||||
machine. For instance the "latest" command, the "usedev" and
|
||||
"usemsvs6" shell functions, the /devel/dist folder. The above script
|
||||
is really just meant for reference, to give an idea. You really need
|
||||
to understand what things like PKG_CONFIG_PATH are and set them up
|
||||
properly after installing the dependencies before building GTK+.
|
||||
|
||||
As you see above, after running configure, one can just say "make
|
||||
install", like on Unix. A post-build fix is needed, running
|
||||
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
|
||||
file.
|
||||
|
||||
For a 64-bit build you need to remove the gtk/gtk.def file and let it
|
||||
be regenerated by the makefilery. This is because the 64-bit GTK dll
|
||||
has a slightly different list of exported function names. This is on
|
||||
purpose and not a bug. The API is the same at the source level, and
|
||||
the same #defines of some function names to actually have a _utf8
|
||||
suffix is used (just to keep the header simpler). But the
|
||||
corresponding non-suffixed function to maintain ABI stability are not
|
||||
needed in the 64-bit case (because there are no older EXEs around that
|
||||
would require such for ABI stability).
|
||||
|
||||
|
||||
2) Microsoft's tools
|
||||
--------------------
|
||||
|
||||
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||
makefile.msc files, and the makefile snippets in build/win32.
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
I use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
makefiles. At times, we disagree a bit about various issues, and for
|
||||
instance the makefile.msc files might not produce identically named
|
||||
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
|
||||
To use GTK+ on Win32, you also need either one of the above mentioned
|
||||
compilers. Other compilers might work, but don't count on it. Look for
|
||||
prebuilt developer packages (DLLs, import libraries, headers) on the
|
||||
above website.
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
===================================
|
||||
|
||||
Multi-threaded GTK+ programs might work on Windows in special simple
|
||||
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
|
||||
in the same thread, it might work. Otherwise, probably not at
|
||||
all. Possible ways to fix this are being investigated.
|
||||
|
||||
Wintab
|
||||
======
|
||||
|
||||
The tablet support uses the Wintab API. The Wintab development kit is
|
||||
no longer required. The wintab.h header file is bundled with GTK+
|
||||
sources. Unfortunately it seems that only Wacom tablets come with
|
||||
support for the Wintab API nowadays.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
|
||||
@@ -269,7 +269,11 @@
|
||||
/* #undef USE_MEDIALIB25 */
|
||||
|
||||
/* Define to 1 if XXM is available and should be used */
|
||||
#define USE_MMX 1
|
||||
#ifndef _MSC_VER
|
||||
# define USE_MMX 1
|
||||
#else
|
||||
# undef USE_MMX
|
||||
#endif
|
||||
|
||||
/* Define to 1 if no XInput should be used */
|
||||
/* #undef XINPUT_NONE */
|
||||
|
||||
239
configure.in
239
configure.in
@@ -12,7 +12,7 @@ AC_PREREQ(2.54)
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [17])
|
||||
m4_define([gtk_micro_version], [0])
|
||||
m4_define([gtk_micro_version], [10])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -31,7 +31,7 @@ m4_define([gtk_api_version], [2.0])
|
||||
m4_define([gtk_binary_version], [2.10.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.19.7])
|
||||
m4_define([glib_required_version], [2.21.3])
|
||||
m4_define([pango_required_version], [1.20])
|
||||
m4_define([atk_required_version], [1.13.0])
|
||||
m4_define([cairo_required_version], [1.6])
|
||||
@@ -49,6 +49,11 @@ cflags_set=${CFLAGS+set}
|
||||
AM_INIT_AUTOMAKE(no-define)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# 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])])
|
||||
|
||||
#
|
||||
# For each of the libraries we build, we define the following
|
||||
|
||||
@@ -378,6 +383,19 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
pango >= pango_required_version dnl
|
||||
cairo >= cairo_required_version])
|
||||
|
||||
## In addition to checking that cairo is present, we also need to
|
||||
## check that the correct cairo backend is there. E.g. if the GDK
|
||||
## target is win32 we need the cairo-win32 backend and so on.
|
||||
cairo_backend=$gdktarget
|
||||
|
||||
# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
|
||||
# backend names are identical.
|
||||
if test "x$cairo_backend" = "xx11"; then
|
||||
cairo_backend=xlib
|
||||
fi
|
||||
PKG_CHECK_MODULES(CAIRO_BACKEND,
|
||||
[cairo-$cairo_backend >= cairo_required_version])
|
||||
|
||||
if test "$os_win32" != yes; then
|
||||
# libtool option to control which symbols are exported
|
||||
# right now, symbols starting with _ are not exported
|
||||
@@ -812,12 +830,13 @@ AC_ARG_WITH(libtiff,
|
||||
[AC_HELP_STRING([--without-libtiff],
|
||||
[disable TIFF loader for gdk-pixbuf])])
|
||||
AC_ARG_WITH(libjasper,
|
||||
[AC_HELP_STRING([--without-libjasper],
|
||||
[disable JPEG2000 loader for gdk-pixbuf])])
|
||||
[AC_HELP_STRING([--with-libjasper],
|
||||
[enable JPEG2000 loader for gdk-pixbuf])])
|
||||
|
||||
AC_ARG_ENABLE(gdiplus,
|
||||
[AC_HELP_STRING([--disable-gdiplus],
|
||||
[disable GDI+ loaders for gdk-pixbuf])])
|
||||
[AC_HELP_STRING([--enable-gdiplus],
|
||||
[enble GDI+ loaders for gdk-pixbuf (currently known to be broken)])],,
|
||||
[enable_gdiplus=no])
|
||||
|
||||
AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
|
||||
|
||||
@@ -927,11 +946,11 @@ dnl Test for libpng
|
||||
fi
|
||||
|
||||
dnl Test for libjasper
|
||||
if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
|
||||
if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
|
||||
AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
|
||||
fi
|
||||
|
||||
if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
|
||||
if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
|
||||
AC_MSG_ERROR([
|
||||
*** Checks for JPEG2000 loader failed. You can build without it by passing
|
||||
*** --without-libjasper to configure])
|
||||
@@ -1304,7 +1323,6 @@ GDK_PIXBUF_XLIB_PACKAGES=
|
||||
GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
|
||||
GDK_PIXBUF_XLIB_EXTRA_LIBS=
|
||||
|
||||
X_PACKAGES=fontconfig
|
||||
GDK_EXTRA_LIBS="$GDK_WLIBS"
|
||||
GDK_EXTRA_CFLAGS=
|
||||
|
||||
@@ -1313,6 +1331,8 @@ GTK_DEP_PACKAGES_FOR_X=
|
||||
GTK_DEP_LIBS_FOR_X=
|
||||
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
X_PACKAGES=fontconfig
|
||||
|
||||
#
|
||||
# We use fontconfig very peripherally when decoding the default
|
||||
# settings.
|
||||
@@ -1424,9 +1444,8 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
# Check for shaped window extension
|
||||
|
||||
AC_CHECK_FUNC(XShapeCombineMask,
|
||||
AC_DEFINE(HAVE_SHAPE_EXT, 1,
|
||||
[Define to 1 if the XShape extension is available]))
|
||||
AC_CHECK_FUNC(XShapeCombineMask, :,
|
||||
[AC_MSG_ERROR([Shape extension not found, check your development headers])])
|
||||
|
||||
# X SYNC check
|
||||
gtk_save_CFLAGS="$CFLAGS"
|
||||
@@ -1492,54 +1511,55 @@ if test "x$gdktarget" = "xx11"; then
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $x_cflags"
|
||||
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
# Check for XFree
|
||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||
|
||||
have_solaris_xinerama=false
|
||||
AC_CHECK_FUNC(XineramaGetInfo,
|
||||
[AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||
[have_solaris_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
|
||||
if $have_solaris_xinerama ; then
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||
[Define to 1 if solaris xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 if xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Check for XFree
|
||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||
|
||||
have_xfree_xinerama=false
|
||||
if $PKG_CONFIG --exists xinerama ; then
|
||||
have_xfree_xinerama=true
|
||||
X_PACKAGES="$X_PACKAGES xinerama"
|
||||
else
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
[GTK_ADD_LIB(x_extra_libs,Xinerama)
|
||||
have_xfree_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
fi
|
||||
have_xfree_xinerama=false
|
||||
if $PKG_CONFIG --exists xinerama ; then
|
||||
have_xfree_xinerama=true
|
||||
X_PACKAGES="$X_PACKAGES xinerama"
|
||||
else
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
[GTK_ADD_LIB(x_extra_libs,Xinerama)
|
||||
have_xfree_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
fi
|
||||
|
||||
if $have_xfree_xinerama ; then
|
||||
AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
|
||||
[Define to 1 if XFree Xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 is Xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if $have_xfree_xinerama ; then
|
||||
AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
|
||||
[Define to 1 if XFree Xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 is Xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
|
||||
have_solaris_xinerama=false
|
||||
AC_CHECK_FUNC(XineramaGetInfo,
|
||||
[AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||
[have_solaris_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
|
||||
if $have_solaris_xinerama ; then
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||
[Define to 1 if solaris xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 if xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
# set up things for XInput
|
||||
@@ -1613,6 +1633,8 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
AM_CONDITIONAL(USE_X11, true)
|
||||
else
|
||||
XPACKAGES=
|
||||
|
||||
AM_CONDITIONAL(XINPUT_XFREE, false)
|
||||
AM_CONDITIONAL(USE_X11, false)
|
||||
AM_CONDITIONAL(HAVE_X11R6, false)
|
||||
@@ -1645,18 +1667,7 @@ if test "x$gdktarget" = "xdirectfb"; then
|
||||
DIRECTFB_REQUIRED_VERSION=1.0.0
|
||||
AC_MSG_CHECKING(for DirectFB)
|
||||
|
||||
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb && $PKG_CONFIG --exists cairo-directfb ; then
|
||||
AC_MSG_RESULT(found)
|
||||
GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags cairo-directfb` $GDK_EXTRA_CFLAGS"
|
||||
GDK_EXTRA_LIBS="`$PKG_CONFIG --libs cairo-directfb` $GDK_EXTRA_LIBS"
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer and the cairo backend
|
||||
*** are required. The latest version of DirectFB is always available
|
||||
*** from http://www.directfb.org/.
|
||||
])
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
|
||||
AM_CONDITIONAL(USE_DIRECTFB, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_DIRECTFB, false)
|
||||
@@ -1700,13 +1711,9 @@ fi
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0"
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES cairo-xlib"
|
||||
fi
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 $X_PACKAGES cairo-$cairo_backend"
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
|
||||
|
||||
#
|
||||
# If we aren't writing explicit dependencies, then don't put the extra libraries we need
|
||||
# into the pkg-config files
|
||||
@@ -1834,10 +1841,19 @@ AC_ARG_ENABLE(cups,
|
||||
[disable cups print backend])],,
|
||||
[enable_cups=auto])
|
||||
|
||||
if test "x$enable_cups" = "xauto"
|
||||
then
|
||||
if test "x$enable_cups" = "xno"; then
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
else
|
||||
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
|
||||
if test "x$CUPS_CONFIG" != "xno"; then
|
||||
if test "x$CUPS_CONFIG" = "xno"; then
|
||||
if test "x$enable_cups" = "xauto"; then
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** cups not found.
|
||||
])
|
||||
fi
|
||||
else
|
||||
CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
|
||||
CUPS_LIBS=`$CUPS_CONFIG --libs`
|
||||
|
||||
@@ -1857,31 +1873,55 @@ then
|
||||
AC_SUBST(CUPS_LIBS)
|
||||
|
||||
AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
|
||||
|
||||
AM_CONDITIONAL(HAVE_CUPS, true)
|
||||
|
||||
gtk_save_cflags="$CFLAGS"
|
||||
CFLAGS="$CUPS_CFLAGS"
|
||||
AC_TRY_COMPILE([#include <cups/http.h>],
|
||||
[http_t http; char *s = http.authstring;],
|
||||
[AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
|
||||
[Define if cups http_t authstring field is accessible])],)
|
||||
CFLAGS="$gtk_save_cflags"
|
||||
|
||||
AC_SUBST(HAVE_HTTP_AUTHSTRING)
|
||||
|
||||
gtk_save_libs="$LIBS"
|
||||
LIBS="$CUPS_LIBS"
|
||||
AC_CHECK_FUNCS(httpGetAuthString)
|
||||
LIBS="$gtk_save_libs"
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
|
||||
|
||||
gtk_save_cflags="$CFLAGS"
|
||||
CFLAGS="$CUPS_CFLAGS"
|
||||
AC_TRY_COMPILE([#include <cups/http.h>],
|
||||
[http_t http; char *s = http.authstring;],
|
||||
[AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
|
||||
[Define if cups http_t authstring field is accessible])],)
|
||||
CFLAGS="$gtk_save_cflags"
|
||||
|
||||
AC_SUBST(HAVE_HTTP_AUTHSTRING)
|
||||
|
||||
gtk_save_libs="$LIBS"
|
||||
LIBS="$CUPS_LIBS"
|
||||
AC_CHECK_FUNCS(httpGetAuthString)
|
||||
LIBS="$gtk_save_libs"
|
||||
|
||||
else
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
fi
|
||||
|
||||
# Checks to see if we should compile with PAPI backend for GTK+
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE(papi,
|
||||
[AC_HELP_STRING([--disable-papi]
|
||||
[disable papi print backend])],,
|
||||
[enable_papi=auto])
|
||||
|
||||
if test "x$enable_papi" = "xno"; then
|
||||
AM_CONDITIONAL(HAVE_PAPI, false)
|
||||
else
|
||||
AC_MSG_CHECKING(libpapi)
|
||||
AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
|
||||
if test $have_papi = yes; then
|
||||
AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
|
||||
if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
|
||||
AC_MSG_ERROR([
|
||||
*** papi not found.
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
|
||||
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
|
||||
|
||||
AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
|
||||
*** Can't find cairo-pdf.h. You must build Cairo with the pdf
|
||||
*** backend enabled.]))
|
||||
@@ -2107,6 +2147,7 @@ modules/printbackends/Makefile
|
||||
modules/printbackends/cups/Makefile
|
||||
modules/printbackends/lpr/Makefile
|
||||
modules/printbackends/file/Makefile
|
||||
modules/printbackends/papi/Makefile
|
||||
modules/printbackends/test/Makefile
|
||||
perf/Makefile
|
||||
contrib/Makefile
|
||||
|
||||
@@ -4,3 +4,5 @@ SUBDIRS =
|
||||
if USE_X11
|
||||
SUBDIRS += gdk-pixbuf-xlib
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -38,3 +38,5 @@ pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-pixbuf-xlib-2.0.pc
|
||||
|
||||
EXTRA_DIST += gdk-pixbuf-xlib-2.0.pc.in
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -82,3 +82,5 @@ EXTRA_DIST += \
|
||||
gnu-keys.png
|
||||
|
||||
DISTCLEANFILES = test-inline-pixbufs.h
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
|
||||
|
||||
democodedir=$(datadir)/gtk-2.0/demo
|
||||
|
||||
## These should be in the order you want them to appear in the
|
||||
## These should be in the order you want them to appear in the
|
||||
## demo app, which means alphabetized by demo title, not filename
|
||||
demos = \
|
||||
appwindow.c \
|
||||
@@ -17,14 +17,19 @@ demos = \
|
||||
dialog.c \
|
||||
drawingarea.c \
|
||||
editable_cells.c \
|
||||
entry_buffer.c \
|
||||
entry_completion.c \
|
||||
expander.c \
|
||||
hypertext.c \
|
||||
iconview.c \
|
||||
iconview_edit.c \
|
||||
images.c \
|
||||
infobar.c \
|
||||
links.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
offscreen_window.c \
|
||||
offscreen_window2.c \
|
||||
panes.c \
|
||||
pickers.c \
|
||||
pixbufs.c \
|
||||
@@ -96,3 +101,5 @@ IMAGEFILES= alphatest.png \
|
||||
democode_DATA = $(demos) $(IMAGEFILES) demo.ui
|
||||
|
||||
DISTCLEANFILES = demos.h
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWidget *infobar = NULL;
|
||||
static GtkWidget *messagelabel = NULL;
|
||||
|
||||
static void
|
||||
activate_action (GtkAction *action)
|
||||
@@ -16,7 +18,7 @@ activate_action (GtkAction *action)
|
||||
const gchar *typename = G_OBJECT_TYPE_NAME (action);
|
||||
|
||||
GtkWidget *dialog;
|
||||
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
@@ -29,7 +31,7 @@ activate_action (GtkAction *action)
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
@@ -41,37 +43,32 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current));
|
||||
gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
|
||||
|
||||
if (active)
|
||||
if (active)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You activated radio action: \"%s\" of type \"%s\".\n"
|
||||
"Current value: %d",
|
||||
name, typename, value);
|
||||
gchar *text;
|
||||
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (dialog,
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
text = g_strdup_printf ("You activated radio action: \"%s\" of type \"%s\".\n"
|
||||
"Current value: %d",
|
||||
name, typename, value);
|
||||
gtk_label_set_text (GTK_LABEL (messagelabel), text);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), (GtkMessageType)value);
|
||||
gtk_widget_show (infobar);
|
||||
g_free (text);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
activate_email (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
{
|
||||
g_print ("send mail to %s\n", link);
|
||||
gchar *text;
|
||||
text = g_strdup_printf ("send mail to %s", link);
|
||||
g_print ("%s\n", text);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
activate_url (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
@@ -147,12 +144,12 @@ about_cb (GtkAction *action,
|
||||
g_object_unref (transparent);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
GtkAction action;
|
||||
} ToolMenuAction;
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
GtkActionClass parent_class;
|
||||
} ToolMenuActionClass;
|
||||
@@ -179,30 +176,30 @@ static GtkActionEntry entries[] = {
|
||||
{ "HelpMenu", NULL, "_Help" }, /* name, stock id, label */
|
||||
{ "New", GTK_STOCK_NEW, /* name, stock id */
|
||||
"_New", "<control>N", /* label, accelerator */
|
||||
"Create a new file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
"Create a new file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "File1", NULL, /* name, stock id */
|
||||
"File1", NULL, /* label, accelerator */
|
||||
"File1", NULL, /* label, accelerator */
|
||||
"Open first file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Save", GTK_STOCK_SAVE, /* name, stock id */
|
||||
"_Save","<control>S", /* label, accelerator */
|
||||
"_Save","<control>S", /* label, accelerator */
|
||||
"Save current file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "SaveAs", GTK_STOCK_SAVE, /* name, stock id */
|
||||
"Save _As...", NULL, /* label, accelerator */
|
||||
"Save _As...", NULL, /* label, accelerator */
|
||||
"Save to a file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Quit", GTK_STOCK_QUIT, /* name, stock id */
|
||||
"_Quit", "<control>Q", /* label, accelerator */
|
||||
"_Quit", "<control>Q", /* label, accelerator */
|
||||
"Quit", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "About", NULL, /* name, stock id */
|
||||
"_About", "<control>A", /* label, accelerator */
|
||||
"About", /* tooltip */
|
||||
"_About", "<control>A", /* label, accelerator */
|
||||
"About", /* tooltip */
|
||||
G_CALLBACK (about_cb) },
|
||||
{ "Logo", "demo-gtk-logo", /* name, stock id */
|
||||
NULL, NULL, /* label, accelerator */
|
||||
NULL, NULL, /* label, accelerator */
|
||||
"GTK+", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
};
|
||||
@@ -211,9 +208,9 @@ static guint n_entries = G_N_ELEMENTS (entries);
|
||||
|
||||
static GtkToggleActionEntry toggle_entries[] = {
|
||||
{ "Bold", GTK_STOCK_BOLD, /* name, stock id */
|
||||
"_Bold", "<control>B", /* label, accelerator */
|
||||
"_Bold", "<control>B", /* label, accelerator */
|
||||
"Bold", /* tooltip */
|
||||
G_CALLBACK (activate_action),
|
||||
G_CALLBACK (activate_action),
|
||||
TRUE }, /* is_active */
|
||||
};
|
||||
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
|
||||
@@ -226,13 +223,13 @@ enum {
|
||||
|
||||
static GtkRadioActionEntry color_entries[] = {
|
||||
{ "Red", NULL, /* name, stock id */
|
||||
"_Red", "<control>R", /* label, accelerator */
|
||||
"_Red", "<control>R", /* label, accelerator */
|
||||
"Blood", COLOR_RED }, /* tooltip, value */
|
||||
{ "Green", NULL, /* name, stock id */
|
||||
"_Green", "<control>G", /* label, accelerator */
|
||||
"_Green", "<control>G", /* label, accelerator */
|
||||
"Grass", COLOR_GREEN }, /* tooltip, value */
|
||||
{ "Blue", NULL, /* name, stock id */
|
||||
"_Blue", "<control>B", /* label, accelerator */
|
||||
"_Blue", "<control>B", /* label, accelerator */
|
||||
"Sky", COLOR_BLUE }, /* tooltip, value */
|
||||
};
|
||||
static guint n_color_entries = G_N_ELEMENTS (color_entries);
|
||||
@@ -245,18 +242,18 @@ enum {
|
||||
|
||||
static GtkRadioActionEntry shape_entries[] = {
|
||||
{ "Square", NULL, /* name, stock id */
|
||||
"_Square", "<control>S", /* label, accelerator */
|
||||
"_Square", "<control>S", /* label, accelerator */
|
||||
"Square", SHAPE_SQUARE }, /* tooltip, value */
|
||||
{ "Rectangle", NULL, /* name, stock id */
|
||||
"_Rectangle", "<control>R", /* label, accelerator */
|
||||
"_Rectangle", "<control>R", /* label, accelerator */
|
||||
"Rectangle", SHAPE_RECTANGLE }, /* tooltip, value */
|
||||
{ "Oval", NULL, /* name, stock id */
|
||||
"_Oval", "<control>O", /* label, accelerator */
|
||||
"Egg", SHAPE_OVAL }, /* tooltip, value */
|
||||
"_Oval", "<control>O", /* label, accelerator */
|
||||
"Egg", SHAPE_OVAL }, /* tooltip, value */
|
||||
};
|
||||
static guint n_shape_entries = G_N_ELEMENTS (shape_entries);
|
||||
|
||||
static const gchar *ui_info =
|
||||
static const gchar *ui_info =
|
||||
"<ui>"
|
||||
" <menubar name='MenuBar'>"
|
||||
" <menu action='FileMenu'>"
|
||||
@@ -288,7 +285,7 @@ static const gchar *ui_info =
|
||||
" <toolitem action='Open'>"
|
||||
" <menu action='OpenMenu'>"
|
||||
" <menuitem action='File1'/>"
|
||||
" </menu>"
|
||||
" </menu>"
|
||||
" </toolitem>"
|
||||
" <toolitem action='Quit'/>"
|
||||
" <separator action='Sep1'/>"
|
||||
@@ -308,7 +305,7 @@ static void
|
||||
register_stock_icons (void)
|
||||
{
|
||||
static gboolean registered = FALSE;
|
||||
|
||||
|
||||
if (!registered)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -320,12 +317,12 @@ register_stock_icons (void)
|
||||
"_GTK!",
|
||||
0, 0, NULL }
|
||||
};
|
||||
|
||||
|
||||
registered = TRUE;
|
||||
|
||||
/* Register our stock items */
|
||||
gtk_stock_add (items, G_N_ELEMENTS (items));
|
||||
|
||||
|
||||
/* Add our custom icon factory to the list of defaults */
|
||||
factory = gtk_icon_factory_new ();
|
||||
gtk_icon_factory_add_default (factory);
|
||||
@@ -350,7 +347,7 @@ register_stock_icons (void)
|
||||
|
||||
/* The gtk-logo-rgb icon has a white background, make it transparent */
|
||||
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
|
||||
|
||||
|
||||
icon_set = gtk_icon_set_new_from_pixbuf (transparent);
|
||||
gtk_icon_factory_add (factory, "demo-gtk-logo", icon_set);
|
||||
gtk_icon_set_unref (icon_set);
|
||||
@@ -359,7 +356,7 @@ register_stock_icons (void)
|
||||
}
|
||||
else
|
||||
g_warning ("failed to load GTK logo for toolbar");
|
||||
|
||||
|
||||
/* Drop our reference to the factory, GTK will hold a reference. */
|
||||
g_object_unref (factory);
|
||||
}
|
||||
@@ -373,9 +370,9 @@ update_statusbar (GtkTextBuffer *buffer,
|
||||
gint row, col;
|
||||
gint count;
|
||||
GtkTextIter iter;
|
||||
|
||||
gtk_statusbar_pop (statusbar, 0); /* clear any previous message,
|
||||
* underflow is allowed
|
||||
|
||||
gtk_statusbar_pop (statusbar, 0); /* clear any previous message,
|
||||
* underflow is allowed
|
||||
*/
|
||||
|
||||
count = gtk_text_buffer_get_char_count (buffer);
|
||||
@@ -409,21 +406,21 @@ update_resize_grip (GtkWidget *widget,
|
||||
GdkEventWindowState *event,
|
||||
GtkStatusbar *statusbar)
|
||||
{
|
||||
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN))
|
||||
{
|
||||
gboolean maximized;
|
||||
|
||||
maximized = event->new_window_state & (GDK_WINDOW_STATE_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)
|
||||
{
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *table;
|
||||
@@ -438,10 +435,10 @@ do_appwindow (GtkWidget *do_widget)
|
||||
GError *error = NULL;
|
||||
|
||||
register_stock_icons ();
|
||||
|
||||
|
||||
/* Create the toplevel window
|
||||
*/
|
||||
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
@@ -453,15 +450,15 @@ do_appwindow (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
table = gtk_table_new (1, 4, FALSE);
|
||||
|
||||
table = gtk_table_new (1, 5, FALSE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
|
||||
/* Create the menubar and toolbar
|
||||
*/
|
||||
|
||||
|
||||
action_group = gtk_action_group_new ("AppWindowActions");
|
||||
open_action = g_object_new (tool_menu_action_get_type (),
|
||||
open_action = g_object_new (tool_menu_action_get_type (),
|
||||
"name", "Open",
|
||||
"label", "_Open",
|
||||
"tooltip", "Open a file",
|
||||
@@ -469,30 +466,30 @@ do_appwindow (GtkWidget *do_widget)
|
||||
NULL);
|
||||
gtk_action_group_add_action (action_group, open_action);
|
||||
g_object_unref (open_action);
|
||||
gtk_action_group_add_actions (action_group,
|
||||
entries, n_entries,
|
||||
gtk_action_group_add_actions (action_group,
|
||||
entries, n_entries,
|
||||
window);
|
||||
gtk_action_group_add_toggle_actions (action_group,
|
||||
toggle_entries, n_toggle_entries,
|
||||
gtk_action_group_add_toggle_actions (action_group,
|
||||
toggle_entries, n_toggle_entries,
|
||||
NULL);
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
color_entries, n_color_entries,
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
color_entries, n_color_entries,
|
||||
COLOR_RED,
|
||||
G_CALLBACK (activate_radio_action),
|
||||
G_CALLBACK (activate_radio_action),
|
||||
NULL);
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
shape_entries, n_shape_entries,
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
shape_entries, n_shape_entries,
|
||||
SHAPE_SQUARE,
|
||||
G_CALLBACK (activate_radio_action),
|
||||
G_CALLBACK (activate_radio_action),
|
||||
NULL);
|
||||
|
||||
merge = gtk_ui_manager_new ();
|
||||
g_object_set_data_full (G_OBJECT (window), "ui-manager", merge,
|
||||
g_object_set_data_full (G_OBJECT (window), "ui-manager", merge,
|
||||
g_object_unref);
|
||||
gtk_ui_manager_insert_action_group (merge, action_group, 0);
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window),
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window),
|
||||
gtk_ui_manager_get_accel_group (merge));
|
||||
|
||||
|
||||
if (!gtk_ui_manager_add_ui_from_string (merge, ui_info, -1, &error))
|
||||
{
|
||||
g_message ("building menus failed: %s", error->message);
|
||||
@@ -502,7 +499,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
bar = gtk_ui_manager_get_widget (merge, "/MenuBar");
|
||||
gtk_widget_show (bar);
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
bar,
|
||||
bar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 0, 1,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
@@ -511,7 +508,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
bar = gtk_ui_manager_get_widget (merge, "/ToolBar");
|
||||
gtk_widget_show (bar);
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
bar,
|
||||
bar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
@@ -520,6 +517,25 @@ do_appwindow (GtkWidget *do_widget)
|
||||
/* Create document
|
||||
*/
|
||||
|
||||
infobar = gtk_info_bar_new ();
|
||||
gtk_widget_set_no_show_all (infobar, TRUE);
|
||||
messagelabel = gtk_label_new ("");
|
||||
gtk_widget_show (messagelabel);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar))),
|
||||
messagelabel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_info_bar_add_button (GTK_INFO_BAR (infobar),
|
||||
GTK_STOCK_OK, GTK_RESPONSE_OK);
|
||||
g_signal_connect (infobar, "response",
|
||||
G_CALLBACK (gtk_widget_hide), NULL);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
infobar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 2, 3,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
@@ -528,20 +544,20 @@ do_appwindow (GtkWidget *do_widget)
|
||||
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_SHADOW_IN);
|
||||
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
sw,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 2, 3,
|
||||
0, 1, 3, 4,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
0, 0);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
200, 200);
|
||||
|
||||
|
||||
contents = gtk_text_view_new ();
|
||||
gtk_widget_grab_focus (contents);
|
||||
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw),
|
||||
contents);
|
||||
|
||||
@@ -551,7 +567,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
statusbar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 3, 4,
|
||||
0, 1, 4, 5,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
@@ -570,12 +586,12 @@ do_appwindow (GtkWidget *do_widget)
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
g_signal_connect_object (window,
|
||||
"window_state_event",
|
||||
g_signal_connect_object (window,
|
||||
"window_state_event",
|
||||
G_CALLBACK (update_resize_grip),
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
|
||||
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
|
||||
}
|
||||
|
||||
@@ -584,9 +600,11 @@ do_appwindow (GtkWidget *do_widget)
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
infobar = NULL;
|
||||
messagelabel = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
|
||||
@@ -203,6 +203,10 @@ do_clipboard (GtkWidget *do_widget)
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Clipboard demo");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
|
||||
65
demos/gtk-demo/entry_buffer.c
Normal file
65
demos/gtk-demo/entry_buffer.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/* Entry/Entry Buffer
|
||||
*
|
||||
* GtkEntryBuffer provides the text content in a GtkEntry.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_entry_buffer (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry;
|
||||
GtkEntryBuffer *buffer;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_dialog_new_with_buttons ("GtkEntryBuffer",
|
||||
GTK_WINDOW (do_widget),
|
||||
0,
|
||||
GTK_STOCK_CLOSE,
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
|
||||
g_signal_connect (window, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Entries share a buffer. Typing in one is reflected in the other.");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
/* Create a buffer */
|
||||
buffer = gtk_entry_buffer_new (NULL, 0);
|
||||
|
||||
/* Create our first entry */
|
||||
entry = gtk_entry_new_with_buffer (buffer);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the second entry */
|
||||
entry = gtk_entry_new_with_buffer (buffer);
|
||||
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
||||
|
||||
g_object_unref (buffer);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
104
demos/gtk-demo/infobar.c
Normal file
104
demos/gtk-demo/infobar.c
Normal file
@@ -0,0 +1,104 @@
|
||||
/* Info bar
|
||||
*
|
||||
* Info bar widgets are used to report important messages to the user.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static void
|
||||
on_bar_response (GtkInfoBar *info_bar,
|
||||
gint response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"You clicked a button on an info bar");
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
"Your response has id %d", response_id);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_infobar (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *bar;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *vbox2;
|
||||
GtkWidget *label;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Info Bars");
|
||||
|
||||
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);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_INFO);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_WARNING);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
bar = gtk_info_bar_new_with_buttons (GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
||||
g_signal_connect (bar, "response", G_CALLBACK (on_bar_response), window);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_QUESTION);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_ERROR);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_OTHER);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
frame = gtk_frame_new ("Info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 8);
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
||||
|
||||
/* Standard message dialog */
|
||||
label = gtk_label_new ("An example of different info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
84
demos/gtk-demo/links.c
Normal file
84
demos/gtk-demo/links.c
Normal file
@@ -0,0 +1,84 @@
|
||||
/* Links
|
||||
*
|
||||
* GtkLabel can show hyperlinks. The default action is to call
|
||||
* gtk_show_uri() on their URI, but it is possible to override
|
||||
* this with a custom handler.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
response_cb (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
activate_link (GtkWidget *label,
|
||||
const gchar *uri,
|
||||
gpointer data)
|
||||
{
|
||||
if (g_strcmp0 (uri, "keynav") == 0)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *parent;
|
||||
|
||||
parent = gtk_widget_get_toplevel (label);
|
||||
dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (parent),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"The term <i>keynav</i> is a shorthand for "
|
||||
"keyboard navigation and refers to the process of using "
|
||||
"a program (exclusively) via keyboard input.");
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (response_cb), NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_links (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *label;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Links");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
label = gtk_label_new ("Some <a href=\"http://en.wikipedia.org/wiki/Text\""
|
||||
"title=\"plain text\">text</a> may be marked up\n"
|
||||
"as hyperlinks, which can be clicked\n"
|
||||
"or activated via <a href=\"keynav\">keynav</a>");
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
g_signal_connect (label, "activate-link", G_CALLBACK (activate_link), NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), label);
|
||||
gtk_widget_show (label);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
*
|
||||
* There are several widgets involved in displaying menus. The
|
||||
* GtkMenuBar widget is a menu bar, which normally appears horizontally
|
||||
* at the top of an application, but can also be layed out vertically.
|
||||
* The GtkMenu widget is the actual menu that pops up. Both GtkMenuBar
|
||||
* and GtkMenu are subclasses of GtkMenuShell; a GtkMenuShell contains
|
||||
* menu items (GtkMenuItem). Each menu item contains text and/or images
|
||||
* at the top of an application, but can also be layed out vertically.
|
||||
* The GtkMenu widget is the actual menu that pops up. Both GtkMenuBar
|
||||
* and GtkMenu are subclasses of GtkMenuShell; a GtkMenuShell contains
|
||||
* menu items (GtkMenuItem). Each menu item contains text and/or images
|
||||
* and can be selected by the user.
|
||||
*
|
||||
* There are several kinds of menu item, including plain GtkMenuItem,
|
||||
@@ -22,7 +22,6 @@
|
||||
* GtkUIManager provides a higher-level interface for creating menu bars
|
||||
* and menus; while you can construct menus manually, most people don't
|
||||
* do that. There's a separate demo for GtkUIManager.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
@@ -118,37 +117,35 @@ change_orientation (GtkWidget *button,
|
||||
}
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_menus (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *box;
|
||||
GtkWidget *box1;
|
||||
GtkWidget *box2;
|
||||
GtkWidget *button;
|
||||
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *menubar;
|
||||
GtkWidget *menu;
|
||||
GtkWidget *menuitem;
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Menus");
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK(gtk_widget_destroyed), &window);
|
||||
g_signal_connect (window, "delete-event",
|
||||
G_CALLBACK (gtk_true), NULL);
|
||||
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "menus");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
|
||||
|
||||
box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_show (box);
|
||||
@@ -156,18 +153,18 @@ do_menus (GtkWidget *do_widget)
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), box1);
|
||||
gtk_widget_show (box1);
|
||||
|
||||
|
||||
menubar = gtk_menu_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (box1), menubar, FALSE, TRUE, 0);
|
||||
gtk_widget_show (menubar);
|
||||
|
||||
|
||||
menu = create_menu (2, TRUE);
|
||||
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("test\nline2");
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("foo");
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (3, TRUE));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
@@ -178,7 +175,7 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_menu_item_set_right_justified (GTK_MENU_ITEM (menuitem), TRUE);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
|
||||
575
demos/gtk-demo/offscreen_window.c
Normal file
575
demos/gtk-demo/offscreen_window.c
Normal file
@@ -0,0 +1,575 @@
|
||||
/* Offscreen windows/Rotated button
|
||||
*
|
||||
* Offscreen windows can be used to transform parts of a widget
|
||||
* hierarchy. Note that the rotated button is fully functional.
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
#include <math.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define GTK_TYPE_ROTATED_BIN (gtk_rotated_bin_get_type ())
|
||||
#define GTK_ROTATED_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ROTATED_BIN, GtkRotatedBin))
|
||||
#define GTK_ROTATED_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ROTATED_BIN, GtkRotatedBinClass))
|
||||
#define GTK_IS_ROTATED_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ROTATED_BIN))
|
||||
#define GTK_IS_ROTATED_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ROTATED_BIN))
|
||||
#define GTK_ROTATED_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ROTATED_BIN, GtkRotatedBinClass))
|
||||
|
||||
typedef struct _GtkRotatedBin GtkRotatedBin;
|
||||
typedef struct _GtkRotatedBinClass GtkRotatedBinClass;
|
||||
|
||||
struct _GtkRotatedBin
|
||||
{
|
||||
GtkContainer container;
|
||||
|
||||
GtkWidget *child;
|
||||
GdkWindow *offscreen_window;
|
||||
gdouble angle;
|
||||
};
|
||||
|
||||
struct _GtkRotatedBinClass
|
||||
{
|
||||
GtkContainerClass parent_class;
|
||||
};
|
||||
|
||||
GType gtk_rotated_bin_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_rotated_bin_new (void);
|
||||
void gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
|
||||
gdouble angle);
|
||||
|
||||
/*** implementation ***/
|
||||
|
||||
static void gtk_rotated_bin_realize (GtkWidget *widget);
|
||||
static void gtk_rotated_bin_unrealize (GtkWidget *widget);
|
||||
static void gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *offscreen);
|
||||
|
||||
static void gtk_rotated_bin_add (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
static void gtk_rotated_bin_remove (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_rotated_bin_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data);
|
||||
static GType gtk_rotated_bin_child_type (GtkContainer *container);
|
||||
|
||||
G_DEFINE_TYPE (GtkRotatedBin, gtk_rotated_bin, GTK_TYPE_CONTAINER);
|
||||
|
||||
static void
|
||||
to_child (GtkRotatedBin *bin,
|
||||
double widget_x,
|
||||
double widget_y,
|
||||
double *x_out,
|
||||
double *y_out)
|
||||
{
|
||||
GtkAllocation child_area;
|
||||
double x, y, xr, yr;
|
||||
double c, s;
|
||||
double w, h;
|
||||
|
||||
sincos (bin->angle, &s, &c);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
|
||||
x = widget_x;
|
||||
y = widget_y;
|
||||
|
||||
x -= (w - child_area.width) / 2;
|
||||
y -= (h - child_area.height) / 2;
|
||||
|
||||
x -= child_area.width / 2;
|
||||
y -= child_area.height / 2;
|
||||
|
||||
xr = x * c + y * s;
|
||||
yr = y * c - x * s;
|
||||
x = xr;
|
||||
y = yr;
|
||||
|
||||
x += child_area.width / 2;
|
||||
y += child_area.height / 2;
|
||||
|
||||
*x_out = x;
|
||||
*y_out = y;
|
||||
}
|
||||
|
||||
static void
|
||||
to_parent (GtkRotatedBin *bin,
|
||||
double offscreen_x,
|
||||
double offscreen_y,
|
||||
double *x_out,
|
||||
double *y_out)
|
||||
{
|
||||
GtkAllocation child_area;
|
||||
double x, y, xr, yr;
|
||||
double c, s;
|
||||
double w, h;
|
||||
|
||||
sincos (bin->angle, &s, &c);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
|
||||
x = offscreen_x;
|
||||
y = offscreen_y;
|
||||
|
||||
x -= child_area.width / 2;
|
||||
y -= child_area.height / 2;
|
||||
|
||||
xr = x * c - y * s;
|
||||
yr = x * s + y * c;
|
||||
x = xr;
|
||||
y = yr;
|
||||
|
||||
x += child_area.width / 2;
|
||||
y += child_area.height / 2;
|
||||
|
||||
x -= (w - child_area.width) / 2;
|
||||
y -= (h - child_area.height) / 2;
|
||||
|
||||
*x_out = x;
|
||||
*y_out = y;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_class_init (GtkRotatedBinClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
|
||||
|
||||
widget_class->realize = gtk_rotated_bin_realize;
|
||||
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;
|
||||
|
||||
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
|
||||
GTK_TYPE_ROTATED_BIN,
|
||||
g_cclosure_new (G_CALLBACK (gtk_rotated_bin_damage),
|
||||
NULL, NULL));
|
||||
|
||||
container_class->add = gtk_rotated_bin_add;
|
||||
container_class->remove = gtk_rotated_bin_remove;
|
||||
container_class->forall = gtk_rotated_bin_forall;
|
||||
container_class->child_type = gtk_rotated_bin_child_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_init (GtkRotatedBin *bin)
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (bin, GTK_NO_WINDOW);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_rotated_bin_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_ROTATED_BIN, NULL);
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
pick_offscreen_child (GdkWindow *offscreen_window,
|
||||
double widget_x,
|
||||
double widget_y,
|
||||
GtkRotatedBin *bin)
|
||||
{
|
||||
GtkAllocation child_area;
|
||||
double x, y;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
to_child (bin, widget_x, widget_y, &x, &y);
|
||||
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
if (x >= 0 && x < child_area.width &&
|
||||
y >= 0 && y < child_area.height)
|
||||
return bin->offscreen_window;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
offscreen_window_to_parent (GdkWindow *offscreen_window,
|
||||
double offscreen_x,
|
||||
double offscreen_y,
|
||||
double *parent_x,
|
||||
double *parent_y,
|
||||
GtkRotatedBin *bin)
|
||||
{
|
||||
to_parent (bin, offscreen_x, offscreen_y, parent_x, parent_y);
|
||||
}
|
||||
|
||||
static void
|
||||
offscreen_window_from_parent (GdkWindow *window,
|
||||
double parent_x,
|
||||
double parent_y,
|
||||
double *offscreen_x,
|
||||
double *offscreen_y,
|
||||
GtkRotatedBin *bin)
|
||||
{
|
||||
to_child (bin, parent_x, parent_y, offscreen_x, offscreen_y);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
gint border_width;
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
attributes.x = widget->allocation.x + border_width;
|
||||
attributes.y = widget->allocation.y + border_width;
|
||||
attributes.width = widget->allocation.width - 2 * border_width;
|
||||
attributes.height = widget->allocation.height - 2 * border_width;
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.event_mask = gtk_widget_get_events (widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
| GDK_POINTER_MOTION_MASK
|
||||
| GDK_BUTTON_PRESS_MASK
|
||||
| GDK_BUTTON_RELEASE_MASK
|
||||
| GDK_SCROLL_MASK
|
||||
| GDK_ENTER_NOTIFY_MASK
|
||||
| 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;
|
||||
|
||||
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (widget->window, widget);
|
||||
g_signal_connect (widget->window, "pick-embedded-child",
|
||||
G_CALLBACK (pick_offscreen_child), bin);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_OFFSCREEN;
|
||||
|
||||
child_requisition.width = child_requisition.height = 0;
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
attributes.width = bin->child->allocation.width;
|
||||
attributes.height = bin->child->allocation.height;
|
||||
}
|
||||
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (bin->offscreen_window, widget);
|
||||
if (bin->child)
|
||||
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
|
||||
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
|
||||
g_signal_connect (bin->offscreen_window, "to-embedder",
|
||||
G_CALLBACK (offscreen_window_to_parent), bin);
|
||||
g_signal_connect (bin->offscreen_window, "from-embedder",
|
||||
G_CALLBACK (offscreen_window_from_parent), bin);
|
||||
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
|
||||
gdk_window_show (bin->offscreen_window);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
|
||||
gdk_window_set_user_data (bin->offscreen_window, NULL);
|
||||
gdk_window_destroy (bin->offscreen_window);
|
||||
bin->offscreen_window = NULL;
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_rotated_bin_parent_class)->unrealize (widget);
|
||||
}
|
||||
|
||||
static GType
|
||||
gtk_rotated_bin_child_type (GtkContainer *container)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
|
||||
|
||||
if (bin->child)
|
||||
return G_TYPE_NONE;
|
||||
|
||||
return GTK_TYPE_WIDGET;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_add (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
|
||||
|
||||
if (!bin->child)
|
||||
{
|
||||
gtk_widget_set_parent_window (widget, bin->offscreen_window);
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (bin));
|
||||
bin->child = widget;
|
||||
}
|
||||
else
|
||||
g_warning ("GtkRotatedBin cannot have more than one child\n");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
|
||||
gboolean was_visible;
|
||||
|
||||
was_visible = GTK_WIDGET_VISIBLE (widget);
|
||||
|
||||
if (bin->child == widget)
|
||||
{
|
||||
gtk_widget_unparent (widget);
|
||||
|
||||
bin->child = NULL;
|
||||
|
||||
if (was_visible && GTK_WIDGET_VISIBLE (container))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (container));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
|
||||
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
if (bin->child)
|
||||
(*callback) (bin->child, callback_data);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
|
||||
gdouble angle)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_ROTATED_BIN (bin));
|
||||
|
||||
bin->angle = angle;
|
||||
gtk_widget_queue_resize (GTK_WIDGET (bin));
|
||||
|
||||
gdk_window_geometry_changed (bin->offscreen_window);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
GtkRequisition child_requisition;
|
||||
double s, c;
|
||||
double w, h;
|
||||
|
||||
child_requisition.width = 0;
|
||||
child_requisition.height = 0;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
|
||||
sincos (bin->angle, &s, &c);
|
||||
w = c * child_requisition.width + s * child_requisition.height;
|
||||
h = s * child_requisition.width + c * child_requisition.height;
|
||||
|
||||
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + w;
|
||||
requisition->height = GTK_CONTAINER (widget)->border_width * 2 + h;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
gint border_width;
|
||||
gint w, h;
|
||||
gdouble s, c;
|
||||
|
||||
widget->allocation = *allocation;
|
||||
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
w = allocation->width - border_width * 2;
|
||||
h = allocation->height - border_width * 2;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (widget->window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
w, h);
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
GtkRequisition child_requisition;
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
sincos (bin->angle, &s, &c);
|
||||
|
||||
gtk_widget_get_child_requisition (bin->child, &child_requisition);
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.height = child_requisition.height;
|
||||
if (c == 0.0)
|
||||
child_allocation.width = h / s;
|
||||
else if (s == 0.0)
|
||||
child_allocation.width = w / c;
|
||||
else
|
||||
child_allocation.width = MIN ((w - s * child_allocation.height) / c,
|
||||
(h - c * child_allocation.height) / s);
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (bin->offscreen_window,
|
||||
child_allocation.x,
|
||||
child_allocation.y,
|
||||
child_allocation.width,
|
||||
child_allocation.height);
|
||||
|
||||
child_allocation.x = child_allocation.y = 0;
|
||||
gtk_widget_size_allocate (bin->child, &child_allocation);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
gint width, height;
|
||||
gdouble s, c;
|
||||
gdouble w, h;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
if (event->window == widget->window)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
GtkAllocation child_area;
|
||||
cairo_t *cr;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
/* transform */
|
||||
sincos (bin->angle, &s, &c);
|
||||
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);
|
||||
}
|
||||
}
|
||||
else if (event->window == bin->offscreen_window)
|
||||
{
|
||||
gtk_paint_flat_box (widget->style, event->window,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
&event->area, widget, "blah",
|
||||
0, 0, -1, -1);
|
||||
|
||||
if (bin->child)
|
||||
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
event);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*** ***/
|
||||
|
||||
static void
|
||||
scale_changed (GtkRange *range,
|
||||
GtkRotatedBin *bin)
|
||||
{
|
||||
gtk_rotated_bin_set_angle (bin, gtk_range_get_value (range));
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_offscreen_window (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *bin, *vbox, *scale, *button;
|
||||
GdkColor black;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Rotated widget");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gdk_color_parse ("black", &black);
|
||||
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);
|
||||
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
|
||||
|
||||
button = gtk_button_new_with_label ("A Button");
|
||||
bin = gtk_rotated_bin_new ();
|
||||
|
||||
g_signal_connect (scale, "value-changed", G_CALLBACK (scale_changed), bin);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (bin), button);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
502
demos/gtk-demo/offscreen_window2.c
Normal file
502
demos/gtk-demo/offscreen_window2.c
Normal file
@@ -0,0 +1,502 @@
|
||||
/* Offscreen windows/Effects
|
||||
*
|
||||
* Offscreen windows can be used to render elements multiple times to achieve
|
||||
* various effects.
|
||||
*/
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define GTK_TYPE_MIRROR_BIN (gtk_mirror_bin_get_type ())
|
||||
#define GTK_MIRROR_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MIRROR_BIN, GtkMirrorBin))
|
||||
#define GTK_MIRROR_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MIRROR_BIN, GtkMirrorBinClass))
|
||||
#define GTK_IS_MIRROR_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MIRROR_BIN))
|
||||
#define GTK_IS_MIRROR_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MIRROR_BIN))
|
||||
#define GTK_MIRROR_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MIRROR_BIN, GtkMirrorBinClass))
|
||||
|
||||
typedef struct _GtkMirrorBin GtkMirrorBin;
|
||||
typedef struct _GtkMirrorBinClass GtkMirrorBinClass;
|
||||
|
||||
struct _GtkMirrorBin
|
||||
{
|
||||
GtkContainer container;
|
||||
|
||||
GtkWidget *child;
|
||||
GdkWindow *offscreen_window;
|
||||
};
|
||||
|
||||
struct _GtkMirrorBinClass
|
||||
{
|
||||
GtkContainerClass parent_class;
|
||||
};
|
||||
|
||||
GType gtk_mirror_bin_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_mirror_bin_new (void);
|
||||
|
||||
/*** implementation ***/
|
||||
|
||||
static void gtk_mirror_bin_realize (GtkWidget *widget);
|
||||
static void gtk_mirror_bin_unrealize (GtkWidget *widget);
|
||||
static void gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *offscreen);
|
||||
|
||||
static void gtk_mirror_bin_add (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
static void gtk_mirror_bin_remove (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_mirror_bin_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data);
|
||||
static GType gtk_mirror_bin_child_type (GtkContainer *container);
|
||||
|
||||
G_DEFINE_TYPE (GtkMirrorBin, gtk_mirror_bin, GTK_TYPE_CONTAINER);
|
||||
|
||||
static void
|
||||
to_child (GtkMirrorBin *bin,
|
||||
double widget_x,
|
||||
double widget_y,
|
||||
double *x_out,
|
||||
double *y_out)
|
||||
{
|
||||
*x_out = widget_x;
|
||||
*y_out = widget_y;
|
||||
}
|
||||
|
||||
static void
|
||||
to_parent (GtkMirrorBin *bin,
|
||||
double offscreen_x,
|
||||
double offscreen_y,
|
||||
double *x_out,
|
||||
double *y_out)
|
||||
{
|
||||
*x_out = offscreen_x;
|
||||
*y_out = offscreen_y;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_class_init (GtkMirrorBinClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
|
||||
|
||||
widget_class->realize = gtk_mirror_bin_realize;
|
||||
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;
|
||||
|
||||
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
|
||||
GTK_TYPE_MIRROR_BIN,
|
||||
g_cclosure_new (G_CALLBACK (gtk_mirror_bin_damage),
|
||||
NULL, NULL));
|
||||
|
||||
container_class->add = gtk_mirror_bin_add;
|
||||
container_class->remove = gtk_mirror_bin_remove;
|
||||
container_class->forall = gtk_mirror_bin_forall;
|
||||
container_class->child_type = gtk_mirror_bin_child_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_init (GtkMirrorBin *bin)
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (bin, GTK_NO_WINDOW);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_mirror_bin_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_MIRROR_BIN, NULL);
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
pick_offscreen_child (GdkWindow *offscreen_window,
|
||||
double widget_x,
|
||||
double widget_y,
|
||||
GtkMirrorBin *bin)
|
||||
{
|
||||
GtkAllocation child_area;
|
||||
double x, y;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
to_child (bin, widget_x, widget_y, &x, &y);
|
||||
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
if (x >= 0 && x < child_area.width &&
|
||||
y >= 0 && y < child_area.height)
|
||||
return bin->offscreen_window;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
offscreen_window_to_parent (GdkWindow *offscreen_window,
|
||||
double offscreen_x,
|
||||
double offscreen_y,
|
||||
double *parent_x,
|
||||
double *parent_y,
|
||||
GtkMirrorBin *bin)
|
||||
{
|
||||
to_parent (bin, offscreen_x, offscreen_y, parent_x, parent_y);
|
||||
}
|
||||
|
||||
static void
|
||||
offscreen_window_from_parent (GdkWindow *window,
|
||||
double parent_x,
|
||||
double parent_y,
|
||||
double *offscreen_x,
|
||||
double *offscreen_y,
|
||||
GtkMirrorBin *bin)
|
||||
{
|
||||
to_child (bin, parent_x, parent_y, offscreen_x, offscreen_y);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
gint border_width;
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
attributes.x = widget->allocation.x + border_width;
|
||||
attributes.y = widget->allocation.y + border_width;
|
||||
attributes.width = widget->allocation.width - 2 * border_width;
|
||||
attributes.height = widget->allocation.height - 2 * border_width;
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.event_mask = gtk_widget_get_events (widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
| GDK_POINTER_MOTION_MASK
|
||||
| GDK_BUTTON_PRESS_MASK
|
||||
| GDK_BUTTON_RELEASE_MASK
|
||||
| GDK_SCROLL_MASK
|
||||
| GDK_ENTER_NOTIFY_MASK
|
||||
| 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;
|
||||
|
||||
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (widget->window, widget);
|
||||
g_signal_connect (widget->window, "pick-embedded-child",
|
||||
G_CALLBACK (pick_offscreen_child), bin);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_OFFSCREEN;
|
||||
|
||||
child_requisition.width = child_requisition.height = 0;
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
attributes.width = bin->child->allocation.width;
|
||||
attributes.height = bin->child->allocation.height;
|
||||
}
|
||||
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (bin->offscreen_window, widget);
|
||||
if (bin->child)
|
||||
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
|
||||
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
|
||||
g_signal_connect (bin->offscreen_window, "to-embedder",
|
||||
G_CALLBACK (offscreen_window_to_parent), bin);
|
||||
g_signal_connect (bin->offscreen_window, "from-embedder",
|
||||
G_CALLBACK (offscreen_window_from_parent), bin);
|
||||
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
|
||||
gdk_window_show (bin->offscreen_window);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
|
||||
gdk_window_set_user_data (bin->offscreen_window, NULL);
|
||||
gdk_window_destroy (bin->offscreen_window);
|
||||
bin->offscreen_window = NULL;
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_mirror_bin_parent_class)->unrealize (widget);
|
||||
}
|
||||
|
||||
static GType
|
||||
gtk_mirror_bin_child_type (GtkContainer *container)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
|
||||
|
||||
if (bin->child)
|
||||
return G_TYPE_NONE;
|
||||
|
||||
return GTK_TYPE_WIDGET;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_add (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
|
||||
|
||||
if (!bin->child)
|
||||
{
|
||||
gtk_widget_set_parent_window (widget, bin->offscreen_window);
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (bin));
|
||||
bin->child = widget;
|
||||
}
|
||||
else
|
||||
g_warning ("GtkMirrorBin cannot have more than one child\n");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
|
||||
gboolean was_visible;
|
||||
|
||||
was_visible = GTK_WIDGET_VISIBLE (widget);
|
||||
|
||||
if (bin->child == widget)
|
||||
{
|
||||
gtk_widget_unparent (widget);
|
||||
|
||||
bin->child = NULL;
|
||||
|
||||
if (was_visible && GTK_WIDGET_VISIBLE (container))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (container));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
|
||||
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
if (bin->child)
|
||||
(*callback) (bin->child, callback_data);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
child_requisition.width = 0;
|
||||
child_requisition.height = 0;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
|
||||
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.width + 10;
|
||||
requisition->height = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.height * 2 + 10;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
gint border_width;
|
||||
gint w, h;
|
||||
widget->allocation = *allocation;
|
||||
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
w = allocation->width - border_width * 2;
|
||||
h = allocation->height - border_width * 2;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (widget->window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
w, h);
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
GtkRequisition child_requisition;
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
gtk_widget_get_child_requisition (bin->child, &child_requisition);
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.height = child_requisition.height;
|
||||
child_allocation.width = child_requisition.width;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (bin->offscreen_window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
child_allocation.width, child_allocation.height);
|
||||
gtk_widget_size_allocate (bin->child, &child_allocation);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
gint width, height;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
if (event->window == widget->window)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
GtkAllocation child_area;
|
||||
cairo_t *cr;
|
||||
cairo_matrix_t matrix;
|
||||
cairo_pattern_t *mask;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
gdk_drawable_get_size (pixmap, &width, &height);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_clip (cr);
|
||||
|
||||
/* paint the offscreen child */
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_restore (cr);
|
||||
|
||||
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
|
||||
cairo_matrix_scale (&matrix, 1.0, -1.0);
|
||||
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
|
||||
cairo_transform (cr, &matrix);
|
||||
|
||||
cairo_rectangle (cr, 0, height, width, height);
|
||||
cairo_clip (cr);
|
||||
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, height);
|
||||
|
||||
/* create linear gradient as mask-pattern to fade out the source */
|
||||
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
/* paint the reflection */
|
||||
cairo_mask (cr, mask);
|
||||
|
||||
cairo_pattern_destroy (mask);
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
}
|
||||
else if (event->window == bin->offscreen_window)
|
||||
{
|
||||
gtk_paint_flat_box (widget->style, event->window,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
&event->area, widget, "blah",
|
||||
0, 0, -1, -1);
|
||||
|
||||
if (bin->child)
|
||||
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
event);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*** ***/
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_offscreen_window2 (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *bin, *vbox;
|
||||
GtkWidget *hbox, *entry, *applybutton, *backbutton;
|
||||
GtkSizeGroup *group;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Effects");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_vbox_new (0, FALSE);
|
||||
|
||||
bin = gtk_mirror_bin_new ();
|
||||
|
||||
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
backbutton = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (backbutton),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_BACK, 4));
|
||||
gtk_size_group_add_widget (group, backbutton);
|
||||
entry = gtk_entry_new ();
|
||||
gtk_size_group_add_widget (group, entry);
|
||||
applybutton = gtk_button_new ();
|
||||
gtk_size_group_add_widget (group, applybutton);
|
||||
gtk_container_add (GTK_CONTAINER (applybutton),
|
||||
gtk_image_new_from_stock (GTK_STOCK_APPLY, 4));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (bin), hbox);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), backbutton, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), applybutton, FALSE, FALSE, 0);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -13,19 +13,19 @@
|
||||
#define HEADER_HEIGHT (10*72/25.4)
|
||||
#define HEADER_GAP (3*72/25.4)
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
gchar *filename;
|
||||
gdouble font_size;
|
||||
|
||||
gint lines_per_page;
|
||||
gint lines_per_page;
|
||||
gchar **lines;
|
||||
gint num_lines;
|
||||
gint num_pages;
|
||||
} PrintData;
|
||||
|
||||
static void
|
||||
begin_print (GtkPrintOperation *operation,
|
||||
begin_print (GtkPrintOperation *operation,
|
||||
GtkPrintContext *context,
|
||||
gpointer user_data)
|
||||
{
|
||||
@@ -35,9 +35,9 @@ begin_print (GtkPrintOperation *operation,
|
||||
double height;
|
||||
|
||||
height = gtk_print_context_get_height (context) - HEADER_HEIGHT - HEADER_GAP;
|
||||
|
||||
|
||||
data->lines_per_page = floor (height / data->font_size);
|
||||
|
||||
|
||||
g_file_get_contents (data->filename, &contents, NULL, NULL);
|
||||
|
||||
data->lines = g_strsplit (contents, "\n", 0);
|
||||
@@ -46,7 +46,7 @@ begin_print (GtkPrintOperation *operation,
|
||||
i = 0;
|
||||
while (data->lines[i] != NULL)
|
||||
i++;
|
||||
|
||||
|
||||
data->num_lines = i;
|
||||
data->num_pages = (data->num_lines - 1) / data->lines_per_page + 1;
|
||||
|
||||
@@ -72,10 +72,10 @@ draw_page (GtkPrintOperation *operation,
|
||||
width = gtk_print_context_get_width (context);
|
||||
|
||||
cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
|
||||
|
||||
|
||||
cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
|
||||
cairo_fill_preserve (cr);
|
||||
|
||||
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_set_line_width (cr, 1);
|
||||
cairo_stroke (cr);
|
||||
@@ -107,19 +107,19 @@ draw_page (GtkPrintOperation *operation,
|
||||
pango_layout_get_pixel_size (layout, &text_width, &text_height);
|
||||
cairo_move_to (cr, width - text_width - 4, (HEADER_HEIGHT - text_height) / 2);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
|
||||
g_object_unref (layout);
|
||||
|
||||
|
||||
layout = gtk_print_context_create_pango_layout (context);
|
||||
|
||||
|
||||
desc = pango_font_description_from_string ("monospace");
|
||||
pango_font_description_set_size (desc, data->font_size * PANGO_SCALE);
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
|
||||
cairo_move_to (cr, 0, HEADER_HEIGHT + HEADER_GAP);
|
||||
line = page_nr * data->lines_per_page;
|
||||
for (i = 0; i < data->lines_per_page && line < data->num_lines; i++)
|
||||
for (i = 0; i < data->lines_per_page && line < data->num_lines; i++)
|
||||
{
|
||||
pango_layout_set_text (layout, data->lines[line], -1);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
@@ -131,7 +131,7 @@ draw_page (GtkPrintOperation *operation,
|
||||
}
|
||||
|
||||
static void
|
||||
end_print (GtkPrintOperation *operation,
|
||||
end_print (GtkPrintOperation *operation,
|
||||
GtkPrintContext *context,
|
||||
gpointer user_data)
|
||||
{
|
||||
@@ -147,7 +147,9 @@ GtkWidget *
|
||||
do_printing (GtkWidget *do_widget)
|
||||
{
|
||||
GtkPrintOperation *operation;
|
||||
GtkPrintSettings *settings;
|
||||
PrintData *data;
|
||||
gchar *uri, *dir, *ext;
|
||||
GError *error = NULL;
|
||||
|
||||
operation = gtk_print_operation_new ();
|
||||
@@ -155,37 +157,55 @@ do_printing (GtkWidget *do_widget)
|
||||
data->filename = demo_find_file ("printing.c", NULL);
|
||||
data->font_size = 12.0;
|
||||
|
||||
g_signal_connect (G_OBJECT (operation), "begin-print",
|
||||
g_signal_connect (G_OBJECT (operation), "begin-print",
|
||||
G_CALLBACK (begin_print), data);
|
||||
g_signal_connect (G_OBJECT (operation), "draw-page",
|
||||
g_signal_connect (G_OBJECT (operation), "draw-page",
|
||||
G_CALLBACK (draw_page), data);
|
||||
g_signal_connect (G_OBJECT (operation), "end-print",
|
||||
g_signal_connect (G_OBJECT (operation), "end-print",
|
||||
G_CALLBACK (end_print), data);
|
||||
|
||||
gtk_print_operation_set_use_full_page (operation, FALSE);
|
||||
gtk_print_operation_set_unit (operation, GTK_UNIT_POINTS);
|
||||
gtk_print_operation_set_embed_page_setup (operation, TRUE);
|
||||
|
||||
settings = gtk_print_settings_new ();
|
||||
dir = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
|
||||
if (dir == NULL)
|
||||
dir = g_get_home_dir ();
|
||||
if (g_strcmp0 (gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT), "ps") == 0)
|
||||
ext = ".ps";
|
||||
else if (g_strcmp0 (gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT), "svg") == 0)
|
||||
ext = ".svg";
|
||||
else
|
||||
ext = ".pdf";
|
||||
|
||||
uri = g_strconcat ("file://", dir, "/", "gtk-demo", ext, NULL);
|
||||
gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_OUTPUT_URI, uri);
|
||||
gtk_print_operation_set_print_settings (operation, settings);
|
||||
|
||||
gtk_print_operation_run (operation, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, GTK_WINDOW (do_widget), &error);
|
||||
|
||||
g_object_unref (operation);
|
||||
g_object_unref (settings);
|
||||
g_free (uri);
|
||||
|
||||
if (error)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (do_widget),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"%s", error->message);
|
||||
g_error_free (error);
|
||||
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -211,15 +211,15 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
label = gtk_label_new (text);
|
||||
gtk_container_add (GTK_CONTAINER (box), label);
|
||||
|
||||
gtk_label_set_angle (label, 45);
|
||||
gtk_label_set_angle (GTK_LABEL (label), 45);
|
||||
|
||||
/* Set up fancy stuff on the label */
|
||||
layout = gtk_label_get_layout (label);
|
||||
layout = gtk_label_get_layout (GTK_LABEL (label));
|
||||
pango_cairo_context_set_shape_renderer (pango_layout_get_context (layout),
|
||||
fancy_shape_renderer,
|
||||
NULL, NULL);
|
||||
attrs = create_fancy_attr_list_for_layout (layout);
|
||||
gtk_label_set_attributes (label, attrs);
|
||||
gtk_label_set_attributes (GTK_LABEL (label), attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,3 +19,5 @@ EXTRA_DIST += \
|
||||
generation.txt \
|
||||
gtkdocs_fix \
|
||||
RELEASE-HOWTO
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -38,3 +38,5 @@ dist-hook:
|
||||
endif
|
||||
|
||||
.PHONY: html
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -3,3 +3,6 @@ include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = gdk-pixbuf gdk gtk libgail-util
|
||||
|
||||
GITIGNOREFILES = */*.1
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -95,3 +95,5 @@ dist-hook-local: $(BUILT_EXTRA_DIST)
|
||||
for f in $$files; do \
|
||||
if test -f $$f; then d=.; else d=$(srcdir); fi; \
|
||||
cp $$d/$$f $(distdir) || exit 1; done
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -152,3 +152,5 @@ include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -103,5 +103,9 @@
|
||||
<index id="api-index-2-16" role="2.16">
|
||||
<title>Index of new symbols in 2.16</title>
|
||||
<xi:include href="xml/api-index-2.16.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-18" role="2.18">
|
||||
<title>Index of new symbols in 2.18</title>
|
||||
<xi:include href="xml/api-index-2.18.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
</book>
|
||||
|
||||
@@ -661,6 +661,7 @@ gdk_window_resize
|
||||
gdk_window_move_resize
|
||||
gdk_window_scroll
|
||||
gdk_window_move_region
|
||||
gdk_window_ensure_native
|
||||
gdk_window_reparent
|
||||
gdk_window_clear
|
||||
gdk_window_clear_area
|
||||
@@ -719,6 +720,7 @@ gdk_window_set_background
|
||||
gdk_window_set_back_pixmap
|
||||
GDK_PARENT_RELATIVE
|
||||
gdk_window_set_cursor
|
||||
gdk_window_get_cursor
|
||||
gdk_window_set_colormap
|
||||
gdk_window_get_user_data
|
||||
gdk_window_get_geometry
|
||||
@@ -739,6 +741,7 @@ gdk_window_get_colormap
|
||||
gdk_window_get_type
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_deskrelative_origin
|
||||
gdk_window_get_root_coords
|
||||
gdk_window_get_pointer
|
||||
GdkModifierType
|
||||
gdk_window_get_parent
|
||||
@@ -767,6 +770,10 @@ GdkPointerHooks
|
||||
gdk_set_pointer_hooks
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_offscreen_window_get_pixmap
|
||||
gdk_offscreen_window_set_embedder
|
||||
gdk_offscreen_window_get_embedder
|
||||
gdk_window_geometry_changed
|
||||
gdk_window_redirect_to_drawable
|
||||
gdk_window_remove_redirection
|
||||
|
||||
@@ -931,6 +938,7 @@ gdk_region_get_clipbox
|
||||
gdk_region_get_rectangles
|
||||
gdk_region_empty
|
||||
gdk_region_equal
|
||||
gdk_region_rect_equal
|
||||
gdk_region_point_in
|
||||
gdk_region_rect_in
|
||||
GdkOverlapType
|
||||
|
||||
@@ -94,6 +94,7 @@ for the possible window states
|
||||
was added in 2.8.
|
||||
@GDK_DAMAGE: the content of the window has been changed. This event type
|
||||
was added in 2.14.
|
||||
@GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
|
||||
|
||||
<!-- ##### ENUM GdkEventMask ##### -->
|
||||
<para>
|
||||
|
||||
@@ -175,6 +175,16 @@ included in the region, while areas overlapped an even number of times are not.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_rect_equal ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@region:
|
||||
@rectangle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_point_in ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -8,10 +8,18 @@ Onscreen display areas in the target window system
|
||||
<para>
|
||||
A #GdkWindow is a rectangular region on the screen. It's a low-level object,
|
||||
used to implement high-level objects such as #GtkWidget and #GtkWindow on the
|
||||
GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think of
|
||||
as a "window" with a titlebar and so on; a #GtkWindow may contain many #GdkWindow.
|
||||
GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think of
|
||||
as a "window" with a titlebar and so on; a #GtkWindow may contain many #GdkWindow.
|
||||
For example, each #GtkButton has a #GdkWindow associated with it.
|
||||
</para>
|
||||
<refsect2 id="COMPOSITED-WINDOWS"><title>Composited Windows</title>
|
||||
<para>
|
||||
Normally, the windowing system takes care of rendering the contents of a child
|
||||
window onto its parent window. This mechanism can be intercepted by calling
|
||||
gdk_window_set_composited() on the child window. For a
|
||||
<firstterm>composited</firstterm> window it is the responsibility of the
|
||||
application to render the window contents at the right spot.
|
||||
</para>
|
||||
<example id="composited-window-example"><title>Composited windows</title>
|
||||
<programlisting><![CDATA[
|
||||
#include <gtk/gtk.h>
|
||||
@@ -54,7 +62,7 @@ transparent_expose (GtkWidget *widget,
|
||||
* this handler is called after the red has been drawn. If it was
|
||||
* called before then GTK would just blindly paint over our work.
|
||||
*
|
||||
* Note: if the child window has children, then you need a cairo 1.16
|
||||
* Note: if the child window has children, then you need a cairo 1.6
|
||||
* feature to make this work correctly.
|
||||
*/
|
||||
static gboolean
|
||||
@@ -153,10 +161,10 @@ main (int argc, char **argv)
|
||||
]]>
|
||||
</programlisting></example>
|
||||
<para>
|
||||
In the example <xref linkend="composited-window-example"/>, a button is
|
||||
placed inside of an event box inside of a window. The event box is
|
||||
set as composited and therefore is no longer automatically drawn to
|
||||
the screen.
|
||||
In the example <xref linkend="composited-window-example"/>, a button is
|
||||
placed inside of an event box inside of a window. The event box is
|
||||
set as composited and therefore is no longer automatically drawn to
|
||||
the screen.
|
||||
</para>
|
||||
<para>
|
||||
When the contents of the event box change, an expose event is
|
||||
@@ -168,8 +176,31 @@ that it wishes.
|
||||
<para>
|
||||
In our case, we merge the contents with a 50% transparency. We
|
||||
also set the background colour of the window to red. The effect is
|
||||
that the background shows through the button.
|
||||
that the background shows through the button.
|
||||
</para>
|
||||
</refsect2>
|
||||
<refsect2 id="OFFSCREEN-WINDOWS"><title>Offscreen Windows</title>
|
||||
<para>
|
||||
Offscreen windows are more general than composited windows, since they
|
||||
allow not only to modify the rendering of the child window onto its parent,
|
||||
but also to apply coordinate transformations.
|
||||
</para>
|
||||
<para>
|
||||
To integrate an offscreen window into a window hierarchy, one has to call
|
||||
gdk_window_set_embedder() and handle a number of signals. The
|
||||
gdk_offscreen_window_set_embedder() and handle a number of signals. The
|
||||
#GdkWindow::pick-embedded-child signal on the embedder window is used to
|
||||
select an offscreen child at given coordinates, and the #GdkWindow::to-embedder
|
||||
and #GdkWindow::from-embedder signals on the offscreen window are used to
|
||||
translate coordinates between the embedder and the offscreen window.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For rendering an offscreen window onto its embedder, the contents of the
|
||||
offscreen window are available as a pixmap, via
|
||||
gdk_offscreen_window_get_pixmap().
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
@@ -189,6 +220,43 @@ these types.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GdkWindow::from-embedder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkwindow: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
|
||||
<!-- ##### SIGNAL GdkWindow::pick-embedded-child ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkwindow: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GdkWindow::to-embedder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkwindow: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
|
||||
<!-- ##### ARG GdkWindow:cursor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkWindowType ##### -->
|
||||
<para>
|
||||
Describes the kind of window.
|
||||
@@ -200,6 +268,7 @@ Describes the kind of window.
|
||||
@GDK_WINDOW_DIALOG: useless/deprecated compatibility type
|
||||
@GDK_WINDOW_TEMP: override redirect temporary window (used to implement #GtkMenu)
|
||||
@GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
|
||||
@GDK_WINDOW_OFFSCREEN: offscreen window (see <xref linkend="OFFSCREEN-WINDOWS"/>). Since 2.18
|
||||
|
||||
<!-- ##### ENUM GdkWindowClass ##### -->
|
||||
<para>
|
||||
@@ -685,6 +754,15 @@ Deprecated equivalent of g_object_unref()
|
||||
@dy:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_ensure_native ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_reparent ##### -->
|
||||
<para>
|
||||
|
||||
@@ -1200,6 +1278,15 @@ window.
|
||||
@cursor:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_cursor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_window_set_colormap ##### -->
|
||||
<para>
|
||||
Deprecated equivalent to gdk_drawable_set_colormap()
|
||||
@@ -1384,6 +1471,18 @@ Deprecated equivalent of gdk_drawable_get_type().
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_root_coords ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@root_x:
|
||||
@root_y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_pointer ##### -->
|
||||
<para>
|
||||
|
||||
@@ -1659,12 +1758,39 @@ Applications should never have any reason to use this facility
|
||||
@Returns:
|
||||
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-docs.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
<!-- ##### FUNCTION gdk_offscreen_window_get_pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_offscreen_window_set_embedder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@embedder:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_offscreen_window_get_embedder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_geometry_changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_redirect_to_drawable ##### -->
|
||||
@@ -1690,3 +1816,11 @@ End:
|
||||
@window:
|
||||
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-docs.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
|
||||
@@ -129,17 +129,19 @@ content_files = \
|
||||
drawing-model.xml \
|
||||
glossary.xml \
|
||||
migrating-checklist.sgml \
|
||||
migrating-ClientSideWindows.sgml \
|
||||
migrating-GtkAboutDialog.sgml \
|
||||
migrating-GtkAction.sgml \
|
||||
migrating-GtkAssistant.sgml \
|
||||
migrating-GtkBuilder.sgml \
|
||||
migrating-GtkColorButton.sgml \
|
||||
migrating-GtkComboBox.sgml \
|
||||
migrating-GtkEntry-icons.sgml \
|
||||
migrating-GtkFileChooser.sgml \
|
||||
migrating-GtkIconView.sgml \
|
||||
migrating-GtkAboutDialog.sgml \
|
||||
migrating-GtkColorButton.sgml \
|
||||
migrating-GtkAssistant.sgml \
|
||||
migrating-GtkRecentChooser.sgml \
|
||||
migrating-GtkLabel-links.sgml \
|
||||
migrating-GtkLinkButton.sgml \
|
||||
migrating-GtkBuilder.sgml \
|
||||
migrating-GtkRecentChooser.sgml \
|
||||
migrating-GtkTooltip.sgml \
|
||||
objects_grouped.sgml \
|
||||
osx.sgml \
|
||||
@@ -158,6 +160,7 @@ expand_content_files = \
|
||||
drawing-model.xml \
|
||||
glossary.xml \
|
||||
migrating-checklist.sgml \
|
||||
migrating-ClientSideWindows.sgml \
|
||||
migrating-GtkAction.sgml \
|
||||
migrating-GtkComboBox.sgml \
|
||||
migrating-GtkEntry-icons.sgml \
|
||||
@@ -167,6 +170,7 @@ expand_content_files = \
|
||||
migrating-GtkColorButton.sgml \
|
||||
migrating-GtkAssistant.sgml \
|
||||
migrating-GtkRecentChooser.sgml \
|
||||
migrating-GtkLabel-links.sgml \
|
||||
migrating-GtkLinkButton.sgml \
|
||||
migrating-GtkBuilder.sgml \
|
||||
migrating-GtkTooltip.sgml \
|
||||
@@ -377,3 +381,5 @@ dist-hook-local: $(BUILT_EXTRA_DIST)
|
||||
for f in $$files; do \
|
||||
if test -f $$f; then d=.; else d=$(srcdir); fi; \
|
||||
cp $$d/$$f $(distdir) || exit 1; done
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -159,6 +159,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtklabel.xml" />
|
||||
<xi:include href="xml/gtkprogressbar.xml" />
|
||||
<xi:include href="xml/gtkstatusbar.xml" />
|
||||
<xi:include href="xml/gtkinfobar.xml" />
|
||||
<xi:include href="xml/gtkstatusicon.xml" />
|
||||
</chapter>
|
||||
|
||||
@@ -176,6 +177,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<chapter id="NumericEntry">
|
||||
<title>Numeric/Text Data Entry</title>
|
||||
<xi:include href="xml/gtkentry.xml" />
|
||||
<xi:include href="xml/gtkentrybuffer.xml" />
|
||||
<xi:include href="xml/gtkentrycompletion.xml" />
|
||||
<xi:include href="xml/gtkhscale.xml" />
|
||||
<xi:include href="xml/gtkvscale.xml" />
|
||||
@@ -432,6 +434,8 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/migrating-GtkBuilder.sgml" />
|
||||
<xi:include href="xml/migrating-GtkTooltip.sgml" />
|
||||
<xi:include href="xml/migrating-GtkEntry-icons.sgml" />
|
||||
<xi:include href="xml/migrating-GtkLabel-links.sgml" />
|
||||
<xi:include href="xml/migrating-ClientSideWindows.sgml" />
|
||||
</part>
|
||||
|
||||
<part>
|
||||
@@ -483,4 +487,8 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<title>Index of new symbols in 2.16</title>
|
||||
<xi:include href="xml/api-index-2.16.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-18" role="2.18">
|
||||
<title>Index of new symbols in 2.18</title>
|
||||
<xi:include href="xml/api-index-2.18.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
</book>
|
||||
|
||||
@@ -1268,7 +1268,10 @@ gtk_old_editable_get_type
|
||||
<TITLE>GtkEntry</TITLE>
|
||||
GtkEntry
|
||||
gtk_entry_new
|
||||
gtk_entry_new_with_buffer
|
||||
gtk_entry_new_with_max_length
|
||||
gtk_entry_get_buffer
|
||||
gtk_entry_set_buffer
|
||||
gtk_entry_set_text
|
||||
gtk_entry_append_text
|
||||
gtk_entry_prepend_text
|
||||
@@ -1342,6 +1345,34 @@ GTK_ENTRY_GET_CLASS
|
||||
gtk_entry_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkentrybuffer</FILE>
|
||||
<TITLE>GtkEntryBuffer</TITLE>
|
||||
GtkEntryBuffer
|
||||
gtk_entry_buffer_new
|
||||
gtk_entry_buffer_get_text
|
||||
gtk_entry_buffer_set_text
|
||||
gtk_entry_buffer_get_bytes
|
||||
gtk_entry_buffer_get_length
|
||||
gtk_entry_buffer_get_max_length
|
||||
gtk_entry_buffer_set_max_length
|
||||
gtk_entry_buffer_insert_text
|
||||
gtk_entry_buffer_delete_text
|
||||
gtk_entry_buffer_emit_deleted_text
|
||||
gtk_entry_buffer_emit_inserted_text
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_ENTRY_BUFFER
|
||||
GTK_IS_ENTRY_BUFFER
|
||||
GTK_TYPE_ENTRY_BUFFER
|
||||
GTK_ENTRY_BUFFER_CLASS
|
||||
GTK_IS_ENTRY_BUFFER_CLASS
|
||||
GTK_ENTRY_BUFFER_GET_CLASS
|
||||
GTK_ENTRY_BUFFER_MAX_SIZE
|
||||
<SUBSECTION Private>
|
||||
gtk_entry_buffer_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkentrycompletion</FILE>
|
||||
<TITLE>GtkEntryCompletion</TITLE>
|
||||
@@ -1452,6 +1483,8 @@ gtk_file_chooser_set_show_hidden
|
||||
gtk_file_chooser_get_show_hidden
|
||||
gtk_file_chooser_set_do_overwrite_confirmation
|
||||
gtk_file_chooser_get_do_overwrite_confirmation
|
||||
gtk_file_chooser_set_create_folders
|
||||
gtk_file_chooser_get_create_folders
|
||||
gtk_file_chooser_set_current_name
|
||||
gtk_file_chooser_get_filename
|
||||
gtk_file_chooser_set_filename
|
||||
@@ -1939,6 +1972,8 @@ gtk_icon_view_set_column_spacing
|
||||
gtk_icon_view_get_column_spacing
|
||||
gtk_icon_view_set_margin
|
||||
gtk_icon_view_get_margin
|
||||
gtk_icon_view_set_item_padding
|
||||
gtk_icon_view_get_item_padding
|
||||
gtk_icon_view_select_path
|
||||
gtk_icon_view_unselect_path
|
||||
gtk_icon_view_path_is_selected
|
||||
@@ -2274,6 +2309,9 @@ gtk_label_set_use_markup
|
||||
gtk_label_set_use_underline
|
||||
gtk_label_set_single_line_mode
|
||||
gtk_label_set_angle
|
||||
gtk_label_get_current_uri
|
||||
gtk_label_set_track_visited_links
|
||||
gtk_label_get_track_visited_links
|
||||
<SUBSECTION Standard>
|
||||
GTK_LABEL
|
||||
GTK_IS_LABEL
|
||||
@@ -2419,6 +2457,8 @@ gtk_menu_get_title
|
||||
gtk_menu_set_monitor
|
||||
gtk_menu_get_monitor
|
||||
gtk_menu_get_tearoff_state
|
||||
gtk_menu_set_reserve_toggle_size
|
||||
gtk_menu_get_reserve_toggle_size
|
||||
<SUBSECTION>
|
||||
gtk_menu_popdown
|
||||
gtk_menu_reposition
|
||||
@@ -2587,6 +2627,37 @@ GTK_MESSAGE_DIALOG_GET_CLASS
|
||||
gtk_message_dialog_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkinfobar</FILE>
|
||||
<TITLE>GtkInfoBar</TITLE>
|
||||
GtkInfoBar
|
||||
gtk_info_bar_new
|
||||
gtk_info_bar_new_with_buttons
|
||||
gtk_info_bar_set_contents
|
||||
gtk_info_bar_add_action_widget
|
||||
gtk_info_bar_add_button
|
||||
gtk_info_bar_add_buttons
|
||||
gtk_info_bar_set_response_sensitive
|
||||
gtk_info_bar_set_default_response
|
||||
gtk_info_bar_response
|
||||
gtk_info_bar_set_message_type
|
||||
gtk_info_bar_get_message_type
|
||||
gtk_info_bar_get_action_area
|
||||
gtk_info_bar_get_content_area
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_INFO_BAR
|
||||
GTK_INFO_BAR
|
||||
GTK_INFO_BAR_CLASS
|
||||
GTK_IS_INFO_BAR
|
||||
GTK_IS_INFO_BAR_CLASS
|
||||
GTK_INFO_BAR_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_info_bar_get_type
|
||||
GtkMessageAreaPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkmisc</FILE>
|
||||
<TITLE>GtkMisc</TITLE>
|
||||
@@ -3003,6 +3074,8 @@ gtk_range_set_lower_stepper_sensitivity
|
||||
gtk_range_get_lower_stepper_sensitivity
|
||||
gtk_range_set_upper_stepper_sensitivity
|
||||
gtk_range_get_upper_stepper_sensitivity
|
||||
gtk_range_get_flippable
|
||||
gtk_range_set_flippable
|
||||
<SUBSECTION Standard>
|
||||
GTK_RANGE
|
||||
GTK_IS_RANGE
|
||||
@@ -3563,6 +3636,8 @@ gtk_status_icon_set_tooltip_markup
|
||||
gtk_status_icon_get_tooltip_markup
|
||||
gtk_status_icon_set_has_tooltip
|
||||
gtk_status_icon_get_has_tooltip
|
||||
gtk_status_icon_set_title
|
||||
gtk_status_icon_get_title
|
||||
gtk_status_icon_set_visible
|
||||
gtk_status_icon_get_visible
|
||||
gtk_status_icon_set_blinking
|
||||
@@ -4959,6 +5034,14 @@ gtk_cell_renderer_editing_canceled
|
||||
gtk_cell_renderer_stop_editing
|
||||
gtk_cell_renderer_get_fixed_size
|
||||
gtk_cell_renderer_set_fixed_size
|
||||
gtk_cell_renderer_get_visible
|
||||
gtk_cell_renderer_set_visible
|
||||
gtk_cell_renderer_get_sensitive
|
||||
gtk_cell_renderer_set_sensitive
|
||||
gtk_cell_renderer_get_alignment
|
||||
gtk_cell_renderer_set_alignment
|
||||
gtk_cell_renderer_get_padding
|
||||
gtk_cell_renderer_set_padding
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_RENDERER
|
||||
@@ -5064,6 +5147,9 @@ gtk_cell_renderer_toggle_get_radio
|
||||
gtk_cell_renderer_toggle_set_radio
|
||||
gtk_cell_renderer_toggle_get_active
|
||||
gtk_cell_renderer_toggle_set_active
|
||||
gtk_cell_renderer_toggle_get_activatable
|
||||
gtk_cell_renderer_toggle_set_activatable
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_RENDERER_TOGGLE
|
||||
GTK_IS_CELL_RENDERER_TOGGLE
|
||||
@@ -5493,6 +5579,28 @@ gtk_widget_set_has_tooltip
|
||||
gtk_widget_trigger_tooltip_query
|
||||
gtk_widget_get_snapshot
|
||||
gtk_widget_get_window
|
||||
gtk_widget_get_allocation
|
||||
gtk_widget_set_allocation
|
||||
gtk_widget_get_app_paintable
|
||||
gtk_widget_get_can_default
|
||||
gtk_widget_set_can_default
|
||||
gtk_widget_get_can_focus
|
||||
gtk_widget_set_can_focus
|
||||
gtk_widget_get_double_buffered
|
||||
gtk_widget_get_has_window
|
||||
gtk_widget_set_has_window
|
||||
gtk_widget_get_sensitive
|
||||
gtk_widget_is_sensitive
|
||||
gtk_widget_get_state
|
||||
gtk_widget_get_visible
|
||||
gtk_widget_set_visible
|
||||
gtk_widget_has_default
|
||||
gtk_widget_has_focus
|
||||
gtk_widget_has_grab
|
||||
gtk_widget_is_drawable
|
||||
gtk_widget_is_toplevel
|
||||
gtk_widget_set_window
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_requisition_copy
|
||||
gtk_requisition_free
|
||||
@@ -6518,6 +6626,7 @@ gtk_print_operation_set_print_settings
|
||||
gtk_print_operation_get_print_settings
|
||||
gtk_print_operation_set_job_name
|
||||
gtk_print_operation_set_n_pages
|
||||
gtk_print_operation_get_n_pages_to_print
|
||||
gtk_print_operation_set_current_page
|
||||
gtk_print_operation_set_use_full_page
|
||||
gtk_print_operation_set_unit
|
||||
@@ -6532,6 +6641,12 @@ gtk_print_operation_set_defer_drawing
|
||||
gtk_print_operation_get_status
|
||||
gtk_print_operation_get_status_string
|
||||
gtk_print_operation_is_finished
|
||||
gtk_print_operation_set_support_selection
|
||||
gtk_print_operation_get_support_selection
|
||||
gtk_print_operation_set_has_selection
|
||||
gtk_print_operation_get_has_selection
|
||||
gtk_print_operation_set_embed_page_setup
|
||||
gtk_print_operation_get_embed_page_setup
|
||||
gtk_print_run_page_setup_dialog
|
||||
GtkPageSetupDoneFunc
|
||||
gtk_print_run_page_setup_dialog_async
|
||||
@@ -6576,8 +6691,16 @@ gtk_print_unix_dialog_set_settings
|
||||
gtk_print_unix_dialog_get_settings
|
||||
gtk_print_unix_dialog_get_selected_printer
|
||||
gtk_print_unix_dialog_add_custom_tab
|
||||
gtk_print_unix_dialog_set_support_selection
|
||||
gtk_print_unix_dialog_get_support_selection
|
||||
gtk_print_unix_dialog_set_has_selection
|
||||
gtk_print_unix_dialog_get_has_selection
|
||||
gtk_print_unix_dialog_set_embed_page_setup
|
||||
gtk_print_unix_dialog_get_embed_page_setup
|
||||
gtk_print_unix_dialog_get_page_setup_set
|
||||
GtkPrintCapabilities
|
||||
gtk_print_unix_dialog_set_manual_capabilities
|
||||
gtk_print_unix_dialog_get_manual_capabilities
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_PRINT_UNIX_DIALOG
|
||||
|
||||
@@ -48,6 +48,7 @@ gtk_curve_get_type
|
||||
gtk_dialog_get_type
|
||||
gtk_drawing_area_get_type
|
||||
gtk_editable_get_type
|
||||
gtk_entry_buffer_get_type
|
||||
gtk_entry_completion_get_type
|
||||
gtk_entry_get_type
|
||||
gtk_event_box_get_type
|
||||
@@ -81,6 +82,7 @@ gtk_image_menu_item_get_type
|
||||
gtk_im_context_get_type
|
||||
gtk_im_context_simple_get_type
|
||||
gtk_im_multicontext_get_type
|
||||
gtk_info_bar_get_type
|
||||
gtk_input_dialog_get_type
|
||||
gtk_invisible_get_type
|
||||
gtk_item_factory_get_type
|
||||
|
||||
42
docs/reference/gtk/migrating-ClientSideWindows.sgml
Normal file
42
docs/reference/gtk/migrating-ClientSideWindows.sgml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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-ClientSideWindows">
|
||||
|
||||
<title>Migrating to client-side windows</title>
|
||||
|
||||
<para>
|
||||
In version 2.18, GDK has been changed to use client-side windows. This
|
||||
means that there is no longer a 1-1 correspondence between #GdkWindows
|
||||
and windows in the underlying window system. In particular, it is no
|
||||
longer correct to assume that each window has an associated XID.
|
||||
Code that makes this assumption can sometimes be fixed by calling
|
||||
gdk_window_ensure_native() on the windows in question.
|
||||
Calling gdk_x11_drawable_get_xid() from the X11-specific API on a
|
||||
non-native window will explicitly call gdk_window_ensure_native(),
|
||||
so old code using this will continue to work.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK looks for the <envar>GDK_NATIVE_WINDOWS</envar> environment variable
|
||||
and makes all windows native if it is set. It also tries to be more
|
||||
compatible with the way prior versions worked in some other ways.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Some applications assume that they can just operate on the X windows
|
||||
corresponding to their GDK windows without ever telling GDK. One
|
||||
example that we've seen is changing the child window stacking order
|
||||
using XRestackWindows(). Fixing this properly requires to fix the code
|
||||
to use GDK functions to achieve whatever it is trying to achieve.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One change that can cause problems for some applications is that GDK
|
||||
is more aggressive about optimizing away expose events. Code that does
|
||||
more than just repainting exposed areas in response to expose events
|
||||
may be affected by this.
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
@@ -13,21 +13,18 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A good way to start a migration from libglade to GtkBuilder is
|
||||
to run the <link linkend="gtk-builder-convert">gtk-builder-convert</link>
|
||||
utility on your glade file, and inspect the resulting output.
|
||||
If your code uses the @root parameter of glade_xml_new(), you
|
||||
may want to split your glade file into multiple GtkBuilder files
|
||||
by using the <option>--root</option> option of
|
||||
<application>gtk-builder-convert</application>. Alternatively, you
|
||||
can use gtk_builder_add_objects_from_file() to construct only certain
|
||||
A good way to start a migration from libglade to GtkBuilder is using
|
||||
<application>glade3</application> to convert your .glade file.
|
||||
If your code uses the @root parameter of glade_xml_new(),
|
||||
you can use gtk_builder_add_objects_from_file() to construct only certain
|
||||
objects from a GtkBuilder file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Alternatively, you can open the glade file with
|
||||
<application>glade3</application> and then save it in GtkBuilder
|
||||
format. This is supported by glade3 since version 3.6.
|
||||
Alternatively, GTK+ also offers the
|
||||
<link linkend="gtk-builder-convert">gtk-builder-convert</link> script you can use
|
||||
to do the conversion; in which case you should be careful to inspect the output
|
||||
and make sure you didn't lose any data.
|
||||
</para>
|
||||
|
||||
<table pgwide="1" frame="topbot">
|
||||
@@ -53,7 +50,7 @@ GError* error = NULL;
|
||||
GtkBuilder* builder = gtk_builder_new (<!-- -->);
|
||||
if (!gtk_builder_add_from_file (builder, FILE, &error))
|
||||
{
|
||||
g_warning ("Couldn't load builder file: %s", error->message);
|
||||
g_warning ("Couldn't load builder file: %s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
</screen>
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<title>Migrating from SexyIconEntry to GtkEntry</title>
|
||||
|
||||
<para>
|
||||
GTK+ 2.16 supports showing icons inside a #GtkEntry, similar to
|
||||
SexyIconEntry. Porting from SexyIconEntry to GtkEntry is relatively
|
||||
straightforward. The main difference between the two APIs is that
|
||||
SexyIconEntry uses #GtkImage widgets in a somewhat awkward way as
|
||||
GTK+ 2.16 supports showing icons inside a #GtkEntry, similar to
|
||||
SexyIconEntry. Porting from SexyIconEntry to GtkEntry is relatively
|
||||
straightforward. The main difference between the two APIs is that
|
||||
SexyIconEntry uses #GtkImage widgets in a somewhat awkward way as
|
||||
storage vehicles for icons, while GtkEntry allows to specify icons
|
||||
via pixbufs, stock ids, icon names or #GIcons. So, if your code uses
|
||||
e.g.:
|
||||
@@ -130,7 +130,7 @@ text_changed_cb (GtkEntry *entry,
|
||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
GTK_STOCK_CLEAR);
|
||||
g_signal_connect (entry, "icon-pressed",
|
||||
g_signal_connect (entry, "icon-press",
|
||||
G_CALLBACK (icon_pressed_cb), NULL);
|
||||
g_signal_connect (entry, "notify::text",
|
||||
G_CALLBACK (text_changed_cb), find_button);
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<structname>GtkIconView</structname>:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<typename>GnomeIconListMode</typename> is replaced by the
|
||||
<type>GnomeIconListMode</type> is replaced by the
|
||||
<link linkend="GtkIconView--orientation">orientation</link>
|
||||
property of <structname>GtkIconView</structname>
|
||||
</para></listitem>
|
||||
|
||||
24
docs/reference/gtk/migrating-GtkLabel-links.sgml
Normal file
24
docs/reference/gtk/migrating-GtkLabel-links.sgml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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-label-links">
|
||||
|
||||
<title>Migrating from SexyUrlLabel to GtkLabel</title>
|
||||
|
||||
<para>
|
||||
GTK+ 2.18 supports showing links inside a #GtkLabel, similar to
|
||||
SexyUrlLabel. Porting from SexyUrlLabel to GtkLabel is relatively
|
||||
straightforward. GtkLabel accepts links in the markup using the
|
||||
same HTML <tag>a</tag> notation that SexyUrlLabel uses. In addition
|
||||
to the href attribute, GtkLabel accepts a title attribute that
|
||||
is displayed as a tooltip on the link. Instead of
|
||||
sexy_url_label_set_markup(), just call gtk_label_set_markup().
|
||||
</para>
|
||||
<para>
|
||||
One difference between the two APIs is that the ::url-activated signal
|
||||
from SexyUrlLabel has been replaced by the #GtkLabel::activate-link
|
||||
signal. The need for connecting to this signal is greatly reduced,
|
||||
since GtkLabel has a default handler that calls gtk_show_uri().
|
||||
</para>
|
||||
</chapter>
|
||||
@@ -341,6 +341,16 @@ nevertheless.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GDK_NATIVE_WINDOWS</envar></title>
|
||||
|
||||
<para>
|
||||
If set, GDK creates all windows as native windows. This can help
|
||||
applications that make assumptions about 1-1 correspondence between
|
||||
GDK windows and X11 windows.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
|
||||
|
||||
|
||||
106
docs/reference/gtk/tmpl/filesystem.sgml
Normal file
106
docs/reference/gtk/tmpl/filesystem.sgml
Normal file
@@ -0,0 +1,106 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Filesystem utilities
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkMountOperation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:is-showing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@parent:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_is_showing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_set_parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@parent:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_get_parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_show_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@uri:
|
||||
@timestamp:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -1033,6 +1033,25 @@ You may not attach these to signals created with the
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkEntryBufferClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@parent_class:
|
||||
@inserted_text:
|
||||
@deleted_text:
|
||||
@get_text:
|
||||
@get_length:
|
||||
@insert_text:
|
||||
@delete_text:
|
||||
@_gtk_reserved0:
|
||||
@_gtk_reserved1:
|
||||
@_gtk_reserved2:
|
||||
@_gtk_reserved3:
|
||||
@_gtk_reserved4:
|
||||
@_gtk_reserved5:
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:file-system ##### -->
|
||||
<para>
|
||||
|
||||
@@ -3866,14 +3885,6 @@ fundamental type.
|
||||
@group_cycling:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_allocation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_usize ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
98
docs/reference/gtk/tmpl/gtkactivatable.sgml
Normal file
98
docs/reference/gtk/tmpl/gtkactivatable.sgml
Normal file
@@ -0,0 +1,98 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkActivatable
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkActivatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkActivatable:related-action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkActivatable:use-action-appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GtkActivatableIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@g_iface:
|
||||
@update:
|
||||
@sync_action_properties:
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_do_set_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_get_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_get_use_action_appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_sync_action_properties ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_set_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_set_use_action_appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@use_appearance:
|
||||
|
||||
|
||||
@@ -282,3 +282,79 @@ it cannot be individually modified.
|
||||
@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:
|
||||
|
||||
|
||||
|
||||
@@ -103,3 +103,21 @@ property. When activated, it emits the toggled signal.
|
||||
@setting:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_get_activatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_set_activatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@setting:
|
||||
|
||||
|
||||
|
||||
@@ -173,6 +173,11 @@ The #GtkEntry-struct struct contains only private data.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntry:buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntry:caps-lock-warning ##### -->
|
||||
<para>
|
||||
|
||||
@@ -401,6 +406,15 @@ The #GtkEntry-struct struct contains only private data.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_new_with_buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_new_with_max_length ##### -->
|
||||
<para>
|
||||
</para>
|
||||
@@ -409,6 +423,24 @@ The #GtkEntry-struct struct contains only private data.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_get_buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entry:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_set_buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entry:
|
||||
@buffer:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_set_text ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
168
docs/reference/gtk/tmpl/gtkentrybuffer.sgml
Normal file
168
docs/reference/gtk/tmpl/gtkentrybuffer.sgml
Normal file
@@ -0,0 +1,168 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkEntryBuffer
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkEntryBuffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkEntryBuffer::deleted-text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entrybuffer: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GtkEntryBuffer::inserted-text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entrybuffer: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
|
||||
<!-- ##### ARG GtkEntryBuffer:length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryBuffer:max-length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryBuffer:text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@initial_chars:
|
||||
@n_initial_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_get_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_set_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@chars:
|
||||
@n_chars:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_get_bytes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_get_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_get_max_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_set_max_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@max_length:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_insert_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@position:
|
||||
@chars:
|
||||
@n_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_delete_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@position:
|
||||
@n_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_emit_deleted_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@position:
|
||||
@n_chars:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_emit_inserted_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@position:
|
||||
@chars:
|
||||
@n_chars:
|
||||
|
||||
|
||||
@@ -433,12 +433,12 @@ other, rather than vertically stacked
|
||||
|
||||
<!-- ##### ENUM GtkUpdateType ##### -->
|
||||
<para>
|
||||
|
||||
Used by #GtkRange to control the policy for notifying value changes.
|
||||
</para>
|
||||
|
||||
@GTK_UPDATE_CONTINUOUS:
|
||||
@GTK_UPDATE_DISCONTINUOUS:
|
||||
@GTK_UPDATE_DELAYED:
|
||||
@GTK_UPDATE_CONTINUOUS: Notify updates whenever the value changed
|
||||
@GTK_UPDATE_DISCONTINUOUS: Notify updates when the mouse button has been released
|
||||
@GTK_UPDATE_DELAYED: Space out updates with a small timeout
|
||||
|
||||
<!-- ##### ENUM GtkVisibility ##### -->
|
||||
<para>
|
||||
|
||||
@@ -677,6 +677,11 @@ gtk_widget_destroy (chooser);
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:create-folders ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:do-overwrite-confirmation ##### -->
|
||||
<para>
|
||||
|
||||
@@ -875,6 +880,24 @@ gtk_widget_destroy (chooser);
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_chooser_set_create_folders ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@create_folders:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_chooser_get_create_folders ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_chooser_set_current_name ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -109,6 +109,11 @@ private fields and should not be directly accessed.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkIconView:item-padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkIconView:item-width ##### -->
|
||||
<para>
|
||||
|
||||
@@ -491,6 +496,24 @@ selected rows. It will be called on every selected row in the view.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_icon_view_set_item_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon_view:
|
||||
@item_padding:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_icon_view_get_item_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon_view:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_icon_view_select_path ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
210
docs/reference/gtk/tmpl/gtkimcontext.sgml
Normal file
210
docs/reference/gtk/tmpl/gtkimcontext.sgml
Normal file
@@ -0,0 +1,210 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkIMContext
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkIMContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::commit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::delete-surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-end ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-start ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::retrieve-surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@Returns:
|
||||
|
||||
<!-- ##### STRUCT GtkIMContextClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@preedit_start:
|
||||
@preedit_end:
|
||||
@preedit_changed:
|
||||
@commit:
|
||||
@retrieve_surrounding:
|
||||
@delete_surrounding:
|
||||
@set_client_window:
|
||||
@get_preedit_string:
|
||||
@filter_keypress:
|
||||
@focus_in:
|
||||
@focus_out:
|
||||
@reset:
|
||||
@set_cursor_location:
|
||||
@set_use_preedit:
|
||||
@set_surrounding:
|
||||
@get_surrounding:
|
||||
|
||||
<!-- ##### STRUCT GtkIMContextInfo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context_id:
|
||||
@context_name:
|
||||
@domain:
|
||||
@domain_dirname:
|
||||
@default_locales:
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_client_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_get_preedit_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@str:
|
||||
@attrs:
|
||||
@cursor_pos:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_filter_keypress ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_focus_in ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_focus_out ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_reset ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_cursor_location ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@area:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_use_preedit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@use_preedit:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@text:
|
||||
@len:
|
||||
@cursor_index:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_get_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@text:
|
||||
@cursor_index:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_delete_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@offset:
|
||||
@n_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -162,6 +162,24 @@ aligns in its available space, see gtk_misc_set_alignment().
|
||||
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Links</title>
|
||||
|
||||
<para>
|
||||
Since 2.18, GTK+ supports markup for clickable hyperlinks in addition
|
||||
to regular Pango markup. The markup for links is borrowed from HTML, using the
|
||||
<tag>a</tag> with href and title attributes. GTK+ renders links similar to the
|
||||
way they appear in web browsers, with colored, underlined text. The title
|
||||
attribute is displayed as a tooltip on the link. An example looks like this:
|
||||
<informalexample><programlisting>
|
||||
gtk_label_set_markup (label, "Go to the <a href=\"http://www.gtk.org\" title=\"&lt;i&gt;Our&/i&gt; website\">GTK+ website</a> for more...");
|
||||
</programlisting></informalexample>
|
||||
It is possible to implement custom handling for links and their tooltips with
|
||||
the #GtkLabel::activate-link signal and the gtk_label_get_current_uri() function.
|
||||
</para>
|
||||
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
@@ -177,6 +195,22 @@ described below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkLabel::activate-current-link ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkLabel::activate-link ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label: the object which received the signal.
|
||||
@arg1:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkLabel::copy-clipboard ##### -->
|
||||
<para>
|
||||
|
||||
@@ -267,6 +301,11 @@ described below.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkLabel:track-visited-links ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkLabel:use-markup ##### -->
|
||||
<para>
|
||||
|
||||
@@ -703,3 +742,30 @@ Sets the text within the GtkLabel widget.
|
||||
@angle:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_label_get_current_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_label_set_track_visited_links ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@track_links:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_label_get_track_visited_links ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -119,6 +119,11 @@ should be accessed using the functions below.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:reserve-toggle-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:tearoff-state ##### -->
|
||||
<para>
|
||||
|
||||
@@ -354,6 +359,24 @@ See gtk_menu_set_accel_group().
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_reserve_toggle_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@reserve_toggle_size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_reserve_toggle_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_popdown ##### -->
|
||||
<para>
|
||||
Removes the menu from the screen.
|
||||
@@ -449,6 +472,8 @@ Returns the #GtkWidget that the menu is attached to.
|
||||
A user function supplied when calling gtk_menu_popup() which controls the
|
||||
positioning of the menu when it is displayed. The function sets the @x
|
||||
and @y parameters to the coordinates where the menu is to be drawn.
|
||||
To make the menu appear on a different monitor than the mouse pointer,
|
||||
gtk_menu_set_monitor() must be called.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
|
||||
@@ -19,19 +19,21 @@ A GtkToolItem containing a button with an additional dropdown menu
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parent class of #GtkMenuToolButton. The properties
|
||||
"label_widget", "label", "icon_widget", and "stock_id" on
|
||||
#GtkToolButton determine the label and icon used on
|
||||
#GtkMenuToolButton<!-- -->s.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parent class of #GtkMenuToolButton. The properties
|
||||
"label_widget", "label", "icon_widget", and "stock_id" on
|
||||
#GtkToolButton determine the label and icon used on
|
||||
#GtkMenuToolButton<!-- -->s.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
@@ -208,11 +208,21 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:embed-page-setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:export-filename ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:has-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:job-name ##### -->
|
||||
<para>
|
||||
|
||||
@@ -223,6 +233,11 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:n-pages-to-print ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:print-settings ##### -->
|
||||
<para>
|
||||
|
||||
@@ -243,6 +258,11 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:support-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:track-print-status ##### -->
|
||||
<para>
|
||||
|
||||
@@ -404,6 +424,15 @@ The #GQuark used for #GtkPrintError errors.
|
||||
@n_pages:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_get_n_pages_to_print ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_set_current_page ##### -->
|
||||
<para>
|
||||
|
||||
@@ -530,6 +559,60 @@ The #GQuark used for #GtkPrintError errors.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_set_support_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@support_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_get_support_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_set_has_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@has_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_get_has_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_set_embed_page_setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@embed:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_get_embed_page_setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_run_page_setup_dialog ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -717,6 +717,7 @@ multiple pages per sheet.
|
||||
@GTK_PRINT_PAGES_ALL:
|
||||
@GTK_PRINT_PAGES_CURRENT:
|
||||
@GTK_PRINT_PAGES_RANGES:
|
||||
@GTK_PRINT_PAGES_SELECTION:
|
||||
|
||||
<!-- ##### MACRO GTK_PRINT_SETTINGS_PRINT_PAGES ##### -->
|
||||
<para>
|
||||
|
||||
@@ -90,6 +90,21 @@ The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:embed-page-setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:has-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:manual-capabilities ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:page-setup ##### -->
|
||||
<para>
|
||||
|
||||
@@ -105,6 +120,11 @@ The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:support-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_new ##### -->
|
||||
<para>
|
||||
|
||||
@@ -188,6 +208,69 @@ The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
|
||||
@tab_label:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_set_support_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@support_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_support_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_set_has_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@has_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_has_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_set_embed_page_setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@embed:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_embed_page_setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_page_setup_set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkPrintCapabilities ##### -->
|
||||
<para>
|
||||
An enum for specifying which features the print dialog should offer.
|
||||
@@ -220,3 +303,12 @@ formats are supported.
|
||||
@capabilities:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_manual_capabilities ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -346,3 +346,21 @@ at the end of range widgets.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_range_get_flippable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@range:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_range_set_flippable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@range:
|
||||
@flippable:
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,35 @@ Sharing settings between applications
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
GtkSettings provide a mechanism to share global settings between applications.
|
||||
On the X window system, this sharing is realized by an <ulink href="http://www.freedesktop.org/wiki/Specifications/xsettings-spec">XSettings</ulink>
|
||||
manager that is usually part of the desktop environment, along with utilities
|
||||
that let the user change these settings. In the absence of an Xsettings manager,
|
||||
settings can also be specified in RC files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Applications can override system-wide settings with gtk_settings_set_string_property(),
|
||||
gtk_settings_set_long_property(), etc. This should be restricted to special
|
||||
cases though; GtkSettings are not meant as an application configuration
|
||||
facility. When doing so, you need to be aware that settings that are specific
|
||||
to individual widgets may not be available before the widget type has been
|
||||
realized at least once. The following example demonstrates a way to do this:
|
||||
<informalexample><programlisting>
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* make sure the type is realized */
|
||||
g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));
|
||||
|
||||
g_object_set (gtk_settings_get_default (), "gtk-menu-images", FALSE, NULL);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There is one GtkSettings instance per screen. It can be obtained with
|
||||
gtk_settings_get_for_screen(), but in many cases, it is more convenient
|
||||
to use gtk_widget_get_settings(). gtk_settings_get_default() returns the
|
||||
GtkSettings instance for the default screen.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
@@ -172,6 +172,11 @@ on Win32 doesn't allow to embed arbitrary widgets.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:tooltip-markup ##### -->
|
||||
<para>
|
||||
|
||||
@@ -420,6 +425,24 @@ on Win32 doesn't allow to embed arbitrary widgets.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@title:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_visible ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -19,25 +19,27 @@ A GtkToolItem containing a toggle button
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
<para>
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parent class of #GtkToggleToolButton. The properties
|
||||
"label_widget", "label", "icon_widget", and "stock_id" on
|
||||
#GtkToolButton determine the label and icon used on
|
||||
#GtkToggleToolButton<!-- -->s.
|
||||
</para>
|
||||
</listitem>
|
||||
<term>#GtkSeparatorToolItem</term>
|
||||
<listitem>
|
||||
<para>A subclass of #GtkToolItem that separates groups of
|
||||
items on a toolbar.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parent class of #GtkToggleToolButton. The properties
|
||||
"label_widget", "label", "icon_widget", and "stock_id" on
|
||||
#GtkToolButton determine the label and icon used on
|
||||
#GtkToggleToolButton<!-- -->s.
|
||||
</para>
|
||||
</listitem>
|
||||
<term>#GtkSeparatorToolItem</term>
|
||||
<listitem>
|
||||
<para>A subclass of #GtkToolItem that separates groups of
|
||||
items on a toolbar.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
@@ -12,23 +12,6 @@ GtkToolItem
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem><para>A subclass of #GtkToolItem that displays buttons on
|
||||
the toolbar</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkSeparatorToolItem</term>
|
||||
<listitem><para>A subclass of #GtkToolItem that separates groups of
|
||||
items on a toolbar</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
80
docs/reference/gtk/tmpl/gtktoolshell.sgml
Normal file
80
docs/reference/gtk/tmpl/gtktoolshell.sgml
Normal file
@@ -0,0 +1,80 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkToolShell
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkToolShell ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkToolShellIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@get_icon_size:
|
||||
@get_orientation:
|
||||
@get_style:
|
||||
@get_relief_style:
|
||||
@rebuild_menu:
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_icon_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_orientation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_relief_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_rebuild_menu ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
|
||||
|
||||
@@ -112,6 +112,11 @@ calling gtk_tree_view_column_set_cell_data_func()
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTreeViewColumn:sort-column-id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTreeViewColumn:sort-indicator ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -693,6 +693,11 @@ internal child "accessible" of a <structname>GtkWidget</structname>.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkWidget:double-buffered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkWidget:events ##### -->
|
||||
<para>
|
||||
|
||||
@@ -2636,6 +2641,195 @@ This function is deprecated; it does nothing.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_allocation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@allocation:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_allocation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@allocation:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_app_paintable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_can_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_can_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@can_default:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_can_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_can_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@can_focus:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_double_buffered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_has_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_has_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@has_window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_is_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@visible:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_has_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_has_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_has_grab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_is_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_is_toplevel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_requisition_copy ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -32,3 +32,5 @@ content_files =
|
||||
HTML_IMAGES =
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -40,3 +40,5 @@ clean-local:
|
||||
*) rm -f $$file ;; \
|
||||
esac ; \
|
||||
done
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -72,3 +72,5 @@ dist-hook:
|
||||
echo "***"
|
||||
endif
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -37,14 +37,14 @@ source code release of GTK+. For binary distributions, please check with
|
||||
your vendor.</para>
|
||||
|
||||
<para>A copy is available online for reference at <ulink
|
||||
url="http://www.gtk.org/tutorial/">http://www.gtk.org/tutorial</ulink>.</para>
|
||||
url="http://www.gtk.org/documentation.html#Tutorials">http://www.gtk.org/documentation.html#Tutorials</ulink>. You can also find other GTK+ tutorials there.</para>
|
||||
|
||||
<para>A packaged verion of this tutorial is available from
|
||||
<para>A packaged version of this tutorial is available from
|
||||
<ulink url="ftp://ftp.gtk.org/pub/gtk/tutorial/">
|
||||
ftp://ftp.gtk.org/pub/gtk/tutorial</ulink> which contains the tutorial in
|
||||
various different formats. This
|
||||
package is primary for those people wanting to have the tutorial
|
||||
available for offline reference and for printing.</para>
|
||||
various different formats. This package is primary for those people wanting
|
||||
to have the tutorial available for offline reference and for printing. Note
|
||||
that the packaged version may be older than the online version.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
|
||||
@@ -718,3 +718,5 @@ gdk-pixbuf.loaders:
|
||||
echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
|
||||
touch gdk-pixbuf.loaders;
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -277,6 +277,13 @@ correct_prefix (gchar **path)
|
||||
if (strncmp (*path, GTK_PREFIX "/", strlen (GTK_PREFIX "/")) == 0 ||
|
||||
strncmp (*path, GTK_PREFIX "\\", strlen (GTK_PREFIX "\\")) == 0)
|
||||
{
|
||||
gchar *tem = NULL;
|
||||
if (strlen(*path) > 5 && strncmp (*path - 5, ".libs", 5) == 0)
|
||||
{
|
||||
/* We are being run from inside the build tree, and shouldn't mess about. */
|
||||
return;
|
||||
}
|
||||
|
||||
/* This is an entry put there by gdk-pixbuf-query-loaders on the
|
||||
* packager's system. On Windows a prebuilt GTK+ package can be
|
||||
* installed in a random location. The gdk-pixbuf.loaders file
|
||||
@@ -284,7 +291,7 @@ correct_prefix (gchar **path)
|
||||
* builder's machine. Replace the build-time prefix with the
|
||||
* installation prefix on this machine.
|
||||
*/
|
||||
gchar *tem = *path;
|
||||
tem = *path;
|
||||
*path = g_strconcat (get_toplevel (), tem + strlen (GTK_PREFIX), NULL);
|
||||
g_free (tem);
|
||||
}
|
||||
@@ -2452,14 +2459,14 @@ gchar *
|
||||
gdk_pixbuf_format_get_description (GdkPixbufFormat *format)
|
||||
{
|
||||
gchar *domain;
|
||||
gchar *description;
|
||||
const gchar *description;
|
||||
g_return_val_if_fail (format != NULL, NULL);
|
||||
|
||||
if (format->domain != NULL)
|
||||
domain = format->domain;
|
||||
else
|
||||
domain = GETTEXT_PACKAGE;
|
||||
description = dgettext (domain, format->description);
|
||||
description = g_dgettext (domain, format->description);
|
||||
|
||||
return g_strdup (description);
|
||||
}
|
||||
|
||||
@@ -428,9 +428,10 @@ gdk_pixbuf_from_pixdata (const GdkPixdata *pixdata,
|
||||
{
|
||||
g_set_error (error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
|
||||
ngettext("failed to allocate image buffer of %u byte",
|
||||
"failed to allocate image buffer of %u bytes",
|
||||
pixdata->rowstride * pixdata->height),
|
||||
g_dngettext(GETTEXT_PACKAGE,
|
||||
"failed to allocate image buffer of %u byte",
|
||||
"failed to allocate image buffer of %u bytes",
|
||||
pixdata->rowstride * pixdata->height),
|
||||
pixdata->rowstride * pixdata->height);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,6 @@ gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
|
||||
if (!hg)
|
||||
return NULL;
|
||||
|
||||
IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
|
||||
hr = CreateStreamOnHGlobal (hg, FALSE, (LPSTREAM *)&stream);
|
||||
|
||||
if (!SUCCEEDED (hr)) {
|
||||
@@ -361,7 +360,9 @@ gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
|
||||
GlobalFree (hg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
|
||||
|
||||
status = GdipCreateBitmapFromStream (stream, &bitmap);
|
||||
|
||||
if (Ok != status)
|
||||
|
||||
@@ -220,7 +220,7 @@ gif_read (GifContext *context, guchar *buffer, size_t len)
|
||||
G_FILE_ERROR,
|
||||
g_file_error_from_errno (save_errno),
|
||||
_("Failure reading GIF: %s"),
|
||||
strerror (save_errno));
|
||||
g_strerror (save_errno));
|
||||
}
|
||||
|
||||
#ifdef IO_GIFDEBUG
|
||||
|
||||
@@ -468,7 +468,6 @@ gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
jerr.pub.error_exit = fatal_error_handler;
|
||||
jerr.pub.output_message = output_message_handler;
|
||||
|
||||
jerr.error = error;
|
||||
|
||||
if (sigsetjmp (jerr.setjmp_buffer, 1)) {
|
||||
@@ -1190,11 +1189,11 @@ real_save_jpeg (GdkPixbuf *pixbuf,
|
||||
}
|
||||
|
||||
/* set up error handling */
|
||||
cinfo.err = jpeg_std_error (&(jerr.pub));
|
||||
jerr.pub.error_exit = fatal_error_handler;
|
||||
jerr.pub.output_message = output_message_handler;
|
||||
jerr.error = error;
|
||||
|
||||
cinfo.err = jpeg_std_error (&(jerr.pub));
|
||||
if (sigsetjmp (jerr.setjmp_buffer, 1)) {
|
||||
jpeg_destroy_compress (&cinfo);
|
||||
g_free (buf);
|
||||
|
||||
@@ -15,11 +15,12 @@ GDK_PIXBUF_VER = 2.0
|
||||
# but not yet -DINCLUDE_png
|
||||
##USEGDIP=1
|
||||
# to get _working_ include modules we need respective defines ...
|
||||
#
|
||||
BUILT_IN_FORMATS = \
|
||||
!IFDEF USEGDIP
|
||||
-DINCLUDE_gdiplus \
|
||||
!ELSE
|
||||
-DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_tiff \
|
||||
-DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_tiff \
|
||||
!ENDIF
|
||||
-DINCLUDE_png \
|
||||
-DINCLUDE_xpm -DINCLUDE_wbmp \
|
||||
|
||||
@@ -30,3 +30,5 @@ EXTRA_DIST += \
|
||||
DETAILS \
|
||||
pixbuf-transform-math.ltx \
|
||||
makefile.msc
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -120,6 +120,7 @@ gdk_c_sources = \
|
||||
gdkintl.h \
|
||||
gdkkeys.c \
|
||||
gdkkeyuni.c \
|
||||
gdkoffscreenwindow.c \
|
||||
gdkpango.c \
|
||||
gdkpixbuf-drawable.c \
|
||||
gdkpixbuf-render.c \
|
||||
@@ -151,10 +152,10 @@ gdk_built_sources = \
|
||||
gdkincludedir = $(includedir)/gtk-2.0/gdk
|
||||
gdkinclude_HEADERS = $(gdk_public_h_sources) $(gdk_built_public_sources)
|
||||
|
||||
# gdkmarshalers.c is not here because it is currently an empty file
|
||||
common_sources = \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkmarshalers.c \
|
||||
gdkmarshalers.h
|
||||
|
||||
libgdk_directfb_2_0_la_SOURCES = $(common_sources)
|
||||
@@ -268,11 +269,11 @@ gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.c.template
|
||||
# Marshaller generation
|
||||
#
|
||||
gdkmarshalers.h: @REBUILD@ gdkmarshalers.list
|
||||
$(GLIB_GENMARSHAL) --prefix=gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
|
||||
$(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
|
||||
&& mv gdkmarshalers-h.tmp gdkmarshalers.h \
|
||||
|| ( rm -f gdkmarshalers-h.tmp && exit 1)
|
||||
gdkmarshalers.c: @REBUILD@ gdkmarshalers.list
|
||||
(echo "#include \"gdkalias.h\""; $(GLIB_GENMARSHAL) --prefix=gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
|
||||
(echo "#include \"gdkalias.h\""; $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
|
||||
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|
||||
|| ( rm -f gdkmarshalers-c.tmp && exit 1 )
|
||||
|
||||
@@ -303,3 +304,5 @@ files:
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
echo $$p; \
|
||||
done
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -56,3 +56,5 @@ libgdkinclude_HEADERS = \
|
||||
|
||||
|
||||
EXTRA_DIST += AUTHORS README TODO
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -57,9 +57,8 @@ const GOptionEntry _gdk_windowing_args[] =
|
||||
{ NULL}
|
||||
};
|
||||
|
||||
/**
|
||||
Main entry point for gdk in 2.6 args are parsed
|
||||
**/
|
||||
/* Main entry point for gdk in 2.6 args are parsed
|
||||
*/
|
||||
GdkDisplay * gdk_display_open (const gchar *display_name)
|
||||
{
|
||||
IDirectFB *directfb;
|
||||
@@ -378,16 +377,18 @@ gdk_directfb_pointer_ungrab (guint32 time,
|
||||
g_object_unref (old_grab_window);
|
||||
}
|
||||
|
||||
gint
|
||||
gdk_display_pointer_is_grabbed (GdkDisplay *display)
|
||||
{
|
||||
return _gdk_directfb_pointer_grab_window != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_display_pointer_ungrab (GdkDisplay *display,guint32 time)
|
||||
gdk_display_pointer_ungrab (GdkDisplay *display,
|
||||
guint32 time)
|
||||
{
|
||||
gdk_directfb_pointer_ungrab (time, _gdk_directfb_pointer_implicit_grab);
|
||||
GdkPointerGrabInfo *grab = _gdk_display_get_last_pointer_grab (display);
|
||||
|
||||
if (grab)
|
||||
{
|
||||
grab->serial_end = 0;
|
||||
}
|
||||
|
||||
_gdk_display_pointer_grab_update (display, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1600,6 +1600,32 @@ gdk_directfb_cairo_surface_destroy (void *data)
|
||||
impl->cairo_surface = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
_gdk_windowing_create_cairo_surface (GdkDrawable *drawable,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
GdkDrawableImplDirectFB *impl;
|
||||
IDirectFB *dfb;
|
||||
cairo_surface_t *ret;
|
||||
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
dfb = GDK_DISPLAY_DFB (gdk_drawable_get_display (drawable))->directfb;
|
||||
|
||||
ret = cairo_directfb_surface_create (dfb, impl->surface);
|
||||
cairo_surface_set_user_data (ret,
|
||||
&gdk_directfb_cairo_key, drawable,
|
||||
gdk_directfb_cairo_surface_destroy);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
gdk_directfb_ref_cairo_surface (GdkDrawable *drawable)
|
||||
|
||||
@@ -351,7 +351,8 @@ gc_unset_clip_mask (GdkGC *gc)
|
||||
|
||||
void
|
||||
_gdk_windowing_gc_set_clip_region (GdkGC *gc,
|
||||
const GdkRegion *region)
|
||||
const GdkRegion *region,
|
||||
gboolean reset_origin)
|
||||
{
|
||||
GdkGCDirectFB *data;
|
||||
|
||||
@@ -367,10 +368,13 @@ _gdk_windowing_gc_set_clip_region (GdkGC *gc,
|
||||
else
|
||||
temp_region_reset (&data->clip_region);
|
||||
|
||||
gc->clip_x_origin = 0;
|
||||
gc->clip_y_origin = 0;
|
||||
data->values.clip_x_origin = 0;
|
||||
data->values.clip_y_origin = 0;
|
||||
if (reset_origin)
|
||||
{
|
||||
gc->clip_x_origin = 0;
|
||||
gc->clip_y_origin = 0;
|
||||
data->values.clip_x_origin = 0;
|
||||
data->values.clip_y_origin = 0;
|
||||
}
|
||||
|
||||
gc_unset_clip_mask (gc);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ extern GdkModifierType _gdk_directfb_modifiers;
|
||||
extern int _gdk_directfb_mouse_x, _gdk_directfb_mouse_y;
|
||||
|
||||
typedef struct _GdkAxisInfo GdkAxisInfo;
|
||||
typedef struct _GdkInputWindow GdkInputWindow;
|
||||
|
||||
/* information about a device axis */
|
||||
struct _GdkAxisInfo
|
||||
|
||||
@@ -59,9 +59,8 @@
|
||||
void
|
||||
_gdk_windowing_init (void)
|
||||
{
|
||||
/**
|
||||
Not that usable called before parse_args
|
||||
**/
|
||||
/* Not that usable called before parse_args
|
||||
*/
|
||||
}
|
||||
|
||||
void
|
||||
@@ -370,76 +369,15 @@ gdk_error_trap_pop (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gdk_pointer_grab_info_libgtk_only:
|
||||
* @grab_window: location to store current grab window
|
||||
* @owner_events: location to store boolean indicating whether
|
||||
* the @owner_events flag to gdk_pointer_grab() was %TRUE.
|
||||
*
|
||||
* Determines information about the current pointer grab.
|
||||
* This is not public API and must not be used by applications.
|
||||
*
|
||||
* Return value: %TRUE if this application currently has the
|
||||
* pointer grabbed.
|
||||
**/
|
||||
gboolean
|
||||
gdk_pointer_grab_info_libgtk_only (GdkDisplay *display,GdkWindow **grab_window,
|
||||
gboolean *owner_events)
|
||||
{
|
||||
if (_gdk_directfb_pointer_grab_window)
|
||||
{
|
||||
if (grab_window)
|
||||
*grab_window = (GdkWindow *)_gdk_directfb_pointer_grab_window;
|
||||
if (owner_events)
|
||||
*owner_events = _gdk_directfb_pointer_grab_owner_events;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_keyboard_grab_info_libgtk_only:
|
||||
* @grab_window: location to store current grab window
|
||||
* @owner_events: location to store boolean indicating whether
|
||||
* the @owner_events flag to gdk_keyboard_grab() was %TRUE.
|
||||
*
|
||||
* Determines information about the current keyboard grab.
|
||||
* This is not public API and must not be used by applications.
|
||||
*
|
||||
* Return value: %TRUE if this application currently has the
|
||||
* keyboard grabbed.
|
||||
**/
|
||||
gboolean
|
||||
gdk_keyboard_grab_info_libgtk_only (GdkDisplay *display,GdkWindow **grab_window,
|
||||
gboolean *owner_events)
|
||||
{
|
||||
if (_gdk_directfb_keyboard_grab_window)
|
||||
{
|
||||
if (grab_window)
|
||||
*grab_window = (GdkWindow *) _gdk_directfb_keyboard_grab_window;
|
||||
if (owner_events)
|
||||
*owner_events = _gdk_directfb_keyboard_grab_owner_events;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
GdkGrabStatus
|
||||
gdk_keyboard_grab (GdkWindow *window,
|
||||
gint owner_events,
|
||||
guint32 time)
|
||||
{
|
||||
return gdk_directfb_keyboard_grab(gdk_display_get_default(),
|
||||
window,
|
||||
owner_events,
|
||||
time);
|
||||
|
||||
return gdk_directfb_keyboard_grab (gdk_display_get_default(),
|
||||
window,
|
||||
owner_events,
|
||||
time);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -467,35 +405,25 @@ gdk_keyboard_grab (GdkWindow *window,
|
||||
|
||||
|
||||
GdkGrabStatus
|
||||
gdk_display_pointer_grab (GdkDisplay *display,GdkWindow *window,
|
||||
gint owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time)
|
||||
_gdk_windowing_pointer_grab (GdkWindow *window,
|
||||
GdkWindow *native,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
||||
g_return_val_if_fail (confine_to == NULL || GDK_IS_WINDOW (confine_to), 0);
|
||||
|
||||
return gdk_directfb_pointer_grab (window,
|
||||
owner_events,
|
||||
event_mask,
|
||||
confine_to,
|
||||
cursor,
|
||||
time,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
GdkGrabStatus
|
||||
gdk_pointer_grab (GdkWindow * window,
|
||||
gint owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow * confine_to,
|
||||
GdkCursor * cursor,
|
||||
guint32 time)
|
||||
{
|
||||
return gdk_directfb_pointer_grab(window, owner_events,event_mask,
|
||||
confine_to,cursor,time,FALSE);
|
||||
_gdk_display_add_pointer_grab (_gdk_display,
|
||||
window,
|
||||
native,
|
||||
owner_events,
|
||||
event_mask,
|
||||
confine_to,
|
||||
cursor,
|
||||
time);
|
||||
}
|
||||
|
||||
#define __GDK_MAIN_X11_C__
|
||||
|
||||
@@ -114,10 +114,10 @@ gdk_pixmap_impl_directfb_finalize (GObject *object)
|
||||
}
|
||||
|
||||
GdkPixmap*
|
||||
gdk_pixmap_new (GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth)
|
||||
_gdk_pixmap_new (GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth)
|
||||
{
|
||||
DFBSurfacePixelFormat format;
|
||||
IDirectFBSurface *surface;
|
||||
@@ -196,10 +196,10 @@ gdk_pixmap_new (GdkDrawable *drawable,
|
||||
}
|
||||
|
||||
GdkPixmap *
|
||||
gdk_bitmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height)
|
||||
_gdk_bitmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
|
||||
@@ -249,13 +249,13 @@ gdk_bitmap_create_from_data (GdkDrawable *drawable,
|
||||
}
|
||||
|
||||
GdkPixmap*
|
||||
gdk_pixmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth,
|
||||
const GdkColor *fg,
|
||||
const GdkColor *bg)
|
||||
_gdk_pixmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth,
|
||||
const GdkColor *fg,
|
||||
const GdkColor *bg)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -206,6 +206,14 @@ gdk_pre_parse_libgtk_only (void)
|
||||
}
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
if (getenv ("GDK_NATIVE_WINDOWS"))
|
||||
{
|
||||
_gdk_native_windows = TRUE;
|
||||
/* Ensure that this is not propagated
|
||||
to spawned applications */
|
||||
g_unsetenv ("GDK_NATIVE_WINDOWS");
|
||||
}
|
||||
|
||||
g_type_init ();
|
||||
|
||||
/* Do any setup particular to the windowing system
|
||||
|
||||
@@ -69,9 +69,6 @@ gdk_get_use_xshm
|
||||
gdk_set_use_xshm
|
||||
#endif
|
||||
gdk_keyboard_grab
|
||||
gdk_keyboard_grab_info_libgtk_only
|
||||
gdk_pointer_grab
|
||||
gdk_pointer_grab_info_libgtk_only
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -85,6 +82,9 @@ gdk_pointer_is_grabbed
|
||||
gdk_pointer_ungrab
|
||||
gdk_event_send_client_message
|
||||
gdk_event_send_clientmessage_toall
|
||||
gdk_keyboard_grab_info_libgtk_only
|
||||
gdk_pointer_grab_info_libgtk_only
|
||||
gdk_display_pointer_is_grabbed
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -254,12 +254,6 @@ gdk_visual_type_get_type G_GNUC_CONST
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_PIXMAP_H__)
|
||||
#if IN_FILE(__GDK_PIXMAP_X11_C__)
|
||||
gdk_bitmap_create_from_data
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_FONT_H__)
|
||||
#if IN_FILE(__GDK_FONT_C__)
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
@@ -466,7 +460,6 @@ gdk_display_get_default_screen
|
||||
gdk_display_get_name
|
||||
gdk_display_get_n_screens
|
||||
gdk_display_get_screen
|
||||
gdk_display_pointer_is_grabbed
|
||||
gdk_display_pointer_ungrab
|
||||
gdk_display_keyboard_ungrab
|
||||
gdk_display_open
|
||||
@@ -665,12 +658,19 @@ gdk_window_move_region
|
||||
gdk_window_set_background
|
||||
gdk_window_set_back_pixmap
|
||||
gdk_window_set_cursor
|
||||
gdk_window_get_cursor
|
||||
gdk_window_get_geometry
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_root_coords
|
||||
gdk_window_get_deskrelative_origin
|
||||
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_reparent
|
||||
gdk_window_add_filter
|
||||
@@ -716,6 +716,24 @@ gdk_window_set_user_data
|
||||
gdk_window_thaw_toplevel_updates_libgtk_only
|
||||
gdk_window_thaw_updates
|
||||
gdk_window_set_composited
|
||||
gdk_pointer_grab
|
||||
gdk_window_beep
|
||||
gdk_window_geometry_changed
|
||||
gdk_window_ensure_native
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_WINDOW_H__)
|
||||
#if IN_FILE(__GDK_OFFSCREEN_WINDOW_C__)
|
||||
gdk_offscreen_window_get_pixmap
|
||||
gdk_offscreen_window_set_embedder
|
||||
gdk_offscreen_window_get_embedder
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_INTERNALS_H__)
|
||||
#if IN_FILE(__GDK_OFFSCREEN_WINDOW_C__)
|
||||
gdk_offscreen_window_get_type G_GNUC_CONST
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -733,7 +751,6 @@ gdk_window_lookup
|
||||
gdk_window_lookup_for_display
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
gdk_window_set_hints
|
||||
gdk_window_get_deskrelative_origin
|
||||
#endif
|
||||
gdk_window_get_type_hint
|
||||
gdk_window_set_type_hint
|
||||
@@ -748,15 +765,12 @@ gdk_window_set_startup_id
|
||||
gdk_window_set_transient_for
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_frame_extents
|
||||
gdk_window_input_shape_combine_mask
|
||||
gdk_window_input_shape_combine_region
|
||||
gdk_window_set_override_redirect
|
||||
gdk_window_set_accept_focus
|
||||
gdk_window_set_focus_on_map
|
||||
gdk_window_set_icon_list
|
||||
gdk_window_set_icon
|
||||
gdk_window_set_icon_name
|
||||
gdk_window_beep
|
||||
gdk_window_set_opacity
|
||||
gdk_window_iconify
|
||||
gdk_window_deiconify
|
||||
@@ -773,8 +787,6 @@ gdk_window_set_group
|
||||
gdk_window_get_decorations
|
||||
gdk_window_set_decorations
|
||||
gdk_window_set_functions
|
||||
gdk_window_set_child_input_shapes
|
||||
gdk_window_merge_child_input_shapes
|
||||
gdk_window_begin_move_drag
|
||||
gdk_window_begin_resize_drag
|
||||
gdk_window_enable_synchronized_configure
|
||||
@@ -925,23 +937,24 @@ gdk_pixbuf_render_to_drawable_alpha
|
||||
|
||||
#if IN_HEADER(__GDK_PIXMAP_H__)
|
||||
#if IN_FILE(__GDK_PIXMAP_C__)
|
||||
gdk_bitmap_create_from_data
|
||||
gdk_pixmap_colormap_create_from_xpm
|
||||
gdk_pixmap_create_from_data
|
||||
gdk_pixmap_create_from_xpm
|
||||
gdk_pixmap_colormap_create_from_xpm_d
|
||||
gdk_pixmap_create_from_xpm_d
|
||||
gdk_pixmap_get_type G_GNUC_CONST
|
||||
gdk_pixmap_new
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_PIXMAP_H__)
|
||||
#if IN_FILE(__GDK_PIXMAP_X11_C__)
|
||||
gdk_pixmap_create_from_data
|
||||
gdk_pixmap_foreign_new
|
||||
gdk_pixmap_foreign_new_for_display
|
||||
gdk_pixmap_foreign_new_for_screen
|
||||
gdk_pixmap_lookup
|
||||
gdk_pixmap_lookup_for_display
|
||||
gdk_pixmap_new
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -951,6 +964,7 @@ gdk_region_copy
|
||||
gdk_region_destroy
|
||||
gdk_region_empty
|
||||
gdk_region_equal
|
||||
gdk_region_rect_equal
|
||||
gdk_region_get_clipbox
|
||||
gdk_region_get_rectangles
|
||||
gdk_region_intersect
|
||||
|
||||
@@ -50,6 +50,10 @@ gdk_cairo_create (GdkDrawable *drawable)
|
||||
|
||||
surface = _gdk_drawable_ref_cairo_surface (drawable);
|
||||
cr = cairo_create (surface);
|
||||
|
||||
if (GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_clip)
|
||||
GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_clip (drawable, cr);
|
||||
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
return cr;
|
||||
|
||||
677
gdk/gdkdisplay.c
677
gdk/gdkdisplay.c
@@ -22,9 +22,11 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <math.h>
|
||||
#include <glib.h>
|
||||
#include "gdk.h" /* gdk_event_send_client_message() */
|
||||
#include "gdkdisplay.h"
|
||||
#include "gdkwindowimpl.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkmarshalers.h"
|
||||
#include "gdkscreen.h"
|
||||
@@ -60,6 +62,14 @@ static GdkWindow* singlehead_default_window_get_pointer (GdkWindow *window
|
||||
static GdkWindow* singlehead_default_window_at_pointer (GdkScreen *screen,
|
||||
gint *win_x,
|
||||
gint *win_y);
|
||||
static GdkWindow *gdk_window_real_window_get_pointer (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
static GdkWindow *gdk_display_real_get_window_at_pointer (GdkDisplay *display,
|
||||
gint *win_x,
|
||||
gint *win_y);
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
@@ -67,8 +77,8 @@ static char *gdk_sm_client_id;
|
||||
|
||||
static const GdkDisplayPointerHooks default_pointer_hooks = {
|
||||
_gdk_windowing_get_pointer,
|
||||
_gdk_windowing_window_get_pointer,
|
||||
_gdk_windowing_window_at_pointer
|
||||
gdk_window_real_window_get_pointer,
|
||||
gdk_display_real_get_window_at_pointer
|
||||
};
|
||||
|
||||
static const GdkDisplayPointerHooks singlehead_pointer_hooks = {
|
||||
@@ -110,7 +120,7 @@ gdk_display_class_init (GdkDisplayClass *class)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GdkDisplayClass, closed),
|
||||
NULL, NULL,
|
||||
gdk_marshal_VOID__BOOLEAN,
|
||||
_gdk_marshal_VOID__BOOLEAN,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
G_TYPE_BOOLEAN);
|
||||
@@ -434,6 +444,25 @@ _gdk_get_sm_client_id (void)
|
||||
return gdk_sm_client_id;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_display_enable_motion_hints (GdkDisplay *display)
|
||||
{
|
||||
gulong serial;
|
||||
|
||||
if (display->pointer_info.motion_hint_serial != 0)
|
||||
{
|
||||
serial = _gdk_windowing_window_get_next_serial (display);
|
||||
/* We might not actually generate the next request, so
|
||||
make sure this triggers always, this may cause it to
|
||||
trigger slightly too early, but this is just a hint
|
||||
anyway. */
|
||||
if (serial > 0)
|
||||
serial--;
|
||||
if (serial < display->pointer_info.motion_hint_serial)
|
||||
display->pointer_info.motion_hint_serial = serial;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_display_get_pointer:
|
||||
* @display: a #GdkDisplay
|
||||
@@ -473,6 +502,68 @@ gdk_display_get_pointer (GdkDisplay *display,
|
||||
*mask = tmp_mask;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gdk_display_real_get_window_at_pointer (GdkDisplay *display,
|
||||
gint *win_x,
|
||||
gint *win_y)
|
||||
{
|
||||
GdkWindow *window;
|
||||
gint x, y;
|
||||
|
||||
window = _gdk_windowing_window_at_pointer (display, &x, &y, NULL);
|
||||
|
||||
/* This might need corrections, as the native window returned
|
||||
may contain client side children */
|
||||
if (window)
|
||||
{
|
||||
double xx, yy;
|
||||
|
||||
window = _gdk_window_find_descendant_at (window,
|
||||
x, y,
|
||||
&xx, &yy);
|
||||
x = floor (xx + 0.5);
|
||||
y = floor (yy + 0.5);
|
||||
}
|
||||
|
||||
*win_x = x;
|
||||
*win_y = y;
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gdk_window_real_window_get_pointer (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
gint tmpx, tmpy;
|
||||
GdkModifierType tmp_mask;
|
||||
gboolean normal_child;
|
||||
|
||||
private = (GdkWindowObject *) window;
|
||||
|
||||
normal_child = GDK_WINDOW_IMPL_GET_IFACE (private->impl)->get_pointer (window,
|
||||
&tmpx, &tmpy,
|
||||
&tmp_mask);
|
||||
/* We got the coords on the impl, convert to the window */
|
||||
tmpx -= private->abs_x;
|
||||
tmpy -= private->abs_y;
|
||||
|
||||
if (x)
|
||||
*x = tmpx;
|
||||
if (y)
|
||||
*y = tmpy;
|
||||
if (mask)
|
||||
*mask = tmp_mask;
|
||||
|
||||
if (normal_child)
|
||||
return _gdk_window_find_child_at (window, tmpx, tmpy);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_display_get_window_at_pointer:
|
||||
* @display: a #GdkDisplay
|
||||
@@ -586,8 +677,8 @@ singlehead_default_window_get_pointer (GdkWindow *window,
|
||||
gint *y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
return _gdk_windowing_window_get_pointer (gdk_drawable_get_display (window),
|
||||
window, x, y, mask);
|
||||
return gdk_window_real_window_get_pointer (gdk_drawable_get_display (window),
|
||||
window, x, y, mask);
|
||||
}
|
||||
|
||||
static GdkWindow*
|
||||
@@ -595,8 +686,8 @@ singlehead_default_window_at_pointer (GdkScreen *screen,
|
||||
gint *win_x,
|
||||
gint *win_y)
|
||||
{
|
||||
return _gdk_windowing_window_at_pointer (gdk_screen_get_display (screen),
|
||||
win_x, win_y);
|
||||
return gdk_display_real_get_window_at_pointer (gdk_screen_get_display (screen),
|
||||
win_x, win_y);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -632,5 +723,577 @@ gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks)
|
||||
return (GdkPointerHooks *)result;
|
||||
}
|
||||
|
||||
static void
|
||||
generate_grab_broken_event (GdkWindow *window,
|
||||
gboolean keyboard,
|
||||
gboolean implicit,
|
||||
GdkWindow *grab_window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
{
|
||||
GdkEvent event;
|
||||
event.type = GDK_GRAB_BROKEN;
|
||||
event.grab_broken.window = window;
|
||||
event.grab_broken.send_event = 0;
|
||||
event.grab_broken.keyboard = keyboard;
|
||||
event.grab_broken.implicit = implicit;
|
||||
event.grab_broken.grab_window = grab_window;
|
||||
gdk_event_put (&event);
|
||||
}
|
||||
}
|
||||
|
||||
GdkPointerGrabInfo *
|
||||
_gdk_display_get_last_pointer_grab (GdkDisplay *display)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
l = g_list_last (display->pointer_grabs);
|
||||
|
||||
if (l == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return (GdkPointerGrabInfo *)l->data;
|
||||
}
|
||||
|
||||
|
||||
GdkPointerGrabInfo *
|
||||
_gdk_display_add_pointer_grab (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *native_window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
unsigned long serial_start,
|
||||
guint32 time,
|
||||
gboolean implicit)
|
||||
{
|
||||
GdkPointerGrabInfo *info, *other_info;
|
||||
GList *l;
|
||||
|
||||
info = g_new0 (GdkPointerGrabInfo, 1);
|
||||
|
||||
info->window = g_object_ref (window);
|
||||
info->native_window = g_object_ref (native_window);
|
||||
info->serial_start = serial_start;
|
||||
info->serial_end = G_MAXULONG;
|
||||
info->owner_events = owner_events;
|
||||
info->event_mask = event_mask;
|
||||
info->time = time;
|
||||
info->implicit = implicit;
|
||||
|
||||
/* Find the first grab that has a larger start time (if any) and insert
|
||||
* before that. I.E we insert after already existing grabs with same
|
||||
* start time */
|
||||
for (l = display->pointer_grabs; l != NULL; l = l->next)
|
||||
{
|
||||
other_info = l->data;
|
||||
|
||||
if (info->serial_start < other_info->serial_start)
|
||||
break;
|
||||
}
|
||||
display->pointer_grabs =
|
||||
g_list_insert_before (display->pointer_grabs, l, info);
|
||||
|
||||
/* Make sure the new grab end before next grab */
|
||||
if (l)
|
||||
{
|
||||
other_info = l->data;
|
||||
info->serial_end = other_info->serial_start;
|
||||
}
|
||||
|
||||
/* Find any previous grab and update its end time */
|
||||
l = g_list_find (display->pointer_grabs, info);
|
||||
l = l->prev;
|
||||
if (l)
|
||||
{
|
||||
other_info = l->data;
|
||||
other_info->serial_end = serial_start;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
static void
|
||||
free_pointer_grab (GdkPointerGrabInfo *info)
|
||||
{
|
||||
g_object_unref (info->window);
|
||||
g_object_unref (info->native_window);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
/* _gdk_synthesize_crossing_events only works inside one toplevel.
|
||||
This function splits things into two calls if needed, converting the
|
||||
coordinates to the right toplevel */
|
||||
static void
|
||||
synthesize_crossing_events (GdkDisplay *display,
|
||||
GdkWindow *src_window,
|
||||
GdkWindow *dest_window,
|
||||
GdkCrossingMode crossing_mode,
|
||||
guint32 time,
|
||||
gulong serial)
|
||||
{
|
||||
GdkWindow *src_toplevel, *dest_toplevel;
|
||||
GdkModifierType state;
|
||||
int x, y;
|
||||
|
||||
/* We use the native crossing events if all native */
|
||||
if (_gdk_native_windows)
|
||||
return;
|
||||
|
||||
if (src_window)
|
||||
src_toplevel = gdk_window_get_toplevel (src_window);
|
||||
else
|
||||
src_toplevel = NULL;
|
||||
if (dest_window)
|
||||
dest_toplevel = gdk_window_get_toplevel (dest_window);
|
||||
else
|
||||
dest_toplevel = NULL;
|
||||
|
||||
if (src_toplevel == NULL && dest_toplevel == NULL)
|
||||
return;
|
||||
|
||||
if (src_toplevel == NULL ||
|
||||
src_toplevel == dest_toplevel)
|
||||
{
|
||||
/* Same toplevels */
|
||||
gdk_window_get_pointer (dest_toplevel,
|
||||
&x, &y, &state);
|
||||
_gdk_synthesize_crossing_events (display,
|
||||
src_window,
|
||||
dest_window,
|
||||
crossing_mode,
|
||||
x, y, state,
|
||||
time,
|
||||
NULL,
|
||||
serial, FALSE);
|
||||
}
|
||||
else if (dest_toplevel == NULL)
|
||||
{
|
||||
gdk_window_get_pointer (src_toplevel,
|
||||
&x, &y, &state);
|
||||
_gdk_synthesize_crossing_events (display,
|
||||
src_window,
|
||||
NULL,
|
||||
crossing_mode,
|
||||
x, y, state,
|
||||
time,
|
||||
NULL,
|
||||
serial, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Different toplevels */
|
||||
gdk_window_get_pointer (src_toplevel,
|
||||
&x, &y, &state);
|
||||
_gdk_synthesize_crossing_events (display,
|
||||
src_window,
|
||||
NULL,
|
||||
crossing_mode,
|
||||
x, y, state,
|
||||
time,
|
||||
NULL,
|
||||
serial, FALSE);
|
||||
gdk_window_get_pointer (dest_toplevel,
|
||||
&x, &y, &state);
|
||||
_gdk_synthesize_crossing_events (display,
|
||||
NULL,
|
||||
dest_window,
|
||||
crossing_mode,
|
||||
x, y, state,
|
||||
time,
|
||||
NULL,
|
||||
serial, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
get_current_toplevel (GdkDisplay *display,
|
||||
int *x_out, int *y_out,
|
||||
GdkModifierType *state_out)
|
||||
{
|
||||
GdkWindow *pointer_window;
|
||||
GdkWindowObject *w;
|
||||
int x, y;
|
||||
GdkModifierType state;
|
||||
|
||||
pointer_window = _gdk_windowing_window_at_pointer (display, &x, &y, &state);
|
||||
if (pointer_window != NULL &&
|
||||
(GDK_WINDOW_DESTROYED (pointer_window) ||
|
||||
GDK_WINDOW_TYPE (pointer_window) == GDK_WINDOW_ROOT ||
|
||||
GDK_WINDOW_TYPE (pointer_window) == GDK_WINDOW_FOREIGN))
|
||||
pointer_window = NULL;
|
||||
|
||||
w = (GdkWindowObject *)pointer_window;
|
||||
if (w)
|
||||
{
|
||||
/* Convert to toplevel */
|
||||
while (w->parent != NULL &&
|
||||
w->parent->window_type != GDK_WINDOW_ROOT)
|
||||
{
|
||||
x += w->x;
|
||||
y += w->y;
|
||||
w = w->parent;
|
||||
}
|
||||
}
|
||||
|
||||
*x_out = x;
|
||||
*y_out = y;
|
||||
*state_out = state;
|
||||
return (GdkWindow *)w;
|
||||
}
|
||||
|
||||
static void
|
||||
switch_to_pointer_grab (GdkDisplay *display,
|
||||
GdkPointerGrabInfo *grab,
|
||||
GdkPointerGrabInfo *last_grab,
|
||||
guint32 time,
|
||||
gulong serial)
|
||||
{
|
||||
GdkWindow *src_window, *pointer_window, *new_toplevel;
|
||||
GList *old_grabs;
|
||||
GdkModifierType state;
|
||||
int x, y;
|
||||
|
||||
/* Temporarily unset pointer to make sure we send the crossing events below */
|
||||
old_grabs = display->pointer_grabs;
|
||||
display->pointer_grabs = NULL;
|
||||
|
||||
if (grab)
|
||||
{
|
||||
/* New grab is in effect */
|
||||
|
||||
/* We need to generate crossing events for the grab.
|
||||
* However, there are never any crossing events for implicit grabs
|
||||
* TODO: ... Actually, this could happen if the pointer window
|
||||
* doesn't have button mask so a parent gets the event...
|
||||
*/
|
||||
if (!grab->implicit)
|
||||
{
|
||||
/* We send GRAB crossing events from the window under the pointer to the
|
||||
grab window. Except if there is an old grab then we start from that */
|
||||
if (last_grab)
|
||||
src_window = last_grab->window;
|
||||
else
|
||||
src_window = display->pointer_info.window_under_pointer;
|
||||
|
||||
if (src_window != grab->window)
|
||||
{
|
||||
synthesize_crossing_events (display,
|
||||
src_window, grab->window,
|
||||
GDK_CROSSING_GRAB, time, serial);
|
||||
}
|
||||
|
||||
/* !owner_event Grabbing a window that we're not inside, current status is
|
||||
now NULL (i.e. outside grabbed window) */
|
||||
if (!grab->owner_events && display->pointer_info.window_under_pointer != grab->window)
|
||||
_gdk_display_set_window_under_pointer (display, NULL);
|
||||
}
|
||||
|
||||
grab->activated = TRUE;
|
||||
}
|
||||
|
||||
if (last_grab)
|
||||
{
|
||||
new_toplevel = NULL;
|
||||
|
||||
if (grab == NULL /* ungrab */ ||
|
||||
(!last_grab->owner_events && grab->owner_events) /* switched to owner_events */ )
|
||||
{
|
||||
/* We force check what window we're in, and update the toplevel_under_pointer info,
|
||||
* as that won't get told of this change with toplevel enter events.
|
||||
*/
|
||||
if (display->pointer_info.toplevel_under_pointer)
|
||||
g_object_unref (display->pointer_info.toplevel_under_pointer);
|
||||
display->pointer_info.toplevel_under_pointer = NULL;
|
||||
|
||||
new_toplevel = get_current_toplevel (display, &x, &y, &state);
|
||||
if (new_toplevel)
|
||||
{
|
||||
/* w is now toplevel and x,y in toplevel coords */
|
||||
display->pointer_info.toplevel_under_pointer = g_object_ref (new_toplevel);
|
||||
display->pointer_info.toplevel_x = x;
|
||||
display->pointer_info.toplevel_y = y;
|
||||
display->pointer_info.state = state;
|
||||
}
|
||||
}
|
||||
|
||||
if (grab == NULL) /* Ungrabbed, send events */
|
||||
{
|
||||
pointer_window = NULL;
|
||||
if (new_toplevel)
|
||||
{
|
||||
/* Find (possibly virtual) child window */
|
||||
pointer_window =
|
||||
_gdk_window_find_descendant_at (new_toplevel,
|
||||
x, y,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
if (pointer_window != last_grab->window)
|
||||
synthesize_crossing_events (display,
|
||||
last_grab->window, pointer_window,
|
||||
GDK_CROSSING_UNGRAB, time, serial);
|
||||
|
||||
/* We're now ungrabbed, update the window_under_pointer */
|
||||
_gdk_display_set_window_under_pointer (display, pointer_window);
|
||||
}
|
||||
}
|
||||
|
||||
display->pointer_grabs = old_grabs;
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_display_pointer_grab_update (GdkDisplay *display,
|
||||
gulong current_serial)
|
||||
{
|
||||
GdkPointerGrabInfo *current_grab, *next_grab;
|
||||
guint32 time;
|
||||
|
||||
time = display->last_event_time;
|
||||
|
||||
while (display->pointer_grabs != NULL)
|
||||
{
|
||||
current_grab = display->pointer_grabs->data;
|
||||
|
||||
if (current_grab->serial_start > current_serial)
|
||||
return; /* Hasn't started yet */
|
||||
|
||||
if (current_grab->serial_end > current_serial ||
|
||||
(current_grab->serial_end == current_serial &&
|
||||
current_grab->grab_one_pointer_release_event))
|
||||
{
|
||||
/* This one hasn't ended yet.
|
||||
its the currently active one or scheduled to be active */
|
||||
|
||||
if (!current_grab->activated)
|
||||
switch_to_pointer_grab (display, current_grab, NULL, time, current_serial);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
next_grab = NULL;
|
||||
if (display->pointer_grabs->next)
|
||||
{
|
||||
/* This is the next active grab */
|
||||
next_grab = display->pointer_grabs->next->data;
|
||||
|
||||
if (next_grab->serial_start > current_serial)
|
||||
next_grab = NULL; /* Actually its not yet active */
|
||||
}
|
||||
|
||||
if ((next_grab == NULL && current_grab->implicit_ungrab) ||
|
||||
(next_grab != NULL && current_grab->window != next_grab->window))
|
||||
generate_grab_broken_event (GDK_WINDOW (current_grab->window),
|
||||
FALSE, current_grab->implicit,
|
||||
next_grab? next_grab->window : NULL);
|
||||
|
||||
/* Remove old grab */
|
||||
display->pointer_grabs =
|
||||
g_list_delete_link (display->pointer_grabs,
|
||||
display->pointer_grabs);
|
||||
|
||||
switch_to_pointer_grab (display,
|
||||
next_grab, current_grab,
|
||||
time, current_serial);
|
||||
|
||||
free_pointer_grab (current_grab);
|
||||
}
|
||||
}
|
||||
|
||||
static GList *
|
||||
find_pointer_grab (GdkDisplay *display,
|
||||
gulong serial)
|
||||
{
|
||||
GdkPointerGrabInfo *grab;
|
||||
GList *l;
|
||||
|
||||
for (l = display->pointer_grabs; l != NULL; l = l->next)
|
||||
{
|
||||
grab = l->data;
|
||||
|
||||
if (serial >= grab->serial_start && serial < grab->serial_end)
|
||||
return l;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
GdkPointerGrabInfo *
|
||||
_gdk_display_has_pointer_grab (GdkDisplay *display,
|
||||
gulong serial)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
l = find_pointer_grab (display, serial);
|
||||
if (l)
|
||||
return l->data;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Returns true if last grab was ended
|
||||
* If if_child is non-NULL, end the grab only if the grabbed
|
||||
* window is the same as if_child or a descendant of it */
|
||||
gboolean
|
||||
_gdk_display_end_pointer_grab (GdkDisplay *display,
|
||||
gulong serial,
|
||||
GdkWindow *if_child,
|
||||
gboolean implicit)
|
||||
{
|
||||
GdkPointerGrabInfo *grab;
|
||||
GList *l;
|
||||
|
||||
l = find_pointer_grab (display, serial);
|
||||
|
||||
if (l == NULL)
|
||||
return FALSE;
|
||||
|
||||
grab = l->data;
|
||||
if (grab &&
|
||||
(if_child == NULL ||
|
||||
_gdk_window_event_parent_of (if_child, grab->window)))
|
||||
{
|
||||
grab->serial_end = serial;
|
||||
grab->implicit_ungrab = implicit;
|
||||
return l->next == NULL;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_display_set_has_keyboard_grab (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *native_window,
|
||||
gboolean owner_events,
|
||||
unsigned long serial,
|
||||
guint32 time)
|
||||
{
|
||||
if (display->keyboard_grab.window != NULL &&
|
||||
display->keyboard_grab.window != window)
|
||||
generate_grab_broken_event (display->keyboard_grab.window,
|
||||
TRUE, FALSE, window);
|
||||
|
||||
display->keyboard_grab.window = window;
|
||||
display->keyboard_grab.native_window = native_window;
|
||||
display->keyboard_grab.owner_events = owner_events;
|
||||
display->keyboard_grab.serial = serial;
|
||||
display->keyboard_grab.time = time;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_display_unset_has_keyboard_grab (GdkDisplay *display,
|
||||
gboolean implicit)
|
||||
{
|
||||
if (implicit)
|
||||
generate_grab_broken_event (display->keyboard_grab.window,
|
||||
TRUE, FALSE, NULL);
|
||||
display->keyboard_grab.window = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_keyboard_grab_info_libgtk_only:
|
||||
* @display: the display for which to get the grab information
|
||||
* @grab_window: location to store current grab window
|
||||
* @owner_events: location to store boolean indicating whether
|
||||
* the @owner_events flag to gdk_keyboard_grab() was %TRUE.
|
||||
*
|
||||
* Determines information about the current keyboard grab.
|
||||
* This is not public API and must not be used by applications.
|
||||
*
|
||||
* Return value: %TRUE if this application currently has the
|
||||
* keyboard grabbed.
|
||||
**/
|
||||
gboolean
|
||||
gdk_keyboard_grab_info_libgtk_only (GdkDisplay *display,
|
||||
GdkWindow **grab_window,
|
||||
gboolean *owner_events)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
|
||||
if (display->keyboard_grab.window)
|
||||
{
|
||||
if (grab_window)
|
||||
*grab_window = display->keyboard_grab.window;
|
||||
if (owner_events)
|
||||
*owner_events = display->keyboard_grab.owner_events;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pointer_grab_info_libgtk_only:
|
||||
* @display: the #GdkDisplay for which to get the grab information
|
||||
* @grab_window: location to store current grab window
|
||||
* @owner_events: location to store boolean indicating whether
|
||||
* the @owner_events flag to gdk_pointer_grab() was %TRUE.
|
||||
*
|
||||
* Determines information about the current pointer grab.
|
||||
* This is not public API and must not be used by applications.
|
||||
*
|
||||
* Return value: %TRUE if this application currently has the
|
||||
* pointer grabbed.
|
||||
**/
|
||||
gboolean
|
||||
gdk_pointer_grab_info_libgtk_only (GdkDisplay *display,
|
||||
GdkWindow **grab_window,
|
||||
gboolean *owner_events)
|
||||
{
|
||||
GdkPointerGrabInfo *info;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
|
||||
/* What we're interested in is the steady state (ie last grab),
|
||||
because we're interested e.g. if we grabbed so that we
|
||||
can ungrab, even if our grab is not active just yet. */
|
||||
info = _gdk_display_get_last_pointer_grab (display);
|
||||
|
||||
if (info)
|
||||
{
|
||||
if (grab_window)
|
||||
*grab_window = info->window;
|
||||
if (owner_events)
|
||||
*owner_events = info->owner_events;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gdk_display_pointer_is_grabbed:
|
||||
* @display: a #GdkDisplay
|
||||
*
|
||||
* Test if the pointer is grabbed.
|
||||
*
|
||||
* Returns: %TRUE if an active X pointer grab is in effect
|
||||
*
|
||||
* Since: 2.2
|
||||
*/
|
||||
gboolean
|
||||
gdk_display_pointer_is_grabbed (GdkDisplay *display)
|
||||
{
|
||||
GdkPointerGrabInfo *info;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), TRUE);
|
||||
|
||||
/* What we're interested in is the steady state (ie last grab),
|
||||
because we're interested e.g. if we grabbed so that we
|
||||
can ungrab, even if our grab is not active just yet. */
|
||||
info = _gdk_display_get_last_pointer_grab (display);
|
||||
|
||||
return (info && !info->implicit);
|
||||
}
|
||||
|
||||
#define __GDK_DISPLAY_C__
|
||||
#include "gdkaliasdef.c"
|
||||
|
||||
@@ -43,6 +43,33 @@ typedef struct _GdkDisplayPointerHooks GdkDisplayPointerHooks;
|
||||
#define GDK_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY))
|
||||
#define GDK_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY, GdkDisplayClass))
|
||||
|
||||
/* Tracks information about the keyboard grab on this display */
|
||||
typedef struct
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkWindow *native_window;
|
||||
gulong serial;
|
||||
gboolean owner_events;
|
||||
guint32 time;
|
||||
} GdkKeyboardGrabInfo;
|
||||
|
||||
/* Tracks information about which window and position the pointer last was in.
|
||||
* This is useful when we need to synthesize events later.
|
||||
* Note that we track toplevel_under_pointer using enter/leave events,
|
||||
* so in the case of a grab, either with owner_events==FALSE or with the
|
||||
* pointer in no clients window the x/y coordinates may actually be outside
|
||||
* the window.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
GdkWindow *toplevel_under_pointer; /* The toplevel window with mouse inside, tracked via native events */
|
||||
GdkWindow *window_under_pointer; /* The window that last got sent a normal enter event */
|
||||
gdouble toplevel_x, toplevel_y;
|
||||
guint32 state;
|
||||
guint32 button;
|
||||
gulong motion_hint_serial; /* 0 == didn't deliver hinted motion event */
|
||||
} GdkPointerWindowInfo;
|
||||
|
||||
struct _GdkDisplay
|
||||
{
|
||||
GObject parent_instance;
|
||||
@@ -64,10 +91,18 @@ struct _GdkDisplay
|
||||
const GdkDisplayPointerHooks *pointer_hooks; /* Current hooks for querying pointer */
|
||||
|
||||
guint closed : 1; /* Whether this display has been closed */
|
||||
guint ignore_core_events : 1; /* Don't send core motion and button event */
|
||||
|
||||
guint double_click_distance; /* Maximum distance between clicks in pixels */
|
||||
gint button_x[2]; /* The last 2 button click positions. */
|
||||
gint button_y[2];
|
||||
|
||||
GList *pointer_grabs;
|
||||
GdkKeyboardGrabInfo keyboard_grab;
|
||||
GdkPointerWindowInfo pointer_info;
|
||||
|
||||
/* Last reported event time from server */
|
||||
guint32 last_event_time;
|
||||
};
|
||||
|
||||
struct _GdkDisplayClass
|
||||
|
||||
@@ -92,7 +92,7 @@ gdk_display_manager_class_init (GdkDisplayManagerClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GdkDisplayManagerClass, display_opened),
|
||||
NULL, NULL,
|
||||
gdk_marshal_VOID__OBJECT,
|
||||
_gdk_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
GDK_TYPE_DISPLAY);
|
||||
|
||||
171
gdk/gdkdraw.c
171
gdk/gdkdraw.c
@@ -61,6 +61,15 @@ static void gdk_drawable_real_draw_pixbuf (GdkDrawable *draw
|
||||
GdkRgbDither dither,
|
||||
gint x_dither,
|
||||
gint y_dither);
|
||||
static void gdk_drawable_real_draw_drawable (GdkDrawable *drawable,
|
||||
GdkGC *gc,
|
||||
GdkDrawable *src,
|
||||
gint xsrc,
|
||||
gint ysrc,
|
||||
gint xdest,
|
||||
gint ydest,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (GdkDrawable, gdk_drawable, G_TYPE_OBJECT)
|
||||
@@ -74,6 +83,7 @@ gdk_drawable_class_init (GdkDrawableClass *klass)
|
||||
klass->get_clip_region = gdk_drawable_real_get_visible_region;
|
||||
klass->get_visible_region = gdk_drawable_real_get_visible_region;
|
||||
klass->draw_pixbuf = gdk_drawable_real_draw_pixbuf;
|
||||
klass->draw_drawable = gdk_drawable_real_draw_drawable;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -150,7 +160,8 @@ gdk_drawable_get_size (GdkDrawable *drawable,
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
|
||||
|
||||
GDK_DRAWABLE_GET_CLASS (drawable)->get_size (drawable, width, height);
|
||||
if (GDK_DRAWABLE_GET_CLASS (drawable)->get_size != NULL)
|
||||
GDK_DRAWABLE_GET_CLASS (drawable)->get_size (drawable, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -652,13 +663,26 @@ gdk_draw_drawable (GdkDrawable *drawable,
|
||||
&composite_x_offset,
|
||||
&composite_y_offset);
|
||||
|
||||
|
||||
GDK_DRAWABLE_GET_CLASS (drawable)->draw_drawable (drawable, gc, composite,
|
||||
xsrc - composite_x_offset,
|
||||
ysrc - composite_y_offset,
|
||||
xdest, ydest,
|
||||
width, height);
|
||||
|
||||
/* TODO: For non-native windows this may copy stuff from other overlapping
|
||||
windows. We should clip that and (for windows with bg != None) clear that
|
||||
area in the destination instead. */
|
||||
|
||||
if (GDK_DRAWABLE_GET_CLASS (drawable)->draw_drawable_with_src)
|
||||
GDK_DRAWABLE_GET_CLASS (drawable)->draw_drawable_with_src (drawable, gc,
|
||||
composite,
|
||||
xsrc - composite_x_offset,
|
||||
ysrc - composite_y_offset,
|
||||
xdest, ydest,
|
||||
width, height,
|
||||
src);
|
||||
else /* backwards compat for old out-of-tree implementations of GdkDrawable (are there any?) */
|
||||
GDK_DRAWABLE_GET_CLASS (drawable)->draw_drawable (drawable, gc,
|
||||
composite,
|
||||
xsrc - composite_x_offset,
|
||||
ysrc - composite_y_offset,
|
||||
xdest, ydest,
|
||||
width, height);
|
||||
|
||||
g_object_unref (composite);
|
||||
}
|
||||
|
||||
@@ -727,9 +751,6 @@ gdk_draw_image (GdkDrawable *drawable,
|
||||
* On older X servers, rendering pixbufs with an alpha channel involves round
|
||||
* trips to the X server, and may be somewhat slow.
|
||||
*
|
||||
* The clip mask of @gc is ignored, but clip rectangles and clip regions work
|
||||
* fine.
|
||||
*
|
||||
* If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
|
||||
* function is accelerated using mediaLib, which provides hardware
|
||||
* acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib
|
||||
@@ -871,7 +892,7 @@ real_draw_glyphs (GdkDrawable *drawable,
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (drawable);
|
||||
_gdk_gc_update_context (gc, cr, NULL, NULL, TRUE);
|
||||
_gdk_gc_update_context (gc, cr, NULL, NULL, TRUE, drawable);
|
||||
|
||||
if (matrix)
|
||||
{
|
||||
@@ -995,7 +1016,7 @@ gdk_draw_trapezoids (GdkDrawable *drawable,
|
||||
g_return_if_fail (n_trapezoids == 0 || trapezoids != NULL);
|
||||
|
||||
cr = gdk_cairo_create (drawable);
|
||||
_gdk_gc_update_context (gc, cr, NULL, NULL, TRUE);
|
||||
_gdk_gc_update_context (gc, cr, NULL, NULL, TRUE, drawable);
|
||||
|
||||
for (i = 0; i < n_trapezoids; i++)
|
||||
{
|
||||
@@ -1185,7 +1206,7 @@ gdk_drawable_real_get_image (GdkDrawable *drawable,
|
||||
return gdk_drawable_copy_to_image (drawable, NULL, x, y, 0, 0, width, height);
|
||||
}
|
||||
|
||||
static GdkDrawable*
|
||||
static GdkDrawable *
|
||||
gdk_drawable_real_get_composite_drawable (GdkDrawable *drawable,
|
||||
gint x,
|
||||
gint y,
|
||||
@@ -1484,6 +1505,31 @@ composite_565 (guchar *src_buf,
|
||||
}
|
||||
}
|
||||
|
||||
/* Implementation of the old vfunc in terms of the new one
|
||||
in case someone calls it directly (which they shouldn't!) */
|
||||
static void
|
||||
gdk_drawable_real_draw_drawable (GdkDrawable *drawable,
|
||||
GdkGC *gc,
|
||||
GdkDrawable *src,
|
||||
gint xsrc,
|
||||
gint ysrc,
|
||||
gint xdest,
|
||||
gint ydest,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GDK_DRAWABLE_GET_CLASS (drawable)->draw_drawable_with_src (drawable,
|
||||
gc,
|
||||
src,
|
||||
xsrc,
|
||||
ysrc,
|
||||
xdest,
|
||||
ydest,
|
||||
width,
|
||||
height,
|
||||
src);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
|
||||
GdkGC *gc,
|
||||
@@ -1503,6 +1549,7 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
|
||||
GdkRegion *clip;
|
||||
GdkRegion *drect;
|
||||
GdkRectangle tmp_rect;
|
||||
GdkDrawable *real_drawable;
|
||||
|
||||
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
@@ -1575,7 +1622,19 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
|
||||
/* Actually draw */
|
||||
if (!gc)
|
||||
gc = _gdk_drawable_get_scratch_gc (drawable, FALSE);
|
||||
|
||||
|
||||
/* Drawable is a wrapper here, but at this time we
|
||||
have already retargeted the destination to any
|
||||
impl window and set the clip, so what we really
|
||||
want to do is draw directly on the impl, ignoring
|
||||
client side subwindows. We also use the impl
|
||||
in the pixmap target case to avoid resetting the
|
||||
already set clip on the GC. */
|
||||
if (GDK_IS_WINDOW (drawable))
|
||||
real_drawable = GDK_WINDOW_OBJECT (drawable)->impl;
|
||||
else
|
||||
real_drawable = GDK_PIXMAP_OBJECT (drawable)->impl;
|
||||
|
||||
if (pixbuf->has_alpha)
|
||||
{
|
||||
GdkVisual *visual = gdk_drawable_get_visual (drawable);
|
||||
@@ -1645,7 +1704,7 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
|
||||
image->bpl,
|
||||
visual->byte_order,
|
||||
width1, height1);
|
||||
gdk_draw_image (drawable, gc, image,
|
||||
gdk_draw_image (real_drawable, gc, image,
|
||||
xs0, ys0,
|
||||
dest_x + x0, dest_y + y0,
|
||||
width1, height1);
|
||||
@@ -1686,7 +1745,7 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
|
||||
{
|
||||
guchar *buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 4;
|
||||
|
||||
gdk_draw_rgb_32_image_dithalign (drawable, gc,
|
||||
gdk_draw_rgb_32_image_dithalign (real_drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
@@ -1697,7 +1756,7 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
|
||||
{
|
||||
guchar *buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
|
||||
|
||||
gdk_draw_rgb_image_dithalign (drawable, gc,
|
||||
gdk_draw_rgb_image_dithalign (real_drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
@@ -1771,5 +1830,81 @@ _gdk_drawable_get_scratch_gc (GdkDrawable *drawable,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* _gdk_drawable_get_subwindow_scratch_gc:
|
||||
* @drawable: A #GdkDrawable
|
||||
*
|
||||
* Returns a #GdkGC suitable for drawing on @drawable. The #GdkGC has
|
||||
* the standard values for @drawable, except for the graphics_exposures
|
||||
* field which is %TRUE and the subwindow mode which is %GDK_INCLUDE_INFERIORS.
|
||||
*
|
||||
* The foreground color of the returned #GdkGC is undefined. The #GdkGC
|
||||
* must not be altered in any way, except to change its foreground color.
|
||||
*
|
||||
* Return value: A #GdkGC suitable for drawing on @drawable
|
||||
*
|
||||
* Since: 2.18
|
||||
**/
|
||||
GdkGC *
|
||||
_gdk_drawable_get_subwindow_scratch_gc (GdkDrawable *drawable)
|
||||
{
|
||||
GdkScreen *screen;
|
||||
gint depth;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
|
||||
|
||||
screen = gdk_drawable_get_screen (drawable);
|
||||
|
||||
g_return_val_if_fail (!screen->closed, NULL);
|
||||
|
||||
depth = gdk_drawable_get_depth (drawable) - 1;
|
||||
|
||||
if (!screen->subwindow_gcs[depth])
|
||||
{
|
||||
GdkGCValues values;
|
||||
GdkGCValuesMask mask;
|
||||
|
||||
values.graphics_exposures = TRUE;
|
||||
values.subwindow_mode = GDK_INCLUDE_INFERIORS;
|
||||
mask = GDK_GC_EXPOSURES | GDK_GC_SUBWINDOW;
|
||||
|
||||
screen->subwindow_gcs[depth] =
|
||||
gdk_gc_new_with_values (drawable, &values, mask);
|
||||
}
|
||||
|
||||
return screen->subwindow_gcs[depth];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* _gdk_drawable_get_source_drawable:
|
||||
* @drawable: a #GdkDrawable
|
||||
*
|
||||
* Returns a drawable for the passed @drawable that is guaranteed to be
|
||||
* usable to create a pixmap (e.g.: not an offscreen window).
|
||||
*
|
||||
* Since: 2.16
|
||||
*/
|
||||
GdkDrawable *
|
||||
_gdk_drawable_get_source_drawable (GdkDrawable *drawable)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
|
||||
|
||||
if (GDK_DRAWABLE_GET_CLASS (drawable)->get_source_drawable)
|
||||
return GDK_DRAWABLE_GET_CLASS (drawable)->get_source_drawable (drawable);
|
||||
|
||||
return drawable;
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
_gdk_drawable_create_cairo_surface (GdkDrawable *drawable,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
return GDK_DRAWABLE_GET_CLASS (drawable)->create_cairo_surface (drawable,
|
||||
width, height);
|
||||
}
|
||||
|
||||
|
||||
#define __GDK_DRAW_C__
|
||||
#include "gdkaliasdef.c"
|
||||
|
||||
@@ -200,10 +200,27 @@ struct _GdkDrawableClass
|
||||
|
||||
cairo_surface_t *(*ref_cairo_surface) (GdkDrawable *drawable);
|
||||
|
||||
GdkDrawable *(*get_source_drawable) (GdkDrawable *drawable);
|
||||
|
||||
void (*set_cairo_clip) (GdkDrawable *drawable,
|
||||
cairo_t *cr);
|
||||
|
||||
cairo_surface_t * (*create_cairo_surface) (GdkDrawable *drawable,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
void (*draw_drawable_with_src) (GdkDrawable *drawable,
|
||||
GdkGC *gc,
|
||||
GdkDrawable *src,
|
||||
gint xsrc,
|
||||
gint ysrc,
|
||||
gint xdest,
|
||||
gint ydest,
|
||||
gint width,
|
||||
gint height,
|
||||
GdkDrawable *original_src);
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_gdk_reserved4) (void);
|
||||
void (*_gdk_reserved5) (void);
|
||||
void (*_gdk_reserved6) (void);
|
||||
void (*_gdk_reserved7) (void);
|
||||
void (*_gdk_reserved9) (void);
|
||||
void (*_gdk_reserved10) (void);
|
||||
@@ -212,7 +229,6 @@ struct _GdkDrawableClass
|
||||
void (*_gdk_reserved13) (void);
|
||||
void (*_gdk_reserved14) (void);
|
||||
void (*_gdk_reserved15) (void);
|
||||
void (*_gdk_reserved16) (void);
|
||||
};
|
||||
|
||||
struct _GdkTrapezoid
|
||||
|
||||
@@ -120,6 +120,63 @@ _gdk_event_queue_append (GdkDisplay *display,
|
||||
return display->queued_tail;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gdk_event_queue_insert_after:
|
||||
* @display: a #GdkDisplay
|
||||
* @sibling: Append after this event.
|
||||
* @event: Event to append.
|
||||
*
|
||||
* Appends an event after the specified event, or if it isn't in
|
||||
* the queue, onto the tail of the event queue.
|
||||
*
|
||||
* Returns: the newly appended list node.
|
||||
*
|
||||
* Since: 2.16
|
||||
*/
|
||||
GList*
|
||||
_gdk_event_queue_insert_after (GdkDisplay *display,
|
||||
GdkEvent *sibling,
|
||||
GdkEvent *event)
|
||||
{
|
||||
GList *prev = g_list_find (display->queued_events, sibling);
|
||||
if (prev && prev->next)
|
||||
{
|
||||
display->queued_events = g_list_insert_before (display->queued_events, prev->next, event);
|
||||
return prev->next;
|
||||
}
|
||||
else
|
||||
return _gdk_event_queue_append (display, event);
|
||||
}
|
||||
|
||||
/**
|
||||
* _gdk_event_queue_insert_after:
|
||||
* @display: a #GdkDisplay
|
||||
* @sibling: Append after this event.
|
||||
* @event: Event to append.
|
||||
*
|
||||
* Appends an event before the specified event, or if it isn't in
|
||||
* the queue, onto the tail of the event queue.
|
||||
*
|
||||
* Returns: the newly appended list node.
|
||||
*
|
||||
* Since: 2.16
|
||||
*/
|
||||
GList*
|
||||
_gdk_event_queue_insert_before (GdkDisplay *display,
|
||||
GdkEvent *sibling,
|
||||
GdkEvent *event)
|
||||
{
|
||||
GList *next = g_list_find (display->queued_events, sibling);
|
||||
if (next)
|
||||
{
|
||||
display->queued_events = g_list_insert_before (display->queued_events, next, event);
|
||||
return next->prev;
|
||||
}
|
||||
else
|
||||
return _gdk_event_queue_append (display, event);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* _gdk_event_queue_remove_link:
|
||||
* @display: a #GdkDisplay
|
||||
@@ -575,6 +632,7 @@ gdk_event_get_time (const GdkEvent *event)
|
||||
case GDK_SETTING:
|
||||
case GDK_OWNER_CHANGE:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_EVENT_LAST:
|
||||
/* return current time */
|
||||
break;
|
||||
}
|
||||
@@ -653,6 +711,7 @@ gdk_event_get_state (const GdkEvent *event,
|
||||
case GDK_SETTING:
|
||||
case GDK_OWNER_CHANGE:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_EVENT_LAST:
|
||||
/* no state field */
|
||||
break;
|
||||
}
|
||||
@@ -884,9 +943,17 @@ gdk_event_get_axis (const GdkEvent *event,
|
||||
void
|
||||
gdk_event_request_motions (const GdkEventMotion *event)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
|
||||
g_return_if_fail (event != NULL);
|
||||
|
||||
if (event->type == GDK_MOTION_NOTIFY && event->is_hint)
|
||||
gdk_device_get_state (event->device, event->window, NULL, NULL);
|
||||
{
|
||||
gdk_device_get_state (event->device, event->window, NULL, NULL);
|
||||
|
||||
display = gdk_drawable_get_display (event->window);
|
||||
_gdk_display_enable_motion_hints (display);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1101,13 +1168,16 @@ gdk_synthesize_click (GdkDisplay *display,
|
||||
gint nclicks)
|
||||
{
|
||||
GdkEvent temp_event;
|
||||
GdkEvent *event_copy;
|
||||
GList *link;
|
||||
|
||||
g_return_if_fail (event != NULL);
|
||||
|
||||
temp_event = *event;
|
||||
temp_event.type = (nclicks == 2) ? GDK_2BUTTON_PRESS : GDK_3BUTTON_PRESS;
|
||||
|
||||
gdk_display_put_event (display, &temp_event);
|
||||
|
||||
event_copy = gdk_event_copy (&temp_event);
|
||||
link = _gdk_event_queue_append (display, event_copy);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1196,6 +1266,9 @@ gdk_synthesize_window_state (GdkWindow *window,
|
||||
|
||||
((GdkWindowObject*) window)->state = temp_event.window_state.new_window_state;
|
||||
|
||||
if (temp_event.window_state.changed_mask & GDK_WINDOW_STATE_WITHDRAWN)
|
||||
_gdk_window_update_viewable (window);
|
||||
|
||||
/* We only really send the event to toplevels, since
|
||||
* all the window states don't apply to non-toplevels.
|
||||
* Non-toplevels do use the GDK_WINDOW_STATE_WITHDRAWN flag
|
||||
|
||||
@@ -151,7 +151,8 @@ typedef enum
|
||||
GDK_SETTING = 33,
|
||||
GDK_OWNER_CHANGE = 34,
|
||||
GDK_GRAB_BROKEN = 35,
|
||||
GDK_DAMAGE = 36
|
||||
GDK_DAMAGE = 36,
|
||||
GDK_EVENT_LAST /* helper variable for decls */
|
||||
} GdkEventType;
|
||||
|
||||
/* Event masks. (Used to select what types of events a window
|
||||
|
||||
277
gdk/gdkgc.c
277
gdk/gdkgc.c
@@ -43,12 +43,24 @@ struct _GdkGCPrivate
|
||||
{
|
||||
GdkRegion *clip_region;
|
||||
|
||||
GdkFill fill;
|
||||
guint32 region_tag_applied;
|
||||
int region_tag_offset_x;
|
||||
int region_tag_offset_y;
|
||||
|
||||
GdkRegion *old_clip_region;
|
||||
GdkPixmap *old_clip_mask;
|
||||
|
||||
GdkBitmap *stipple;
|
||||
GdkPixmap *tile;
|
||||
|
||||
|
||||
GdkPixmap *clip_mask;
|
||||
|
||||
guint32 fg_pixel;
|
||||
guint32 bg_pixel;
|
||||
|
||||
guint subwindow_mode : 1;
|
||||
guint fill : 2;
|
||||
guint exposures : 2;
|
||||
};
|
||||
|
||||
#define GDK_GC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDK_TYPE_GC, GdkGCPrivate))
|
||||
@@ -150,6 +162,8 @@ _gdk_gc_init (GdkGC *gc,
|
||||
gc->clip_x_origin = values->clip_x_origin;
|
||||
if (values_mask & GDK_GC_CLIP_Y_ORIGIN)
|
||||
gc->clip_y_origin = values->clip_y_origin;
|
||||
if ((values_mask & GDK_GC_CLIP_MASK) && values->clip_mask)
|
||||
priv->clip_mask = g_object_ref (values->clip_mask);
|
||||
if (values_mask & GDK_GC_TS_X_ORIGIN)
|
||||
gc->ts_x_origin = values->ts_x_origin;
|
||||
if (values_mask & GDK_GC_TS_Y_ORIGIN)
|
||||
@@ -172,6 +186,12 @@ _gdk_gc_init (GdkGC *gc,
|
||||
priv->fg_pixel = values->foreground.pixel;
|
||||
if (values_mask & GDK_GC_BACKGROUND)
|
||||
priv->bg_pixel = values->background.pixel;
|
||||
if (values_mask & GDK_GC_SUBWINDOW)
|
||||
priv->subwindow_mode = values->subwindow_mode;
|
||||
if (values_mask & GDK_GC_EXPOSURES)
|
||||
priv->exposures = values->graphics_exposures;
|
||||
else
|
||||
priv->exposures = TRUE;
|
||||
|
||||
gc->colormap = gdk_drawable_get_colormap (drawable);
|
||||
if (gc->colormap)
|
||||
@@ -183,9 +203,15 @@ gdk_gc_finalize (GObject *object)
|
||||
{
|
||||
GdkGC *gc = GDK_GC (object);
|
||||
GdkGCPrivate *priv = GDK_GC_GET_PRIVATE (gc);
|
||||
|
||||
|
||||
if (priv->clip_region)
|
||||
gdk_region_destroy (priv->clip_region);
|
||||
if (priv->old_clip_region)
|
||||
gdk_region_destroy (priv->old_clip_region);
|
||||
if (priv->clip_mask)
|
||||
g_object_unref (priv->clip_mask);
|
||||
if (priv->old_clip_mask)
|
||||
g_object_unref (priv->old_clip_mask);
|
||||
if (gc->colormap)
|
||||
g_object_unref (gc->colormap);
|
||||
if (priv->tile)
|
||||
@@ -269,6 +295,12 @@ gdk_gc_set_values (GdkGC *gc,
|
||||
|
||||
priv = GDK_GC_GET_PRIVATE (gc);
|
||||
|
||||
if ((values_mask & GDK_GC_CLIP_X_ORIGIN) ||
|
||||
(values_mask & GDK_GC_CLIP_Y_ORIGIN) ||
|
||||
(values_mask & GDK_GC_CLIP_MASK) ||
|
||||
(values_mask & GDK_GC_SUBWINDOW))
|
||||
_gdk_gc_remove_drawable_clip (gc);
|
||||
|
||||
if (values_mask & GDK_GC_CLIP_X_ORIGIN)
|
||||
gc->clip_x_origin = values->clip_x_origin;
|
||||
if (values_mask & GDK_GC_CLIP_Y_ORIGIN)
|
||||
@@ -279,6 +311,14 @@ gdk_gc_set_values (GdkGC *gc,
|
||||
gc->ts_y_origin = values->ts_y_origin;
|
||||
if (values_mask & GDK_GC_CLIP_MASK)
|
||||
{
|
||||
if (priv->clip_mask)
|
||||
{
|
||||
g_object_unref (priv->clip_mask);
|
||||
priv->clip_mask = NULL;
|
||||
}
|
||||
if (values->clip_mask)
|
||||
priv->clip_mask = g_object_ref (values->clip_mask);
|
||||
|
||||
if (priv->clip_region)
|
||||
{
|
||||
gdk_region_destroy (priv->clip_region);
|
||||
@@ -313,6 +353,10 @@ gdk_gc_set_values (GdkGC *gc,
|
||||
priv->fg_pixel = values->foreground.pixel;
|
||||
if (values_mask & GDK_GC_BACKGROUND)
|
||||
priv->bg_pixel = values->background.pixel;
|
||||
if (values_mask & GDK_GC_SUBWINDOW)
|
||||
priv->subwindow_mode = values->subwindow_mode;
|
||||
if (values_mask & GDK_GC_EXPOSURES)
|
||||
priv->exposures = values->graphics_exposures;
|
||||
|
||||
GDK_GC_GET_CLASS (gc)->set_values (gc, values, values_mask);
|
||||
}
|
||||
@@ -542,18 +586,159 @@ gdk_gc_set_clip_mask (GdkGC *gc,
|
||||
gdk_gc_set_values (gc, &values, GDK_GC_CLIP_MASK);
|
||||
}
|
||||
|
||||
/* Takes ownership of passed in region */
|
||||
static void
|
||||
_gdk_gc_set_clip_region_internal (GdkGC *gc,
|
||||
GdkRegion *region)
|
||||
_gdk_gc_set_clip_region_real (GdkGC *gc,
|
||||
GdkRegion *region,
|
||||
gboolean reset_origin)
|
||||
{
|
||||
GdkGCPrivate *priv = GDK_GC_GET_PRIVATE (gc);
|
||||
|
||||
if (priv->clip_mask)
|
||||
{
|
||||
g_object_unref (priv->clip_mask);
|
||||
priv->clip_mask = NULL;
|
||||
}
|
||||
|
||||
if (priv->clip_region)
|
||||
gdk_region_destroy (priv->clip_region);
|
||||
|
||||
priv->clip_region = region;
|
||||
|
||||
_gdk_windowing_gc_set_clip_region (gc, region);
|
||||
_gdk_windowing_gc_set_clip_region (gc, region, reset_origin);
|
||||
}
|
||||
|
||||
/* Doesn't copy region, allows not to reset origin */
|
||||
void
|
||||
_gdk_gc_set_clip_region_internal (GdkGC *gc,
|
||||
GdkRegion *region,
|
||||
gboolean reset_origin)
|
||||
{
|
||||
_gdk_gc_remove_drawable_clip (gc);
|
||||
_gdk_gc_set_clip_region_real (gc, region, reset_origin);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_gdk_gc_add_drawable_clip (GdkGC *gc,
|
||||
guint32 region_tag,
|
||||
GdkRegion *region,
|
||||
int offset_x,
|
||||
int offset_y)
|
||||
{
|
||||
GdkGCPrivate *priv = GDK_GC_GET_PRIVATE (gc);
|
||||
|
||||
if (priv->region_tag_applied == region_tag &&
|
||||
offset_x == priv->region_tag_offset_x &&
|
||||
offset_y == priv->region_tag_offset_y)
|
||||
return; /* Already appied this drawable region */
|
||||
|
||||
if (priv->region_tag_applied)
|
||||
_gdk_gc_remove_drawable_clip (gc);
|
||||
|
||||
region = gdk_region_copy (region);
|
||||
if (offset_x != 0 || offset_y != 0)
|
||||
gdk_region_offset (region, offset_x, offset_y);
|
||||
|
||||
if (priv->clip_mask)
|
||||
{
|
||||
int w, h;
|
||||
GdkPixmap *new_mask;
|
||||
GdkGC *tmp_gc;
|
||||
GdkColor black = {0, 0, 0, 0};
|
||||
GdkRectangle r;
|
||||
GdkOverlapType overlap;
|
||||
|
||||
gdk_drawable_get_size (priv->clip_mask, &w, &h);
|
||||
|
||||
r.x = 0;
|
||||
r.y = 0;
|
||||
r.width = w;
|
||||
r.height = h;
|
||||
|
||||
/* Its quite common to expose areas that are completely in or outside
|
||||
* the region, so we try to avoid allocating bitmaps that are just fully
|
||||
* set or completely unset.
|
||||
*/
|
||||
overlap = gdk_region_rect_in (region, &r);
|
||||
if (overlap == GDK_OVERLAP_RECTANGLE_PART)
|
||||
{
|
||||
/* The region and the mask intersect, create a new clip mask that
|
||||
includes both areas */
|
||||
priv->old_clip_mask = g_object_ref (priv->clip_mask);
|
||||
new_mask = gdk_pixmap_new (priv->old_clip_mask, w, h, -1);
|
||||
tmp_gc = _gdk_drawable_get_scratch_gc ((GdkDrawable *)new_mask, FALSE);
|
||||
|
||||
gdk_gc_set_foreground (tmp_gc, &black);
|
||||
gdk_draw_rectangle (new_mask, tmp_gc, TRUE, 0, 0, -1, -1);
|
||||
_gdk_gc_set_clip_region_internal (tmp_gc, region, TRUE); /* Takes ownership of region */
|
||||
gdk_draw_drawable (new_mask,
|
||||
tmp_gc,
|
||||
priv->old_clip_mask,
|
||||
0, 0,
|
||||
0, 0,
|
||||
-1, -1);
|
||||
gdk_gc_set_clip_region (tmp_gc, NULL);
|
||||
gdk_gc_set_clip_mask (gc, new_mask);
|
||||
}
|
||||
else if (overlap == GDK_OVERLAP_RECTANGLE_OUT)
|
||||
{
|
||||
/* No intersection, set empty clip region */
|
||||
GdkRegion *empty = gdk_region_new ();
|
||||
|
||||
gdk_region_destroy (region);
|
||||
priv->old_clip_mask = g_object_ref (priv->clip_mask);
|
||||
priv->clip_region = empty;
|
||||
_gdk_windowing_gc_set_clip_region (gc, empty, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Completely inside region, don't set unnecessary clip */
|
||||
gdk_region_destroy (region);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->old_clip_region = priv->clip_region;
|
||||
priv->clip_region = region;
|
||||
if (priv->old_clip_region)
|
||||
gdk_region_intersect (region, priv->old_clip_region);
|
||||
|
||||
_gdk_windowing_gc_set_clip_region (gc, priv->clip_region, FALSE);
|
||||
}
|
||||
|
||||
priv->region_tag_applied = region_tag;
|
||||
priv->region_tag_offset_x = offset_x;
|
||||
priv->region_tag_offset_y = offset_y;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_gc_remove_drawable_clip (GdkGC *gc)
|
||||
{
|
||||
GdkGCPrivate *priv = GDK_GC_GET_PRIVATE (gc);
|
||||
|
||||
if (priv->region_tag_applied)
|
||||
{
|
||||
priv->region_tag_applied = 0;
|
||||
if (priv->old_clip_mask)
|
||||
{
|
||||
gdk_gc_set_clip_mask (gc, priv->old_clip_mask);
|
||||
g_object_unref (priv->old_clip_mask);
|
||||
priv->old_clip_mask = NULL;
|
||||
|
||||
if (priv->clip_region)
|
||||
{
|
||||
g_object_unref (priv->clip_region);
|
||||
priv->clip_region = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_gdk_gc_set_clip_region_real (gc, priv->old_clip_region, FALSE);
|
||||
priv->old_clip_region = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -573,12 +758,14 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
|
||||
|
||||
g_return_if_fail (GDK_IS_GC (gc));
|
||||
|
||||
_gdk_gc_remove_drawable_clip (gc);
|
||||
|
||||
if (rectangle)
|
||||
region = gdk_region_rectangle (rectangle);
|
||||
else
|
||||
region = NULL;
|
||||
|
||||
_gdk_gc_set_clip_region_internal (gc, region);
|
||||
_gdk_gc_set_clip_region_real (gc, region, TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -598,12 +785,14 @@ gdk_gc_set_clip_region (GdkGC *gc,
|
||||
|
||||
g_return_if_fail (GDK_IS_GC (gc));
|
||||
|
||||
_gdk_gc_remove_drawable_clip (gc);
|
||||
|
||||
if (region)
|
||||
copy = gdk_region_copy (region);
|
||||
else
|
||||
copy = NULL;
|
||||
|
||||
_gdk_gc_set_clip_region_internal (gc, copy);
|
||||
_gdk_gc_set_clip_region_real (gc, copy, TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -624,6 +813,24 @@ _gdk_gc_get_clip_region (GdkGC *gc)
|
||||
return GDK_GC_GET_PRIVATE (gc)->clip_region;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gdk_gc_get_clip_mask:
|
||||
* @gc: a #GdkGC
|
||||
*
|
||||
* Gets the current clip mask for @gc, if any.
|
||||
*
|
||||
* Return value: the clip mask for the GC, or %NULL.
|
||||
* (if a clip region is set, the return will be %NULL)
|
||||
* This value is owned by the GC and must not be freed.
|
||||
**/
|
||||
GdkBitmap *
|
||||
_gdk_gc_get_clip_mask (GdkGC *gc)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_GC (gc), NULL);
|
||||
|
||||
return GDK_GC_GET_PRIVATE (gc)->clip_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gdk_gc_get_fill:
|
||||
* @gc: a #GdkGC
|
||||
@@ -640,6 +847,14 @@ _gdk_gc_get_fill (GdkGC *gc)
|
||||
return GDK_GC_GET_PRIVATE (gc)->fill;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_gc_get_exposures (GdkGC *gc)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_GC (gc), FALSE);
|
||||
|
||||
return GDK_GC_GET_PRIVATE (gc)->exposures;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gdk_gc_get_tile:
|
||||
* @gc: a #GdkGC
|
||||
@@ -723,13 +938,27 @@ gdk_gc_set_subwindow (GdkGC *gc,
|
||||
GdkSubwindowMode mode)
|
||||
{
|
||||
GdkGCValues values;
|
||||
GdkGCPrivate *priv = GDK_GC_GET_PRIVATE (gc);
|
||||
|
||||
g_return_if_fail (GDK_IS_GC (gc));
|
||||
|
||||
/* This could get called a lot to reset the subwindow mode in
|
||||
the client side clipping, so bail out early */
|
||||
if (priv->subwindow_mode == mode)
|
||||
return;
|
||||
|
||||
values.subwindow_mode = mode;
|
||||
gdk_gc_set_values (gc, &values, GDK_GC_SUBWINDOW);
|
||||
}
|
||||
|
||||
GdkSubwindowMode
|
||||
_gdk_gc_get_subwindow (GdkGC *gc)
|
||||
{
|
||||
GdkGCPrivate *priv = GDK_GC_GET_PRIVATE (gc);
|
||||
|
||||
return priv->subwindow_mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_gc_set_exposures:
|
||||
* @gc: a #GdkGC.
|
||||
@@ -890,6 +1119,26 @@ gdk_gc_copy (GdkGC *dst_gc,
|
||||
dst_priv->clip_region = gdk_region_copy (src_priv->clip_region);
|
||||
else
|
||||
dst_priv->clip_region = NULL;
|
||||
|
||||
dst_priv->region_tag_applied = src_priv->region_tag_applied;
|
||||
|
||||
if (dst_priv->old_clip_region)
|
||||
gdk_region_destroy (dst_priv->old_clip_region);
|
||||
|
||||
if (src_priv->old_clip_region)
|
||||
dst_priv->old_clip_region = gdk_region_copy (src_priv->old_clip_region);
|
||||
else
|
||||
dst_priv->old_clip_region = NULL;
|
||||
|
||||
if (src_priv->clip_mask)
|
||||
dst_priv->clip_mask = g_object_ref (src_priv->clip_mask);
|
||||
else
|
||||
dst_priv->clip_mask = NULL;
|
||||
|
||||
if (src_priv->old_clip_mask)
|
||||
dst_priv->old_clip_mask = g_object_ref (src_priv->old_clip_mask);
|
||||
else
|
||||
dst_priv->old_clip_mask = NULL;
|
||||
|
||||
dst_priv->fill = src_priv->fill;
|
||||
|
||||
@@ -907,6 +1156,8 @@ gdk_gc_copy (GdkGC *dst_gc,
|
||||
|
||||
dst_priv->fg_pixel = src_priv->fg_pixel;
|
||||
dst_priv->bg_pixel = src_priv->bg_pixel;
|
||||
dst_priv->subwindow_mode = src_priv->subwindow_mode;
|
||||
dst_priv->exposures = src_priv->exposures;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1117,6 +1368,8 @@ gc_get_background (GdkGC *gc,
|
||||
* the fill mode will be forced to %GDK_STIPPLED
|
||||
* @gc_changed: pass %FALSE if the @gc has not changed since the
|
||||
* last call to this function
|
||||
* @target_drawable: The drawable you're drawing in. If passed in
|
||||
* this is used for client side window clip emulation.
|
||||
*
|
||||
* Set the attributes of a cairo context to match those of a #GdkGC
|
||||
* as far as possible. Some aspects of a #GdkGC, such as clip masks
|
||||
@@ -1127,7 +1380,8 @@ _gdk_gc_update_context (GdkGC *gc,
|
||||
cairo_t *cr,
|
||||
const GdkColor *override_foreground,
|
||||
GdkBitmap *override_stipple,
|
||||
gboolean gc_changed)
|
||||
gboolean gc_changed,
|
||||
GdkDrawable *target_drawable)
|
||||
{
|
||||
GdkGCPrivate *priv;
|
||||
GdkFill fill;
|
||||
@@ -1232,6 +1486,10 @@ _gdk_gc_update_context (GdkGC *gc,
|
||||
return;
|
||||
|
||||
cairo_reset_clip (cr);
|
||||
/* The reset above resets the window clip rect, so we want to re-set that */
|
||||
if (target_drawable && GDK_DRAWABLE_GET_CLASS (target_drawable)->set_cairo_clip)
|
||||
GDK_DRAWABLE_GET_CLASS (target_drawable)->set_cairo_clip (target_drawable, cr);
|
||||
|
||||
if (priv->clip_region)
|
||||
{
|
||||
cairo_save (cr);
|
||||
@@ -1246,6 +1504,7 @@ _gdk_gc_update_context (GdkGC *gc,
|
||||
|
||||
cairo_clip (cr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ GList *_gdk_default_filters = NULL;
|
||||
gchar *_gdk_display_name = NULL;
|
||||
gint _gdk_screen_number = -1;
|
||||
gchar *_gdk_display_arg_name = NULL;
|
||||
gboolean _gdk_native_windows = FALSE;
|
||||
|
||||
GSList *_gdk_displays = NULL;
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ extern gint _gdk_error_code;
|
||||
extern gint _gdk_error_warnings;
|
||||
|
||||
extern guint _gdk_debug_flags;
|
||||
extern gboolean _gdk_native_windows;
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
||||
@@ -170,6 +171,112 @@ struct _GdkEventPrivate
|
||||
gpointer windowing_data;
|
||||
};
|
||||
|
||||
/* Tracks information about the pointer grab on this display */
|
||||
typedef struct
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkWindow *native_window;
|
||||
gulong serial_start;
|
||||
gulong serial_end; /* exclusive, i.e. not active on serial_end */
|
||||
gboolean owner_events;
|
||||
guint event_mask;
|
||||
gboolean implicit;
|
||||
guint32 time;
|
||||
|
||||
gboolean activated;
|
||||
gboolean implicit_ungrab;
|
||||
gboolean grab_one_pointer_release_event;
|
||||
} GdkPointerGrabInfo;
|
||||
|
||||
typedef struct _GdkInputWindow GdkInputWindow;
|
||||
|
||||
/* Private version of GdkWindowObject. The initial part of this strucuture
|
||||
is public for historical reasons. Don't change that part */
|
||||
typedef struct _GdkWindowPaint GdkWindowPaint;
|
||||
|
||||
struct _GdkWindowObject
|
||||
{
|
||||
/* vvvvvvv THIS PART IS PUBLIC. DON'T CHANGE vvvvvvvvvvvvvv */
|
||||
GdkDrawable parent_instance;
|
||||
|
||||
GdkDrawable *impl; /* window-system-specific delegate object */
|
||||
|
||||
GdkWindowObject *parent;
|
||||
|
||||
gpointer user_data;
|
||||
|
||||
gint x;
|
||||
gint y;
|
||||
|
||||
gint extension_events;
|
||||
|
||||
GList *filters;
|
||||
GList *children;
|
||||
|
||||
GdkColor bg_color;
|
||||
GdkPixmap *bg_pixmap;
|
||||
|
||||
GSList *paint_stack;
|
||||
|
||||
GdkRegion *update_area;
|
||||
guint update_freeze_count;
|
||||
|
||||
guint8 window_type;
|
||||
guint8 depth;
|
||||
guint8 resize_count;
|
||||
|
||||
GdkWindowState state;
|
||||
|
||||
guint guffaw_gravity : 1;
|
||||
guint input_only : 1;
|
||||
guint modal_hint : 1;
|
||||
guint composited : 1;
|
||||
|
||||
guint destroyed : 2;
|
||||
|
||||
guint accept_focus : 1;
|
||||
guint focus_on_map : 1;
|
||||
guint shaped : 1;
|
||||
|
||||
GdkEventMask event_mask;
|
||||
|
||||
guint update_and_descendants_freeze_count;
|
||||
|
||||
GdkWindowRedirect *redirect;
|
||||
|
||||
/* ^^^^^^^^^^ THIS PART IS PUBLIC. DON'T CHANGE ^^^^^^^^^^ */
|
||||
|
||||
/* The GdkWindowObject that has the impl, ref:ed if another window.
|
||||
* This ref is required to keep the wrapper of the impl window alive
|
||||
* for as long as any GdkWindow references the impl. */
|
||||
GdkWindowObject *impl_window;
|
||||
int abs_x, abs_y; /* Absolute offset in impl */
|
||||
gint width, height;
|
||||
guint32 clip_tag;
|
||||
GdkRegion *clip_region; /* Clip region (wrt toplevel) in window coords */
|
||||
GdkRegion *clip_region_with_children; /* Clip region in window coords */
|
||||
GdkCursor *cursor;
|
||||
gint8 toplevel_window_type;
|
||||
guint synthesize_crossing_event_queued : 1;
|
||||
guint effective_visibility : 2;
|
||||
guint visibility : 2; /* The visibility wrt the toplevel (i.e. based on clip_region) */
|
||||
guint native_visibility : 2; /* the native visibility of a impl windows */
|
||||
guint viewable : 1; /* mapped and all parents mapped */
|
||||
guint applied_shape : 1;
|
||||
|
||||
guint num_offscreen_children;
|
||||
GdkWindowPaint *implicit_paint;
|
||||
GdkInputWindow *input_window; /* only set for impl windows */
|
||||
|
||||
GList *outstanding_moves;
|
||||
|
||||
GdkRegion *shape;
|
||||
GdkRegion *input_shape;
|
||||
|
||||
cairo_surface_t *cairo_surface;
|
||||
};
|
||||
|
||||
|
||||
extern GdkEventFunc _gdk_event_func; /* Callback for events */
|
||||
extern gpointer _gdk_event_data;
|
||||
extern GDestroyNotify _gdk_event_notify;
|
||||
@@ -182,15 +289,21 @@ extern gchar *_gdk_display_arg_name;
|
||||
void _gdk_events_queue (GdkDisplay *display);
|
||||
GdkEvent* _gdk_event_unqueue (GdkDisplay *display);
|
||||
|
||||
GList* _gdk_event_queue_find_first (GdkDisplay *display);
|
||||
void _gdk_event_queue_remove_link (GdkDisplay *display,
|
||||
GList *node);
|
||||
GList* _gdk_event_queue_prepend (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
GList* _gdk_event_queue_append (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
void _gdk_event_button_generate (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
GList* _gdk_event_queue_find_first (GdkDisplay *display);
|
||||
void _gdk_event_queue_remove_link (GdkDisplay *display,
|
||||
GList *node);
|
||||
GList* _gdk_event_queue_prepend (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
GList* _gdk_event_queue_append (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
GList* _gdk_event_queue_insert_after (GdkDisplay *display,
|
||||
GdkEvent *after_event,
|
||||
GdkEvent *event);
|
||||
GList* _gdk_event_queue_insert_before(GdkDisplay *display,
|
||||
GdkEvent *after_event,
|
||||
GdkEvent *event);
|
||||
void _gdk_event_button_generate (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
|
||||
void _gdk_windowing_event_data_copy (const GdkEvent *src,
|
||||
GdkEvent *dst);
|
||||
@@ -227,28 +340,60 @@ GdkImage *_gdk_drawable_copy_to_image (GdkDrawable *drawable,
|
||||
|
||||
cairo_surface_t *_gdk_drawable_ref_cairo_surface (GdkDrawable *drawable);
|
||||
|
||||
GdkDrawable *_gdk_drawable_get_source_drawable (GdkDrawable *drawable);
|
||||
cairo_surface_t * _gdk_drawable_create_cairo_surface (GdkDrawable *drawable,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
/* GC caching */
|
||||
GdkGC *_gdk_drawable_get_scratch_gc (GdkDrawable *drawable,
|
||||
gboolean graphics_exposures);
|
||||
GdkGC *_gdk_drawable_get_subwindow_scratch_gc (GdkDrawable *drawable);
|
||||
|
||||
void _gdk_gc_update_context (GdkGC *gc,
|
||||
cairo_t *cr,
|
||||
const GdkColor *override_foreground,
|
||||
GdkBitmap *override_stipple,
|
||||
gboolean gc_changed);
|
||||
gboolean gc_changed,
|
||||
GdkDrawable *target_drawable);
|
||||
|
||||
/*************************************
|
||||
* Interfaces used by windowing code *
|
||||
*************************************/
|
||||
|
||||
GdkWindow *_gdk_window_new (GdkWindow *window,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask);
|
||||
void _gdk_window_destroy (GdkWindow *window,
|
||||
gboolean foreign_destroy);
|
||||
void _gdk_window_clear_update_area (GdkWindow *window);
|
||||
GdkPixmap *_gdk_pixmap_new (GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth);
|
||||
GdkPixmap *_gdk_pixmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth,
|
||||
const GdkColor *fg,
|
||||
const GdkColor *bg);
|
||||
GdkPixmap *_gdk_bitmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
void _gdk_screen_close (GdkScreen *screen);
|
||||
void _gdk_window_impl_new (GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkScreen *screen,
|
||||
GdkVisual *visual,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask);
|
||||
void _gdk_window_destroy (GdkWindow *window,
|
||||
gboolean foreign_destroy);
|
||||
void _gdk_window_clear_update_area (GdkWindow *window);
|
||||
void _gdk_window_update_size (GdkWindow *window);
|
||||
gboolean _gdk_window_update_viewable (GdkWindow *window);
|
||||
|
||||
void _gdk_window_process_updates_recurse (GdkWindow *window,
|
||||
GdkRegion *expose_region);
|
||||
|
||||
void _gdk_screen_close (GdkScreen *screen);
|
||||
|
||||
const char *_gdk_get_sm_client_id (void);
|
||||
|
||||
@@ -258,11 +403,23 @@ void _gdk_gc_init (GdkGC *gc,
|
||||
GdkGCValuesMask values_mask);
|
||||
|
||||
GdkRegion *_gdk_gc_get_clip_region (GdkGC *gc);
|
||||
GdkBitmap *_gdk_gc_get_clip_mask (GdkGC *gc);
|
||||
gboolean _gdk_gc_get_exposures (GdkGC *gc);
|
||||
GdkFill _gdk_gc_get_fill (GdkGC *gc);
|
||||
GdkPixmap *_gdk_gc_get_tile (GdkGC *gc);
|
||||
GdkBitmap *_gdk_gc_get_stipple (GdkGC *gc);
|
||||
guint32 _gdk_gc_get_fg_pixel (GdkGC *gc);
|
||||
guint32 _gdk_gc_get_bg_pixel (GdkGC *gc);
|
||||
void _gdk_gc_add_drawable_clip (GdkGC *gc,
|
||||
guint32 region_tag,
|
||||
GdkRegion *region,
|
||||
int offset_x,
|
||||
int offset_y);
|
||||
void _gdk_gc_remove_drawable_clip (GdkGC *gc);
|
||||
void _gdk_gc_set_clip_region_internal (GdkGC *gc,
|
||||
GdkRegion *region,
|
||||
gboolean reset_origin);
|
||||
GdkSubwindowMode _gdk_gc_get_subwindow (GdkGC *gc);
|
||||
|
||||
/*****************************************
|
||||
* Interfaces provided by windowing code *
|
||||
@@ -284,60 +441,49 @@ void _gdk_windowing_set_default_display (GdkDisplay *display);
|
||||
gchar *_gdk_windowing_substitute_screen_number (const gchar *display_name,
|
||||
gint screen_number);
|
||||
|
||||
gulong _gdk_windowing_window_get_next_serial (GdkDisplay *display);
|
||||
void _gdk_windowing_window_get_offsets (GdkWindow *window,
|
||||
gint *x_offset,
|
||||
gint *y_offset);
|
||||
GdkRegion *_gdk_windowing_window_get_shape (GdkWindow *window);
|
||||
GdkRegion *_gdk_windowing_window_get_input_shape(GdkWindow *window);
|
||||
GdkRegion *_gdk_windowing_get_shape_for_mask (GdkBitmap *mask);
|
||||
void _gdk_windowing_window_beep (GdkWindow *window);
|
||||
|
||||
|
||||
void _gdk_windowing_get_pointer (GdkDisplay *display,
|
||||
GdkScreen **screen,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
GdkWindow* _gdk_windowing_window_get_pointer (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
GdkWindow* _gdk_windowing_window_at_pointer (GdkDisplay *display,
|
||||
gint *win_x,
|
||||
gint *win_y);
|
||||
gint *win_y,
|
||||
GdkModifierType *mask);
|
||||
GdkGrabStatus _gdk_windowing_pointer_grab (GdkWindow *window,
|
||||
GdkWindow *native,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time);
|
||||
void _gdk_windowing_got_event (GdkDisplay *display,
|
||||
GList *event_link,
|
||||
GdkEvent *event,
|
||||
gulong serial);
|
||||
|
||||
void _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
|
||||
GdkRegion *expose_region);
|
||||
void _gdk_windowing_before_process_all_updates (void);
|
||||
void _gdk_windowing_after_process_all_updates (void);
|
||||
|
||||
/* Return the number of bits-per-pixel for images of the specified depth. */
|
||||
gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
|
||||
gint depth);
|
||||
|
||||
void _gdk_window_reparent (GdkWindow *window,
|
||||
GdkWindow *new_parent,
|
||||
gint x,
|
||||
gint y);
|
||||
|
||||
#define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
|
||||
|
||||
/* Called before processing updates for a window. This gives the windowing
|
||||
* layer a chance to save the region for later use in avoiding duplicate
|
||||
* exposes. The return value indicates whether the function has a saved
|
||||
* the region; if the result is TRUE, then the windowing layer is responsible
|
||||
* for destroying the region later.
|
||||
*/
|
||||
gboolean _gdk_windowing_window_queue_antiexpose (GdkWindow *window,
|
||||
GdkRegion *area);
|
||||
|
||||
/* Called to do the windowing system specific part of gdk_window_destroy(),
|
||||
*
|
||||
* window: The window being destroyed
|
||||
* recursing: If TRUE, then this is being called because a parent
|
||||
* was destroyed. This generally means that the call to the windowing system
|
||||
* to destroy the window can be omitted, since it will be destroyed as a result
|
||||
* of the parent being destroyed. Unless @foreign_destroy
|
||||
*
|
||||
* foreign_destroy: If TRUE, the window or a parent was destroyed by some external
|
||||
* agency. The window has already been destroyed and no windowing
|
||||
* system calls should be made. (This may never happen for some
|
||||
* windowing systems.)
|
||||
*/
|
||||
void _gdk_windowing_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy);
|
||||
|
||||
/* Called when gdk_window_destroy() is called on a foreign window
|
||||
* or an ancestor of the foreign window. It should generally reparent
|
||||
@@ -365,15 +511,9 @@ struct _GdkPaintableIface
|
||||
GTypeInterface g_iface;
|
||||
|
||||
void (* begin_paint_region) (GdkPaintable *paintable,
|
||||
GdkWindow *window,
|
||||
const GdkRegion *region);
|
||||
void (* end_paint) (GdkPaintable *paintable);
|
||||
|
||||
void (* invalidate_maybe_recurse) (GdkPaintable *paintable,
|
||||
const GdkRegion *region,
|
||||
gboolean (*child_func) (GdkWindow *, gpointer),
|
||||
gpointer user_data);
|
||||
void (* process_updates) (GdkPaintable *paintable,
|
||||
gboolean update_children);
|
||||
};
|
||||
|
||||
GType _gdk_paintable_get_type (void) G_GNUC_CONST;
|
||||
@@ -387,6 +527,7 @@ GType _gdk_pixmap_impl_get_type (void) G_GNUC_CONST;
|
||||
* _gdk_windowing_gc_set_clip_region:
|
||||
* @gc: a #GdkGC
|
||||
* @region: the new clip region
|
||||
* @reset_origin: if TRUE, reset the clip_x/y_origin values to 0
|
||||
*
|
||||
* Do any window-system specific processing necessary
|
||||
* for a change in clip region. Since the clip origin
|
||||
@@ -398,7 +539,8 @@ GType _gdk_pixmap_impl_get_type (void) G_GNUC_CONST;
|
||||
* will already return the new region.
|
||||
**/
|
||||
void _gdk_windowing_gc_set_clip_region (GdkGC *gc,
|
||||
const GdkRegion *region);
|
||||
const GdkRegion *region,
|
||||
gboolean reset_origin);
|
||||
|
||||
/**
|
||||
* _gdk_windowing_gc_copy:
|
||||
@@ -435,6 +577,100 @@ char *_gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
void _gdk_windowing_launch_failed (GAppLaunchContext *context,
|
||||
const char *startup_notify_id);
|
||||
|
||||
GdkPointerGrabInfo *_gdk_display_get_active_pointer_grab (GdkDisplay *display);
|
||||
void _gdk_display_pointer_grab_update (GdkDisplay *display,
|
||||
gulong current_serial);
|
||||
GdkPointerGrabInfo *_gdk_display_get_last_pointer_grab (GdkDisplay *display);
|
||||
GdkPointerGrabInfo *_gdk_display_add_pointer_grab (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *native_window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
unsigned long serial_start,
|
||||
guint32 time,
|
||||
gboolean implicit);
|
||||
GdkPointerGrabInfo * _gdk_display_has_pointer_grab (GdkDisplay *display,
|
||||
gulong serial);
|
||||
gboolean _gdk_display_end_pointer_grab (GdkDisplay *display,
|
||||
gulong serial,
|
||||
GdkWindow *if_child,
|
||||
gboolean implicit);
|
||||
void _gdk_display_set_has_keyboard_grab (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *native_window,
|
||||
gboolean owner_events,
|
||||
unsigned long serial,
|
||||
guint32 time);
|
||||
void _gdk_display_unset_has_keyboard_grab (GdkDisplay *display,
|
||||
gboolean implicit);
|
||||
void _gdk_display_enable_motion_hints (GdkDisplay *display);
|
||||
|
||||
|
||||
void _gdk_window_invalidate_for_expose (GdkWindow *window,
|
||||
GdkRegion *region);
|
||||
|
||||
void _gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
cairo_surface_t * _gdk_windowing_create_cairo_surface (GdkDrawable *drawable,
|
||||
int width,
|
||||
int height);
|
||||
GdkWindow * _gdk_window_find_child_at (GdkWindow *window,
|
||||
int x, int y);
|
||||
GdkWindow * _gdk_window_find_descendant_at (GdkWindow *toplevel,
|
||||
double x, double y,
|
||||
double *found_x,
|
||||
double *found_y);
|
||||
|
||||
void _gdk_window_add_damage (GdkWindow *toplevel,
|
||||
GdkRegion *damaged_region);
|
||||
|
||||
GdkEvent * _gdk_make_event (GdkWindow *window,
|
||||
GdkEventType type,
|
||||
GdkEvent *event_in_queue,
|
||||
gboolean before_event);
|
||||
|
||||
void _gdk_synthesize_crossing_events (GdkDisplay *display,
|
||||
GdkWindow *src,
|
||||
GdkWindow *dest,
|
||||
GdkCrossingMode mode,
|
||||
gint toplevel_x,
|
||||
gint toplevel_y,
|
||||
GdkModifierType mask,
|
||||
guint32 time_,
|
||||
GdkEvent *event_in_queue,
|
||||
gulong serial,
|
||||
gboolean non_linear);
|
||||
void _gdk_display_set_window_under_pointer (GdkDisplay *display,
|
||||
GdkWindow *window);
|
||||
|
||||
|
||||
void _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window);
|
||||
|
||||
GdkRegion *_gdk_window_calculate_full_clip_region (GdkWindow *window,
|
||||
GdkWindow *base_window,
|
||||
gboolean do_children,
|
||||
gint *base_x_offset,
|
||||
gint *base_y_offset);
|
||||
gboolean _gdk_window_has_impl (GdkWindow *window);
|
||||
GdkWindow * _gdk_window_get_impl_window (GdkWindow *window);
|
||||
GdkWindow *_gdk_window_get_input_window_for_event (GdkWindow *native_window,
|
||||
GdkEventType event_type,
|
||||
int x, int y,
|
||||
gulong serial);
|
||||
GdkRegion *_gdk_region_new_from_yxbanded_rects (GdkRectangle *rects, int n_rects);
|
||||
|
||||
/*****************************
|
||||
* offscreen window routines *
|
||||
*****************************/
|
||||
GType gdk_offscreen_window_get_type (void);
|
||||
void _gdk_offscreen_window_new (GdkWindow *window,
|
||||
GdkScreen *screen,
|
||||
GdkVisual *visual,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask);
|
||||
|
||||
|
||||
/************************************
|
||||
* Initialization and exit routines *
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
VOID:OBJECT
|
||||
VOID:BOOLEAN
|
||||
VOID:POINTER,POINTER,POINTER
|
||||
OBJECT:VOID
|
||||
OBJECT:DOUBLE,DOUBLE
|
||||
VOID:DOUBLE,DOUBLE,POINTER,POINTER
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user