Compare commits
902 Commits
touch-sele
...
wip/cssnod
Author | SHA1 | Date | |
---|---|---|---|
|
1af58dc4ee | ||
|
cb1cf06744 | ||
|
c5d00ae119 | ||
|
15582ef9c1 | ||
|
0e57785af7 | ||
|
52f58f1637 | ||
|
cd87252130 | ||
|
85d86d61de | ||
|
0d01ceb415 | ||
|
aa005486de | ||
|
cdd26d0d01 | ||
|
f408c59869 | ||
|
4326e38b90 | ||
|
0f488064a2 | ||
|
e6c7e038c8 | ||
|
18bd973014 | ||
|
dae2d9ec27 | ||
|
c0c79eee03 | ||
|
3f13349f27 | ||
|
d6bfc2b9c9 | ||
|
fa1bb8972a | ||
|
8e82d0fba2 | ||
|
7b1ff7c215 | ||
|
3211e82b59 | ||
|
6c8c37abbb | ||
|
d5160bb950 | ||
|
a59fd4a9ad | ||
|
4d0e1e0b88 | ||
|
d48ba486ee | ||
|
7dac38f841 | ||
|
ec57c6c10b | ||
|
d55c261079 | ||
|
8640bc47b1 | ||
|
d0d9f5a302 | ||
|
10d39171d9 | ||
|
6988f9b818 | ||
|
c7fba52a36 | ||
|
7395dddd47 | ||
|
d785820c53 | ||
|
759d8dafd9 | ||
|
d9727290cf | ||
|
68b8f792d6 | ||
|
776d99ac51 | ||
|
092ff983f7 | ||
|
df51bc836b | ||
|
3d1e2a0558 | ||
|
399df06d19 | ||
|
6dd19306eb | ||
|
f43543165b | ||
|
2954417335 | ||
|
172f345d01 | ||
|
fbe796f293 | ||
|
2ec26cd9b5 | ||
|
4b2cdb37fb | ||
|
dbe5058b86 | ||
|
5833858abf | ||
|
ceaa594fa4 | ||
|
cadf6a9d3c | ||
|
16b8972bee | ||
|
c0f6e746a0 | ||
|
13fd368781 | ||
|
75b633ae08 | ||
|
da25771e58 | ||
|
e95985da26 | ||
|
6f9969f4fe | ||
|
b827725ace | ||
|
6c00eba7fb | ||
|
d3471508a0 | ||
|
9b73b39f9a | ||
|
2670ae4436 | ||
|
2694545468 | ||
|
ee91fb71ca | ||
|
b92fe2fa85 | ||
|
507016cafc | ||
|
310f9f40da | ||
|
ee6d081ed9 | ||
|
89115be3cb | ||
|
2a5194b635 | ||
|
2143abe5ee | ||
|
76ca9a9181 | ||
|
2bf7bdd651 | ||
|
630f0f199e | ||
|
5df01f9244 | ||
|
5edc6d94d1 | ||
|
ffb410f11e | ||
|
28043f0a92 | ||
|
efda30c495 | ||
|
020f3f11c8 | ||
|
cdd964a3af | ||
|
5f19f09ac3 | ||
|
caf2fc9a10 | ||
|
219e52f7e1 | ||
|
71813671ef | ||
|
c550cf122a | ||
|
649edbe2fc | ||
|
c4b88e05fd | ||
|
637a4bda5c | ||
|
03ac5f310b | ||
|
6dc6af674c | ||
|
4cc2af2db1 | ||
|
8e1017db35 | ||
|
55e68bc2ea | ||
|
a589f98821 | ||
|
721dce73e0 | ||
|
8c73799ca8 | ||
|
7bafb63ec3 | ||
|
d79a44c1af | ||
|
6f99a3cdb0 | ||
|
0e3da2f7cf | ||
|
b9f1f8aa38 | ||
|
21c3b13596 | ||
|
40d94fcd38 | ||
|
e2f6d4db43 | ||
|
726d8abb7d | ||
|
cf6d9edc12 | ||
|
be596f3967 | ||
|
99c4f2dd39 | ||
|
0529e15d61 | ||
|
dcfa55ac7e | ||
|
28063ee2e4 | ||
|
416c370da1 | ||
|
d823c39caf | ||
|
00544e9090 | ||
|
3d3591e873 | ||
|
49b6be4e06 | ||
|
557f5d5c7c | ||
|
bcddf68858 | ||
|
75105f94f0 | ||
|
f671cd6296 | ||
|
9b5fa0860f | ||
|
390dd37656 | ||
|
88a5959b22 | ||
|
27164484cd | ||
|
6f478db2fa | ||
|
d5d28a5062 | ||
|
4e930ada32 | ||
|
c7672699e9 | ||
|
855c4dc0ce | ||
|
70e7b4c848 | ||
|
b4b23580a6 | ||
|
b4e61b759b | ||
|
f5f6ad9981 | ||
|
2e272106ef | ||
|
2d013a739a | ||
|
a24aee6bb2 | ||
|
225c10bc5a | ||
|
7372ddd2a1 | ||
|
465647e964 | ||
|
7b2cdabc2e | ||
|
c7be8fd398 | ||
|
6675b9639c | ||
|
49cd3c8232 | ||
|
25b610ef5e | ||
|
de239ca31b | ||
|
5dfbeb978f | ||
|
e98b096ca8 | ||
|
399d2c1389 | ||
|
59a901e285 | ||
|
8d58b64c28 | ||
|
0df9b59dfc | ||
|
17a221dba9 | ||
|
e6f9c49c22 | ||
|
11096885ae | ||
|
838c9a0d98 | ||
|
c5905b13b9 | ||
|
d2881d901b | ||
|
7ef7873b23 | ||
|
10ea4d81e6 | ||
|
2026efb981 | ||
|
e41cadd835 | ||
|
0ddb5d729c | ||
|
bb3ae47477 | ||
|
a744a67f42 | ||
|
c93d66c8a7 | ||
|
a7ef117b4a | ||
|
f0609a5142 | ||
|
d89bd0040c | ||
|
fec8a1ee7f | ||
|
98730f71f9 | ||
|
b756fd42a0 | ||
|
4d889ccc42 | ||
|
5f8e054a9d | ||
|
fe13fb841b | ||
|
1349b0f72d | ||
|
b974ced51b | ||
|
c9faea04c5 | ||
|
171d4305f4 | ||
|
d96cbb3b59 | ||
|
e944525596 | ||
|
49881eebbb | ||
|
8615a52ca3 | ||
|
7ad203732f | ||
|
93f8966bd9 | ||
|
181e58e402 | ||
|
63f59dde3a | ||
|
b2d40afdf5 | ||
|
f82341d1d3 | ||
|
80013436d0 | ||
|
52858f709c | ||
|
d65ccf96ee | ||
|
3b45be94e8 | ||
|
b4344861a0 | ||
|
a52ff2f66e | ||
|
073a9c9cd5 | ||
|
622a930c5a | ||
|
2f8938cf23 | ||
|
1cc35cdc6d | ||
|
9e2cdce58e | ||
|
94ec6b4418 | ||
|
c352093bde | ||
|
ac4da770e1 | ||
|
5ced234144 | ||
|
9ec2804775 | ||
|
f8eac08a0a | ||
|
af36220bca | ||
|
8e3b499699 | ||
|
968780d8da | ||
|
4fc6880d83 | ||
|
51971d56bc | ||
|
c7f5f10853 | ||
|
61c46d911f | ||
|
19222a6364 | ||
|
7479133753 | ||
|
0282714d86 | ||
|
586240d2f8 | ||
|
e99e282b5a | ||
|
52f5a78c6d | ||
|
01d76b7701 | ||
|
59d12be94f | ||
|
9b18deee1f | ||
|
7385784ded | ||
|
6950116678 | ||
|
247e62390b | ||
|
ec567e5fad | ||
|
6b23c44056 | ||
|
f6d0b9e9a9 | ||
|
70775e1985 | ||
|
8ecc51ad8a | ||
|
4938aa9c6b | ||
|
1f3328c096 | ||
|
6e7ad732fc | ||
|
cbf5b49cb8 | ||
|
b3725a455d | ||
|
9c545ac2e8 | ||
|
b87715973f | ||
|
064f4db012 | ||
|
45da8bf045 | ||
|
91bc414360 | ||
|
e2190d7a01 | ||
|
7fbbf850c3 | ||
|
1fb172011c | ||
|
4691049f9e | ||
|
40c8d8bcf4 | ||
|
08b5de7836 | ||
|
6ac3ec0b53 | ||
|
2b7eaaf86e | ||
|
08494f86a0 | ||
|
768e6a4579 | ||
|
ce9a5a3fec | ||
|
17bc7aaefd | ||
|
71bd1c7e2c | ||
|
b92573e42e | ||
|
76c66ef2ed | ||
|
5751d4f66e | ||
|
b2f3b67494 | ||
|
a994f4edfb | ||
|
79321c0d8a | ||
|
48c93fb347 | ||
|
163f7e75bf | ||
|
bb78a39103 | ||
|
05ef31362d | ||
|
a4f69408ac | ||
|
e31a936e3e | ||
|
32c0c6fee0 | ||
|
238cdd5e37 | ||
|
3569d373a2 | ||
|
0019eb7bf9 | ||
|
209c5c37f3 | ||
|
18de5e6547 | ||
|
d2fe45ab57 | ||
|
65b55938ca | ||
|
4cae9bdd05 | ||
|
3ccfcf5b9f | ||
|
da679f3866 | ||
|
1feaa6f301 | ||
|
22c83e5ea7 | ||
|
eaebc2cb4b | ||
|
d070e4c742 | ||
|
c55fcd35fe | ||
|
13e22e2030 | ||
|
0796d7b6ff | ||
|
2e52e9964b | ||
|
a4e0de1839 | ||
|
0910eaf6fe | ||
|
7c4bf742e8 | ||
|
66d25c4a06 | ||
|
c2aff4ab6e | ||
|
bc77408e3c | ||
|
c91076f64c | ||
|
4f0ab5656b | ||
|
9ba4bed117 | ||
|
fc838cefbf | ||
|
d87041bfe3 | ||
|
8a0d02c548 | ||
|
f126157bfa | ||
|
6ed479e71c | ||
|
5611cf2096 | ||
|
2a3f1a49de | ||
|
a764e343c7 | ||
|
af86bc58b9 | ||
|
94c5d691df | ||
|
a0eb0e2346 | ||
|
3d205a2037 | ||
|
3b10269a12 | ||
|
6ccef21d49 | ||
|
53028ff3bb | ||
|
ff85f6ce3f | ||
|
0507a4d39a | ||
|
7cee6c5cc6 | ||
|
ab3084b714 | ||
|
00f4c070f4 | ||
|
668df30b60 | ||
|
3ce3593ebf | ||
|
45210d5835 | ||
|
f96f69996a | ||
|
6855e1eec3 | ||
|
c951740cf9 | ||
|
5840c931b3 | ||
|
b08015371b | ||
|
b3a5d86d5d | ||
|
b618256a4c | ||
|
6a0290145d | ||
|
f74067dda2 | ||
|
979a4c1b08 | ||
|
7fa9089196 | ||
|
ff0aabe576 | ||
|
f13157f4bb | ||
|
aa81262f11 | ||
|
56c9eac16e | ||
|
a70b478a5c | ||
|
40f2af665d | ||
|
0ab48fcc42 | ||
|
9e50fe0aeb | ||
|
e86cad1006 | ||
|
1b578ef33a | ||
|
02774f9fd5 | ||
|
d582e71ba8 | ||
|
f986730c14 | ||
|
0c903156ef | ||
|
b06908ad52 | ||
|
913e10fe3b | ||
|
b0b38c106d | ||
|
aba2de3443 | ||
|
761c781168 | ||
|
b85fc8045c | ||
|
eddaf01676 | ||
|
acd72ffabe | ||
|
e7a2fc2d01 | ||
|
ec07987a90 | ||
|
c73ab94d3f | ||
|
3222de2f91 | ||
|
2b6376248d | ||
|
c060d93e3d | ||
|
8726c6d5d2 | ||
|
1402e22862 | ||
|
5a0ad907b4 | ||
|
25308477e7 | ||
|
44d3b71678 | ||
|
1ffcdfcc32 | ||
|
ae63b21c61 | ||
|
967ba60303 | ||
|
ee857cd261 | ||
|
fb581a1084 | ||
|
77c982ed3f | ||
|
486b56e179 | ||
|
f07677c105 | ||
|
851d784f6d | ||
|
178d9bd84c | ||
|
09daf9b916 | ||
|
415ab252f4 | ||
|
fa48b42ef1 | ||
|
85ad434290 | ||
|
cff1694c99 | ||
|
3a671994d4 | ||
|
4fc98ae345 | ||
|
00f9f1cc6b | ||
|
cc780116a2 | ||
|
4a7da1e143 | ||
|
b8005f4de9 | ||
|
8b4863f0c4 | ||
|
09bb109f01 | ||
|
668d5d8665 | ||
|
b397dd04c4 | ||
|
5091ae5e04 | ||
|
c85e32d56e | ||
|
50c848a992 | ||
|
7624418ddf | ||
|
e1100813e6 | ||
|
11960fa916 | ||
|
359fc25aad | ||
|
3d88899072 | ||
|
e160befdf8 | ||
|
8c32f403fb | ||
|
a0a1ea10a8 | ||
|
7233281d05 | ||
|
eb995ce453 | ||
|
e43ec48e83 | ||
|
4162fccaa2 | ||
|
bf22ac8337 | ||
|
5a907cc094 | ||
|
c473afbdc9 | ||
|
b3043e429b | ||
|
f4510c93b7 | ||
|
0cf63ec892 | ||
|
0a4879b9ac | ||
|
da559c08f9 | ||
|
e1081bc471 | ||
|
86a41b108e | ||
|
1b171e812e | ||
|
295b8aab0c | ||
|
0c4a42e629 | ||
|
a414faa997 | ||
|
36fcd7327c | ||
|
1500626d44 | ||
|
978c364847 | ||
|
26cc941a9e | ||
|
0550ba4208 | ||
|
0d57d21192 | ||
|
f8961facb2 | ||
|
a5d6fe4124 | ||
|
0080224fdb | ||
|
b187773053 | ||
|
2b31a35792 | ||
|
305ecc4e82 | ||
|
5a6264ef5d | ||
|
bb53f893e2 | ||
|
5889905d1d | ||
|
00327eb509 | ||
|
a9930ba302 | ||
|
b3abfaf9ee | ||
|
ff87c6516b | ||
|
2c5ea0dd45 | ||
|
61012f3efe | ||
|
a34a0224e4 | ||
|
6ae521bb32 | ||
|
f3110e4103 | ||
|
ac497c6e8f | ||
|
eeb7bff0bb | ||
|
99a6495d6c | ||
|
933ee3af56 | ||
|
8d7a235a04 | ||
|
1bf02fd773 | ||
|
d066e7541e | ||
|
ccc0eafbc3 | ||
|
390a42fa60 | ||
|
f52a59d414 | ||
|
c372f95a41 | ||
|
ec112a772b | ||
|
59679daeae | ||
|
c115c479dc | ||
|
022724aa69 | ||
|
015bf99816 | ||
|
973060deb5 | ||
|
d825249b42 | ||
|
9141eeb60e | ||
|
b876e036b2 | ||
|
6886f479fe | ||
|
c82ad2c129 | ||
|
ce31df3238 | ||
|
f9503ac189 | ||
|
8a52ace8de | ||
|
278fa902e2 | ||
|
879956e2f5 | ||
|
c72a8a538c | ||
|
b9f710217f | ||
|
295ac9135f | ||
|
b763bb0594 | ||
|
9e96461aa5 | ||
|
4dee1646a1 | ||
|
5666522ab3 | ||
|
60195ab021 | ||
|
03f5d5a5e4 | ||
|
50187ae86d | ||
|
ab919deeef | ||
|
6bf55142ee | ||
|
843475bd2e | ||
|
3b4bf963f6 | ||
|
2d35053d97 | ||
|
4ad887f4bf | ||
|
601c49ef39 | ||
|
2d9081d117 | ||
|
cc45e828df | ||
|
01d1cdc76c | ||
|
b87034a985 | ||
|
1d3cc65e89 | ||
|
5a3b28aaf1 | ||
|
395125bcfb | ||
|
4b8b3b431b | ||
|
6aaa6c337b | ||
|
f7497daee9 | ||
|
4c091db6c2 | ||
|
ba56f11702 | ||
|
42a895e85e | ||
|
3425f7fe5a | ||
|
fa90052299 | ||
|
22e6f37c9c | ||
|
8f50148a34 | ||
|
614556180a | ||
|
87480d7d1c | ||
|
1116914ea0 | ||
|
808bfe0a98 | ||
|
9209c4ea41 | ||
|
0b06b1e3f7 | ||
|
24e6bda264 | ||
|
93c3b90f6a | ||
|
89f635fee1 | ||
|
7eecb16404 | ||
|
98ee594f73 | ||
|
0a64a4f3c0 | ||
|
85c5f6058a | ||
|
bee39d2251 | ||
|
16b250f9bb | ||
|
5eacc92ba7 | ||
|
6a3904cf0c | ||
|
c2afa674e2 | ||
|
901bc2957d | ||
|
737e598a17 | ||
|
9a84c3e0f5 | ||
|
38d46aacae | ||
|
584cfff90a | ||
|
e843d94405 | ||
|
9abf990656 | ||
|
5ac5f6f81a | ||
|
8e0abb4bac | ||
|
4f19be1c82 | ||
|
05de5b02cb | ||
|
345140008e | ||
|
7e5b216511 | ||
|
7c2e3a812a | ||
|
54f9263f19 | ||
|
a8b1e81816 | ||
|
9e2eb5d2f6 | ||
|
7d4066de41 | ||
|
6b6af59b9b | ||
|
cb19fd50cb | ||
|
948afc68f6 | ||
|
f1cfd23cd2 | ||
|
e2320678ae | ||
|
6b82ad48f6 | ||
|
4ba2c9ad87 | ||
|
d053db289e | ||
|
cc511268a0 | ||
|
5837c1c710 | ||
|
b15193943a | ||
|
edec64cda3 | ||
|
473ab791ff | ||
|
7281419341 | ||
|
3e81653bd3 | ||
|
2820c342f6 | ||
|
8f3bd8ef0c | ||
|
9c49144cbe | ||
|
4b173fcde9 | ||
|
6f07d5e761 | ||
|
64f26db038 | ||
|
93ae728cc6 | ||
|
e82d471c55 | ||
|
6aec79cbaa | ||
|
88d166d8cc | ||
|
8c361fd7e2 | ||
|
a71ff33266 | ||
|
eacfad7ed6 | ||
|
31d3be96e4 | ||
|
4a531ec6ab | ||
|
f780370499 | ||
|
404e2753c4 | ||
|
48a41b0119 | ||
|
5f977deb4f | ||
|
6276b9cda0 | ||
|
bece876f8e | ||
|
3575df8ee2 | ||
|
f1ec76a9c1 | ||
|
65dadd37fc | ||
|
561ff51abb | ||
|
7ff3ef3e68 | ||
|
a1f8ffce4e | ||
|
ff256956b2 | ||
|
d86d406c99 | ||
|
71f5eec2e0 | ||
|
4f1780c782 | ||
|
34c29d8d3c | ||
|
3fc21b4f3f | ||
|
63104944a3 | ||
|
3a05d9b5a0 | ||
|
c160ba0696 | ||
|
f2cfe9ed74 | ||
|
0367f785ef | ||
|
1c8b77637a | ||
|
4188069db9 | ||
|
c6eb926e4a | ||
|
99b17488dd | ||
|
f211031a9f | ||
|
e31e88582f | ||
|
a385ca1bb7 | ||
|
59c04d5184 | ||
|
696129d83c | ||
|
9cbf764bcd | ||
|
e9ddff907f | ||
|
066646c96d | ||
|
86eefc7609 | ||
|
1d64175c4b | ||
|
d270c5524f | ||
|
4ac57d4d4c | ||
|
7c51e60b86 | ||
|
de4427304c | ||
|
76b674f3b6 | ||
|
f029a2230d | ||
|
5f1fb0e4fc | ||
|
201134b9df | ||
|
f07ac793fe | ||
|
3f4df0644c | ||
|
ea983404ec | ||
|
1543890569 | ||
|
2dd07f346a | ||
|
f717d98458 | ||
|
1aee4f0384 | ||
|
8e8a94bc23 | ||
|
f3d95d05eb | ||
|
00834786be | ||
|
27cf0fa34c | ||
|
9e85fcbe7c | ||
|
a1e4ba0dd4 | ||
|
1442299b48 | ||
|
46b10f1d92 | ||
|
aa1b7fab9c | ||
|
488ea44a59 | ||
|
c42e54e949 | ||
|
ffff7b055b | ||
|
c0650057c1 | ||
|
11d70f1ac3 | ||
|
9cbf04c1d2 | ||
|
8cb444147c | ||
|
daad650a9c | ||
|
5fc8cf4331 | ||
|
542c824c71 | ||
|
8fc920144b | ||
|
c235747847 | ||
|
95fad690d2 | ||
|
b6551c84c9 | ||
|
aa0811d320 | ||
|
f4dee9b682 | ||
|
9668962da1 | ||
|
b3c28e14fe | ||
|
8f9c8120b9 | ||
|
a0ecb44b41 | ||
|
3bf12c44e2 | ||
|
354536d464 | ||
|
500c8d82fc | ||
|
82a5edceca | ||
|
ad180c4335 | ||
|
2e71fbacbf | ||
|
7e5ac3a58d | ||
|
3a9bf0fe1d | ||
|
d879a13600 | ||
|
bd31310c40 | ||
|
3fcb892831 | ||
|
ba06066158 | ||
|
728bce2cf8 | ||
|
610f7e8f70 | ||
|
8836a0d6ce | ||
|
da163469f9 | ||
|
c7efbeddd0 | ||
|
22967f1612 | ||
|
f7433557ab | ||
|
8c745088d5 | ||
|
f6d64f6591 | ||
|
e697213b35 | ||
|
cc4d34e688 | ||
|
45541cbf10 | ||
|
9ce8ce1198 | ||
|
fe028e2789 | ||
|
118c887656 | ||
|
e6b228f12a | ||
|
1c3dd5d46b | ||
|
ebb64c2288 | ||
|
7ba7dff69e | ||
|
4ba710ea30 | ||
|
8b6d419e02 | ||
|
5ec97f6144 | ||
|
717877dff2 | ||
|
cb0ca9a804 | ||
|
5cc0cae4b7 | ||
|
d25b4105d6 | ||
|
d0a12d477e | ||
|
dd2202288a | ||
|
8d94140da9 | ||
|
73b3b9ee94 | ||
|
f313a8235b | ||
|
8c534fefca | ||
|
dbb8d1dd07 | ||
|
39d6ec167e | ||
|
c1a013fe4a | ||
|
07e9385bab | ||
|
63bc3542ce | ||
|
cb63fe042e | ||
|
00e08a0159 | ||
|
121fddc4d2 | ||
|
5e53676b46 | ||
|
531fa78601 | ||
|
dc952e3d94 | ||
|
cbabb2e6ff | ||
|
9e1f870680 | ||
|
82e324f8ac | ||
|
931a479da9 | ||
|
858c80f33e | ||
|
8b11e93a2d | ||
|
4bffb6aff5 | ||
|
0fef59b486 | ||
|
e649c8773f | ||
|
1a38c4d066 | ||
|
dcd3d15380 | ||
|
4b47c5a649 | ||
|
a8cb7352c5 | ||
|
8133e7e624 | ||
|
6a7b549608 | ||
|
dfe6399de8 | ||
|
47e5e1c72d | ||
|
9c1063f602 | ||
|
811d602842 | ||
|
9fde44ac10 | ||
|
ff2390f550 | ||
|
cf277fabb5 | ||
|
500bd60873 | ||
|
6113504495 | ||
|
9f51d8948f | ||
|
1b03f08938 | ||
|
48865fb9d9 | ||
|
ad8d30ad86 | ||
|
d0ed29d58d | ||
|
63f7a36ae0 | ||
|
03d4e270c2 | ||
|
de3e0f1453 | ||
|
b8e87d4762 | ||
|
594de00cad | ||
|
93d343d339 | ||
|
7daa2a1eba | ||
|
711fea11b5 | ||
|
f26986a50a | ||
|
54806d1295 | ||
|
0d85e26571 | ||
|
7314826de2 | ||
|
87d36885ac | ||
|
07cf489d2d | ||
|
a29c831f3c | ||
|
430ea2fff6 | ||
|
f120ae7b4d | ||
|
838e982877 | ||
|
e15152c837 | ||
|
604704a3f0 | ||
|
88567295f6 | ||
|
8c5094c22c | ||
|
0b50e1fff6 | ||
|
9c4d478dc7 | ||
|
35a8d3d770 | ||
|
885b36a6d5 | ||
|
5d9710cc7f | ||
|
b0e4273325 | ||
|
366527c2d0 | ||
|
cec5815a0d | ||
|
9fcbae2d85 | ||
|
206f0bbf7f | ||
|
11eb64a2b6 | ||
|
2a3a7306ef | ||
|
96fcdebefb | ||
|
1c6eca04db | ||
|
a834078804 | ||
|
6384167054 | ||
|
c2ff89bbe3 | ||
|
9a38fb79e5 | ||
|
a7638d5ecb | ||
|
9a50203408 | ||
|
4adb3f4033 | ||
|
885b3c704f | ||
|
d5afaa07d3 | ||
|
80969e34bc | ||
|
79f806fdab | ||
|
08f69c53a5 | ||
|
57714b9774 | ||
|
9474215a43 | ||
|
0d5acf2a05 | ||
|
b0d0a2b5e5 | ||
|
29984c5282 | ||
|
bc07a540c7 | ||
|
2664082549 | ||
|
059cd3e51f | ||
|
fe33ee426a | ||
|
27285f1f0f | ||
|
ef9aa8b0ae | ||
|
89b5d15415 | ||
|
730f429168 | ||
|
ad199e4cf9 | ||
|
26f36ef8ae | ||
|
9645daf48f | ||
|
cd056adb2f | ||
|
8b823d7e13 | ||
|
b7be202089 | ||
|
7406ec84bc | ||
|
c0af2d6fa6 | ||
|
7493e814a9 | ||
|
a3bf910585 | ||
|
b53d5d0643 | ||
|
f3f021106d | ||
|
682abc345f | ||
|
980923c761 | ||
|
0bab285fe0 | ||
|
79f7392109 | ||
|
db36ee36a6 | ||
|
85dd685b3f | ||
|
77b876fad3 | ||
|
270e73bfcc | ||
|
c7e9489e3e | ||
|
ac215ffc8f | ||
|
4168e0385e | ||
|
572f46067f | ||
|
f51419adb0 | ||
|
314a168916 | ||
|
bb2be84af0 | ||
|
78223932c5 | ||
|
506639add1 | ||
|
43d6ebf9fb | ||
|
b46fdb2d13 | ||
|
21360a453c | ||
|
bf3b0ea641 | ||
|
cfcb43e3ca | ||
|
dce50674c0 | ||
|
c0e26aad56 | ||
|
38f9e4bf11 | ||
|
23fa0e341f | ||
|
5a41f63426 | ||
|
ecc64f63e4 | ||
|
915e4c6dd7 | ||
|
b4375cde48 | ||
|
20f1c06eed | ||
|
07efae7288 | ||
|
049ec56107 | ||
|
4d4883f010 | ||
|
5d42c55f28 | ||
|
ec37fbe2e2 | ||
|
4bd787f2af | ||
|
7f28077b5a | ||
|
d2b2b34ae5 | ||
|
8b85db08e5 | ||
|
fdf367e868 | ||
|
3bcf5e2863 | ||
|
2c6ac1fa3e | ||
|
d216d89d6f | ||
|
7b9065c2ee | ||
|
31f502a9ae | ||
|
c763e73497 | ||
|
6ae93f5c46 | ||
|
a7cf67f201 | ||
|
79ada68f8c | ||
|
0a54ad1187 | ||
|
ea9f5e2273 | ||
|
96f7c11f48 | ||
|
5e9bf518a3 | ||
|
3a0ced32bf | ||
|
5127136723 | ||
|
ea36b7bfb0 | ||
|
84b0b45465 | ||
|
cc5a586ceb | ||
|
6b26664c41 | ||
|
4bc3f02d51 | ||
|
53c388b724 | ||
|
36245b7058 | ||
|
ef57ac6bf1 | ||
|
ef2c68462b | ||
|
1e1c5c65d1 | ||
|
2b07b6c069 | ||
|
52b3b4207f | ||
|
10d0ca0a3d | ||
|
42a6ae6c6c | ||
|
631688cf64 | ||
|
d23f3254b7 | ||
|
f0a40b1a23 | ||
|
1dbc6d91f0 | ||
|
ac5ffd847b | ||
|
57d034ce9f | ||
|
583d612c9f | ||
|
51e1e3b416 | ||
|
97137da6e5 | ||
|
025340bfc4 | ||
|
8c091d1484 | ||
|
a2e71203c2 | ||
|
ccdebb6aa0 | ||
|
79f8db1c0d | ||
|
e0b9330880 | ||
|
dca2f4386d | ||
|
ce8dc51861 | ||
|
73c8f30928 | ||
|
ed1fb8d2af | ||
|
779faafa22 | ||
|
9ac9769f36 |
2
HACKING
2
HACKING
@@ -17,7 +17,7 @@ can be found here:
|
|||||||
|
|
||||||
Information about using git with GNOME can be found here:
|
Information about using git with GNOME can be found here:
|
||||||
|
|
||||||
http://live.gnome.org/Git
|
https://wiki.gnome.org/Git
|
||||||
|
|
||||||
In order to get GIT GTK+ installed on your system, you need to have
|
In order to get GIT GTK+ installed on your system, you need to have
|
||||||
the most recent GIT versions of GLib, Pango, and ATK installed as well.
|
the most recent GIT versions of GLib, Pango, and ATK installed as well.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## Makefile.am for GTK+
|
## Makefile.am for GTK+
|
||||||
include $(top_srcdir)/Makefile.decl
|
include $(top_srcdir)/Makefile.decl
|
||||||
|
|
||||||
SRC_SUBDIRS = util gdk gtk libgail-util modules demos tests testsuite examples
|
SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples
|
||||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||||
@@ -21,7 +21,8 @@ EXTRA_DIST += \
|
|||||||
gtk-zip.sh.in \
|
gtk-zip.sh.in \
|
||||||
sanitize-la.sh \
|
sanitize-la.sh \
|
||||||
po/README.translators \
|
po/README.translators \
|
||||||
po/po2tbl.sed.in
|
po/po2tbl.sed.in \
|
||||||
|
make-pot
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = \
|
MAINTAINERCLEANFILES = \
|
||||||
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
|
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
|
||||||
|
426
NEWS
426
NEWS
@@ -1,3 +1,429 @@
|
|||||||
|
Overview of Changes in GTK+ 3.15.12
|
||||||
|
===================================
|
||||||
|
|
||||||
|
* GtkMenuButton:
|
||||||
|
- Improve accessible names
|
||||||
|
|
||||||
|
* GtkCellRendererPixbuf:
|
||||||
|
- Always follow state changes, the ::follow-state property
|
||||||
|
is now ignored. This is necessary to make HighContrast
|
||||||
|
and symbolic icons remain visible e.g. in selected rows.
|
||||||
|
|
||||||
|
* GtkEntry:
|
||||||
|
- Rework the size allocation code to be less arcane. This
|
||||||
|
changed the semantics of the get_frame_size() vfunc. GtkEntry
|
||||||
|
subclasses that override this vfunc may need adjustment.
|
||||||
|
|
||||||
|
* Wayland:
|
||||||
|
- Support hi-dpi cursors
|
||||||
|
|
||||||
|
* Bugs fixed:
|
||||||
|
745829 crash when double-clicking close button while popover...
|
||||||
|
746141 wayland: Support HiDPI pointer cursors
|
||||||
|
746192 Insensitive backdrop ToolButtons are not drawn correctly
|
||||||
|
746201 Sidebar icons are black on black in HighContrast theme
|
||||||
|
746202 use insensitive color for unfocused selected items
|
||||||
|
746205 gemfile: needs add source rubygems.org
|
||||||
|
746282 pixman warnings after recent changes
|
||||||
|
746301 Opening "Sound" panel generates pixman error
|
||||||
|
|
||||||
|
* Translation updates:
|
||||||
|
Bosnian
|
||||||
|
Bulgarian
|
||||||
|
Catalan
|
||||||
|
Danish
|
||||||
|
Punjabi
|
||||||
|
Slovenian
|
||||||
|
Swedish
|
||||||
|
Vietnamese
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GTK+ 3.15.11
|
||||||
|
===================================
|
||||||
|
|
||||||
|
* Go back to requiring GTK_FRAME_EXTENTS support for CSD,
|
||||||
|
to fix shadow problems in KDE.
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
535929 Fix warnings from xReply test in configure.in
|
||||||
|
577862 FileFilter name not set
|
||||||
|
669008 Kerberos authentication popup
|
||||||
|
712760 Clang static analysis fixes
|
||||||
|
739070 Undefined reference to get_xkb() when building with --disable-xkb
|
||||||
|
744288 gdk_gl_context_set_required_version() handles version requests...
|
||||||
|
744589 nautilus bookmarks changing places randomly
|
||||||
|
745065 GtkPrintOperation dialog creation fails when GTK is locally loaded
|
||||||
|
745463 Search suggestions are not shown in Clocks / Weather
|
||||||
|
745479 Tracker search in file chooser causes a crash
|
||||||
|
745562 gedit titlebar is no longer draggable
|
||||||
|
745578 sincos is not portable
|
||||||
|
745622 Selected text not highlighted in GtkInfoBar
|
||||||
|
745721 wayland: Add support for gtk_window_set_modal
|
||||||
|
745918 add padding to textview in CSS section of GtkInspector
|
||||||
|
745969 CSD windows cannot be moved immediately after being resized
|
||||||
|
746013 Invalid write of size 8
|
||||||
|
Print dialog: Fix icons in HighContrast
|
||||||
|
Fix selected menu items in HighContrast
|
||||||
|
App chooser: Fix icons in HighContrast
|
||||||
|
|
||||||
|
* Translation updates:
|
||||||
|
French
|
||||||
|
Galician
|
||||||
|
Kazakh
|
||||||
|
Korean
|
||||||
|
Lithuanian
|
||||||
|
Polish
|
||||||
|
Slovak
|
||||||
|
Swedish
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GTK+ 3.15.10
|
||||||
|
===================================
|
||||||
|
|
||||||
|
* GtkFileChooser:
|
||||||
|
- Don't start search too eagerly
|
||||||
|
- Use fts with tracker
|
||||||
|
- Make tracker queries more similar to nautilus
|
||||||
|
|
||||||
|
GtkWindow:
|
||||||
|
- Improve window dragging on header bars
|
||||||
|
|
||||||
|
* Printing:
|
||||||
|
- Make avahi-browsed printers work
|
||||||
|
- Set printer state correctly
|
||||||
|
|
||||||
|
* Wayland
|
||||||
|
- Exit cleanly if the compositor goes away
|
||||||
|
- Don't ignore early maximization/fullscreening
|
||||||
|
- Make subsurface popovers work under Weston
|
||||||
|
|
||||||
|
* GL
|
||||||
|
- Port GdkGears example to modern OpenGL
|
||||||
|
|
||||||
|
* Bugs fixed:
|
||||||
|
741511 Critical message: NULL is passed to g_object_unref() in spi_...
|
||||||
|
743323 avahi-discovered CUPS printers don't work
|
||||||
|
743427 subsurface-using popovers don't work on Weston
|
||||||
|
744879 Another core dump when clicking the Back button
|
||||||
|
745225 eventcontroller: Don't crash if the widget is destroyed first
|
||||||
|
745263 The Open button in the new file chooser is too low/thin
|
||||||
|
745289 wayland: do not use g_error() on connection errors
|
||||||
|
745303 Wayland: Initial setup window is not maximised
|
||||||
|
745344 overlay scrollbar fail
|
||||||
|
745400 fix a couple of issues in gdkglcontext-win32
|
||||||
|
703610 Problems with UC-Logic WA60 tablet
|
||||||
|
729366 Changes to folder name are not shown when creating new fol...
|
||||||
|
745315 Overshoot deceleration causes WebKitGTK1 web view to jump ...
|
||||||
|
|
||||||
|
* Translation updates
|
||||||
|
Afrikaans
|
||||||
|
Czech
|
||||||
|
French
|
||||||
|
Greek
|
||||||
|
Hebrew
|
||||||
|
Hungarian
|
||||||
|
Kazakh
|
||||||
|
Lithuanian
|
||||||
|
Polish
|
||||||
|
Slovak
|
||||||
|
Spanish
|
||||||
|
Vietnamese
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GTK+ 3.15.9
|
||||||
|
==================================
|
||||||
|
|
||||||
|
* GtkScrolledWindow
|
||||||
|
- Avoid 'jumping' when zoom scrolling kicks in
|
||||||
|
- Make zoom scrolling less easy to trigger
|
||||||
|
- Make steppers use smooth autoscrolling
|
||||||
|
|
||||||
|
* Input methods can now be turned off entirely, which
|
||||||
|
can be useful to free up the Ctrl-Shift-u shortcut
|
||||||
|
|
||||||
|
* Add some DND support to gtk3-icon-browser
|
||||||
|
|
||||||
|
* Bugs fixed:
|
||||||
|
696505 Segfault on Windows x64: gtkstatusicon.c tries to put 64-bit...
|
||||||
|
744942 quartz: Avoid segfaulting when calling gdk_window_ensure_native
|
||||||
|
744991 Fix loading of GResource SVGs
|
||||||
|
745052 Icon theme code assumes directories with mtime 0 don't exist
|
||||||
|
745076 Various DPI and OpenGL related fixes in the Wayland backend
|
||||||
|
Fix crash and miscalculation in css bitmask manipulation
|
||||||
|
Fix a crash due to too large surfaces
|
||||||
|
|
||||||
|
* Translation updates
|
||||||
|
Chinese (Taiwan)
|
||||||
|
Hebrew
|
||||||
|
Hungarian
|
||||||
|
Galician
|
||||||
|
Greek
|
||||||
|
Slovak
|
||||||
|
Spanish
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GTK+ 3.15.8
|
||||||
|
==================================
|
||||||
|
|
||||||
|
* CSS
|
||||||
|
- Support animated font weight changes
|
||||||
|
|
||||||
|
* GtkScrolledWindow:
|
||||||
|
- Ensure indicators appear in the correct place
|
||||||
|
|
||||||
|
* Wayland:
|
||||||
|
- DND fixes
|
||||||
|
|
||||||
|
* GtkPopover:
|
||||||
|
- has a map/unmap animation now
|
||||||
|
|
||||||
|
* Bugs fixed:
|
||||||
|
743647 image-missing is missing from libgtk's resources
|
||||||
|
744054 Clarify documentation for event propagation a...
|
||||||
|
744683 Tooltips should have ATK_ROLE_TOOL_TIP (like ...
|
||||||
|
|
||||||
|
* Translation updates
|
||||||
|
Galician
|
||||||
|
Hebrew
|
||||||
|
Hungarian
|
||||||
|
Italian
|
||||||
|
Norwegian bokmål
|
||||||
|
Punjabi
|
||||||
|
Slovenian
|
||||||
|
Spanish
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GTK+ 3.15.7
|
||||||
|
==================================
|
||||||
|
|
||||||
|
* GtkListBox now supports models with gtk_list_box_bind_model
|
||||||
|
|
||||||
|
* GtkNotebook has a new function to support tab dnd
|
||||||
|
|
||||||
|
* GtkSidebar was renamed to GtkStackSidebar to better convey what it does
|
||||||
|
|
||||||
|
* GtkFileChooser now has a location column for search
|
||||||
|
|
||||||
|
* GdkGLProfile has been removed
|
||||||
|
|
||||||
|
* Bugs
|
||||||
|
695945 implement minimize / maximize functionality
|
||||||
|
708320 listbox: Update the cursor row when the row's child gets focus
|
||||||
|
741946 OpenGL context should allow for GL attribute selection
|
||||||
|
743350 main: Make gtk_get_option_group() available to bindings
|
||||||
|
744148 gtk: x: fix compilation without x11 backend
|
||||||
|
744172 Wayland: Clients won't work on compositors that support wl_seat < 4
|
||||||
|
744204 File chooser in gedit try to open directory instead of navigatin...
|
||||||
|
744394 GtkGLArea documentation does not reflect changes in the api
|
||||||
|
744400 Add specific CSS class for the close/minimize/maximize button
|
||||||
|
744407 Can't support core 3.2 gl context on llvmpipe
|
||||||
|
744455 wayland: Update to xdg-shell unstable v5
|
||||||
|
|
||||||
|
* Translation updates:
|
||||||
|
Hungarian
|
||||||
|
Norwegian bokmål
|
||||||
|
Slovenian
|
||||||
|
Spanish
|
||||||
|
Turkish
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GTK+ 3.15.5
|
||||||
|
==================================
|
||||||
|
|
||||||
|
* GTK+ types now support the GLib g_autoptr() facility for
|
||||||
|
automatic cleanup of automatic variables. GTK+ itself does
|
||||||
|
not use g_autoptr() internally.
|
||||||
|
|
||||||
|
* GtkSearchEntry has gained ::next-match, ::previous-match
|
||||||
|
and ::stop-search signals and a gtk_search_entry_handle_event()
|
||||||
|
function, which help in providing a richer search experience
|
||||||
|
and make search entries usable outside of GtkSearchBar.
|
||||||
|
|
||||||
|
* GtkFileChooser:
|
||||||
|
- The search has been reintegrated in the UI, there is now
|
||||||
|
a toggle button on the header bar to go to search mode,
|
||||||
|
in addition to the Alt-S shortcut.
|
||||||
|
- The file chooser button now accepts files by drag-and-drop properly.
|
||||||
|
|
||||||
|
* GtkScrolledWindow has gained a new ::edge-reached signal, which
|
||||||
|
triggers when the edge of the scrollable area is reached.
|
||||||
|
|
||||||
|
* CSS:
|
||||||
|
- Performance improvements
|
||||||
|
|
||||||
|
* OpenGL:
|
||||||
|
- It is now possible to specify the required GL version, as well
|
||||||
|
as some other options (debug, forward compatible) when creating
|
||||||
|
a GdkGLContext
|
||||||
|
- Support for the OpenGL legacy profile has been dropped. Most examples
|
||||||
|
have been updated, with the exception of gdkgears, which will be fixed
|
||||||
|
in the next snapshot
|
||||||
|
- Use shader version 1.50
|
||||||
|
|
||||||
|
* Mir backend: Many improvements
|
||||||
|
|
||||||
|
* Bugs fixed:
|
||||||
|
712752 GtkClipboard: add _get_default and _get_primary
|
||||||
|
725164 [crash] update_current_folder_get_info_cb at gtkfilechooserwidget.c
|
||||||
|
732051 Crash can result if a child widget is destroyed while its tab is...
|
||||||
|
735316 Default font antialiasing results in wrong behavior on OS X
|
||||||
|
740336 Wrong (white) background colour in notes grid
|
||||||
|
740613 XConvertSelection crashes Gtk+ apps
|
||||||
|
742636 Freeze if window closed while resume-events pending
|
||||||
|
742953 GdkGLContext will not create a core context
|
||||||
|
743146 Crash in gdk_gl_texture_from_surface() when a GtkGLArea is packe...
|
||||||
|
743193 Fix transfer annotation for tree_model parameter of gtk_tree_get...
|
||||||
|
743229 clipboard: support selection notification on wayland
|
||||||
|
743257 Popover not dismissed on clicking the header bar
|
||||||
|
743286 Mention that the path returned by gtk_tree_row_reference_get_pat...
|
||||||
|
743330 Wintab initialization glitches
|
||||||
|
743341 GtkImage does not correctly reflect icon theme changes.
|
||||||
|
743393 DND icons don't work in the inspector
|
||||||
|
743422 valgrind: Conditional jump or move depends on uninitialised valu...
|
||||||
|
743451 Drag and drop on GtkFileChooserButton doesn't work
|
||||||
|
743592 crash on link click in about dialogue
|
||||||
|
743593 GtkWidget's va_marshaller for "event-after" signal is incorrect
|
||||||
|
743633 gdkscreen-wayland: Don't leak wl_output objects
|
||||||
|
743638 getting-started: Update example-0.c to use GtkApplication
|
||||||
|
743647 image-missing is missing from libgtk's resources
|
||||||
|
743659 All folders hidden after returning from search mode in GtkFileCh...
|
||||||
|
743660 Pressing Ctrl should not start a search in the file chooser
|
||||||
|
743680 getting-started: update Basics section to correspond to example-...
|
||||||
|
613833 Unnecessary queue_resize() for GtkImage
|
||||||
|
741946 OpenGL context should allow for GL attribute selection
|
||||||
|
742566 Bitfield structure members used for booleans
|
||||||
|
742848 scrolledwindow: should emit edge-overshot when scrollbar reaches end
|
||||||
|
743395 Regression in gnome-terminal starting with gtk commit 27285f1 ' ...
|
||||||
|
743640 add __attribute__((cleanup)) support
|
||||||
|
743770 Memory leak in plugman example
|
||||||
|
743894 don't trigger interactive overlay scrollbar when drag-selecting
|
||||||
|
743917 Gtk modules must be compatible with both gtk 2 and 3
|
||||||
|
743975 Better deprecation information for GtkStatusIcon
|
||||||
|
744203 gdkgl shaders use depricated GLSL version
|
||||||
|
744212 gdk_gl_context_set_required_version() interprets requests for 4...
|
||||||
|
|
||||||
|
* Translation updates:
|
||||||
|
Hebrew
|
||||||
|
Hungarian
|
||||||
|
Icelandic
|
||||||
|
Lithuanian
|
||||||
|
Norwegian bokmål
|
||||||
|
Russian
|
||||||
|
Slovak
|
||||||
|
Spanish
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GTK+ 3.15.4
|
||||||
|
==================================
|
||||||
|
|
||||||
|
* GtkTextView
|
||||||
|
- Allow to customize multi-click behaviors, using the new
|
||||||
|
::extend-selection signal
|
||||||
|
- Selection can now be extended by scrolling
|
||||||
|
- Better behavior and appearance for text selection with touch
|
||||||
|
|
||||||
|
* GtkApplication:
|
||||||
|
- Use app menu fallback with ssh connections
|
||||||
|
- Provide a mechanism to hide unnecessary app menu items
|
||||||
|
on OS X, so a single menu file can be used across platforms
|
||||||
|
|
||||||
|
* GtkCalendar:
|
||||||
|
- Show other months in a different color under Adwaita again
|
||||||
|
- Ensure we always show a bit of the other month on both ends
|
||||||
|
|
||||||
|
* GtkScrolledWindow
|
||||||
|
- Make overlay scrollbars more dynamic
|
||||||
|
|
||||||
|
* GtkFileChooser:
|
||||||
|
- Make bookmark DND insert at the right location
|
||||||
|
- Make '~' and '/' work in recent mode
|
||||||
|
- Make Ctrl-L work in recent mode
|
||||||
|
- Re-integrate search
|
||||||
|
|
||||||
|
* CSS:
|
||||||
|
- Introduce immutable style nodes
|
||||||
|
- Performance improvements
|
||||||
|
- Reduced memory consumption
|
||||||
|
|
||||||
|
* GtkInspector:
|
||||||
|
- Add a magnifier for the selected widget
|
||||||
|
- Show more display information
|
||||||
|
- Show memory address of objects
|
||||||
|
|
||||||
|
* Wayland:
|
||||||
|
- Use subsurfaces for popovers, so popovers can extend beyond the
|
||||||
|
window boundaries
|
||||||
|
- Prefer the Wayland backend over X11 if both are available
|
||||||
|
|
||||||
|
* GL:
|
||||||
|
- Fix interaction with hi-dpi
|
||||||
|
- Add OpenGL support to the Windows backend
|
||||||
|
|
||||||
|
* Bugs:
|
||||||
|
111503 Customization of text selection bounds on double click
|
||||||
|
301835 should the calendar start on the 1st of month?
|
||||||
|
477454 libgtk crashed in gtk_notebook_button_release
|
||||||
|
671802 no menu fallback with ssh -X or sudo
|
||||||
|
671895 gtk_print_context_get_hard_margins needs to take into account page...
|
||||||
|
674537 GtkMenuPositionFunc: x and y should be "inout"
|
||||||
|
705582 gtk_recent_manager_init fails to check settings==NULL
|
||||||
|
710612 [PATCH] Allow to extend selection with mouse scrollwheel
|
||||||
|
738338 quartz: NSWindow NULL check in get_scale_factor
|
||||||
|
738891 Use GDK_WINDOW_SUBSURFACE for popovers
|
||||||
|
739038 gtk_recent_manager_set_filename: assertion failed: (priv->filename...
|
||||||
|
740758 Add getters for device vendor/product IDs
|
||||||
|
740795 GDK: Add OpenGL Support for Windows
|
||||||
|
741259 gtkmodelmenuitem: force icon scaling
|
||||||
|
741569 Minor theme bug: square progress bars
|
||||||
|
741610 Finish up support for macos menubar
|
||||||
|
741652 Leaking menus when attaching to a button
|
||||||
|
741702 Right margin not respected with RTL text in non-wrapping mode only
|
||||||
|
741827 typo in testsuite/reftests/Makefile.am causes build failure on Min...
|
||||||
|
741897 documentation fix
|
||||||
|
741969 GTK_STOCK_COPY
|
||||||
|
742010 GtkLabel eats thumb-button clicks
|
||||||
|
742170 cut/copy/paste binding entries are registered 2x
|
||||||
|
742181 "show images in menus" causes weird padding outside GNOME
|
||||||
|
742243 GtkScrolledWindow draws overshoot at the wrong position
|
||||||
|
742311 On cellrenderertext, notify for "size" and "size-points" propertie...
|
||||||
|
742343 Hide scrollbar in GtkFileChooser if appropriate
|
||||||
|
742518 object overview should include the pointer to the object in memory
|
||||||
|
742631 Left padding on File Chooser List
|
||||||
|
742653 gtkfilechooserwidget: When using an extra widget, show or hide the...
|
||||||
|
742664 Portabilitiy issues with GTK-Inspector 32-bit and non-gnome3 desktop
|
||||||
|
742702 GtkTreeView separator has wrong color if not active
|
||||||
|
742704 GtkComboBox: Separators not visible with Adwaita
|
||||||
|
742727 nautilus adding bookmark by dragging appear always at top
|
||||||
|
742764 Fix check for 'y' padding in gtk_cell_renderer_set_padding()
|
||||||
|
742771 Properly ignore BadWindow and BadDrawable in get_child_info_handler()
|
||||||
|
742774 Properly check result of g_utf8_get_char_validated()
|
||||||
|
742778 Fix accessible_class->widget_set initialization
|
||||||
|
742785 Fix event->button.y_root when using mouse buttons and dnd canceled
|
||||||
|
742786 Fix save_hot_y init in gtk_drag_get_icon()
|
||||||
|
742940 Adjust annotations of gtk_status_icon_position_menu to match GtkMe...
|
||||||
|
742980 cannot start broadway on FreeBSD
|
||||||
|
743037 Typo in gdk_window_get_root_coords documentation
|
||||||
|
743101 commit 77b876fa breaks zathura
|
||||||
|
743117 / and ~ Don't work in filechooser's recent mode
|
||||||
|
743157 gtk3-demo editable cells treeview problem
|
||||||
|
742646 DnD images not shown
|
||||||
|
|
||||||
|
* Translation updates:
|
||||||
|
Basque
|
||||||
|
British English
|
||||||
|
Czech
|
||||||
|
Galician
|
||||||
|
German
|
||||||
|
Greek
|
||||||
|
Hebrew
|
||||||
|
Hungarian
|
||||||
|
Icelandic
|
||||||
|
Lithuanian
|
||||||
|
Russian
|
||||||
|
Spanish
|
||||||
|
Vietnamese
|
||||||
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 3.15.3
|
Overview of Changes in GTK+ 3.15.3
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
@@ -99,6 +99,11 @@ Release notes for 3.16
|
|||||||
has non-scrolling parts similar to treeview headers, there is no need
|
has non-scrolling parts similar to treeview headers, there is no need
|
||||||
to implement this vfunc.
|
to implement this vfunc.
|
||||||
|
|
||||||
|
* The GtkSearchEntry widget has gained a number of new signal that
|
||||||
|
are emitted when certain key sequences are seen. In particular, it
|
||||||
|
now handles the Escape key and emits ::stop-search. Applications that
|
||||||
|
expect to handle Escape themselves will need to be updated.
|
||||||
|
|
||||||
Release notes for 3.14
|
Release notes for 3.14
|
||||||
======================
|
======================
|
||||||
|
|
||||||
|
@@ -166,7 +166,7 @@ Please refer to the following GNOME Live! page for a more detailed ouline
|
|||||||
on the process of building the GTK+ stack and its dependencies with Visual
|
on the process of building the GTK+ stack and its dependencies with Visual
|
||||||
C++:
|
C++:
|
||||||
|
|
||||||
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack
|
https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack
|
||||||
|
|
||||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||||
have lib.exe available. It might also work for cross-compilation from
|
have lib.exe available. It might also work for cross-compilation from
|
||||||
|
@@ -24,7 +24,7 @@ EXTRA_DIST += \
|
|||||||
gtk3-icon-browser.vcxproj.filters \
|
gtk3-icon-browser.vcxproj.filters \
|
||||||
gailutil.vcxproj \
|
gailutil.vcxproj \
|
||||||
gailutil.vcxproj.filters \
|
gailutil.vcxproj.filters \
|
||||||
install.vcxproj \
|
gtk-install.vcxproj \
|
||||||
broadwayd.vcxproj \
|
broadwayd.vcxproj \
|
||||||
broadwayd.vcxproj.filters \
|
broadwayd.vcxproj.filters \
|
||||||
gdk-broadway.vcxproj \
|
gdk-broadway.vcxproj \
|
||||||
|
@@ -5,7 +5,7 @@ the use of the library.
|
|||||||
A more detailed outline for instructions on building the GTK+ with Visual
|
A more detailed outline for instructions on building the GTK+ with Visual
|
||||||
C++ can be found in the following GNOME Live! page:
|
C++ can be found in the following GNOME Live! page:
|
||||||
|
|
||||||
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack
|
https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack
|
||||||
|
|
||||||
This VS10 solution and the projects it includes are intented to be used
|
This VS10 solution and the projects it includes are intented to be used
|
||||||
in a GTK+ source tree unpacked from a tarball. In a git checkout you
|
in a GTK+ source tree unpacked from a tarball. In a git checkout you
|
||||||
|
@@ -89,6 +89,7 @@
|
|||||||
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<TargetMachine>MachineX64</TargetMachine>
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
@@ -135,6 +137,7 @@
|
|||||||
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -158,6 +161,7 @@
|
|||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
@@ -147,6 +147,7 @@
|
|||||||
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
@@ -169,6 +170,7 @@
|
|||||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
@@ -188,6 +190,7 @@
|
|||||||
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
@@ -209,6 +212,7 @@
|
|||||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
@@ -233,6 +237,7 @@
|
|||||||
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<TargetMachine>MachineX64</TargetMachine>
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
@@ -255,6 +260,7 @@
|
|||||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<TargetMachine>MachineX64</TargetMachine>
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
@@ -274,6 +280,7 @@
|
|||||||
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
@@ -295,6 +302,7 @@
|
|||||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
@@ -22,7 +22,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-encode-symbolic-svg", "
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil", "gailutil.vcxproj", "{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil", "gailutil.vcxproj", "{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-install", "gtk-install.vcxproj", "{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -156,22 +156,22 @@ Global
|
|||||||
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release_Broadway|Win32.Build.0 = Release|Win32
|
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||||
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release_Broadway|x64.ActiveCfg = Release|x64
|
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||||
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release_Broadway|x64.Build.0 = Release|x64
|
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release_Broadway|x64.Build.0 = Release|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.ActiveCfg = Debug|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.Build.0 = Debug|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|x64.ActiveCfg = Debug|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|x64.Build.0 = Debug|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.Build.0 = Debug|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|Win32.ActiveCfg = Release|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|Win32.Build.0 = Release|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.Build.0 = Release|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.ActiveCfg = Release|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.ActiveCfg = Release|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.Build.0 = Release|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.Build.0 = Release|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug_Broadway|Win32.ActiveCfg = Debug_Broadway|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug_Broadway|Win32.ActiveCfg = Debug_Broadway|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug_Broadway|Win32.Build.0 = Debug_Broadway|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug_Broadway|Win32.Build.0 = Debug_Broadway|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug_Broadway|x64.ActiveCfg = Debug_Broadway|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug_Broadway|x64.ActiveCfg = Debug_Broadway|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug_Broadway|x64.Build.0 = Debug_Broadway|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug_Broadway|x64.Build.0 = Debug_Broadway|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_Broadway|Win32.ActiveCfg = Release_Broadway|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release_Broadway|Win32.ActiveCfg = Release_Broadway|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
|
||||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.ActiveCfg = Debug|Win32
|
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.Build.0 = Debug|Win32
|
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|x64.ActiveCfg = Debug|x64
|
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
@@ -21,6 +21,8 @@
|
|||||||
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;cairo-gobject.lib;pango-1.0.lib;gdk_pixbuf-2.0.lib;gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;epoxy.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;cairo-gobject.lib;pango-1.0.lib;gdk_pixbuf-2.0.lib;gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;epoxy.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
@@ -11,26 +11,69 @@
|
|||||||
<GtkDoInstallBin>
|
<GtkDoInstallBin>
|
||||||
mkdir $(CopyDir)\bin
|
mkdir $(CopyDir)\bin
|
||||||
mkdir $(CopyDir)\lib
|
mkdir $(CopyDir)\lib
|
||||||
|
|
||||||
|
copy "$(BinDir)\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\$(GtkDllPrefix)gdk$(GtkDllSuffix).pdb" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gdk-$(ApiVersion).lib" $(CopyDir)\lib
|
||||||
|
|
||||||
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
|
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
|
||||||
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
|
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
|
||||||
copy "$(BinDir)\*.dll" $(CopyDir)\bin
|
copy "$(BinDir)\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll" $(CopyDir)\bin
|
||||||
copy "$(BinDir)\*-$(ApiVersion).lib" $(CopyDir)\lib
|
copy "$(BinDir)\$(GtkDllPrefix)gtk$(GtkDllSuffix).pdb" $(CopyDir)\bin
|
||||||
copy "$(BinDir)\*.exe" $(CopyDir)\bin
|
copy "$(BinDir)\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\$(GtkDllPrefix)gailutil$(GtkDllSuffix).pdb" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gtk-$(ApiVersion).lib" $(CopyDir)\lib
|
||||||
|
copy "$(BinDir)\gailutil-$(ApiVersion).lib" $(CopyDir)\lib
|
||||||
|
copy "$(BinDir)\gtk3-demo.exe" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gtk3-demo.pdb" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gtk3-demo-application.exe" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gtk3-demo-application.pdb" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
|
||||||
|
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
|
||||||
goto DONE_BIN
|
goto DONE_BIN
|
||||||
|
|
||||||
:DO_BROADWAY_BIN
|
:DO_BROADWAY_BIN
|
||||||
copy "$(BinDir)\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll" $(CopyDir)\bin
|
|
||||||
copy "$(BinDir)\gdk-$(ApiVersion).lib" $(CopyDir)\lib
|
|
||||||
copy "$(BinDir)\broadwayd.exe" $(CopyDir)\bin
|
copy "$(BinDir)\broadwayd.exe" $(CopyDir)\bin
|
||||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
|
copy "$(BinDir)\broadwayd.pdb" $(CopyDir)\bin
|
||||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
|
|
||||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
|
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_RELEASE
|
||||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
|
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_DEBUG
|
||||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\*.exe $(CopyDir)\bin
|
:DO_BROADWAY_RELEASE
|
||||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
|
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
|
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).pdb $(CopyDir)\bin
|
||||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
|
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
|
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).pdb $(CopyDir)\bin
|
||||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\*.exe $(CopyDir)\bin
|
copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
|
||||||
|
copy .\Release\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
|
||||||
|
copy .\Release\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
|
||||||
|
copy .\Release\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
|
||||||
|
copy .\Release\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
|
||||||
|
copy .\Release\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
|
||||||
|
copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
|
||||||
|
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
|
||||||
|
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
|
||||||
|
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
|
||||||
|
|
||||||
|
goto DONE_BIN
|
||||||
|
|
||||||
|
:DO_BROADWAY_DEBUG
|
||||||
|
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).pdb $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).pdb $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
|
||||||
|
copy .\Debug\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
|
||||||
|
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
|
||||||
|
|
||||||
:DONE_BIN
|
:DONE_BIN
|
||||||
</GtkDoInstallBin>
|
</GtkDoInstallBin>
|
||||||
<GtkDoInstall>
|
<GtkDoInstall>
|
||||||
@@ -43,6 +86,7 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
|||||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
|
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
|
||||||
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
|
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
|
||||||
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-3.0\gdk\gdk.h
|
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-3.0\gdk\gdk.h
|
||||||
|
copy ..\..\..\gdk\gdk-autocleanup.h $(CopyDir)\include\gtk-3.0\gdk\gdk-autocleanup.h
|
||||||
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkapplaunchcontext.h
|
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkapplaunchcontext.h
|
||||||
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-3.0\gdk\gdkcairo.h
|
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-3.0\gdk\gdkcairo.h
|
||||||
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-3.0\gdk\gdkcursor.h
|
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-3.0\gdk\gdkcursor.h
|
||||||
@@ -86,7 +130,9 @@ copy ..\..\..\gdk\win32\gdkwin32misc.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkw
|
|||||||
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32screen.h
|
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32screen.h
|
||||||
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32window.h
|
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32window.h
|
||||||
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-3.0\gtk\gtk.h
|
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-3.0\gtk\gtk.h
|
||||||
|
copy ..\..\..\gtk\gtk-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtk-autocleanups.h
|
||||||
copy ..\..\..\gtk\gtkx.h $(CopyDir)\include\gtk-3.0\gtk\gtkx.h
|
copy ..\..\..\gtk\gtkx.h $(CopyDir)\include\gtk-3.0\gtk\gtkx.h
|
||||||
|
copy ..\..\..\gtk\gtkx-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtkx-autocleanups.h
|
||||||
copy ..\..\..\gtk\gtk-a11y.h $(CopyDir)\include\gtk-3.0\gtk\gtk-a11y.h
|
copy ..\..\..\gtk\gtk-a11y.h $(CopyDir)\include\gtk-3.0\gtk\gtk-a11y.h
|
||||||
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkaboutdialog.h
|
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkaboutdialog.h
|
||||||
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelgroup.h
|
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelgroup.h
|
||||||
@@ -297,6 +343,7 @@ copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkwindowgroup
|
|||||||
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-3.0\gtk\gtktextlayout.h
|
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-3.0\gtk\gtktextlayout.h
|
||||||
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-3.0\gtk\gtktypebuiltins.h
|
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-3.0\gtk\gtktypebuiltins.h
|
||||||
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-3.0\gtk\gtkversion.h
|
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-3.0\gtk\gtkversion.h
|
||||||
|
copy ..\..\..\gtk\a11y\gtk-a11y-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtk-a11y-autocleanups.h
|
||||||
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkarrowaccessible.h
|
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkarrowaccessible.h
|
||||||
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbooleancellaccessible.h
|
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbooleancellaccessible.h
|
||||||
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbuttonaccessible.h
|
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbuttonaccessible.h
|
||||||
|
@@ -35,8 +35,8 @@
|
|||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}</ProjectGuid>
|
<ProjectGuid>{2093D218-190E-4194-9421-3BA7CBF33B15}</ProjectGuid>
|
||||||
<RootNamespace>install</RootNamespace>
|
<RootNamespace>gtkinstall</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
@@ -219,4 +219,4 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
@@ -89,6 +89,7 @@
|
|||||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
@@ -108,6 +109,7 @@
|
|||||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
@@ -132,6 +134,7 @@
|
|||||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
|
||||||
<TargetMachine>MachineX64</TargetMachine>
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
@@ -151,6 +154,7 @@
|
|||||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
@@ -161,6 +161,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\..\demos\icon-browser\iconbrowserapp.c" />
|
<ClCompile Include="..\..\..\demos\icon-browser\iconbrowserapp.c" />
|
||||||
<ClCompile Include="..\..\..\demos\icon-browser\iconbrowserwin.c" />
|
<ClCompile Include="..\..\..\demos\icon-browser\iconbrowserwin.c" />
|
||||||
|
<ClCompile Include="..\..\..\demos\icon-browser\iconstore.c" />
|
||||||
<ClCompile Include="..\..\..\demos\icon-browser\main.c" />
|
<ClCompile Include="..\..\..\demos\icon-browser\main.c" />
|
||||||
<ClCompile Include="..\..\..\demos\icon-browser\resources.c" />
|
<ClCompile Include="..\..\..\demos\icon-browser\resources.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\..\demos\icon-browser\iconbrowserapp.c"><Filter>Sources</Filter></ClCompile>
|
<ClCompile Include="..\..\..\demos\icon-browser\iconbrowserapp.c"><Filter>Sources</Filter></ClCompile>
|
||||||
<ClCompile Include="..\..\..\demos\icon-browser\iconbrowserwin.c"><Filter>Sources</Filter></ClCompile>
|
<ClCompile Include="..\..\..\demos\icon-browser\iconbrowserwin.c"><Filter>Sources</Filter></ClCompile>
|
||||||
|
<ClCompile Include="..\..\..\demos\icon-browser\iconstore.c"><Filter>Sources</Filter></ClCompile>
|
||||||
<ClCompile Include="..\..\..\demos\icon-browser\main.c"><Filter>Sources</Filter></ClCompile>
|
<ClCompile Include="..\..\..\demos\icon-browser\main.c"><Filter>Sources</Filter></ClCompile>
|
||||||
<ClCompile Include="..\..\..\demos\icon-browser\resources.c"><Filter>Sources</Filter></ClCompile>
|
<ClCompile Include="..\..\..\demos\icon-browser\resources.c"><Filter>Sources</Filter></ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@@ -20,7 +20,7 @@ EXTRA_DIST += \
|
|||||||
gtk3-icon-browser.vcxproj.filters \
|
gtk3-icon-browser.vcxproj.filters \
|
||||||
gailutil.vcxproj \
|
gailutil.vcxproj \
|
||||||
gailutil.vcxproj.filters \
|
gailutil.vcxproj.filters \
|
||||||
install.vcxproj \
|
gtk-install.vcxproj \
|
||||||
broadwayd.vcxproj \
|
broadwayd.vcxproj \
|
||||||
broadwayd.vcxproj.filters \
|
broadwayd.vcxproj.filters \
|
||||||
gdk-broadway.vcxproj \
|
gdk-broadway.vcxproj \
|
||||||
|
@@ -20,7 +20,7 @@ EXTRA_DIST += \
|
|||||||
gtk3-icon-browser.vcxproj.filters \
|
gtk3-icon-browser.vcxproj.filters \
|
||||||
gailutil.vcxproj \
|
gailutil.vcxproj \
|
||||||
gailutil.vcxproj.filters \
|
gailutil.vcxproj.filters \
|
||||||
install.vcxproj \
|
gtk-install.vcxproj \
|
||||||
broadwayd.vcxproj \
|
broadwayd.vcxproj \
|
||||||
broadwayd.vcxproj.filters \
|
broadwayd.vcxproj.filters \
|
||||||
gdk-broadway.vcxproj \
|
gdk-broadway.vcxproj \
|
||||||
|
@@ -14,7 +14,7 @@ EXTRA_DIST += \
|
|||||||
gtk3-demo-application.vcproj \
|
gtk3-demo-application.vcproj \
|
||||||
gtk3-icon-browser.vcproj \
|
gtk3-icon-browser.vcproj \
|
||||||
gailutil.vcproj \
|
gailutil.vcproj \
|
||||||
install.vcproj \
|
gtk-install.vcproj \
|
||||||
broadwayd.vcproj \
|
broadwayd.vcproj \
|
||||||
gdk-broadway.vcproj \
|
gdk-broadway.vcproj \
|
||||||
gtk-build-defines.vsprops \
|
gtk-build-defines.vsprops \
|
||||||
|
@@ -5,7 +5,7 @@ the use of the library.
|
|||||||
A more detailed outline for instructions on building the GTK+ with Visual
|
A more detailed outline for instructions on building the GTK+ with Visual
|
||||||
C++ can be found in the following GNOME Live! page:
|
C++ can be found in the following GNOME Live! page:
|
||||||
|
|
||||||
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack
|
https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack
|
||||||
|
|
||||||
This VS9 solution and the projects it includes are intented to be used
|
This VS9 solution and the projects it includes are intented to be used
|
||||||
in a GTK+ source tree unpacked from a tarball. In a git checkout you
|
in a GTK+ source tree unpacked from a tarball. In a git checkout you
|
||||||
|
@@ -57,7 +57,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil", "gailutil.vcproj
|
|||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-install", "gtk-install.vcproj", "{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||||
@@ -161,22 +161,22 @@ Global
|
|||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|Win32.Build.0 = Release|Win32
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|x64.ActiveCfg = Release|x64
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|x64.Build.0 = Release|x64
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|x64.Build.0 = Release|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.ActiveCfg = Debug|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.Build.0 = Debug|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|x64.ActiveCfg = Debug|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|x64.Build.0 = Debug|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.Build.0 = Debug|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|Win32.ActiveCfg = Release|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|Win32.Build.0 = Release|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.Build.0 = Release|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.ActiveCfg = Release|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.ActiveCfg = Release|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.Build.0 = Release|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.Build.0 = Release|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug_Broadway|Win32.ActiveCfg = Debug_Broadway|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug_Broadway|Win32.ActiveCfg = Debug_Broadway|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug_Broadway|Win32.Build.0 = Debug_Broadway|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug_Broadway|Win32.Build.0 = Debug_Broadway|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug_Broadway|x64.ActiveCfg = Debug_Broadway|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug_Broadway|x64.ActiveCfg = Debug_Broadway|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug_Broadway|x64.Build.0 = Debug_Broadway|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug_Broadway|x64.Build.0 = Debug_Broadway|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_Broadway|Win32.ActiveCfg = Release_Broadway|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release_Broadway|Win32.ActiveCfg = Release_Broadway|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
|
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|Win32.ActiveCfg = Debug|Win32
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|Win32.Build.0 = Debug|Win32
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|x64.ActiveCfg = Debug|x64
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0"
|
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0"
|
||||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
||||||
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9.00"
|
Version="9.00"
|
||||||
Name="install"
|
Name="gtk-install"
|
||||||
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
ProjectGUID="{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||||
RootNamespace="install"
|
RootNamespace="gtkinstall"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
TargetFrameworkVersion="131072"
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
@@ -10,26 +10,63 @@
|
|||||||
Value="
|
Value="
|
||||||
mkdir $(CopyDir)\bin

|
mkdir $(CopyDir)\bin

|
||||||
mkdir $(CopyDir)\lib

|
mkdir $(CopyDir)\lib

|
||||||
|
|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).pdb $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib $(CopyDir)\lib

|
||||||
|
|
||||||
if "$(ConfigurationName)" == "Release_Broadway" goto DO_BROADWAY_BIN

|
if "$(ConfigurationName)" == "Release_Broadway" goto DO_BROADWAY_BIN

|
||||||
if "$(ConfigurationName)" == "Debug_Broadway" goto DO_BROADWAY_BIN

|
if "$(ConfigurationName)" == "Debug_Broadway" goto DO_BROADWAY_BIN

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

|
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib

|
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).pdb $(CopyDir)\bin

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

|
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).pdb $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib

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

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-demo.pdb $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-demo-application.exe $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-demo-application.pdb $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin

|
||||||
goto DONE_BIN

|
goto DONE_BIN

|
||||||
|
|
||||||
:DO_BROADWAY_BIN

|
:DO_BROADWAY_BIN

|
||||||
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin

|
|
||||||
copy $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib $(CopyDir)\lib

|
|
||||||
copy $(ConfigurationName)\$(PlatformName)\bin\broadwayd.exe $(CopyDir)\bin

|
copy $(ConfigurationName)\$(PlatformName)\bin\broadwayd.exe $(CopyDir)\bin

|
||||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin

|
copy $(ConfigurationName)\$(PlatformName)\bin\broadwayd.pdb $(CopyDir)\bin

|
||||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin

|
|
||||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib

|
if "$(ConfigurationName)" == "Release_Broadway" goto DO_BROADWAY_RELEASE

|
||||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib

|
if "$(ConfigurationName)" == "Debug_Broadway" goto DO_BROADWAY_DEBUG

|
||||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\*.exe $(CopyDir)\bin

|
:DO_BROADWAY_RELEASE

|
||||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin

|
copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin

|
copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib

|
copy .\Release\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib

|
||||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib

|
copy .\Release\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib

|
||||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\*.exe $(CopyDir)\bin

|
copy .\Release\$(PlatformName)\bin\gtk3-demo.exe $(CopyDir)\bin

|
||||||
|
copy .\Release\$(PlatformName)\bin\gtk3-demo.pdb $(CopyDir)\bin

|
||||||
|
copy .\Release\$(PlatformName)\bin\gtk3-demo-application.exe $(CopyDir)\bin

|
||||||
|
copy .\Release\$(PlatformName)\bin\gtk3-demo-application.pdb $(CopyDir)\bin

|
||||||
|
copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin

|
||||||
|
copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin

|
||||||
|
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin

|
||||||
|
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin

|
||||||
|
goto DONE_BIN

|
||||||
|
|
||||||
|
:DO_BROADWAY_DEBUG

|
||||||
|
copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk3-demo.exe $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk3-demo.pdb $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk3-demo-application.exe $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk3-demo-application.pdb $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin

|
||||||
|
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin

|
||||||
:DONE_BIN

|
:DONE_BIN

|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -45,6 +82,7 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
|||||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated

|
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated

|
||||||
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk

|
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk

|
||||||
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-3.0\gdk\gdk.h

|
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-3.0\gdk\gdk.h

|
||||||
|
copy ..\..\..\gdk\gdk-autocleanup.h $(CopyDir)\include\gtk-3.0\gdk\gdk-autocleanup.h

|
||||||
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkapplaunchcontext.h

|
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkapplaunchcontext.h

|
||||||
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-3.0\gdk\gdkcairo.h

|
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-3.0\gdk\gdkcairo.h

|
||||||
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-3.0\gdk\gdkcursor.h

|
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-3.0\gdk\gdkcursor.h

|
||||||
@@ -88,7 +126,9 @@ copy ..\..\..\gdk\win32\gdkwin32misc.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkw
|
|||||||
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32screen.h

|
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32screen.h

|
||||||
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32window.h

|
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32window.h

|
||||||
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-3.0\gtk\gtk.h

|
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-3.0\gtk\gtk.h

|
||||||
|
copy ..\..\..\gtk\gtk-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtk-autocleanups.h

|
||||||
copy ..\..\..\gtk\gtkx.h $(CopyDir)\include\gtk-3.0\gtk\gtkx.h

|
copy ..\..\..\gtk\gtkx.h $(CopyDir)\include\gtk-3.0\gtk\gtkx.h

|
||||||
|
copy ..\..\..\gtk\gtkx-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtkx-autocleanups.h

|
||||||
copy ..\..\..\gtk\gtk-a11y.h $(CopyDir)\include\gtk-3.0\gtk\gtk-a11y.h

|
copy ..\..\..\gtk\gtk-a11y.h $(CopyDir)\include\gtk-3.0\gtk\gtk-a11y.h

|
||||||
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkaboutdialog.h

|
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkaboutdialog.h

|
||||||
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelgroup.h

|
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelgroup.h

|
||||||
@@ -299,6 +339,7 @@ copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkwindowgroup
|
|||||||
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-3.0\gtk\gtktextlayout.h

|
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-3.0\gtk\gtktextlayout.h

|
||||||
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-3.0\gtk\gtktypebuiltins.h

|
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-3.0\gtk\gtktypebuiltins.h

|
||||||
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-3.0\gtk\gtkversion.h

|
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-3.0\gtk\gtkversion.h

|
||||||
|
copy ..\..\..\gtk\a11y\gtk-a11y-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtk-a11y-autocleanups.h

|
||||||
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkarrowaccessible.h

|
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkarrowaccessible.h

|
||||||
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbooleancellaccessible.h

|
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbooleancellaccessible.h

|
||||||
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbuttonaccessible.h

|
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbuttonaccessible.h

|
||||||
|
@@ -158,6 +158,7 @@
|
|||||||
>
|
>
|
||||||
<File RelativePath="..\..\..\demos\icon-browser\iconbrowserapp.c" />
|
<File RelativePath="..\..\..\demos\icon-browser\iconbrowserapp.c" />
|
||||||
<File RelativePath="..\..\..\demos\icon-browser\iconbrowserwin.c" />
|
<File RelativePath="..\..\..\demos\icon-browser\iconbrowserwin.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\icon-browser\iconstore.c" />
|
||||||
<File RelativePath="..\..\..\demos\icon-browser\main.c" />
|
<File RelativePath="..\..\..\demos\icon-browser\main.c" />
|
||||||
<File RelativePath="..\..\..\demos\icon-browser\resources.c" />
|
<File RelativePath="..\..\..\demos\icon-browser\resources.c" />
|
||||||
</Filter>
|
</Filter>
|
||||||
|
@@ -141,6 +141,9 @@
|
|||||||
#define HAVE_ROUND 1
|
#define HAVE_ROUND 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if sincos() is available */
|
||||||
|
/* #undef HAVE_SINCOS */
|
||||||
|
|
||||||
/* Have the sockaddr_un.sun_len member */
|
/* Have the sockaddr_un.sun_len member */
|
||||||
/* #undef HAVE_SOCKADDR_UN_SUN_LEN */
|
/* #undef HAVE_SOCKADDR_UN_SUN_LEN */
|
||||||
|
|
||||||
|
48
configure.ac
48
configure.ac
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
m4_define([gtk_major_version], [3])
|
m4_define([gtk_major_version], [3])
|
||||||
m4_define([gtk_minor_version], [15])
|
m4_define([gtk_minor_version], [15])
|
||||||
m4_define([gtk_micro_version], [3])
|
m4_define([gtk_micro_version], [12])
|
||||||
m4_define([gtk_interface_age], [0])
|
m4_define([gtk_interface_age], [0])
|
||||||
m4_define([gtk_binary_age],
|
m4_define([gtk_binary_age],
|
||||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||||
@@ -41,14 +41,14 @@ AC_CANONICAL_HOST
|
|||||||
m4_define([gtk_binary_version], [3.0.0])
|
m4_define([gtk_binary_version], [3.0.0])
|
||||||
|
|
||||||
# required versions of other packages
|
# required versions of other packages
|
||||||
m4_define([glib_required_version], [2.43.0])
|
m4_define([glib_required_version], [2.43.4])
|
||||||
m4_define([pango_required_version], [1.36.7])
|
m4_define([pango_required_version], [1.36.7])
|
||||||
m4_define([atk_required_version], [2.15.1])
|
m4_define([atk_required_version], [2.15.1])
|
||||||
m4_define([cairo_required_version], [1.14.0])
|
m4_define([cairo_required_version], [1.14.0])
|
||||||
m4_define([gdk_pixbuf_required_version], [2.30.0])
|
m4_define([gdk_pixbuf_required_version], [2.30.0])
|
||||||
m4_define([introspection_required_version], [1.39.0])
|
m4_define([introspection_required_version], [1.39.0])
|
||||||
m4_define([wayland_required_version], [1.5.91])
|
m4_define([wayland_required_version], [1.5.91])
|
||||||
m4_define([mirclient_required_version], [0.9.0])
|
m4_define([mirclient_required_version], [0.11.0])
|
||||||
m4_define([epoxy_required_version], [1.0])
|
m4_define([epoxy_required_version], [1.0])
|
||||||
GLIB_REQUIRED_VERSION=glib_required_version
|
GLIB_REQUIRED_VERSION=glib_required_version
|
||||||
PANGO_REQUIRED_VERSION=pango_required_version
|
PANGO_REQUIRED_VERSION=pango_required_version
|
||||||
@@ -147,7 +147,6 @@ AC_PROG_MKDIR_P
|
|||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
|
|
||||||
|
|
||||||
GETTEXT_PACKAGE=gtk30
|
GETTEXT_PACKAGE=gtk30
|
||||||
AC_SUBST(GETTEXT_PACKAGE)
|
AC_SUBST(GETTEXT_PACKAGE)
|
||||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||||
@@ -501,11 +500,6 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
|
|
||||||
[Define if debugging is enabled])
|
|
||||||
|
|
||||||
|
|
||||||
# Build time sanity check...
|
# Build time sanity check...
|
||||||
AM_SANITY_CHECK
|
AM_SANITY_CHECK
|
||||||
|
|
||||||
@@ -671,6 +665,15 @@ fi
|
|||||||
# i18n stuff
|
# i18n stuff
|
||||||
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
|
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
|
||||||
AM_GLIB_GNU_GETTEXT
|
AM_GLIB_GNU_GETTEXT
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether xgettext supports ui files])
|
||||||
|
if $ac_cv_path_XGETTEXT --output=- --language=Glade $srcdir/gtk/ui/gtkfilechooserwidget.ui > /dev/null 2>&1; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_ERROR([GNU gettext 0.18.3 or newer is required])
|
||||||
|
fi
|
||||||
|
|
||||||
LIBS="$LIBS $INTLLIBS"
|
LIBS="$LIBS $INTLLIBS"
|
||||||
AC_CONFIG_COMMANDS([po-properties],
|
AC_CONFIG_COMMANDS([po-properties],
|
||||||
[[case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
[[case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
||||||
@@ -823,7 +826,7 @@ AC_TYPE_UID_T
|
|||||||
|
|
||||||
# Check for round(), rint(), isnan(), isinf() and nearbyint()
|
# Check for round(), rint(), isnan(), isinf() and nearbyint()
|
||||||
AC_CHECK_LIB(m,round,,)
|
AC_CHECK_LIB(m,round,,)
|
||||||
AC_CHECK_FUNCS(round rint nearbyint)
|
AC_CHECK_FUNCS(round rint nearbyint sincos)
|
||||||
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
|
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
|
||||||
|
|
||||||
# Checks for gdkspawn
|
# Checks for gdkspawn
|
||||||
@@ -1028,22 +1031,16 @@ if test "x$enable_x11_backend" = xyes; then
|
|||||||
AC_CHECK_FUNC(XextFindDisplay, :,
|
AC_CHECK_FUNC(XextFindDisplay, :,
|
||||||
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
|
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
|
||||||
|
|
||||||
# Check for xReply
|
# Check if <X11/extensions/XIproto.h> is needed for xReply.
|
||||||
|
|
||||||
AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
|
AC_CHECK_TYPE([xReply], ,
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlibint.h>]],
|
[AC_CHECK_TYPE([xReply],
|
||||||
[[xReply *rep = NULL;
|
[AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
|
||||||
rep = rep;]])],
|
[Define if <X11/extensions/XIproto.h> needed for xReply])],
|
||||||
[AC_MSG_RESULT([no])],
|
[AC_MSG_ERROR([xReply type unavailable. X11 is too old])],
|
||||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/XIproto.h>
|
[[#include <X11/extensions/XIproto.h>
|
||||||
#include <X11/Xlibint.h>]],
|
#include <X11/Xlibint.h>]])],
|
||||||
[[xReply *rep = NULL;
|
[[#include <X11/Xlibint.h>]])
|
||||||
rep = rep;]])],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], [1],
|
|
||||||
[Define if <X11/extensions/XIproto.h> needed for xReply])],
|
|
||||||
[AC_MSG_RESULT([unknown])
|
|
||||||
AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
|
|
||||||
|
|
||||||
# Check for XKB support.
|
# Check for XKB support.
|
||||||
|
|
||||||
@@ -1911,7 +1908,6 @@ gtk/makefile.msc
|
|||||||
gtk/gtkversion.h
|
gtk/gtkversion.h
|
||||||
gtk/gtk-win32.rc
|
gtk/gtk-win32.rc
|
||||||
gtk/libgtk3.manifest
|
gtk/libgtk3.manifest
|
||||||
util/Makefile
|
|
||||||
libgail-util/Makefile
|
libgail-util/Makefile
|
||||||
modules/Makefile
|
modules/Makefile
|
||||||
modules/input/Makefile
|
modules/input/Makefile
|
||||||
|
@@ -136,6 +136,8 @@ RESOURCES = \
|
|||||||
brick2.png \
|
brick2.png \
|
||||||
background.jpg \
|
background.jpg \
|
||||||
floppybuddy.gif \
|
floppybuddy.gif \
|
||||||
|
glarea-fragment.glsl \
|
||||||
|
glarea-vertex.glsl \
|
||||||
gnome-applets.png \
|
gnome-applets.png \
|
||||||
gnome-calendar.png \
|
gnome-calendar.png \
|
||||||
gnome-foot.png \
|
gnome-foot.png \
|
||||||
|
@@ -140,4 +140,8 @@
|
|||||||
<gresource prefix="/popover">
|
<gresource prefix="/popover">
|
||||||
<file>popover.ui</file>
|
<file>popover.ui</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
|
<gresource prefix="/glarea">
|
||||||
|
<file>glarea-fragment.glsl</file>
|
||||||
|
<file>glarea-vertex.glsl</file>
|
||||||
|
</gresource>
|
||||||
</gresources>
|
</gresources>
|
||||||
|
@@ -158,11 +158,18 @@ add_item (GtkWidget *button, gpointer data)
|
|||||||
/* Insert a new row below the current one */
|
/* Insert a new row below the current one */
|
||||||
gtk_tree_view_get_cursor (treeview, &path, NULL);
|
gtk_tree_view_get_cursor (treeview, &path, NULL);
|
||||||
model = gtk_tree_view_get_model (treeview);
|
model = gtk_tree_view_get_model (treeview);
|
||||||
gtk_tree_model_get_iter (model, ¤t, path);
|
if (path)
|
||||||
gtk_tree_path_free (path);
|
{
|
||||||
|
gtk_tree_model_get_iter (model, ¤t, path);
|
||||||
|
gtk_tree_path_free (path);
|
||||||
|
gtk_list_store_insert_after (GTK_LIST_STORE (model), &iter, ¤t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_list_store_insert (GTK_LIST_STORE (model), &iter, -1);
|
||||||
|
}
|
||||||
|
|
||||||
/* Set the data for the new row */
|
/* Set the data for the new row */
|
||||||
gtk_list_store_insert_after (GTK_LIST_STORE (model), &iter, ¤t);
|
|
||||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
|
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
|
||||||
COLUMN_ITEM_NUMBER, foo.number,
|
COLUMN_ITEM_NUMBER, foo.number,
|
||||||
COLUMN_ITEM_PRODUCT, foo.product,
|
COLUMN_ITEM_PRODUCT, foo.product,
|
||||||
|
9
demos/gtk-demo/glarea-fragment.glsl
Normal file
9
demos/gtk-demo/glarea-fragment.glsl
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#version 330
|
||||||
|
|
||||||
|
out vec4 outputColor;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
float lerpVal = gl_FragCoord.y / 500.0f;
|
||||||
|
|
||||||
|
outputColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
|
||||||
|
}
|
8
demos/gtk-demo/glarea-vertex.glsl
Normal file
8
demos/gtk-demo/glarea-vertex.glsl
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#version 330
|
||||||
|
|
||||||
|
layout(location = 0) in vec4 position;
|
||||||
|
uniform mat4 mvp;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_Position = mvp * position;
|
||||||
|
}
|
@@ -3,6 +3,7 @@
|
|||||||
* GtkGLArea is a widget that allows custom drawing using OpenGL calls.
|
* GtkGLArea is a widget that allows custom drawing using OpenGL calls.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <epoxy/gl.h>
|
#include <epoxy/gl.h>
|
||||||
|
|
||||||
@@ -23,35 +24,261 @@ enum {
|
|||||||
static float rotation_angles[N_AXIS] = { 0.0 };
|
static float rotation_angles[N_AXIS] = { 0.0 };
|
||||||
|
|
||||||
/* The object we are drawing */
|
/* The object we are drawing */
|
||||||
|
static const GLfloat vertex_data[] = {
|
||||||
|
0.f, 0.5f, 0.f, 1.f,
|
||||||
|
0.5f, -0.366f, 0.f, 1.f,
|
||||||
|
-0.5f, -0.366f, 0.f, 1.f,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Initialize the GL buffers */
|
||||||
|
static void
|
||||||
|
init_buffers (GLuint *vao_out,
|
||||||
|
GLuint *buffer_out)
|
||||||
|
{
|
||||||
|
GLuint vao, buffer;
|
||||||
|
|
||||||
|
/* We only use one VAO, so we always keep it bound */
|
||||||
|
glGenVertexArrays (1, &vao);
|
||||||
|
glBindVertexArray (vao);
|
||||||
|
|
||||||
|
/* This is the buffer that holds the vertices */
|
||||||
|
glGenBuffers (1, &buffer);
|
||||||
|
glBindBuffer (GL_ARRAY_BUFFER, buffer);
|
||||||
|
glBufferData (GL_ARRAY_BUFFER, sizeof (vertex_data), vertex_data, GL_STATIC_DRAW);
|
||||||
|
glBindBuffer (GL_ARRAY_BUFFER, 0);
|
||||||
|
|
||||||
|
if (vao_out != NULL)
|
||||||
|
*vao_out = vao;
|
||||||
|
|
||||||
|
if (buffer_out != NULL)
|
||||||
|
*buffer_out = buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create and compile a shader */
|
||||||
|
static GLuint
|
||||||
|
create_shader (int type,
|
||||||
|
const char *src)
|
||||||
|
{
|
||||||
|
GLuint shader;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
shader = glCreateShader (type);
|
||||||
|
glShaderSource (shader, 1, &src, NULL);
|
||||||
|
glCompileShader (shader);
|
||||||
|
|
||||||
|
glGetShaderiv (shader, GL_COMPILE_STATUS, &status);
|
||||||
|
if (status == GL_FALSE)
|
||||||
|
{
|
||||||
|
int log_len;
|
||||||
|
char *buffer;
|
||||||
|
|
||||||
|
glGetShaderiv (shader, GL_INFO_LOG_LENGTH, &log_len);
|
||||||
|
|
||||||
|
buffer = g_malloc (log_len + 1);
|
||||||
|
glGetShaderInfoLog (shader, log_len, NULL, buffer);
|
||||||
|
|
||||||
|
g_warning ("Compile failure in %s shader:\n%s\n",
|
||||||
|
type == GL_VERTEX_SHADER ? "vertex" : "fragment",
|
||||||
|
buffer);
|
||||||
|
|
||||||
|
g_free (buffer);
|
||||||
|
|
||||||
|
glDeleteShader (shader);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return shader;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize the shaders and link them into a program */
|
||||||
|
static void
|
||||||
|
init_shaders (GLuint *program_out,
|
||||||
|
GLuint *mvp_out)
|
||||||
|
{
|
||||||
|
GLuint vertex, fragment;
|
||||||
|
GLuint program = 0;
|
||||||
|
GLuint mvp = 0;
|
||||||
|
int status;
|
||||||
|
GBytes *source;
|
||||||
|
|
||||||
|
source = g_resources_lookup_data ("/glarea/glarea-vertex.glsl", 0, NULL);
|
||||||
|
vertex = create_shader (GL_VERTEX_SHADER, g_bytes_get_data (source, NULL));
|
||||||
|
g_bytes_unref (source);
|
||||||
|
|
||||||
|
if (vertex == 0)
|
||||||
|
{
|
||||||
|
*program_out = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
source = g_resources_lookup_data ("/glarea/glarea-fragment.glsl", 0, NULL);
|
||||||
|
fragment = create_shader (GL_FRAGMENT_SHADER, g_bytes_get_data (source, NULL));
|
||||||
|
g_bytes_unref (source);
|
||||||
|
|
||||||
|
if (fragment == 0)
|
||||||
|
{
|
||||||
|
glDeleteShader (vertex);
|
||||||
|
*program_out = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
program = glCreateProgram ();
|
||||||
|
glAttachShader (program, vertex);
|
||||||
|
glAttachShader (program, fragment);
|
||||||
|
|
||||||
|
glLinkProgram (program);
|
||||||
|
|
||||||
|
glGetProgramiv (program, GL_LINK_STATUS, &status);
|
||||||
|
if (status == GL_FALSE)
|
||||||
|
{
|
||||||
|
int log_len;
|
||||||
|
char *buffer;
|
||||||
|
|
||||||
|
glGetProgramiv (program, GL_INFO_LOG_LENGTH, &log_len);
|
||||||
|
|
||||||
|
buffer = g_malloc (log_len + 1);
|
||||||
|
glGetProgramInfoLog (program, log_len, NULL, buffer);
|
||||||
|
|
||||||
|
g_warning ("Linking failure:\n%s\n", buffer);
|
||||||
|
|
||||||
|
g_free (buffer);
|
||||||
|
|
||||||
|
glDeleteProgram (program);
|
||||||
|
program = 0;
|
||||||
|
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get the location of the "mvp" uniform */
|
||||||
|
mvp = glGetUniformLocation (program, "mvp");
|
||||||
|
|
||||||
|
glDetachShader (program, vertex);
|
||||||
|
glDetachShader (program, fragment);
|
||||||
|
|
||||||
|
out:
|
||||||
|
glDeleteShader (vertex);
|
||||||
|
glDeleteShader (fragment);
|
||||||
|
|
||||||
|
if (program_out != NULL)
|
||||||
|
*program_out = program;
|
||||||
|
|
||||||
|
if (mvp_out != NULL)
|
||||||
|
*mvp_out = mvp;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
compute_mvp (float *res,
|
||||||
|
float phi,
|
||||||
|
float theta,
|
||||||
|
float psi)
|
||||||
|
{
|
||||||
|
float x = phi * (G_PI / 180.f);
|
||||||
|
float y = theta * (G_PI / 180.f);
|
||||||
|
float z = psi * (G_PI / 180.f);
|
||||||
|
float c1 = cosf (x), s1 = sinf (x);
|
||||||
|
float c2 = cosf (y), s2 = sinf (y);
|
||||||
|
float c3 = cosf (z), s3 = sinf (z);
|
||||||
|
float c3c2 = c3 * c2;
|
||||||
|
float s3c1 = s3 * c1;
|
||||||
|
float c3s2s1 = c3 * s2 * s1;
|
||||||
|
float s3s1 = s3 * s1;
|
||||||
|
float c3s2c1 = c3 * s2 * c1;
|
||||||
|
float s3c2 = s3 * c2;
|
||||||
|
float c3c1 = c3 * c1;
|
||||||
|
float s3s2s1 = s3 * s2 * s1;
|
||||||
|
float c3s1 = c3 * s1;
|
||||||
|
float s3s2c1 = s3 * s2 * c1;
|
||||||
|
float c2s1 = c2 * s1;
|
||||||
|
float c2c1 = c2 * c1;
|
||||||
|
|
||||||
|
/* initialize to the identity matrix */
|
||||||
|
res[0] = 1.f; res[4] = 0.f; res[8] = 0.f; res[12] = 0.f;
|
||||||
|
res[1] = 0.f; res[5] = 1.f; res[9] = 0.f; res[13] = 0.f;
|
||||||
|
res[2] = 0.f; res[6] = 0.f; res[10] = 1.f; res[14] = 0.f;
|
||||||
|
res[3] = 0.f; res[7] = 0.f; res[11] = 0.f; res[15] = 1.f;
|
||||||
|
|
||||||
|
/* apply all three rotations using the three matrices:
|
||||||
|
*
|
||||||
|
* ⎡ c3 s3 0 ⎤ ⎡ c2 0 -s2 ⎤ ⎡ 1 0 0 ⎤
|
||||||
|
* ⎢ -s3 c3 0 ⎥ ⎢ 0 1 0 ⎥ ⎢ 0 c1 s1 ⎥
|
||||||
|
* ⎣ 0 0 1 ⎦ ⎣ s2 0 c2 ⎦ ⎣ 0 -s1 c1 ⎦
|
||||||
|
*/
|
||||||
|
res[0] = c3c2; res[4] = s3c1 + c3s2s1; res[8] = s3s1 - c3s2c1; res[12] = 0.f;
|
||||||
|
res[1] = -s3c2; res[5] = c3c1 - s3s2s1; res[9] = c3s1 + s3s2c1; res[13] = 0.f;
|
||||||
|
res[2] = s2; res[6] = -c2s1; res[10] = c2c1; res[14] = 0.f;
|
||||||
|
res[3] = 0.f; res[7] = 0.f; res[11] = 0.f; res[15] = 1.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GLuint position_buffer;
|
||||||
|
static GLuint program;
|
||||||
|
static GLuint mvp_location;
|
||||||
|
|
||||||
|
/* We need to set up our state when we realize the GtkGLArea widget */
|
||||||
|
static void
|
||||||
|
realize (GtkWidget *widget)
|
||||||
|
{
|
||||||
|
gtk_gl_area_make_current (GTK_GL_AREA (widget));
|
||||||
|
|
||||||
|
init_buffers (&position_buffer, NULL);
|
||||||
|
init_shaders (&program, &mvp_location);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We should tear down the state when unrealizing */
|
||||||
|
static void
|
||||||
|
unrealize (GtkWidget *widget)
|
||||||
|
{
|
||||||
|
gtk_gl_area_make_current (GTK_GL_AREA (widget));
|
||||||
|
|
||||||
|
glDeleteBuffers (1, &position_buffer);
|
||||||
|
glDeleteProgram (program);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
draw_triangle (void)
|
draw_triangle (void)
|
||||||
{
|
{
|
||||||
glColor3f (1.0f, 0.85f, 0.35f);
|
float mvp[16];
|
||||||
glBegin (GL_TRIANGLES);
|
|
||||||
{
|
/* Compute the model view projection matrix using the
|
||||||
glVertex3f ( 0.0, 0.6, 0.0);
|
* rotation angles specified through the GtkRange widgets
|
||||||
glVertex3f (-0.2, -0.3, 0.0);
|
*/
|
||||||
glVertex3f ( 0.2, -0.3, 0.0);
|
compute_mvp (mvp,
|
||||||
}
|
rotation_angles[X_AXIS],
|
||||||
glEnd ();
|
rotation_angles[Y_AXIS],
|
||||||
|
rotation_angles[Z_AXIS]);
|
||||||
|
|
||||||
|
/* Use our shaders */
|
||||||
|
glUseProgram (program);
|
||||||
|
|
||||||
|
/* Update the "mvp" matrix we use in the shader */
|
||||||
|
glUniformMatrix4fv (mvp_location, 1, GL_FALSE, &mvp[0]);
|
||||||
|
|
||||||
|
/* Use the vertices in our buffer */
|
||||||
|
glBindBuffer (GL_ARRAY_BUFFER, position_buffer);
|
||||||
|
glEnableVertexAttribArray (0);
|
||||||
|
glVertexAttribPointer (0, 4, GL_FLOAT, GL_FALSE, 0, 0);
|
||||||
|
|
||||||
|
/* Draw the three vertices as a triangle */
|
||||||
|
glDrawArrays (GL_TRIANGLES, 0, 3);
|
||||||
|
|
||||||
|
/* We finished using the buffers and program */
|
||||||
|
glDisableVertexAttribArray (0);
|
||||||
|
glBindBuffer (GL_ARRAY_BUFFER, 0);
|
||||||
|
glUseProgram (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The main rendering callback */
|
|
||||||
static gboolean
|
static gboolean
|
||||||
render (GtkGLArea *area,
|
render (GtkGLArea *area,
|
||||||
GdkGLContext *context)
|
GdkGLContext *context)
|
||||||
{
|
{
|
||||||
|
/* Clear the viewport */
|
||||||
glClearColor (0.5, 0.5, 0.5, 1.0);
|
glClearColor (0.5, 0.5, 0.5, 1.0);
|
||||||
glClear (GL_COLOR_BUFFER_BIT);
|
glClear (GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
glMatrixMode (GL_MODELVIEW);
|
/* Draw our object */
|
||||||
glLoadIdentity ();
|
|
||||||
glRotatef (rotation_angles[X_AXIS], 1, 0, 0);
|
|
||||||
glRotatef (rotation_angles[Y_AXIS], 0, 1, 0);
|
|
||||||
glRotatef (rotation_angles[Z_AXIS], 0, 0, 1);
|
|
||||||
|
|
||||||
draw_triangle ();
|
draw_triangle ();
|
||||||
|
|
||||||
|
/* Flush the contents of the pipeline */
|
||||||
glFlush ();
|
glFlush ();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -138,7 +365,7 @@ create_glarea_window (GtkWidget *do_widget)
|
|||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (do_widget));
|
gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (do_widget));
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "GtkGLArea - Golden Triangle");
|
gtk_window_set_title (GTK_WINDOW (window), "GtkGLArea - Golden Triangle");
|
||||||
gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
|
gtk_window_set_default_size (GTK_WINDOW (window), 400, 600);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
||||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||||
|
|
||||||
@@ -151,7 +378,13 @@ create_glarea_window (GtkWidget *do_widget)
|
|||||||
gtk_widget_set_vexpand (gl_area, TRUE);
|
gtk_widget_set_vexpand (gl_area, TRUE);
|
||||||
gtk_container_add (GTK_CONTAINER (box), gl_area);
|
gtk_container_add (GTK_CONTAINER (box), gl_area);
|
||||||
|
|
||||||
/* the main "draw" call for GtkGLArea */
|
/* We need to initialize and free GL resources, so we use
|
||||||
|
* the realize and unrealize signals on the widget
|
||||||
|
*/
|
||||||
|
g_signal_connect (gl_area, "realize", G_CALLBACK (realize), NULL);
|
||||||
|
g_signal_connect (gl_area, "unrealize", G_CALLBACK (unrealize), NULL);
|
||||||
|
|
||||||
|
/* The main "draw" call for GtkGLArea */
|
||||||
g_signal_connect (gl_area, "render", G_CALLBACK (render), NULL);
|
g_signal_connect (gl_area, "render", G_CALLBACK (render), NULL);
|
||||||
|
|
||||||
controls = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
|
controls = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
|
||||||
|
@@ -218,7 +218,6 @@ add_columns (GtkTreeView *treeview)
|
|||||||
|
|
||||||
/* column for symbolic icon */
|
/* column for symbolic icon */
|
||||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||||
g_object_set (G_OBJECT (renderer), "follow-state", TRUE, NULL);
|
|
||||||
column = gtk_tree_view_column_new_with_attributes ("Symbolic icon",
|
column = gtk_tree_view_column_new_with_attributes ("Symbolic icon",
|
||||||
renderer,
|
renderer,
|
||||||
"icon-name",
|
"icon-name",
|
||||||
|
@@ -543,7 +543,7 @@ add_data_tab (const gchar *demoname)
|
|||||||
* not an image. Let's try something else then.
|
* not an image. Let's try something else then.
|
||||||
*/
|
*/
|
||||||
g_object_ref_sink (widget);
|
g_object_ref_sink (widget);
|
||||||
gtk_widget_destroy (widget);
|
g_object_unref (widget);
|
||||||
|
|
||||||
bytes = g_resources_lookup_data (resource_name, 0, NULL);
|
bytes = g_resources_lookup_data (resource_name, 0, NULL);
|
||||||
g_assert (bytes);
|
g_assert (bytes);
|
||||||
|
@@ -42,6 +42,34 @@ window_key_press_event_cb (GtkWidget *widget,
|
|||||||
return gtk_search_bar_handle_event (bar, event);
|
return gtk_search_bar_handle_event (bar, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
search_changed (GtkSearchEntry *entry,
|
||||||
|
GtkLabel *label)
|
||||||
|
{
|
||||||
|
gtk_label_set_text (label, "search-changed");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
next_match (GtkSearchEntry *entry,
|
||||||
|
GtkLabel *label)
|
||||||
|
{
|
||||||
|
gtk_label_set_text (label, "next-match");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
previous_match (GtkSearchEntry *entry,
|
||||||
|
GtkLabel *label)
|
||||||
|
{
|
||||||
|
gtk_label_set_text (label, "previous-match");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
stop_search (GtkSearchEntry *entry,
|
||||||
|
GtkLabel *label)
|
||||||
|
{
|
||||||
|
gtk_label_set_text (label, "stop-search");
|
||||||
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
do_search_entry2 (GtkWidget *do_widget)
|
do_search_entry2 (GtkWidget *do_widget)
|
||||||
{
|
{
|
||||||
@@ -99,6 +127,8 @@ do_search_entry2 (GtkWidget *do_widget)
|
|||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||||
|
|
||||||
label = gtk_label_new ("Result:");
|
label = gtk_label_new ("Result:");
|
||||||
|
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||||
|
gtk_widget_set_margin_start (label, 6);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||||
|
|
||||||
label = gtk_label_new ("");
|
label = gtk_label_new ("");
|
||||||
@@ -108,6 +138,27 @@ do_search_entry2 (GtkWidget *do_widget)
|
|||||||
G_CALLBACK (search_changed_cb), label);
|
G_CALLBACK (search_changed_cb), label);
|
||||||
g_signal_connect (entry, "changed",
|
g_signal_connect (entry, "changed",
|
||||||
G_CALLBACK (changed_cb), label);
|
G_CALLBACK (changed_cb), label);
|
||||||
|
|
||||||
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||||
|
|
||||||
|
label = gtk_label_new ("Signal:");
|
||||||
|
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||||
|
gtk_widget_set_margin_start (label, 6);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
label = gtk_label_new ("");
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
g_signal_connect (entry, "search-changed",
|
||||||
|
G_CALLBACK (search_changed), label);
|
||||||
|
g_signal_connect (entry, "next-match",
|
||||||
|
G_CALLBACK (next_match), label);
|
||||||
|
g_signal_connect (entry, "previous-match",
|
||||||
|
G_CALLBACK (previous_match), label);
|
||||||
|
g_signal_connect (entry, "stop-search",
|
||||||
|
G_CALLBACK (stop_search), label);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
/* Sidebar
|
/* Stack Sidebar
|
||||||
*
|
*
|
||||||
* GtkSidebar provides an automatic sidebar widget to control navigation
|
* GtkStackSidebar provides an automatic sidebar widget to control
|
||||||
* of a GtkStack object. This widget automatically updates it content
|
* navigation of a GtkStack object. This widget automatically updates it
|
||||||
* based on what is presently available in the GtkStack object, and
|
* content based on what is presently available in the GtkStack object,
|
||||||
* using the "title" child property to set the display labels.
|
* and using the "title" child property to set the display labels.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
@@ -21,7 +21,7 @@ do_sidebar (GtkWidget *do_widget)
|
|||||||
GtkWidget *header;
|
GtkWidget *header;
|
||||||
const gchar* pages[] = {
|
const gchar* pages[] = {
|
||||||
"Welcome to GTK+",
|
"Welcome to GTK+",
|
||||||
"GtkSidebar Widget",
|
"GtkStackSidebar Widget",
|
||||||
"Automatic navigation",
|
"Automatic navigation",
|
||||||
"Consistent appearance",
|
"Consistent appearance",
|
||||||
"Scrolling",
|
"Scrolling",
|
||||||
@@ -43,18 +43,18 @@ do_sidebar (GtkWidget *do_widget)
|
|||||||
header = gtk_header_bar_new ();
|
header = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR(header), TRUE);
|
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR(header), TRUE);
|
||||||
gtk_window_set_titlebar (GTK_WINDOW(window), header);
|
gtk_window_set_titlebar (GTK_WINDOW(window), header);
|
||||||
gtk_window_set_title (GTK_WINDOW(window), "Sidebar demo");
|
gtk_window_set_title (GTK_WINDOW(window), "Stack Sidebar demo");
|
||||||
|
|
||||||
g_signal_connect (window, "destroy",
|
g_signal_connect (window, "destroy",
|
||||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
sidebar = gtk_sidebar_new ();
|
sidebar = gtk_stack_sidebar_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (box), sidebar, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (box), sidebar, FALSE, FALSE, 0);
|
||||||
|
|
||||||
stack = gtk_stack_new ();
|
stack = gtk_stack_new ();
|
||||||
gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
|
gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
|
||||||
gtk_sidebar_set_stack (GTK_SIDEBAR (sidebar), GTK_STACK (stack));
|
gtk_stack_sidebar_set_stack (GTK_STACK_SIDEBAR (sidebar), GTK_STACK (stack));
|
||||||
|
|
||||||
/* Separator between sidebar and stack */
|
/* Separator between sidebar and stack */
|
||||||
widget = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
|
widget = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
|
||||||
|
@@ -20,6 +20,7 @@ gtk3_icon_browser_SOURCES = \
|
|||||||
main.c \
|
main.c \
|
||||||
iconbrowserapp.c iconbrowserapp.h \
|
iconbrowserapp.c iconbrowserapp.h \
|
||||||
iconbrowserwin.c iconbrowserwin.h \
|
iconbrowserwin.c iconbrowserwin.h \
|
||||||
|
iconstore.c iconstore.h \
|
||||||
resources.c
|
resources.c
|
||||||
|
|
||||||
BUILT_SOURCES = \
|
BUILT_SOURCES = \
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "iconbrowserapp.h"
|
#include "iconbrowserapp.h"
|
||||||
#include "iconbrowserwin.h"
|
#include "iconbrowserwin.h"
|
||||||
|
#include "iconstore.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -42,13 +43,6 @@ struct _IconBrowserWindowClass
|
|||||||
GtkApplicationWindowClass parent_class;
|
GtkApplicationWindowClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
|
||||||
NAME_COLUMN,
|
|
||||||
SYMBOLIC_NAME_COLUMN,
|
|
||||||
DESCRIPTION_COLUMN,
|
|
||||||
CONTEXT_COLUMN
|
|
||||||
};
|
|
||||||
|
|
||||||
G_DEFINE_TYPE(IconBrowserWindow, icon_browser_window, GTK_TYPE_APPLICATION_WINDOW);
|
G_DEFINE_TYPE(IconBrowserWindow, icon_browser_window, GTK_TYPE_APPLICATION_WINDOW);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -64,16 +58,31 @@ search_text_changed (GtkEntry *entry, IconBrowserWindow *win)
|
|||||||
gtk_tree_model_filter_refilter (win->filter_model);
|
gtk_tree_model_filter_refilter (win->filter_model);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static GdkPixbuf *
|
||||||
set_image (GtkWidget *image, const gchar *name, gint size)
|
get_icon (GtkWidget *image, const gchar *name, gint size)
|
||||||
{
|
{
|
||||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), name, 1);
|
GtkIconInfo *info;
|
||||||
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
GtkStyleContext *context;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (image);
|
||||||
|
info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), name, size, 0);
|
||||||
|
pixbuf = gtk_icon_info_load_symbolic_for_context (info, context, NULL, NULL);
|
||||||
|
g_object_unref (info);
|
||||||
|
|
||||||
|
return pixbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
selection_changed (GtkIconView *icon_view, IconBrowserWindow *win)
|
set_image (GtkWidget *image, const gchar *name, gint size)
|
||||||
{
|
{
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
|
gtk_image_set_from_icon_name (GTK_IMAGE (image), name, 1);
|
||||||
|
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
||||||
|
pixbuf = get_icon (image, name, size);
|
||||||
|
gtk_drag_source_set_icon_pixbuf (gtk_widget_get_parent (image), pixbuf);
|
||||||
|
g_object_unref (pixbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -87,14 +96,14 @@ item_activated (GtkIconView *icon_view, GtkTreePath *path, IconBrowserWindow *wi
|
|||||||
gtk_tree_model_get_iter (GTK_TREE_MODEL (win->filter_model), &iter, path);
|
gtk_tree_model_get_iter (GTK_TREE_MODEL (win->filter_model), &iter, path);
|
||||||
|
|
||||||
if (win->symbolic)
|
if (win->symbolic)
|
||||||
column = SYMBOLIC_NAME_COLUMN;
|
column = ICON_STORE_SYMBOLIC_NAME_COLUMN;
|
||||||
else
|
else
|
||||||
column = NAME_COLUMN;
|
column = ICON_STORE_NAME_COLUMN;
|
||||||
gtk_tree_model_get (GTK_TREE_MODEL (win->filter_model), &iter,
|
gtk_tree_model_get (GTK_TREE_MODEL (win->filter_model), &iter,
|
||||||
column, &name,
|
column, &name,
|
||||||
DESCRIPTION_COLUMN, &description,
|
ICON_STORE_DESCRIPTION_COLUMN, &description,
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
if (name == NULL || !gtk_icon_theme_has_icon (gtk_icon_theme_get_default (), name))
|
if (name == NULL || !gtk_icon_theme_has_icon (gtk_icon_theme_get_default (), name))
|
||||||
{
|
{
|
||||||
g_free (description);
|
g_free (description);
|
||||||
@@ -146,10 +155,10 @@ add_icon (IconBrowserWindow *win,
|
|||||||
symbolic_name = NULL;
|
symbolic_name = NULL;
|
||||||
}
|
}
|
||||||
gtk_list_store_insert_with_values (win->store, NULL, -1,
|
gtk_list_store_insert_with_values (win->store, NULL, -1,
|
||||||
NAME_COLUMN, regular_name,
|
ICON_STORE_NAME_COLUMN, regular_name,
|
||||||
SYMBOLIC_NAME_COLUMN, symbolic_name,
|
ICON_STORE_SYMBOLIC_NAME_COLUMN, symbolic_name,
|
||||||
DESCRIPTION_COLUMN, description,
|
ICON_STORE_DESCRIPTION_COLUMN, description,
|
||||||
CONTEXT_COLUMN, context,
|
ICON_STORE_CONTEXT_COLUMN, context,
|
||||||
-1);
|
-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -702,13 +711,13 @@ icon_visible_func (GtkTreeModel *model,
|
|||||||
search_text = gtk_entry_get_text (GTK_ENTRY (win->searchentry));
|
search_text = gtk_entry_get_text (GTK_ENTRY (win->searchentry));
|
||||||
|
|
||||||
if (win->symbolic)
|
if (win->symbolic)
|
||||||
column = SYMBOLIC_NAME_COLUMN;
|
column = ICON_STORE_SYMBOLIC_NAME_COLUMN;
|
||||||
else
|
else
|
||||||
column = NAME_COLUMN;
|
column = ICON_STORE_NAME_COLUMN;
|
||||||
|
|
||||||
gtk_tree_model_get (model, iter,
|
gtk_tree_model_get (model, iter,
|
||||||
column, &name,
|
column, &name,
|
||||||
CONTEXT_COLUMN, &context,
|
ICON_STORE_CONTEXT_COLUMN, &context,
|
||||||
-1);
|
-1);
|
||||||
if (!name)
|
if (!name)
|
||||||
visible = FALSE;
|
visible = FALSE;
|
||||||
@@ -731,9 +740,11 @@ symbolic_toggled (GtkToggleButton *toggle, IconBrowserWindow *win)
|
|||||||
win->symbolic = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
|
win->symbolic = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
|
||||||
|
|
||||||
if (win->symbolic)
|
if (win->symbolic)
|
||||||
column = SYMBOLIC_NAME_COLUMN;
|
column = ICON_STORE_SYMBOLIC_NAME_COLUMN;
|
||||||
else
|
else
|
||||||
column = NAME_COLUMN;
|
column = ICON_STORE_NAME_COLUMN;
|
||||||
|
|
||||||
|
icon_store_set_text_column (ICON_STORE (win->store), column);
|
||||||
|
|
||||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (win->list), win->cell, "icon-name", column, NULL);
|
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (win->list), win->cell, "icon-name", column, NULL);
|
||||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (win->list), win->text_cell, "text", column, NULL);
|
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (win->list), win->text_cell, "text", column, NULL);
|
||||||
@@ -749,17 +760,72 @@ search_mode_toggled (GObject *searchbar, GParamSpec *pspec, IconBrowserWindow *w
|
|||||||
gtk_list_box_unselect_all (GTK_LIST_BOX (win->context_list));
|
gtk_list_box_unselect_all (GTK_LIST_BOX (win->context_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
get_image_data (GtkWidget *widget,
|
||||||
|
GdkDragContext *context,
|
||||||
|
GtkSelectionData *selection,
|
||||||
|
guint target_info,
|
||||||
|
guint time,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
GtkWidget *image;
|
||||||
|
const gchar *name;
|
||||||
|
gint size;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
|
image = gtk_bin_get_child (GTK_BIN (widget));
|
||||||
|
|
||||||
|
gtk_image_get_icon_name (GTK_IMAGE (image), &name, NULL);
|
||||||
|
size = gtk_image_get_pixel_size (GTK_IMAGE (image));
|
||||||
|
|
||||||
|
pixbuf = get_icon (image, name, size);
|
||||||
|
gtk_selection_data_set_pixbuf (selection, pixbuf);
|
||||||
|
g_object_unref (pixbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
setup_image_dnd (GtkWidget *image)
|
||||||
|
{
|
||||||
|
GtkWidget *parent;
|
||||||
|
|
||||||
|
parent = gtk_widget_get_parent (image);
|
||||||
|
gtk_drag_source_set (parent, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||||
|
gtk_drag_source_add_image_targets (parent);
|
||||||
|
g_signal_connect (parent, "drag-data-get", G_CALLBACK (get_image_data), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
icon_browser_window_init (IconBrowserWindow *win)
|
icon_browser_window_init (IconBrowserWindow *win)
|
||||||
{
|
{
|
||||||
|
GtkTargetList *list;
|
||||||
|
GtkTargetEntry *targets;
|
||||||
|
gint n_targets;
|
||||||
|
|
||||||
gtk_widget_init_template (GTK_WIDGET (win));
|
gtk_widget_init_template (GTK_WIDGET (win));
|
||||||
|
|
||||||
|
list = gtk_target_list_new (NULL, 0);
|
||||||
|
gtk_target_list_add_text_targets (list, 0);
|
||||||
|
targets = gtk_target_table_new_from_list (list, &n_targets);
|
||||||
|
gtk_target_list_unref (list);
|
||||||
|
|
||||||
|
gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (win->list),
|
||||||
|
GDK_BUTTON1_MASK,
|
||||||
|
targets, n_targets,
|
||||||
|
GDK_ACTION_COPY);
|
||||||
|
|
||||||
|
gtk_target_table_free (targets, n_targets);
|
||||||
|
|
||||||
|
setup_image_dnd (win->image1);
|
||||||
|
setup_image_dnd (win->image2);
|
||||||
|
setup_image_dnd (win->image3);
|
||||||
|
setup_image_dnd (win->image4);
|
||||||
|
setup_image_dnd (win->image5);
|
||||||
|
|
||||||
win->contexts = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
|
win->contexts = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
|
||||||
|
|
||||||
gtk_tree_model_filter_set_visible_func (win->filter_model, icon_visible_func, win, NULL);
|
gtk_tree_model_filter_set_visible_func (win->filter_model, icon_visible_func, win, NULL);
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (win->details), GTK_WINDOW (win));
|
gtk_window_set_transient_for (GTK_WINDOW (win->details), GTK_WINDOW (win));
|
||||||
|
|
||||||
|
|
||||||
g_signal_connect (win->searchbar, "notify::search-mode-enabled",
|
g_signal_connect (win->searchbar, "notify::search-mode-enabled",
|
||||||
G_CALLBACK (search_mode_toggled), win);
|
G_CALLBACK (search_mode_toggled), win);
|
||||||
|
|
||||||
@@ -771,6 +837,8 @@ icon_browser_window_init (IconBrowserWindow *win)
|
|||||||
static void
|
static void
|
||||||
icon_browser_window_class_init (IconBrowserWindowClass *class)
|
icon_browser_window_class_init (IconBrowserWindowClass *class)
|
||||||
{
|
{
|
||||||
|
g_type_ensure (ICON_STORE_TYPE);
|
||||||
|
|
||||||
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class),
|
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class),
|
||||||
"/org/gtk/iconbrowser/window.ui");
|
"/org/gtk/iconbrowser/window.ui");
|
||||||
|
|
||||||
@@ -794,7 +862,6 @@ icon_browser_window_class_init (IconBrowserWindowClass *class)
|
|||||||
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, description);
|
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, description);
|
||||||
|
|
||||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), search_text_changed);
|
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), search_text_changed);
|
||||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), selection_changed);
|
|
||||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), item_activated);
|
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), item_activated);
|
||||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), selected_context_changed);
|
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), selected_context_changed);
|
||||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), symbolic_toggled);
|
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), symbolic_toggled);
|
||||||
|
91
demos/icon-browser/iconstore.c
Normal file
91
demos/icon-browser/iconstore.c
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
#include "iconstore.h"
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
struct _IconStore
|
||||||
|
{
|
||||||
|
GtkListStore parent;
|
||||||
|
|
||||||
|
gint text_column;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _IconStoreClass
|
||||||
|
{
|
||||||
|
GtkListStoreClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void icon_store_drag_source_init (GtkTreeDragSourceIface *iface);
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_CODE (IconStore, icon_store, GTK_TYPE_LIST_STORE,
|
||||||
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_DRAG_SOURCE,
|
||||||
|
icon_store_drag_source_init))
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
icon_store_init (IconStore *store)
|
||||||
|
{
|
||||||
|
GType types[4] = { G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING };
|
||||||
|
|
||||||
|
gtk_list_store_set_column_types (GTK_LIST_STORE (store), 4, types);
|
||||||
|
|
||||||
|
store->text_column = ICON_STORE_NAME_COLUMN;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
icon_store_class_init (IconStoreClass *class)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
row_draggable (GtkTreeDragSource *drag_source,
|
||||||
|
GtkTreePath *path)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
drag_data_delete (GtkTreeDragSource *drag_source,
|
||||||
|
GtkTreePath *path)
|
||||||
|
{
|
||||||
|
GtkTreeIter iter;
|
||||||
|
|
||||||
|
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (drag_source), &iter, path))
|
||||||
|
return gtk_list_store_remove (GTK_LIST_STORE (drag_source), &iter);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
drag_data_get (GtkTreeDragSource *drag_source,
|
||||||
|
GtkTreePath *path,
|
||||||
|
GtkSelectionData *selection)
|
||||||
|
{
|
||||||
|
GtkTreeIter iter;
|
||||||
|
gchar *text;
|
||||||
|
|
||||||
|
if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (drag_source), &iter, path))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
gtk_tree_model_get (GTK_TREE_MODEL (drag_source), &iter,
|
||||||
|
ICON_STORE (drag_source)->text_column, &text,
|
||||||
|
-1);
|
||||||
|
|
||||||
|
gtk_selection_data_set_text (selection, text, -1);
|
||||||
|
|
||||||
|
g_free (text);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
icon_store_drag_source_init (GtkTreeDragSourceIface *iface)
|
||||||
|
{
|
||||||
|
iface->row_draggable = row_draggable;
|
||||||
|
iface->drag_data_delete = drag_data_delete;
|
||||||
|
iface->drag_data_get = drag_data_get;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
icon_store_set_text_column (IconStore *store, gint text_column)
|
||||||
|
{
|
||||||
|
store->text_column = text_column;
|
||||||
|
}
|
26
demos/icon-browser/iconstore.h
Normal file
26
demos/icon-browser/iconstore.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef __ICON_STORE_H
|
||||||
|
#define __ICON_STORE_H
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define ICON_STORE_TYPE (icon_store_get_type ())
|
||||||
|
#define ICON_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ICON_STORE_TYPE, IconStore))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _IconStore IconStore;
|
||||||
|
typedef struct _IconStoreClass IconStoreClass;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
ICON_STORE_NAME_COLUMN,
|
||||||
|
ICON_STORE_SYMBOLIC_NAME_COLUMN,
|
||||||
|
ICON_STORE_DESCRIPTION_COLUMN,
|
||||||
|
ICON_STORE_CONTEXT_COLUMN
|
||||||
|
};
|
||||||
|
|
||||||
|
GType icon_store_get_type (void);
|
||||||
|
|
||||||
|
void icon_store_set_text_column (IconStore *store,
|
||||||
|
gint column);
|
||||||
|
|
||||||
|
#endif /* __ICON_STORE_H */
|
@@ -1,13 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.8 -->
|
<!-- interface-requires gtk+ 3.8 -->
|
||||||
<object class="GtkListStore" id="store">
|
<object class="IconStore" id="store">
|
||||||
<columns>
|
|
||||||
<column type="gchararray"/>
|
|
||||||
<column type="gchararray"/>
|
|
||||||
<column type="gchararray"/>
|
|
||||||
<column type="gchararray"/>
|
|
||||||
</columns>
|
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkTreeModelFilter" id="filter_model">
|
<object class="GtkTreeModelFilter" id="filter_model">
|
||||||
<property name="child_model">store</property>
|
<property name="child_model">store</property>
|
||||||
@@ -108,7 +102,8 @@
|
|||||||
<object class="GtkIconView" id="list">
|
<object class="GtkIconView" id="list">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="model">filter_model</property>
|
<property name="model">filter_model</property>
|
||||||
<signal name="selection_changed" handler="selection_changed"/>
|
<property name="selection-mode">none</property>
|
||||||
|
<property name="activate-on-single-click">True</property>
|
||||||
<signal name="item_activated" handler="item_activated"/>
|
<signal name="item_activated" handler="item_activated"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererPixbuf" id="cell">
|
<object class="GtkCellRendererPixbuf" id="cell">
|
||||||
@@ -156,12 +151,17 @@
|
|||||||
<property name="row-spacing">10</property>
|
<property name="row-spacing">10</property>
|
||||||
<property name="column-spacing">10</property>
|
<property name="column-spacing">10</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage" id="image1">
|
<object class="GtkEventBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xpad">4</property>
|
<child>
|
||||||
<property name="ypad">4</property>
|
<object class="GtkImage" id="image1">
|
||||||
<property name="halign">center</property>
|
<property name="visible">True</property>
|
||||||
<property name="valign">end</property>
|
<property name="xpad">4</property>
|
||||||
|
<property name="ypad">4</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">end</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">0</property>
|
<property name="left-attach">0</property>
|
||||||
@@ -169,12 +169,17 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage" id="image2">
|
<object class="GtkEventBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xpad">4</property>
|
<child>
|
||||||
<property name="ypad">4</property>
|
<object class="GtkImage" id="image2">
|
||||||
<property name="halign">center</property>
|
<property name="visible">True</property>
|
||||||
<property name="valign">end</property>
|
<property name="xpad">4</property>
|
||||||
|
<property name="ypad">4</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">end</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">1</property>
|
<property name="left-attach">1</property>
|
||||||
@@ -182,12 +187,17 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage" id="image3">
|
<object class="GtkEventBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xpad">4</property>
|
<child>
|
||||||
<property name="ypad">4</property>
|
<object class="GtkImage" id="image3">
|
||||||
<property name="halign">center</property>
|
<property name="visible">True</property>
|
||||||
<property name="valign">end</property>
|
<property name="xpad">4</property>
|
||||||
|
<property name="ypad">4</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">end</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">2</property>
|
<property name="left-attach">2</property>
|
||||||
@@ -195,12 +205,17 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage" id="image4">
|
<object class="GtkEventBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xpad">4</property>
|
<child>
|
||||||
<property name="ypad">4</property>
|
<object class="GtkImage" id="image4">
|
||||||
<property name="halign">center</property>
|
<property name="visible">True</property>
|
||||||
<property name="valign">end</property>
|
<property name="xpad">4</property>
|
||||||
|
<property name="ypad">4</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">end</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">3</property>
|
<property name="left-attach">3</property>
|
||||||
@@ -208,12 +223,17 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage" id="image5">
|
<object class="GtkEventBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xpad">4</property>
|
<child>
|
||||||
<property name="ypad">4</property>
|
<object class="GtkImage" id="image5">
|
||||||
<property name="halign">center</property>
|
<property name="visible">True</property>
|
||||||
<property name="valign">end</property>
|
<property name="xpad">4</property>
|
||||||
|
<property name="ypad">4</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">end</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">4</property>
|
<property name="left-attach">4</property>
|
||||||
|
@@ -62,6 +62,7 @@ uninstall-update-icon-cache:
|
|||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
widget-factory.ui \
|
widget-factory.ui \
|
||||||
|
widget-factory.css \
|
||||||
menus.ui \
|
menus.ui \
|
||||||
widget-factory.gresource.xml \
|
widget-factory.gresource.xml \
|
||||||
data/source.svg \
|
data/source.svg \
|
||||||
|
@@ -159,6 +159,12 @@ spin_value_reset (GtkWidget *button, GtkAdjustment *adjustment)
|
|||||||
static gint pulse_time = 250;
|
static gint pulse_time = 250;
|
||||||
static gint pulse_entry_mode = 0;
|
static gint pulse_entry_mode = 0;
|
||||||
|
|
||||||
|
static void
|
||||||
|
remove_pulse (gpointer pulse_id)
|
||||||
|
{
|
||||||
|
g_source_remove (GPOINTER_TO_UINT (pulse_id));
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
pulse_it (GtkWidget *widget)
|
pulse_it (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
@@ -170,7 +176,7 @@ pulse_it (GtkWidget *widget)
|
|||||||
gtk_progress_bar_pulse (GTK_PROGRESS_BAR (widget));
|
gtk_progress_bar_pulse (GTK_PROGRESS_BAR (widget));
|
||||||
|
|
||||||
pulse_id = g_timeout_add (pulse_time, (GSourceFunc)pulse_it, widget);
|
pulse_id = g_timeout_add (pulse_time, (GSourceFunc)pulse_it, widget);
|
||||||
g_object_set_data (G_OBJECT (widget), "pulse_id", GUINT_TO_POINTER (pulse_id));
|
g_object_set_data_full (G_OBJECT (widget), "pulse_id", GUINT_TO_POINTER (pulse_id), remove_pulse);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
@@ -190,18 +196,14 @@ update_pulse_time (GtkAdjustment *adjustment, GtkWidget *widget)
|
|||||||
|
|
||||||
if (value == 100)
|
if (value == 100)
|
||||||
{
|
{
|
||||||
if (pulse_id != 0)
|
g_object_set_data (G_OBJECT (widget), "pulse_id", NULL);
|
||||||
{
|
|
||||||
g_source_remove (pulse_id);
|
|
||||||
g_object_set_data (G_OBJECT (widget), "pulse_id", NULL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (value < 100)
|
else if (value < 100)
|
||||||
{
|
{
|
||||||
if (pulse_id == 0 && (GTK_IS_PROGRESS_BAR (widget) || pulse_entry_mode % 3 == 2))
|
if (pulse_id == 0 && (GTK_IS_PROGRESS_BAR (widget) || pulse_entry_mode % 3 == 2))
|
||||||
{
|
{
|
||||||
pulse_id = g_timeout_add (pulse_time, (GSourceFunc)pulse_it, widget);
|
pulse_id = g_timeout_add (pulse_time, (GSourceFunc)pulse_it, widget);
|
||||||
g_object_set_data (G_OBJECT (widget), "pulse_id", GUINT_TO_POINTER (pulse_id));
|
g_object_set_data_full (G_OBJECT (widget), "pulse_id", GUINT_TO_POINTER (pulse_id), remove_pulse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -212,8 +214,6 @@ on_entry_icon_release (GtkEntry *entry,
|
|||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
guint pulse_id;
|
|
||||||
|
|
||||||
if (icon_pos != GTK_ENTRY_ICON_SECONDARY)
|
if (icon_pos != GTK_ENTRY_ICON_SECONDARY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -221,12 +221,7 @@ on_entry_icon_release (GtkEntry *entry,
|
|||||||
|
|
||||||
if (pulse_entry_mode % 3 == 0)
|
if (pulse_entry_mode % 3 == 0)
|
||||||
{
|
{
|
||||||
pulse_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (entry), "pulse_id"));
|
g_object_set_data (G_OBJECT (entry), "pulse_id", NULL);
|
||||||
if (pulse_id != 0)
|
|
||||||
{
|
|
||||||
g_source_remove (pulse_id);
|
|
||||||
g_object_set_data (G_OBJECT (entry), "pulse_id", NULL);
|
|
||||||
}
|
|
||||||
gtk_entry_set_progress_fraction (entry, 0);
|
gtk_entry_set_progress_fraction (entry, 0);
|
||||||
}
|
}
|
||||||
else if (pulse_entry_mode % 3 == 1)
|
else if (pulse_entry_mode % 3 == 1)
|
||||||
@@ -313,27 +308,37 @@ on_page_combo_changed (GtkComboBox *combo,
|
|||||||
{
|
{
|
||||||
GtkWidget *from;
|
GtkWidget *from;
|
||||||
GtkWidget *to;
|
GtkWidget *to;
|
||||||
|
GtkWidget *print;
|
||||||
|
|
||||||
from = GTK_WIDGET (g_object_get_data (G_OBJECT (combo), "range_from_spin"));
|
from = GTK_WIDGET (g_object_get_data (G_OBJECT (combo), "range_from_spin"));
|
||||||
to = GTK_WIDGET (g_object_get_data (G_OBJECT (combo), "range_to_spin"));
|
to = GTK_WIDGET (g_object_get_data (G_OBJECT (combo), "range_to_spin"));
|
||||||
|
print = GTK_WIDGET (g_object_get_data (G_OBJECT (combo), "print_button"));
|
||||||
|
|
||||||
switch (gtk_combo_box_get_active (combo))
|
switch (gtk_combo_box_get_active (combo))
|
||||||
{
|
{
|
||||||
case 0: /* Range */
|
case 0: /* Range */
|
||||||
gtk_widget_set_sensitive (from, TRUE);
|
gtk_widget_set_sensitive (from, TRUE);
|
||||||
gtk_widget_set_sensitive (to, TRUE);
|
gtk_widget_set_sensitive (to, TRUE);
|
||||||
|
gtk_widget_set_sensitive (print, TRUE);
|
||||||
break;
|
break;
|
||||||
case 1: /* All */
|
case 1: /* All */
|
||||||
gtk_widget_set_sensitive (from, FALSE);
|
gtk_widget_set_sensitive (from, FALSE);
|
||||||
gtk_widget_set_sensitive (to, FALSE);
|
gtk_widget_set_sensitive (to, FALSE);
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (from), 1);
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (from), 1);
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (to), 99);
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (to), 99);
|
||||||
|
gtk_widget_set_sensitive (print, TRUE);
|
||||||
break;
|
break;
|
||||||
case 2: /* Current */
|
case 2: /* Current */
|
||||||
gtk_widget_set_sensitive (from, FALSE);
|
gtk_widget_set_sensitive (from, FALSE);
|
||||||
gtk_widget_set_sensitive (to, FALSE);
|
gtk_widget_set_sensitive (to, FALSE);
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (from), 7);
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (from), 7);
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (to), 7);
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (to), 7);
|
||||||
|
gtk_widget_set_sensitive (print, TRUE);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
gtk_widget_set_sensitive (from, FALSE);
|
||||||
|
gtk_widget_set_sensitive (to, FALSE);
|
||||||
|
gtk_widget_set_sensitive (print, FALSE);
|
||||||
break;
|
break;
|
||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
@@ -347,8 +352,8 @@ on_range_from_changed (GtkSpinButton *from)
|
|||||||
|
|
||||||
to = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (from), "range_to_spin"));
|
to = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (from), "range_to_spin"));
|
||||||
|
|
||||||
v1 = gtk_spin_button_get_value_as_int (from);
|
v1 = gtk_spin_button_get_value_as_int (from);
|
||||||
v2 = gtk_spin_button_get_value_as_int (to);
|
v2 = gtk_spin_button_get_value_as_int (to);
|
||||||
|
|
||||||
if (v1 > v2)
|
if (v1 > v2)
|
||||||
gtk_spin_button_set_value (to, v1);
|
gtk_spin_button_set_value (to, v1);
|
||||||
@@ -362,8 +367,8 @@ on_range_to_changed (GtkSpinButton *to)
|
|||||||
|
|
||||||
from = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (to), "range_from_spin"));
|
from = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (to), "range_from_spin"));
|
||||||
|
|
||||||
v1 = gtk_spin_button_get_value_as_int (from);
|
v1 = gtk_spin_button_get_value_as_int (from);
|
||||||
v2 = gtk_spin_button_get_value_as_int (to);
|
v2 = gtk_spin_button_get_value_as_int (to);
|
||||||
|
|
||||||
if (v1 > v2)
|
if (v1 > v2)
|
||||||
gtk_spin_button_set_value (from, v2);
|
gtk_spin_button_set_value (from, v2);
|
||||||
@@ -723,7 +728,7 @@ populate_colors (GtkWidget *widget)
|
|||||||
GdkRGBA rgba;
|
GdkRGBA rgba;
|
||||||
|
|
||||||
gtk_list_box_set_header_func (GTK_LIST_BOX (widget), update_title_header, NULL, NULL);
|
gtk_list_box_set_header_func (GTK_LIST_BOX (widget), update_title_header, NULL, NULL);
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (colors); i++)
|
for (i = 0; i < G_N_ELEMENTS (colors); i++)
|
||||||
{
|
{
|
||||||
row = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
|
row = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
|
||||||
@@ -1104,6 +1109,21 @@ osd_frame_button_press (GtkWidget *frame, GdkEventButton *event, gpointer data)
|
|||||||
return GDK_EVENT_STOP;
|
return GDK_EVENT_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
page_combo_separator_func (GtkTreeModel *model,
|
||||||
|
GtkTreeIter *iter,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
gchar *text;
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
|
gtk_tree_model_get (model, iter, 0, &text, -1);
|
||||||
|
res = g_strcmp0 (text, "-") == 0;
|
||||||
|
g_free (text);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
activate (GApplication *app)
|
activate (GApplication *app)
|
||||||
{
|
{
|
||||||
@@ -1112,6 +1132,7 @@ activate (GApplication *app)
|
|||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkWidget *widget2;
|
GtkWidget *widget2;
|
||||||
GtkWidget *widget3;
|
GtkWidget *widget3;
|
||||||
|
GtkWidget *widget4;
|
||||||
GtkWidget *stack;
|
GtkWidget *stack;
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
GtkAdjustment *adj;
|
GtkAdjustment *adj;
|
||||||
@@ -1136,7 +1157,7 @@ activate (GApplication *app)
|
|||||||
g_type_ensure (my_text_view_get_type ());
|
g_type_ensure (my_text_view_get_type ());
|
||||||
|
|
||||||
provider = gtk_css_provider_new ();
|
provider = gtk_css_provider_new ();
|
||||||
gtk_css_provider_load_from_data (provider, ".circular-button { border-radius: 20px; outline-radius: 20px; }", -1, NULL);
|
gtk_css_provider_load_from_resource (provider, "/org/gtk/WidgetFactory/widget-factory.css");
|
||||||
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
|
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
|
||||||
GTK_STYLE_PROVIDER (provider),
|
GTK_STYLE_PROVIDER (provider),
|
||||||
GTK_STYLE_PROVIDER_PRIORITY_USER);
|
GTK_STYLE_PROVIDER_PRIORITY_USER);
|
||||||
@@ -1259,12 +1280,15 @@ activate (GApplication *app)
|
|||||||
populate_colors ((GtkWidget *)gtk_builder_get_object (builder, "munsell"));
|
populate_colors ((GtkWidget *)gtk_builder_get_object (builder, "munsell"));
|
||||||
|
|
||||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "page_combo");
|
widget = (GtkWidget *)gtk_builder_get_object (builder, "page_combo");
|
||||||
|
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (widget), page_combo_separator_func, NULL, NULL);
|
||||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "range_from_spin");
|
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "range_from_spin");
|
||||||
widget3 = (GtkWidget *)gtk_builder_get_object (builder, "range_to_spin");
|
widget3 = (GtkWidget *)gtk_builder_get_object (builder, "range_to_spin");
|
||||||
|
widget4 = (GtkWidget *)gtk_builder_get_object (builder, "print_button");
|
||||||
g_object_set_data (G_OBJECT (widget), "range_from_spin", widget2);
|
g_object_set_data (G_OBJECT (widget), "range_from_spin", widget2);
|
||||||
g_object_set_data (G_OBJECT (widget3), "range_from_spin", widget2);
|
g_object_set_data (G_OBJECT (widget3), "range_from_spin", widget2);
|
||||||
g_object_set_data (G_OBJECT (widget), "range_to_spin", widget3);
|
g_object_set_data (G_OBJECT (widget), "range_to_spin", widget3);
|
||||||
g_object_set_data (G_OBJECT (widget2), "range_to_spin", widget3);
|
g_object_set_data (G_OBJECT (widget2), "range_to_spin", widget3);
|
||||||
|
g_object_set_data (G_OBJECT (widget), "print_button", widget4);
|
||||||
|
|
||||||
set_accel (GTK_APPLICATION (app), GTK_WIDGET (gtk_builder_get_object (builder, "quitmenuitem")));
|
set_accel (GTK_APPLICATION (app), GTK_WIDGET (gtk_builder_get_object (builder, "quitmenuitem")));
|
||||||
set_accel (GTK_APPLICATION (app), GTK_WIDGET (gtk_builder_get_object (builder, "deletemenuitem")));
|
set_accel (GTK_APPLICATION (app), GTK_WIDGET (gtk_builder_get_object (builder, "deletemenuitem")));
|
||||||
@@ -1312,6 +1336,7 @@ int
|
|||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
GtkApplication *app;
|
GtkApplication *app;
|
||||||
|
GAction *action;
|
||||||
static GActionEntry app_entries[] = {
|
static GActionEntry app_entries[] = {
|
||||||
{ "about", activate_about, NULL, NULL, NULL },
|
{ "about", activate_about, NULL, NULL, NULL },
|
||||||
{ "quit", activate_quit, NULL, NULL, NULL },
|
{ "quit", activate_quit, NULL, NULL, NULL },
|
||||||
@@ -1329,6 +1354,8 @@ main (int argc, char *argv[])
|
|||||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||||
app_entries, G_N_ELEMENTS (app_entries),
|
app_entries, G_N_ELEMENTS (app_entries),
|
||||||
app);
|
app);
|
||||||
|
action = g_action_map_lookup_action (G_ACTION_MAP (app), "wine");
|
||||||
|
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
|
||||||
|
|
||||||
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
|
|
||||||
|
9
demos/widget-factory/widget-factory.css
Normal file
9
demos/widget-factory/widget-factory.css
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
.circular-button {
|
||||||
|
border-radius: 20px;
|
||||||
|
outline-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.small-button {
|
||||||
|
padding: 0;
|
||||||
|
outline-width: 0;
|
||||||
|
}
|
@@ -3,6 +3,9 @@
|
|||||||
<gresource prefix="/org/gtk/WidgetFactory">
|
<gresource prefix="/org/gtk/WidgetFactory">
|
||||||
<file preprocess="xml-stripblanks">widget-factory.ui</file>
|
<file preprocess="xml-stripblanks">widget-factory.ui</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
|
<gresource prefix="/org/gtk/WidgetFactory">
|
||||||
|
<file>widget-factory.css</file>
|
||||||
|
</gresource>
|
||||||
<gresource prefix="/org/gtk/WidgetFactory/gtk">
|
<gresource prefix="/org/gtk/WidgetFactory/gtk">
|
||||||
<file preprocess="xml-stripblanks">menus.ui</file>
|
<file preprocess="xml-stripblanks">menus.ui</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
|
@@ -1060,6 +1060,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
|||||||
<object class="GtkFileChooserButton" id="filechooserbutton1">
|
<object class="GtkFileChooserButton" id="filechooserbutton1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="local_only">False</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@@ -1570,9 +1571,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
|||||||
<property name="title" translatable="yes">Icon</property>
|
<property name="title" translatable="yes">Icon</property>
|
||||||
<property name="reorderable">True</property>
|
<property name="reorderable">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1">
|
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
|
||||||
<property name="follow_state">true</property>
|
|
||||||
</object>
|
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="icon_name">1</attribute>
|
<attribute name="icon_name">1</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
@@ -2895,6 +2894,15 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<property name="tooltip-text" translatable="yes">Search for it</property>
|
<property name="tooltip-text" translatable="yes">Search for it</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="label" translatable="yes">Insert</property>
|
||||||
|
<property name="icon-name">insert-image</property>
|
||||||
|
<property name="tooltip-text" translatable="yes">Insert something</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -3073,9 +3081,7 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<property name="selection_mode">multiple</property>
|
<property name="selection_mode">multiple</property>
|
||||||
<property name="model">iconsmodel</property>
|
<property name="model">iconsmodel</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererPixbuf" id="iconviewcell">
|
<object class="GtkCellRendererPixbuf" id="iconviewcell"/>
|
||||||
<property name="follow-state">True</property>
|
|
||||||
</object>
|
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="icon-name">0</attribute>
|
<attribute name="icon-name">0</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
@@ -3400,7 +3406,7 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">horizontal</property>
|
<property name="orientation">horizontal</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSidebar">
|
<object class="GtkStackSidebar">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stack">sidebar_stack</property>
|
<property name="stack">sidebar_stack</property>
|
||||||
</object>
|
</object>
|
||||||
@@ -3573,6 +3579,8 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<item>Range</item>
|
<item>Range</item>
|
||||||
<item>All</item>
|
<item>All</item>
|
||||||
<item>Current</item>
|
<item>Current</item>
|
||||||
|
<item>-</item>
|
||||||
|
<item>None</item>
|
||||||
</items>
|
</items>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -3591,7 +3599,7 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton" id="print_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label">Print</property>
|
<property name="label">Print</property>
|
||||||
</object>
|
</object>
|
||||||
@@ -3619,6 +3627,7 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<object class="GtkToolbar">
|
<object class="GtkToolbar">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="toolbar-style">icons</property>
|
||||||
<property name="icon-size">1</property>
|
<property name="icon-size">1</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkToolButton" id="toolbutton1">
|
<object class="GtkToolButton" id="toolbutton1">
|
||||||
@@ -3858,11 +3867,41 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="height-request">120</property>
|
<property name="height-request">120</property>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="tab-expand">True</property>
|
||||||
|
<property name="tab-fill">True</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child type="tab">
|
<child type="tab">
|
||||||
<object class="GtkLabel">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Page 1</property>
|
<property name="orientation">horizontal</property>
|
||||||
|
<child type="center">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Page 1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="relief">none</property>
|
||||||
|
<property name="focus-on-click">False</property>
|
||||||
|
<style>
|
||||||
|
<class name="small-button"/>
|
||||||
|
</style>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="icon-name">window-close-symbolic</property>
|
||||||
|
<property name="icon-size">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="pack-type">end</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -3870,11 +3909,41 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="tab-expand">True</property>
|
||||||
|
<property name="tab-fill">True</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child type="tab">
|
<child type="tab">
|
||||||
<object class="GtkLabel">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Page 2</property>
|
<property name="orientation">horizontal</property>
|
||||||
|
<child type="center">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Page 2</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="relief">none</property>
|
||||||
|
<property name="focus-on-click">False</property>
|
||||||
|
<style>
|
||||||
|
<class name="small-button"/>
|
||||||
|
</style>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="icon-name">window-close-symbolic</property>
|
||||||
|
<property name="icon-size">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="pack-type">end</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@@ -28,6 +28,7 @@ IGNORE_HFILES= \
|
|||||||
gdkprivate.h \
|
gdkprivate.h \
|
||||||
gdk*private.h \
|
gdk*private.h \
|
||||||
keyname-table.h \
|
keyname-table.h \
|
||||||
|
wayland/xdg-shell-client-protocol.h \
|
||||||
win32 \
|
win32 \
|
||||||
x11 \
|
x11 \
|
||||||
quartz
|
quartz
|
||||||
|
@@ -713,6 +713,8 @@ GdkGrabOwnership
|
|||||||
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
gdk_device_get_name
|
gdk_device_get_name
|
||||||
|
gdk_device_get_vendor_id
|
||||||
|
gdk_device_get_product_id
|
||||||
gdk_device_get_source
|
gdk_device_get_source
|
||||||
gdk_device_set_mode
|
gdk_device_set_mode
|
||||||
gdk_device_get_mode
|
gdk_device_get_mode
|
||||||
@@ -1286,12 +1288,25 @@ gdk_frame_get_type
|
|||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>gdkglcontext</FILE>
|
<FILE>gdkglcontext</FILE>
|
||||||
GdkGLContext
|
GdkGLContext
|
||||||
|
gdk_gl_context_get_display
|
||||||
gdk_gl_context_get_window
|
gdk_gl_context_get_window
|
||||||
gdk_gl_context_make_current
|
gdk_gl_context_get_shared_context
|
||||||
gdk_gl_context_clear_current
|
gdk_gl_context_get_version
|
||||||
gdk_gl_context_get_current
|
|
||||||
GdkGLProfile
|
<SUBSECTION>
|
||||||
|
gdk_gl_context_set_required_version
|
||||||
|
gdk_gl_context_get_required_version
|
||||||
|
gdk_gl_context_set_debug_enabled
|
||||||
|
gdk_gl_context_get_debug_enabled
|
||||||
|
gdk_gl_context_set_forward_compatible
|
||||||
|
gdk_gl_context_get_forward_compatible
|
||||||
|
|
||||||
|
<SUBSECTION>
|
||||||
GdkGLError
|
GdkGLError
|
||||||
|
gdk_gl_context_realize
|
||||||
|
gdk_gl_context_make_current
|
||||||
|
gdk_gl_context_get_current
|
||||||
|
gdk_gl_context_clear_current
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GDK_GL_CONTEXT
|
GDK_GL_CONTEXT
|
||||||
|
@@ -19,85 +19,217 @@ HFILE_GLOB=$(top_srcdir)/gtk/*.h
|
|||||||
CFILE_GLOB=$(top_srcdir)/gtk/*.c
|
CFILE_GLOB=$(top_srcdir)/gtk/*.c
|
||||||
|
|
||||||
# Header files to ignore when scanning
|
# Header files to ignore when scanning
|
||||||
IGNORE_HFILES= \
|
IGNORE_HFILES = \
|
||||||
|
inspector \
|
||||||
|
a11y \
|
||||||
|
gtkaccelgroupprivate.h \
|
||||||
|
gtkaccelmapprivate.h \
|
||||||
|
gtkadjustmentprivate.h \
|
||||||
|
gtkallocatedbitmaskprivate.h \
|
||||||
|
gtkappchooserprivate.h \
|
||||||
|
gtkapplicationprivate.h \
|
||||||
|
gtkbindingsprivate.h \
|
||||||
|
gtkbitmaskprivate.h \
|
||||||
|
gtkboxprivate.h \
|
||||||
|
gtkbuilderprivate.h \
|
||||||
|
gtkbuttonprivate.h \
|
||||||
|
gtkcairoblurprivate.h \
|
||||||
|
gtkcellareaboxcontextprivate.h \
|
||||||
|
gtkclipboardprivate.h \
|
||||||
|
gtkcolorchooserprivate.h \
|
||||||
|
gtkcoloreditorprivate.h \
|
||||||
|
gtkcolorplaneprivate.h \
|
||||||
|
gtkcolorscaleprivate.h \
|
||||||
|
gtkcolorswatchprivate.h \
|
||||||
|
gtkcomboboxprivate.h \
|
||||||
|
gtkcontainerprivate.h \
|
||||||
|
gtkcssanimatedstyleprivate.h \
|
||||||
|
gtkcssanimationprivate.h \
|
||||||
|
gtkcssarrayvalueprivate.h \
|
||||||
|
gtkcssbgsizevalueprivate.h \
|
||||||
|
gtkcssbordervalueprivate.h \
|
||||||
|
gtkcsscolorvalueprivate.h \
|
||||||
|
gtkcsscornervalueprivate.h \
|
||||||
|
gtkcsscustompropertyprivate.h \
|
||||||
|
gtkcsseasevalueprivate.h \
|
||||||
|
gtkcssenginevalueprivate.h \
|
||||||
|
gtkcssenumvalueprivate.h \
|
||||||
|
gtkcssiconthemevalueprivate.h \
|
||||||
|
gtkcssimagebuiltinprivate.h \
|
||||||
|
gtkcssimagecrossfadeprivate.h \
|
||||||
|
gtkcssimagegradientprivate.h \
|
||||||
|
gtkcssimageiconthemeprivate.h \
|
||||||
|
gtkcssimagelinearprivate.h \
|
||||||
|
gtkcssimageprivate.h \
|
||||||
|
gtkcssimagescaledprivate.h \
|
||||||
|
gtkcssimagesurfaceprivate.h \
|
||||||
|
gtkcssimageurlprivate.h \
|
||||||
|
gtkcssimagevalueprivate.h \
|
||||||
|
gtkcssimagewin32private.h \
|
||||||
|
gtkcssinheritvalueprivate.h \
|
||||||
|
gtkcssinitialvalueprivate.h \
|
||||||
|
gtkcsskeyframesprivate.h \
|
||||||
|
gtkcsslookupprivate.h \
|
||||||
|
gtkcssmatcherprivate.h \
|
||||||
|
gtkcssnodedeclarationprivate.h \
|
||||||
|
gtkcssnumbervalueprivate.h \
|
||||||
|
gtkcssparserprivate.h \
|
||||||
|
gtkcsspositionvalueprivate.h \
|
||||||
|
gtkcssproviderprivate.h \
|
||||||
|
gtkcssrepeatvalueprivate.h \
|
||||||
|
gtkcssrgbavalueprivate.h \
|
||||||
|
gtkcsssectionprivate.h \
|
||||||
|
gtkcssselectorprivate.h \
|
||||||
|
gtkcssshadowsvalueprivate.h \
|
||||||
|
gtkcssshadowvalueprivate.h \
|
||||||
|
gtkcssshorthandpropertyprivate.h\
|
||||||
|
gtkcssstaticstyleprivate.h \
|
||||||
|
gtkcssstringvalueprivate.h \
|
||||||
|
gtkcssstylefuncsprivate.h \
|
||||||
|
gtkcssstyleprivate.h \
|
||||||
|
gtkcssstylepropertyprivate.h \
|
||||||
|
gtkcsstransformvalueprivate.h \
|
||||||
|
gtkcsstransitionprivate.h \
|
||||||
|
gtkcsstypedvalueprivate.h \
|
||||||
|
gtkcsstypesprivate.h \
|
||||||
|
gtkcssunsetvalueprivate.h \
|
||||||
|
gtkcssvalueprivate.h \
|
||||||
|
gtkdialogprivate.h \
|
||||||
|
gtkentryprivate.h \
|
||||||
|
gtkeventcontrollerprivate.h \
|
||||||
|
gtkfilechooserprivate.h \
|
||||||
|
gtkfontchooserprivate.h \
|
||||||
|
gtkgesturedragprivate.h \
|
||||||
|
gtkgesturelongpressprivate.h \
|
||||||
|
gtkgesturemultipressprivate.h \
|
||||||
|
gtkgesturepanprivate.h \
|
||||||
|
gtkgestureprivate.h \
|
||||||
|
gtkgesturerotateprivate.h \
|
||||||
|
gtkgesturesingleprivate.h \
|
||||||
|
gtkgestureswipeprivate.h \
|
||||||
|
gtkgesturezoomprivate.h \
|
||||||
|
gtkheaderbarprivate.h \
|
||||||
|
gtkhslaprivate.h \
|
||||||
|
gtkiconhelperprivate.h \
|
||||||
|
gtkiconviewprivate.h \
|
||||||
|
gtkimageprivate.h \
|
||||||
|
gtkimmoduleprivate.h \
|
||||||
|
gtklabelprivate.h \
|
||||||
|
gtklockbuttonprivate.h \
|
||||||
|
gtkmagnifierprivate.h \
|
||||||
|
gtkmenubuttonprivate.h \
|
||||||
|
gtkmenuitemprivate.h \
|
||||||
|
gtkmenuprivate.h \
|
||||||
|
gtkmenushellprivate.h \
|
||||||
|
gtkmodulesprivate.h \
|
||||||
|
gtkmountoperationprivate.h \
|
||||||
|
gtkorientableprivate.h \
|
||||||
|
gtkpixelcacheprivate.h \
|
||||||
|
gtkpopoverprivate.h \
|
||||||
|
gtkprinter-private.h \
|
||||||
|
gtkprintoperation-private.h \
|
||||||
|
gtkprivate.h \
|
||||||
|
gtkrangeprivate.h \
|
||||||
|
gtkrecentchooserprivate.h \
|
||||||
|
gtkrenderbackgroundprivate.h \
|
||||||
|
gtkrenderborderprivate.h \
|
||||||
|
gtkrendericonprivate.h \
|
||||||
|
gtkrenderprivate.h \
|
||||||
|
gtkroundedboxprivate.h \
|
||||||
|
gtkscaleprivate.h \
|
||||||
|
gtksearchentryprivate.h \
|
||||||
|
gtkselectionprivate.h \
|
||||||
|
gtksettingsprivate.h \
|
||||||
|
gtksizegroup-private.h \
|
||||||
|
gtksizerequestcacheprivate.h \
|
||||||
|
gtksocketprivate.h \
|
||||||
|
gtkstyleanimationprivate.h \
|
||||||
|
gtkstylecascadeprivate.h \
|
||||||
|
gtkstylecontextprivate.h \
|
||||||
|
gtkstylepropertyprivate.h \
|
||||||
|
gtkstyleproviderprivate.h \
|
||||||
|
gtktextchildprivate.h \
|
||||||
|
gtktexthandleprivate.h \
|
||||||
|
gtktextiterprivate.h \
|
||||||
|
gtktextmarkprivate.h \
|
||||||
|
gtktexttagprivate.h \
|
||||||
|
gtktogglebuttonprivate.h \
|
||||||
|
gtktoolbarprivate.h \
|
||||||
|
gtktoolpaletteprivate.h \
|
||||||
|
gtktooltipprivate.h \
|
||||||
|
gtktreeprivate.h \
|
||||||
|
gtkwidgetprivate.h \
|
||||||
|
gtkwin32themeprivate.h \
|
||||||
|
gtkwindowprivate.h \
|
||||||
fnmatch.h \
|
fnmatch.h \
|
||||||
gtkactionmuxer.h \
|
gtkactionmuxer.h \
|
||||||
gtkactionobserver.h \
|
gtkactionobserver.h \
|
||||||
gtkactionobservable.h \
|
gtkactionobservable.h \
|
||||||
gtk9slice.h \
|
gtk9slice.h \
|
||||||
gtkanimationdescription.h \
|
gtkanimationdescription.h \
|
||||||
|
gtkbitmaskprivateimpl.h \
|
||||||
|
gtkbookmarksmanager.h \
|
||||||
|
gtkdbusgenerated.c \
|
||||||
|
gtkdbusgenerated.h \
|
||||||
gtkdebug.h \
|
gtkdebug.h \
|
||||||
gtkactionhelper.h \
|
gtkactionhelper.h \
|
||||||
gtkapplicationprivate.h \
|
|
||||||
gtkbuilderprivate.h \
|
|
||||||
gtkcolorchooserprivate.h \
|
|
||||||
gtkcoloreditorprivate.h \
|
|
||||||
gtkcolorplaneprivate.h \
|
|
||||||
gtkcolorscaleprivate.h \
|
|
||||||
gtkcolorswatchprivate.h \
|
|
||||||
gtkdndcursors.h \
|
gtkdndcursors.h \
|
||||||
gtkentryprivate.h \
|
|
||||||
gtkfilechooserdefault.h \
|
gtkfilechooserdefault.h \
|
||||||
gtkfilechooserembed.h \
|
gtkfilechooserembed.h \
|
||||||
gtkfilechooserentry.h \
|
gtkfilechooserentry.h \
|
||||||
gtkfilechooserprivate.h \
|
|
||||||
gtkfilechoosersettings.h \
|
gtkfilechoosersettings.h \
|
||||||
gtkfilechooserutils.h \
|
gtkfilechooserutils.h \
|
||||||
gtkfilesystem.h \
|
gtkfilesystem.h \
|
||||||
gtkfilesystemmodel.h \
|
gtkfilesystemmodel.h \
|
||||||
gtkfilesystemunix.h \
|
gtkfilesystemunix.h \
|
||||||
gtkfilesystemwin32.h \
|
gtkfilesystemwin32.h \
|
||||||
|
gtkfontchooserutils.h \
|
||||||
gtkiconcache.h \
|
gtkiconcache.h \
|
||||||
gtkiconcachevalidator.h \
|
gtkiconcachevalidator.h \
|
||||||
gtkiconthemeparser.h \
|
gtkiconthemeparser.h \
|
||||||
gtkintl.h \
|
gtkintl.h \
|
||||||
gtkkeyhash.h \
|
gtkkeyhash.h \
|
||||||
|
gtkkineticscrolling.h \
|
||||||
gtkmarshal.h \
|
gtkmarshal.h \
|
||||||
gtkmenuprivate.h \
|
|
||||||
gtkmnemonichash.h \
|
gtkmnemonichash.h \
|
||||||
|
gtkmenutracker.h \
|
||||||
|
gtkmenutrackeritem.h \
|
||||||
|
gtkmenusectionbox.h \
|
||||||
gtkmodelmenu.h \
|
gtkmodelmenu.h \
|
||||||
gtkmodelmenuitem.h \
|
gtkmodelmenuitem.h \
|
||||||
|
gtkmodifierstyle.h \
|
||||||
gtkpathbar.h \
|
gtkpathbar.h \
|
||||||
gtkplugprivate.h \
|
|
||||||
gtkprintbackend.h \
|
gtkprintbackend.h \
|
||||||
gtkprinteroption.h \
|
gtkprinteroption.h \
|
||||||
gtkprinteroptionset.h \
|
gtkprinteroptionset.h \
|
||||||
gtkprinteroptionwidget.h \
|
gtkprinteroptionwidget.h \
|
||||||
gtkprinter-private.h \
|
|
||||||
gtkprint-win32.h \
|
gtkprint-win32.h \
|
||||||
gtkprintutils.h \
|
gtkprintutils.h \
|
||||||
gtkprintoperation-private.h \
|
|
||||||
gtkprivate.h \
|
gtkprivate.h \
|
||||||
|
gtkprivatetypebuiltins.h \
|
||||||
gtkquery.h \
|
gtkquery.h \
|
||||||
gtkrbtree.h \
|
gtkrbtree.h \
|
||||||
gtkrecentchooserdefault.h \
|
gtkrecentchooserdefault.h \
|
||||||
gtkrecentchooserutils.h \
|
gtkrecentchooserutils.h \
|
||||||
gtkrecentchooserprivate.h \
|
|
||||||
gtksearchengine.h \
|
gtksearchengine.h \
|
||||||
gtksearchenginebeagle.h \
|
|
||||||
gtksearchenginetracker.h \
|
gtksearchenginetracker.h \
|
||||||
gtksearchenginesimple.h \
|
gtksearchenginesimple.h \
|
||||||
gtksearchenginequartz.h \
|
gtksearchenginequartz.h \
|
||||||
gtksequence.h \
|
gtksequence.h \
|
||||||
gtksocketprivate.h \
|
gtksocketprivate.h \
|
||||||
gtktextbtree.h \
|
gtktextbtree.h \
|
||||||
gtktextbufferserializ.h \
|
gtktextbufferserialize.h \
|
||||||
gtktextchildprivate.h \
|
|
||||||
gtktextdisplay.h \
|
gtktextdisplay.h \
|
||||||
gtktexthandleprivate.h \
|
|
||||||
gtktextiterprivate.h \
|
|
||||||
gtktextlayout.h \
|
gtktextlayout.h \
|
||||||
gtktextmarkprivate.h \
|
|
||||||
gtktextsegment.h \
|
gtktextsegment.h \
|
||||||
gtktexttagprivate.h \
|
|
||||||
gtktexttypes.h \
|
gtktexttypes.h \
|
||||||
gtktextutil.h \
|
gtktextutil.h \
|
||||||
gtktimeline.h \
|
gtktimeline.h \
|
||||||
gtkthemes.h \
|
gtkthemes.h \
|
||||||
|
gtktrashmonitor.h \
|
||||||
gtktrayicon.h \
|
gtktrayicon.h \
|
||||||
gtktreedatalist.h \
|
gtktreedatalist.h \
|
||||||
gtktreeprivate.h \
|
gtktreemenu.h \
|
||||||
gtktoolpaletteprivate.h \
|
|
||||||
gtktypebuiltins.h \
|
gtktypebuiltins.h \
|
||||||
gtkxembed.h \
|
gtkxembed.h \
|
||||||
gtkwin32embed.h \
|
gtkwin32embed.h \
|
||||||
@@ -172,6 +304,7 @@ expand_content_files = \
|
|||||||
drawing-model.xml \
|
drawing-model.xml \
|
||||||
getting_started.xml \
|
getting_started.xml \
|
||||||
glossary.xml \
|
glossary.xml \
|
||||||
|
input-handling.xml \
|
||||||
migrating-2to3.xml \
|
migrating-2to3.xml \
|
||||||
migrating-checklist.sgml \
|
migrating-checklist.sgml \
|
||||||
migrating-unique-GtkApplication.xml \
|
migrating-unique-GtkApplication.xml \
|
||||||
|
@@ -202,7 +202,7 @@ How to compile GTK+ itself
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<ulink url="http://live.gnome.org/GObjectIntrospection">Gobject Introspection</ulink>
|
<ulink url="https://wiki.gnome.org/Projects/GObjectIntrospection">Gobject Introspection</ulink>
|
||||||
is a framework for making introspection data available to
|
is a framework for making introspection data available to
|
||||||
language bindings. It is available
|
language bindings. It is available
|
||||||
<ulink url="http://download.gnome.org/sources/gobject-introspection/">here</ulink>.
|
<ulink url="http://download.gnome.org/sources/gobject-introspection/">here</ulink>.
|
||||||
|
@@ -5,6 +5,21 @@
|
|||||||
<chapter id="gtk-getting-started" xmlns:xi="http://www.w3.org/2003/XInclude">
|
<chapter id="gtk-getting-started" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||||
<title>Getting Started with GTK+</title>
|
<title>Getting Started with GTK+</title>
|
||||||
|
|
||||||
|
<para>GTK+ is a <ulink url="http://en.wikipedia.org/wiki/Widget_toolkit">
|
||||||
|
widget toolkit</ulink>. Each user interface created by
|
||||||
|
GTK+ consists of widgets. This is implemented in C using
|
||||||
|
<link linkend="gobject">GObject</link>, an object-oriented framework for C.
|
||||||
|
Widgets are organized in a hierachy. The window widget is the main container.
|
||||||
|
The user interface is then built by adding buttons, drop-down menus, input
|
||||||
|
fields, and other widgets to the window.
|
||||||
|
If you are creating complex user interfaces it is recommended to
|
||||||
|
use #GtkBuilder and its GTK-specific markup description language, instead of
|
||||||
|
assembling the interface manually. You can also use a visual user interface
|
||||||
|
editor, like <ulink url="https://glade.gnome.org/">Glade</ulink>.</para>
|
||||||
|
|
||||||
|
<para>GTK+ is event-driven. The toolkit listens for events such as
|
||||||
|
a click on a button, and passes the event to your application.</para>
|
||||||
|
|
||||||
<para>This chapter contains some tutorial information to get you
|
<para>This chapter contains some tutorial information to get you
|
||||||
started with GTK+ programming. It assumes that you have GTK+, its
|
started with GTK+ programming. It assumes that you have GTK+, its
|
||||||
dependencies and a C compiler installed and ready to use. If you
|
dependencies and a C compiler installed and ready to use. If you
|
||||||
@@ -15,8 +30,8 @@
|
|||||||
<section>
|
<section>
|
||||||
<title>Basics</title>
|
<title>Basics</title>
|
||||||
|
|
||||||
<para>To begin our introduction to GTK, we'll start with the simplest
|
<para>To begin our introduction to GTK, we'll start with a simple
|
||||||
program possible. This program will create an empty 200 × 200 pixel
|
signal-based Gtk application. This program will create an empty 200 × 200 pixel
|
||||||
window.</para>
|
window.</para>
|
||||||
|
|
||||||
<informalfigure>
|
<informalfigure>
|
||||||
@@ -28,7 +43,7 @@
|
|||||||
</informalfigure>
|
</informalfigure>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<para>Create a new file with the following content named example-0.c.</para>
|
<para>Create a new file with the following content named <filename>example-0.c.</filename></para>
|
||||||
<programlisting><xi:include href="../../../../examples/window-default.c" parse="text"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
<programlisting><xi:include href="../../../../examples/window-default.c" parse="text"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
@@ -52,45 +67,66 @@
|
|||||||
by third party code. The compiler will abort with an error if any other
|
by third party code. The compiler will abort with an error if any other
|
||||||
header is directly included.</para></warning>
|
header is directly included.</para></warning>
|
||||||
|
|
||||||
<para>We then proceed into the <function>main</function>() function of the
|
<para>In a GTK+ application, the purpose of the main() function is to
|
||||||
application, and we declare a <varname>window</varname> variable as a pointer
|
create a #GtkApplication object and run it. In this example a
|
||||||
of type #GtkWidget.</para>
|
#GtkApplication pointer named <varname>app</varname> is called and then
|
||||||
|
initialized using gtk_application_new().</para>
|
||||||
|
|
||||||
<para>The following line will call gtk_init(), which
|
<para>When creating a #GtkApplication
|
||||||
is the initialization function for GTK+; this function will set up GTK+,
|
you need to pick an application identifier (a name)
|
||||||
the type system, the connection to the windowing environment, etc. The
|
and input to gtk_application_new() as parameter.
|
||||||
gtk_init() takes as arguments the pointers to the command line arguments
|
For this example <varname>org.gtk.example</varname> is used
|
||||||
|
but for choosing an identifier for your application see
|
||||||
|
<ulink url="https://wiki.gnome.org/HowDoI/ChooseApplicationID">this guide</ulink>.
|
||||||
|
Lastly gtk_application_new() takes a GApplicationFlags as input for your
|
||||||
|
application, if your application would have special needs.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>Next the
|
||||||
|
<ulink url="https://wiki.gnome.org/HowDoI/GtkApplication">activate signal</ulink>
|
||||||
|
is connected to the activate() function above the main() functions.
|
||||||
|
The <varname>activate</varname> signal will be sent
|
||||||
|
when your application is launched with
|
||||||
|
g_application_run() on the line below.
|
||||||
|
The gtk_application_run() also takes as arguments the pointers to the command line arguments
|
||||||
counter and string array; this allows GTK+ to parse specific command line
|
counter and string array; this allows GTK+ to parse specific command line
|
||||||
arguments that control the behavior of GTK+ itself. The parsed arguments
|
arguments that control the behavior of GTK+ itself. The parsed arguments
|
||||||
will be removed from the array, leaving the unrecognized ones for your
|
will be removed from the array, leaving the unrecognized ones for your
|
||||||
application to parse.</para>
|
application to parse.
|
||||||
|
</para>
|
||||||
|
|
||||||
<note><para>For more information on which command line arguments GTK+
|
<para>Within g_application_run the activate() signal is sent and
|
||||||
recognizes, please refer to the <link linkend="gtk-running">Running GTK+
|
we then proceed into the <function>activate</function>() function of the
|
||||||
Applications</link> section in this reference.</para></note>
|
application. Inside the activate() function we want to construct
|
||||||
|
our GTK window, so that a window is shown when the application
|
||||||
|
is launched. The call to gtk_application_window_new() will
|
||||||
|
create a new #GtkWindow and store it inside the
|
||||||
|
<varname>window</varname> pointer. The window will have a frame,
|
||||||
|
a title bar, and window controls depending on the platform.</para>
|
||||||
|
|
||||||
<para>The call to gtk_window_new() will create a new #GtkWindow and store
|
<para>A window title is set using gtk_window_set_title(). This function
|
||||||
it inside the <varname>window</varname> variable. The type of the window
|
takes a GtkWindow* pointer and a string as input. As our
|
||||||
is %GTK_WINDOW_TOPLEVEL, which means that the #GtkWindow will be managed
|
<varname>window</varname> pointer is a GtkWidget pointer, we need to cast it
|
||||||
by the windowing system: it will have a frame, a title bar and window
|
to GtkWindow*.
|
||||||
controls, depending on the platform.</para>
|
But instead of casting <varname>window</varname> via
|
||||||
|
<varname>(GtkWindow*)</varname>,
|
||||||
|
<varname>window</varname> can be cast using the macro
|
||||||
|
<varname>GTK_WINDOW()</varname>.
|
||||||
|
<varname>GTK_WINDOW()</varname> will check if the
|
||||||
|
pointer is an instance of the GtkWindow class, before casting, and emit a
|
||||||
|
warning if the check fails. More information about this convention
|
||||||
|
can be found
|
||||||
|
<ulink url="https://developer.gnome.org/gobject/stable/gtype-conventions.html">
|
||||||
|
here</ulink>.</para>
|
||||||
|
|
||||||
<para>In order to terminate the application when the #GtkWindow is
|
<para>Finally the window size is set using gtk_window_set_default_size and
|
||||||
destroyed, we connect the #GtkWidget::destroy signal to the gtk_main_quit()
|
the window is then shown by GTK via gtk_widget_show_all().</para>
|
||||||
function. This function will terminate the GTK+ main loop started by calling
|
|
||||||
gtk_main() later. The #GtkWidget::destroy signal is emitted when a widget is
|
|
||||||
destroyed, either by explicitly calling gtk_widget_destroy() or when the
|
|
||||||
widget is unparented. Top-level #GtkWindow<!-- -->s are also destroyed when
|
|
||||||
the Close window control button is clicked.</para>
|
|
||||||
|
|
||||||
<para>#GtkWidget<!-- -->s are hidden by default. By calling gtk_widget_show()
|
<para>When you exit the window, by for example pressing the X,
|
||||||
on a #GtkWidget we are asking GTK+ to set the visibility attribute so that it
|
the g_application_run() in the main loop returns with a number
|
||||||
can be displayed. All this work is done after the main loop has been
|
which is saved inside an integer named "status". Afterwards, the
|
||||||
started.</para>
|
#GtkApplication object is freed from memory with g_object_unref().
|
||||||
|
Finally the status integer is returned and the GTK application exits.</para>
|
||||||
<para>The last line of interest is the call to gtk_main(). This function will
|
|
||||||
start the GTK+ main loop and will block the control flow of the
|
|
||||||
main() until the gtk_main_quit() function is called.</para>
|
|
||||||
|
|
||||||
<para>While the program is running, GTK+ is receiving
|
<para>While the program is running, GTK+ is receiving
|
||||||
<firstterm>events</firstterm>. These are typically input events caused by
|
<firstterm>events</firstterm>. These are typically input events caused by
|
||||||
@@ -129,13 +165,53 @@
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<para>As seen above, example-1.c builds further upon example-0.c by adding a
|
||||||
|
button to our window, with the label "Hello World". Two new GtkWidget pointers
|
||||||
|
are declared to accomplish this, <varname>button</varname> and
|
||||||
|
<varname>button_box</varname>. The button_box variable is created to store a
|
||||||
|
#GtkButtonBox which is GTK+'s way of controlling the size and layout of buttons.
|
||||||
|
The #GtkButtonBox is created and assigned to gtk_button_box_new() which takes a
|
||||||
|
#GtkOrientation enum as parameter. The buttons which this box will contain can
|
||||||
|
either be stored horizontally or vertically but this does not matter in this
|
||||||
|
particular case as we are dealing with only one button. After initializing
|
||||||
|
button_box with horizontal orientation, the code adds the button_box widget to the
|
||||||
|
window widget using gtk_container_add().</para>
|
||||||
|
|
||||||
|
<para>Next the <varname>button</varname> variable is initialized in similar manner.
|
||||||
|
gtk_button_new_with_label() is called which returns a GtkButton to be stored inside
|
||||||
|
<varname>button</varname>. Afterwards <varname>button</varname> is added to
|
||||||
|
our <varname>button_box</varname>.
|
||||||
|
Using g_signal_connect the button is connected to a function in our app called
|
||||||
|
print_hello(), so that when the button is clicked, GTK will call this function.
|
||||||
|
As the print_hello() function does not use any data as input, NULL is passed
|
||||||
|
to it. print_hello() calls g_print() with the string "Hello World"
|
||||||
|
which will print Hello World in a terminal if the GTK application was started
|
||||||
|
from one.</para>
|
||||||
|
|
||||||
|
<para>After connecting print_hello(), another signal is connected to the "clicked" state
|
||||||
|
of the button using g_signal_connect_swapped(). This functions is similar to
|
||||||
|
a g_signal_connect() with the difference lying in how the callback function is
|
||||||
|
treated. g_signal_connect_swapped() allow you to specify what the callback
|
||||||
|
function should take as parameter by letting you pass it as data. In this case
|
||||||
|
the function being called back is gtk_widget_destroy() and the <varname>window</varname>
|
||||||
|
pointer is passed to it. This has the effect that when the button is clicked,
|
||||||
|
the whole GTK window is destroyed. In contrast if a normal g_signal_connect() were used
|
||||||
|
to connect the "clicked" signal with gtk_widget_destroy(), then the <varname>button</varname>
|
||||||
|
itself would have been destroyed, not the window.
|
||||||
|
More information about creating buttons can be found
|
||||||
|
<ulink url="https://wiki.gnome.org/HowDoI/Buttons">here</ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>The rest of the code in example-1.c is identical to example-0.c. Next
|
||||||
|
section will elaborate further on how to add several GtkWidgets to your GTK
|
||||||
|
application.</para>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Packing</title>
|
<title>Packing</title>
|
||||||
|
|
||||||
<para>When creating an application, you'll want to put more than one widget
|
<para>When creating an application, you'll want to put more than one widget
|
||||||
inside a window. Our first helloworld example only used one widget so we
|
inside a window.
|
||||||
could simply use a gtk_container_add() call to "pack" the widget into the
|
When you want to put more than one widget into a window, it
|
||||||
window. But when you want to put more than one widget into a window, it
|
|
||||||
it becomes important to control how each widget is positioned and sized.
|
it becomes important to control how each widget is positioned and sized.
|
||||||
This is where packing comes in.</para>
|
This is where packing comes in.</para>
|
||||||
|
|
||||||
@@ -167,51 +243,6 @@
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
|
||||||
<title>Drawing</title>
|
|
||||||
|
|
||||||
<para>Many widgets, like buttons, do all their drawing themselves. You
|
|
||||||
just tell them the label you want to see, and they figure out what font
|
|
||||||
to use, draw the button outline and focus rectangle, etc. Sometimes, it
|
|
||||||
is necessary to do some custom drawing. In that case, a #GtkDrawingArea
|
|
||||||
might be the right widget to use. It offers a canvas on which you can
|
|
||||||
draw by connecting to the #GtkWidget::draw signal.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>The contents of a widget often need to be partially or fully redrawn,
|
|
||||||
e.g. when another window is moved and uncovers part of the widget, or
|
|
||||||
when tie window containing it is resized. It is also possible to explicitly
|
|
||||||
cause part or all of the widget to be redrawn, by calling
|
|
||||||
gtk_widget_queue_draw() or its variants. GTK+ takes care of most of the
|
|
||||||
details by providing a ready-to-use cairo context to the ::draw signal
|
|
||||||
handler.</para>
|
|
||||||
|
|
||||||
<para>The following example shows a ::draw signal handler. It is a bit
|
|
||||||
more complicated than the previous examples, since it also demonstrates
|
|
||||||
input event handling by means of ::button-press and ::motion-notify
|
|
||||||
handlers.</para>
|
|
||||||
|
|
||||||
<informalfigure>
|
|
||||||
<mediaobject>
|
|
||||||
<imageobject>
|
|
||||||
<imagedata fileref="drawing.png" format="PNG"/>
|
|
||||||
</imageobject>
|
|
||||||
</mediaobject>
|
|
||||||
</informalfigure>
|
|
||||||
|
|
||||||
<example id="gtk-getting-started-drawing">
|
|
||||||
<title>Drawing in response to input</title>
|
|
||||||
<para>Create a new file with the following content named example-3.c.</para>
|
|
||||||
<programlisting><xi:include href="../../../../examples/drawing.c" parse="text"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
|
||||||
</example>
|
|
||||||
<para>
|
|
||||||
You can compile the program above with GCC using:
|
|
||||||
<literallayout>
|
|
||||||
<literal>gcc `pkg-config --cflags gtk+-3.0` -o example-3 example-3.c `pkg-config --libs gtk+-3.0`</literal>
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Building user interfaces</title>
|
<title>Building user interfaces</title>
|
||||||
|
|
||||||
@@ -1006,4 +1037,50 @@ example_app_window_init (ExampleAppWindow *win)
|
|||||||
here.</para>
|
here.</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>Custom Drawing</title>
|
||||||
|
|
||||||
|
<para>Many widgets, like buttons, do all their drawing themselves. You
|
||||||
|
just tell them the label you want to see, and they figure out what font
|
||||||
|
to use, draw the button outline and focus rectangle, etc. Sometimes, it
|
||||||
|
is necessary to do some custom drawing. In that case, a #GtkDrawingArea
|
||||||
|
might be the right widget to use. It offers a canvas on which you can
|
||||||
|
draw by connecting to the #GtkWidget::draw signal.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>The contents of a widget often need to be partially or fully redrawn,
|
||||||
|
e.g. when another window is moved and uncovers part of the widget, or
|
||||||
|
when tie window containing it is resized. It is also possible to explicitly
|
||||||
|
cause part or all of the widget to be redrawn, by calling
|
||||||
|
gtk_widget_queue_draw() or its variants. GTK+ takes care of most of the
|
||||||
|
details by providing a ready-to-use cairo context to the ::draw signal
|
||||||
|
handler.</para>
|
||||||
|
|
||||||
|
<para>The following example shows a ::draw signal handler. It is a bit
|
||||||
|
more complicated than the previous examples, since it also demonstrates
|
||||||
|
input event handling by means of ::button-press and ::motion-notify
|
||||||
|
handlers.</para>
|
||||||
|
|
||||||
|
<informalfigure>
|
||||||
|
<mediaobject>
|
||||||
|
<imageobject>
|
||||||
|
<imagedata fileref="drawing.png" format="PNG"/>
|
||||||
|
</imageobject>
|
||||||
|
</mediaobject>
|
||||||
|
</informalfigure>
|
||||||
|
|
||||||
|
<example id="gtk-getting-started-drawing">
|
||||||
|
<title>Drawing in response to input</title>
|
||||||
|
<para>Create a new file with the following content named example-3.c.</para>
|
||||||
|
<programlisting><xi:include href="../../../../examples/drawing.c" parse="text"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||||
|
</example>
|
||||||
|
<para>
|
||||||
|
You can compile the program above with GCC using:
|
||||||
|
<literallayout>
|
||||||
|
<literal>gcc `pkg-config --cflags gtk+-3.0` -o example-3 example-3.c `pkg-config --libs gtk+-3.0`</literal>
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
<xi:include href="resources.sgml" />
|
<xi:include href="resources.sgml" />
|
||||||
<xi:include href="xml/question_index.sgml" />
|
<xi:include href="xml/question_index.sgml" />
|
||||||
<xi:include href="drawing-model.xml" />
|
<xi:include href="drawing-model.xml" />
|
||||||
<xi:include href="input-handling.xml" />
|
<xi:include href="xml/input-handling.xml" />
|
||||||
</part>
|
</part>
|
||||||
|
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<xi:include href="xml/gtkflowbox.xml" />
|
<xi:include href="xml/gtkflowbox.xml" />
|
||||||
<xi:include href="xml/gtkstack.xml" />
|
<xi:include href="xml/gtkstack.xml" />
|
||||||
<xi:include href="xml/gtkstackswitcher.xml" />
|
<xi:include href="xml/gtkstackswitcher.xml" />
|
||||||
<xi:include href="xml/gtksidebar.xml" />
|
<xi:include href="xml/gtkstacksidebar.xml" />
|
||||||
<xi:include href="xml/gtkactionbar.xml" />
|
<xi:include href="xml/gtkactionbar.xml" />
|
||||||
<xi:include href="xml/gtkheaderbar.xml" />
|
<xi:include href="xml/gtkheaderbar.xml" />
|
||||||
<xi:include href="xml/gtkoverlay.xml" />
|
<xi:include href="xml/gtkoverlay.xml" />
|
||||||
|
@@ -329,6 +329,7 @@ GTK_ADJUSTMENT_CLASS
|
|||||||
GTK_IS_ADJUSTMENT_CLASS
|
GTK_IS_ADJUSTMENT_CLASS
|
||||||
GTK_ADJUSTMENT_GET_CLASS
|
GTK_ADJUSTMENT_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkAdjustmentPrivate
|
||||||
gtk_adjustment_get_type
|
gtk_adjustment_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -550,12 +551,13 @@ gtk_list_box_set_header_func
|
|||||||
gtk_list_box_set_sort_func
|
gtk_list_box_set_sort_func
|
||||||
gtk_list_box_drag_highlight_row
|
gtk_list_box_drag_highlight_row
|
||||||
gtk_list_box_drag_unhighlight_row
|
gtk_list_box_drag_unhighlight_row
|
||||||
|
GtkListBoxCreateWidgetFunc
|
||||||
|
gtk_list_box_bind_model
|
||||||
|
|
||||||
gtk_list_box_row_new
|
gtk_list_box_row_new
|
||||||
gtk_list_box_row_changed
|
gtk_list_box_row_changed
|
||||||
gtk_list_box_row_is_selected
|
gtk_list_box_row_is_selected
|
||||||
gtk_list_box_row_get_header
|
gtk_list_box_row_get_header
|
||||||
gtk_list_box_row_get_type
|
|
||||||
gtk_list_box_row_set_header
|
gtk_list_box_row_set_header
|
||||||
gtk_list_box_row_get_index
|
gtk_list_box_row_get_index
|
||||||
gtk_list_box_row_set_activatable
|
gtk_list_box_row_set_activatable
|
||||||
@@ -564,6 +566,12 @@ gtk_list_box_row_set_selectable
|
|||||||
gtk_list_box_row_get_selectable
|
gtk_list_box_row_get_selectable
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
|
GTK_LIST_BOX
|
||||||
|
GTK_LIST_BOX_CLASS
|
||||||
|
GTK_LIST_BOX_GET_CLASS
|
||||||
|
GTK_LIST_BOX_ROW
|
||||||
|
GTK_LIST_BOX_ROW_CLASS
|
||||||
|
GTK_LIST_BOX_ROW_GET_CLASS
|
||||||
GTK_IS_LIST_BOX
|
GTK_IS_LIST_BOX
|
||||||
GTK_IS_LIST_BOX_CLASS
|
GTK_IS_LIST_BOX_CLASS
|
||||||
GTK_IS_LIST_BOX_ROW
|
GTK_IS_LIST_BOX_ROW
|
||||||
@@ -1118,6 +1126,7 @@ gtk_editable_get_type
|
|||||||
<FILE>gtkentry</FILE>
|
<FILE>gtkentry</FILE>
|
||||||
<TITLE>GtkEntry</TITLE>
|
<TITLE>GtkEntry</TITLE>
|
||||||
GtkEntry
|
GtkEntry
|
||||||
|
GtkEntryClass
|
||||||
gtk_entry_new
|
gtk_entry_new
|
||||||
gtk_entry_new_with_buffer
|
gtk_entry_new_with_buffer
|
||||||
gtk_entry_get_buffer
|
gtk_entry_get_buffer
|
||||||
@@ -1206,6 +1215,8 @@ GTK_ENTRY_CLASS
|
|||||||
GTK_IS_ENTRY_CLASS
|
GTK_IS_ENTRY_CLASS
|
||||||
GTK_ENTRY_GET_CLASS
|
GTK_ENTRY_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GTK_TYPE_TEXT_HANDLE_POSITION
|
||||||
|
GTK_TYPE_TEXT_HANDLE_MODE
|
||||||
GtkEntryPrivate
|
GtkEntryPrivate
|
||||||
gtk_entry_get_type
|
gtk_entry_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
@@ -1302,6 +1313,7 @@ GTK_EVENT_BOX_CLASS
|
|||||||
GTK_IS_EVENT_BOX_CLASS
|
GTK_IS_EVENT_BOX_CLASS
|
||||||
GTK_EVENT_BOX_GET_CLASS
|
GTK_EVENT_BOX_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkEventBoxPrivate
|
||||||
gtk_event_box_get_type
|
gtk_event_box_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -1633,6 +1645,7 @@ GTK_IS_FONT_CHOOSER_IFACE
|
|||||||
GTK_FONT_CHOOSER_GET_IFACE
|
GTK_FONT_CHOOSER_GET_IFACE
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GTK_FONT_CHOOSER_DELEGATE_QUARK
|
||||||
gtk_font_chooser_get_type
|
gtk_font_chooser_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -2235,6 +2248,7 @@ GTK_MENU_CLASS
|
|||||||
GTK_IS_MENU_CLASS
|
GTK_IS_MENU_CLASS
|
||||||
GTK_MENU_GET_CLASS
|
GTK_MENU_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkMenuPrivate
|
||||||
gtk_menu_get_type
|
gtk_menu_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -2287,7 +2301,7 @@ GTK_IS_MENU_BUTTON
|
|||||||
GTK_IS_MENU_BUTTON_CLASS
|
GTK_IS_MENU_BUTTON_CLASS
|
||||||
GTK_MENU_BUTTON_GET_CLASS
|
GTK_MENU_BUTTON_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
GtkMenuButtonrPrivate
|
GtkMenuButtonPrivate
|
||||||
gtk_menu_button_get_type
|
gtk_menu_button_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -2324,6 +2338,7 @@ GTK_MENU_ITEM_CLASS
|
|||||||
GTK_IS_MENU_ITEM_CLASS
|
GTK_IS_MENU_ITEM_CLASS
|
||||||
GTK_MENU_ITEM_GET_CLASS
|
GTK_MENU_ITEM_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkMenuItemPrivate
|
||||||
gtk_menu_item_get_type
|
gtk_menu_item_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -2390,6 +2405,7 @@ GTK_MENU_SHELL_CLASS
|
|||||||
GTK_IS_MENU_SHELL_CLASS
|
GTK_IS_MENU_SHELL_CLASS
|
||||||
GTK_MENU_SHELL_GET_CLASS
|
GTK_MENU_SHELL_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkMenuShellPrivate
|
||||||
gtk_menu_shell_get_type
|
gtk_menu_shell_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -2483,6 +2499,7 @@ gtk_notebook_prepend_page_menu
|
|||||||
gtk_notebook_insert_page
|
gtk_notebook_insert_page
|
||||||
gtk_notebook_insert_page_menu
|
gtk_notebook_insert_page_menu
|
||||||
gtk_notebook_remove_page
|
gtk_notebook_remove_page
|
||||||
|
gtk_notebook_detach_tab
|
||||||
gtk_notebook_page_num
|
gtk_notebook_page_num
|
||||||
gtk_notebook_next_page
|
gtk_notebook_next_page
|
||||||
gtk_notebook_prev_page
|
gtk_notebook_prev_page
|
||||||
@@ -2557,6 +2574,7 @@ GTK_IS_NUMERABLE_ICON_CLASS
|
|||||||
GTK_NUMERABLE_ICON_GET_CLASS
|
GTK_NUMERABLE_ICON_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkNumerableIconPrivate
|
||||||
gtk_numerable_icon_get_type
|
gtk_numerable_icon_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -3198,6 +3216,7 @@ gtk_search_bar_get_type
|
|||||||
<TITLE>GtkSearchEntry</TITLE>
|
<TITLE>GtkSearchEntry</TITLE>
|
||||||
GtkSearchEntry
|
GtkSearchEntry
|
||||||
gtk_search_entry_new
|
gtk_search_entry_new
|
||||||
|
gtk_search_entry_handle_event
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GTK_TYPE_SEARCH_ENTRY
|
GTK_TYPE_SEARCH_ENTRY
|
||||||
GTK_SEARCH_ENTRY
|
GTK_SEARCH_ENTRY
|
||||||
@@ -3272,6 +3291,7 @@ GTK_SETTINGS_CLASS
|
|||||||
GTK_SETTINGS_GET_CLASS
|
GTK_SETTINGS_GET_CLASS
|
||||||
GTK_TYPE_SETTINGS
|
GTK_TYPE_SETTINGS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkSettingsPrivate
|
||||||
gtk_settings_get_type
|
gtk_settings_get_type
|
||||||
GtkSettingsPropertyValue
|
GtkSettingsPropertyValue
|
||||||
</SECTION>
|
</SECTION>
|
||||||
@@ -3317,6 +3337,7 @@ GTK_SOCKET_CLASS
|
|||||||
GTK_IS_SOCKET_CLASS
|
GTK_IS_SOCKET_CLASS
|
||||||
GTK_SOCKET_GET_CLASS
|
GTK_SOCKET_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkSocketPrivate
|
||||||
gtk_socket_get_type
|
gtk_socket_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -4371,6 +4392,7 @@ gtk_tree_model_row_inserted
|
|||||||
gtk_tree_model_row_has_child_toggled
|
gtk_tree_model_row_has_child_toggled
|
||||||
gtk_tree_model_row_deleted
|
gtk_tree_model_row_deleted
|
||||||
gtk_tree_model_rows_reordered
|
gtk_tree_model_rows_reordered
|
||||||
|
gtk_tree_model_rows_reordered_with_length
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GTK_TREE_MODEL
|
GTK_TREE_MODEL
|
||||||
GTK_IS_TREE_MODEL
|
GTK_IS_TREE_MODEL
|
||||||
@@ -4407,6 +4429,7 @@ GTK_TREE_MODEL_SORT_CLASS
|
|||||||
GTK_IS_TREE_MODEL_SORT_CLASS
|
GTK_IS_TREE_MODEL_SORT_CLASS
|
||||||
GTK_TREE_MODEL_SORT_GET_CLASS
|
GTK_TREE_MODEL_SORT_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkTreeModelSortPrivate
|
||||||
gtk_tree_model_sort_get_type
|
gtk_tree_model_sort_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -4474,6 +4497,7 @@ GTK_TREE_SELECTION_CLASS
|
|||||||
GTK_TREE_SELECTION_GET_CLASS
|
GTK_TREE_SELECTION_GET_CLASS
|
||||||
GTK_IS_TREE_SELECTION_CLASS
|
GTK_IS_TREE_SELECTION_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkTreeSelectionPrivate
|
||||||
gtk_tree_selection_get_type
|
gtk_tree_selection_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -4564,6 +4588,7 @@ GTK_TREE_STORE_CLASS
|
|||||||
GTK_IS_TREE_STORE_CLASS
|
GTK_IS_TREE_STORE_CLASS
|
||||||
GTK_TREE_STORE_GET_CLASS
|
GTK_TREE_STORE_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkTreeStorePrivate
|
||||||
gtk_tree_store_get_type
|
gtk_tree_store_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -4634,6 +4659,7 @@ GTK_TREE_VIEW_COLUMN_CLASS
|
|||||||
GTK_IS_TREE_VIEW_COLUMN_CLASS
|
GTK_IS_TREE_VIEW_COLUMN_CLASS
|
||||||
GTK_TREE_VIEW_COLUMN_GET_CLASS
|
GTK_TREE_VIEW_COLUMN_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkTreeViewColumnPrivate
|
||||||
gtk_tree_view_column_get_type
|
gtk_tree_view_column_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -4849,6 +4875,7 @@ gtk_cell_area_get_current_path_string
|
|||||||
gtk_cell_area_apply_attributes
|
gtk_cell_area_apply_attributes
|
||||||
gtk_cell_area_attribute_connect
|
gtk_cell_area_attribute_connect
|
||||||
gtk_cell_area_attribute_disconnect
|
gtk_cell_area_attribute_disconnect
|
||||||
|
gtk_cell_area_attribute_get_column
|
||||||
gtk_cell_area_class_install_cell_property
|
gtk_cell_area_class_install_cell_property
|
||||||
gtk_cell_area_class_find_cell_property
|
gtk_cell_area_class_find_cell_property
|
||||||
gtk_cell_area_class_list_cell_properties
|
gtk_cell_area_class_list_cell_properties
|
||||||
@@ -4986,6 +5013,7 @@ GTK_IS_CELL_RENDERER_CLASS
|
|||||||
GTK_CELL_RENDERER_GET_CLASS
|
GTK_CELL_RENDERER_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
GtkCellRendererPrivate
|
GtkCellRendererPrivate
|
||||||
|
GtkCellRendererClassPrivate
|
||||||
gtk_cell_renderer_get_type
|
gtk_cell_renderer_get_type
|
||||||
gtk_cell_renderer_mode_get_type
|
gtk_cell_renderer_mode_get_type
|
||||||
gtk_cell_renderer_state_get_type
|
gtk_cell_renderer_state_get_type
|
||||||
@@ -5624,6 +5652,7 @@ GTK_IS_WIDGET_CLASS
|
|||||||
GTK_WIDGET_GET_CLASS
|
GTK_WIDGET_GET_CLASS
|
||||||
GTK_TYPE_REQUISITION
|
GTK_TYPE_REQUISITION
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkWidgetClassPrivate
|
||||||
GtkWidgetPrivate
|
GtkWidgetPrivate
|
||||||
gtk_widget_get_type
|
gtk_widget_get_type
|
||||||
gtk_requisition_get_type
|
gtk_requisition_get_type
|
||||||
@@ -5791,6 +5820,7 @@ GTK_WINDOW_GROUP
|
|||||||
GTK_WINDOW_GROUP_CLASS
|
GTK_WINDOW_GROUP_CLASS
|
||||||
GTK_WINDOW_GROUP_GET_CLASS
|
GTK_WINDOW_GROUP_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkWindowGroupPrivate
|
||||||
gtk_window_group_get_type
|
gtk_window_group_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -5859,6 +5889,11 @@ gtk_get_micro_version
|
|||||||
gtk_get_binary_age
|
gtk_get_binary_age
|
||||||
gtk_get_interface_age
|
gtk_get_interface_age
|
||||||
gtk_check_version
|
gtk_check_version
|
||||||
|
gtk_major_version
|
||||||
|
gtk_minor_version
|
||||||
|
gtk_micro_version
|
||||||
|
gtk_binary_age
|
||||||
|
gtk_interface_age
|
||||||
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
GTK_MAJOR_VERSION
|
GTK_MAJOR_VERSION
|
||||||
@@ -5966,6 +6001,7 @@ GTK_STYLE_PROPERTIES
|
|||||||
GTK_STYLE_PROPERTIES_CLASS
|
GTK_STYLE_PROPERTIES_CLASS
|
||||||
GTK_STYLE_PROPERTIES_GET_CLASS
|
GTK_STYLE_PROPERTIES_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkStylePropertiesPrivate
|
||||||
gtk_style_properties_get_type
|
gtk_style_properties_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -5993,6 +6029,7 @@ GTK_STYLE_CLASS_BUTTON
|
|||||||
GTK_STYLE_CLASS_CALENDAR
|
GTK_STYLE_CLASS_CALENDAR
|
||||||
GTK_STYLE_CLASS_CELL
|
GTK_STYLE_CLASS_CELL
|
||||||
GTK_STYLE_CLASS_COMBOBOX_ENTRY
|
GTK_STYLE_CLASS_COMBOBOX_ENTRY
|
||||||
|
GTK_STYLE_CLASS_CONTEXT_MENU
|
||||||
GTK_STYLE_CLASS_CHECK
|
GTK_STYLE_CLASS_CHECK
|
||||||
GTK_STYLE_CLASS_CSD
|
GTK_STYLE_CLASS_CSD
|
||||||
GTK_STYLE_CLASS_CURSOR_HANDLE
|
GTK_STYLE_CLASS_CURSOR_HANDLE
|
||||||
@@ -6033,12 +6070,14 @@ GTK_STYLE_CLASS_OVERSHOOT
|
|||||||
GTK_STYLE_CLASS_PANE_SEPARATOR
|
GTK_STYLE_CLASS_PANE_SEPARATOR
|
||||||
GTK_STYLE_CLASS_PAPER
|
GTK_STYLE_CLASS_PAPER
|
||||||
GTK_STYLE_CLASS_POPUP
|
GTK_STYLE_CLASS_POPUP
|
||||||
|
GTK_STYLE_CLASS_POPOVER
|
||||||
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
|
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
|
||||||
GTK_STYLE_CLASS_PROGRESSBAR
|
GTK_STYLE_CLASS_PROGRESSBAR
|
||||||
GTK_STYLE_CLASS_PULSE
|
GTK_STYLE_CLASS_PULSE
|
||||||
GTK_STYLE_CLASS_QUESTION
|
GTK_STYLE_CLASS_QUESTION
|
||||||
GTK_STYLE_CLASS_RADIO
|
GTK_STYLE_CLASS_RADIO
|
||||||
GTK_STYLE_CLASS_RAISED
|
GTK_STYLE_CLASS_RAISED
|
||||||
|
GTK_STYLE_CLASS_READ_ONLY
|
||||||
GTK_STYLE_CLASS_RIGHT
|
GTK_STYLE_CLASS_RIGHT
|
||||||
GTK_STYLE_CLASS_RUBBERBAND
|
GTK_STYLE_CLASS_RUBBERBAND
|
||||||
GTK_STYLE_CLASS_SCALE
|
GTK_STYLE_CLASS_SCALE
|
||||||
@@ -6058,6 +6097,7 @@ GTK_STYLE_CLASS_TITLE
|
|||||||
GTK_STYLE_CLASS_TITLEBAR
|
GTK_STYLE_CLASS_TITLEBAR
|
||||||
GTK_STYLE_CLASS_TOOLBAR
|
GTK_STYLE_CLASS_TOOLBAR
|
||||||
GTK_STYLE_CLASS_TOOLTIP
|
GTK_STYLE_CLASS_TOOLTIP
|
||||||
|
GTK_STYLE_CLASS_TOUCH_SELECTION
|
||||||
GTK_STYLE_CLASS_TOP
|
GTK_STYLE_CLASS_TOP
|
||||||
GTK_STYLE_CLASS_TROUGH
|
GTK_STYLE_CLASS_TROUGH
|
||||||
GTK_STYLE_CLASS_UNDERSHOOT
|
GTK_STYLE_CLASS_UNDERSHOOT
|
||||||
@@ -6166,6 +6206,7 @@ GTK_IS_STYLE_CONTEXT_CLASS
|
|||||||
GTK_TYPE_BORDER
|
GTK_TYPE_BORDER
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkStyleContextPrivate
|
||||||
gtk_style_context_get_type
|
gtk_style_context_get_type
|
||||||
gtk_border_get_type
|
gtk_border_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
@@ -6204,6 +6245,8 @@ GTK_CSS_PROVIDER_GET_CLASS
|
|||||||
GTK_IS_CSS_PROVIDER
|
GTK_IS_CSS_PROVIDER
|
||||||
GTK_IS_CSS_PROVIDER_CLASS
|
GTK_IS_CSS_PROVIDER_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GTK_TYPE_CSS_SECTION
|
||||||
|
GtkCssProviderPrivate
|
||||||
gtk_css_provider_get_type
|
gtk_css_provider_get_type
|
||||||
gtk_css_provider_error_quark
|
gtk_css_provider_error_quark
|
||||||
gtk_css_section_get_type
|
gtk_css_section_get_type
|
||||||
@@ -6475,6 +6518,7 @@ GtkClipboardClearFunc
|
|||||||
gtk_clipboard_get
|
gtk_clipboard_get
|
||||||
gtk_clipboard_get_for_display
|
gtk_clipboard_get_for_display
|
||||||
gtk_clipboard_get_display
|
gtk_clipboard_get_display
|
||||||
|
gtk_clipboard_get_default
|
||||||
gtk_clipboard_set_with_data
|
gtk_clipboard_set_with_data
|
||||||
gtk_clipboard_set_with_owner
|
gtk_clipboard_set_with_owner
|
||||||
gtk_clipboard_get_owner
|
gtk_clipboard_get_owner
|
||||||
@@ -6534,6 +6578,7 @@ gtk_drag_unhighlight
|
|||||||
<SUBSECTION Source Side>
|
<SUBSECTION Source Side>
|
||||||
gtk_drag_begin
|
gtk_drag_begin
|
||||||
gtk_drag_begin_with_coordinates
|
gtk_drag_begin_with_coordinates
|
||||||
|
gtk_drag_cancel
|
||||||
gtk_drag_set_icon_widget
|
gtk_drag_set_icon_widget
|
||||||
gtk_drag_set_icon_pixbuf
|
gtk_drag_set_icon_pixbuf
|
||||||
gtk_drag_set_icon_stock
|
gtk_drag_set_icon_stock
|
||||||
@@ -6715,6 +6760,8 @@ GTK_STOCK_ZOOM_100
|
|||||||
GTK_STOCK_ZOOM_FIT
|
GTK_STOCK_ZOOM_FIT
|
||||||
GTK_STOCK_ZOOM_IN
|
GTK_STOCK_ZOOM_IN
|
||||||
GTK_STOCK_ZOOM_OUT
|
GTK_STOCK_ZOOM_OUT
|
||||||
|
<SUBSECTION Private>
|
||||||
|
GtkStock
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@@ -6776,6 +6823,7 @@ gtk_icon_info_get_attach_points
|
|||||||
gtk_icon_info_get_display_name
|
gtk_icon_info_get_display_name
|
||||||
gtk_icon_info_is_symbolic
|
gtk_icon_info_is_symbolic
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
|
GtkIconInfoClass
|
||||||
GTK_ICON_THEME
|
GTK_ICON_THEME
|
||||||
GTK_IS_ICON_THEME
|
GTK_IS_ICON_THEME
|
||||||
GTK_TYPE_ICON_THEME
|
GTK_TYPE_ICON_THEME
|
||||||
@@ -6785,6 +6833,11 @@ GTK_IS_ICON_THEME_CLASS
|
|||||||
GTK_ICON_THEME_GET_CLASS
|
GTK_ICON_THEME_GET_CLASS
|
||||||
gtk_icon_info_get_type
|
gtk_icon_info_get_type
|
||||||
GTK_TYPE_ICON_INFO
|
GTK_TYPE_ICON_INFO
|
||||||
|
GTK_ICON_INFO
|
||||||
|
GTK_ICON_INFO_CLASS
|
||||||
|
GTK_ICON_INFO_GET_CLASS
|
||||||
|
GTK_IS_ICON_INFO
|
||||||
|
GTK_IS_ICON_INFO_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
GtkIconThemePrivate
|
GtkIconThemePrivate
|
||||||
gtk_icon_theme_error_quark
|
gtk_icon_theme_error_quark
|
||||||
@@ -7149,6 +7202,7 @@ gtk_print_settings_get_type
|
|||||||
<TITLE>GtkPaperSize</TITLE>
|
<TITLE>GtkPaperSize</TITLE>
|
||||||
GtkPaperSize
|
GtkPaperSize
|
||||||
GtkUnit
|
GtkUnit
|
||||||
|
GTK_UNIT_PIXEL
|
||||||
GTK_PAPER_NAME_A3
|
GTK_PAPER_NAME_A3
|
||||||
GTK_PAPER_NAME_A4
|
GTK_PAPER_NAME_A4
|
||||||
GTK_PAPER_NAME_A5
|
GTK_PAPER_NAME_A5
|
||||||
@@ -7803,6 +7857,7 @@ GTK_IS_ACTION_BAR_CLASS
|
|||||||
GTK_ACTION_BAR_GET_CLASS
|
GTK_ACTION_BAR_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkActionBarPrivate
|
||||||
gtk_action_bar_get_type
|
gtk_action_bar_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -7835,6 +7890,7 @@ GTK_IS_HEADER_BAR_CLASS
|
|||||||
GTK_HEADER_BAR_GET_CLASS
|
GTK_HEADER_BAR_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkHeaderBarPrivate
|
||||||
gtk_header_bar_get_type
|
gtk_header_bar_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -7863,6 +7919,14 @@ GtkStackTransitionType
|
|||||||
gtk_stack_set_transition_type
|
gtk_stack_set_transition_type
|
||||||
gtk_stack_get_transition_type
|
gtk_stack_get_transition_type
|
||||||
gtk_stack_get_transition_running
|
gtk_stack_get_transition_running
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GTK_TYPE_STACK
|
||||||
|
GTK_IS_STACK
|
||||||
|
GTK_IS_STACK_CLASS
|
||||||
|
GTK_STACK
|
||||||
|
GTK_STACK_CLASS
|
||||||
|
GTK_STACK_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
gtk_stack_get_type
|
gtk_stack_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
@@ -7874,6 +7938,14 @@ GtkStackSwitcher
|
|||||||
gtk_stack_switcher_new
|
gtk_stack_switcher_new
|
||||||
gtk_stack_switcher_set_stack
|
gtk_stack_switcher_set_stack
|
||||||
gtk_stack_switcher_get_stack
|
gtk_stack_switcher_get_stack
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GTK_TYPE_STACK_SWITCHER
|
||||||
|
GTK_IS_STACK_SWITCHER
|
||||||
|
GTK_IS_STACK_SWITCHER_CLASS
|
||||||
|
GTK_STACK_SWITCHER
|
||||||
|
GTK_STACK_SWITCHER_CLASS
|
||||||
|
GTK_STACK_SWITCHER_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
gtk_stack_switcher_get_type
|
gtk_stack_switcher_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
@@ -7892,6 +7964,15 @@ gtk_revealer_set_transition_duration
|
|||||||
GtkRevealerTransitionType
|
GtkRevealerTransitionType
|
||||||
gtk_revealer_get_transition_type
|
gtk_revealer_get_transition_type
|
||||||
gtk_revealer_set_transition_type
|
gtk_revealer_set_transition_type
|
||||||
|
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GTK_TYPE_REVEALER
|
||||||
|
GTK_IS_REVEALER
|
||||||
|
GTK_IS_REVEALER_CLASS
|
||||||
|
GTK_REVEALER
|
||||||
|
GTK_REVEALER_CLASS
|
||||||
|
GTK_REVEALER_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
gtk_revealer_get_type
|
gtk_revealer_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
@@ -7943,6 +8024,24 @@ gtk_flow_box_child_new
|
|||||||
gtk_flow_box_child_get_index
|
gtk_flow_box_child_get_index
|
||||||
gtk_flow_box_child_is_selected
|
gtk_flow_box_child_is_selected
|
||||||
gtk_flow_box_child_changed
|
gtk_flow_box_child_changed
|
||||||
|
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GtkFlowBoxChildClass
|
||||||
|
GTK_TYPE_FLOW_BOX
|
||||||
|
GTK_TYPE_FLOW_BOX_CHILD
|
||||||
|
GTK_FLOW_BOX
|
||||||
|
GTK_FLOW_BOX_CLASS
|
||||||
|
GTK_FLOW_BOX_GET_CLASS
|
||||||
|
GTK_IS_FLOW_BOX
|
||||||
|
GTK_IS_FLOW_BOX_CLASS
|
||||||
|
GTK_FLOW_BOX_CHILD
|
||||||
|
GTK_FLOW_BOX_CHILD_CLASS
|
||||||
|
GTK_FLOW_BOX_CHILD_GET_CLASS
|
||||||
|
GTK_IS_FLOW_BOX_CHILD
|
||||||
|
GTK_IS_FLOW_BOX_CHILD_CLASS
|
||||||
|
<SUBSECTION Private>
|
||||||
|
gtk_flow_box_get_type
|
||||||
|
gtk_flow_box_child_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@@ -7960,7 +8059,20 @@ gtk_popover_set_position
|
|||||||
gtk_popover_get_position
|
gtk_popover_get_position
|
||||||
gtk_popover_set_modal
|
gtk_popover_set_modal
|
||||||
gtk_popover_get_modal
|
gtk_popover_get_modal
|
||||||
|
gtk_popover_set_transitions_enabled
|
||||||
|
gtk_popover_get_transitions_enabled
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GTK_TYPE_POPOVER
|
||||||
|
GTK_IS_POPOVER
|
||||||
|
GTK_IS_POPOVER_CLASS
|
||||||
|
GTK_IS_POPOVER_MENU
|
||||||
|
GTK_IS_POPOVER_MENU_CLASS
|
||||||
|
GTK_POPOVER
|
||||||
|
GTK_POPOVER_CLASS
|
||||||
|
GTK_POPOVER_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
GtkPopoverPrivate
|
||||||
gtk_popover_get_type
|
gtk_popover_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
@@ -7970,6 +8082,15 @@ gtk_popover_get_type
|
|||||||
GtkPopoverMenu
|
GtkPopoverMenu
|
||||||
gtk_popover_menu_new
|
gtk_popover_menu_new
|
||||||
gtk_popover_menu_open_submenu
|
gtk_popover_menu_open_submenu
|
||||||
|
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GTK_TYPE_POPOVER_MENU
|
||||||
|
GTK_IS_POPOVER_MENU
|
||||||
|
GTK_IS_POPOVER_MENU_CLASS
|
||||||
|
GTK_POPOVER_MENU
|
||||||
|
GTK_POPOVER_MENU_CLASS
|
||||||
|
GTK_POPOVER_MENU_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
gtk_popover_menu_get_type
|
gtk_popover_menu_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
@@ -7980,6 +8101,12 @@ gtk_popover_menu_get_type
|
|||||||
GtkModelButton
|
GtkModelButton
|
||||||
GtkButtonRole
|
GtkButtonRole
|
||||||
gtk_model_button_new
|
gtk_model_button_new
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GTK_TYPE_MODEL_BUTTON
|
||||||
|
GTK_MODEL_BUTTON
|
||||||
|
GTK_IS_MODEL_BUTTON
|
||||||
|
<SUBSECTION Private>
|
||||||
|
gtk_model_button_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@@ -7999,6 +8126,7 @@ GTK_EVENT_CONTROLLER
|
|||||||
GTK_EVENT_CONTROLLER_CLASS
|
GTK_EVENT_CONTROLLER_CLASS
|
||||||
GTK_IS_EVENT_CONTROLLER
|
GTK_IS_EVENT_CONTROLLER
|
||||||
GTK_EVENT_CONTROLLER_GET_CLASS
|
GTK_EVENT_CONTROLLER_GET_CLASS
|
||||||
|
GTK_IS_EVENT_CONTROLLER_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
GtkEventControllerPriv
|
GtkEventControllerPriv
|
||||||
@@ -8208,24 +8336,24 @@ gtk_gesture_zoom_get_type
|
|||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>gtksidebar</FILE>
|
<FILE>gtkstacksidebar</FILE>
|
||||||
GtkSidebar
|
GtkStackSidebar
|
||||||
GtkSidebarClass
|
GtkStackSidebarClass
|
||||||
gtk_sidebar_new
|
gtk_stack_sidebar_new
|
||||||
gtk_sidebar_set_stack
|
gtk_stack_sidebar_set_stack
|
||||||
gtk_sidebar_get_stack
|
gtk_stack_sidebar_get_stack
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GTK_TYPE_SIDEBAR
|
GTK_TYPE_STACK_SIDEBAR
|
||||||
GTK_SIDEBAR
|
GTK_STACK_SIDEBAR
|
||||||
GTK_SIDEBAR_CLASS
|
GTK_STACK_SIDEBAR_CLASS
|
||||||
GTK_IS_SIDEBAR
|
GTK_IS_STACK_SIDEBAR
|
||||||
GTK_IS_SIDEBAR_CLASS
|
GTK_IS_STACK_SIDEBAR_CLASS
|
||||||
GTK_SIDEBAR_GET_CLASS
|
GTK_STACK_SIDEBAR_GET_CLASS
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
GtkSidebarPrivate
|
GtkStackSidebarPrivate
|
||||||
gtk_sidebar_get_type
|
gtk_stack_sidebar_get_type
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@@ -8236,10 +8364,9 @@ gtk_gl_area_new
|
|||||||
gtk_gl_area_get_context
|
gtk_gl_area_get_context
|
||||||
gtk_gl_area_make_current
|
gtk_gl_area_make_current
|
||||||
gtk_gl_area_queue_render
|
gtk_gl_area_queue_render
|
||||||
|
gtk_gl_area_attach_buffers
|
||||||
gtk_gl_area_set_error
|
gtk_gl_area_set_error
|
||||||
gtk_gl_area_get_error
|
gtk_gl_area_get_error
|
||||||
gtk_gl_area_set_profile
|
|
||||||
gtk_gl_area_get_profile
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
gtk_gl_area_set_has_alpha
|
gtk_gl_area_set_has_alpha
|
||||||
gtk_gl_area_get_has_alpha
|
gtk_gl_area_get_has_alpha
|
||||||
@@ -8249,10 +8376,13 @@ gtk_gl_area_set_has_stencil_buffer
|
|||||||
gtk_gl_area_get_has_stencil_buffer
|
gtk_gl_area_get_has_stencil_buffer
|
||||||
gtk_gl_area_set_auto_render
|
gtk_gl_area_set_auto_render
|
||||||
gtk_gl_area_get_auto_render
|
gtk_gl_area_get_auto_render
|
||||||
|
gtk_gl_area_get_required_version
|
||||||
|
gtk_gl_area_set_required_version
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GTK_TYPE_GL_AREA
|
GTK_TYPE_GL_AREA
|
||||||
GTK_GL_AREA
|
GTK_GL_AREA
|
||||||
GTK_GL_AREA_CLASS
|
GTK_GL_AREA_CLASS
|
||||||
|
GTK_GL_AREA_GET_CLASS
|
||||||
GTK_IS_GL_AREA
|
GTK_IS_GL_AREA
|
||||||
GTK_IS_GL_AREA_CLASS
|
GTK_IS_GL_AREA_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
@@ -173,7 +173,7 @@ gtk_separator_get_type
|
|||||||
gtk_separator_menu_item_get_type
|
gtk_separator_menu_item_get_type
|
||||||
gtk_separator_tool_item_get_type
|
gtk_separator_tool_item_get_type
|
||||||
gtk_settings_get_type
|
gtk_settings_get_type
|
||||||
gtk_sidebar_get_type
|
gtk_stack_sidebar_get_type
|
||||||
gtk_size_group_get_type
|
gtk_size_group_get_type
|
||||||
@ENABLE_ON_X11@gtk_socket_get_type
|
@ENABLE_ON_X11@gtk_socket_get_type
|
||||||
gtk_spin_button_get_type
|
gtk_spin_button_get_type
|
||||||
|
@@ -4,21 +4,21 @@
|
|||||||
]>
|
]>
|
||||||
<refentry id="chap-input-handling">
|
<refentry id="chap-input-handling">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>The GTK+ Input Handling Model</refentrytitle>
|
<refentrytitle>The GTK+ Input and Event Handling Model</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
<refmiscinfo>GTK Library</refmiscinfo>
|
<refmiscinfo>GTK Library</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>The GTK+ Input Handling Model</refname>
|
<refname>The GTK+ Input and Event Handling Model</refname>
|
||||||
<refpurpose>
|
<refpurpose>
|
||||||
GTK+ input handling in detail
|
GTK+ input and event handling in detail
|
||||||
</refpurpose>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
|
|
||||||
<refsect1 id="input-overview">
|
<refsect1 id="input-overview">
|
||||||
<title>Overview of GTK+ input handling</title>
|
<title>Overview of GTK+ input and event handling</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This chapter describes in detail how GTK+ handles input. If you are interested
|
This chapter describes in detail how GTK+ handles input. If you are interested
|
||||||
@@ -64,20 +64,20 @@
|
|||||||
GDK translates these raw windowing system events into #GdkEvents.
|
GDK translates these raw windowing system events into #GdkEvents.
|
||||||
Typical input events are:
|
Typical input events are:
|
||||||
<simplelist>
|
<simplelist>
|
||||||
<member>GdkEventButton</member>
|
<member>#GdkEventButton</member>
|
||||||
<member>GdkEventMotion</member>
|
<member>#GdkEventMotion</member>
|
||||||
<member>GdkEventCrossing</member>
|
<member>#GdkEventCrossing</member>
|
||||||
<member>GdkEventKey</member>
|
<member>#GdkEventKey</member>
|
||||||
<member>GdkEventFocus</member>
|
<member>#GdkEventFocus</member>
|
||||||
<member>GdkEventTouch</member>
|
<member>#GdkEventTouch</member>
|
||||||
</simplelist>
|
</simplelist>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Additionally, GDK/GTK synthesizes other signals to let know whether
|
Additionally, GDK/GTK synthesizes other signals to let know whether
|
||||||
grabs (system-wide or in-app) are taking input away:
|
grabs (system-wide or in-app) are taking input away:
|
||||||
<simplelist>
|
<simplelist>
|
||||||
<member>GdkEventGrabBroken</member>
|
<member>#GdkEventGrabBroken</member>
|
||||||
<member>GtkWidget::grab-notify</member>
|
<member>#GtkWidget::grab-notify</member>
|
||||||
</simplelist>
|
</simplelist>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -87,80 +87,167 @@
|
|||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
<refsect2>
|
<refsect2 id="event-propagation">
|
||||||
<title>Event propagation</title>
|
<title>Event propagation</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When GTK+ receives an event, it determines the target widget that
|
For widgets which have a #GdkWindow set, events are received from the
|
||||||
it is directed to. Unless grabs are involved, this is done by finding
|
windowing system and passed to gtk_main_do_event(). See its documentation
|
||||||
the widget to which the window of the event belongs.
|
for details of what it does: compression of enter/leave events,
|
||||||
|
identification of the widget receiving the event, pushing the event onto a
|
||||||
|
stack for gtk_get_current_event(), and propagating the event to the
|
||||||
|
widget.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The event is then propagated from the toplevel window down to the
|
When a GDK backend produces an input event, it is tied to a #GdkDevice and
|
||||||
target widget. In this phase, which is known as the “capture” phase,
|
a #GdkWindow, which in turn represents a windowing system surface in the
|
||||||
gestures that are attached with GTK_PHASE_CAPTURE get a chance
|
backend. If a widget has grabbed the current input device, or all input
|
||||||
to react to the event.
|
devices, the event is propagated to that #GtkWidget. Otherwise, it is
|
||||||
|
propagated to the the #GtkWidget which called gtk_widget_register_window()
|
||||||
|
on the #GdkWindow receiving the event.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Grabs are implemented for each input device, and globally. A grab for a
|
||||||
|
specific input device (gtk_device_grab_add()), is sent events in
|
||||||
|
preference to a global grab (gtk_grab_add()). Input grabs only have effect
|
||||||
|
within the #GtkWindowGroup containing the #GtkWidget which registered the
|
||||||
|
event’s #GdkWindow. If this #GtkWidget is a child of the grab widget, the
|
||||||
|
event is propagated to the child — this is the basis for propagating
|
||||||
|
events within modal dialogs.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
An event is propagated to a widget using gtk_propagate_event().
|
||||||
|
Propagation differs between event types: key events (%GDK_KEY_PRESS,
|
||||||
|
%GDK_KEY_RELEASE) are delivered to the top-level #GtkWindow; other events
|
||||||
|
are propagated down and up the widget hierarchy in three phases (see
|
||||||
|
#GtkPropagationPhase).
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For key events, the top-level window’s default #GtkWindow::key-press-event
|
||||||
|
and #GtkWindow::key-release-event signal handlers handle mnemonics and
|
||||||
|
accelerators first. Other key presses are then passed to
|
||||||
|
gtk_window_propagate_key_event() which propagates the event upwards from
|
||||||
|
the window’s current focus widget (gtk_window_get_focus()) to the
|
||||||
|
top-level.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For other events, in the first phase (the “capture” phase) the event is
|
||||||
|
delivered to each widget from the top-most (for example, the top-level
|
||||||
|
#GtkWindow or grab widget) down to the target #GtkWidget.
|
||||||
|
<link linkend="event-controllers-and-gestures">Gestures</link> that are
|
||||||
|
attached with %GTK_PHASE_CAPTURE get a chance to react to the event.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
After the “capture” phase, the widget that was intended to be the
|
After the “capture” phase, the widget that was intended to be the
|
||||||
destination of the event will let run gestures attached to it with
|
destination of the event will run gestures attached to it with
|
||||||
GTK_PHASE_TARGET. This is known as the “target” phase, and does only
|
%GTK_PHASE_TARGET. This is known as the “target” phase, and only
|
||||||
happen on that widget.
|
happens on that widget.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Next, the appropriate event signal is emitted for the event in question,
|
Next, the #GtkWidget::event signal is emitted, then the appropriate signal
|
||||||
e.g. “motion-notify-event”. Handling these signals was the primary
|
for the event in question, for example #GtkWidget::motion-notify-event.
|
||||||
way to handle input in GTK+ widgets before gestures were introduced.
|
Handling these signals was the primary way to handle input in GTK+ widgets
|
||||||
The signals are emitted from the target widget up to the toplevel,
|
before gestures were introduced. If the widget is realized, the
|
||||||
until a signal handler indicates that it has handled the event, by
|
#GtkWidget::event-after signal is emitted. The signals are emitted from
|
||||||
returning GDK_EVENT_STOP.
|
the target widget up to the top-level, as part of the “bubble” phase.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The default handlers for the event signals send the event
|
The default handlers for the event signals send the event
|
||||||
to gestures that are attached with GTK_PHASE_BUBBLE. Therefore,
|
to gestures that are attached with %GTK_PHASE_BUBBLE. Therefore,
|
||||||
gestures in the “bubble” phase are only used if the widget does
|
gestures in the “bubble” phase are only used if the widget does
|
||||||
not have its own event handlers, or takes care to chain up to the
|
not have its own event handlers, or takes care to chain up to the
|
||||||
default GtkWidget handlers.
|
default #GtkWidget handlers.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Anytime during the propagation phase, a widget may indicate that a
|
Events are not delivered to a widget which is insensitive or unmapped.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Any time during the propagation phase, a widget may indicate that a
|
||||||
received event was consumed and propagation should therefore be stopped.
|
received event was consumed and propagation should therefore be stopped.
|
||||||
In traditional event handlers, this is hinted by returning GDK_EVENT_STOP,
|
In traditional event handlers, this is hinted by returning %GDK_EVENT_STOP.
|
||||||
if gestures are used, this may happen when the widget tells the gesture
|
If gestures are used, this may happen when the widget tells the gesture
|
||||||
to claim the event touch sequence (or the pointer events) for its own. See the
|
to claim the event touch sequence (or the pointer events) for its own. See the
|
||||||
"gesture states" section below to know more of the latter.
|
"gesture states" section below to know more of the latter.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
|
<refsect2 id="event-masks">
|
||||||
|
<title>Event masks</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Each widget instance has a basic event mask and another per input device,
|
||||||
|
which determine the types of input event it receives. Each event mask set
|
||||||
|
on a widget is added to the corresponding (basic or per-device) event mask
|
||||||
|
for the widget’s #GdkWindow, and all child #GdkWindows.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If a widget is windowless (gtk_widget_get_has_window() returns %FALSE) and
|
||||||
|
an application wants to receive custom events on it, it must be placed
|
||||||
|
inside a #GtkEventBox to receive the events, and an appropriate event mask
|
||||||
|
must be set on the box. When implementing a widget, use a %GDK_INPUT_ONLY
|
||||||
|
#GdkWindow to receive the events instead.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Filtering events against event masks happens inside #GdkWindow, which
|
||||||
|
exposes event masks to the windowing system to reduce the number of events
|
||||||
|
GDK receives from it. On receiving an event, it is filtered against the
|
||||||
|
#GdkWindow’s mask for the input device, if set. Otherwise, it is filtered
|
||||||
|
against the #GdkWindow’s basic event mask.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This means that widgets must add to the event mask for each event type
|
||||||
|
they expect to receive, using gtk_widget_set_events() or
|
||||||
|
gtk_widget_add_events() to preserve the existing mask. Widgets which are
|
||||||
|
aware of floating devices should use gtk_widget_set_device_events() or
|
||||||
|
gtk_widget_add_device_events(), and must explicitly enable the device
|
||||||
|
using gtk_widget_set_device_enabled(). See the #GdkDeviceManager
|
||||||
|
documentation for more information.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
All standard widgets set the event mask for all events they expect to
|
||||||
|
receive, and it is not necessary to modify this. Masks should be set when
|
||||||
|
implementing a new widget.
|
||||||
|
</para>
|
||||||
|
</refsect2>
|
||||||
|
|
||||||
<refsect2>
|
<refsect2>
|
||||||
<title>Touch events</title>
|
<title>Touch events</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Touch events are emitted as events of type GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE or
|
Touch events are emitted as events of type %GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE or
|
||||||
GDK_TOUCH_END, those events contain an “event sequence” that univocally identifies
|
%GDK_TOUCH_END, those events contain an “event sequence” that univocally identifies
|
||||||
the physical touch until it is lifted from the device.
|
the physical touch until it is lifted from the device.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
On some windowing platforms, multitouch devices perform pointer emulation, this works
|
On some windowing platforms, multitouch devices perform pointer emulation, this works
|
||||||
by granting a “pointer emulating” hint to one of the currently interacting touch
|
by granting a “pointer emulating” hint to one of the currently interacting touch
|
||||||
sequences, which will be reported on every GdkEventTouch event from that sequence. By
|
sequences, which will be reported on every #GdkEventTouch event from that sequence. By
|
||||||
default, if a widget didn't request touch events by setting GDK_TOUCH_MASK on its
|
default, if a widget didn't request touch events by setting %GDK_TOUCH_MASK on its
|
||||||
event mask and didn't override GtkWidget::touch-event, GTK+ will transform these
|
event mask and didn't override #GtkWidget::touch-event, GTK+ will transform these
|
||||||
“pointer emulating” events into semantically similar GdkEventButton and GdkEventMotion
|
“pointer emulating” events into semantically similar #GdkEventButton and #GdkEventMotion
|
||||||
events. Depending on GDK_TOUCH_MASK being in the event mask or not, non-pointer-emulating
|
events. Depending on %GDK_TOUCH_MASK being in the event mask or not, non-pointer-emulating
|
||||||
sequences could still trigger gestures or just get filtered out, regardless of the widget
|
sequences could still trigger gestures or just get filtered out, regardless of the widget
|
||||||
not handling those directly.
|
not handling those directly.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If the widget sets GDK_TOUCH_MASK on its event mask and doesn't chain up on
|
If the widget sets %GDK_TOUCH_MASK on its event mask and doesn't chain up on
|
||||||
GtkWidget::touch-event, only touch events will be received, and no pointer emulation
|
#GtkWidget::touch-event, only touch events will be received, and no pointer emulation
|
||||||
will be performed.
|
will be performed.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
@@ -171,11 +258,11 @@
|
|||||||
<para>
|
<para>
|
||||||
Grabs are a method to claim all input events from a device, they happen
|
Grabs are a method to claim all input events from a device, they happen
|
||||||
either implicitly on pointer and touch devices, or explicitly. Implicit grabs
|
either implicitly on pointer and touch devices, or explicitly. Implicit grabs
|
||||||
happen on user interaction, when a GdkEventButtonPress happens, all events from
|
happen on user interaction, when a #GdkEventButtonPress happens, all events from
|
||||||
then on, until after the corresponding GdkEventButtonRelease, will be reported
|
then on, until after the corresponding #GdkEventButtonRelease, will be reported
|
||||||
to the widget that got the first event. Likewise, on touch events, every
|
to the widget that got the first event. Likewise, on touch events, every
|
||||||
GdkEventSequence will deliver only events to the widget that received its
|
#GdkEventSequence will deliver only events to the widget that received its
|
||||||
GDK_TOUCH_BEGIN event.
|
%GDK_TOUCH_BEGIN event.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -192,8 +279,8 @@
|
|||||||
point somewhere else, even while the pointer/touch device is already grabbed.
|
point somewhere else, even while the pointer/touch device is already grabbed.
|
||||||
This makes it necessary for widgets to handle the cancellation of any ongoing
|
This makes it necessary for widgets to handle the cancellation of any ongoing
|
||||||
interaction. Depending on whether a GTK or GDK grab is causing this, the
|
interaction. Depending on whether a GTK or GDK grab is causing this, the
|
||||||
widget will respectively receive a GtkWidget::grab-notify signal, or a
|
widget will respectively receive a #GtkWidget::grab-notify signal, or a
|
||||||
GdkEventGrabBroken event.
|
#GdkEventGrabBroken event.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -209,12 +296,12 @@
|
|||||||
<!-- mnemonics, accelerators, bindings -->
|
<!-- mnemonics, accelerators, bindings -->
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
<refsect2>
|
<refsect2 id="event-controllers-and-gestures">
|
||||||
<title>Event controllers and gestures</title>
|
<title>Event controllers and gestures</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Event controllers are standalone objects that can perform specific actions
|
Event controllers are standalone objects that can perform specific actions
|
||||||
upon received GdkEvents. These are tied to a GtkWidget, and can be told of
|
upon received #GdkEvents. These are tied to a #GtkWidget, and can be told of
|
||||||
the event propagation phase at which they will manage the events.
|
the event propagation phase at which they will manage the events.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -270,7 +357,7 @@
|
|||||||
Alternatively, or at a later point in time, the widget may choose to deny the touch
|
Alternatively, or at a later point in time, the widget may choose to deny the touch
|
||||||
sequences, thus letting those go through again in event propagation. When this happens
|
sequences, thus letting those go through again in event propagation. When this happens
|
||||||
in the capture phase, and if there are no other claiming gestures in the widget,
|
in the capture phase, and if there are no other claiming gestures in the widget,
|
||||||
a GDK_TOUCH_BEGIN/GDK_BUTTON_PRESS event will be emulated and
|
a %GDK_TOUCH_BEGIN/%GDK_BUTTON_PRESS event will be emulated and
|
||||||
propagated downwards, in order to preserve consistency.
|
propagated downwards, in order to preserve consistency.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@@ -83,7 +83,7 @@
|
|||||||
widgets have been deprecated. These deprecations are clearly spelled
|
widgets have been deprecated. These deprecations are clearly spelled
|
||||||
out in the API reference, with hints about the recommended replacements.
|
out in the API reference, with hints about the recommended replacements.
|
||||||
The API reference for GTK+ 2 also includes an
|
The API reference for GTK+ 2 also includes an
|
||||||
<ulink url="http://developer.gnome.org/gtk/2.24/api-index-deprecated.html">index</ulink> of all deprecated symbols.
|
<ulink url="https://developer.gnome.org/gtk2/2.24/api-index-deprecated.html">index</ulink> of all deprecated symbols.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
To verify that your program does not use any deprecated symbols,
|
To verify that your program does not use any deprecated symbols,
|
||||||
|
@@ -31,7 +31,7 @@ or environment variables.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
For up-to-date information about the current status of this port, see the
|
For up-to-date information about the current status of this port, see the
|
||||||
<ulink url="http://live.gnome.org/GTK+/OSX">project page</ulink>.
|
<ulink url="https://wiki.gnome.org/Projects/GTK+/OSX">project page</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@@ -36,7 +36,7 @@ some additional commandline options.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
A list of modules to load in addition to those specified in the
|
A list of modules to load in addition to those specified in the
|
||||||
<envar>GTK_MODULES</envar> environment variable and the
|
<envar>GTK3_MODULES</envar> environment variable and the
|
||||||
<literal>gtk-modules</literal> setting.
|
<literal>gtk-modules</literal> setting.
|
||||||
</para>
|
</para>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
@@ -223,14 +223,24 @@ additional environment variables.
|
|||||||
</formalpara>
|
</formalpara>
|
||||||
|
|
||||||
<formalpara>
|
<formalpara>
|
||||||
<title><envar>GTK_MODULES</envar></title>
|
<title><envar>GTK3_MODULES</envar></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
A list of modules to load. Note that GTK+ also allows to specify modules to load via a commandline option (<option>--gtk-module</option>) and with the <literal>gtk-modules</literal> setting.
|
A list of modules to load. Note that GTK+ also allows to specify modules to load via a commandline option (<option>--gtk-module</option>) and with the <literal>gtk-modules</literal> setting.
|
||||||
</para>
|
</para>
|
||||||
|
</formalpara>
|
||||||
|
|
||||||
|
<formalpara>
|
||||||
|
<title><envar>GTK_MODULES</envar></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
A list of modules to load in addition to the ones in the <envar>GTK3_MODULES</envar> variable.
|
||||||
|
</para>
|
||||||
<warning>
|
<warning>
|
||||||
Note that this environment variable is read by GTK+ 2.x too,
|
Note that this environment variable is read by GTK+ 2.x too,
|
||||||
which may not have the same set of modules available for loading.
|
which may not have the same set of modules available for loading.
|
||||||
|
Use <envar>GTK3_MODULES</envar> for modules that are only compatible
|
||||||
|
with GTK+ 3.
|
||||||
</warning>
|
</warning>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
|
|
||||||
|
@@ -144,7 +144,7 @@
|
|||||||
<link linkend="GtkStackSwitcher">
|
<link linkend="GtkStackSwitcher">
|
||||||
<inlinegraphic fileref="stackswitcher.png" format="PNG"></inlinegraphic>
|
<inlinegraphic fileref="stackswitcher.png" format="PNG"></inlinegraphic>
|
||||||
</link>
|
</link>
|
||||||
<link linkend="GtkSidebar">
|
<link linkend="GtkStackSidebar">
|
||||||
<inlinegraphic fileref="sidebar.png" format="PNG"></inlinegraphic>
|
<inlinegraphic fileref="sidebar.png" format="PNG"></inlinegraphic>
|
||||||
</link>
|
</link>
|
||||||
<link linkend="GtkTreeView">
|
<link linkend="GtkTreeView">
|
||||||
|
@@ -110,7 +110,7 @@ in 256 color mode.
|
|||||||
<para>
|
<para>
|
||||||
More information about GTK+ on Windows, including detailed build
|
More information about GTK+ on Windows, including detailed build
|
||||||
instructions, binary downloads, etc, can be found
|
instructions, binary downloads, etc, can be found
|
||||||
<ulink url="http://live.gnome.org/GTK+/Win32">online</ulink>.
|
<ulink url="https://wiki.gnome.org/Projects/GTK+/Win32">online</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@@ -1407,8 +1407,8 @@ create_sidebar (void)
|
|||||||
gtk_widget_show (view);
|
gtk_widget_show (view);
|
||||||
gtk_stack_add_titled (GTK_STACK (stack), view, "page2", "Page 2");
|
gtk_stack_add_titled (GTK_STACK (stack), view, "page2", "Page 2");
|
||||||
|
|
||||||
sidebar = gtk_sidebar_new ();
|
sidebar = gtk_stack_sidebar_new ();
|
||||||
gtk_sidebar_set_stack (GTK_SIDEBAR (sidebar), GTK_STACK (stack));
|
gtk_stack_sidebar_set_stack (GTK_STACK_SIDEBAR (sidebar), GTK_STACK (stack));
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
|
@@ -11,12 +11,14 @@
|
|||||||
<section>
|
<section>
|
||||||
<item>
|
<item>
|
||||||
<attribute name='label' translatable='yes'>_About Bloatpad</attribute>
|
<attribute name='label' translatable='yes'>_About Bloatpad</attribute>
|
||||||
|
<attribute name='hidden-when'>macos-menubar</attribute>
|
||||||
<attribute name='action'>app.about</attribute>
|
<attribute name='action'>app.about</attribute>
|
||||||
</item>
|
</item>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<item>
|
<item>
|
||||||
<attribute name='label' translatable='yes'>_Quit</attribute>
|
<attribute name='label' translatable='yes'>_Quit</attribute>
|
||||||
|
<attribute name='hidden-when'>macos-menubar</attribute>
|
||||||
<attribute name='action'>app.quit</attribute>
|
<attribute name='action'>app.quit</attribute>
|
||||||
</item>
|
</item>
|
||||||
</section>
|
</section>
|
||||||
|
@@ -129,17 +129,15 @@ close_window (void)
|
|||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static void
|
||||||
main (int argc,
|
activate (GtkApplication *app,
|
||||||
char *argv[])
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *da;
|
GtkWidget *drawing_area;
|
||||||
|
|
||||||
gtk_init (&argc, &argv);
|
window = gtk_application_window_new (app);
|
||||||
|
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Drawing Area");
|
gtk_window_set_title (GTK_WINDOW (window), "Drawing Area");
|
||||||
|
|
||||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||||
@@ -150,35 +148,46 @@ main (int argc,
|
|||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||||
|
|
||||||
da = gtk_drawing_area_new ();
|
drawing_area = gtk_drawing_area_new ();
|
||||||
/* set a minimum size */
|
/* set a minimum size */
|
||||||
gtk_widget_set_size_request (da, 100, 100);
|
gtk_widget_set_size_request (drawing_area, 100, 100);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
gtk_container_add (GTK_CONTAINER (frame), drawing_area);
|
||||||
|
|
||||||
/* Signals used to handle the backing surface */
|
/* Signals used to handle the backing surface */
|
||||||
g_signal_connect (da, "draw",
|
g_signal_connect (drawing_area, "draw",
|
||||||
G_CALLBACK (draw_cb), NULL);
|
G_CALLBACK (draw_cb), NULL);
|
||||||
g_signal_connect (da,"configure-event",
|
g_signal_connect (drawing_area,"configure-event",
|
||||||
G_CALLBACK (configure_event_cb), NULL);
|
G_CALLBACK (configure_event_cb), NULL);
|
||||||
|
|
||||||
/* Event signals */
|
/* Event signals */
|
||||||
g_signal_connect (da, "motion-notify-event",
|
g_signal_connect (drawing_area, "motion-notify-event",
|
||||||
G_CALLBACK (motion_notify_event_cb), NULL);
|
G_CALLBACK (motion_notify_event_cb), NULL);
|
||||||
g_signal_connect (da, "button-press-event",
|
g_signal_connect (drawing_area, "button-press-event",
|
||||||
G_CALLBACK (button_press_event_cb), NULL);
|
G_CALLBACK (button_press_event_cb), NULL);
|
||||||
|
|
||||||
/* Ask to receive events the drawing area doesn't normally
|
/* Ask to receive events the drawing area doesn't normally
|
||||||
* subscribe to. In particular, we need to ask for the
|
* subscribe to. In particular, we need to ask for the
|
||||||
* button press and motion notify events that want to handle.
|
* button press and motion notify events that want to handle.
|
||||||
*/
|
*/
|
||||||
gtk_widget_set_events (da, gtk_widget_get_events (da)
|
gtk_widget_set_events (drawing_area, gtk_widget_get_events (drawing_area)
|
||||||
| GDK_BUTTON_PRESS_MASK
|
| GDK_BUTTON_PRESS_MASK
|
||||||
| GDK_POINTER_MOTION_MASK);
|
| GDK_POINTER_MOTION_MASK);
|
||||||
|
|
||||||
gtk_widget_show_all (window);
|
gtk_widget_show_all (window);
|
||||||
|
}
|
||||||
gtk_main ();
|
|
||||||
|
int
|
||||||
return 0;
|
main (int argc,
|
||||||
|
char **argv)
|
||||||
|
{
|
||||||
|
GtkApplication *app;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
|
||||||
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
|
g_object_unref (app);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -7,23 +7,17 @@ print_hello (GtkWidget *widget,
|
|||||||
g_print ("Hello World\n");
|
g_print ("Hello World\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static void
|
||||||
main (int argc,
|
activate (GtkApplication *app,
|
||||||
char *argv[])
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *grid;
|
GtkWidget *grid;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
/* This is called in all GTK applications. Arguments are parsed
|
|
||||||
* from the command line and are returned to the application.
|
|
||||||
*/
|
|
||||||
gtk_init (&argc, &argv);
|
|
||||||
|
|
||||||
/* create a new window, and set its title */
|
/* create a new window, and set its title */
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_application_window_new (app);
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Grid");
|
gtk_window_set_title (GTK_WINDOW (window), "Window");
|
||||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||||
|
|
||||||
/* Here we construct the container that is going pack our buttons */
|
/* Here we construct the container that is going pack our buttons */
|
||||||
@@ -49,7 +43,7 @@ main (int argc,
|
|||||||
gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 1);
|
gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 1);
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Quit");
|
button = gtk_button_new_with_label ("Quit");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (gtk_main_quit), NULL);
|
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
||||||
|
|
||||||
/* Place the Quit button in the grid cell (0, 1), and make it
|
/* Place the Quit button in the grid cell (0, 1), and make it
|
||||||
* span 2 columns.
|
* span 2 columns.
|
||||||
@@ -63,11 +57,19 @@ main (int argc,
|
|||||||
*/
|
*/
|
||||||
gtk_widget_show_all (window);
|
gtk_widget_show_all (window);
|
||||||
|
|
||||||
/* All GTK applications must have a gtk_main(). Control ends here
|
}
|
||||||
* and waits for an event to occur (like a key press or a mouse event),
|
|
||||||
* until gtk_main_quit() is called.
|
int
|
||||||
*/
|
main (int argc,
|
||||||
gtk_main ();
|
char **argv)
|
||||||
|
{
|
||||||
return 0;
|
GtkApplication *app;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
|
||||||
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
|
g_object_unref (app);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,5 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
/* This is a callback function. The data arguments are ignored
|
|
||||||
* in this example. More on callbacks below.
|
|
||||||
*/
|
|
||||||
static void
|
static void
|
||||||
print_hello (GtkWidget *widget,
|
print_hello (GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
@@ -10,95 +7,40 @@ print_hello (GtkWidget *widget,
|
|||||||
g_print ("Hello World\n");
|
g_print ("Hello World\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static void
|
||||||
on_delete_event (GtkWidget *widget,
|
activate (GtkApplication *app,
|
||||||
GdkEvent *event,
|
gpointer user_data)
|
||||||
gpointer data)
|
|
||||||
{
|
{
|
||||||
/* If you return FALSE in the "delete_event" signal handler,
|
GtkWidget *window;
|
||||||
* GTK will emit the "destroy" signal. Returning TRUE means
|
GtkWidget *button;
|
||||||
* you don't want the window to be destroyed.
|
GtkWidget *button_box;
|
||||||
*
|
|
||||||
* This is useful for popping up 'are you sure you want to quit?'
|
|
||||||
* type dialogs.
|
|
||||||
*/
|
|
||||||
|
|
||||||
g_print ("delete event occurred\n");
|
window = gtk_application_window_new (app);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (window), "Window");
|
||||||
|
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
|
||||||
|
|
||||||
return TRUE;
|
button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_container_add (GTK_CONTAINER (window), button_box);
|
||||||
|
|
||||||
|
button = gtk_button_new_with_label ("Hello World");
|
||||||
|
g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
|
||||||
|
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
||||||
|
gtk_container_add (GTK_CONTAINER (button_box), button);
|
||||||
|
|
||||||
|
gtk_widget_show_all (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc,
|
main (int argc,
|
||||||
char *argv[])
|
char **argv)
|
||||||
{
|
{
|
||||||
/* GtkWidget is the storage type for widgets */
|
GtkApplication *app;
|
||||||
GtkWidget *window;
|
int status;
|
||||||
GtkWidget *button;
|
|
||||||
|
|
||||||
/* This is called in all GTK applications. Arguments are parsed
|
app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
|
||||||
* from the command line and are returned to the application.
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
*/
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
gtk_init (&argc, &argv);
|
g_object_unref (app);
|
||||||
|
|
||||||
/* create a new window, and set its title */
|
return status;
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Hello");
|
|
||||||
|
|
||||||
/* When the window emits the "delete-event" signal (which is emitted
|
|
||||||
* by GTK+ in response to an event coming from the window manager,
|
|
||||||
* usually as a result of clicking the "close" window control), we
|
|
||||||
* ask it to call the on_delete_event() function as defined above.
|
|
||||||
*
|
|
||||||
* The data passed to the callback function is NULL and is ignored
|
|
||||||
* in the callback function.
|
|
||||||
*/
|
|
||||||
g_signal_connect (window, "delete-event", G_CALLBACK (on_delete_event), NULL);
|
|
||||||
|
|
||||||
/* Here we connect the "destroy" event to the gtk_main_quit() function.
|
|
||||||
*
|
|
||||||
* This signal is emitted when we call gtk_widget_destroy() on the window,
|
|
||||||
* or if we return FALSE in the "delete_event" callback.
|
|
||||||
*/
|
|
||||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
|
|
||||||
|
|
||||||
/* Sets the border width of the window. */
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
|
||||||
|
|
||||||
/* Creates a new button with the label "Hello World". */
|
|
||||||
button = gtk_button_new_with_label ("Hello World");
|
|
||||||
|
|
||||||
/* When the button receives the "clicked" signal, it will call the
|
|
||||||
* function print_hello() passing it NULL as its argument.
|
|
||||||
*
|
|
||||||
* The print_hello() function is defined above.
|
|
||||||
*/
|
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
|
|
||||||
|
|
||||||
/* The g_signal_connect_swapped() function will connect the "clicked" signal
|
|
||||||
* of the button to the gtk_widget_destroy() function; instead of calling it
|
|
||||||
* using the button as its argument, it will swap it with the user data
|
|
||||||
* argument. This will cause the window to be destroyed by calling
|
|
||||||
* gtk_widget_destroy() on the window.
|
|
||||||
*/
|
|
||||||
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
|
||||||
|
|
||||||
/* This packs the button into the window. A GtkWindow inherits from GtkBin,
|
|
||||||
* which is a special container that can only have one child
|
|
||||||
*/
|
|
||||||
gtk_container_add (GTK_CONTAINER (window), button);
|
|
||||||
|
|
||||||
/* The final step is to display this newly created widget... */
|
|
||||||
gtk_widget_show (button);
|
|
||||||
|
|
||||||
/* ... and the window */
|
|
||||||
gtk_widget_show (window);
|
|
||||||
|
|
||||||
/* All GTK applications must have a gtk_main(). Control ends here
|
|
||||||
* and waits for an event to occur (like a key press or a mouse event),
|
|
||||||
* until gtk_main_quit() is called.
|
|
||||||
*/
|
|
||||||
gtk_main ();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@@ -267,16 +267,19 @@ disable_plugin (const gchar *name)
|
|||||||
plugin_menu = find_plugin_menu ();
|
plugin_menu = find_plugin_menu ();
|
||||||
if (plugin_menu)
|
if (plugin_menu)
|
||||||
{
|
{
|
||||||
const gchar *id;
|
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; i < g_menu_model_get_n_items (plugin_menu); i++)
|
for (i = 0; i < g_menu_model_get_n_items (plugin_menu); i++)
|
||||||
{
|
{
|
||||||
if (g_menu_model_get_item_attribute (plugin_menu, i, "id", "s", &id) &&
|
gchar *id;
|
||||||
g_strcmp0 (id, name) == 0)
|
if (g_menu_model_get_item_attribute (plugin_menu, i, "id", "s", &id))
|
||||||
{
|
{
|
||||||
g_menu_remove (G_MENU (plugin_menu), i);
|
if (g_strcmp0 (id, name) == 0)
|
||||||
g_print ("Menus of '%s' plugin removed\n", name);
|
{
|
||||||
|
g_menu_remove (G_MENU (plugin_menu), i);
|
||||||
|
g_print ("Menus of '%s' plugin removed\n", name);
|
||||||
|
}
|
||||||
|
g_free (id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -356,7 +359,7 @@ configure_plugins (GSimpleAction *action,
|
|||||||
{
|
{
|
||||||
g_warning ("%s", error->message);
|
g_warning ("%s", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog = (GtkWidget *)gtk_builder_get_object (builder, "plugin-dialog");
|
dialog = (GtkWidget *)gtk_builder_get_object (builder, "plugin-dialog");
|
||||||
@@ -370,6 +373,9 @@ configure_plugins (GSimpleAction *action,
|
|||||||
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
||||||
|
|
||||||
gtk_window_present (GTK_WINDOW (dialog));
|
gtk_window_present (GTK_WINDOW (dialog));
|
||||||
|
|
||||||
|
out:
|
||||||
|
g_object_unref (builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GActionEntry app_entries[] = {
|
static GActionEntry app_entries[] = {
|
||||||
|
@@ -1,21 +1,28 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
int
|
static void
|
||||||
main (int argc,
|
activate (GtkApplication* app,
|
||||||
char *argv[])
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
|
|
||||||
gtk_init (&argc, &argv);
|
window = gtk_application_window_new (app);
|
||||||
|
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Window");
|
gtk_window_set_title (GTK_WINDOW (window), "Window");
|
||||||
|
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
|
||||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
|
gtk_widget_show_all (window);
|
||||||
|
}
|
||||||
gtk_widget_show (window);
|
|
||||||
|
int
|
||||||
gtk_main ();
|
main (int argc,
|
||||||
|
char **argv)
|
||||||
return 0;
|
{
|
||||||
|
GtkApplication *app;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
|
||||||
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
|
g_object_unref (app);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -61,6 +61,7 @@ LDADD = \
|
|||||||
#
|
#
|
||||||
gdk_public_h_sources = \
|
gdk_public_h_sources = \
|
||||||
gdk.h \
|
gdk.h \
|
||||||
|
gdk-autocleanup.h \
|
||||||
gdkapplaunchcontext.h \
|
gdkapplaunchcontext.h \
|
||||||
gdkcairo.h \
|
gdkcairo.h \
|
||||||
gdkcursor.h \
|
gdkcursor.h \
|
||||||
|
@@ -456,10 +456,11 @@ main (int argc, char *argv[])
|
|||||||
if (display == NULL)
|
if (display == NULL)
|
||||||
{
|
{
|
||||||
#ifdef G_OS_UNIX
|
#ifdef G_OS_UNIX
|
||||||
display = ":0";
|
if (g_unix_socket_address_abstract_names_supported ())
|
||||||
#else
|
display = ":0";
|
||||||
display = ":tcp";
|
else
|
||||||
#endif
|
#endif
|
||||||
|
display = ":tcp";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_str_has_prefix (display, ":tcp"))
|
if (g_str_has_prefix (display, ":tcp"))
|
||||||
|
@@ -110,10 +110,11 @@ _gdk_broadway_server_new (const char *display, GError **error)
|
|||||||
if (display == NULL)
|
if (display == NULL)
|
||||||
{
|
{
|
||||||
#ifdef G_OS_UNIX
|
#ifdef G_OS_UNIX
|
||||||
display = ":0";
|
if (g_unix_socket_address_abstract_names_supported ())
|
||||||
#else
|
display = ":0";
|
||||||
display = ":tcp";
|
else
|
||||||
#endif
|
#endif
|
||||||
|
display = ":tcp";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_str_has_prefix (display, ":tcp"))
|
if (g_str_has_prefix (display, ":tcp"))
|
||||||
@@ -544,13 +545,13 @@ map_named_shm (char *name, gsize size)
|
|||||||
|
|
||||||
#ifdef HAVE_POSIX_FALLOCATE
|
#ifdef HAVE_POSIX_FALLOCATE
|
||||||
res = posix_fallocate (fd, 0, size);
|
res = posix_fallocate (fd, 0, size);
|
||||||
if (res != 0)
|
if (res != 0 && errno == ENOSPC)
|
||||||
{
|
{
|
||||||
shm_unlink (name);
|
shm_unlink (name);
|
||||||
g_error ("Not enough shared memory for window surface");
|
g_error ("Not enough shared memory for window surface");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ptr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
ptr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||||
|
|
||||||
(void) close(fd);
|
(void) close(fd);
|
||||||
|
42
gdk/gdk-autocleanup.h
Normal file
42
gdk/gdk-autocleanup.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/* GTK - The GIMP Toolkit
|
||||||
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||||
|
#error "Only <gdk/gdk.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GI_SCANNER__
|
||||||
|
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkAppLaunchContext, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkCursor, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDevice, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDeviceManager, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDisplay, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDisplayManager, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDragContext, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkFrameClock, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkGLContext, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkKeymap, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkScreen, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkVisual, g_object_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkWindow, g_object_unref)
|
||||||
|
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkEvent, gdk_event_free)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkFrameTimings, gdk_frame_timings_unref)
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkRGBA, gdk_rgba_free)
|
||||||
|
|
||||||
|
#endif
|
@@ -62,6 +62,8 @@
|
|||||||
#include <gdk/deprecated/gdkcolor.h>
|
#include <gdk/deprecated/gdkcolor.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <gdk/gdk-autocleanup.h>
|
||||||
|
|
||||||
#undef __GDK_H_INSIDE__
|
#undef __GDK_H_INSIDE__
|
||||||
|
|
||||||
#endif /* __GDK_H__ */
|
#endif /* __GDK_H__ */
|
||||||
|
@@ -185,6 +185,9 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
|
|||||||
int n_channels;
|
int n_channels;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
|
if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
|
||||||
|
return;
|
||||||
|
|
||||||
/* This function can't just copy any pixbuf to any surface, be
|
/* This function can't just copy any pixbuf to any surface, be
|
||||||
* sure to read the invariants here before calling it */
|
* sure to read the invariants here before calling it */
|
||||||
|
|
||||||
|
114
gdk/gdkdevice.c
114
gdk/gdkdevice.c
@@ -86,7 +86,9 @@ enum {
|
|||||||
PROP_INPUT_SOURCE,
|
PROP_INPUT_SOURCE,
|
||||||
PROP_INPUT_MODE,
|
PROP_INPUT_MODE,
|
||||||
PROP_HAS_CURSOR,
|
PROP_HAS_CURSOR,
|
||||||
PROP_N_AXES
|
PROP_N_AXES,
|
||||||
|
PROP_VENDOR_ID,
|
||||||
|
PROP_PRODUCT_ID
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -236,6 +238,36 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
|||||||
P_("Number of axes in the device"),
|
P_("Number of axes in the device"),
|
||||||
0, G_MAXUINT, 0,
|
0, G_MAXUINT, 0,
|
||||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||||
|
/**
|
||||||
|
* GdkDevice:vendor-id:
|
||||||
|
*
|
||||||
|
* Vendor ID of this device, see gdk_device_get_vendor_id().
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_VENDOR_ID,
|
||||||
|
g_param_spec_string ("vendor-id",
|
||||||
|
P_("Vendor ID"),
|
||||||
|
P_("Vendor ID"),
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||||
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
/**
|
||||||
|
* GdkDevice:product-id:
|
||||||
|
*
|
||||||
|
* Product ID of this device, see gdk_device_get_product_id().
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_PRODUCT_ID,
|
||||||
|
g_param_spec_string ("product-id",
|
||||||
|
P_("Product ID"),
|
||||||
|
P_("Product ID"),
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||||
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GdkDevice::changed:
|
* GdkDevice::changed:
|
||||||
@@ -293,6 +325,9 @@ gdk_device_dispose (GObject *object)
|
|||||||
device->name = NULL;
|
device->name = NULL;
|
||||||
device->keys = NULL;
|
device->keys = NULL;
|
||||||
|
|
||||||
|
g_clear_pointer (&device->vendor_id, g_free);
|
||||||
|
g_clear_pointer (&device->product_id, g_free);
|
||||||
|
|
||||||
G_OBJECT_CLASS (gdk_device_parent_class)->dispose (object);
|
G_OBJECT_CLASS (gdk_device_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,6 +364,12 @@ gdk_device_set_property (GObject *object,
|
|||||||
case PROP_HAS_CURSOR:
|
case PROP_HAS_CURSOR:
|
||||||
device->has_cursor = g_value_get_boolean (value);
|
device->has_cursor = g_value_get_boolean (value);
|
||||||
break;
|
break;
|
||||||
|
case PROP_VENDOR_ID:
|
||||||
|
device->vendor_id = g_value_dup_string (value);
|
||||||
|
break;
|
||||||
|
case PROP_PRODUCT_ID:
|
||||||
|
device->product_id = g_value_dup_string (value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@@ -372,6 +413,12 @@ gdk_device_get_property (GObject *object,
|
|||||||
case PROP_N_AXES:
|
case PROP_N_AXES:
|
||||||
g_value_set_uint (value, device->axes->len);
|
g_value_set_uint (value, device->axes->len);
|
||||||
break;
|
break;
|
||||||
|
case PROP_VENDOR_ID:
|
||||||
|
g_value_set_string (value, device->vendor_id);
|
||||||
|
break;
|
||||||
|
case PROP_PRODUCT_ID:
|
||||||
|
g_value_set_string (value, device->product_id);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@@ -1757,3 +1804,68 @@ gdk_device_get_last_event_window (GdkDevice *device)
|
|||||||
|
|
||||||
return info->window_under_pointer;
|
return info->window_under_pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_device_get_vendor_id:
|
||||||
|
* @device: a slave #GdkDevice
|
||||||
|
*
|
||||||
|
* Returns the vendor ID of this device, or %NULL if this information couldn't
|
||||||
|
* be obtained. This ID is retrieved from the device, and is thus constant for
|
||||||
|
* it.
|
||||||
|
*
|
||||||
|
* This function, together with gdk_device_get_product_id(), can be used to eg.
|
||||||
|
* compose #GSettings paths to store settings for this device.
|
||||||
|
*
|
||||||
|
* |[<!-- language="C" -->
|
||||||
|
* static GSettings *
|
||||||
|
* get_device_settings (GdkDevice *device)
|
||||||
|
* {
|
||||||
|
* const gchar *vendor, *product;
|
||||||
|
* GSettings *settings;
|
||||||
|
* GdkDevice *device;
|
||||||
|
* gchar *path;
|
||||||
|
*
|
||||||
|
* vendor = gdk_device_get_vendor_id (device);
|
||||||
|
* product = gdk_device_get_product_id (device);
|
||||||
|
*
|
||||||
|
* path = g_strdup_printf ("/org/example/app/devices/%s:%s/", vendor, product);
|
||||||
|
* settings = g_settings_new_with_path (DEVICE_SCHEMA, path);
|
||||||
|
* g_free (path);
|
||||||
|
*
|
||||||
|
* return settings;
|
||||||
|
* }
|
||||||
|
* ]|
|
||||||
|
*
|
||||||
|
* Returns: (nullable): the vendor ID, or %NULL
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
const gchar *
|
||||||
|
gdk_device_get_vendor_id (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||||
|
g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER, NULL);
|
||||||
|
|
||||||
|
return device->vendor_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_device_get_product_id:
|
||||||
|
* @device: a slave #GdkDevice
|
||||||
|
*
|
||||||
|
* Returns the product ID of this device, or %NULL if this information couldn't
|
||||||
|
* be obtained. This ID is retrieved from the device, and is thus constant for
|
||||||
|
* it. See gdk_device_get_vendor_id() for more information.
|
||||||
|
*
|
||||||
|
* Returns: (nullable): the product ID, or %NULL
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
const gchar *
|
||||||
|
gdk_device_get_product_id (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||||
|
g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER, NULL);
|
||||||
|
|
||||||
|
return device->product_id;
|
||||||
|
}
|
||||||
|
@@ -274,6 +274,11 @@ gboolean gdk_device_grab_info_libgtk_only (GdkDisplay *display,
|
|||||||
GDK_AVAILABLE_IN_3_12
|
GDK_AVAILABLE_IN_3_12
|
||||||
GdkWindow *gdk_device_get_last_event_window (GdkDevice *device);
|
GdkWindow *gdk_device_get_last_event_window (GdkDevice *device);
|
||||||
|
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
const gchar *gdk_device_get_vendor_id (GdkDevice *device);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
const gchar *gdk_device_get_product_id (GdkDevice *device);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GDK_DEVICE_H__ */
|
#endif /* __GDK_DEVICE_H__ */
|
||||||
|
@@ -56,6 +56,9 @@ struct _GdkDevice
|
|||||||
GList *slaves;
|
GList *slaves;
|
||||||
GdkDeviceType type;
|
GdkDeviceType type;
|
||||||
GArray *axes;
|
GArray *axes;
|
||||||
|
|
||||||
|
gchar *vendor_id;
|
||||||
|
gchar *product_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkDeviceClass
|
struct _GdkDeviceClass
|
||||||
|
@@ -270,12 +270,12 @@ static GdkBackend gdk_backends[] = {
|
|||||||
#ifdef GDK_WINDOWING_WIN32
|
#ifdef GDK_WINDOWING_WIN32
|
||||||
{ "win32", _gdk_win32_display_open },
|
{ "win32", _gdk_win32_display_open },
|
||||||
#endif
|
#endif
|
||||||
#ifdef GDK_WINDOWING_X11
|
|
||||||
{ "x11", _gdk_x11_display_open },
|
|
||||||
#endif
|
|
||||||
#ifdef GDK_WINDOWING_WAYLAND
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
{ "wayland", _gdk_wayland_display_open },
|
{ "wayland", _gdk_wayland_display_open },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef GDK_WINDOWING_X11
|
||||||
|
{ "x11", _gdk_x11_display_open },
|
||||||
|
#endif
|
||||||
#ifdef GDK_WINDOWING_MIR
|
#ifdef GDK_WINDOWING_MIR
|
||||||
{ "mir", _gdk_mir_display_open },
|
{ "mir", _gdk_mir_display_open },
|
||||||
#endif
|
#endif
|
||||||
|
37
gdk/gdkgl.c
37
gdk/gdkgl.c
@@ -146,8 +146,8 @@ bind_vao (GdkGLContextPaintData *paint_data)
|
|||||||
static void
|
static void
|
||||||
use_texture_2d_program (GdkGLContextPaintData *paint_data)
|
use_texture_2d_program (GdkGLContextPaintData *paint_data)
|
||||||
{
|
{
|
||||||
const char *vertex_shader_code =
|
static const char *vertex_shader_code =
|
||||||
"#version 120\n"
|
"#version 150\n"
|
||||||
"uniform sampler2D map;"
|
"uniform sampler2D map;"
|
||||||
"attribute vec2 position;\n"
|
"attribute vec2 position;\n"
|
||||||
"attribute vec2 uv;\n"
|
"attribute vec2 uv;\n"
|
||||||
@@ -156,8 +156,8 @@ use_texture_2d_program (GdkGLContextPaintData *paint_data)
|
|||||||
" gl_Position = vec4(position, 0, 1);\n"
|
" gl_Position = vec4(position, 0, 1);\n"
|
||||||
" vUv = uv;\n"
|
" vUv = uv;\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
const char *fragment_shader_code =
|
static const char *fragment_shader_code =
|
||||||
"#version 120\n"
|
"#version 150\n"
|
||||||
"varying vec2 vUv;\n"
|
"varying vec2 vUv;\n"
|
||||||
"uniform sampler2D map;\n"
|
"uniform sampler2D map;\n"
|
||||||
"void main() {\n"
|
"void main() {\n"
|
||||||
@@ -177,8 +177,8 @@ use_texture_2d_program (GdkGLContextPaintData *paint_data)
|
|||||||
static void
|
static void
|
||||||
use_texture_rect_program (GdkGLContextPaintData *paint_data)
|
use_texture_rect_program (GdkGLContextPaintData *paint_data)
|
||||||
{
|
{
|
||||||
const char *vertex_shader_code =
|
static const char *vertex_shader_code =
|
||||||
"#version 120\n"
|
"#version 150\n"
|
||||||
"uniform sampler2DRect map;"
|
"uniform sampler2DRect map;"
|
||||||
"attribute vec2 position;\n"
|
"attribute vec2 position;\n"
|
||||||
"attribute vec2 uv;\n"
|
"attribute vec2 uv;\n"
|
||||||
@@ -187,8 +187,8 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data)
|
|||||||
" gl_Position = vec4(position, 0, 1);\n"
|
" gl_Position = vec4(position, 0, 1);\n"
|
||||||
" vUv = uv;\n"
|
" vUv = uv;\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
const char *fragment_shader_code =
|
static const char *fragment_shader_code =
|
||||||
"#version 120\n"
|
"#version 150\n"
|
||||||
"varying vec2 vUv;\n"
|
"varying vec2 vUv;\n"
|
||||||
"uniform sampler2DRect map;\n"
|
"uniform sampler2DRect map;\n"
|
||||||
"void main() {\n"
|
"void main() {\n"
|
||||||
@@ -235,8 +235,8 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
|
|||||||
glActiveTexture (GL_TEXTURE0);
|
glActiveTexture (GL_TEXTURE0);
|
||||||
glUniform1i(program->map_location, 0); /* Use texture unit 0 */
|
glUniform1i(program->map_location, 0); /* Use texture unit 0 */
|
||||||
|
|
||||||
glEnableVertexAttribArray (0);
|
glEnableVertexAttribArray (program->position_location);
|
||||||
glEnableVertexAttribArray (1);
|
glEnableVertexAttribArray (program->uv_location);
|
||||||
glBindBuffer (GL_ARRAY_BUFFER, paint_data->tmp_vertex_buffer);
|
glBindBuffer (GL_ARRAY_BUFFER, paint_data->tmp_vertex_buffer);
|
||||||
|
|
||||||
glVertexAttribPointer (program->position_location, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, NULL);
|
glVertexAttribPointer (program->position_location, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, NULL);
|
||||||
@@ -272,8 +272,8 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
|
|||||||
|
|
||||||
g_free (vertex_buffer_data);
|
g_free (vertex_buffer_data);
|
||||||
|
|
||||||
glDisableVertexAttribArray (0);
|
glDisableVertexAttribArray (program->position_location);
|
||||||
glDisableVertexAttribArray (1);
|
glDisableVertexAttribArray (program->uv_location);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* x,y,width,height describes a rectangle in the gl render buffer
|
/* x,y,width,height describes a rectangle in the gl render buffer
|
||||||
@@ -355,7 +355,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
|||||||
|
|
||||||
if (source_type == GL_RENDERBUFFER)
|
if (source_type == GL_RENDERBUFFER)
|
||||||
{
|
{
|
||||||
glBindRenderbufferEXT (GL_RENDERBUFFER_EXT, source);
|
glBindRenderbuffer (GL_RENDERBUFFER, source);
|
||||||
glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_ALPHA_SIZE, &alpha_size);
|
glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_ALPHA_SIZE, &alpha_size);
|
||||||
}
|
}
|
||||||
else if (source_type == GL_TEXTURE)
|
else if (source_type == GL_TEXTURE)
|
||||||
@@ -519,7 +519,6 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
|||||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
|
||||||
glEnable (GL_SCISSOR_TEST);
|
glEnable (GL_SCISSOR_TEST);
|
||||||
glEnable (GL_TEXTURE_2D);
|
|
||||||
|
|
||||||
gdk_window_get_unscaled_size (impl_window, NULL, &unscaled_window_height);
|
gdk_window_get_unscaled_size (impl_window, NULL, &unscaled_window_height);
|
||||||
|
|
||||||
@@ -587,8 +586,6 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
|||||||
if (alpha_size != 0)
|
if (alpha_size != 0)
|
||||||
glDisable (GL_BLEND);
|
glDisable (GL_BLEND);
|
||||||
|
|
||||||
glDisable (GL_TEXTURE_2D);
|
|
||||||
|
|
||||||
#undef FLIP_Y
|
#undef FLIP_Y
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -644,6 +641,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
|||||||
|
|
||||||
if (clip_region)
|
if (clip_region)
|
||||||
cairo_region_destroy (clip_region);
|
cairo_region_destroy (clip_region);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is always called with the paint context current */
|
/* This is always called with the paint context current */
|
||||||
@@ -664,7 +662,6 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
|||||||
float umax, vmax;
|
float umax, vmax;
|
||||||
gboolean use_texture_rectangle;
|
gboolean use_texture_rectangle;
|
||||||
guint target;
|
guint target;
|
||||||
|
|
||||||
paint_context = gdk_gl_context_get_current ();
|
paint_context = gdk_gl_context_get_current ();
|
||||||
if ((_gdk_gl_flags & GDK_GL_SOFTWARE_DRAW_SURFACE) == 0 &&
|
if ((_gdk_gl_flags & GDK_GL_SOFTWARE_DRAW_SURFACE) == 0 &&
|
||||||
paint_context &&
|
paint_context &&
|
||||||
@@ -692,7 +689,6 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
|||||||
target = GL_TEXTURE_2D;
|
target = GL_TEXTURE_2D;
|
||||||
|
|
||||||
glBindTexture (target, texture_id);
|
glBindTexture (target, texture_id);
|
||||||
glEnable (target);
|
|
||||||
glEnable (GL_SCISSOR_TEST);
|
glEnable (GL_SCISSOR_TEST);
|
||||||
|
|
||||||
glTexParameteri (target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
glTexParameteri (target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
@@ -720,8 +716,7 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
|||||||
e.height *= sy;
|
e.height *= sy;
|
||||||
image = cairo_surface_map_to_image (surface, &e);
|
image = cairo_surface_map_to_image (surface, &e);
|
||||||
|
|
||||||
/* We might have a different alignment, stride or format, so allow overriding here if needed */
|
gdk_gl_context_upload_texture (paint_context, image, e.width, e.height, target);
|
||||||
GDK_GL_CONTEXT_GET_CLASS (paint_context)->upload_texture (paint_context, image, e.width, e.height, target);
|
|
||||||
|
|
||||||
cairo_surface_unmap_image (surface, image);
|
cairo_surface_unmap_image (surface, image);
|
||||||
|
|
||||||
@@ -750,8 +745,8 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef FLIP_Y
|
||||||
|
|
||||||
glDisable (GL_SCISSOR_TEST);
|
glDisable (GL_SCISSOR_TEST);
|
||||||
glDisable (target);
|
|
||||||
glDeleteTextures (1, &texture_id);
|
glDeleteTextures (1, &texture_id);
|
||||||
}
|
}
|
||||||
|
@@ -49,6 +49,14 @@
|
|||||||
* #GdkWindow, which you typically get during the realize call
|
* #GdkWindow, which you typically get during the realize call
|
||||||
* of a widget.
|
* of a widget.
|
||||||
*
|
*
|
||||||
|
* A #GdkGLContext is not realized until either gdk_gl_context_make_current(),
|
||||||
|
* or until it is realized using gdk_gl_context_realize(). It is possible to
|
||||||
|
* specify details of the GL context like the OpenGL version to be used, or
|
||||||
|
* whether the GL context should have extra state validation enabled after
|
||||||
|
* calling gdk_window_create_gl_context() by calling gdk_gl_context_realize().
|
||||||
|
* If the realization fails you have the option to change the settings of the
|
||||||
|
* #GdkGLContext and try again.
|
||||||
|
*
|
||||||
* ## Using a GdkGLContext ##
|
* ## Using a GdkGLContext ##
|
||||||
*
|
*
|
||||||
* You will need to make the #GdkGLContext the current context
|
* You will need to make the #GdkGLContext the current context
|
||||||
@@ -83,12 +91,18 @@ typedef struct {
|
|||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
GdkGLContext *shared_context;
|
GdkGLContext *shared_context;
|
||||||
GdkGLProfile profile;
|
|
||||||
|
int major;
|
||||||
|
int minor;
|
||||||
|
int gl_version;
|
||||||
|
|
||||||
guint realized : 1;
|
guint realized : 1;
|
||||||
guint use_texture_rectangle : 1;
|
guint use_texture_rectangle : 1;
|
||||||
guint has_gl_framebuffer_blit : 1;
|
guint has_gl_framebuffer_blit : 1;
|
||||||
guint has_frame_terminator : 1;
|
guint has_frame_terminator : 1;
|
||||||
|
guint extensions_checked : 1;
|
||||||
|
guint debug_enabled : 1;
|
||||||
|
guint forward_compatible : 1;
|
||||||
|
|
||||||
GdkGLContextPaintData *paint_data;
|
GdkGLContextPaintData *paint_data;
|
||||||
} GdkGLContextPrivate;
|
} GdkGLContextPrivate;
|
||||||
@@ -98,7 +112,6 @@ enum {
|
|||||||
|
|
||||||
PROP_DISPLAY,
|
PROP_DISPLAY,
|
||||||
PROP_WINDOW,
|
PROP_WINDOW,
|
||||||
PROP_PROFILE,
|
|
||||||
PROP_SHARED_CONTEXT,
|
PROP_SHARED_CONTEXT,
|
||||||
|
|
||||||
LAST_PROP
|
LAST_PROP
|
||||||
@@ -186,10 +199,6 @@ gdk_gl_context_set_property (GObject *gobject,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PROFILE:
|
|
||||||
priv->profile = g_value_get_enum (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||||
}
|
}
|
||||||
@@ -217,17 +226,12 @@ gdk_gl_context_get_property (GObject *gobject,
|
|||||||
g_value_set_object (value, priv->shared_context);
|
g_value_set_object (value, priv->shared_context);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PROFILE:
|
|
||||||
g_value_set_enum (value, priv->profile);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Default implementation of upload_texture() for gdk_gl_texture_from_surface() */
|
void
|
||||||
static void
|
|
||||||
gdk_gl_context_upload_texture (GdkGLContext *context,
|
gdk_gl_context_upload_texture (GdkGLContext *context,
|
||||||
cairo_surface_t *image_surface,
|
cairo_surface_t *image_surface,
|
||||||
int width,
|
int width,
|
||||||
@@ -238,7 +242,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
|
|||||||
|
|
||||||
glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
|
glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
|
||||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, cairo_image_surface_get_stride (image_surface)/4);
|
glPixelStorei (GL_UNPACK_ROW_LENGTH, cairo_image_surface_get_stride (image_surface)/4);
|
||||||
glTexImage2D (texture_target, 0, 4, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||||
cairo_image_surface_get_data (image_surface));
|
cairo_image_surface_get_data (image_surface));
|
||||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
|
glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
|
||||||
}
|
}
|
||||||
@@ -280,23 +284,6 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
|
|||||||
G_PARAM_CONSTRUCT_ONLY |
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
G_PARAM_STATIC_STRINGS);
|
G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
/**
|
|
||||||
* GdkGLContext:profile:
|
|
||||||
*
|
|
||||||
* The #GdkGLProfile of the context
|
|
||||||
*
|
|
||||||
* Since: 3.16
|
|
||||||
*/
|
|
||||||
obj_pspecs[PROP_PROFILE] =
|
|
||||||
g_param_spec_enum ("profile",
|
|
||||||
P_("Profile"),
|
|
||||||
P_("The GL profile the context was created for"),
|
|
||||||
GDK_TYPE_GL_PROFILE,
|
|
||||||
GDK_GL_PROFILE_DEFAULT,
|
|
||||||
G_PARAM_READWRITE |
|
|
||||||
G_PARAM_CONSTRUCT_ONLY |
|
|
||||||
G_PARAM_STATIC_STRINGS);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GdkGLContext:shared-context:
|
* GdkGLContext:shared-context:
|
||||||
*
|
*
|
||||||
@@ -318,9 +305,6 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
|
|||||||
gobject_class->dispose = gdk_gl_context_dispose;
|
gobject_class->dispose = gdk_gl_context_dispose;
|
||||||
gobject_class->finalize = gdk_gl_context_finalize;
|
gobject_class->finalize = gdk_gl_context_finalize;
|
||||||
|
|
||||||
/* Default Implementation of upload_texture() for gdk_gl_texture_from_surface() */
|
|
||||||
klass->upload_texture = gdk_gl_context_upload_texture;
|
|
||||||
|
|
||||||
g_object_class_install_properties (gobject_class, LAST_PROP, obj_pspecs);
|
g_object_class_install_properties (gobject_class, LAST_PROP, obj_pspecs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,19 +373,237 @@ gdk_gl_context_has_frame_terminator (GdkGLContext *context)
|
|||||||
return priv->has_frame_terminator;
|
return priv->has_frame_terminator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_gl_context_set_debug_enabled:
|
||||||
|
* @context: a #GdkGLContext
|
||||||
|
* @enabled: whether to enable debugging in the context
|
||||||
|
*
|
||||||
|
* Sets whether the #GdkGLContext should perform extra validations and
|
||||||
|
* run time checking. This is useful during development, but has
|
||||||
|
* additional overhead.
|
||||||
|
*
|
||||||
|
* The #GdkGLContext must not be realized or made current prior to
|
||||||
|
* calling this function.
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_gl_context_set_debug_enabled (GdkGLContext *context,
|
||||||
|
gboolean enabled)
|
||||||
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
|
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
||||||
|
g_return_if_fail (!priv->realized);
|
||||||
|
|
||||||
|
enabled = !!enabled;
|
||||||
|
|
||||||
|
priv->debug_enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_gl_context_get_debug_enabled:
|
||||||
|
* @context: a #GdkGLContext
|
||||||
|
*
|
||||||
|
* Retrieves the value set using gdk_gl_context_set_debug_enabled().
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if debugging is enabled
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gdk_gl_context_get_debug_enabled (GdkGLContext *context)
|
||||||
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
|
||||||
|
|
||||||
|
return priv->debug_enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_gl_context_set_forward_compatible:
|
||||||
|
* @context: a #GdkGLContext
|
||||||
|
* @compatible: whether the context should be forward compatible
|
||||||
|
*
|
||||||
|
* Sets whether the #GdkGLContext should be forward compatible.
|
||||||
|
*
|
||||||
|
* Forward compatibile contexts must not support OpenGL functionality that
|
||||||
|
* has been marked as deprecated in the requested version; non-forward
|
||||||
|
* compatible contexts, on the other hand, must support both deprecated and
|
||||||
|
* non deprecated functionality.
|
||||||
|
*
|
||||||
|
* The #GdkGLContext must not be realized or made current prior to calling
|
||||||
|
* this function.
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_gl_context_set_forward_compatible (GdkGLContext *context,
|
||||||
|
gboolean compatible)
|
||||||
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
|
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
||||||
|
g_return_if_fail (!priv->realized);
|
||||||
|
|
||||||
|
compatible = !!compatible;
|
||||||
|
|
||||||
|
priv->forward_compatible = compatible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_gl_context_get_forward_compatible:
|
||||||
|
* @context: a #GdkGLContext
|
||||||
|
*
|
||||||
|
* Retrieves the value set using gdk_gl_context_set_forward_compatible().
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if the context should be forward compatible
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gdk_gl_context_get_forward_compatible (GdkGLContext *context)
|
||||||
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
|
||||||
|
|
||||||
|
return priv->forward_compatible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_gl_context_set_required_version:
|
||||||
|
* @context: a #GdkGLContext
|
||||||
|
* @major: the major version to request
|
||||||
|
* @minor: the minor version to request
|
||||||
|
*
|
||||||
|
* Sets the major and minor version of OpenGL to request.
|
||||||
|
*
|
||||||
|
* Setting @major and @minor to zero will use the default values.
|
||||||
|
*
|
||||||
|
* The #GdkGLContext must not be realized or made current prior to calling
|
||||||
|
* this function.
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_gl_context_set_required_version (GdkGLContext *context,
|
||||||
|
int major,
|
||||||
|
int minor)
|
||||||
|
{
|
||||||
|
int version;
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
|
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
||||||
|
g_return_if_fail (!priv->realized);
|
||||||
|
|
||||||
|
/* this will take care of the default */
|
||||||
|
if (major == 0 && minor == 0)
|
||||||
|
{
|
||||||
|
priv->major = 0;
|
||||||
|
priv->minor = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Enforce a minimum context version number of 3.2 */
|
||||||
|
version = (major * 100) + minor;
|
||||||
|
if (version < 302)
|
||||||
|
{
|
||||||
|
g_warning ("gdk_gl_context_set_required_version - GL context versions less than 3.2 are not supported.");
|
||||||
|
version = 302;
|
||||||
|
}
|
||||||
|
priv->major = version / 100;
|
||||||
|
priv->minor = version % 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_gl_context_get_required_version:
|
||||||
|
* @context: a #GdkGLContext
|
||||||
|
* @major: (out) (nullable): return location for the major version to request
|
||||||
|
* @minor: (out) (nullable): return location for the minor version to request
|
||||||
|
*
|
||||||
|
* Retrieves the major and minor version requested by calling
|
||||||
|
* gdk_gl_context_set_required_version().
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_gl_context_get_required_version (GdkGLContext *context,
|
||||||
|
int *major,
|
||||||
|
int *minor)
|
||||||
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
int maj, min;
|
||||||
|
|
||||||
|
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
||||||
|
|
||||||
|
if (priv->major > 0)
|
||||||
|
maj = priv->major;
|
||||||
|
else
|
||||||
|
maj = 3;
|
||||||
|
|
||||||
|
if (priv->minor > 0)
|
||||||
|
min = priv->minor;
|
||||||
|
else
|
||||||
|
min = 2;
|
||||||
|
|
||||||
|
if (major != NULL)
|
||||||
|
*major = maj;
|
||||||
|
if (minor != NULL)
|
||||||
|
*minor = min;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_gl_context_realize:
|
||||||
|
* @context: a #GdkGLContext
|
||||||
|
* @error: return location for a #GError
|
||||||
|
*
|
||||||
|
* Realizes the given #GdkGLContext.
|
||||||
|
*
|
||||||
|
* It is safe to call this function on a realized #GdkGLContext.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if the context is realized
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gdk_gl_context_realize (GdkGLContext *context,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
|
||||||
|
|
||||||
|
if (priv->realized)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
priv->realized = GDK_GL_CONTEXT_GET_CLASS (context)->realize (context, error);
|
||||||
|
|
||||||
|
return priv->realized;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_gl_context_realize (GdkGLContext *context)
|
gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||||
{
|
{
|
||||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
gboolean has_npot, has_texture_rectangle;
|
gboolean has_npot, has_texture_rectangle;
|
||||||
|
|
||||||
|
if (!priv->realized)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (priv->extensions_checked)
|
||||||
|
return;
|
||||||
|
|
||||||
|
priv->gl_version = epoxy_gl_version ();
|
||||||
|
|
||||||
has_npot = epoxy_has_gl_extension ("GL_ARB_texture_non_power_of_two");
|
has_npot = epoxy_has_gl_extension ("GL_ARB_texture_non_power_of_two");
|
||||||
has_texture_rectangle = epoxy_has_gl_extension ("GL_ARB_texture_rectangle");
|
has_texture_rectangle = epoxy_has_gl_extension ("GL_ARB_texture_rectangle");
|
||||||
|
|
||||||
priv->has_gl_framebuffer_blit = epoxy_has_gl_extension ("GL_EXT_framebuffer_blit");
|
priv->has_gl_framebuffer_blit = epoxy_has_gl_extension ("GL_EXT_framebuffer_blit");
|
||||||
priv->has_frame_terminator = epoxy_has_gl_extension ("GL_GREMEDY_frame_terminator");
|
priv->has_frame_terminator = epoxy_has_gl_extension ("GL_GREMEDY_frame_terminator");
|
||||||
|
|
||||||
if (_gdk_gl_flags & GDK_GL_TEXTURE_RECTANGLE)
|
if (G_UNLIKELY (_gdk_gl_flags & GDK_GL_TEXTURE_RECTANGLE))
|
||||||
priv->use_texture_rectangle = TRUE;
|
priv->use_texture_rectangle = TRUE;
|
||||||
else if (has_npot)
|
else if (has_npot)
|
||||||
priv->use_texture_rectangle = FALSE;
|
priv->use_texture_rectangle = FALSE;
|
||||||
@@ -410,7 +612,22 @@ gdk_gl_context_realize (GdkGLContext *context)
|
|||||||
else
|
else
|
||||||
g_warning ("GL implementation doesn't support any form of non-power-of-two textures");
|
g_warning ("GL implementation doesn't support any form of non-power-of-two textures");
|
||||||
|
|
||||||
priv->realized = TRUE;
|
GDK_NOTE (OPENGL,
|
||||||
|
g_print ("OpenGL version: %d.%d\n"
|
||||||
|
"Extensions checked:\n"
|
||||||
|
" - GL_ARB_texture_non_power_of_two: %s\n"
|
||||||
|
" - GL_ARB_texture_rectangle: %s\n"
|
||||||
|
" - GL_EXT_framebuffer_blit: %s\n"
|
||||||
|
" - GL_GREMEDY_frame_terminator: %s\n"
|
||||||
|
"Using texture rectangle: %s\n",
|
||||||
|
priv->gl_version / 10, priv->gl_version % 10,
|
||||||
|
has_npot ? "yes" : "no",
|
||||||
|
has_texture_rectangle ? "yes" : "no",
|
||||||
|
priv->has_gl_framebuffer_blit ? "yes" : "no",
|
||||||
|
priv->has_frame_terminator ? "yes" : "no",
|
||||||
|
priv->use_texture_rectangle ? "yes" : "no"));
|
||||||
|
|
||||||
|
priv->extensions_checked = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -433,11 +650,24 @@ gdk_gl_context_make_current (GdkGLContext *context)
|
|||||||
if (current == context)
|
if (current == context)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* we need to realize the GdkGLContext if it wasn't explicitly realized */
|
||||||
|
if (!priv->realized)
|
||||||
|
{
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
gdk_gl_context_realize (context, &error);
|
||||||
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
g_critical ("Could not realize the GL context: %s", error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (gdk_display_make_gl_context_current (priv->display, context))
|
if (gdk_display_make_gl_context_current (priv->display, context))
|
||||||
{
|
{
|
||||||
g_private_replace (&thread_current_context, g_object_ref (context));
|
g_private_replace (&thread_current_context, g_object_ref (context));
|
||||||
if (!priv->realized)
|
gdk_gl_context_check_extensions (context);
|
||||||
gdk_gl_context_realize (context);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,26 +711,6 @@ gdk_gl_context_get_window (GdkGLContext *context)
|
|||||||
return priv->window;
|
return priv->window;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gdk_gl_context_get_profile:
|
|
||||||
* @context: a #GdkGLContext
|
|
||||||
*
|
|
||||||
* Retrieves the #GdkGLProfile that @context was created for.
|
|
||||||
*
|
|
||||||
* Returns: a #GdkGLProfile
|
|
||||||
*
|
|
||||||
* Since: 3.16
|
|
||||||
*/
|
|
||||||
GdkGLProfile
|
|
||||||
gdk_gl_context_get_profile (GdkGLContext *context)
|
|
||||||
{
|
|
||||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
|
||||||
|
|
||||||
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), GDK_GL_PROFILE_LEGACY);
|
|
||||||
|
|
||||||
return priv->profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_gl_context_get_shared_context:
|
* gdk_gl_context_get_shared_context:
|
||||||
* @context: a #GdkGLContext
|
* @context: a #GdkGLContext
|
||||||
@@ -521,6 +731,34 @@ gdk_gl_context_get_shared_context (GdkGLContext *context)
|
|||||||
return priv->shared_context;
|
return priv->shared_context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_gl_context_get_version:
|
||||||
|
* @context: a #GdkGLContext
|
||||||
|
* @major: (out): return location for the major version
|
||||||
|
* @minor: (out): return location for the minor version
|
||||||
|
*
|
||||||
|
* Retrieves the OpenGL version of the @context.
|
||||||
|
*
|
||||||
|
* The @context must be realized prior to calling this function.
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_gl_context_get_version (GdkGLContext *context,
|
||||||
|
int *major,
|
||||||
|
int *minor)
|
||||||
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
|
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
||||||
|
g_return_if_fail (priv->realized);
|
||||||
|
|
||||||
|
if (major != NULL)
|
||||||
|
*major = priv->gl_version / 10;
|
||||||
|
if (minor != NULL)
|
||||||
|
*minor = priv->gl_version % 10;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_gl_context_clear_current:
|
* gdk_gl_context_clear_current:
|
||||||
*
|
*
|
||||||
|
@@ -43,18 +43,44 @@ GDK_AVAILABLE_IN_3_16
|
|||||||
GType gdk_gl_context_get_type (void) G_GNUC_CONST;
|
GType gdk_gl_context_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
GdkDisplay * gdk_gl_context_get_display (GdkGLContext *context);
|
GdkDisplay * gdk_gl_context_get_display (GdkGLContext *context);
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
GdkWindow * gdk_gl_context_get_window (GdkGLContext *context);
|
GdkWindow * gdk_gl_context_get_window (GdkGLContext *context);
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
GdkGLProfile gdk_gl_context_get_profile (GdkGLContext *context);
|
GdkGLContext * gdk_gl_context_get_shared_context (GdkGLContext *context);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
void gdk_gl_context_get_version (GdkGLContext *context,
|
||||||
|
int *major,
|
||||||
|
int *minor);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
void gdk_gl_context_make_current (GdkGLContext *context);
|
void gdk_gl_context_set_required_version (GdkGLContext *context,
|
||||||
|
int major,
|
||||||
|
int minor);
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
GdkGLContext * gdk_gl_context_get_current (void);
|
void gdk_gl_context_get_required_version (GdkGLContext *context,
|
||||||
|
int *major,
|
||||||
|
int *minor);
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
void gdk_gl_context_clear_current (void);
|
void gdk_gl_context_set_debug_enabled (GdkGLContext *context,
|
||||||
|
gboolean enabled);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
gboolean gdk_gl_context_get_debug_enabled (GdkGLContext *context);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
void gdk_gl_context_set_forward_compatible (GdkGLContext *context,
|
||||||
|
gboolean compatible);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context);
|
||||||
|
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
gboolean gdk_gl_context_realize (GdkGLContext *context,
|
||||||
|
GError **error);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
void gdk_gl_context_make_current (GdkGLContext *context);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
GdkGLContext * gdk_gl_context_get_current (void);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
void gdk_gl_context_clear_current (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -40,17 +40,15 @@ struct _GdkGLContextClass
|
|||||||
{
|
{
|
||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
|
|
||||||
|
gboolean (* realize) (GdkGLContext *context,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
void (* end_frame) (GdkGLContext *context,
|
void (* end_frame) (GdkGLContext *context,
|
||||||
cairo_region_t *painted,
|
cairo_region_t *painted,
|
||||||
cairo_region_t *damage);
|
cairo_region_t *damage);
|
||||||
gboolean (* texture_from_surface) (GdkGLContext *context,
|
gboolean (* texture_from_surface) (GdkGLContext *context,
|
||||||
cairo_surface_t *surface,
|
cairo_surface_t *surface,
|
||||||
cairo_region_t *region);
|
cairo_region_t *region);
|
||||||
void (* upload_texture) (GdkGLContext *context,
|
|
||||||
cairo_surface_t *image_surface,
|
|
||||||
int width,
|
|
||||||
int height,
|
|
||||||
guint texture_target);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -71,13 +69,18 @@ typedef struct {
|
|||||||
GdkGLContextProgram *current_program;
|
GdkGLContextProgram *current_program;
|
||||||
} GdkGLContextPaintData;
|
} GdkGLContextPaintData;
|
||||||
|
|
||||||
GdkGLContextPaintData *gdk_gl_context_get_paint_data (GdkGLContext *context);
|
void gdk_gl_context_upload_texture (GdkGLContext *context,
|
||||||
gboolean gdk_gl_context_use_texture_rectangle (GdkGLContext *context);
|
cairo_surface_t *image_surface,
|
||||||
gboolean gdk_gl_context_has_framebuffer_blit (GdkGLContext *context);
|
int width,
|
||||||
gboolean gdk_gl_context_has_frame_terminator (GdkGLContext *context);
|
int height,
|
||||||
void gdk_gl_context_end_frame (GdkGLContext *context,
|
guint texture_target);
|
||||||
cairo_region_t *painted,
|
GdkGLContextPaintData * gdk_gl_context_get_paint_data (GdkGLContext *context);
|
||||||
cairo_region_t *damage);
|
gboolean gdk_gl_context_use_texture_rectangle (GdkGLContext *context);
|
||||||
|
gboolean gdk_gl_context_has_framebuffer_blit (GdkGLContext *context);
|
||||||
|
gboolean gdk_gl_context_has_frame_terminator (GdkGLContext *context);
|
||||||
|
void gdk_gl_context_end_frame (GdkGLContext *context,
|
||||||
|
cairo_region_t *painted,
|
||||||
|
cairo_region_t *damage);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -333,6 +333,7 @@ struct _GdkWindow
|
|||||||
guint in_update : 1;
|
guint in_update : 1;
|
||||||
guint geometry_dirty : 1;
|
guint geometry_dirty : 1;
|
||||||
guint event_compression : 1;
|
guint event_compression : 1;
|
||||||
|
guint frame_clock_events_paused : 1;
|
||||||
|
|
||||||
/* The GdkWindow that has the impl, ref:ed if another window.
|
/* The GdkWindow that has the impl, ref:ed if another window.
|
||||||
* This ref is required to keep the wrapper of the impl window alive
|
* This ref is required to keep the wrapper of the impl window alive
|
||||||
|
@@ -372,6 +372,9 @@ typedef enum
|
|||||||
* Most of these masks map onto one or more of the #GdkEventType event types
|
* Most of these masks map onto one or more of the #GdkEventType event types
|
||||||
* above.
|
* above.
|
||||||
*
|
*
|
||||||
|
* See the [input handling overview][chap-input-handling] for details of
|
||||||
|
* [event masks][event-masks] and [event propagation][event-propagation].
|
||||||
|
*
|
||||||
* %GDK_POINTER_MOTION_HINT_MASK is deprecated. It is a special mask
|
* %GDK_POINTER_MOTION_HINT_MASK is deprecated. It is a special mask
|
||||||
* to reduce the number of %GDK_MOTION_NOTIFY events received. When using
|
* to reduce the number of %GDK_MOTION_NOTIFY events received. When using
|
||||||
* %GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will
|
* %GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will
|
||||||
@@ -434,19 +437,15 @@ struct _GdkPoint
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GdkGLProfile:
|
* GdkGLError:
|
||||||
* @GDK_GL_PROFILE_DEFAULT: ...
|
* @GDK_GL_ERROR_NOT_AVAILABLE: OpenGL support is not available
|
||||||
* @GDK_GL_PROFILE_LEGACY: ...
|
* @GDK_GL_ERROR_UNSUPPORTED_FORMAT: The requested visual format is not supported
|
||||||
* @GDK_GL_PROFILE_3_2_CORE: ...
|
* @GDK_GL_ERROR_UNSUPPORTED_PROFILE: The requested profile is not supported
|
||||||
*
|
*
|
||||||
* ...
|
* Error enumeration for #GdkGLContext.
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
|
||||||
GDK_GL_PROFILE_DEFAULT,
|
|
||||||
GDK_GL_PROFILE_LEGACY,
|
|
||||||
GDK_GL_PROFILE_3_2_CORE
|
|
||||||
} GdkGLProfile;
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GDK_GL_ERROR_NOT_AVAILABLE,
|
GDK_GL_ERROR_NOT_AVAILABLE,
|
||||||
GDK_GL_ERROR_UNSUPPORTED_FORMAT,
|
GDK_GL_ERROR_UNSUPPORTED_FORMAT,
|
||||||
|
@@ -1110,6 +1110,9 @@ find_native_sibling_above (GdkWindow *parent,
|
|||||||
{
|
{
|
||||||
GdkWindow *w;
|
GdkWindow *w;
|
||||||
|
|
||||||
|
if (!parent)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
w = find_native_sibling_above_helper (parent, child);
|
w = find_native_sibling_above_helper (parent, child);
|
||||||
if (w)
|
if (w)
|
||||||
return w;
|
return w;
|
||||||
@@ -2724,8 +2727,11 @@ gdk_window_ref_impl_surface (GdkWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GdkGLContext *
|
GdkGLContext *
|
||||||
gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
|
gdk_window_get_paint_gl_context (GdkWindow *window,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
|
GError *internal_error = NULL;
|
||||||
|
|
||||||
if (_gdk_gl_flags & GDK_GL_DISABLE)
|
if (_gdk_gl_flags & GDK_GL_DISABLE)
|
||||||
{
|
{
|
||||||
g_set_error_literal (error, GDK_GL_ERROR,
|
g_set_error_literal (error, GDK_GL_ERROR,
|
||||||
@@ -2737,23 +2743,25 @@ gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
|
|||||||
if (window->impl_window->gl_paint_context == NULL)
|
if (window->impl_window->gl_paint_context == NULL)
|
||||||
{
|
{
|
||||||
window->impl_window->gl_paint_context =
|
window->impl_window->gl_paint_context =
|
||||||
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window,
|
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window->impl_window,
|
||||||
TRUE,
|
TRUE,
|
||||||
GDK_GL_PROFILE_3_2_CORE,
|
|
||||||
NULL,
|
NULL,
|
||||||
error);
|
&internal_error);
|
||||||
if (window->impl_window->gl_paint_context == NULL &&
|
}
|
||||||
g_error_matches (*error, GDK_GL_ERROR,
|
|
||||||
GDK_GL_ERROR_UNSUPPORTED_PROFILE))
|
if (internal_error != NULL)
|
||||||
{
|
{
|
||||||
g_clear_error (error);
|
g_propagate_error (error, internal_error);
|
||||||
window->impl_window->gl_paint_context =
|
g_clear_object (&(window->impl_window->gl_paint_context));
|
||||||
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window,
|
return NULL;
|
||||||
TRUE,
|
}
|
||||||
GDK_GL_PROFILE_DEFAULT,
|
|
||||||
NULL,
|
gdk_gl_context_realize (window->impl_window->gl_paint_context, &internal_error);
|
||||||
error);
|
if (internal_error != NULL)
|
||||||
}
|
{
|
||||||
|
g_propagate_error (error, internal_error);
|
||||||
|
g_clear_object (&(window->impl_window->gl_paint_context));
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return window->impl_window->gl_paint_context;
|
return window->impl_window->gl_paint_context;
|
||||||
@@ -2762,7 +2770,6 @@ gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
|
|||||||
/**
|
/**
|
||||||
* gdk_window_create_gl_context:
|
* gdk_window_create_gl_context:
|
||||||
* @window: a #GdkWindow
|
* @window: a #GdkWindow
|
||||||
* @profile: the GL profile the context should target
|
|
||||||
* @error: return location for an error
|
* @error: return location for an error
|
||||||
*
|
*
|
||||||
* Creates a new #GdkGLContext matching the
|
* Creates a new #GdkGLContext matching the
|
||||||
@@ -2771,6 +2778,9 @@ gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
|
|||||||
*
|
*
|
||||||
* If the creation of the #GdkGLContext failed, @error will be set.
|
* If the creation of the #GdkGLContext failed, @error will be set.
|
||||||
*
|
*
|
||||||
|
* Before using the returned #GdkGLContext, you will need to
|
||||||
|
* call gdk_gl_context_make_current() or gdk_gl_context_realize().
|
||||||
|
*
|
||||||
* Returns: (transfer full): the newly created #GdkGLContext, or
|
* Returns: (transfer full): the newly created #GdkGLContext, or
|
||||||
* %NULL on error
|
* %NULL on error
|
||||||
*
|
*
|
||||||
@@ -2778,7 +2788,6 @@ gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
|
|||||||
**/
|
**/
|
||||||
GdkGLContext *
|
GdkGLContext *
|
||||||
gdk_window_create_gl_context (GdkWindow *window,
|
gdk_window_create_gl_context (GdkWindow *window,
|
||||||
GdkGLProfile profile,
|
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GdkGLContext *paint_context;
|
GdkGLContext *paint_context;
|
||||||
@@ -2790,9 +2799,8 @@ gdk_window_create_gl_context (GdkWindow *window,
|
|||||||
if (paint_context == NULL)
|
if (paint_context == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window,
|
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window->impl_window,
|
||||||
FALSE,
|
FALSE,
|
||||||
profile,
|
|
||||||
paint_context,
|
paint_context,
|
||||||
error);
|
error);
|
||||||
}
|
}
|
||||||
@@ -2932,7 +2940,6 @@ gdk_window_begin_paint_region (GdkWindow *window,
|
|||||||
glDisable (GL_DEPTH_TEST);
|
glDisable (GL_DEPTH_TEST);
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
|
||||||
|
|
||||||
glViewport (0, 0, ww, wh);
|
glViewport (0, 0, ww, wh);
|
||||||
}
|
}
|
||||||
@@ -3901,10 +3908,10 @@ gdk_window_process_updates (GdkWindow *window,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
|
|
||||||
return gdk_window_process_updates_with_mode (window,
|
gdk_window_process_updates_with_mode (window,
|
||||||
update_children ?
|
update_children ?
|
||||||
PROCESS_UPDATES_WITH_ALL_CHILDREN :
|
PROCESS_UPDATES_WITH_ALL_CHILDREN :
|
||||||
PROCESS_UPDATES_NO_RECURSE);
|
PROCESS_UPDATES_NO_RECURSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -4661,6 +4668,8 @@ gdk_window_get_device_position_double (GdkWindow *window,
|
|||||||
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||||
g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, NULL);
|
g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, NULL);
|
||||||
|
|
||||||
|
tmp_x = tmp_y = 0;
|
||||||
|
tmp_mask = 0;
|
||||||
normal_child = GDK_WINDOW_IMPL_GET_CLASS (window->impl)->get_device_state (window,
|
normal_child = GDK_WINDOW_IMPL_GET_CLASS (window->impl)->get_device_state (window,
|
||||||
device,
|
device,
|
||||||
&tmp_x, &tmp_y,
|
&tmp_x, &tmp_y,
|
||||||
@@ -5419,6 +5428,8 @@ gdk_window_withdraw (GdkWindow *window)
|
|||||||
* including #GDK_BUTTON_PRESS_MASK means the window should report button
|
* including #GDK_BUTTON_PRESS_MASK means the window should report button
|
||||||
* press events. The event mask is the bitwise OR of values from the
|
* press events. The event mask is the bitwise OR of values from the
|
||||||
* #GdkEventMask enumeration.
|
* #GdkEventMask enumeration.
|
||||||
|
*
|
||||||
|
* See the [input handling overview][event-masks] for details.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gdk_window_set_events (GdkWindow *window,
|
gdk_window_set_events (GdkWindow *window,
|
||||||
@@ -5489,6 +5500,8 @@ gdk_window_get_events (GdkWindow *window)
|
|||||||
* press events. The event mask is the bitwise OR of values from the
|
* press events. The event mask is the bitwise OR of values from the
|
||||||
* #GdkEventMask enumeration.
|
* #GdkEventMask enumeration.
|
||||||
*
|
*
|
||||||
|
* See the [input handling overview][event-masks] for details.
|
||||||
|
*
|
||||||
* Since: 3.0
|
* Since: 3.0
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
@@ -5895,10 +5908,10 @@ gdk_window_scroll (GdkWindow *window,
|
|||||||
* Since: 2.8
|
* Since: 2.8
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_window_move_region (GdkWindow *window,
|
gdk_window_move_region (GdkWindow *window,
|
||||||
const cairo_region_t *region,
|
const cairo_region_t *region,
|
||||||
gint dx,
|
gint dx,
|
||||||
gint dy)
|
gint dy)
|
||||||
{
|
{
|
||||||
cairo_region_t *expose_area;
|
cairo_region_t *expose_area;
|
||||||
|
|
||||||
@@ -5924,10 +5937,12 @@ gdk_window_move_region (GdkWindow *window,
|
|||||||
* @window: a #GdkWindow
|
* @window: a #GdkWindow
|
||||||
* @color: a #GdkColor
|
* @color: a #GdkColor
|
||||||
*
|
*
|
||||||
* Sets the background color of @window. (However, when using GTK+,
|
* Sets the background color of @window.
|
||||||
* set the background of a widget with gtk_widget_modify_bg() - if
|
*
|
||||||
* you’re an application - or gtk_style_set_background() - if you're
|
* However, when using GTK+, influence the background of a widget
|
||||||
* implementing a custom widget.)
|
* using a style class or CSS — if you’re an application — or with
|
||||||
|
* gtk_style_context_set_background() — if you're implementing a
|
||||||
|
* custom widget.
|
||||||
*
|
*
|
||||||
* See also gdk_window_set_background_pattern().
|
* See also gdk_window_set_background_pattern().
|
||||||
*
|
*
|
||||||
@@ -5991,7 +6006,7 @@ gdk_window_set_background_rgba (GdkWindow *window,
|
|||||||
* when the window is obscured then exposed.
|
* when the window is obscured then exposed.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_window_set_background_pattern (GdkWindow *window,
|
gdk_window_set_background_pattern (GdkWindow *window,
|
||||||
cairo_pattern_t *pattern)
|
cairo_pattern_t *pattern)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
@@ -6367,7 +6382,7 @@ gdk_window_get_origin (GdkWindow *window,
|
|||||||
*
|
*
|
||||||
* Obtains the position of a window position in root
|
* Obtains the position of a window position in root
|
||||||
* window coordinates. This is similar to
|
* window coordinates. This is similar to
|
||||||
* gdk_window_get_origin() but allows you go pass
|
* gdk_window_get_origin() but allows you to pass
|
||||||
* in any position in the window, not just the origin.
|
* in any position in the window, not just the origin.
|
||||||
*
|
*
|
||||||
* Since: 2.18
|
* Since: 2.18
|
||||||
@@ -9944,7 +9959,7 @@ gdk_window_set_event_compression (GdkWindow *window,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
|
|
||||||
window->event_compression = event_compression;
|
window->event_compression = !!event_compression;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10910,6 +10925,8 @@ gdk_window_flush_events (GdkFrameClock *clock,
|
|||||||
_gdk_display_pause_events (display);
|
_gdk_display_pause_events (display);
|
||||||
|
|
||||||
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS);
|
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS);
|
||||||
|
|
||||||
|
window->frame_clock_events_paused = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -10936,6 +10953,8 @@ gdk_window_resume_events (GdkFrameClock *clock,
|
|||||||
|
|
||||||
display = gdk_window_get_display (window);
|
display = gdk_window_get_display (window);
|
||||||
_gdk_display_unpause_events (display);
|
_gdk_display_unpause_events (display);
|
||||||
|
|
||||||
|
window->frame_clock_events_paused = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -10968,6 +10987,9 @@ gdk_window_set_frame_clock (GdkWindow *window,
|
|||||||
|
|
||||||
if (window->frame_clock)
|
if (window->frame_clock)
|
||||||
{
|
{
|
||||||
|
if (window->frame_clock_events_paused)
|
||||||
|
gdk_window_resume_events (window->frame_clock, G_OBJECT (window));
|
||||||
|
|
||||||
g_signal_handlers_disconnect_by_func (G_OBJECT (window->frame_clock),
|
g_signal_handlers_disconnect_by_func (G_OBJECT (window->frame_clock),
|
||||||
G_CALLBACK (gdk_window_flush_events),
|
G_CALLBACK (gdk_window_flush_events),
|
||||||
window);
|
window);
|
||||||
@@ -11108,7 +11130,7 @@ gdk_window_set_opaque_region (GdkWindow *window,
|
|||||||
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
|
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
|
||||||
|
|
||||||
if (impl_class->set_opaque_region)
|
if (impl_class->set_opaque_region)
|
||||||
return impl_class->set_opaque_region (window, region);
|
impl_class->set_opaque_region (window, region);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1113,10 +1113,8 @@ gboolean gdk_window_show_window_menu (GdkWindow *window,
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
GdkGLContext * gdk_window_create_gl_context (GdkWindow *window,
|
GdkGLContext * gdk_window_create_gl_context (GdkWindow *window,
|
||||||
GdkGLProfile profile,
|
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GDK_WINDOW_H__ */
|
#endif /* __GDK_WINDOW_H__ */
|
||||||
|
@@ -293,9 +293,11 @@ struct _GdkWindowImplClass
|
|||||||
GdkEvent *event);
|
GdkEvent *event);
|
||||||
GdkGLContext *(*create_gl_context) (GdkWindow *window,
|
GdkGLContext *(*create_gl_context) (GdkWindow *window,
|
||||||
gboolean attached,
|
gboolean attached,
|
||||||
GdkGLProfile profile,
|
|
||||||
GdkGLContext *share,
|
GdkGLContext *share,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
gboolean (* realize_gl_context) (GdkWindow *window,
|
||||||
|
GdkGLContext *context,
|
||||||
|
GError **error);
|
||||||
void (*invalidate_for_new_frame)(GdkWindow *window,
|
void (*invalidate_for_new_frame)(GdkWindow *window,
|
||||||
cairo_region_t *update_area);
|
cairo_region_t *update_area);
|
||||||
};
|
};
|
||||||
@@ -303,7 +305,6 @@ struct _GdkWindowImplClass
|
|||||||
/* Interface Functions */
|
/* Interface Functions */
|
||||||
GType gdk_window_impl_get_type (void) G_GNUC_CONST;
|
GType gdk_window_impl_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GDK_WINDOW_IMPL_H__ */
|
#endif /* __GDK_WINDOW_IMPL_H__ */
|
||||||
|
@@ -32,6 +32,7 @@ libgdk_mir_la_SOURCES = \
|
|||||||
gdkmirwindow.c \
|
gdkmirwindow.c \
|
||||||
gdkmirwindowimpl.c \
|
gdkmirwindowimpl.c \
|
||||||
gdkmir-debug.c \
|
gdkmir-debug.c \
|
||||||
|
gdkmir-private.h \
|
||||||
gdkmir.h
|
gdkmir.h
|
||||||
|
|
||||||
libgdkinclude_HEADERS = \
|
libgdkinclude_HEADERS = \
|
||||||
|
@@ -269,6 +269,13 @@ _gdk_mir_print_resize_event (const MirResizeEvent *event)
|
|||||||
g_printerr (" Size (%i, %i)\n", event->width, event->height);
|
g_printerr (" Size (%i, %i)\n", event->width, event->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_gdk_mir_print_close_event (const MirCloseSurfaceEvent *event)
|
||||||
|
{
|
||||||
|
g_printerr ("CLOSED\n");
|
||||||
|
g_printerr (" Surface %i\n", event->surface_id);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_gdk_mir_print_event (const MirEvent *event)
|
_gdk_mir_print_event (const MirEvent *event)
|
||||||
{
|
{
|
||||||
@@ -286,6 +293,9 @@ _gdk_mir_print_event (const MirEvent *event)
|
|||||||
case mir_event_type_resize:
|
case mir_event_type_resize:
|
||||||
_gdk_mir_print_resize_event (&event->resize);
|
_gdk_mir_print_resize_event (&event->resize);
|
||||||
break;
|
break;
|
||||||
|
case mir_event_type_close_surface:
|
||||||
|
_gdk_mir_print_close_event (&event->close_surface);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
g_printerr ("EVENT %u\n", event->type);
|
g_printerr ("EVENT %u\n", event->type);
|
||||||
break;
|
break;
|
||||||
|
@@ -69,6 +69,8 @@ GdkDevice *_gdk_mir_device_manager_get_keyboard (GdkDeviceManager *device_manage
|
|||||||
|
|
||||||
GdkKeymap *_gdk_mir_keymap_new (void);
|
GdkKeymap *_gdk_mir_keymap_new (void);
|
||||||
|
|
||||||
|
gboolean _gdk_mir_keymap_key_is_modifier (GdkKeymap *keymap, guint keycode);
|
||||||
|
|
||||||
GdkDevice *_gdk_mir_keyboard_new (GdkDeviceManager *device_manager, const gchar *name);
|
GdkDevice *_gdk_mir_keyboard_new (GdkDeviceManager *device_manager, const gchar *name);
|
||||||
|
|
||||||
GdkDevice *_gdk_mir_pointer_new (GdkDeviceManager *device_manager, const gchar *name);
|
GdkDevice *_gdk_mir_pointer_new (GdkDeviceManager *device_manager, const gchar *name);
|
||||||
@@ -131,4 +133,16 @@ void _gdk_mir_print_resize_event (const MirResizeEvent *event);
|
|||||||
|
|
||||||
void _gdk_mir_print_event (const MirEvent *event);
|
void _gdk_mir_print_event (const MirEvent *event);
|
||||||
|
|
||||||
|
/* TODO: Remove once we have proper transient window support. */
|
||||||
|
GdkWindow * _gdk_mir_window_get_visible_transient_child (GdkWindow *window,
|
||||||
|
gdouble x,
|
||||||
|
gdouble y,
|
||||||
|
gdouble *out_x,
|
||||||
|
gdouble *out_y);
|
||||||
|
|
||||||
|
/* TODO: Remove once we have proper transient window support. */
|
||||||
|
void _gdk_mir_window_transient_children_foreach (GdkWindow *window,
|
||||||
|
void (*func) (GdkWindow *, gpointer),
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
#endif /* __GDK_PRIVATE_MIR_H__ */
|
#endif /* __GDK_PRIVATE_MIR_H__ */
|
||||||
|
@@ -416,9 +416,20 @@ gdk_mir_display_create_window_impl (GdkDisplay *display,
|
|||||||
g_printerr (" location=(%d, %d)", window->x, window->y);
|
g_printerr (" location=(%d, %d)", window->x, window->y);
|
||||||
g_printerr (" size=(%d, %d)", window->width, window->height);
|
g_printerr (" size=(%d, %d)", window->width, window->height);
|
||||||
g_printerr ("\n");
|
g_printerr ("\n");
|
||||||
if (attributes->wclass != GDK_INPUT_OUTPUT)
|
|
||||||
return;
|
if (attributes->wclass == GDK_INPUT_OUTPUT)
|
||||||
window->impl = _gdk_mir_window_impl_new ();
|
{
|
||||||
|
window->impl = _gdk_mir_window_impl_new ();
|
||||||
|
window->impl_window = window;
|
||||||
|
}
|
||||||
|
else /* attributes->wclass == GDK_INPUT_ONLY */
|
||||||
|
{
|
||||||
|
window->impl = g_object_ref (real_parent->impl);
|
||||||
|
window->impl_window = real_parent;
|
||||||
|
|
||||||
|
/* FIXME: this is called in gdk_window_new, which sets window->impl_window
|
||||||
|
* back to window after this function returns. */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkKeymap *
|
static GdkKeymap *
|
||||||
|
@@ -22,6 +22,8 @@
|
|||||||
#include "gdkmir.h"
|
#include "gdkmir.h"
|
||||||
#include "gdkmir-private.h"
|
#include "gdkmir-private.h"
|
||||||
|
|
||||||
|
#define NANO_TO_MILLI(x) ((x) / 1000000)
|
||||||
|
|
||||||
struct _GdkMirWindowReference {
|
struct _GdkMirWindowReference {
|
||||||
GdkMirEventSource *source;
|
GdkMirEventSource *source;
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
@@ -39,6 +41,7 @@ struct _GdkMirEventSource
|
|||||||
|
|
||||||
GMutex mir_event_lock;
|
GMutex mir_event_lock;
|
||||||
GQueue mir_events;
|
GQueue mir_events;
|
||||||
|
gboolean log_events;
|
||||||
|
|
||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
};
|
};
|
||||||
@@ -50,6 +53,7 @@ send_event (GdkWindow *window, GdkDevice *device, GdkEvent *event)
|
|||||||
GList *node;
|
GList *node;
|
||||||
|
|
||||||
gdk_event_set_device (event, device);
|
gdk_event_set_device (event, device);
|
||||||
|
gdk_event_set_source_device (event, device);
|
||||||
gdk_event_set_screen (event, gdk_display_get_screen (gdk_window_get_display (window), 0));
|
gdk_event_set_screen (event, gdk_display_get_screen (gdk_window_get_display (window), 0));
|
||||||
event->any.window = g_object_ref (window);
|
event->any.window = g_object_ref (window);
|
||||||
|
|
||||||
@@ -118,7 +122,7 @@ set_key_event_string (GdkEventKey *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
generate_key_event (GdkWindow *window, GdkEventType type, guint state, guint keyval, guint16 keycode, gboolean is_modifier)
|
generate_key_event (GdkWindow *window, GdkEventType type, guint state, guint keyval, guint16 keycode, gboolean is_modifier, guint32 event_time)
|
||||||
{
|
{
|
||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
|
|
||||||
@@ -127,6 +131,7 @@ generate_key_event (GdkWindow *window, GdkEventType type, guint state, guint key
|
|||||||
event->key.keyval = keyval;
|
event->key.keyval = keyval;
|
||||||
event->key.hardware_keycode = keycode + 8;
|
event->key.hardware_keycode = keycode + 8;
|
||||||
event->key.is_modifier = is_modifier;
|
event->key.is_modifier = is_modifier;
|
||||||
|
event->key.time = event_time;
|
||||||
set_key_event_string (&event->key);
|
set_key_event_string (&event->key);
|
||||||
|
|
||||||
send_event (window, _gdk_mir_device_manager_get_keyboard (gdk_display_get_device_manager (gdk_window_get_display (window))), event);
|
send_event (window, _gdk_mir_device_manager_get_keyboard (gdk_display_get_device_manager (gdk_window_get_display (window))), event);
|
||||||
@@ -139,7 +144,7 @@ get_pointer (GdkWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
generate_button_event (GdkWindow *window, GdkEventType type, gdouble x, gdouble y, guint button, guint state)
|
generate_button_event (GdkWindow *window, GdkEventType type, gdouble x, gdouble y, guint button, guint state, guint32 event_time)
|
||||||
{
|
{
|
||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
|
|
||||||
@@ -148,12 +153,13 @@ generate_button_event (GdkWindow *window, GdkEventType type, gdouble x, gdouble
|
|||||||
event->button.y = y;
|
event->button.y = y;
|
||||||
event->button.state = state;
|
event->button.state = state;
|
||||||
event->button.button = button;
|
event->button.button = button;
|
||||||
|
event->button.time = event_time;
|
||||||
|
|
||||||
send_event (window, get_pointer (window), event);
|
send_event (window, get_pointer (window), event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
generate_scroll_event (GdkWindow *window, gdouble x, gdouble y, gdouble delta_x, gdouble delta_y, guint state)
|
generate_scroll_event (GdkWindow *window, gdouble x, gdouble y, gdouble delta_x, gdouble delta_y, guint state, guint32 event_time)
|
||||||
{
|
{
|
||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
|
|
||||||
@@ -161,15 +167,28 @@ generate_scroll_event (GdkWindow *window, gdouble x, gdouble y, gdouble delta_x,
|
|||||||
event->scroll.x = x;
|
event->scroll.x = x;
|
||||||
event->scroll.y = y;
|
event->scroll.y = y;
|
||||||
event->scroll.state = state;
|
event->scroll.state = state;
|
||||||
event->scroll.direction = GDK_SCROLL_SMOOTH;
|
event->scroll.time = event_time;
|
||||||
event->scroll.delta_x = -delta_x;
|
|
||||||
event->scroll.delta_y = -delta_y;
|
if (ABS (delta_x) == 1 && delta_y == 0)
|
||||||
|
{
|
||||||
|
event->scroll.direction = (delta_x < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT;
|
||||||
|
}
|
||||||
|
else if (ABS (delta_y) == 1 && delta_x == 0)
|
||||||
|
{
|
||||||
|
event->scroll.direction = (delta_y < 0) ? GDK_SCROLL_DOWN : GDK_SCROLL_UP;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
event->scroll.direction = GDK_SCROLL_SMOOTH;
|
||||||
|
event->scroll.delta_x = -delta_x;
|
||||||
|
event->scroll.delta_y = -delta_y;
|
||||||
|
}
|
||||||
|
|
||||||
send_event (window, get_pointer (window), event);
|
send_event (window, get_pointer (window), event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
generate_motion_event (GdkWindow *window, gdouble x, gdouble y, guint state)
|
generate_motion_event (GdkWindow *window, gdouble x, gdouble y, guint state, guint32 event_time)
|
||||||
{
|
{
|
||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
|
|
||||||
@@ -178,12 +197,13 @@ generate_motion_event (GdkWindow *window, gdouble x, gdouble y, guint state)
|
|||||||
event->motion.y = y;
|
event->motion.y = y;
|
||||||
event->motion.state = state;
|
event->motion.state = state;
|
||||||
event->motion.is_hint = FALSE;
|
event->motion.is_hint = FALSE;
|
||||||
|
event->motion.time = event_time;
|
||||||
|
|
||||||
send_event (window, get_pointer (window), event);
|
send_event (window, get_pointer (window), event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
generate_crossing_event (GdkWindow *window, GdkEventType type, gdouble x, gdouble y)
|
generate_crossing_event (GdkWindow *window, GdkEventType type, gdouble x, gdouble y, guint32 event_time)
|
||||||
{
|
{
|
||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
|
|
||||||
@@ -193,6 +213,7 @@ generate_crossing_event (GdkWindow *window, GdkEventType type, gdouble x, gdoubl
|
|||||||
event->crossing.mode = GDK_CROSSING_NORMAL;
|
event->crossing.mode = GDK_CROSSING_NORMAL;
|
||||||
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
|
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
|
||||||
event->crossing.focus = TRUE;
|
event->crossing.focus = TRUE;
|
||||||
|
event->crossing.time = event_time;
|
||||||
|
|
||||||
send_event (window, get_pointer (window), event);
|
send_event (window, get_pointer (window), event);
|
||||||
}
|
}
|
||||||
@@ -239,35 +260,30 @@ get_modifier_state (unsigned int modifiers, unsigned int button_state)
|
|||||||
return modifier_state;
|
return modifier_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (event_data->window->impl);
|
|
||||||
MirMotionButton changed_button_state;
|
|
||||||
GdkEventType event_type;
|
|
||||||
gdouble x, y;
|
|
||||||
guint modifier_state;
|
|
||||||
gboolean is_modifier = FALSE;
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_key_event (GdkWindow *window, const MirKeyEvent *event)
|
handle_key_event (GdkWindow *window, const MirKeyEvent *event)
|
||||||
{
|
{
|
||||||
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
GdkKeymap *keymap;
|
||||||
guint modifier_state;
|
guint modifier_state;
|
||||||
gboolean is_modifier = FALSE;
|
MirMotionButton button_state;
|
||||||
|
|
||||||
modifier_state = get_modifier_state (event->modifiers, 0); // FIXME: Need to track button state
|
|
||||||
|
|
||||||
switch (event->action)
|
switch (event->action)
|
||||||
{
|
{
|
||||||
case mir_key_action_down:
|
case mir_key_action_down:
|
||||||
case mir_key_action_up:
|
case mir_key_action_up:
|
||||||
// FIXME: Convert keycode
|
// FIXME: Convert keycode
|
||||||
// FIXME: is_modifier
|
_gdk_mir_window_impl_get_cursor_state (impl, NULL, NULL, NULL, &button_state);
|
||||||
|
modifier_state = get_modifier_state (event->modifiers, button_state);
|
||||||
|
keymap = gdk_keymap_get_for_display (gdk_window_get_display (window));
|
||||||
|
|
||||||
generate_key_event (window,
|
generate_key_event (window,
|
||||||
event->action == mir_key_action_down ? GDK_KEY_PRESS : GDK_KEY_RELEASE,
|
event->action == mir_key_action_down ? GDK_KEY_PRESS : GDK_KEY_RELEASE,
|
||||||
modifier_state,
|
modifier_state,
|
||||||
event->key_code,
|
event->key_code,
|
||||||
event->scan_code,
|
event->scan_code,
|
||||||
is_modifier);
|
_gdk_mir_keymap_key_is_modifier (keymap, event->key_code),
|
||||||
|
NANO_TO_MILLI (event->event_time));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//case mir_key_action_multiple:
|
//case mir_key_action_multiple:
|
||||||
@@ -276,6 +292,47 @@ handle_key_event (GdkWindow *window, const MirKeyEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: Remove once we have proper transient window support. */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GdkWindow *except;
|
||||||
|
gdouble x;
|
||||||
|
gdouble y;
|
||||||
|
guint32 time;
|
||||||
|
} LeaveInfo;
|
||||||
|
|
||||||
|
/* TODO: Remove once we have proper transient window support. */
|
||||||
|
/*
|
||||||
|
* leave_windows_except:
|
||||||
|
*
|
||||||
|
* Generate a leave event for every window except the one the cursor is in.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
leave_windows_except (GdkWindow *window,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
LeaveInfo info = *((LeaveInfo *) user_data);
|
||||||
|
|
||||||
|
info.x -= window->x;
|
||||||
|
info.y -= window->y;
|
||||||
|
|
||||||
|
_gdk_mir_window_transient_children_foreach (window, leave_windows_except, &info);
|
||||||
|
|
||||||
|
if (window != info.except)
|
||||||
|
{
|
||||||
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
gboolean cursor_inside;
|
||||||
|
MirMotionButton button_state;
|
||||||
|
|
||||||
|
_gdk_mir_window_impl_get_cursor_state (impl, NULL, NULL, &cursor_inside, &button_state);
|
||||||
|
|
||||||
|
if (cursor_inside)
|
||||||
|
generate_crossing_event (window, GDK_LEAVE_NOTIFY, info.x, info.y, info.time);
|
||||||
|
|
||||||
|
_gdk_mir_window_impl_set_cursor_state (impl, info.x, info.y, FALSE, button_state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_motion_event (GdkWindow *window, const MirMotionEvent *event)
|
handle_motion_event (GdkWindow *window, const MirMotionEvent *event)
|
||||||
{
|
{
|
||||||
@@ -284,6 +341,7 @@ handle_motion_event (GdkWindow *window, const MirMotionEvent *event)
|
|||||||
gboolean cursor_inside;
|
gboolean cursor_inside;
|
||||||
MirMotionButton button_state;
|
MirMotionButton button_state;
|
||||||
guint modifier_state;
|
guint modifier_state;
|
||||||
|
guint32 event_time;
|
||||||
GdkEventType event_type;
|
GdkEventType event_type;
|
||||||
MirMotionButton changed_button_state;
|
MirMotionButton changed_button_state;
|
||||||
|
|
||||||
@@ -294,45 +352,87 @@ handle_motion_event (GdkWindow *window, const MirMotionEvent *event)
|
|||||||
y = event->pointer_coordinates[0].y;
|
y = event->pointer_coordinates[0].y;
|
||||||
}
|
}
|
||||||
modifier_state = get_modifier_state (event->modifiers, event->button_state);
|
modifier_state = get_modifier_state (event->modifiers, event->button_state);
|
||||||
|
event_time = NANO_TO_MILLI (event->event_time);
|
||||||
|
|
||||||
/* The Mir events generate hover-exits even while inside the window so
|
/* TODO: Remove once we have proper transient window support. */
|
||||||
counteract this by always generating an enter notify on all other events */
|
if (event->action == mir_motion_action_hover_exit)
|
||||||
if (!cursor_inside && event->action != mir_motion_action_hover_exit)
|
|
||||||
{
|
{
|
||||||
cursor_inside = TRUE;
|
LeaveInfo info;
|
||||||
generate_crossing_event (window, GDK_ENTER_NOTIFY, x, y);
|
|
||||||
|
info.x = x;
|
||||||
|
info.y = y;
|
||||||
|
info.time = event_time;
|
||||||
|
info.except = window;
|
||||||
|
|
||||||
|
/* Leave all transient children from leaf to root, except the root since we do it later. */
|
||||||
|
_gdk_mir_window_transient_children_foreach (window, leave_windows_except, &info);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LeaveInfo info;
|
||||||
|
|
||||||
|
info.x = x;
|
||||||
|
info.y = y;
|
||||||
|
info.time = event_time;
|
||||||
|
info.except = _gdk_mir_window_get_visible_transient_child (window, x, y, &x, &y);
|
||||||
|
|
||||||
|
/* Leave all transient children from leaf to root, except the pointer window since we enter it. */
|
||||||
|
_gdk_mir_window_transient_children_foreach (window, leave_windows_except, &info);
|
||||||
|
|
||||||
|
window = info.except;
|
||||||
|
|
||||||
|
if (window)
|
||||||
|
{
|
||||||
|
/* Enter the pointer window. */
|
||||||
|
gboolean cursor_inside_pointer_window;
|
||||||
|
|
||||||
|
impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
_gdk_mir_window_impl_get_cursor_state (impl, NULL, NULL, &cursor_inside_pointer_window, NULL);
|
||||||
|
|
||||||
|
if (!cursor_inside_pointer_window)
|
||||||
|
{
|
||||||
|
generate_crossing_event (window, GDK_ENTER_NOTIFY, x, y, event_time);
|
||||||
|
_gdk_mir_window_impl_set_cursor_state (impl, x, y, TRUE, event->button_state);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update which window has focus */
|
if (window)
|
||||||
_gdk_mir_pointer_set_location (get_pointer (window), x, y, window, modifier_state);
|
|
||||||
switch (event->action)
|
|
||||||
{
|
{
|
||||||
case mir_motion_action_down:
|
/* Update which window has focus */
|
||||||
case mir_motion_action_up:
|
_gdk_mir_pointer_set_location (get_pointer (window), x, y, window, modifier_state);
|
||||||
event_type = event->action == mir_motion_action_down ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE;
|
switch (event->action)
|
||||||
changed_button_state = button_state ^ event->button_state;
|
{
|
||||||
if (changed_button_state == 0 || (changed_button_state & mir_motion_button_primary) != 0)
|
case mir_motion_action_down:
|
||||||
generate_button_event (window, event_type, x, y, GDK_BUTTON_PRIMARY, modifier_state);
|
case mir_motion_action_up:
|
||||||
if ((changed_button_state & mir_motion_button_secondary) != 0)
|
event_type = event->action == mir_motion_action_down ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE;
|
||||||
generate_button_event (window, event_type, x, y, GDK_BUTTON_SECONDARY, modifier_state);
|
changed_button_state = button_state ^ event->button_state;
|
||||||
if ((changed_button_state & mir_motion_button_tertiary) != 0)
|
if (changed_button_state == 0 || (changed_button_state & mir_motion_button_primary) != 0)
|
||||||
generate_button_event (window, event_type, x, y, GDK_BUTTON_MIDDLE, modifier_state);
|
generate_button_event (window, event_type, x, y, GDK_BUTTON_PRIMARY, modifier_state, event_time);
|
||||||
button_state = event->button_state;
|
if ((changed_button_state & mir_motion_button_secondary) != 0)
|
||||||
break;
|
generate_button_event (window, event_type, x, y, GDK_BUTTON_SECONDARY, modifier_state, event_time);
|
||||||
case mir_motion_action_scroll:
|
if ((changed_button_state & mir_motion_button_tertiary) != 0)
|
||||||
generate_scroll_event (window, x, y, event->pointer_coordinates[0].hscroll, event->pointer_coordinates[0].vscroll, modifier_state);
|
generate_button_event (window, event_type, x, y, GDK_BUTTON_MIDDLE, modifier_state, event_time);
|
||||||
break;
|
button_state = event->button_state;
|
||||||
case mir_motion_action_move: // move with button
|
break;
|
||||||
case mir_motion_action_hover_move: // move without button
|
case mir_motion_action_scroll:
|
||||||
generate_motion_event (window, x, y, modifier_state);
|
generate_scroll_event (window, x, y, event->pointer_coordinates[0].hscroll, event->pointer_coordinates[0].vscroll, modifier_state, event_time);
|
||||||
break;
|
break;
|
||||||
case mir_motion_action_hover_exit:
|
case mir_motion_action_move: // move with button
|
||||||
cursor_inside = FALSE;
|
case mir_motion_action_hover_move: // move without button
|
||||||
generate_crossing_event (window, GDK_LEAVE_NOTIFY, x, y);
|
generate_motion_event (window, x, y, modifier_state, event_time);
|
||||||
break;
|
break;
|
||||||
}
|
case mir_motion_action_hover_exit:
|
||||||
|
if (cursor_inside)
|
||||||
|
{
|
||||||
|
cursor_inside = FALSE;
|
||||||
|
generate_crossing_event (window, GDK_LEAVE_NOTIFY, x, y, event_time);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
_gdk_mir_window_impl_set_cursor_state (impl, x, y, cursor_inside, button_state);
|
_gdk_mir_window_impl_set_cursor_state (impl, x, y, cursor_inside, button_state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -385,6 +485,14 @@ handle_resize_event (GdkWindow *window,
|
|||||||
generate_configure_event (window, event->width, event->height);
|
generate_configure_event (window, event->width, event->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
handle_close_event (GdkWindow *window,
|
||||||
|
const MirCloseSurfaceEvent *event)
|
||||||
|
{
|
||||||
|
send_event (window, get_pointer (window), gdk_event_new (GDK_DESTROY));
|
||||||
|
gdk_window_destroy_notify (window);
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
@@ -396,9 +504,6 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
|
|||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
const MirEvent *event)
|
const MirEvent *event)
|
||||||
{
|
{
|
||||||
if (g_getenv ("GDK_MIR_LOG_EVENTS"))
|
|
||||||
_gdk_mir_print_event (event);
|
|
||||||
|
|
||||||
// FIXME: Only generate events if the window wanted them?
|
// FIXME: Only generate events if the window wanted them?
|
||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
@@ -420,6 +525,9 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
|
|||||||
case mir_event_type_orientation:
|
case mir_event_type_orientation:
|
||||||
// FIXME?
|
// FIXME?
|
||||||
break;
|
break;
|
||||||
|
case mir_event_type_close_surface:
|
||||||
|
handle_close_event (window, &event->close_surface);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("Ignoring unknown Mir event %d", event->type);
|
g_warning ("Ignoring unknown Mir event %d", event->type);
|
||||||
// FIXME?
|
// FIXME?
|
||||||
@@ -459,7 +567,12 @@ gdk_mir_event_source_convert_events (GdkMirEventSource *source)
|
|||||||
* event was being dispatched...
|
* event was being dispatched...
|
||||||
*/
|
*/
|
||||||
if (window != NULL)
|
if (window != NULL)
|
||||||
gdk_mir_event_source_queue_event (source->display, window, &event->event);
|
{
|
||||||
|
if (source->log_events)
|
||||||
|
_gdk_mir_print_event (&event->event);
|
||||||
|
|
||||||
|
gdk_mir_event_source_queue_event (source->display, window, &event->event);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
g_warning ("window was destroyed before event arrived...");
|
g_warning ("window was destroyed before event arrived...");
|
||||||
|
|
||||||
@@ -554,6 +667,7 @@ _gdk_mir_event_source_new (GdkDisplay *display)
|
|||||||
source = (GdkMirEventSource *) g_source;
|
source = (GdkMirEventSource *) g_source;
|
||||||
g_mutex_init (&source->mir_event_lock);
|
g_mutex_init (&source->mir_event_lock);
|
||||||
source->display = display;
|
source->display = display;
|
||||||
|
source->log_events = (g_getenv ("GDK_MIR_LOG_EVENTS") != NULL);
|
||||||
|
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
@@ -26,6 +26,77 @@
|
|||||||
|
|
||||||
G_DEFINE_TYPE (GdkMirGLContext, gdk_mir_gl_context, GDK_TYPE_GL_CONTEXT)
|
G_DEFINE_TYPE (GdkMirGLContext, gdk_mir_gl_context, GDK_TYPE_GL_CONTEXT)
|
||||||
|
|
||||||
|
#define N_EGL_ATTRS 16
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdk_mir_gl_context_realize (GdkGLContext *context,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
GdkMirGLContext *context_mir = GDK_MIR_GL_CONTEXT (context);
|
||||||
|
GdkDisplay *display = gdk_gl_context_get_display (context);
|
||||||
|
GdkGLContext *share = gdk_gl_context_get_shared_context (context);
|
||||||
|
EGLContext ctx;
|
||||||
|
EGLint context_attribs[N_EGL_ATTRS];
|
||||||
|
int major, minor, flags;
|
||||||
|
gboolean debug_bit, forward_bit;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
if (!_gdk_mir_display_init_egl_display (display))
|
||||||
|
{
|
||||||
|
g_set_error_literal (error, GDK_GL_ERROR,
|
||||||
|
GDK_GL_ERROR_NOT_AVAILABLE,
|
||||||
|
_("No GL implementation is available"));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
gdk_gl_context_get_required_version (context, &major, &minor);
|
||||||
|
debug_bit = gdk_gl_context_get_debug_enabled (context);
|
||||||
|
forward_bit = gdk_gl_context_get_forward_compatible (context);
|
||||||
|
|
||||||
|
flags = 0;
|
||||||
|
|
||||||
|
if (debug_bit)
|
||||||
|
flags |= EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR;
|
||||||
|
if (forward_bit)
|
||||||
|
flags |= EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR;
|
||||||
|
|
||||||
|
/* We want a core profile */
|
||||||
|
context_attribs[i++] = EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR;
|
||||||
|
context_attribs[i++] = EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
|
||||||
|
|
||||||
|
/* Specify the version */
|
||||||
|
context_attribs[i++] = EGL_CONTEXT_MAJOR_VERSION_KHR;
|
||||||
|
context_attribs[i++] = major;
|
||||||
|
context_attribs[i++] = EGL_CONTEXT_MINOR_VERSION_KHR;
|
||||||
|
context_attribs[i++] = minor;
|
||||||
|
|
||||||
|
/* Specify the flags */
|
||||||
|
context_attribs[i++] = EGL_CONTEXT_FLAGS_KHR;
|
||||||
|
context_attribs[i++] = flags;
|
||||||
|
|
||||||
|
context_attribs[i++] = EGL_NONE;
|
||||||
|
g_assert (i < N_EGL_ATTRS);
|
||||||
|
|
||||||
|
ctx = eglCreateContext (_gdk_mir_display_get_egl_display (display),
|
||||||
|
context_mir->egl_config,
|
||||||
|
share != NULL ? GDK_MIR_GL_CONTEXT (share)->egl_context
|
||||||
|
: EGL_NO_CONTEXT,
|
||||||
|
context_attribs);
|
||||||
|
if (ctx == NULL)
|
||||||
|
{
|
||||||
|
g_set_error_literal (error, GDK_GL_ERROR,
|
||||||
|
GDK_GL_ERROR_NOT_AVAILABLE,
|
||||||
|
_("Unable to create a GL context"));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
GDK_NOTE (OPENGL, g_print ("Created EGL context[%p]\n", ctx));
|
||||||
|
|
||||||
|
context_mir->egl_context = ctx;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_mir_gl_context_end_frame (GdkGLContext *context,
|
gdk_mir_gl_context_end_frame (GdkGLContext *context,
|
||||||
cairo_region_t *painted,
|
cairo_region_t *painted,
|
||||||
@@ -96,6 +167,7 @@ gdk_mir_gl_context_class_init (GdkMirGLContextClass *klass)
|
|||||||
GdkGLContextClass *context_class = GDK_GL_CONTEXT_CLASS (klass);
|
GdkGLContextClass *context_class = GDK_GL_CONTEXT_CLASS (klass);
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
context_class->realize = gdk_mir_gl_context_realize;
|
||||||
context_class->end_frame = gdk_mir_gl_context_end_frame;
|
context_class->end_frame = gdk_mir_gl_context_end_frame;
|
||||||
gobject_class->dispose = gdk_mir_gl_context_dispose;
|
gobject_class->dispose = gdk_mir_gl_context_dispose;
|
||||||
}
|
}
|
||||||
|
@@ -31,6 +31,12 @@ typedef struct GdkMirKeymapClass GdkMirKeymapClass;
|
|||||||
#define GDK_IS_MIR_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_KEYMAP))
|
#define GDK_IS_MIR_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_KEYMAP))
|
||||||
#define GDK_MIR_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_KEYMAP, GdkMirKeymapClass))
|
#define GDK_MIR_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_KEYMAP, GdkMirKeymapClass))
|
||||||
|
|
||||||
|
#define IsModifierKey(keysym) \
|
||||||
|
(((keysym) >= XKB_KEY_Shift_L && (keysym) <= XKB_KEY_Hyper_R) || \
|
||||||
|
((keysym) >= XKB_KEY_ISO_Lock && (keysym) <= XKB_KEY_ISO_Last_Group_Lock) || \
|
||||||
|
((keysym) == XKB_KEY_Mode_switch) || \
|
||||||
|
((keysym) == XKB_KEY_Num_Lock))
|
||||||
|
|
||||||
struct GdkMirKeymap
|
struct GdkMirKeymap
|
||||||
{
|
{
|
||||||
GdkKeymap parent_instance;
|
GdkKeymap parent_instance;
|
||||||
@@ -342,6 +348,14 @@ gdk_mir_keymap_get_modifier_state (GdkKeymap *keymap)
|
|||||||
return get_gdk_modifiers (mir_keymap->xkb_keymap, mods);
|
return get_gdk_modifiers (mir_keymap->xkb_keymap, mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
_gdk_mir_keymap_key_is_modifier (GdkKeymap *keymap,
|
||||||
|
guint keycode)
|
||||||
|
{
|
||||||
|
// FIXME: use xkb_state
|
||||||
|
return IsModifierKey (keycode);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_direction (GdkMirKeymap *keymap)
|
update_direction (GdkMirKeymap *keymap)
|
||||||
{
|
{
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "gdkdisplayprivate.h"
|
||||||
#include "gdkdeviceprivate.h"
|
#include "gdkdeviceprivate.h"
|
||||||
#include "gdkscreen.h"
|
#include "gdkscreen.h"
|
||||||
#include "gdkwindow.h"
|
#include "gdkwindow.h"
|
||||||
@@ -183,6 +184,11 @@ gdk_mir_pointer_ungrab (GdkDevice *device,
|
|||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_pointer_ungrab\n");
|
//g_printerr ("gdk_mir_pointer_ungrab\n");
|
||||||
/* Mir doesn't do grabs */
|
/* Mir doesn't do grabs */
|
||||||
|
|
||||||
|
GdkDeviceGrabInfo *grab = _gdk_display_get_last_device_grab (gdk_device_get_display (device), device);
|
||||||
|
|
||||||
|
if (grab)
|
||||||
|
grab->serial_end = grab->serial_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkWindow *
|
static GdkWindow *
|
||||||
|
@@ -327,35 +327,31 @@ gdk_mir_screen_get_monitor_plug_name (GdkScreen *screen,
|
|||||||
switch (output->type)
|
switch (output->type)
|
||||||
{
|
{
|
||||||
case mir_display_output_type_unknown:
|
case mir_display_output_type_unknown:
|
||||||
return g_strdup_printf ("UNKNOWN-%u", output->output_id);
|
return g_strdup_printf ("None-%u", output->output_id);
|
||||||
case mir_display_output_type_vga:
|
case mir_display_output_type_vga:
|
||||||
return g_strdup_printf ("VGA-%u", output->output_id);
|
return g_strdup_printf ("VGA-%u", output->output_id);
|
||||||
case mir_display_output_type_dvii:
|
case mir_display_output_type_dvii:
|
||||||
return g_strdup_printf ("DVII-%u", output->output_id);
|
|
||||||
case mir_display_output_type_dvid:
|
case mir_display_output_type_dvid:
|
||||||
return g_strdup_printf ("DVID-%u", output->output_id);
|
|
||||||
case mir_display_output_type_dvia:
|
case mir_display_output_type_dvia:
|
||||||
return g_strdup_printf ("DVIA-%u", output->output_id);
|
return g_strdup_printf ("DVI-%u", output->output_id);
|
||||||
case mir_display_output_type_composite:
|
case mir_display_output_type_composite:
|
||||||
return g_strdup_printf ("COMPOSITE-%u", output->output_id);
|
return g_strdup_printf ("Composite-%u", output->output_id);
|
||||||
case mir_display_output_type_svideo:
|
|
||||||
return g_strdup_printf ("SVIDEO-%u", output->output_id);
|
|
||||||
case mir_display_output_type_lvds:
|
case mir_display_output_type_lvds:
|
||||||
return g_strdup_printf ("LVDS-%u", output->output_id);
|
return g_strdup_printf ("LVDS-%u", output->output_id);
|
||||||
case mir_display_output_type_component:
|
case mir_display_output_type_component:
|
||||||
return g_strdup_printf ("COMPONENT-%u", output->output_id);
|
return g_strdup_printf ("CTV-%u", output->output_id);
|
||||||
case mir_display_output_type_ninepindin:
|
case mir_display_output_type_ninepindin:
|
||||||
return g_strdup_printf ("NINEPINDIN-%u", output->output_id);
|
return g_strdup_printf ("DIN-%u", output->output_id);
|
||||||
case mir_display_output_type_displayport:
|
case mir_display_output_type_displayport:
|
||||||
return g_strdup_printf ("DISPLAYPORT-%u", output->output_id);
|
return g_strdup_printf ("DP-%u", output->output_id);
|
||||||
case mir_display_output_type_hdmia:
|
case mir_display_output_type_hdmia:
|
||||||
return g_strdup_printf ("HDMIA-%u", output->output_id);
|
|
||||||
case mir_display_output_type_hdmib:
|
case mir_display_output_type_hdmib:
|
||||||
return g_strdup_printf ("HDMIB-%u", output->output_id);
|
return g_strdup_printf ("HDMI-%u", output->output_id);
|
||||||
|
case mir_display_output_type_svideo:
|
||||||
case mir_display_output_type_tv:
|
case mir_display_output_type_tv:
|
||||||
return g_strdup_printf ("TV-%u", output->output_id);
|
return g_strdup_printf ("TV-%u", output->output_id);
|
||||||
case mir_display_output_type_edp:
|
case mir_display_output_type_edp:
|
||||||
return g_strdup_printf ("EDP-%u", output->output_id);
|
return g_strdup_printf ("eDP-%u", output->output_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -183,19 +183,29 @@ create_mir_surface (GdkDisplay *display,
|
|||||||
gint height,
|
gint height,
|
||||||
MirBufferUsage buffer_usage)
|
MirBufferUsage buffer_usage)
|
||||||
{
|
{
|
||||||
MirSurfaceParameters parameters;
|
MirSurfaceSpec *spec;
|
||||||
MirConnection *connection;
|
MirConnection *connection;
|
||||||
|
MirPixelFormat format;
|
||||||
parameters.name = g_get_prgname ();
|
MirSurface *surface;
|
||||||
parameters.width = width;
|
|
||||||
parameters.height = height;
|
|
||||||
parameters.pixel_format = _gdk_mir_display_get_pixel_format (display, buffer_usage);
|
|
||||||
parameters.buffer_usage = buffer_usage;
|
|
||||||
parameters.output_id = mir_display_output_id_invalid;
|
|
||||||
|
|
||||||
connection = gdk_mir_display_get_mir_connection (display);
|
connection = gdk_mir_display_get_mir_connection (display);
|
||||||
|
format = _gdk_mir_display_get_pixel_format (display, buffer_usage);
|
||||||
|
spec = mir_connection_create_spec_for_normal_surface (connection, width, height, format);
|
||||||
|
mir_surface_spec_set_name (spec, g_get_prgname ());
|
||||||
|
mir_surface_spec_set_buffer_usage (spec, buffer_usage);
|
||||||
|
surface = mir_surface_create_sync (spec);
|
||||||
|
mir_surface_spec_release (spec);
|
||||||
|
|
||||||
return mir_connection_create_surface_sync (connection, ¶meters);
|
return surface;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO: Remove once we have proper transient window support. */
|
||||||
|
static gboolean
|
||||||
|
should_render_in_parent (GdkWindow *window)
|
||||||
|
{
|
||||||
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
|
||||||
|
return impl->transient_for && gdk_window_get_window_type (window) != GDK_WINDOW_TOPLEVEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -206,7 +216,7 @@ ensure_surface_full (GdkWindow *window,
|
|||||||
MirEventDelegate event_delegate = { event_cb, NULL };
|
MirEventDelegate event_delegate = { event_cb, NULL };
|
||||||
GdkMirWindowReference *window_ref;
|
GdkMirWindowReference *window_ref;
|
||||||
|
|
||||||
if (impl->surface)
|
if (impl->surface || should_render_in_parent (window))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* no destroy notify -- we must leak for now
|
/* no destroy notify -- we must leak for now
|
||||||
@@ -294,7 +304,7 @@ send_buffer (GdkWindow *window)
|
|||||||
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
|
||||||
/* Transient windows draw onto parent instead */
|
/* Transient windows draw onto parent instead */
|
||||||
if (impl->transient_for)
|
if (should_render_in_parent (window))
|
||||||
{
|
{
|
||||||
redraw_transient (window);
|
redraw_transient (window);
|
||||||
return;
|
return;
|
||||||
@@ -352,7 +362,7 @@ gdk_mir_window_impl_ref_cairo_surface (GdkWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Transient windows get rendered into a buffer and copied onto their parent */
|
/* Transient windows get rendered into a buffer and copied onto their parent */
|
||||||
if (impl->transient_for || window->gl_paint_context)
|
if (should_render_in_parent (window) || window->gl_paint_context)
|
||||||
{
|
{
|
||||||
cairo_surface = cairo_image_surface_create (pixel_format, window->width, window->height);
|
cairo_surface = cairo_image_surface_create (pixel_format, window->width, window->height);
|
||||||
}
|
}
|
||||||
@@ -373,13 +383,13 @@ gdk_mir_window_impl_ref_cairo_surface (GdkWindow *window)
|
|||||||
impl->cairo_surface = cairo_surface_reference (cairo_surface);
|
impl->cairo_surface = cairo_surface_reference (cairo_surface);
|
||||||
|
|
||||||
/* Draw background */
|
/* Draw background */
|
||||||
c = cairo_create (impl->cairo_surface);
|
|
||||||
if (impl->background)
|
if (impl->background)
|
||||||
cairo_set_source (c, impl->background);
|
{
|
||||||
else
|
c = cairo_create (impl->cairo_surface);
|
||||||
cairo_set_source_rgb (c, 1.0, 0.0, 0.0);
|
cairo_set_source (c, impl->background);
|
||||||
cairo_paint (c);
|
cairo_paint (c);
|
||||||
cairo_destroy (c);
|
cairo_destroy (c);
|
||||||
|
}
|
||||||
|
|
||||||
return cairo_surface;
|
return cairo_surface;
|
||||||
}
|
}
|
||||||
@@ -446,10 +456,11 @@ gdk_mir_window_impl_hide (GdkWindow *window)
|
|||||||
//g_printerr ("gdk_mir_window_impl_hide window=%p\n", window);
|
//g_printerr ("gdk_mir_window_impl_hide window=%p\n", window);
|
||||||
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
|
||||||
|
impl->cursor_inside = FALSE;
|
||||||
impl->visible = FALSE;
|
impl->visible = FALSE;
|
||||||
ensure_no_surface (window);
|
ensure_no_surface (window);
|
||||||
|
|
||||||
if (impl->transient_for)
|
if (should_render_in_parent (window))
|
||||||
redraw_transient (window);
|
redraw_transient (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,10 +470,11 @@ gdk_mir_window_impl_withdraw (GdkWindow *window)
|
|||||||
//g_printerr ("gdk_mir_window_impl_withdraw window=%p\n", window);
|
//g_printerr ("gdk_mir_window_impl_withdraw window=%p\n", window);
|
||||||
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
|
||||||
|
impl->cursor_inside = FALSE;
|
||||||
impl->visible = FALSE;
|
impl->visible = FALSE;
|
||||||
ensure_no_surface (window);
|
ensure_no_surface (window);
|
||||||
|
|
||||||
if (impl->transient_for)
|
if (should_render_in_parent (window))
|
||||||
redraw_transient (window);
|
redraw_transient (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -505,6 +517,7 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
|
|||||||
gint width,
|
gint width,
|
||||||
gint height)
|
gint height)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
g_printerr ("gdk_mir_window_impl_move_resize");
|
g_printerr ("gdk_mir_window_impl_move_resize");
|
||||||
g_printerr (" window=%p", window);
|
g_printerr (" window=%p", window);
|
||||||
if (with_move)
|
if (with_move)
|
||||||
@@ -512,24 +525,27 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
|
|||||||
if (width > 0)
|
if (width > 0)
|
||||||
g_printerr (" size=%dx%dpx", width, height);
|
g_printerr (" size=%dx%dpx", width, height);
|
||||||
g_printerr ("\n");
|
g_printerr ("\n");
|
||||||
|
*/
|
||||||
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
gboolean recreate_surface = FALSE;
|
||||||
|
|
||||||
/* Redraw parent where we moved from */
|
/* Redraw parent where we moved from */
|
||||||
if (impl->transient_for)
|
if (should_render_in_parent (window))
|
||||||
redraw_transient (window);
|
redraw_transient (window);
|
||||||
|
|
||||||
/* Transient windows can move wherever they want */
|
/* Transient windows can move wherever they want */
|
||||||
if (with_move)
|
if (with_move)
|
||||||
{
|
{
|
||||||
if (impl->transient_for)
|
if (should_render_in_parent (window))
|
||||||
{
|
{
|
||||||
window->x = x;
|
window->x = x;
|
||||||
window->y = y;
|
window->y = y;
|
||||||
}
|
}
|
||||||
else
|
else if (x != impl->transient_x || y != impl->transient_y)
|
||||||
{
|
{
|
||||||
impl->transient_x = x;
|
impl->transient_x = x;
|
||||||
impl->transient_y = y;
|
impl->transient_y = y;
|
||||||
|
recreate_surface = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,16 +555,17 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
|
|||||||
/* We accept any resize */
|
/* We accept any resize */
|
||||||
window->width = width;
|
window->width = width;
|
||||||
window->height = height;
|
window->height = height;
|
||||||
|
recreate_surface = TRUE;
|
||||||
if (impl->surface)
|
|
||||||
{
|
|
||||||
ensure_no_surface (window);
|
|
||||||
ensure_surface (window);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (recreate_surface && impl->surface)
|
||||||
|
{
|
||||||
|
ensure_no_surface (window);
|
||||||
|
ensure_surface (window);
|
||||||
|
}
|
||||||
|
|
||||||
/* Redraw parent where we moved to */
|
/* Redraw parent where we moved to */
|
||||||
if (impl->transient_for)
|
if (should_render_in_parent (window))
|
||||||
redraw_transient (window);
|
redraw_transient (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -711,7 +728,7 @@ gdk_mir_window_impl_input_shape_combine_region (GdkWindow *window,
|
|||||||
gint offset_x,
|
gint offset_x,
|
||||||
gint offset_y)
|
gint offset_y)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_window_impl_input_shape_combine_region window=%p\n", window);
|
// g_printerr ("gdk_mir_window_impl_input_shape_combine_region window=%p\n", window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -725,7 +742,7 @@ gdk_mir_window_impl_destroy (GdkWindow *window,
|
|||||||
impl->visible = FALSE;
|
impl->visible = FALSE;
|
||||||
ensure_no_surface (window);
|
ensure_no_surface (window);
|
||||||
|
|
||||||
if (impl->transient_for)
|
if (should_render_in_parent (window))
|
||||||
{
|
{
|
||||||
/* Redraw parent */
|
/* Redraw parent */
|
||||||
redraw_transient (window);
|
redraw_transient (window);
|
||||||
@@ -862,7 +879,7 @@ static void
|
|||||||
gdk_mir_window_impl_set_title (GdkWindow *window,
|
gdk_mir_window_impl_set_title (GdkWindow *window,
|
||||||
const gchar *title)
|
const gchar *title)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_window_impl_set_title window=%p\n", window);
|
// g_printerr ("gdk_mir_window_impl_set_title window=%p\n", window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -893,7 +910,7 @@ gdk_mir_window_impl_set_transient_for (GdkWindow *window,
|
|||||||
|
|
||||||
/* Link this window to the parent */
|
/* Link this window to the parent */
|
||||||
impl->transient_for = parent;
|
impl->transient_for = parent;
|
||||||
if (parent)
|
if (should_render_in_parent (window))
|
||||||
{
|
{
|
||||||
GdkMirWindowImpl *parent_impl = GDK_MIR_WINDOW_IMPL (parent->impl);
|
GdkMirWindowImpl *parent_impl = GDK_MIR_WINDOW_IMPL (parent->impl);
|
||||||
parent_impl->transient_children = g_list_append (parent_impl->transient_children, window);
|
parent_impl->transient_children = g_list_append (parent_impl->transient_children, window);
|
||||||
@@ -902,12 +919,55 @@ gdk_mir_window_impl_set_transient_for (GdkWindow *window,
|
|||||||
window->x = impl->transient_x;
|
window->x = impl->transient_x;
|
||||||
window->y = impl->transient_y;
|
window->y = impl->transient_y;
|
||||||
|
|
||||||
|
/* Remove surface if we had made one before this was set */
|
||||||
|
ensure_no_surface (window);
|
||||||
|
|
||||||
/* Redraw onto parent */
|
/* Redraw onto parent */
|
||||||
redraw_transient (window);
|
redraw_transient (window);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Remove surface if we had made one before this was set */
|
/* TODO: Remove once we have proper transient window support. */
|
||||||
ensure_no_surface (window);
|
GdkWindow *
|
||||||
|
_gdk_mir_window_get_visible_transient_child (GdkWindow *window,
|
||||||
|
gdouble x,
|
||||||
|
gdouble y,
|
||||||
|
gdouble *out_x,
|
||||||
|
gdouble *out_y)
|
||||||
|
{
|
||||||
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
GdkWindow *child = NULL;
|
||||||
|
GList *i;
|
||||||
|
|
||||||
|
x -= window->x;
|
||||||
|
y -= window->y;
|
||||||
|
|
||||||
|
if (x < 0 || x >= window->width || y < 0 || y >= window->height)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
for (i = impl->transient_children; i && !child; i = i->next)
|
||||||
|
{
|
||||||
|
if (GDK_MIR_WINDOW_IMPL (GDK_WINDOW (i->data)->impl)->visible)
|
||||||
|
child = _gdk_mir_window_get_visible_transient_child (i->data, x, y, out_x, out_y);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (child)
|
||||||
|
return child;
|
||||||
|
|
||||||
|
*out_x = x;
|
||||||
|
*out_y = y;
|
||||||
|
|
||||||
|
return window;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO: Remove once we have proper transient window support. */
|
||||||
|
void
|
||||||
|
_gdk_mir_window_transient_children_foreach (GdkWindow *window,
|
||||||
|
void (*func) (GdkWindow *, gpointer),
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
g_list_foreach (impl->transient_children, (GFunc) func, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1254,7 +1314,7 @@ gdk_mir_window_impl_set_shadow_width (GdkWindow *window,
|
|||||||
gint top,
|
gint top,
|
||||||
gint bottom)
|
gint bottom)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_window_impl_set_shadow_width window=%p\n", window);
|
// g_printerr ("gdk_mir_window_impl_set_shadow_width window=%p\n", window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -1332,16 +1392,12 @@ find_eglconfig_for_window (GdkWindow *window,
|
|||||||
static GdkGLContext *
|
static GdkGLContext *
|
||||||
gdk_mir_window_impl_create_gl_context (GdkWindow *window,
|
gdk_mir_window_impl_create_gl_context (GdkWindow *window,
|
||||||
gboolean attached,
|
gboolean attached,
|
||||||
GdkGLProfile profile,
|
|
||||||
GdkGLContext *share,
|
GdkGLContext *share,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GdkDisplay *display = gdk_window_get_display (window);
|
GdkDisplay *display = gdk_window_get_display (window);
|
||||||
GdkMirGLContext *context;
|
GdkMirGLContext *context;
|
||||||
EGLContext ctx;
|
|
||||||
EGLConfig config;
|
EGLConfig config;
|
||||||
int i;
|
|
||||||
EGLint context_attribs[3];
|
|
||||||
|
|
||||||
if (!_gdk_mir_display_init_egl_display (display))
|
if (!_gdk_mir_display_init_egl_display (display))
|
||||||
{
|
{
|
||||||
@@ -1351,11 +1407,7 @@ gdk_mir_window_impl_create_gl_context (GdkWindow *window,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile == GDK_GL_PROFILE_DEFAULT)
|
if (!_gdk_mir_display_have_egl_khr_create_context (display))
|
||||||
profile = GDK_GL_PROFILE_LEGACY;
|
|
||||||
|
|
||||||
if (profile == GDK_GL_PROFILE_3_2_CORE &&
|
|
||||||
!_gdk_mir_display_have_egl_khr_create_context (display))
|
|
||||||
{
|
{
|
||||||
g_set_error_literal (error, GDK_GL_ERROR,
|
g_set_error_literal (error, GDK_GL_ERROR,
|
||||||
GDK_GL_ERROR_UNSUPPORTED_PROFILE,
|
GDK_GL_ERROR_UNSUPPORTED_PROFILE,
|
||||||
@@ -1366,38 +1418,13 @@ gdk_mir_window_impl_create_gl_context (GdkWindow *window,
|
|||||||
if (!find_eglconfig_for_window (window, &config, error))
|
if (!find_eglconfig_for_window (window, &config, error))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
i = 0;
|
|
||||||
if (profile == GDK_GL_PROFILE_3_2_CORE)
|
|
||||||
{
|
|
||||||
context_attribs[i++] = EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR;
|
|
||||||
context_attribs[i++] = EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
|
|
||||||
}
|
|
||||||
context_attribs[i++] = EGL_NONE;
|
|
||||||
|
|
||||||
ctx = eglCreateContext (_gdk_mir_display_get_egl_display (display),
|
|
||||||
config,
|
|
||||||
share ? GDK_MIR_GL_CONTEXT (share)->egl_context : EGL_NO_CONTEXT,
|
|
||||||
context_attribs);
|
|
||||||
if (ctx == NULL)
|
|
||||||
{
|
|
||||||
g_set_error_literal (error, GDK_GL_ERROR,
|
|
||||||
GDK_GL_ERROR_NOT_AVAILABLE,
|
|
||||||
_("Unable to create a GL context"));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
GDK_NOTE (OPENGL,
|
|
||||||
g_print ("Created EGL context[%p]\n", ctx));
|
|
||||||
|
|
||||||
context = g_object_new (GDK_TYPE_MIR_GL_CONTEXT,
|
context = g_object_new (GDK_TYPE_MIR_GL_CONTEXT,
|
||||||
"display", display,
|
"display", display,
|
||||||
"window", window,
|
"window", window,
|
||||||
"profile", profile,
|
|
||||||
"shared-context", share,
|
"shared-context", share,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
context->egl_config = config;
|
context->egl_config = config;
|
||||||
context->egl_context = ctx;
|
|
||||||
context->is_attached = attached;
|
context->is_attached = attached;
|
||||||
|
|
||||||
return GDK_GL_CONTEXT (context);
|
return GDK_GL_CONTEXT (context);
|
||||||
|
@@ -818,7 +818,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
|||||||
|
|
||||||
impl->view = NULL;
|
impl->view = NULL;
|
||||||
|
|
||||||
switch (attributes->window_type)
|
switch (window->window_type)
|
||||||
{
|
{
|
||||||
case GDK_WINDOW_TOPLEVEL:
|
case GDK_WINDOW_TOPLEVEL:
|
||||||
case GDK_WINDOW_TEMP:
|
case GDK_WINDOW_TEMP:
|
||||||
@@ -846,8 +846,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
|||||||
window->width,
|
window->width,
|
||||||
window->height);
|
window->height);
|
||||||
|
|
||||||
if (attributes->window_type == GDK_WINDOW_TEMP ||
|
if (window->window_type == GDK_WINDOW_TEMP ||
|
||||||
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
|
((attributes_mask & GDK_WA_TYPE_HINT) &&
|
||||||
|
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
|
||||||
{
|
{
|
||||||
style_mask = NSBorderlessWindowMask;
|
style_mask = NSBorderlessWindowMask;
|
||||||
}
|
}
|
||||||
@@ -2852,7 +2853,7 @@ gdk_quartz_window_get_scale_factor (GdkWindow *window)
|
|||||||
|
|
||||||
impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||||
|
|
||||||
if (gdk_quartz_osx_version() >= GDK_OSX_LION)
|
if (impl->toplevel != NULL && gdk_quartz_osx_version() >= GDK_OSX_LION)
|
||||||
return [(id <ScaleFactor>) impl->toplevel backingScaleFactor];
|
return [(id <ScaleFactor>) impl->toplevel backingScaleFactor];
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@@ -32,15 +32,15 @@
|
|||||||
|
|
||||||
static char *
|
static char *
|
||||||
gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
||||||
GAppInfo *info,
|
GAppInfo *info,
|
||||||
GList *files)
|
GList *files)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_wayland_app_launch_context_launch_failed (GAppLaunchContext *context,
|
gdk_wayland_app_launch_context_launch_failed (GAppLaunchContext *context,
|
||||||
const char *startup_notify_id)
|
const char *startup_notify_id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||||
* files for a list of changes. These files are distributed with
|
* files for a list of changes. These files are distributed with
|
||||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -59,6 +59,7 @@ struct _GdkWaylandCursor
|
|||||||
} surface;
|
} surface;
|
||||||
|
|
||||||
struct wl_cursor *wl_cursor;
|
struct wl_cursor *wl_cursor;
|
||||||
|
int scale;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkWaylandCursorClass
|
struct _GdkWaylandCursorClass
|
||||||
@@ -83,10 +84,18 @@ _gdk_wayland_display_finalize_cursors (GdkWaylandDisplay *display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
set_cursor_from_theme (GdkWaylandCursor *cursor, struct wl_cursor_theme *theme)
|
_gdk_wayland_cursor_update (GdkWaylandDisplay *wayland_display,
|
||||||
|
GdkWaylandCursor *cursor)
|
||||||
{
|
{
|
||||||
struct wl_cursor *c;
|
struct wl_cursor *c;
|
||||||
|
struct wl_cursor_theme *theme;
|
||||||
|
|
||||||
|
/* Do nothing if this is not a wl_cursor cursor. */
|
||||||
|
if (cursor->name == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
theme = _gdk_wayland_display_get_scaled_cursor_theme (wayland_display,
|
||||||
|
cursor->scale);
|
||||||
c = wl_cursor_theme_get_cursor (theme, cursor->name);
|
c = wl_cursor_theme_get_cursor (theme, cursor->name);
|
||||||
if (!c)
|
if (!c)
|
||||||
{
|
{
|
||||||
@@ -105,8 +114,7 @@ set_cursor_from_theme (GdkWaylandCursor *cursor, struct wl_cursor_theme *theme)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_gdk_wayland_display_update_cursors (GdkWaylandDisplay *display,
|
_gdk_wayland_display_update_cursors (GdkWaylandDisplay *display)
|
||||||
struct wl_cursor_theme *theme)
|
|
||||||
{
|
{
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
const char *name;
|
const char *name;
|
||||||
@@ -115,7 +123,7 @@ _gdk_wayland_display_update_cursors (GdkWaylandDisplay *display,
|
|||||||
g_hash_table_iter_init (&iter, display->cursor_cache);
|
g_hash_table_iter_init (&iter, display->cursor_cache);
|
||||||
|
|
||||||
while (g_hash_table_iter_next (&iter, (gpointer *) &name, (gpointer *) &cursor))
|
while (g_hash_table_iter_next (&iter, (gpointer *) &name, (gpointer *) &cursor))
|
||||||
set_cursor_from_theme (cursor, theme);
|
_gdk_wayland_cursor_update (display, cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -168,11 +176,11 @@ _gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
|
|||||||
|
|
||||||
*w = image->width;
|
*w = image->width;
|
||||||
*h = image->height;
|
*h = image->height;
|
||||||
*scale = 1;
|
*scale = wayland_cursor->scale;
|
||||||
|
|
||||||
return wl_cursor_image_get_buffer (image);
|
return wl_cursor_image_get_buffer (image);
|
||||||
}
|
}
|
||||||
else /* From surface */
|
else if (wayland_cursor->name == NULL) /* From surface */
|
||||||
{
|
{
|
||||||
*hotspot_x = wayland_cursor->surface.hotspot_x;
|
*hotspot_x = wayland_cursor->surface.hotspot_x;
|
||||||
*hotspot_y = wayland_cursor->surface.hotspot_y;
|
*hotspot_y = wayland_cursor->surface.hotspot_y;
|
||||||
@@ -185,9 +193,9 @@ _gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
|
|||||||
|
|
||||||
if (wayland_cursor->surface.cairo_surface)
|
if (wayland_cursor->surface.cairo_surface)
|
||||||
return _gdk_wayland_shm_surface_get_wl_buffer (wayland_cursor->surface.cairo_surface);
|
return _gdk_wayland_shm_surface_get_wl_buffer (wayland_cursor->surface.cairo_surface);
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
guint
|
guint
|
||||||
@@ -216,6 +224,28 @@ _gdk_wayland_cursor_get_next_image_index (GdkCursor *cursor,
|
|||||||
return current_image_index;
|
return current_image_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_gdk_wayland_cursor_set_scale (GdkCursor *cursor,
|
||||||
|
guint scale)
|
||||||
|
{
|
||||||
|
GdkWaylandDisplay *wayland_display =
|
||||||
|
GDK_WAYLAND_DISPLAY (gdk_cursor_get_display (cursor));
|
||||||
|
GdkWaylandCursor *wayland_cursor = GDK_WAYLAND_CURSOR (cursor);
|
||||||
|
|
||||||
|
if (scale > GDK_WAYLAND_MAX_THEME_SCALE)
|
||||||
|
{
|
||||||
|
g_warning (G_STRLOC ": cursor theme size %u too large", scale);
|
||||||
|
scale = GDK_WAYLAND_MAX_THEME_SCALE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wayland_cursor->scale == scale)
|
||||||
|
return;
|
||||||
|
|
||||||
|
wayland_cursor->scale = scale;
|
||||||
|
|
||||||
|
_gdk_wayland_cursor_update (wayland_display, wayland_cursor);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_gdk_wayland_cursor_class_init (GdkWaylandCursorClass *wayland_cursor_class)
|
_gdk_wayland_cursor_class_init (GdkWaylandCursorClass *wayland_cursor_class)
|
||||||
{
|
{
|
||||||
@@ -232,9 +262,15 @@ _gdk_wayland_cursor_init (GdkWaylandCursor *cursor)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GdkCursor *
|
||||||
|
_gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
|
||||||
|
const gchar *name,
|
||||||
|
guint scale);
|
||||||
|
|
||||||
GdkCursor *
|
GdkCursor *
|
||||||
_gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
|
_gdk_wayland_display_get_cursor_for_type_with_scale (GdkDisplay *display,
|
||||||
GdkCursorType cursor_type)
|
GdkCursorType cursor_type,
|
||||||
|
guint scale)
|
||||||
{
|
{
|
||||||
GEnumClass *enum_class;
|
GEnumClass *enum_class;
|
||||||
GEnumValue *enum_value;
|
GEnumValue *enum_value;
|
||||||
@@ -247,7 +283,9 @@ _gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
|
|||||||
g_strdelimit (cursor_name, "-", '_');
|
g_strdelimit (cursor_name, "-", '_');
|
||||||
g_type_class_unref (enum_class);
|
g_type_class_unref (enum_class);
|
||||||
|
|
||||||
result = _gdk_wayland_display_get_cursor_for_name (display, cursor_name);
|
result = _gdk_wayland_display_get_cursor_for_name_with_scale (display,
|
||||||
|
cursor_name,
|
||||||
|
scale);
|
||||||
|
|
||||||
g_free (cursor_name);
|
g_free (cursor_name);
|
||||||
|
|
||||||
@@ -255,8 +293,18 @@ _gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GdkCursor *
|
GdkCursor *
|
||||||
_gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
|
_gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
|
||||||
const gchar *name)
|
GdkCursorType cursor_type)
|
||||||
|
{
|
||||||
|
return _gdk_wayland_display_get_cursor_for_type_with_scale (display,
|
||||||
|
cursor_type,
|
||||||
|
1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static GdkCursor *
|
||||||
|
_gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
|
||||||
|
const gchar *name,
|
||||||
|
guint scale)
|
||||||
{
|
{
|
||||||
GdkWaylandCursor *private;
|
GdkWaylandCursor *private;
|
||||||
GdkWaylandDisplay *wayland_display = GDK_WAYLAND_DISPLAY (display);
|
GdkWaylandDisplay *wayland_display = GDK_WAYLAND_DISPLAY (display);
|
||||||
@@ -272,13 +320,13 @@ _gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
|
|||||||
"display", display,
|
"display", display,
|
||||||
NULL);
|
NULL);
|
||||||
private->name = g_strdup (name);
|
private->name = g_strdup (name);
|
||||||
private->surface.scale = 1;
|
private->scale = scale;
|
||||||
|
|
||||||
/* Blank cursor case */
|
/* Blank cursor case */
|
||||||
if (!name || g_str_equal (name, "blank_cursor"))
|
if (!name || g_str_equal (name, "blank_cursor"))
|
||||||
return GDK_CURSOR (private);
|
return GDK_CURSOR (private);
|
||||||
|
|
||||||
if (!set_cursor_from_theme (private, wayland_display->cursor_theme))
|
if (!_gdk_wayland_cursor_update (wayland_display, private))
|
||||||
return GDK_CURSOR (private);
|
return GDK_CURSOR (private);
|
||||||
|
|
||||||
/* Insert into cache. */
|
/* Insert into cache. */
|
||||||
@@ -286,6 +334,13 @@ _gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
|
|||||||
return GDK_CURSOR (private);
|
return GDK_CURSOR (private);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GdkCursor *
|
||||||
|
_gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
|
||||||
|
const gchar *name)
|
||||||
|
{
|
||||||
|
return _gdk_wayland_display_get_cursor_for_name_with_scale (display, name, 1);
|
||||||
|
}
|
||||||
|
|
||||||
GdkCursor *
|
GdkCursor *
|
||||||
_gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
|
_gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
|
||||||
cairo_surface_t *surface,
|
cairo_surface_t *surface,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user