Compare commits
708 Commits
async-colo
...
3.22.18
Author | SHA1 | Date | |
---|---|---|---|
|
e1cf6281fe | ||
|
a6a547c2e0 | ||
|
4ce5bed724 | ||
|
cf955a5459 | ||
|
12805a4fbf | ||
|
65b18a4fc1 | ||
|
66b24f29e1 | ||
|
1031fa914a | ||
|
2b049d5d66 | ||
|
777caab077 | ||
|
b5b0c57a95 | ||
|
69576cd510 | ||
|
f70796dea3 | ||
|
b03f787a99 | ||
|
fd5e929905 | ||
|
9d532da2dd | ||
|
43195fd997 | ||
|
c48297ed12 | ||
|
a86de5905c | ||
|
78b4885fe8 | ||
|
46a8559cd4 | ||
|
fe5f650088 | ||
|
9af612d314 | ||
|
4ba86706be | ||
|
ef7ee16368 | ||
|
8a17848f02 | ||
|
5acee3a3e0 | ||
|
1c23bce350 | ||
|
7dd3349751 | ||
|
6063a89235 | ||
|
a381a06b12 | ||
|
cd7e5fae22 | ||
|
5e6293e54f | ||
|
0b230d34c4 | ||
|
1088056a5d | ||
|
505d5e41c2 | ||
|
df10ec7b9b | ||
|
ce792384c5 | ||
|
3680e3d40b | ||
|
ad06a08b99 | ||
|
d9170e1978 | ||
|
a30220d4e3 | ||
|
c0d88a5b7b | ||
|
9b032073cb | ||
|
54c26e0983 | ||
|
d6d4217f3d | ||
|
0daf796763 | ||
|
b53a6fb092 | ||
|
18eeaf704e | ||
|
3f09833253 | ||
|
32919a4a02 | ||
|
e6863da8fc | ||
|
3a83de295d | ||
|
376ff1ae60 | ||
|
f78585b7c3 | ||
|
59857e8f20 | ||
|
448d76b8e8 | ||
|
65b6aafb45 | ||
|
5edeba5965 | ||
|
743eaeecf2 | ||
|
68b92cc6ef | ||
|
fc1f0b171c | ||
|
ff982658ee | ||
|
f05e6b2936 | ||
|
7e362638ac | ||
|
4b6c68b51e | ||
|
8c691b8232 | ||
|
626ac112f0 | ||
|
291eda6675 | ||
|
2f6c90636d | ||
|
db87140cf3 | ||
|
6d104813cc | ||
|
af7022988c | ||
|
ce4c9a9ad6 | ||
|
1dd559134c | ||
|
a6dcb80fb4 | ||
|
91614e38e3 | ||
|
15e361e793 | ||
|
c23205dc82 | ||
|
ac21aff55b | ||
|
3d9a945803 | ||
|
6ecf0ff055 | ||
|
d33540c607 | ||
|
fcb00d7493 | ||
|
bb13421fd3 | ||
|
4bb0d25c5b | ||
|
1a6ccd1b0a | ||
|
33fbad4580 | ||
|
4bbf444a1a | ||
|
9e740bd435 | ||
|
fdb3cc94f6 | ||
|
9b1c175961 | ||
|
d1f53b1e07 | ||
|
aed628f100 | ||
|
6f4e4952a3 | ||
|
d940388561 | ||
|
9d5c6aaabc | ||
|
3b5195c44f | ||
|
2eb389c951 | ||
|
23b7e81ed4 | ||
|
51b1445cd1 | ||
|
ebb00ad680 | ||
|
2aa4248e8f | ||
|
fcfad2dd7e | ||
|
7214f4d4c9 | ||
|
d9a9530f28 | ||
|
2d41d772d7 | ||
|
c94f40b893 | ||
|
63e05158ea | ||
|
a2e2f38642 | ||
|
6b3f2131c5 | ||
|
3850574146 | ||
|
c7fd37bd5b | ||
|
ae4bd65acd | ||
|
1cb3fc75b3 | ||
|
712a8adbd9 | ||
|
cfaaf8300d | ||
|
bebd5020ec | ||
|
1d52356855 | ||
|
425e4df100 | ||
|
b492db25a1 | ||
|
e5ed52b6c9 | ||
|
dba57db1f3 | ||
|
8cf774d668 | ||
|
91f83011da | ||
|
7d5ac88232 | ||
|
eb8870c912 | ||
|
a2c8af7f32 | ||
|
94dd289fd0 | ||
|
3380cd63c1 | ||
|
46decc6182 | ||
|
7adc38a64c | ||
|
b831e97af4 | ||
|
48ee8016c8 | ||
|
6c9b11d367 | ||
|
c08f2cb7b5 | ||
|
5209995171 | ||
|
de4818f088 | ||
|
622a0f8611 | ||
|
15f3a527ef | ||
|
67953e9cfb | ||
|
4d1c0317cc | ||
|
16e23bebe3 | ||
|
2dfcb47190 | ||
|
73179d3771 | ||
|
866bd834e4 | ||
|
31a0eead4c | ||
|
5c98b2b8ed | ||
|
e0ad573c82 | ||
|
a3178fd665 | ||
|
1a489831b3 | ||
|
801e9cf74b | ||
|
a3b852e9ac | ||
|
2b0eafb8dc | ||
|
d8bb38588a | ||
|
eba10161c1 | ||
|
a7db887c0b | ||
|
5376fa36a8 | ||
|
dc471fa258 | ||
|
d237b255f9 | ||
|
d9e0ea2905 | ||
|
01a94a06e7 | ||
|
9f402d15bc | ||
|
3e48a80d85 | ||
|
5336998bee | ||
|
c05c78f9c9 | ||
|
f2f09b9574 | ||
|
bb1679b247 | ||
|
853ce80137 | ||
|
31c72bd7df | ||
|
f3f71ef0ac | ||
|
dfe993ff1d | ||
|
64312d79f7 | ||
|
6f326a71d4 | ||
|
0f929fb6e3 | ||
|
7c66c68f48 | ||
|
ab4e4bd3ae | ||
|
e016d9a5db | ||
|
088cf99763 | ||
|
001fa0a810 | ||
|
656130a032 | ||
|
4496c5388b | ||
|
7e9077c794 | ||
|
7d9450fb60 | ||
|
1fb9db547d | ||
|
57031135a0 | ||
|
5269d134b0 | ||
|
aded963251 | ||
|
4452414635 | ||
|
6a9d6d5986 | ||
|
7299f3942e | ||
|
182d984a1f | ||
|
c8d8956a6d | ||
|
1302c8046e | ||
|
a647eb04e2 | ||
|
c770b5cbbc | ||
|
6071006206 | ||
|
a866937d08 | ||
|
1a16991254 | ||
|
11f746e204 | ||
|
edf00914e5 | ||
|
1cd0a8de0b | ||
|
9f8b1a8aa8 | ||
|
b7fdc5b447 | ||
|
9b05176eb2 | ||
|
34c135be7c | ||
|
0a7151b22e | ||
|
7798764377 | ||
|
687b38f87e | ||
|
d94f16562e | ||
|
ae6f95878e | ||
|
918445bf40 | ||
|
60a1e1d0e9 | ||
|
7ab48458a0 | ||
|
fba4e8fb47 | ||
|
b5eb37eba4 | ||
|
991e84fe3a | ||
|
930acacf94 | ||
|
42aa4c138c | ||
|
9b5a92f5cc | ||
|
dfb5d11a53 | ||
|
6e87915b05 | ||
|
4f3ff05943 | ||
|
8ec4a65f52 | ||
|
28d2edcb22 | ||
|
0c8ad72410 | ||
|
02d537834a | ||
|
124b62881a | ||
|
85f25f4a3e | ||
|
6e711beb0b | ||
|
efbe40214b | ||
|
81bfc91c7a | ||
|
f82329de35 | ||
|
b6aaae7dea | ||
|
8074626fc6 | ||
|
dbfa8e86c5 | ||
|
2ad14d393b | ||
|
2f851530f4 | ||
|
ecf9c06ada | ||
|
01b7307296 | ||
|
69234066a4 | ||
|
1082b77702 | ||
|
7cb6ab37f3 | ||
|
6eeb546c4a | ||
|
30b961c84b | ||
|
cc53017b3e | ||
|
cff35b36a3 | ||
|
08887f0577 | ||
|
87b579cf2b | ||
|
536f713a1c | ||
|
c3d759c3b6 | ||
|
a7ca5335e4 | ||
|
80a177db8b | ||
|
12155b4ee3 | ||
|
0155009d57 | ||
|
a331741117 | ||
|
2224fb58dd | ||
|
d190263272 | ||
|
931f7863ec | ||
|
a7f3fd12d5 | ||
|
6f30e97c3d | ||
|
92fd8cb81b | ||
|
ff1a78788f | ||
|
6adc00ef1d | ||
|
54ffec9bb0 | ||
|
369377369f | ||
|
93d68270c4 | ||
|
16b9e8261d | ||
|
3178a7a301 | ||
|
57ea1796e3 | ||
|
d2c79b966b | ||
|
1daa41bf96 | ||
|
d689ee7d7e | ||
|
a92ca3518b | ||
|
7074607635 | ||
|
e63748f231 | ||
|
a7ebe62e67 | ||
|
b04a863328 | ||
|
122cbcf17f | ||
|
9c52d8e8f0 | ||
|
61c85ba89d | ||
|
b73e6ffbd8 | ||
|
76eb8e3e98 | ||
|
98fe7f5b5c | ||
|
64ec7c2640 | ||
|
c3190edd93 | ||
|
ad5d95e062 | ||
|
3be1bffc77 | ||
|
16e36e5399 | ||
|
f0e3781566 | ||
|
91f4b0c31f | ||
|
05a060c6a6 | ||
|
b8d88eb960 | ||
|
52a4f73bc6 | ||
|
8bf40ebb88 | ||
|
ad50af4011 | ||
|
dc05a8e7fb | ||
|
6a02bd4fa9 | ||
|
9caa50ca0d | ||
|
b4df881542 | ||
|
e387f807e4 | ||
|
504321019e | ||
|
4a8ad03e10 | ||
|
112437f5ad | ||
|
2fdcdfa403 | ||
|
c00448f7c6 | ||
|
5bdc85d34e | ||
|
5f24d87a5b | ||
|
ec30a03153 | ||
|
685493075f | ||
|
39d5f22774 | ||
|
9f1916f29e | ||
|
5059348d9f | ||
|
4bec5432ce | ||
|
0349574b47 | ||
|
77f01c374b | ||
|
e63d4111a4 | ||
|
41d3f99e44 | ||
|
629c931f1f | ||
|
7160e3a12f | ||
|
31832f8648 | ||
|
06cf2c84a4 | ||
|
e4bbb5bb0b | ||
|
d65851f7db | ||
|
7dcb94579a | ||
|
de9a399eaa | ||
|
a6432cc6d0 | ||
|
ff779af97f | ||
|
76d7c0bbed | ||
|
02b5886975 | ||
|
0bada2506e | ||
|
17da1e9f35 | ||
|
d6166921a8 | ||
|
f7479bf369 | ||
|
1880cf48ad | ||
|
e44e7ba0df | ||
|
ec8192420e | ||
|
4b38a39c9d | ||
|
76af1904db | ||
|
cf1e2b9042 | ||
|
36e1761c84 | ||
|
313ae3ad01 | ||
|
ecdd353266 | ||
|
fb53855fc8 | ||
|
fc81dc17d4 | ||
|
8817c1ad6d | ||
|
6f3d1e1046 | ||
|
45d33b063f | ||
|
7949069b9d | ||
|
a497938358 | ||
|
953abc19da | ||
|
60e7e15f54 | ||
|
aebe3a74ec | ||
|
75e98fd252 | ||
|
c391417838 | ||
|
ce1b2bef2b | ||
|
20ee36f9e0 | ||
|
bd4f861727 | ||
|
a9c70c4fe6 | ||
|
4146d7f3cc | ||
|
7c09153d20 | ||
|
e2666ba96d | ||
|
c676d4268e | ||
|
6259794709 | ||
|
a6c925e836 | ||
|
8d3102e1a9 | ||
|
375a68fc6b | ||
|
29f2da5587 | ||
|
68188fc948 | ||
|
c3a2e0035c | ||
|
85f2c5f830 | ||
|
06f7728631 | ||
|
e5b6375914 | ||
|
03429df872 | ||
|
00b8b18795 | ||
|
188929e2ea | ||
|
555847d44f | ||
|
4e61aaa0a4 | ||
|
13f781d99d | ||
|
42108a82c7 | ||
|
2e4fb45435 | ||
|
f3b3acfe53 | ||
|
4f7e9bf25f | ||
|
22ca110a60 | ||
|
cc0e6eb374 | ||
|
fbd876fe93 | ||
|
367e021652 | ||
|
3e5d5f8899 | ||
|
393e7aacc6 | ||
|
a3d70b4ab2 | ||
|
0c20604932 | ||
|
563063d66b | ||
|
0478bfd37b | ||
|
b3b2f6b5d4 | ||
|
ee6c514406 | ||
|
f9df0fc94c | ||
|
1d0fad3d70 | ||
|
11f81e77f9 | ||
|
a6ba8df4b7 | ||
|
c4874aeaa5 | ||
|
6cdeac1c6a | ||
|
a729eeab0a | ||
|
42d8b70b0e | ||
|
8aa9fb38a3 | ||
|
98c04230c3 | ||
|
26cab782cd | ||
|
d825c34ca3 | ||
|
fdc79c804a | ||
|
c6f0df26f6 | ||
|
eca35180f9 | ||
|
d93dd81e65 | ||
|
72ac208052 | ||
|
e4fbfde07b | ||
|
da0291950d | ||
|
f2febf7c71 | ||
|
c495ffb1ba | ||
|
977b26dcf5 | ||
|
f8af23553b | ||
|
104c9ac845 | ||
|
9589505e19 | ||
|
dad4aecfc0 | ||
|
dca4f1e715 | ||
|
8f01d6c5f4 | ||
|
efde7d15aa | ||
|
7ec16c5c53 | ||
|
e338b4589d | ||
|
eaf9fc60bf | ||
|
644c2d9617 | ||
|
494d8f36aa | ||
|
09b2c54d41 | ||
|
43de771574 | ||
|
d9947b671a | ||
|
14c8e25cb2 | ||
|
3708e5cc7c | ||
|
baa83e9753 | ||
|
8caaba82cc | ||
|
5d7db3246e | ||
|
a95feb4984 | ||
|
aff42686ce | ||
|
167ef42c5c | ||
|
f705d0a5fa | ||
|
7401794de6 | ||
|
4a5cd127ff | ||
|
e831bb6ce7 | ||
|
1063460db2 | ||
|
a7ff95ce73 | ||
|
bbcc3ee456 | ||
|
bd3d7b8a9a | ||
|
0f2e19c010 | ||
|
eb26b57cba | ||
|
b7cfe3c778 | ||
|
a58dd993b2 | ||
|
8377850127 | ||
|
4a6bd134bd | ||
|
ccba2eaace | ||
|
e98e6f73be | ||
|
dfe89a381f | ||
|
ac4e1625f5 | ||
|
31fee675e4 | ||
|
f4a0f2e5ca | ||
|
4f80d234bf | ||
|
33c10204e4 | ||
|
248ef2d6a0 | ||
|
41732391d8 | ||
|
5c4c3f1afd | ||
|
210d1279e5 | ||
|
0acb58b40f | ||
|
b6baa088dc | ||
|
a22e80122e | ||
|
9a5ffcd1b5 | ||
|
afd19e9433 | ||
|
21a71e94c6 | ||
|
2e7d5c08cb | ||
|
6da8cbc87e | ||
|
99abc6363a | ||
|
22b1e0b678 | ||
|
eece8a7dd2 | ||
|
ca79296061 | ||
|
cc4ea94d8b | ||
|
ab66c3d7bf | ||
|
eb57651ff7 | ||
|
c4f1545c5e | ||
|
125ef3539c | ||
|
3326fba524 | ||
|
51645b5851 | ||
|
074f391f10 | ||
|
ea4af401d7 | ||
|
8b118eb8b5 | ||
|
dd406c8062 | ||
|
a7b0af5d8d | ||
|
5bae71f896 | ||
|
bea4c0898d | ||
|
41b14fd148 | ||
|
34264667ed | ||
|
790d5960c4 | ||
|
9a2527b361 | ||
|
92f6bcdca6 | ||
|
c7096c4586 | ||
|
eceb9add1f | ||
|
e75601c058 | ||
|
7960e94112 | ||
|
d9748563c8 | ||
|
1fc3fe4a0a | ||
|
c7dce1018b | ||
|
f19ecbb850 | ||
|
a1aee4602c | ||
|
e0856226c5 | ||
|
8155c33d80 | ||
|
9679ef6b00 | ||
|
30b5187e60 | ||
|
3073419ff1 | ||
|
e779ec4b1f | ||
|
bebcb5e094 | ||
|
2b32008eeb | ||
|
78f8f236e9 | ||
|
da43bfd272 | ||
|
33e4826efd | ||
|
e04654f865 | ||
|
a8991a6bea | ||
|
5b12c21d20 | ||
|
44fb5c9c70 | ||
|
7f39c7cbf7 | ||
|
155dbaaa14 | ||
|
d55aa2a859 | ||
|
42d7f81649 | ||
|
a793f8f243 | ||
|
8952975304 | ||
|
e6d7df7233 | ||
|
35e6a8eb0d | ||
|
7fca502115 | ||
|
f50ed5b358 | ||
|
3971439a17 | ||
|
43b2b107f1 | ||
|
c70ba3a4f0 | ||
|
57a14565c6 | ||
|
197eaaacb7 | ||
|
f7fb610278 | ||
|
17ec4f10e4 | ||
|
cf4fd0d3e3 | ||
|
0b129f3534 | ||
|
f8d90378a4 | ||
|
2f940d91a0 | ||
|
ca75748223 | ||
|
5282991ab9 | ||
|
6c0cd1a16d | ||
|
605303681b | ||
|
4cd8796c0e | ||
|
cc6335d94d | ||
|
ecb38bc824 | ||
|
dd3cf38c53 | ||
|
43b9b7f4e6 | ||
|
7d695068e2 | ||
|
da9bd46aed | ||
|
6e856f6226 | ||
|
66a08bf3a6 | ||
|
dd6a00bb31 | ||
|
61a57465ea | ||
|
f40191ff19 | ||
|
aa1307a787 | ||
|
5301644a3f | ||
|
157b630d72 | ||
|
462a5df644 | ||
|
4bc2904dae | ||
|
4569bb372f | ||
|
dc184902d7 | ||
|
0b46c5b176 | ||
|
4805780016 | ||
|
042e37e6cc | ||
|
748a1450a8 | ||
|
8b334fef63 | ||
|
595ef21feb | ||
|
71b859a9ce | ||
|
504beaddb1 | ||
|
c5f6d61783 | ||
|
dbcbaac982 | ||
|
0103bbf5eb | ||
|
24f5d99be9 | ||
|
528b80a165 | ||
|
25fd5710f7 | ||
|
13ccbd0111 | ||
|
7f7501b1e7 | ||
|
9a257e1f6a | ||
|
a28022e916 | ||
|
14545342d5 | ||
|
cc0c286869 | ||
|
57f551a114 | ||
|
f70039cb96 | ||
|
c1507cf680 | ||
|
a820acee00 | ||
|
d3bdd384a1 | ||
|
27b68ff193 | ||
|
bf560369f2 | ||
|
cb53562659 | ||
|
275bbbf88d | ||
|
9e5510420c | ||
|
53474fa404 | ||
|
f8900e5ac4 | ||
|
4657e21be8 | ||
|
f9796b01ff | ||
|
04f3940488 | ||
|
255225584e | ||
|
0bccddb2ff | ||
|
75ee402c6a | ||
|
305f473f73 | ||
|
2bdfed2da2 | ||
|
dbc0337498 | ||
|
96e7fbde2e | ||
|
a68460847e | ||
|
34d45def37 | ||
|
11a4dcba77 | ||
|
99fed96b44 | ||
|
a61d7f7acf | ||
|
4add92a431 | ||
|
a64a0bc617 | ||
|
bd2d1ccc13 | ||
|
04db216026 | ||
|
03de0c3444 | ||
|
b3e3946b2f | ||
|
c5a9c0db80 | ||
|
a47a3fbd3b | ||
|
39a8a6ef72 | ||
|
dbd5fb43ab | ||
|
209e01fd91 | ||
|
29b2828c9d | ||
|
5fa8def9df | ||
|
28ce953caa | ||
|
0ad5d51d8a | ||
|
b67a1c7f39 | ||
|
45cf4c7d57 | ||
|
be1af1e01b | ||
|
eb43c3e6b6 | ||
|
dd91ac7086 | ||
|
038766a82f | ||
|
271211da8c | ||
|
c54f348edf | ||
|
94c6d19415 | ||
|
21d0de30ac | ||
|
27029a79fa | ||
|
f2bdf6e372 | ||
|
a1115c05be | ||
|
4cdd4d03cc | ||
|
ffb1ac56a8 | ||
|
e51d73afa3 | ||
|
3ad1677a3a | ||
|
2b527d6e97 | ||
|
6ee17810d1 | ||
|
803362bb5d | ||
|
d40c6f180f | ||
|
440ff48bba | ||
|
eaff061b48 | ||
|
cd495a26b7 | ||
|
a372f554eb | ||
|
72baa37452 | ||
|
796107c833 | ||
|
b109d25e8b | ||
|
0ca9b468b8 | ||
|
d3ad642519 | ||
|
61fc7ddd87 | ||
|
0d104b041a | ||
|
ebd2487df2 | ||
|
ad258bc81c | ||
|
d47d342012 | ||
|
c46c744529 | ||
|
49f2ed37cd | ||
|
424b59aec6 | ||
|
db41f815c7 | ||
|
bece404043 | ||
|
91d4879f82 | ||
|
eda51b4ef5 | ||
|
2dfaae6737 | ||
|
e75314ec17 | ||
|
f3d78aff12 | ||
|
d93f8b00ad | ||
|
b1bb8c2e85 | ||
|
38056d0f6e | ||
|
6660dc5186 | ||
|
29e586fe2e | ||
|
6f7a6f769f | ||
|
bc99feffe2 | ||
|
00cf0587a9 | ||
|
149351048e | ||
|
1e2e736d0d | ||
|
17bcd0d127 | ||
|
45528cf5b5 | ||
|
29fbeea84d | ||
|
3eb53e9e7c | ||
|
b3af460860 | ||
|
4100a848a7 | ||
|
e2f5425a1d | ||
|
12579fe71b | ||
|
dd9a9d9dcc | ||
|
0ecc4ac7de | ||
|
c41294e2be | ||
|
9af1353e6d | ||
|
f60605e758 | ||
|
e74dc54567 | ||
|
90ac584437 | ||
|
bfc6287910 | ||
|
19aa3a4fca | ||
|
0757914aba | ||
|
e11df6cca0 | ||
|
8c0738113e | ||
|
0a08a199d8 | ||
|
051fddaa61 | ||
|
154b2a124b | ||
|
1eed051c41 | ||
|
8d14c5c7cd | ||
|
17c08d062f |
441
NEWS
441
NEWS
@@ -1,3 +1,444 @@
|
||||
Overview of Changes in GTK+ 3.22.18
|
||||
===================================
|
||||
|
||||
* Support entering emoji by name, using Ctrl-Shift-E
|
||||
|
||||
* Wayland:
|
||||
- Add support for the shortcut inhibitor protocol
|
||||
- Support Wacome tablet wheel scrolling
|
||||
|
||||
* Bug fixes:
|
||||
771959 gtk_init_with_args fails when no display is found / does not comply w...
|
||||
776903 Label with hyperlinks cannot be opened with touch on wayland
|
||||
776909 gtk_adjustment_clamp_page: Conditional jump or move depends on uninit...
|
||||
777333 In a GNOME Wayland session, gnome-terminal windows cannot be moved ar...
|
||||
777515 gtk3-icon-browser doesn't list document-edit-symbolic icon
|
||||
778188 VTE crashes on multiple repeated BELL chars
|
||||
780938 No icon tooltip shown in GtkEntry
|
||||
781246 Return value of gtk_widget_get_parent_window should be marked (nullable)
|
||||
782870 X11 Grabbing Broken with GtkScrolledWindow
|
||||
783343 Wayland: RFC - add shortcut inhibitor support
|
||||
783649 negative content width warning in GtkLevelbar
|
||||
783716 Support wayland-tablet wheel events
|
||||
783906 gtk_accelerator_get_label broken
|
||||
784624 process-stop-symbolic hardcoded as app menu fallback
|
||||
785255 Quitting world's simplest program containing a single GtkEntry causes...
|
||||
785375 Cursors for Wacom tablets are not always updated correctly under Wayland
|
||||
785423 Missing nullable annotation for gtk_bin_get_child
|
||||
785672 Entry: Setting icon tooltip to empty disables tooltip on whole widget
|
||||
|
||||
* Translation updates:
|
||||
Finnish
|
||||
Slovenian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.17
|
||||
===================================
|
||||
|
||||
* Add native file chooser support for OS X
|
||||
|
||||
* Bug fixes:
|
||||
766517 GtkAboutDialog should use https:// license URLs
|
||||
781583 gtk_image_new_from_resource does not work
|
||||
781935 Add nullable return annotation to gtk_notebook_get_tab_label
|
||||
781936 Add nullable return annotation to gtk_text_mark_get_name
|
||||
782040 Wacom pen calibration application responds to mouse input
|
||||
782325 wayland: Add possibility to get the exported handle multiple times
|
||||
784323 Quartz backend: gtk_clipboard_get_default not implemented
|
||||
784723 macOS: native file chooser dialog
|
||||
784888 gtkapplication: Mark gtk_application_get_active_window() as nullable
|
||||
|
||||
* Translation updates:
|
||||
Friulian
|
||||
Kazakh
|
||||
|
||||
Overview of Changes in GTK+ 3.22.16
|
||||
===================================
|
||||
|
||||
* GtkEntryBuffer no longer emits changed events when input is truncated
|
||||
|
||||
* gtk3-icon-browser now offers to copy the icon name to the clipboard
|
||||
|
||||
* Bugs fixed:
|
||||
745289 wayland: do not use g_error() on connection errors
|
||||
759308 Instant apply in printing dialog (number of copies)
|
||||
770513 MainToolbar in full-screen mode has rounded corners, which show video pixel...
|
||||
778853 propagate-natural-width/height request too much with !overlay-scrolling && ...
|
||||
779078 Adwaita: last treeview header button adds border on hover
|
||||
781285 Key repeat cancel under Wayland should depend on which key is repeating
|
||||
781945 SIGSEGV dragging window on Wayland when toplevel window set_transient_for i...
|
||||
782117 If a window was initially shown undecorated and set_decorated(True) is call...
|
||||
782283 Wayland: Crash when dismissing a menu when a tooltip is visible
|
||||
782325 wayland: Add possibility to get the exported handle multiple times
|
||||
783047 Many apps crash in gdk_event_source_prepare when logging out of GNOME
|
||||
783347 gtkfilechoosernativewin32: Fix support for non-ASCII paths
|
||||
783397 Remove unused code in gtktextdisplay.c
|
||||
783587 Crash when NULL is passed to GtkActionHelper to unset action-name
|
||||
|
||||
* Translation updates
|
||||
Czech
|
||||
Lithuanian
|
||||
Norwegian bokmål
|
||||
Serbian
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.15
|
||||
===================================
|
||||
|
||||
* Revert an unexpected change in listbox behavior
|
||||
|
||||
* Improve the Adwaita style for tagged entries
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.14
|
||||
===================================
|
||||
|
||||
* Bug fixes:
|
||||
- Fix build without sassc
|
||||
- Fix clipboard handling of UTF8 text
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.13
|
||||
===================================
|
||||
|
||||
* Bug fixes:
|
||||
358970 gtk_scale_set_digits does not cause value to be rounded if draw-value is false...
|
||||
771269 Open in new tab / window doesn't work on unmounted file systems
|
||||
773814 attempt to allocate widget with width -700975964 and height 400
|
||||
778301 GtkTooltip doesn't clear source ID in all circumstances
|
||||
778617 GtkListBox: placeholder is not removed properly
|
||||
779570 popover: Add more padding between checkbox and label
|
||||
780301 wayland: Fix harmless clang warnings
|
||||
781118 gtk 3.22.12 quartz backend segfault
|
||||
781162 Make GtkPlacesView monitor network
|
||||
781195 Fix testsuite for GtkPlacesView
|
||||
781214 define entry-tag in Adwaita.
|
||||
781422 translate_wm_button_layout_to_gtk() is licensed under the GPL
|
||||
781605 GtkVolumeButton limited to 10 values
|
||||
781622 gtkplacesview.ui: Update helper label to include IPv6 addresses
|
||||
781737 Drag icon is always postioned in the top left corner
|
||||
781767 Wayland: increase key delivery verbosity
|
||||
781814 Applications don't receive clipboard when data source mimetype is "text/plain;...
|
||||
781992 GtkMenuButton with no popover retains prelight state when no longer selected
|
||||
782109 wayland: memory leak when exporting handle
|
||||
782180 commit "Improve GContentType" usage breaks apps on win32 (example: virt-viewer)
|
||||
782202 linkbutton: Fix memory leak
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Croatian
|
||||
German
|
||||
Hungarian
|
||||
Indonesian
|
||||
Italian
|
||||
Latvian
|
||||
Polish
|
||||
Russian
|
||||
Serbian
|
||||
Slovak
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.12
|
||||
===================================
|
||||
|
||||
* Bugs:
|
||||
686838 gtk_enumerate_printers() hangs
|
||||
734946 Implement GContentType on OSX
|
||||
773228 third parameter of gtk_widget_intersect not listed as 'out'
|
||||
776472 Crash in gnome-terminal due to gdk_window_process_all_updates calling...
|
||||
778853 propagate-natural-width/height request too much with !overlay-scrolling...
|
||||
779081 GtkTextView: expose API to get Pango line direction
|
||||
779184 Gtk+4 (3.89.4) with Quartz backend: all apps segfault
|
||||
780041 Optionally depend on sassc to generate the theme CSS
|
||||
780234 gtk_print_job_set_page_ranges() has unclear ownership transfer
|
||||
780734 flowbox: don’t try to focus or draw NULL widgets
|
||||
780735 flowbox: don’t select when rubberbanding over nothing
|
||||
780878 docs: Point links to correct versions
|
||||
780994 Icons are blurry
|
||||
|
||||
* Translation updates:
|
||||
Catalan
|
||||
Greek
|
||||
Hebrew
|
||||
Indonesian
|
||||
Norwegian bokmål
|
||||
Polish
|
||||
Russian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.11
|
||||
===================================
|
||||
|
||||
* Quartz:
|
||||
- Fix build on < 10.12
|
||||
|
||||
* Cosmetic fixes
|
||||
|
||||
* Avoid a critical warning in the filechooser portal
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.10
|
||||
===================================
|
||||
|
||||
* Theme: Improve styling for flow boxes
|
||||
|
||||
* Quartz:
|
||||
- Support fullscreen CSD windows
|
||||
- Implement backdrop
|
||||
- Implement gdk_window_set_functions
|
||||
|
||||
* Bugs fixed:
|
||||
778905 Frame: documented flat style class is not usable
|
||||
779073 style flowbox tiles
|
||||
779074 style selectionmode checkboxes for flowbox
|
||||
779317 gtk_pad_controllerpad_set_action issue with incorrect assert
|
||||
779374 Unprovoked key repeat in gnome-terminal after in 3.22.9
|
||||
779383 quartz: Let CSD windows be fullscreen
|
||||
779392 Implement backdrop for Quartz
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
Czech
|
||||
Danish
|
||||
Icelandic
|
||||
Indonesian
|
||||
Korean
|
||||
Scottish Gaelic
|
||||
Slovak
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.9
|
||||
==================================
|
||||
|
||||
* Bugs fixed:
|
||||
136059 Ctrl-navigation works in opposite direction in right-to-left text
|
||||
776821 Scale factor not properly propagated upon reparent
|
||||
778203 icon shown at top left corner when dnd begins
|
||||
778328 Pressure sensitivity lost after removing pen from screen (Surface Book/MyPaint)
|
||||
778534 Widget: Document signal mnemonic-activate
|
||||
778678 gtkshow: Prefer gtk_show_uri_on_window() which works for sandboxed apps
|
||||
778726 Use gtk_show_uri_on_window()
|
||||
778746 Rename popover is sometimes misplaced
|
||||
778835 Wrong screen size returned when in HiDPI mode
|
||||
778905 Frame: documented flat style class is not usable
|
||||
779005 GtkFrame: Fix shadow after theme changes
|
||||
136059 Ctrl-navigation works in opposite direction in right-to-left text
|
||||
772505 Wayland: menu does not resize after disabling an action
|
||||
774148 Gtk.Popover misplacement in Wayland
|
||||
778019 Key repeat under wayland behaves differently, making keyboard navigation e.g. in
|
||||
vim annoyingly unreliable
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Chinese
|
||||
Chinese (Taiwan)
|
||||
Galician
|
||||
German
|
||||
Hungarian
|
||||
Italian
|
||||
Lithuanian
|
||||
Polish
|
||||
Serbian
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.8
|
||||
==================================
|
||||
|
||||
* Wayland:
|
||||
- Avoid overlap between Alt and Meta
|
||||
|
||||
* Mir:
|
||||
- Implement window properties
|
||||
- Track window focus
|
||||
- Connect to content-hub and use it for copy/paste
|
||||
- Use modal hint
|
||||
|
||||
* Bugs fixed:
|
||||
358970 gtk_scale_set_digits does not cause value to be rounded if draw-value...
|
||||
765161 on win32 maximized window position wrong when windows toolbar is on l...
|
||||
765410 Scrollbar does not update since 3.20
|
||||
770112 The documented <alt>left shortcut doesn’t work on Wayland
|
||||
773686 Software when launched shows in dash with wrong icon, name and menu
|
||||
775732 mir: clipboard support missing
|
||||
775864 getting-started: typo tie->the
|
||||
777527 GDK W32: Invisible drop-down menus in GTK apps when working via RDP
|
||||
777547 Notebook arrow icon wrong color after closing final tab
|
||||
|
||||
* Translation updates:
|
||||
Simplified Chinese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.7
|
||||
==================================
|
||||
|
||||
* Bugs fixed:
|
||||
165385 Win32 keyboard handling still incomplete
|
||||
769214 keyval field not filled correctly for Pause key
|
||||
769835 On Wayland, application containing GtkGLArea stops responding if it's not...
|
||||
774726 GtkTreeView dnd: gtk_drag_finish remove row when reorder sinse 3.20
|
||||
775846 gdk/wayland: Add support for the gtk-enable-primary-paste gsetting
|
||||
776031 W32: Winkey+down minimizes maximized window instead of restoring it
|
||||
776225 [wayland] dropdown placed somewhere in the screen
|
||||
776485 GDK W32: Impossible to restore maximized window via system menu
|
||||
776807 GtkInspector doesn't show up when Gtk is initialized through option group
|
||||
777031 win32 HiDPI assert
|
||||
777176 [wayland] gedit killed by protocol error "Invalid anchor rectangle size"
|
||||
|
||||
* Translation updates:
|
||||
Lithuanian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.6
|
||||
==================================
|
||||
|
||||
* Bugs fixed:
|
||||
774534 776132 776187 776012 774784 776187 776306 775808 776524 776560
|
||||
774534 input shape and opaque region not applied without begin_paint()/end_paint()
|
||||
774784 Failed to get desktop session proxy is not an error!
|
||||
775808 win32 maximized window is larger than the extended screen in dual monitor
|
||||
776012 GtkFlowBox, GtkListBox: Don't emit signals etc. during destruction
|
||||
776132 Mention the difference between gdk_window_create_similar_image_surface and...
|
||||
776187 flowbox: Add gtk_flow_box_get_child_at_pos to gtk3
|
||||
776306 flowbox: Sometimes emits child-activated during rubberband selection
|
||||
776524 GtkAboutDialog: Fix formatting of example email address in html documentation
|
||||
776560 icon-browser: window opens at very narrow size, only showing 1 column of icons
|
||||
Fix GL checks to work better on OpenGL ES 2.0
|
||||
Avoid a possible crash in ::activate-url handlers
|
||||
scrolledwindow: Fix func summary being cut off in bindings using doxygen
|
||||
|
||||
* Translation updates:
|
||||
German
|
||||
Russian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.5
|
||||
==================================
|
||||
|
||||
* gtk3-demo now has an example for using PangoTabArray to create a multi-column layout
|
||||
|
||||
* Bug fixes:
|
||||
771242 opening menu for certain types of GtkComboBox causes Gdk-CRITICAL assertion...
|
||||
774114 Window shadows are repainted even if only the contents of the window change
|
||||
774265 No tilt for wintab devices
|
||||
774379 gdk: mingw64 builds segfault during initialization of Huion H610PRO wintab
|
||||
774686 GtkMenu does not unref all GtkCheckMenuItem it creates
|
||||
774695 GtkProgressbar needs full and empty classes
|
||||
774699 list iteration regression causes odd-indexed devices to be ignored during l...
|
||||
774743 GtkNotebook does not unref all GtkBuiltinIcon it creates
|
||||
774760 inspector: ensure controller is a GtkGesture
|
||||
774790 GtkTextHandle does not unref all GtkAdjustment it references
|
||||
774893 Application font sizes scaling gets clamped to 1.00 when starting GtkInspector
|
||||
774915 Destroying the parent of a subsurface causes _gdk_window_destroy_hierarchy:...
|
||||
774917 [wayland] child subsurfaces need to be placed relative to their parent
|
||||
774939 GtkLabelAccessible: Initialize link before setting parent
|
||||
775212 GtkScaleButton does not unref all GtkAdjustment it references
|
||||
775316 gtk_drag_source_set_icon_pixbuf references the pixbuf received once too much
|
||||
775319 gdk_window_get_toplevel() fails to return the toplevel of a child subsurface
|
||||
775525 gtk_flow_box_get_child_at_index shouldn't crash with an invalid index
|
||||
|
||||
* Translation updates:
|
||||
Hungarian
|
||||
Italian
|
||||
Kazakh
|
||||
Russian
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.4
|
||||
==================================
|
||||
|
||||
* Bug fixes:
|
||||
767713 Fullscreen in wayland is buggy
|
||||
768081 Enable HiDPI support for GDK-Win32
|
||||
768531 wayland: Startup notification doesn't work on some apps (eg. gnome-terminal)...
|
||||
772075 GTK+ uses a lot more CPU under Wayland than under X11
|
||||
772202 Handling of scaled monitors is broken
|
||||
773587 recent-manager: Add a limit to the list's size
|
||||
773916 GtkComposeTable caches broken: using a same ~/.XCompose does not work twice...
|
||||
773979 GdkGLContext does not chain finalize handler
|
||||
774046 GtkSpinButton does not always unref priv->{up,down}_button
|
||||
774066 GtkHeaderBar does not unref all GtkBox and GtkSeparator it creates
|
||||
774097 GtkPrintOperation should not truncate job names
|
||||
774185 GtkPlacesSidebar does not unref itsel as many times as it references
|
||||
774352 GtkAppChooserWidget does not unref all GAppInfo it references
|
||||
|
||||
* Translation updates:
|
||||
Czech
|
||||
Dutch
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.3
|
||||
==================================
|
||||
|
||||
* Deprecations have been added for APIs that will be removed
|
||||
in GTK+ 4
|
||||
|
||||
* gtk-demo has gained a new demo for showing (and testing)
|
||||
rendering preformance
|
||||
|
||||
* Windows:
|
||||
- The GL support has been improved. Legacy contexts can now
|
||||
be created, and anti-aliasing is possible
|
||||
- Hi-DPI is now supported
|
||||
|
||||
* Bugs fixed:
|
||||
768081 Enable HiDPI support for GDK-Win32
|
||||
773274 [Wayland] Crash under gdk_wayland_window_attach_image()
|
||||
773474 Color chooser dialog opened with show-editor=TRUE has black header bar
|
||||
773479 Typo in GtkShortcutType developer docs
|
||||
773528 Improve GL support on Windows
|
||||
773799 GtkLevelBar doesn't update blocks on discrete mode
|
||||
773857 gdkwindow-x11: Add support for gdk_window_fullscreen_on_monitor
|
||||
773885 pop down GtkPopover on pressing escape
|
||||
|
||||
* Translation updates:
|
||||
Serbian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.2
|
||||
==================================
|
||||
|
||||
* Several improvements to the win32 theme
|
||||
|
||||
* Deprecations have been added for APIs that will be removed
|
||||
in GTK+ 4
|
||||
|
||||
* Bug fixes:
|
||||
767713 Fullscreen in wayland is buggy
|
||||
771320 Maps widget is displayed at wrong position inside gnome-contacts
|
||||
772345 placesviewrow: busy_spinner when visible offsets the rest of the...
|
||||
772389 Appending a character to a GtkEntry control in overwrite mode ri...
|
||||
772415 Avoid calling eglGetDisplay
|
||||
772552 Deprecate gtk_menu_popup
|
||||
772683 Usage of FALSE instead of gint in glarea demo
|
||||
772695 Show the keyboard shortcuts from left to right even in RTL
|
||||
772775 menu bindings needs attribute to force LTR for horizontal-button...
|
||||
772859 Fix memory leaks in implementations of common widgets
|
||||
772922 GtkMenu: Try using gdk_window_move_to_rect() more often
|
||||
772926 shortcutswindow: working version of set_section_name()
|
||||
773029 style-set signal problem
|
||||
773082 overlay: Document availability of properties
|
||||
773113 tests: fix clipboard test by loading correct icon
|
||||
773180 Don't second-guess whether our GDK GL context is GLES
|
||||
773246 Typo in css color definitions documentation
|
||||
|
||||
* Translation updates:
|
||||
Croatian
|
||||
Danish
|
||||
Dutch
|
||||
German
|
||||
Greek
|
||||
Italian
|
||||
Latvian
|
||||
Lithuanian
|
||||
Norwegian bokmal
|
||||
Polish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.22.1
|
||||
==================================
|
||||
|
||||
|
@@ -9,9 +9,17 @@
|
||||
# Author: Fan, Chun-wei
|
||||
# November 05, 2012
|
||||
|
||||
# MSVC_VER_LONG: Long Version of Visual Studio (2012, 2013, 14 and so on)
|
||||
# MSVC_VER: Short Version of Visual Studio (11 for 2012, 12 for 2013, 14 for 2015 and so on)
|
||||
# MSVC_FORMAT_VER: Use 12 for MSVC 2012 through 2015
|
||||
# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on)
|
||||
# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017)
|
||||
# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET)
|
||||
|
||||
if MSVC_BASE_NO_TOOLSET_SET
|
||||
MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0
|
||||
endif
|
||||
|
||||
if MSVC_NO_TOOLSET_SET
|
||||
MSVC_TOOLSET = $(MSVC_VER)0
|
||||
endif
|
||||
|
||||
%.sln:
|
||||
sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
|
||||
@@ -25,12 +33,12 @@
|
||||
|
||||
%.vcxproj:
|
||||
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
|
||||
sed 's/v100/v$(MSVC_VER)0/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
else \
|
||||
sed 's/v100/v$(MSVC_VER)0/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
fi
|
||||
|
||||
%.props:
|
||||
%.props: $(top_builddir)/build/win32/vs10/Makefile
|
||||
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
|
||||
sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
else \
|
||||
|
@@ -60,10 +60,19 @@ $(1).sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
|
||||
$(1).vs10.sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
|
||||
$(1).vs10.sourcefiles.filters: $(top_builddir)/build/win32/vs9/$(1).vcproj
|
||||
|
||||
$(top_builddir)/build/win32/vs9/$(1).vcproj:
|
||||
$(top_builddir)/build/win32/vs9/$(1).vcproj: Makefile
|
||||
-$(RM) $(top_builddir)/build/win32/vs9/$(1).vcproj
|
||||
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj
|
||||
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj.filters
|
||||
-$(RM) $(top_builddir)/build/win32/vs11/$(1).vcxproj
|
||||
-$(RM) $(top_builddir)/build/win32/vs11/$(1).vcxproj.filters
|
||||
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vcxproj
|
||||
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vcxproj.filters
|
||||
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj
|
||||
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj.filters
|
||||
-$(RM) $(top_builddir)/build/win32/vs15/$(1).vcxproj
|
||||
-$(RM) $(top_builddir)/build/win32/vs15/$(1).vcxproj.filters
|
||||
|
||||
|
||||
for F in $(_proj_files); do \
|
||||
case $$$$F in \
|
||||
@@ -87,7 +96,7 @@ $(top_builddir)/build/win32/vs9/$(1).vcproj:
|
||||
|
||||
$(top_builddir)/build/win32/vs10/$(1).vs10.headers: $(top_builddir)/build/win32/vs9/$(1).headers
|
||||
|
||||
$(top_builddir)/build/win32/vs9/$(1).headers:
|
||||
$(top_builddir)/build/win32/vs9/$(1).headers: Makefile
|
||||
-$(RM) $(top_builddir)/build/win32/vs9/$(1).headers
|
||||
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vs10.headers
|
||||
|
||||
|
@@ -31,7 +31,8 @@ SUBDIRS = \
|
||||
vs10 \
|
||||
vs11 \
|
||||
vs12 \
|
||||
vs14
|
||||
vs14 \
|
||||
vs15
|
||||
|
||||
EXTRA_DIST += \
|
||||
detectenv-msvc.mak \
|
||||
|
@@ -30,7 +30,7 @@ def main(argv):
|
||||
atk_min_ver = '2.15.1'
|
||||
cairo_min_ver = '1.14.0'
|
||||
gdk_pixbuf_min_ver = '2.30.0'
|
||||
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi'
|
||||
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi'
|
||||
glib_min_ver = '2.45.8'
|
||||
|
||||
cairo_backends = 'cairo-win32'
|
||||
@@ -41,14 +41,14 @@ def main(argv):
|
||||
gdk_args = gdk_parser.parse_args()
|
||||
if getattr(gdk_args, 'broadway', None) is 1:
|
||||
# On Visual Studio, we link to zlib1.lib
|
||||
broadway_extra_libs = '-lzlib1'
|
||||
broadway_extra_libs = ' -lzlib1'
|
||||
gdk_backends += ' broadway'
|
||||
cairo_backends += ' cairo'
|
||||
|
||||
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
|
||||
'@GDK_BACKENDS@': gdk_backends}
|
||||
|
||||
pkg_required_packages = 'gdk-pixbuf >= ' + gdk_pixbuf_min_ver + ' ' + \
|
||||
pkg_required_packages = 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_min_ver + ' ' + \
|
||||
'cairo >= ' + cairo_min_ver + ' ' + \
|
||||
'cairo-gobject >= ' + cairo_min_ver
|
||||
|
||||
|
@@ -21,9 +21,15 @@ valid_actions = ['remove-prefix',
|
||||
'replace-str',
|
||||
'remove-str']
|
||||
|
||||
def open_file(filename, mode):
|
||||
if sys.version_info[0] < 3:
|
||||
return open(filename, mode=mode)
|
||||
else:
|
||||
return open(filename, mode=mode, encoding='utf-8')
|
||||
|
||||
def replace_multi(src, dest, replace_items):
|
||||
with open(src, 'r') as s:
|
||||
with open(dest, 'w') as d:
|
||||
with open_file(src, 'r') as s:
|
||||
with open_file(dest, 'w') as d:
|
||||
for line in s:
|
||||
replace_dict = dict((re.escape(key), value) \
|
||||
for key, value in replace_items.items())
|
||||
|
@@ -74,6 +74,10 @@ DISTCLEANFILES = \
|
||||
$(GENERATED_ITEMS)
|
||||
|
||||
gtk3-install.props: $(top_srcdir)/build/win32/vs10/gtk3-install.propsin $(MSVC10_HEADERS_LISTS)
|
||||
-$(RM) $(top_builddir)/build/win32/vs11/gtk3-install.props
|
||||
-$(RM) $(top_builddir)/build/win32/vs12/gtk3-install.props
|
||||
-$(RM) $(top_builddir)/build/win32/vs14/gtk3-install.props
|
||||
-$(RM) $(top_builddir)/build/win32/vs15/gtk3-install.props
|
||||
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gtk3-install.propsin >$@
|
||||
rm $(MSVC10_HEADERS_LISTS)
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}</ProjectGuid>
|
||||
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
|
||||
<RootNamespace>gtkbuildertool</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{9F22107A-3EF7-4B52-B269-747B65307F36}</ProjectGuid>
|
||||
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
|
||||
<RootNamespace>gtkquerysettings</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{FC98AF16-4C68-42DF-906B-93A6804C198A}</ProjectGuid>
|
||||
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
|
||||
<RootNamespace>gtkupdateiconcache</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
@@ -25,7 +25,7 @@ if "$(Configuration)" == "Debug_Broadway" goto DoDebug
|
||||
|
||||
mkdir .\Release\$(Platform)\bin
|
||||
|
||||
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
|
||||
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
|
||||
|
||||
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Release\$(Platform)\bin\
|
||||
|
||||
|
@@ -92,7 +92,9 @@ copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
|
||||
:DONE_BIN
|
||||
|
||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
|
||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc
|
||||
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
|
||||
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-3.0.pc"
|
||||
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
|
||||
</GtkDoInstallBin>
|
||||
<GtkDoInstall>
|
||||
@@ -110,18 +112,9 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
|
||||
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
|
||||
#include "gailutil-3.vs10.headers"
|
||||
|
||||
mkdir $(CopyDir)\share\icons\hicolor\16x16\apps
|
||||
copy ..\..\..\demos\gtk-demo\data\16x16\gtk3-demo.png $(CopyDir)\share\icons\hicolor\16x16\apps
|
||||
mkdir $(CopyDir)\share\icons\hicolor\22x22\apps
|
||||
copy ..\..\..\demos\gtk-demo\data\22x22\gtk3-demo.png $(CopyDir)\share\icons\hicolor\22x22\apps
|
||||
mkdir $(CopyDir)\share\icons\hicolor\24x24\apps
|
||||
copy ..\..\..\demos\gtk-demo\data\24x24\gtk3-demo.png $(CopyDir)\share\icons\hicolor\24x24\apps
|
||||
mkdir $(CopyDir)\share\icons\hicolor\32x32\apps
|
||||
copy ..\..\..\demos\gtk-demo\data\32x32\gtk3-demo.png $(CopyDir)\share\icons\hicolor\32x32\apps
|
||||
mkdir $(CopyDir)\share\icons\hicolor\48x48\apps
|
||||
copy ..\..\..\demos\gtk-demo\data\48x48\gtk3-demo.png $(CopyDir)\share\icons\hicolor\48x48\apps
|
||||
mkdir $(CopyDir)\share\icons\hicolor\256x256\apps
|
||||
copy ..\..\..\demos\gtk-demo\data\256x256\gtk3-demo.png $(CopyDir)\share\icons\hicolor\256x256\apps
|
||||
|
||||
for %%s in (16 22 24 32 48 256) do ((mkdir $(CopyDir)\share\icons\hicolor\%%sx%%s\apps) & (copy /b ..\..\..\demos\gtk-demo\data\%%sx%%s\gtk3-demo.png $(CopyDir)\share\icons\hicolor\%%sx%%s\apps))
|
||||
|
||||
mkdir $(CopyDir)\share\glib-2.0\schemas
|
||||
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
|
@@ -249,7 +249,7 @@
|
||||
<Project>{f280bf1a-777a-4fb5-8005-dfbe04621edb}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="gtk-udpate-icon-cache.vcxproj">
|
||||
<ProjectReference Include="gtk-update-icon-cache.vcxproj">
|
||||
<Project>{fc98af16-4c68-42df-906b-93a6804c198a}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
|
52
build/win32/vs15/Makefile.am
Normal file
52
build/win32/vs15/Makefile.am
Normal file
@@ -0,0 +1,52 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxproj \
|
||||
gdk3-win32.vcxproj.filters \
|
||||
gdk-3.vcxproj \
|
||||
gdk-3.vcxproj.filters \
|
||||
gtk-3.vcxproj \
|
||||
gtk-3.vcxproj.filters \
|
||||
gtk-builder-tool.vcxproj \
|
||||
gtk-builder-tool.vcxproj.filters \
|
||||
gtk-encode-symbolic-svg.vcxproj \
|
||||
gtk-encode-symbolic-svg.vcxproj.filters \
|
||||
gtk-query-settings.vcxproj \
|
||||
gtk-query-settings.vcxproj.filters \
|
||||
gtk-update-icon-cache.vcxproj \
|
||||
gtk-update-icon-cache.vcxproj.filters \
|
||||
gtk3-demo.vcxproj \
|
||||
gtk3-demo.vcxproj.filters \
|
||||
gtk3-demo-application.vcxproj \
|
||||
gtk3-demo-application.vcxproj.filters \
|
||||
gtk3-icon-browser.vcxproj \
|
||||
gtk3-icon-browser.vcxproj.filters \
|
||||
gailutil-3.vcxproj \
|
||||
gailutil-3.vcxproj.filters \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
broadwayd.vcxproj \
|
||||
broadwayd.vcxproj.filters \
|
||||
gdk3-broadway.vcxproj \
|
||||
gdk3-broadway.vcxproj.filters \
|
||||
gtk3-build-defines.props \
|
||||
gtk3-copy-gdk-broadway.props \
|
||||
gtk3-gen-srcs.props \
|
||||
gtk3-ignore-broadway.props \
|
||||
gtk3-install.props \
|
||||
gtk3-version-paths.props
|
||||
|
||||
DISTCLEANFILES = $(EXTRA_DIST)
|
||||
|
||||
MSVC_VER = 15
|
||||
MSVC_VER_LONG = 15
|
||||
MSVC_TOOLSET = 141
|
||||
MSVC_FORMAT_VER = 12
|
||||
|
||||
include $(top_srcdir)/build/Makefile-newvs.am
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
@@ -17,7 +17,7 @@ if "$(ConfigurationName)" == "Debug_Broadway" goto DoDebug&#
|
||||
|
||||
:DoRelease

|
||||
mkdir .\Release\$(PlatformName)\bin

|
||||
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\

|
||||
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\

|
||||
copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Release\$(PlatformName)\bin\

|
||||
goto END

|
||||
|
||||
|
@@ -92,7 +92,9 @@ copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin

|
||||
:DONE_BIN

|
||||
|
||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig

|
||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc

|
||||
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig

|
||||
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-win32-3.0.pc"

|
||||
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig

|
||||
"
|
||||
/>
|
||||
|
26
configure.ac
26
configure.ac
@@ -10,8 +10,8 @@
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [22])
|
||||
m4_define([gtk_micro_version], [1])
|
||||
m4_define([gtk_interface_age], [1])
|
||||
m4_define([gtk_micro_version], [18])
|
||||
m4_define([gtk_interface_age], [18])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -60,7 +60,7 @@ m4_define([cairo_required_version], [1.14.0])
|
||||
m4_define([gdk_pixbuf_required_version], [2.30.0])
|
||||
m4_define([introspection_required_version], [1.39.0])
|
||||
m4_define([wayland_required_version], [1.9.91])
|
||||
m4_define([wayland_protocols_required_version], [1.7])
|
||||
m4_define([wayland_protocols_required_version], [1.9])
|
||||
m4_define([mirclient_required_version], [0.22.0])
|
||||
m4_define([mircookie_required_version], [0.17.0])
|
||||
m4_define([epoxy_required_version], [1.0])
|
||||
@@ -81,7 +81,7 @@ AC_SUBST(INTROSPECTION_REQUIRED_VERSION)
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
AM_INIT_AUTOMAKE([1.11 -Wall no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
|
||||
AM_INIT_AUTOMAKE([1.11 -Wall subdir-objects no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
# Support silent build rules. Disable
|
||||
@@ -464,7 +464,7 @@ else
|
||||
AM_CONDITIONAL(USE_WAYLAND, false)
|
||||
fi
|
||||
|
||||
MIR_DEPENDENCIES="mirclient >= mirclient_required_version mircookie >= mircookie_required_version"
|
||||
MIR_DEPENDENCIES="mirclient >= mirclient_required_version mircookie >= mircookie_required_version libcontent-hub-glib"
|
||||
if test "$enable_mir_backend" = "maybe" ; then
|
||||
PKG_CHECK_EXISTS($MIR_DEPENDENCIES, [have_mir_deps=yes], [have_mir_deps=no])
|
||||
AC_MSG_CHECKING([for MIR_DEPENDENCIES])
|
||||
@@ -1815,6 +1815,14 @@ case "$host" in
|
||||
esac
|
||||
AC_SUBST(GDK_HIDDEN_VISIBILITY_CFLAGS)
|
||||
|
||||
##################################################
|
||||
# Theming
|
||||
##################################################
|
||||
|
||||
AC_PATH_PROG([SASSC], [sassc])
|
||||
AC_ARG_VAR(SASSC)
|
||||
AM_CONDITIONAL([REBUILD_SCSS], [test "x$SASSC" != x])
|
||||
|
||||
##################################################
|
||||
# Output commands
|
||||
##################################################
|
||||
@@ -1885,6 +1893,13 @@ if test "x${enable_Bsymbolic}" = "xyes" ; then
|
||||
fi
|
||||
AC_SUBST(GTK_LINK_FLAGS)
|
||||
|
||||
dnl
|
||||
dnl Check whether MSVC toolset is explicitly set
|
||||
dnl
|
||||
|
||||
AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x])
|
||||
AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
README
|
||||
INSTALL
|
||||
@@ -1947,6 +1962,7 @@ build/win32/vs10/gtk3-version-paths.props
|
||||
build/win32/vs11/Makefile
|
||||
build/win32/vs12/Makefile
|
||||
build/win32/vs14/Makefile
|
||||
build/win32/vs15/Makefile
|
||||
gdk/Makefile
|
||||
gdk/broadway/Makefile
|
||||
gdk/x11/Makefile
|
||||
|
@@ -27,6 +27,7 @@ demos_base = \
|
||||
event_axes.c \
|
||||
expander.c \
|
||||
filtermodel.c \
|
||||
fishbowl.c \
|
||||
foreigndrawing.c \
|
||||
gestures.c \
|
||||
glarea.c \
|
||||
@@ -63,6 +64,7 @@ demos_base = \
|
||||
spinbutton.c \
|
||||
spinner.c \
|
||||
stack.c \
|
||||
tabs.c \
|
||||
textmask.c \
|
||||
textview.c \
|
||||
textscroll.c \
|
||||
@@ -136,6 +138,8 @@ nodist_gtk3_demo_SOURCES = demos.h
|
||||
|
||||
gtk3_demo_SOURCES = \
|
||||
$(demos) \
|
||||
gtkfishbowl.c \
|
||||
gtkfishbowl.h \
|
||||
demo_resources.c \
|
||||
main.c
|
||||
|
||||
|
@@ -94,6 +94,11 @@
|
||||
<file>zoom_in_cursor.png</file>
|
||||
<file>zoom_out_cursor.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/fishbowl">
|
||||
<file>fishbowl.ui</file>
|
||||
<file>gtkfishbowl.c</file>
|
||||
<file>gtkfishbowl.h</file>
|
||||
</gresource>
|
||||
<gresource prefix="/iconview">
|
||||
<file preprocess="to-pixdata">gnome-fs-directory.png</file>
|
||||
<file preprocess="to-pixdata">gnome-fs-regular.png</file>
|
||||
@@ -150,6 +155,7 @@
|
||||
<file>event_axes.c</file>
|
||||
<file>expander.c</file>
|
||||
<file>filtermodel.c</file>
|
||||
<file>fishbowl.c</file>
|
||||
<file>flowbox.c</file>
|
||||
<file>foreigndrawing.c</file>
|
||||
<file>font_features.c</file>
|
||||
@@ -188,6 +194,7 @@
|
||||
<file>stack.c</file>
|
||||
<file>spinbutton.c</file>
|
||||
<file>spinner.c</file>
|
||||
<file>tabs.c</file>
|
||||
<file>textview.c</file>
|
||||
<file>textscroll.c</file>
|
||||
<file>theming_style_classes.c</file>
|
||||
|
178
demos/gtk-demo/fishbowl.c
Normal file
178
demos/gtk-demo/fishbowl.c
Normal file
@@ -0,0 +1,178 @@
|
||||
/* Benchmark/Fishbowl
|
||||
*
|
||||
* This demo models the fishbowl demos seen on the web in a GTK way.
|
||||
* It's also a neat little tool to see how fast your computer (or
|
||||
* your GTK version) is.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gtkfishbowl.h"
|
||||
|
||||
GtkWidget *allow_changes;
|
||||
|
||||
#define N_STATS 5
|
||||
|
||||
#define STATS_UPDATE_TIME G_USEC_PER_SEC
|
||||
|
||||
typedef struct _Stats Stats;
|
||||
struct _Stats {
|
||||
gint64 last_stats;
|
||||
gint64 last_frame;
|
||||
gint last_suggestion;
|
||||
guint frame_counter_max;
|
||||
|
||||
guint stats_index;
|
||||
guint frame_counter[N_STATS];
|
||||
guint item_counter[N_STATS];
|
||||
};
|
||||
|
||||
static Stats *
|
||||
get_stats (GtkWidget *widget)
|
||||
{
|
||||
static GQuark stats_quark = 0;
|
||||
Stats *stats;
|
||||
|
||||
if (G_UNLIKELY (stats_quark == 0))
|
||||
stats_quark = g_quark_from_static_string ("stats");
|
||||
|
||||
stats = g_object_get_qdata (G_OBJECT (widget), stats_quark);
|
||||
if (stats == NULL)
|
||||
{
|
||||
stats = g_new0 (Stats, 1);
|
||||
g_object_set_qdata_full (G_OBJECT (widget), stats_quark, stats, g_free);
|
||||
stats->last_frame = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
|
||||
stats->last_stats = stats->last_frame;
|
||||
}
|
||||
|
||||
return stats;
|
||||
}
|
||||
|
||||
static void
|
||||
do_stats (GtkWidget *widget,
|
||||
GtkWidget *info_label,
|
||||
gint *suggested_change)
|
||||
{
|
||||
Stats *stats;
|
||||
gint64 frame_time;
|
||||
|
||||
stats = get_stats (widget);
|
||||
frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
|
||||
|
||||
if (stats->last_stats + STATS_UPDATE_TIME < frame_time)
|
||||
{
|
||||
char *new_label;
|
||||
guint i, n_frames;
|
||||
|
||||
n_frames = 0;
|
||||
for (i = 0; i < N_STATS; i++)
|
||||
{
|
||||
n_frames += stats->frame_counter[i];
|
||||
}
|
||||
|
||||
new_label = g_strdup_printf ("icons - %.1f fps",
|
||||
(double) G_USEC_PER_SEC * n_frames
|
||||
/ (N_STATS * STATS_UPDATE_TIME));
|
||||
gtk_label_set_label (GTK_LABEL (info_label), new_label);
|
||||
g_free (new_label);
|
||||
|
||||
if (stats->frame_counter[stats->stats_index] >= 19 * stats->frame_counter_max / 20)
|
||||
{
|
||||
if (stats->last_suggestion > 0)
|
||||
stats->last_suggestion *= 2;
|
||||
else
|
||||
stats->last_suggestion = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (stats->last_suggestion < 0)
|
||||
stats->last_suggestion--;
|
||||
else
|
||||
stats->last_suggestion = -1;
|
||||
stats->last_suggestion = MAX (stats->last_suggestion, 1 - (int) stats->item_counter[stats->stats_index]);
|
||||
}
|
||||
|
||||
stats->stats_index = (stats->stats_index + 1) % N_STATS;
|
||||
stats->frame_counter[stats->stats_index] = 0;
|
||||
stats->item_counter[stats->stats_index] = stats->item_counter[(stats->stats_index + N_STATS - 1) % N_STATS];
|
||||
stats->last_stats = frame_time;
|
||||
|
||||
if (suggested_change)
|
||||
*suggested_change = stats->last_suggestion;
|
||||
else
|
||||
stats->last_suggestion = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (suggested_change)
|
||||
*suggested_change = 0;
|
||||
}
|
||||
|
||||
stats->last_frame = frame_time;
|
||||
stats->frame_counter[stats->stats_index]++;
|
||||
stats->frame_counter_max = MAX (stats->frame_counter_max, stats->frame_counter[stats->stats_index]);
|
||||
}
|
||||
|
||||
static void
|
||||
stats_update (GtkWidget *widget)
|
||||
{
|
||||
Stats *stats;
|
||||
|
||||
stats = get_stats (widget);
|
||||
|
||||
stats->item_counter[stats->stats_index] = gtk_fishbowl_get_count (GTK_FISHBOWL (widget));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
move_fish (GtkWidget *bowl,
|
||||
GdkFrameClock *frame_clock,
|
||||
gpointer info_label)
|
||||
{
|
||||
gint suggested_change = 0;
|
||||
|
||||
do_stats (bowl,
|
||||
info_label,
|
||||
!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (allow_changes)) ? &suggested_change : NULL);
|
||||
|
||||
gtk_fishbowl_set_count (GTK_FISHBOWL (bowl),
|
||||
gtk_fishbowl_get_count (GTK_FISHBOWL (bowl)) + suggested_change);
|
||||
stats_update (bowl);
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_fishbowl (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *bowl, *info_label;
|
||||
|
||||
g_type_ensure (GTK_TYPE_FISHBOWL);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/fishbowl/fishbowl.ui");
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
|
||||
info_label = GTK_WIDGET (gtk_builder_get_object (builder, "info_label"));
|
||||
allow_changes = GTK_WIDGET (gtk_builder_get_object (builder, "changes_allow"));
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_widget_realize (window);
|
||||
gtk_widget_add_tick_callback (bowl, move_fish, info_label, NULL);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
|
||||
return window;
|
||||
}
|
69
demos/gtk-demo/fishbowl.ui
Normal file
69
demos/gtk-demo/fishbowl.ui
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="title" translatable="yes">Fishbowl</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="">
|
||||
<property name="visible">True</property>
|
||||
<property name="show-close-button">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="info_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">icons - 0 fps</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" bind-source="bowl" bind-property="count">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="changes_allow">
|
||||
<property name="active">False</property>
|
||||
<property name="visible" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">True</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">changes-allow</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="changes_prevent">
|
||||
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">True</property>
|
||||
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">False</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">changes-prevent</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFishbowl" id="bowl">
|
||||
<property name="visible">True</property>
|
||||
<property name="animating">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@@ -836,7 +836,7 @@ draw_spinbutton (GtkWidget *widget,
|
||||
|
||||
/* This information is taken from the GtkSpinButton docs, see "CSS nodes" */
|
||||
spin_context = get_style (NULL, "spinbutton.horizontal:focus");
|
||||
entry_context = get_style (NULL, "entry:focus");
|
||||
entry_context = get_style (spin_context, "entry:focus");
|
||||
up_context = get_style (spin_context, "button.up:focus:active");
|
||||
down_context = get_style (spin_context, "button.down:focus");
|
||||
|
||||
|
@@ -13,6 +13,17 @@ static gdouble swipe_x = 0;
|
||||
static gdouble swipe_y = 0;
|
||||
static gboolean long_pressed = FALSE;
|
||||
|
||||
static gboolean
|
||||
touchpad_swipe_gesture_begin (GtkGesture *gesture,
|
||||
GdkEventSequence *sequence,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
/* Disallow touchscreen events here */
|
||||
if (sequence != NULL)
|
||||
gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED);
|
||||
return sequence == NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
swipe_gesture_swept (GtkGestureSwipe *gesture,
|
||||
gdouble velocity_x,
|
||||
@@ -161,6 +172,19 @@ do_gestures (GtkWidget *do_widget)
|
||||
GTK_PHASE_BUBBLE);
|
||||
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
|
||||
|
||||
/* 3fg swipe for touchpads */
|
||||
gesture = g_object_new (GTK_TYPE_GESTURE_SWIPE,
|
||||
"widget", drawing_area,
|
||||
"n-points", 3,
|
||||
NULL);
|
||||
g_signal_connect (gesture, "begin",
|
||||
G_CALLBACK (touchpad_swipe_gesture_begin), drawing_area);
|
||||
g_signal_connect (gesture, "swipe",
|
||||
G_CALLBACK (swipe_gesture_swept), drawing_area);
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
|
||||
GTK_PHASE_BUBBLE);
|
||||
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
|
||||
|
||||
/* Long press */
|
||||
gesture = gtk_gesture_long_press_new (drawing_area);
|
||||
g_signal_connect (gesture, "pressed",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
precision highp float;
|
||||
precision mediump float;
|
||||
|
||||
void main() {
|
||||
float lerpVal = gl_FragCoord.y / 500.0f;
|
||||
float lerpVal = gl_FragCoord.y / 500.0;
|
||||
|
||||
gl_FragColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
|
||||
gl_FragColor = mix(vec4(1.0, 0.85, 0.35, 1.0), vec4(0.2, 0.2, 0.2, 1.0), lerpVal);
|
||||
}
|
||||
|
@@ -333,7 +333,7 @@ create_axis_slider (int axis)
|
||||
GtkAdjustment *adj;
|
||||
const char *text;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
|
||||
switch (axis)
|
||||
{
|
||||
|
581
demos/gtk-demo/gtkfishbowl.c
Normal file
581
demos/gtk-demo/gtkfishbowl.c
Normal file
@@ -0,0 +1,581 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2017 Benjamin Otte <otte@gnome.org>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gtkfishbowl.h"
|
||||
|
||||
#include "gtk/fallback-c89.c"
|
||||
|
||||
typedef struct _GtkFishbowlPrivate GtkFishbowlPrivate;
|
||||
typedef struct _GtkFishbowlChild GtkFishbowlChild;
|
||||
|
||||
struct _GtkFishbowlPrivate
|
||||
{
|
||||
GList *children;
|
||||
guint count;
|
||||
|
||||
gint64 last_frame_time;
|
||||
guint tick_id;
|
||||
};
|
||||
|
||||
struct _GtkFishbowlChild
|
||||
{
|
||||
GtkWidget *widget;
|
||||
double x;
|
||||
double y;
|
||||
double dx;
|
||||
double dy;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_ANIMATING,
|
||||
PROP_COUNT,
|
||||
NUM_PROPERTIES
|
||||
};
|
||||
|
||||
static GParamSpec *props[NUM_PROPERTIES] = { NULL, };
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkFishbowl, gtk_fishbowl, GTK_TYPE_CONTAINER)
|
||||
|
||||
static void
|
||||
gtk_fishbowl_init (GtkFishbowl *fishbowl)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (fishbowl), FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_fishbowl_new:
|
||||
*
|
||||
* Creates a new #GtkFishbowl.
|
||||
*
|
||||
* Returns: a new #GtkFishbowl.
|
||||
*/
|
||||
GtkWidget*
|
||||
gtk_fishbowl_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_FISHBOWL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_widget_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
gint size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (size >= -1);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
if (size < 0)
|
||||
gtk_widget_get_preferred_width (widget, minimum, natural);
|
||||
else
|
||||
gtk_widget_get_preferred_width_for_height (widget, size, minimum, natural);
|
||||
|
||||
if (minimum_baseline)
|
||||
*minimum_baseline = -1;
|
||||
if (natural_baseline)
|
||||
*natural_baseline = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_get_preferred_height_and_baseline_for_width (widget,
|
||||
size,
|
||||
minimum,
|
||||
natural,
|
||||
minimum_baseline,
|
||||
natural_baseline);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
int for_size,
|
||||
int *minimum,
|
||||
int *natural,
|
||||
int *minimum_baseline,
|
||||
int *natural_baseline)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
GtkFishbowlChild *child;
|
||||
GList *children;
|
||||
gint child_min, child_nat;
|
||||
|
||||
*minimum = 0;
|
||||
*natural = 0;
|
||||
|
||||
for (children = priv->children; children; children = children->next)
|
||||
{
|
||||
child = children->data;
|
||||
|
||||
if (!gtk_widget_get_visible (child->widget))
|
||||
continue;
|
||||
|
||||
gtk_widget_measure (child->widget, orientation, -1, &child_min, &child_nat, NULL, NULL);
|
||||
|
||||
*minimum = MAX (*minimum, child_min);
|
||||
*natural = MAX (*natural, child_nat);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_get_preferred_width (GtkWidget *widget,
|
||||
int *minimum,
|
||||
int *natural)
|
||||
{
|
||||
gtk_fishbowl_measure (widget, GTK_ORIENTATION_HORIZONTAL, -1, minimum, natural, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_get_preferred_height (GtkWidget *widget,
|
||||
int *minimum,
|
||||
int *natural)
|
||||
{
|
||||
gtk_fishbowl_measure (widget, GTK_ORIENTATION_VERTICAL, -1, minimum, natural, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_get_preferred_width_for_height (GtkWidget *widget,
|
||||
int for_size,
|
||||
int *minimum,
|
||||
int *natural)
|
||||
{
|
||||
gtk_fishbowl_measure (widget, GTK_ORIENTATION_HORIZONTAL, for_size, minimum, natural, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
|
||||
int for_size,
|
||||
int *minimum,
|
||||
int *natural,
|
||||
int *minimum_baseline,
|
||||
int *natural_baseline)
|
||||
{
|
||||
gtk_fishbowl_measure (widget, GTK_ORIENTATION_VERTICAL, for_size, minimum, natural, minimum_baseline, natural_baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
GtkFishbowlChild *child;
|
||||
GtkAllocation child_allocation;
|
||||
GtkRequisition child_requisition;
|
||||
GList *children;
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
|
||||
for (children = priv->children; children; children = children->next)
|
||||
{
|
||||
child = children->data;
|
||||
|
||||
if (!gtk_widget_get_visible (child->widget))
|
||||
continue;
|
||||
|
||||
gtk_widget_get_preferred_size (child->widget, &child_requisition, NULL);
|
||||
child_allocation.x = allocation->x + round (child->x * (allocation->width - child_requisition.width));
|
||||
child_allocation.y = allocation->y + round (child->y * (allocation->height - child_requisition.height));
|
||||
child_allocation.width = child_requisition.width;
|
||||
child_allocation.height = child_requisition.height;
|
||||
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation);
|
||||
}
|
||||
}
|
||||
|
||||
static double
|
||||
new_speed (void)
|
||||
{
|
||||
/* 5s to 50s to cross screen seems fair */
|
||||
return g_random_double_range (0.02, 0.2);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_add (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
GtkFishbowlChild *child_info;
|
||||
|
||||
g_return_if_fail (GTK_IS_FISHBOWL (fishbowl));
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
child_info = g_new0 (GtkFishbowlChild, 1);
|
||||
child_info->widget = widget;
|
||||
child_info->x = 0;
|
||||
child_info->y = 0;
|
||||
child_info->dx = new_speed ();
|
||||
child_info->dy = new_speed ();
|
||||
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (fishbowl));
|
||||
|
||||
priv->children = g_list_prepend (priv->children, child_info);
|
||||
priv->count++;
|
||||
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_COUNT]);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
GtkFishbowlChild *child;
|
||||
GtkWidget *widget_container = GTK_WIDGET (container);
|
||||
GList *children;
|
||||
|
||||
for (children = priv->children; children; children = children->next)
|
||||
{
|
||||
child = children->data;
|
||||
|
||||
if (child->widget == widget)
|
||||
{
|
||||
gboolean was_visible = gtk_widget_get_visible (widget);
|
||||
|
||||
gtk_widget_unparent (widget);
|
||||
|
||||
priv->children = g_list_remove_link (priv->children, children);
|
||||
g_list_free (children);
|
||||
g_free (child);
|
||||
|
||||
if (was_visible && gtk_widget_get_visible (widget_container))
|
||||
gtk_widget_queue_resize (widget_container);
|
||||
|
||||
priv->count--;
|
||||
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_COUNT]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
GtkFishbowlChild *child;
|
||||
GList *children;
|
||||
|
||||
if (!include_internals)
|
||||
return;
|
||||
|
||||
children = priv->children;
|
||||
while (children)
|
||||
{
|
||||
child = children->data;
|
||||
children = children->next;
|
||||
|
||||
(* callback) (child->widget, callback_data);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_fishbowl_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
GtkFishbowlChild *child;
|
||||
GList *list;
|
||||
|
||||
for (list = priv->children;
|
||||
list;
|
||||
list = list->next)
|
||||
{
|
||||
child = list->data;
|
||||
|
||||
gtk_container_propagate_draw (GTK_CONTAINER (fishbowl),
|
||||
child->widget,
|
||||
cr);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_dispose (GObject *object)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
|
||||
|
||||
gtk_fishbowl_set_animating (fishbowl, FALSE);
|
||||
gtk_fishbowl_set_count (fishbowl, 0);
|
||||
|
||||
G_OBJECT_CLASS (gtk_fishbowl_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_ANIMATING:
|
||||
gtk_fishbowl_set_animating (fishbowl, g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
case PROP_COUNT:
|
||||
gtk_fishbowl_set_count (fishbowl, g_value_get_uint (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_ANIMATING:
|
||||
g_value_set_boolean (value, gtk_fishbowl_get_animating (fishbowl));
|
||||
break;
|
||||
|
||||
case PROP_COUNT:
|
||||
g_value_set_uint (value, gtk_fishbowl_get_count (fishbowl));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_fishbowl_class_init (GtkFishbowlClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
|
||||
|
||||
object_class->dispose = gtk_fishbowl_dispose;
|
||||
object_class->set_property = gtk_fishbowl_set_property;
|
||||
object_class->get_property = gtk_fishbowl_get_property;
|
||||
|
||||
widget_class->get_preferred_width = gtk_fishbowl_get_preferred_width;
|
||||
widget_class->get_preferred_height = gtk_fishbowl_get_preferred_height;
|
||||
widget_class->get_preferred_width_for_height = gtk_fishbowl_get_preferred_width_for_height;
|
||||
widget_class->get_preferred_height_and_baseline_for_width = gtk_fishbowl_get_preferred_height_and_baseline_for_width;
|
||||
widget_class->size_allocate = gtk_fishbowl_size_allocate;
|
||||
widget_class->draw = gtk_fishbowl_draw;
|
||||
|
||||
container_class->add = gtk_fishbowl_add;
|
||||
container_class->remove = gtk_fishbowl_remove;
|
||||
container_class->forall = gtk_fishbowl_forall;
|
||||
|
||||
props[PROP_ANIMATING] =
|
||||
g_param_spec_boolean ("animating",
|
||||
"animating",
|
||||
"Whether children are moving around",
|
||||
FALSE,
|
||||
G_PARAM_READWRITE);
|
||||
|
||||
props[PROP_COUNT] =
|
||||
g_param_spec_uint ("count",
|
||||
"Count",
|
||||
"Number of widgets",
|
||||
0, G_MAXUINT,
|
||||
0,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
g_object_class_install_properties (object_class, NUM_PROPERTIES, props);
|
||||
}
|
||||
|
||||
guint
|
||||
gtk_fishbowl_get_count (GtkFishbowl *fishbowl)
|
||||
{
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
|
||||
return priv->count;
|
||||
}
|
||||
|
||||
char **icon_names = NULL;
|
||||
gsize n_icon_names = 0;
|
||||
|
||||
static void
|
||||
init_icon_names (GtkIconTheme *theme)
|
||||
{
|
||||
GPtrArray *icons;
|
||||
GList *l, *icon_list;
|
||||
|
||||
if (icon_names)
|
||||
return;
|
||||
|
||||
icon_list = gtk_icon_theme_list_icons (theme, NULL);
|
||||
icons = g_ptr_array_new ();
|
||||
|
||||
for (l = icon_list; l; l = l->next)
|
||||
{
|
||||
if (g_str_has_suffix (l->data, "symbolic"))
|
||||
continue;
|
||||
|
||||
g_ptr_array_add (icons, g_strdup (l->data));
|
||||
}
|
||||
|
||||
n_icon_names = icons->len;
|
||||
g_ptr_array_add (icons, NULL); /* NULL-terminate the array */
|
||||
icon_names = (char **) g_ptr_array_free (icons, FALSE);
|
||||
|
||||
/* don't free strings, we assigned them to the array */
|
||||
g_list_free_full (icon_list, g_free);
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_random_icon_name (GtkIconTheme *theme)
|
||||
{
|
||||
init_icon_names (theme);
|
||||
|
||||
return icon_names[g_random_int_range(0, n_icon_names)];
|
||||
}
|
||||
|
||||
void
|
||||
gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
|
||||
guint count)
|
||||
{
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (fishbowl));
|
||||
|
||||
while (priv->count > count)
|
||||
{
|
||||
gtk_container_remove (GTK_CONTAINER (fishbowl),
|
||||
((GtkFishbowlChild *) priv->children->data)->widget);
|
||||
}
|
||||
|
||||
while (priv->count < count)
|
||||
{
|
||||
GtkWidget *new_widget;
|
||||
|
||||
new_widget = gtk_image_new_from_icon_name (get_random_icon_name (gtk_icon_theme_get_default ()),
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
gtk_widget_show (new_widget);
|
||||
gtk_container_add (GTK_CONTAINER (fishbowl), new_widget);
|
||||
}
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (fishbowl));
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_fishbowl_get_animating (GtkFishbowl *fishbowl)
|
||||
{
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
|
||||
return priv->tick_id != 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_fishbowl_tick (GtkWidget *widget,
|
||||
GdkFrameClock *frame_clock,
|
||||
gpointer unused)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
GtkFishbowlChild *child;
|
||||
GList *l;
|
||||
gint64 frame_time, elapsed;
|
||||
|
||||
frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
|
||||
elapsed = frame_time - priv->last_frame_time;
|
||||
priv->last_frame_time = frame_time;
|
||||
|
||||
/* last frame was 0, so we're just starting to animate */
|
||||
if (elapsed == frame_time)
|
||||
return G_SOURCE_CONTINUE;
|
||||
|
||||
for (l = priv->children; l; l = l->next)
|
||||
{
|
||||
child = l->data;
|
||||
|
||||
child->x += child->dx * ((double) elapsed / G_USEC_PER_SEC);
|
||||
child->y += child->dy * ((double) elapsed / G_USEC_PER_SEC);
|
||||
|
||||
if (child->x <= 0)
|
||||
{
|
||||
child->x = 0;
|
||||
child->dx = new_speed ();
|
||||
}
|
||||
else if (child->x >= 1)
|
||||
{
|
||||
child->x = 1;
|
||||
child->dx = - new_speed ();
|
||||
}
|
||||
|
||||
if (child->y <= 0)
|
||||
{
|
||||
child->y = 0;
|
||||
child->dy = new_speed ();
|
||||
}
|
||||
else if (child->y >= 1)
|
||||
{
|
||||
child->y = 1;
|
||||
child->dy = - new_speed ();
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_queue_allocate (widget);
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
|
||||
gboolean animating)
|
||||
{
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
|
||||
if (gtk_fishbowl_get_animating (fishbowl) == animating)
|
||||
return;
|
||||
|
||||
if (animating)
|
||||
{
|
||||
priv->tick_id = gtk_widget_add_tick_callback (GTK_WIDGET (fishbowl),
|
||||
gtk_fishbowl_tick,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->last_frame_time = 0;
|
||||
gtk_widget_remove_tick_callback (GTK_WIDGET (fishbowl), priv->tick_id);
|
||||
priv->tick_id = 0;
|
||||
}
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_ANIMATING]);
|
||||
}
|
||||
|
58
demos/gtk-demo/gtkfishbowl.h
Normal file
58
demos/gtk-demo/gtkfishbowl.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2017 Benjamin Otte <otte@gnome.org>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_FISHBOWL_H__
|
||||
#define __GTK_FISHBOWL_H__
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_FISHBOWL (gtk_fishbowl_get_type ())
|
||||
#define GTK_FISHBOWL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FISHBOWL, GtkFishbowl))
|
||||
#define GTK_FISHBOWL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FISHBOWL, GtkFishbowlClass))
|
||||
#define GTK_IS_FISHBOWL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FISHBOWL))
|
||||
#define GTK_IS_FISHBOWL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FISHBOWL))
|
||||
#define GTK_FISHBOWL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FISHBOWL, GtkFishbowlClass))
|
||||
|
||||
typedef struct _GtkFishbowl GtkFishbowl;
|
||||
typedef struct _GtkFishbowlClass GtkFishbowlClass;
|
||||
|
||||
struct _GtkFishbowl
|
||||
{
|
||||
GtkContainer container;
|
||||
};
|
||||
|
||||
struct _GtkFishbowlClass
|
||||
{
|
||||
GtkContainerClass parent_class;
|
||||
};
|
||||
|
||||
GType gtk_fishbowl_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget* gtk_fishbowl_new (void);
|
||||
|
||||
guint gtk_fishbowl_get_count (GtkFishbowl *fishbowl);
|
||||
void gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
|
||||
guint count);
|
||||
gboolean gtk_fishbowl_get_animating (GtkFishbowl *fishbowl);
|
||||
void gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
|
||||
gboolean animating);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_FISHBOWL_H__ */
|
@@ -1,7 +1,7 @@
|
||||
/* Links
|
||||
*
|
||||
* GtkLabel can show hyperlinks. The default action is to call
|
||||
* gtk_show_uri() on their URI, but it is possible to override
|
||||
* gtk_show_uri_on_window() on their URI, but it is possible to override
|
||||
* this with a custom handler.
|
||||
*/
|
||||
|
||||
|
@@ -53,6 +53,7 @@ do_pickers (GtkWidget *do_widget)
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
picker = gtk_file_chooser_button_new ("Pick a File",
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (picker), FALSE);
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (table), picker, 1, 2, 1, 1);
|
||||
|
||||
|
63
demos/gtk-demo/tabs.c
Normal file
63
demos/gtk-demo/tabs.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/* Text View/Tabs
|
||||
*
|
||||
* GtkTextView can position text at fixed positions, using tabs.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
GtkWidget *
|
||||
do_tabs (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *view;
|
||||
GtkWidget *sw;
|
||||
GtkTextBuffer *buffer;
|
||||
PangoTabArray *tabs;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Tabs");
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 450, 450);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
view = gtk_text_view_new ();
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 20);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 20);
|
||||
|
||||
tabs = pango_tab_array_new (3, TRUE);
|
||||
pango_tab_array_set_tab (tabs, 0, PANGO_TAB_LEFT, 0);
|
||||
pango_tab_array_set_tab (tabs, 1, PANGO_TAB_LEFT, 150);
|
||||
pango_tab_array_set_tab (tabs, 2, PANGO_TAB_LEFT, 300);
|
||||
gtk_text_view_set_tabs (GTK_TEXT_VIEW (view), tabs);
|
||||
pango_tab_array_free (tabs);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
gtk_text_buffer_set_text (buffer, "one\ttwo\tthree\nfour\tfive\tsix\nseven\teight\tnine", -1);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_add (GTK_CONTAINER (window), sw);
|
||||
gtk_container_add (GTK_CONTAINER (sw), view);
|
||||
|
||||
gtk_widget_show_all (sw);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
@@ -33,7 +33,8 @@ resources.c: iconbrowser.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourc
|
||||
EXTRA_DIST = \
|
||||
menus.ui \
|
||||
iconbrowser.gresource.xml \
|
||||
window.ui
|
||||
window.ui \
|
||||
icon.list
|
||||
|
||||
# ------------------- MSVC Build Items ----------------
|
||||
MSVCPROJS = gtk3-icon-browser
|
||||
|
517
demos/icon-browser/icon.list
Normal file
517
demos/icon-browser/icon.list
Normal file
@@ -0,0 +1,517 @@
|
||||
[volume]
|
||||
Name=Volume
|
||||
Description=Icons related to audio input and output volume
|
||||
|
||||
audio-volume-high=The icon used to indicate high audio volume
|
||||
audio-volume-low=The icon used to indicate low audio volume
|
||||
audio-volume-medium=The icon used to indicate medium audio volume
|
||||
audio-volume-muted=The icon used to indicate the muted state for audio playback
|
||||
microphone-sensitivity-high=The icon used to indicate high microphone sensitivity
|
||||
microphone-sensitivity-low=The icon used to indicate low microphone sensitivity
|
||||
microphone-sensitivity-medium=The icon used to indicate medium microphone sensitivity
|
||||
microphone-sensitivity-muted=The icon used to indicate that a microphone is muted
|
||||
|
||||
[multimedia]
|
||||
Name=Multimedia
|
||||
Description=Icons related to playback of media
|
||||
|
||||
media-playlist-repeat=The icon for the repeat mode of a media player
|
||||
media-playlist-repeat-song=The icon for repeating a song in a media player
|
||||
media-playlist-shuffle=The icon for the shuffle mode of a media player
|
||||
media-playlist-consecutive=The icon for consecutive mode of a media player
|
||||
media-skip-backward=The icon for the skip backward action of a media player
|
||||
media-seek-backward=The icon for the seek backward action of a media player
|
||||
media-playback-start=The icon for the start playback action of a media player
|
||||
media-seek-forward=The icon for the seek forward action of a media player
|
||||
media-skip-forward=The icon for the skip forward action of a media player
|
||||
media-playback-stop=The icon for the stop action of a media player
|
||||
media-playback-pause=The icon for the pause action of a media player
|
||||
media-eject=The icon for the eject action of a media player or file manager
|
||||
media-record=The icon for the record action of a media application
|
||||
media-view-subtitles=The icon used to show subtitles in a media player
|
||||
|
||||
[network]
|
||||
Name=Network
|
||||
Description=Icons related to network status");
|
||||
|
||||
network-transmit-receive=The icon used data is being both transmitted and received simultaneously, while the computing device is connected to a network
|
||||
network-transmit=The icon used when data is being transmitted, while the computing device is connected to a network
|
||||
network-receive=The icon used when data is being received, while the computing device is connected to a network
|
||||
network-idle=The icon used when no data is being transmitted or received, while the computing device is connected to a network
|
||||
network-error=The icon used when an error occurs trying to intialize the network connection of the computing device
|
||||
network-offline=The icon used when the computing device is disconnected from the network
|
||||
|
||||
[weather]
|
||||
Name=Weather
|
||||
Description=Icons about weather conditions
|
||||
|
||||
weather-clear=The icon used while the weather for a region is “clear skies”
|
||||
weather-clear-night=The icon used while the weather for a region is “clear skies” during the night
|
||||
weather-few-clouds=The icon used while the weather for a region is “partly cloudy”
|
||||
weather-few-clouds-night=The icon used while the weather for a region is “partly cloudy” during the night
|
||||
weather-fog=The icon used while the weather for a region is “foggy”
|
||||
weather-overcast=The icon used while the weather for a region is “overcast”
|
||||
weather-severe-alert=The icon used while a sever weather alert is in effect for a region
|
||||
weather-showers=The icon used while rain showers are occurring in a region
|
||||
weather-showers-scattered=The icon used while scattered rain showers are occurring in a region
|
||||
weather-snow=The icon used while snow showers are occurring in a region
|
||||
weather-storm=The icon used while storms are occurring in a region
|
||||
weather-windy=The icon used while the weather is windy
|
||||
|
||||
[navigation]
|
||||
Name=Navigation
|
||||
Description=Icons for navigation in the user interface of a program
|
||||
|
||||
go-first=The icon for the go to the first item in a list
|
||||
go-previous=The icon for the go to the previous item in a list
|
||||
go-next=The icon for the go to the next item in a list
|
||||
go-last=The icon for the go to the last item in a list
|
||||
go-bottom=The icon for the go to bottom of a list
|
||||
go-down=The icon for the go down in a list
|
||||
go-up=The icon for the go up in a list
|
||||
go-top=The icon for the go to the top of a list
|
||||
go-home=The icon for the go to home location
|
||||
go-jump=The icon for the jump to action
|
||||
|
||||
[editing]
|
||||
Name=Editing
|
||||
Description=Icons related to editing a document
|
||||
format-indent-less=The icon for the decrease indent formatting action
|
||||
format-indent-more=The icon for the increase indent formatting action
|
||||
format-justify-center=The icon for the center justification formatting action
|
||||
format-justify-fill=The icon for the fill justification formatting action
|
||||
format-justify-left=The icon for the left justification formatting action
|
||||
format-justify-right=The icon for the right justification action
|
||||
format-text-direction-ltr=The icon for the left-to-right text formatting action
|
||||
format-text-direction-rtl=The icon for the right-to-left formatting action
|
||||
format-text-bold=The icon for the bold text formatting action
|
||||
format-text-italic=The icon for the italic text formatting action
|
||||
format-text-underline=The icon for the underlined text formatting action
|
||||
format-text-strikethrough=The icon for the strikethrough text formatting action
|
||||
edit-clear=The icon for the clear action
|
||||
edit-clear-all=
|
||||
edit-copy=The icon for the copy action
|
||||
edit-cut=The icon for the cut action
|
||||
edit-delete=The icon for the delete action
|
||||
edit-find-replace=The icon for the find and replace action
|
||||
edit-paste=The icon for the paste action
|
||||
edit-redo=The icon for the redo action
|
||||
edit-select-all=The icon for the select all action
|
||||
edit-select=
|
||||
edit-undo=The icon for the undo action
|
||||
error-correct=
|
||||
document-properties=The icon for the action to view the properties of a document in an application
|
||||
document-new=The icon used for the action to create a new document
|
||||
document-open=The icon used for the action to open a document
|
||||
document-open-recent=The icon used for the action to open a document that was recently opened
|
||||
document-save=The icon for the save action. Should be an arrow pointing down and toward a hard disk
|
||||
document-save-as=The icon for the save as action
|
||||
document-send=The icon for the send action. Should be an arrow pointing up and away from a hard disk
|
||||
document-page-setup=The icon for the page setup action of a document editor
|
||||
document-edit=The icon for the action to edit a document
|
||||
object-flip-horizontal=The icon for the action to flip an object horizontally
|
||||
object-flip-vertical=The icon for the action to flip an object vertically
|
||||
object-rotate-left=The icon for the rotate left action performed on an object
|
||||
object-rotate-right=The icon for the rotate rigt action performed on an object
|
||||
insert-image=The icon for the insert image action of an application
|
||||
insert-link=The icon for the insert link action of an application
|
||||
insert-object=The icon for the insert object action of an application
|
||||
insert-text=The icon for the insert text action of an application
|
||||
accessories-text-editor=The icon used for the desktop's text editing accessory program
|
||||
|
||||
[view]
|
||||
Name=View Controls
|
||||
Description=Icons for view controls in a user interface
|
||||
|
||||
view-list=The icon used for “List“ view mode
|
||||
view-grid=The icon used for “Grid“ view mode (as opposed to “List“)
|
||||
view-fullscreen=The icon used for the “Fullscreen” item in the application's “View” menu
|
||||
view-restore=The icon used by an application for leaving the fullscreen view, and returning to a normal windowed view
|
||||
zoom-fit-best=The icon used for the “Best Fit” item in the application's “View” menu
|
||||
zoom-in=The icon used for the “Zoom in” item in the application's “View” menu
|
||||
zoom-out=The icon used for the “Zoom Out” item in the application's “View” menu
|
||||
zoom-original=The icon used for the “Original Size” item in the application's “View” menu
|
||||
view-continuous=The icon used for a continuous view mode
|
||||
view-paged=The icon used for a paged view mode (as opposed to continuous)
|
||||
view-dual=The icon used for a side-by-side view of paginated content
|
||||
view-wrapped=The icon used to indicate a wrap-around to the beginning
|
||||
view-pin=The icon used for 'pin a view'
|
||||
|
||||
[calendar]
|
||||
Name=Calendar, Tasks and Alarms
|
||||
Description=Icons related to calendars, tasks and alarms
|
||||
|
||||
task-due=The icon used when a task is due soon
|
||||
task-past-due=The icon used when a task that was due, has been left incomplete
|
||||
appointment-soon=The icon used when an appointment will occur soon
|
||||
appointment-missed=The icon used when an appointment was missed
|
||||
alarm=The icon used for alarms when a task or appointment is due
|
||||
|
||||
[communication]
|
||||
Name=Communication
|
||||
Description=Icons related email, phone calls, IM and other forms of communication
|
||||
|
||||
mail-unread=The icon used for an electronic mail that is unread
|
||||
mail-read=The icon used for an electronic mail that is read
|
||||
mail-replied=The icon used for an electronic mail that has been replied to
|
||||
mail-attachment=The icon used for an electronic mail that contains attachments
|
||||
mail-mark-important=The icon for the mark as important action of an electronic mail application
|
||||
mail-send=The icon for the send action of an electronic mail application
|
||||
mail-send-receive=The icon for the send and receive action of an electronic mail application
|
||||
call-start=The icon used for initiating or accepting a call
|
||||
call-stop=The icon used for stopping a current call
|
||||
call-missed=The icon used to show a missed call
|
||||
user-available=The icon used when a user on a chat network is available to initiate a conversation with
|
||||
user-offline=The icon used when a user on a chat network is not available
|
||||
user-idle=The icon used when a user on a chat network has not been an active participant in any chats on the network, for an extended period of time
|
||||
user-invisible=The icon used when a user is on a chat network, but is invisible to others
|
||||
user-busy=The icon used when a user is on a chat network, and has marked himself as busy
|
||||
user-away=The icon used when a user on a chat network is away from their keyboard and the chat program
|
||||
user-status-pending=The icon used when the current user status on a chat network is not known
|
||||
|
||||
[devices]
|
||||
Name=Devices and Media
|
||||
Description=Icons for devices and media
|
||||
|
||||
audio-input-microphone=The icon used for the microphone audio input device
|
||||
camera-web=The fallback icon for web cameras
|
||||
camera-photo=The icon used for a digital still camera devices
|
||||
input-keyboard=The icon used for the keyboard input device
|
||||
printer=The icon used for a printer device
|
||||
video-display=The icon used for the monitor that video gets displayed to
|
||||
computer=The icon used for the computing device as a whole
|
||||
media-optical=The icon used for physical optical media such as CD and DVD
|
||||
phone=The icon used for phone devices which support connectivity to the PC, such as VoIP, cellular, or possibly landline phones
|
||||
input-dialpad=The icon used for dialpad input devices
|
||||
input-touchpad=The icon used for touchpad input devices
|
||||
scanner=The icon used for a scanner device
|
||||
audio-card=The icon used for the audio rendering device
|
||||
input-gaming=The icon used for the gaming input device
|
||||
input-mouse=The icon used for the mousing input device
|
||||
multimedia-player=The icon used for generic multimedia playing devices
|
||||
audio-headphones=The icon used for headphones
|
||||
audio-headset=The icon used for headsets
|
||||
display-projector=The icon used for projectors
|
||||
media-removable=The icon used for generic removable media
|
||||
printer-network=The icon used for printers which are connected via the network
|
||||
audio-speakers=The icon used for speakers
|
||||
camera-video=The fallback icon for video cameras
|
||||
drive-optical=The icon used for optical media drives such as CD and DVD
|
||||
drive-removable-media=The icon used for removable media drives
|
||||
input-tablet=The icon used for graphics tablet input devices
|
||||
network-wireless=The icon used for wireless network connections
|
||||
network-wired=The icon used for wired network connections
|
||||
media-floppy=The icon used for physical floppy disk media
|
||||
media-flash=The fallback icon used for flash media, such as memory stick and SD
|
||||
|
||||
[contenttypes]
|
||||
Name=Content Types
|
||||
Description=Icons for different types of data, such as audio or image files
|
||||
|
||||
application-certificate=
|
||||
application-rss+xml=
|
||||
application-x-appliance=
|
||||
audio-x-generic=The icon used for generic audio file types
|
||||
folder=The standard folder icon used to represent directories on local filesystems, mail folders, and other hierarchical groups
|
||||
text-x-generic=The icon used for generic text file types
|
||||
video-x-generic=The icon used for generic video file types
|
||||
x-office-calendar=The icon used for generic calendar file types
|
||||
|
||||
[emotes]
|
||||
Name=Emotes
|
||||
Description=Icons for emotions that are expressed through text chat applications such as :-) or :-P in IRC or instant messengers
|
||||
|
||||
face-angel=The icon used for the 0:-) emote
|
||||
face-angry=The icon used for the X-( emote
|
||||
face-cool=The icon used for the B-) emote
|
||||
face-crying=The icon used for the :'( emote
|
||||
face-devilish=The icon used for the >:-) emote
|
||||
face-embarrassed=The icon used for the :-[ emote
|
||||
face-kiss=The icon used for the :-* emote
|
||||
face-laugh=The icon used for the :-)) emote
|
||||
face-monkey=The icon used for the :-(|) emote
|
||||
face-plain=The icon used for the :-| emote
|
||||
face-raspberry=The icon used for the :-P emote
|
||||
face-sad=The icon used for the :-( emote
|
||||
face-shutmouth=The 'shut mouth' emote
|
||||
face-sick=The icon used for the :-& emote
|
||||
face-smile=The icon used for the :-) emote
|
||||
face-smile-big=The icon used for the :-D emote
|
||||
face-smirk=The icon used for the :-! emote
|
||||
face-surprise=The icon used for the :-0 emote
|
||||
face-tired=The icon used for the |-) emote
|
||||
face-uncertain=The icon used for the :-/ emote
|
||||
face-wink=The icon used for the ;-) emote
|
||||
face-worried=The icon used for the :-S emote
|
||||
face-yawn=
|
||||
|
||||
[general]
|
||||
Name=General
|
||||
Description=Generally useful icons that don't fit in a particular category
|
||||
|
||||
edit-find=The icon for generic search actions
|
||||
content-loading=The icon used to indicate that content is loading
|
||||
open-menu=The icon used for a menu button in the header bar
|
||||
view-more=The icon used for a “View More“ action
|
||||
tab-new=The icon used for a “New Tab“ action
|
||||
bookmark-new=The icon used for creating a new bookmark
|
||||
mark-location=The icon used to mark a location on a map
|
||||
find-location=The icon used for a “Search location“ action
|
||||
send-to=The icon used for a “Send to“ action
|
||||
object-select=The icon used for generic selection actions
|
||||
window-close=The icon used for actions that close a view, such as window or tab close button
|
||||
view-refresh=The icon used for the “Refresh” item in the application's “View” menu
|
||||
process-stop=The icon used for the “Stop” action in applications with actions that may take a while to process, such as web page loading in a browser
|
||||
action-unavailable=The icon used to indicate that an action is currently unavailable, such as “Pause“ when no media is playing
|
||||
document-print=The icon for the print action of an application
|
||||
printer-printing=The icon used while a print job is successfully being spooled to a printing device
|
||||
printer-warning=The icon used when a recoverable problem occurs while attempting to printing
|
||||
printer-error=The icon used when an error occurs while attempting to print
|
||||
dialog-information=The icon used when a dialog is opened to give information to the user that may be pertinent to the requested action
|
||||
dialog-question=The icon used when a dialog is opened to ask a simple question of the user
|
||||
dialog-warning=The icon used when a dialog is opened to warn the user of impending issues with the requested action
|
||||
dialog-password=The icon used when a dialog requesting the authentication credentials for a user is opened
|
||||
dialog-error=The icon used when a dialog is opened to explain an error condition to the user
|
||||
list-add=The icon for the add to list action
|
||||
list-remove=The icon for the remove from list action
|
||||
non-starred=The icon used to indicate that an object is not 'starred'
|
||||
semi-starred=The icon used to indicate that an object has is 'half-starred'
|
||||
starred=The icon used to indicate that an object is 'starred'
|
||||
star-new=The used for the “New Star“ action
|
||||
security-low=The icon used to indicate that the security level of a connection is presumed to be insecure, either by using weak encryption, or by using a certificate that the could not be automatically verified, and which the user has not chosent to trust
|
||||
security-medium=The icon used to indicate that the security level of a connection is presumed to be secure, using strong encryption, and a certificate that could not be automatically verified, but which the user has chosen to trust
|
||||
security-high=The icon used to indicate that the security level of a connection is known to be secure, using strong encryption and a valid certificate
|
||||
user-trash=The icon for the user's “Trash” place in the file system
|
||||
user-trash-full=The icon for the user's “Trash” in the file system, when there are items in the “Trash” waiting for disposal or recovery
|
||||
emblem-system=The icon used as an emblem for directories that contain system libraries, settings, and data
|
||||
avatar-default=The generic avatar icon, which is used to represent a user that doesn't have a personalized avatar
|
||||
emblem-synchronizing=The icon used as an emblem to indicate that a a synchronizing operation is in process
|
||||
emblem-shared=The icon used as an emblem for files and directories that are shared to other users
|
||||
folder-download=The icon representing the location in the file system where downloaded files are stored
|
||||
help-browser=The icon used for the desktop's help browsing application
|
||||
|
||||
[other]
|
||||
Name=Other
|
||||
Description=Icons which have may be too specialized and not of general interest
|
||||
|
||||
changes-allow=
|
||||
changes-prevent=
|
||||
view-sort-ascending=The icon used for the “Sort Ascending” item in the application's “View” menu, or in a button for changing the sort method for a list
|
||||
view-sort-descending=The icon used for the “Sort Descending” item in the application's “View” menu, or in a button for changing the sort method for a list
|
||||
document-revert=The icon for the action of reverting to a previous version of a document
|
||||
address-book-new=The icon used for the action to create a new address book
|
||||
application-exit=The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit
|
||||
appointment-new=The icon used for the action to create a new appointment in a calendaring application
|
||||
contact-new=The icon used for the action to create a new contact in an address book application
|
||||
document-print-preview=The icon for the print preview action of an application
|
||||
folder-new=The icon for creating a new folder
|
||||
help-about=The icon for the About item in the Help menu
|
||||
help-contents=The icon for Contents item in the Help menu
|
||||
help-faq=The icon for the FAQ item in the Help menu
|
||||
list-remove-all=
|
||||
mail-forward=The icon for the forward action of an electronic mail application
|
||||
mail-mark-junk=The icon for the mark as junk action of an electronic mail application
|
||||
mail-mark-notjunk=The icon for the mark as not junk action of an electronic mail application
|
||||
mail-mark-read=The icon for the mark as read action of an electronic mail application
|
||||
mail-mark-unread=The icon for the mark as unread action of an electronic mail application
|
||||
mail-message-new=The icon for the compose new mail action of an electronic mail application
|
||||
mail-reply-all=The icon for the reply to all action of an electronic mail application
|
||||
mail-reply-sender=The icon for the reply to sender action of an electronic mail application
|
||||
pan-down=
|
||||
pan-end=
|
||||
pan-start=
|
||||
pan-up=
|
||||
system-lock-screen=The icon used for the “Lock Screen” item in the desktop's panel application
|
||||
system-log-out=The icon used for the “Log Out” item in the desktop's panel application
|
||||
system-run=The icon used for the “Run Application...” item in the desktop's panel application
|
||||
system-search=The icon used for the “Search” item in the desktop's panel application
|
||||
system-reboot=The icon used for the “Reboot” item in the desktop's panel application
|
||||
system-shutdown=The icon used for the “Shutdown” item in the desktop's panel application
|
||||
tools-check-spelling=The icon used for the “Check Spelling” item in the application's “Tools” menu
|
||||
window-maximize=
|
||||
window-minimize=
|
||||
window-restore=
|
||||
window-new=The icon used for the “New Window” item in the application's “Windows” menu
|
||||
accessories-calculator=The icon used for the desktop's calculator accessory program
|
||||
accessories-character-map=The icon used for the desktop's international and extended text character accessory program
|
||||
accessories-dictionary=The icon used for the desktop's dictionary accessory program
|
||||
multimedia-volume-control=The icon used for the desktop's hardware volume control application
|
||||
preferences-desktop-accessibility=The icon used for the desktop's accessibility preferences
|
||||
preferences-desktop-display=
|
||||
preferences-desktop-font=The icon used for the desktop's font preferences
|
||||
preferences-desktop-keyboard=The icon used for the desktop's keyboard preferences
|
||||
preferences-desktop-keyboard-shortcuts=
|
||||
preferences-desktop-locale=The icon used for the desktop's locale preferences
|
||||
preferences-desktop-remote-desktop=
|
||||
preferences-desktop-multimedia=The icon used for the desktop's multimedia preferences
|
||||
preferences-desktop-screensaver=The icon used for the desktop's screen saving preferences
|
||||
preferences-desktop-theme=The icon used for the desktop's theme preferences
|
||||
preferences-desktop-wallpaper=The icon used for the desktop's wallpaper preferences
|
||||
preferences-system-privacy=
|
||||
preferences-system-windows=
|
||||
system-file-manager=The icon used for the desktop's file management application
|
||||
system-software-install=The icon used for the desktop's software installer application
|
||||
system-software-update=The icon used for the desktop's software updating application
|
||||
system-users=
|
||||
user-info=
|
||||
utilities-system-monitor=The icon used for the desktop's system resource monitor application
|
||||
utilities-terminal=The icon used for the desktop's terminal emulation application.
|
||||
application-x-addon=
|
||||
application-x-executable=The icon used for executable file types
|
||||
font-x-generic=The icon used for generic font file types
|
||||
image-x-generic=The icon used for generic image file types
|
||||
package-x-generic=The icon used for generic package file types
|
||||
text-html=The icon used for HTML text file types
|
||||
text-x-generic-template=The icon used for generic text templates
|
||||
text-x-preview=
|
||||
text-x-script=The icon used for script file types, such as shell scripts
|
||||
x-office-address-book=The icon used for generic address book file types
|
||||
x-office-document=The icon used for generic document and letter file types
|
||||
x-office-document-template=
|
||||
x-office-presentation=The icon used for generic presentation file types
|
||||
x-office-presentation-template=
|
||||
x-office-spreadsheet=The icon used for generic spreadsheet file types
|
||||
x-office-spreadsheet-template=
|
||||
x-package-repository=
|
||||
applications-accessories=The icon for the “Accessories” sub-menu of the Programs menu
|
||||
applications-development=The icon for the “Programming” sub-menu of the Programs menu
|
||||
applications-engineering=The icon for the “Engineering” sub-menu of the Programs menu
|
||||
applications-games=The icon for the “Games” sub-menu of the Programs menu
|
||||
applications-graphics=The icon for the “Graphics” sub-menu of the Programs menu
|
||||
applications-internet=The icon for the “Internet” sub-menu of the Programs menu
|
||||
applications-multimedia=The icon for the “Multimedia” sub-menu of the Programs menu
|
||||
applications-office=The icon for the “Office” sub-menu of the Programs menu
|
||||
applications-other=The icon for the “Other” sub-menu of the Programs menu
|
||||
applications-science=The icon for the “Science” sub-menu of the Programs menu
|
||||
applications-system=The icon for the “System Tools” sub-menu of the Programs menu
|
||||
applications-utilities=The icon for the “Utilities” sub-menu of the Programs menu
|
||||
preferences-desktop=The icon for the “Desktop Preferences” category
|
||||
preferences-desktop-peripherals=The icon for the “Peripherals” sub-category of the “Desktop Preferences” category
|
||||
preferences-desktop-personal=The icon for the “Personal” sub-category of the “Desktop Preferences” category
|
||||
preferences-other=The icon for the “Other” preferences category
|
||||
preferences-system=The icon for the “System Preferences” category
|
||||
preferences-system-network=The icon for the “Network” sub-category of the “System Preferences” category
|
||||
system-help=The icon for the “Help” system category
|
||||
battery=The icon used for the system battery device
|
||||
computer-apple-ipad=
|
||||
colorimeter-colorhug=
|
||||
drive-harddisk=The icon used for hard disk drives
|
||||
drive-harddisk-ieee1394=
|
||||
drive-harddisk-system=
|
||||
drive-multidisk=
|
||||
media-optical-bd=
|
||||
media-optical-cd-audio=
|
||||
media-optical-dvd=
|
||||
media-tape=The icon used for generic physical tape media
|
||||
media-zip=
|
||||
modem=The icon used for modem devices
|
||||
multimedia-player-apple-ipod-touch=
|
||||
network-vpn=
|
||||
pda=This is the fallback icon for Personal Digial Assistant devices. Primary use of this icon is for PDA devices connected to the PC. Connection medium is not an important aspect of the icon. The metaphor for this fallback icon should be a generic PDA device icon
|
||||
phone-apple-iphone=
|
||||
uninterruptible-power-supply=
|
||||
emblem-default=The icon used as an emblem to specify the default selection of a printer for example
|
||||
emblem-documents=The icon used as an emblem for the directory where a user's documents are stored
|
||||
emblem-downloads=The icon used as an emblem for the directory where a user's downloads from the internet are stored
|
||||
emblem-favorite=The icon used as an emblem for files and directories that the user marks as favorites
|
||||
emblem-generic=
|
||||
emblem-important=The icon used as an emblem for files and directories that are marked as important by the user
|
||||
emblem-mail=The icon used as an emblem to specify the directory where the user's electronic mail is stored
|
||||
emblem-new=
|
||||
emblem-ok=
|
||||
emblem-package=
|
||||
emblem-photos=The icon used as an emblem to specify the directory where the user stores photographs
|
||||
emblem-readonly=The icon used as an emblem for files and directories which can not be written to by the user
|
||||
emblem-symbolic-link=The icon used as an emblem for files and direcotires that are links to other files or directories on the filesystem
|
||||
emblem-synchronized=The icon used as an emblem for files or directories that are configured to be synchronized to another device
|
||||
emblem-unreadable=The icon used as an emblem for files and directories that are inaccessible.
|
||||
emblem-urgent=
|
||||
emblem-videos=
|
||||
emblem-web=
|
||||
folder-documents=
|
||||
folder-download=
|
||||
folder-music=
|
||||
folder-pictures=
|
||||
folder-documents=
|
||||
folder-publicshare=
|
||||
folder-remote=The icon used for normal directories on a remote filesystem
|
||||
folder-saved-search=
|
||||
folder-templates=
|
||||
folder-videos=
|
||||
network-server=The icon used for individual host machines under the “Network Servers” place in the file manager
|
||||
network-workgroup=The icon for the “Network Servers” place in the desktop's file manager, and workgroups within the network
|
||||
start-here=The icon used by the desktop's main menu for accessing places, applications, and other features
|
||||
user-bookmarks=The icon for the user's special “Bookmarks” place
|
||||
user-desktop=The icon for the special “Desktop” directory of the user
|
||||
user-home=The icon for the special “Home” directory of the user
|
||||
airplane-mode=
|
||||
battery-caution-charging=
|
||||
battery-caution=The icon used when the battery is below 40%
|
||||
battery-empty-charging=
|
||||
battery-empty=
|
||||
battery-full-charged=
|
||||
battery-full-charging=
|
||||
battery-full=
|
||||
battery-good-charging=
|
||||
battery-good=
|
||||
battery-low-charging=
|
||||
battery-low=The icon used when the battery is below 20%
|
||||
battery-missing=
|
||||
bluetooth-active=
|
||||
bluetooth-disabled=
|
||||
channel-insecure=
|
||||
channel-secure=
|
||||
computer-fail=
|
||||
display-brightness=
|
||||
keyboard-brightness=
|
||||
folder-drag-accept=The icon used for a folder while an object is being dragged onto it, that is of a type that the directory can contain
|
||||
folder-open=The icon used for folders, while their contents are being displayed within the same window. This icon would normally be shown in a tree or list view, next to the main view of a folder's contents
|
||||
folder-visiting=The icon used for folders, while their contents are being displayed in another window. This icon would typically be used when using multiple windows to navigate the hierarchy, such as in Nautilus's spatial mode
|
||||
image-loading=The icon used when another image is being loaded, such as thumnails for larger images in the file manager
|
||||
image-missing=The icon used when another image could not be loaded
|
||||
mail-signed=The icon used for an electronic mail that contains a signature
|
||||
mail-signed-verified=The icon used for an electronic mail that contains a signature which has also been verified by the security system
|
||||
network-cellular-3g=
|
||||
network-cellular-4g=
|
||||
network-cellular-edge=
|
||||
network-cellular-gprs=
|
||||
network-cellular-umts=
|
||||
network-cellular-acquiring=
|
||||
network-cellular-connected=
|
||||
network-cellular-no-route=
|
||||
network-cellular-offline=
|
||||
network-cellular-signal-excellent=
|
||||
network-cellular-signal-good=
|
||||
network-cellular-signal-ok=
|
||||
network-cellular-signal-weak=
|
||||
network-cellular-signal-none=
|
||||
network-vpn-acquiring=
|
||||
network-vpn=
|
||||
network-wired-acquiring=
|
||||
network-wired-disconnected=
|
||||
network-wired-no-route=
|
||||
network-wired-offline=
|
||||
network-wireless-acquiring=
|
||||
network-wireless-connected=
|
||||
network-wireless-encrypted=
|
||||
network-wireless-hotspot=
|
||||
network-wireless-no-route=
|
||||
network-wireless-offline=
|
||||
network-wireless-signal-excellent=
|
||||
network-wireless-signal-good=
|
||||
network-wireless-signal-ok=
|
||||
network-wireless-signal-weak=
|
||||
network-wireless-signal-none=
|
||||
rotation-allowed=
|
||||
rotation-locked=
|
||||
software-update-available=The icon used when an update is available for software installed on the computing device, through the system software update program
|
||||
software-update-urgent=The icon used when an urgent update is available through the system software update program
|
||||
sync-error=The icon used when an error occurs while attempting to synchronize data from the computing device, to another device
|
||||
sync-synchronizing=The icon used while data is successfully synchronizing to another device
|
||||
touchpad-disabled=
|
||||
trophy-bronze=
|
||||
trophy-silver=
|
||||
trophy-gold=
|
||||
night-light=
|
||||
daytime-sunrise=
|
||||
daytime-sunset=
|
@@ -3,5 +3,6 @@
|
||||
<gresource prefix="/org/gtk/iconbrowser/gtk">
|
||||
<file preprocess="xml-stripblanks">window.ui</file>
|
||||
<file preprocess="xml-stripblanks">menus.ui</file>
|
||||
<file>icon.list</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
@@ -6,11 +6,22 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const gchar *id;
|
||||
const gchar *name;
|
||||
const gchar *description;
|
||||
gchar *id;
|
||||
gchar *name;
|
||||
gchar *description;
|
||||
} Context;
|
||||
|
||||
static void
|
||||
context_free (gpointer data)
|
||||
{
|
||||
Context *context = data;
|
||||
|
||||
g_free (context->id);
|
||||
g_free (context->name);
|
||||
g_free (context->description);
|
||||
g_free (context);
|
||||
}
|
||||
|
||||
struct _IconBrowserWindow
|
||||
{
|
||||
GtkApplicationWindow parent;
|
||||
@@ -154,6 +165,7 @@ add_icon (IconBrowserWindow *win,
|
||||
g_free (symbolic_name);
|
||||
symbolic_name = NULL;
|
||||
}
|
||||
|
||||
gtk_list_store_insert_with_values (win->store, NULL, -1,
|
||||
ICON_STORE_NAME_COLUMN, regular_name,
|
||||
ICON_STORE_SYMBOLIC_NAME_COLUMN, symbolic_name,
|
||||
@@ -172,11 +184,11 @@ add_context (IconBrowserWindow *win,
|
||||
GtkWidget *row;
|
||||
|
||||
c = g_new (Context, 1);
|
||||
c->id = id;
|
||||
c->name = name;
|
||||
c->description = description;
|
||||
c->id = g_strdup (id);
|
||||
c->name = g_strdup (name);
|
||||
c->description = g_strdup (description);
|
||||
|
||||
g_hash_table_insert (win->contexts, (gpointer)id, c);
|
||||
g_hash_table_insert (win->contexts, c->id, c);
|
||||
|
||||
row = gtk_label_new (name);
|
||||
g_object_set_data (G_OBJECT (row), "context", c);
|
||||
@@ -213,475 +225,50 @@ selected_context_changed (GtkListBox *list, IconBrowserWindow *win)
|
||||
static void
|
||||
populate (IconBrowserWindow *win)
|
||||
{
|
||||
add_context (win, "volume", "Volume", "Icons related to audio input and output volume");
|
||||
add_icon (win, "audio-volume-high", "The icon used to indicate high audio volume", "volume");
|
||||
add_icon (win, "audio-volume-low", "The icon used to indicate low audio volume", "volume");
|
||||
add_icon (win, "audio-volume-medium", "The icon used to indicate medium audio volume", "volume");
|
||||
add_icon (win, "audio-volume-muted", "The icon used to indicate the muted state for audio playback", "volume");
|
||||
add_icon (win, "microphone-sensitivity-high", "The icon used to indicate high microphone sensitivity", "volume");
|
||||
add_icon (win, "microphone-sensitivity-low", "The icon used to indicate low microphone sensitivity", "volume");
|
||||
add_icon (win, "microphone-sensitivity-medium", "The icon used to indicate medium microphone sensitivity", "volume");
|
||||
add_icon (win, "microphone-sensitivity-muted", "The icon used to indicate that a microphone is muted", "volume");
|
||||
GFile *file;
|
||||
GKeyFile *kf;
|
||||
char *data;
|
||||
gsize length;
|
||||
char **groups;
|
||||
int i;
|
||||
|
||||
add_context (win, "multimedia", "Multimedia", "Icons related to playback of media");
|
||||
add_icon (win, "media-playlist-repeat", "The icon for the repeat mode of a media player", "multimedia");
|
||||
add_icon (win, "media-playlist-repeat-song", "The icon for repeating a song in a media player", "multimedia");
|
||||
add_icon (win, "media-playlist-shuffle", "The icon for the shuffle mode of a media player", "multimedia");
|
||||
add_icon (win, "media-playlist-consecutive", "The icon for consecutive mode of a media player", "multimedia");
|
||||
add_icon (win, "media-skip-backward", "The icon for the skip backward action of a media player", "multimedia");
|
||||
add_icon (win, "media-seek-backward", "The icon for the seek backward action of a media player", "multimedia");
|
||||
add_icon (win, "media-playback-start", "The icon for the start playback action of a media player", "multimedia");
|
||||
add_icon (win, "media-seek-forward", "The icon for the seek forward action of a media player", "multimedia");
|
||||
add_icon (win, "media-skip-forward", "The icon for the skip forward action of a media player", "multimedia");
|
||||
add_icon (win, "media-playback-stop", "The icon for the stop action of a media player", "multimedia");
|
||||
add_icon (win, "media-playback-pause", "The icon for the pause action of a media player", "multimedia");
|
||||
add_icon (win, "media-eject", "The icon for the eject action of a media player or file manager", "multimedia");
|
||||
add_icon (win, "media-record", "The icon for the record action of a media application", "multimedia");
|
||||
add_icon (win, "media-view-subtitles", "The icon used to show subtitles in a media player", "multimedia");
|
||||
file = g_file_new_for_uri ("resource:/org/gtk/iconbrowser/gtk/icon.list");
|
||||
g_file_load_contents (file, NULL, &data, &length, NULL, NULL);
|
||||
|
||||
add_context (win, "network", "Network", "Icons related to network status");
|
||||
add_icon (win, "network-transmit-receive", "The icon used data is being both transmitted and received simultaneously, while the computing device is connected to a network", "network");
|
||||
add_icon (win, "network-transmit", "The icon used when data is being transmitted, while the computing device is connected to a network", "network");
|
||||
add_icon (win, "network-receive", "The icon used when data is being received, while the computing device is connected to a network", "network");
|
||||
add_icon (win, "network-idle", "The icon used when no data is being transmitted or received, while the computing device is connected to a network", "network");
|
||||
add_icon (win, "network-error", "The icon used when an error occurs trying to intialize the network connection of the computing device", "network");
|
||||
add_icon (win, "network-offline", "The icon used when the computing device is disconnected from the network", "network");
|
||||
kf = g_key_file_new ();
|
||||
g_key_file_load_from_data (kf, data, length, G_KEY_FILE_NONE, NULL);
|
||||
|
||||
add_context (win, "weather", "Weather", "Icons about weather conditions");
|
||||
add_icon (win, "weather-clear", "The icon used while the weather for a region is “clear skies”", "weather");
|
||||
add_icon (win, "weather-clear-night", "The icon used while the weather for a region is “clear skies” during the night", "weather");
|
||||
add_icon (win, "weather-few-clouds", "The icon used while the weather for a region is “partly cloudy”", "weather");
|
||||
add_icon (win, "weather-few-clouds-night", "The icon used while the weather for a region is “partly cloudy” during the night", "weather");
|
||||
add_icon (win, "weather-fog", "The icon used while the weather for a region is “foggy”", "weather");
|
||||
add_icon (win, "weather-overcast", "The icon used while the weather for a region is “overcast”", "weather");
|
||||
add_icon (win, "weather-severe-alert", "The icon used while a sever weather alert is in effect for a region", "weather");
|
||||
add_icon (win, "weather-showers", "The icon used while rain showers are occurring in a region", "weather");
|
||||
add_icon (win, "weather-showers-scattered", "The icon used while scattered rain showers are occurring in a region", "weather");
|
||||
add_icon (win, "weather-snow", "The icon used while snow showers are occurring in a region", "weather");
|
||||
add_icon (win, "weather-storm", "The icon used while storms are occurring in a region", "weather");
|
||||
groups = g_key_file_get_groups (kf, &length);
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
const char *context;
|
||||
const char *name;
|
||||
const char *description;
|
||||
char **keys;
|
||||
gsize len;
|
||||
int j;
|
||||
|
||||
add_context (win, "navigation", "Navigation", "Icons for navigation in the user interface of a program");
|
||||
add_icon (win, "go-first", "The icon for the go to the first item in a list", "navigation");
|
||||
add_icon (win, "go-previous", "The icon for the go to the previous item in a list", "navigation");
|
||||
add_icon (win, "go-next", "The icon for the go to the next item in a list", "navigation");
|
||||
add_icon (win, "go-last", "The icon for the go to the last item in a list", "navigation");
|
||||
add_icon (win, "go-bottom", "The icon for the go to bottom of a list", "navigation");
|
||||
add_icon (win, "go-down", "The icon for the go down in a list", "navigation");
|
||||
add_icon (win, "go-up", "The icon for the go up in a list", "navigation");
|
||||
add_icon (win, "go-top", "The icon for the go to the top of a list", "navigation");
|
||||
add_icon (win, "go-home", "The icon for the go to home location", "navigation");
|
||||
add_icon (win, "go-jump", "The icon for the jump to action", "navigation");
|
||||
context = groups[i];
|
||||
name = g_key_file_get_string (kf, context, "Name", NULL);
|
||||
description = g_key_file_get_string (kf, context, "Description", NULL);
|
||||
add_context (win, context, name, description);
|
||||
|
||||
add_context (win, "editing", "Editing", "Icons related to editing a document");
|
||||
add_icon (win, "format-indent-less", "The icon for the decrease indent formatting action", "editing");
|
||||
add_icon (win, "format-indent-more", "The icon for the increase indent formatting action", "editing");
|
||||
add_icon (win, "format-justify-center", "The icon for the center justification formatting action", "editing");
|
||||
add_icon (win, "format-justify-fill", "The icon for the fill justification formatting action", "editing");
|
||||
add_icon (win, "format-justify-left", "The icon for the left justification formatting action", "editing");
|
||||
add_icon (win, "format-justify-right", "The icon for the right justification action", "editing");
|
||||
add_icon (win, "format-text-direction-ltr", "The icon for the left-to-right text formatting action", "editing");
|
||||
add_icon (win, "format-text-direction-rtl", "The icon for the right-to-left formatting action", "editing");
|
||||
add_icon (win, "format-text-bold", "The icon for the bold text formatting action", "editing");
|
||||
add_icon (win, "format-text-italic", "The icon for the italic text formatting action", "editing");
|
||||
add_icon (win, "format-text-underline", "The icon for the underlined text formatting action", "editing");
|
||||
add_icon (win, "format-text-strikethrough", "The icon for the strikethrough text formatting action", "editing");
|
||||
add_icon (win, "edit-clear", "The icon for the clear action", "editing");
|
||||
add_icon (win, "edit-clear-all", "", "editing");
|
||||
add_icon (win, "edit-copy", "The icon for the copy action", "editing");
|
||||
add_icon (win, "edit-cut", "The icon for the cut action", "editing");
|
||||
add_icon (win, "edit-delete", "The icon for the delete action", "editing");
|
||||
add_icon (win, "edit-find-replace", "The icon for the find and replace action", "editing");
|
||||
add_icon (win, "edit-paste", "The icon for the paste action", "editing");
|
||||
add_icon (win, "edit-redo", "The icon for the redo action", "editing");
|
||||
add_icon (win, "edit-select-all", "The icon for the select all action", "editing");
|
||||
add_icon (win, "edit-select", "", "editing");
|
||||
add_icon (win, "edit-undo", "The icon for the undo action", "editing");
|
||||
add_icon (win, "document-properties", "The icon for the action to view the properties of a document in an application", "editing");
|
||||
add_icon (win, "document-new", "The icon used for the action to create a new document", "editing");
|
||||
add_icon (win, "document-open", "The icon used for the action to open a document", "editing");
|
||||
add_icon (win, "document-open-recent", "The icon used for the action to open a document that was recently opened", "editing");
|
||||
add_icon (win, "document-save", "The icon for the save action. Should be an arrow pointing down and toward a hard disk", "editing");
|
||||
add_icon (win, "document-save-as", "The icon for the save as action", "editing");
|
||||
add_icon (win, "document-send", "The icon for the send action. Should be an arrow pointing up and away from a hard disk", "editing");
|
||||
add_icon (win, "document-page-setup", "The icon for the page setup action of a document editor", "editing");
|
||||
add_icon (win, "changes-allow", "", "other");
|
||||
add_icon (win, "changes-prevent", "", "other");
|
||||
add_icon (win, "object-flip-horizontal", "The icon for the action to flip an object horizontally", "editing");
|
||||
add_icon (win, "object-flip-vertical", "The icon for the action to flip an object vertically", "editing");
|
||||
add_icon (win, "object-rotate-left", "The icon for the rotate left action performed on an object", "editing");
|
||||
add_icon (win, "object-rotate-right", "The icon for the rotate rigt action performed on an object", "editing");
|
||||
add_icon (win, "insert-image", "The icon for the insert image action of an application", "editing");
|
||||
add_icon (win, "insert-link", "The icon for the insert link action of an application", "editing");
|
||||
add_icon (win, "insert-object", "The icon for the insert object action of an application", "editing");
|
||||
add_icon (win, "insert-text", "The icon for the insert text action of an application", "editing");
|
||||
add_icon (win, "accessories-text-editor", "The icon used for the desktop's text editing accessory program", "editing");
|
||||
keys = g_key_file_get_keys (kf, context, &len, NULL);
|
||||
for (j = 0; j < len; j++)
|
||||
{
|
||||
const char *key = keys[j];
|
||||
const char *value;
|
||||
|
||||
add_context (win, "view", "View Controls", "Icons for view controls in a user interface");
|
||||
add_icon (win, "view-list", "The icon used for “List“ view mode", "view");
|
||||
add_icon (win, "view-grid", "The icon used for “Grid“ view mode (as opposed to “List“)", "view");
|
||||
add_icon (win, "view-fullscreen", "The icon used for the “Fullscreen” item in the application's “View” menu", "view");
|
||||
add_icon (win, "view-restore", "The icon used by an application for leaving the fullscreen view, and returning to a normal windowed view", "view");
|
||||
add_icon (win, "zoom-fit-best", "The icon used for the “Best Fit” item in the application's “View” menu", "view");
|
||||
add_icon (win, "zoom-in", "The icon used for the “Zoom in” item in the application's “View” menu", "view");
|
||||
add_icon (win, "zoom-out", "The icon used for the “Zoom Out” item in the application's “View” menu ", "view");
|
||||
add_icon (win, "zoom-original", "The icon used for the “Original Size” item in the application's “View” menu", "view");
|
||||
add_icon (win, "view-continuous", "The icon used for a continuous view mode", "view");
|
||||
add_icon (win, "view-paged", "The icon used for a paged view mode (as opposed to continuous)", "view");
|
||||
add_icon (win, "view-dual", "The icon used for a side-by-side view of paginated content", "view");
|
||||
add_icon (win, "view-wrapped", "The icon used to indicate a wrap-around to the beginning", "view");
|
||||
if (strcmp (key, "Name") == 0 || strcmp (key, "Description") == 0)
|
||||
continue;
|
||||
|
||||
add_context (win, "calendar", "Calendar, Tasks and Alarms", "Icons related to calendars, tasks and alarms");
|
||||
add_icon (win, "task-due", "The icon used when a task is due soon", "calendar");
|
||||
add_icon (win, "task-past-due", "The icon used when a task that was due, has been left incomplete", "calendar");
|
||||
add_icon (win, "appointment-soon", "The icon used when an appointment will occur soon", "calendar");
|
||||
add_icon (win, "appointment-missed", "The icon used when an appointment was missed", "calendar");
|
||||
add_icon (win, "alarm", "The icon used for alarms when a task or appointment is due", "calendar");
|
||||
value = g_key_file_get_string (kf, context, key, NULL);
|
||||
|
||||
add_context (win, "communication", "Communication", "Icons related email, phone calls, IM and other forms of communication");
|
||||
add_icon (win, "mail-unread", "The icon used for an electronic mail that is unread", "communication");
|
||||
add_icon (win, "mail-read", "The icon used for an electronic mail that is read", "communication");
|
||||
add_icon (win, "mail-replied", "The icon used for an electronic mail that has been replied to", "communication");
|
||||
add_icon (win, "mail-attachment", "The icon used for an electronic mail that contains attachments", "communication");
|
||||
add_icon (win, "mail-mark-important", "The icon for the mark as important action of an electronic mail application", "communication");
|
||||
add_icon (win, "mail-send", "The icon for the send action of an electronic mail application", "communication");
|
||||
add_icon (win, "mail-send-receive", "The icon for the send and receive action of an electronic mail application", "communication");
|
||||
add_icon (win, "call-start", "The icon used for initiating or accepting a call", "communication");
|
||||
add_icon (win, "call-stop", "The icon used for stopping a current call", "communication");
|
||||
add_icon (win, "call-missed", "The icon used to show a missed call", "communication");
|
||||
add_icon (win, "user-available", "The icon used when a user on a chat network is available to initiate a conversation with", "communication");
|
||||
add_icon (win, "user-offline", "The icon used when a user on a chat network is not available", "communication");
|
||||
add_icon (win, "user-idle", "The icon used when a user on a chat network has not been an active participant in any chats on the network, for an extended period of time", "communication");
|
||||
add_icon (win, "user-invisible", "The icon used when a user is on a chat network, but is invisible to others", "communication");
|
||||
add_icon (win, "user-busy", "The icon used when a user is on a chat network, and has marked himself as busy", "communication");
|
||||
add_icon (win, "user-away", "The icon used when a user on a chat network is away from their keyboard and the chat program", "communication");
|
||||
add_icon (win, "user-status-pending", "The icon used when the current user status on a chat network is not known", "communication");
|
||||
|
||||
add_context (win, "devices", "Devices and Media", "Icons for devices and media");
|
||||
add_icon (win, "audio-input-microphone", "The icon used for the microphone audio input device", "devices");
|
||||
add_icon (win, "camera-web", "The fallback icon for web cameras", "devices");
|
||||
add_icon (win, "camera-photo", "The icon used for a digital still camera devices", "devices");
|
||||
add_icon (win, "input-keyboard", "The icon used for the keyboard input device", "devices");
|
||||
add_icon (win, "printer", "The icon used for a printer device", "devices");
|
||||
add_icon (win, "video-display", "The icon used for the monitor that video gets displayed to", "devices");
|
||||
add_icon (win, "computer", "The icon used for the computing device as a whole", "devices");
|
||||
add_icon (win, "media-optical", "The icon used for physical optical media such as CD and DVD", "devices");
|
||||
add_icon (win, "phone", "The icon used for phone devices which support connectivity to the PC, such as VoIP, cellular, or possibly landline phones", "devices");
|
||||
add_icon (win, "input-dialpad", "The icon used for dialpad input devices", "devices");
|
||||
add_icon (win, "input-touchpad", "The icon used for touchpad input devices", "devices");
|
||||
add_icon (win, "scanner", "The icon used for a scanner device", "devices");
|
||||
add_icon (win, "audio-card", "The icon used for the audio rendering device", "devices");
|
||||
add_icon (win, "input-gaming", "The icon used for the gaming input device", "devices");
|
||||
add_icon (win, "input-mouse", "The icon used for the mousing input device", "devices");
|
||||
add_icon (win, "multimedia-player", "The icon used for generic multimedia playing devices", "devices");
|
||||
add_icon (win, "audio-headphones", "The icon used for headphones", "devices");
|
||||
add_icon (win, "audio-headset", "The icon used for headsets", "devices");
|
||||
add_icon (win, "display-projector", "The icon used for projectors", "devices");
|
||||
add_icon (win, "media-removable", "The icon used for generic removable media", "devices");
|
||||
add_icon (win, "printer-network", "The icon used for printers which are connected via the network", "devices");
|
||||
add_icon (win, "audio-speakers", "The icon used for speakers", "devices");
|
||||
add_icon (win, "camera-video", "The fallback icon for video cameras", "devices");
|
||||
add_icon (win, "drive-optical", "The icon used for optical media drives such as CD and DVD", "devices");
|
||||
add_icon (win, "drive-removable-media", "The icon used for removable media drives", "devices");
|
||||
add_icon (win, "input-tablet", "The icon used for graphics tablet input devices", "devices");
|
||||
add_icon (win, "network-wireless", "The icon used for wireless network connections", "devices");
|
||||
add_icon (win, "network-wired", "The icon used for wired network connections", "devices");
|
||||
add_icon (win, "media-floppy", "The icon used for physical floppy disk media", "devices");
|
||||
add_icon (win, "media-flash", "The fallback icon used for flash media, such as memory stick and SD", "devices");
|
||||
|
||||
add_context (win, "contenttypes", "Content Types", "Icons for different types of data, such as audio or image files");
|
||||
add_icon (win, "application-certificate", "", "contenttypes");
|
||||
add_icon (win, "application-rss+xml", "", "contenttypes");
|
||||
add_icon (win, "application-x-appliance", "", "contenttypes");
|
||||
add_icon (win, "audio-x-generic", "The icon used for generic audio file types", "contenttypes");
|
||||
add_icon (win, "folder", "The standard folder icon used to represent directories on local filesystems, mail folders, and other hierarchical groups", "contenttypes");
|
||||
add_icon (win, "text-x-generic", "The icon used for generic text file types", "contenttypes");
|
||||
add_icon (win, "video-x-generic", "The icon used for generic video file types", "contenttypes");
|
||||
add_icon (win, "x-office-calendar", "The icon used for generic calendar file types", "contenttypes");
|
||||
|
||||
add_context (win, "emotes", "Emotes", "Icons for emotions that are expressed through text chat applications such as :-) or :-P in IRC or instant messengers");
|
||||
add_icon (win, "face-angel", "The icon used for the 0:-) emote", "emotes");
|
||||
add_icon (win, "face-angry", "The icon used for the X-( emote", "emotes");
|
||||
add_icon (win, "face-cool", "The icon used for the B-) emote", "emotes");
|
||||
add_icon (win, "face-crying", "The icon used for the :'( emote", "emotes");
|
||||
add_icon (win, "face-devilish", "The icon used for the >:-) emote", "emotes");
|
||||
add_icon (win, "face-embarrassed", "The icon used for the :-[ emote", "emotes");
|
||||
add_icon (win, "face-kiss", "The icon used for the :-* emote", "emotes");
|
||||
add_icon (win, "face-laugh", "The icon used for the :-)) emote", "emotes");
|
||||
add_icon (win, "face-monkey", "The icon used for the :-(|) emote", "emotes");
|
||||
add_icon (win, "face-plain", "The icon used for the :-| emote", "emotes");
|
||||
add_icon (win, "face-raspberry", "The icon used for the :-P emote", "emotes");
|
||||
add_icon (win, "face-sad", "The icon used for the :-( emote", "emotes");
|
||||
add_icon (win, "face-shutmouth", "The 'shut mouth' emote", "emotes");
|
||||
add_icon (win, "face-sick", "The icon used for the :-& emote", "emotes");
|
||||
add_icon (win, "face-smile", "The icon used for the :-) emote", "emotes");
|
||||
add_icon (win, "face-smile-big", "The icon used for the :-D emote", "emotes");
|
||||
add_icon (win, "face-smirk", "The icon used for the :-! emote", "emotes");
|
||||
add_icon (win, "face-surprise", "The icon used for the :-0 emote", "emotes");
|
||||
add_icon (win, "face-tired", "The icon used for the |-) emote", "emotes");
|
||||
add_icon (win, "face-uncertain", "The icon used for the :-/ emote", "emotes");
|
||||
add_icon (win, "face-wink", "The icon used for the ;-) emote", "emotes");
|
||||
add_icon (win, "face-worried", "The icon used for the :-S emote", "emotes");
|
||||
add_icon (win, "face-yawn", "", "emotes");
|
||||
|
||||
add_context (win, "general", "General", "Generally useful icons that don't fit in a particular category");
|
||||
add_icon (win, "edit-find", "The icon for generic search actions", "general");
|
||||
add_icon (win, "content-loading", "The icon used to indicate that content is loading", "general");
|
||||
add_icon (win, "open-menu", "The icon used for a menu button in the header bar", "general");
|
||||
add_icon (win, "view-more", "The icon used for a “View More“ action", "general");
|
||||
add_icon (win, "tab-new", "The icon used for a “New Tab“ action", "general");
|
||||
add_icon (win, "bookmark-new", "The icon used for creating a new bookmark", "general");
|
||||
add_icon (win, "mark-location", "The icon used to mark a location on a map", "general");
|
||||
add_icon (win, "find-location", "The icon used for a “Search location“ action", "general");
|
||||
add_icon (win, "send-to", "The icon used for a “Send to“ action", "general");
|
||||
add_icon (win, "object-select", "The icon used for generic selection actions", "general");
|
||||
add_icon (win, "window-close", "The icon used for actions that close a view, such as window or tab close button", "general");
|
||||
add_icon (win, "view-refresh", "The icon used for the “Refresh” item in the application's “View” menu", "general");
|
||||
add_icon (win, "process-stop", "The icon used for the “Stop” action in applications with actions that may take a while to process, such as web page loading in a browser", "general");
|
||||
add_icon (win, "action-unavailable", "The icon used to indicate that an action is currently unavailable, such as “Pause“ when no media is playing", "general");
|
||||
add_icon (win, "document-print", "The icon for the print action of an application", "general");
|
||||
add_icon (win, "printer-printing", "The icon used while a print job is successfully being spooled to a printing device", "general");
|
||||
add_icon (win, "printer-warning", "The icon used when a recoverable problem occurs while attempting to printing", "general");
|
||||
add_icon (win, "printer-error", "The icon used when an error occurs while attempting to print", "general");
|
||||
add_icon (win, "dialog-information", "The icon used when a dialog is opened to give information to the user that may be pertinent to the requested action", "general");
|
||||
add_icon (win, "dialog-question", "The icon used when a dialog is opened to ask a simple question of the user", "general");
|
||||
add_icon (win, "dialog-warning", "The icon used when a dialog is opened to warn the user of impending issues with the requested action", "general");
|
||||
add_icon (win, "dialog-password", "The icon used when a dialog requesting the authentication credentials for a user is opened", "general");
|
||||
add_icon (win, "dialog-error", "The icon used when a dialog is opened to explain an error condition to the user", "general");
|
||||
add_icon (win, "list-add", "The icon for the add to list action", "general");
|
||||
add_icon (win, "list-remove", "The icon for the remove from list action", "general");
|
||||
add_icon (win, "non-starred", "The icon used to indicate that an object is not 'starred'", "general");
|
||||
add_icon (win, "semi-starred", "The icon used to indicate that an object has is 'half-starred'", "general");
|
||||
add_icon (win, "starred", "The icon used to indicate that an object is 'starred'", "general");
|
||||
add_icon (win, "star-new", "The used for the “New Star“ action", "general");
|
||||
add_icon (win, "security-low", "The icon used to indicate that the security level of a connection is presumed to be insecure, either by using weak encryption, or by using a certificate that the could not be automatically verified, and which the user has not chosent to trust", "general");
|
||||
add_icon (win, "security-medium", "The icon used to indicate that the security level of a connection is presumed to be secure, using strong encryption, and a certificate that could not be automatically verified, but which the user has chosen to trust", "general");
|
||||
add_icon (win, "security-high", "The icon used to indicate that the security level of a connection is known to be secure, using strong encryption and a valid certificate", "general");
|
||||
add_icon (win, "user-trash", "The icon for the user's “Trash” place in the file system", "other");
|
||||
add_icon (win, "user-trash-full", "The icon for the user's “Trash” in the file system, when there are items in the “Trash” waiting for disposal or recovery", "general");
|
||||
add_icon (win, "emblem-system", "The icon used as an emblem for directories that contain system libraries, settings, and data", "general");
|
||||
add_icon (win, "avatar-default", "The generic avatar icon, which is used to represent a user that doesn't have a personalized avatar", "general");
|
||||
add_icon (win, "emblem-synchronizing", "The icon used as an emblem to indicate that a a synchronizing operation is in process", "general");
|
||||
add_icon (win, "emblem-shared", "The icon used as an emblem for files and directories that are shared to other users", "general");
|
||||
add_icon (win, "folder-download", "The icon representing the location in the file system where downloaded files are stored", "general");
|
||||
add_icon (win, "help-browser", "The icon used for the desktop's help browsing application", "general");
|
||||
|
||||
add_context (win, "other", "Other", "Icons which have may be too specialized and not of general interest");
|
||||
add_icon (win, "view-sort-ascending", "The icon used for the “Sort Ascending” item in the application's “View” menu, or in a button for changing the sort method for a list", "other");
|
||||
add_icon (win, "view-sort-descending", "The icon used for the “Sort Descending” item in the application's “View” menu, or in a button for changing the sort method for a list", "other");
|
||||
add_icon (win, "document-revert", "The icon for the action of reverting to a previous version of a document", "other");
|
||||
add_icon (win, "address-book-new", "The icon used for the action to create a new address book", "other");
|
||||
add_icon (win, "application-exit", "The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit", "other");
|
||||
add_icon (win, "appointment-new", "The icon used for the action to create a new appointment in a calendaring application", "other");
|
||||
add_icon (win, "contact-new", "The icon used for the action to create a new contact in an address book application", "other");
|
||||
add_icon (win, "document-print-preview", "The icon for the print preview action of an application", "other");
|
||||
add_icon (win, "folder-new", "The icon for creating a new folder", "other");
|
||||
add_icon (win, "help-about", "The icon for the About item in the Help menu", "other");
|
||||
add_icon (win, "help-contents", "The icon for Contents item in the Help menu", "other");
|
||||
add_icon (win, "help-faq", "The icon for the FAQ item in the Help menu", "other");
|
||||
add_icon (win, "list-remove-all", "", "other");
|
||||
add_icon (win, "mail-forward", "The icon for the forward action of an electronic mail application", "other");
|
||||
add_icon (win, "mail-mark-junk", "The icon for the mark as junk action of an electronic mail application", "other");
|
||||
add_icon (win, "mail-mark-notjunk", "The icon for the mark as not junk action of an electronic mail application", "other");
|
||||
add_icon (win, "mail-mark-read", "The icon for the mark as read action of an electronic mail application", "other");
|
||||
add_icon (win, "mail-mark-unread", "The icon for the mark as unread action of an electronic mail application", "other");
|
||||
add_icon (win, "mail-message-new", "The icon for the compose new mail action of an electronic mail application", "other");
|
||||
add_icon (win, "mail-reply-all", "The icon for the reply to all action of an electronic mail application", "other");
|
||||
add_icon (win, "mail-reply-sender", "The icon for the reply to sender action of an electronic mail application", "other");
|
||||
add_icon (win, "pan-down", "", "other");
|
||||
add_icon (win, "pan-end", "", "other");
|
||||
add_icon (win, "pan-start", "", "other");
|
||||
add_icon (win, "pan-up", "", "other");
|
||||
add_icon (win, "system-lock-screen", "The icon used for the “Lock Screen” item in the desktop's panel application", "other");
|
||||
add_icon (win, "system-log-out", "The icon used for the “Log Out” item in the desktop's panel application", "other");
|
||||
add_icon (win, "system-run", "The icon used for the “Run Application...” item in the desktop's panel application", "other");
|
||||
add_icon (win, "system-search", "The icon used for the “Search” item in the desktop's panel application", "other");
|
||||
add_icon (win, "system-reboot", "The icon used for the “Reboot” item in the desktop's panel application", "other");
|
||||
add_icon (win, "system-shutdown", "The icon used for the “Shutdown” item in the desktop's panel application", "other");
|
||||
add_icon (win, "tools-check-spelling", "The icon used for the “Check Spelling” item in the application's “Tools” menu", "other");
|
||||
add_icon (win, "window-maximize", "", "other");
|
||||
add_icon (win, "window-minimize", "", "other");
|
||||
add_icon (win, "window-restore", "", "other");
|
||||
add_icon (win, "window-new", "The icon used for the “New Window” item in the application's “Windows” menu", "other");
|
||||
add_icon (win, "accessories-calculator", "The icon used for the desktop's calculator accessory program", "other");
|
||||
add_icon (win, "accessories-character-map", "The icon used for the desktop's international and extended text character accessory program", "other");
|
||||
add_icon (win, "accessories-dictionary", "The icon used for the desktop's dictionary accessory program", "other");
|
||||
add_icon (win, "multimedia-volume-control", "The icon used for the desktop's hardware volume control application", "other");
|
||||
add_icon (win, "preferences-desktop-accessibility", "The icon used for the desktop's accessibility preferences", "other");
|
||||
add_icon (win, "preferences-desktop-display", "", "other");
|
||||
add_icon (win, "preferences-desktop-font", "The icon used for the desktop's font preferences", "other");
|
||||
add_icon (win, "preferences-desktop-keyboard", "The icon used for the desktop's keyboard preferences", "other");
|
||||
add_icon (win, "preferences-desktop-keyboard-shortcuts", "", "other");
|
||||
add_icon (win, "preferences-desktop-locale", "The icon used for the desktop's locale preferences", "other");
|
||||
add_icon (win, "preferences-desktop-remote-desktop", "", "other");
|
||||
add_icon (win, "preferences-desktop-multimedia", "The icon used for the desktop's multimedia preferences", "other");
|
||||
add_icon (win, "preferences-desktop-screensaver", "The icon used for the desktop's screen saving preferences", "other");
|
||||
add_icon (win, "preferences-desktop-theme", "The icon used for the desktop's theme preferences", "other");
|
||||
add_icon (win, "preferences-desktop-wallpaper", "The icon used for the desktop's wallpaper preferences", "other");
|
||||
add_icon (win, "preferences-system-privacy", "", "other");
|
||||
add_icon (win, "preferences-system-windows", "", "other");
|
||||
add_icon (win, "system-file-manager", "The icon used for the desktop's file management application", "other");
|
||||
add_icon (win, "system-software-install", "The icon used for the desktop's software installer application", "other");
|
||||
add_icon (win, "system-software-update", "The icon used for the desktop's software updating application", "other");
|
||||
add_icon (win, "system-users", "", "other");
|
||||
add_icon (win, "user-info", "", "other");
|
||||
add_icon (win, "utilities-system-monitor", "The icon used for the desktop's system resource monitor application", "other");
|
||||
add_icon (win, "utilities-terminal", "The icon used for the desktop's terminal emulation application. ", "other");
|
||||
add_icon (win, "application-x-addon", "", "other");
|
||||
add_icon (win, "application-x-executable", "The icon used for executable file types", "other");
|
||||
add_icon (win, "font-x-generic", "The icon used for generic font file types", "other");
|
||||
add_icon (win, "image-x-generic", "The icon used for generic image file types", "other");
|
||||
add_icon (win, "package-x-generic", "The icon used for generic package file types", "other");
|
||||
add_icon (win, "text-html", "The icon used for HTML text file types", "other");
|
||||
add_icon (win, "text-x-generic-template", "The icon used for generic text templates", "other");
|
||||
add_icon (win, "text-x-preview", "", "other");
|
||||
add_icon (win, "text-x-script", "The icon used for script file types, such as shell scripts", "other");
|
||||
add_icon (win, "x-office-address-book", "The icon used for generic address book file types", "other");
|
||||
add_icon (win, "x-office-document", "The icon used for generic document and letter file types", "other");
|
||||
add_icon (win, "x-office-document-template", "", "other");
|
||||
add_icon (win, "x-office-presentation", "The icon used for generic presentation file types", "other");
|
||||
add_icon (win, "x-office-presentation-template", "", "other");
|
||||
add_icon (win, "x-office-spreadsheet", "The icon used for generic spreadsheet file types", "other");
|
||||
add_icon (win, "x-office-spreadsheet-template", "", "other");
|
||||
add_icon (win, "x-package-repository", "", "other");
|
||||
add_icon (win, "applications-accessories", "The icon for the “Accessories” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-development", "The icon for the “Programming” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-engineering", "The icon for the “Engineering” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-games", "The icon for the “Games” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-graphics", "The icon for the “Graphics” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-internet", "The icon for the “Internet” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-multimedia", "The icon for the “Multimedia” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-office", "The icon for the “Office” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-other", "The icon for the “Other” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-science", "The icon for the “Science” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-system", "The icon for the “System Tools” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "applications-utilities", "The icon for the “Utilities” sub-menu of the Programs menu", "other");
|
||||
add_icon (win, "preferences-desktop", "The icon for the “Desktop Preferences” category", "other");
|
||||
add_icon (win, "preferences-desktop-peripherals", "The icon for the “Peripherals” sub-category of the “Desktop Preferences” category", "other");
|
||||
add_icon (win, "preferences-desktop-personal", "The icon for the “Personal” sub-category of the “Desktop Preferences” category", "other");
|
||||
add_icon (win, "preferences-other", "The icon for the “Other” preferences category", "other");
|
||||
add_icon (win, "preferences-system", "The icon for the “System Preferences” category", "other");
|
||||
add_icon (win, "preferences-system-network", "The icon for the “Network” sub-category of the “System Preferences” category", "other");
|
||||
add_icon (win, "system-help", "The icon for the “Help” system category", "other");
|
||||
add_icon (win, "battery", "The icon used for the system battery device", "other");
|
||||
add_icon (win, "computer-apple-ipad", "", "other");
|
||||
add_icon (win, "colorimeter-colorhug", "", "other");
|
||||
add_icon (win, "drive-harddisk", "The icon used for hard disk drives", "other");
|
||||
add_icon (win, "drive-harddisk-ieee1394", "", "other");
|
||||
add_icon (win, "drive-harddisk-system", "", "other");
|
||||
add_icon (win, "drive-multidisk", "", "other");
|
||||
add_icon (win, "media-optical-bd", "", "other");
|
||||
add_icon (win, "media-optical-cd-audio", "", "other");
|
||||
add_icon (win, "media-optical-dvd", "", "other");
|
||||
add_icon (win, "media-tape", "The icon used for generic physical tape media", "other");
|
||||
add_icon (win, "media-zip", "", "other");
|
||||
add_icon (win, "modem", "The icon used for modem devices", "other");
|
||||
add_icon (win, "multimedia-player-apple-ipod-touch", "", "other");
|
||||
add_icon (win, "network-vpn", "", "other");
|
||||
add_icon (win, "pda", "This is the fallback icon for Personal Digial Assistant devices. Primary use of this icon is for PDA devices connected to the PC. Connection medium is not an important aspect of the icon. The metaphor for this fallback icon should be a generic PDA device icon", "other");
|
||||
add_icon (win, "phone-apple-iphone", "", "other");
|
||||
add_icon (win, "uninterruptible-power-supply", "", "other");
|
||||
add_icon (win, "emblem-default", "The icon used as an emblem to specify the default selection of a printer for example", "other");
|
||||
add_icon (win, "emblem-documents", "The icon used as an emblem for the directory where a user's documents are stored", "other");
|
||||
add_icon (win, "emblem-downloads", "The icon used as an emblem for the directory where a user's downloads from the internet are stored", "other");
|
||||
add_icon (win, "emblem-favorite", "The icon used as an emblem for files and directories that the user marks as favorites", "other");
|
||||
add_icon (win, "emblem-generic", "", "other");
|
||||
add_icon (win, "emblem-important", "The icon used as an emblem for files and directories that are marked as important by the user", "other");
|
||||
add_icon (win, "emblem-mail", "The icon used as an emblem to specify the directory where the user's electronic mail is stored", "other");
|
||||
add_icon (win, "emblem-new", "", "other");
|
||||
add_icon (win, "emblem-ok", "", "other");
|
||||
add_icon (win, "emblem-package", "", "other");
|
||||
add_icon (win, "emblem-photos", "The icon used as an emblem to specify the directory where the user stores photographs", "other");
|
||||
add_icon (win, "emblem-readonly", "The icon used as an emblem for files and directories which can not be written to by the user", "other");
|
||||
add_icon (win, "emblem-symbolic-link", "The icon used as an emblem for files and direcotires that are links to other files or directories on the filesystem", "other");
|
||||
add_icon (win, "emblem-synchronized", "The icon used as an emblem for files or directories that are configured to be synchronized to another device", "other");
|
||||
add_icon (win, "emblem-unreadable", "The icon used as an emblem for files and directories that are inaccessible. ", "other");
|
||||
add_icon (win, "emblem-urgent", "", "other");
|
||||
add_icon (win, "emblem-videos", "", "other");
|
||||
add_icon (win, "emblem-web", "", "other");
|
||||
add_icon (win, "folder-documents", "", "other");
|
||||
add_icon (win, "folder-download", "", "other");
|
||||
add_icon (win, "folder-music", "", "other");
|
||||
add_icon (win, "folder-pictures", "", "other");
|
||||
add_icon (win, "folder-documents", "", "other");
|
||||
add_icon (win, "folder-publicshare", "", "other");
|
||||
add_icon (win, "folder-remote", "The icon used for normal directories on a remote filesystem", "other");
|
||||
add_icon (win, "folder-saved-search", "", "other");
|
||||
add_icon (win, "folder-templates", "", "other");
|
||||
add_icon (win, "folder-videos", "", "other");
|
||||
add_icon (win, "network-server", "The icon used for individual host machines under the “Network Servers” place in the file manager", "other");
|
||||
add_icon (win, "network-workgroup", "The icon for the “Network Servers” place in the desktop's file manager, and workgroups within the network", "other");
|
||||
add_icon (win, "start-here", "The icon used by the desktop's main menu for accessing places, applications, and other features", "other");
|
||||
add_icon (win, "user-bookmarks", "The icon for the user's special “Bookmarks” place", "other");
|
||||
add_icon (win, "user-desktop", "The icon for the special “Desktop” directory of the user", "other");
|
||||
add_icon (win, "user-home", "The icon for the special “Home” directory of the user", "other");
|
||||
add_icon (win, "airplane-mode", "", "other");
|
||||
add_icon (win, "battery-caution-charging", "", "other");
|
||||
add_icon (win, "battery-caution", "The icon used when the battery is below 40%", "other");
|
||||
add_icon (win, "battery-empty-charging", "", "other");
|
||||
add_icon (win, "battery-empty", "", "other");
|
||||
add_icon (win, "battery-full-charged", "", "other");
|
||||
add_icon (win, "battery-full-charging", "", "other");
|
||||
add_icon (win, "battery-full", "", "other");
|
||||
add_icon (win, "battery-good-charging", "", "other");
|
||||
add_icon (win, "battery-good", "", "other");
|
||||
add_icon (win, "battery-low-charging", "", "other");
|
||||
add_icon (win, "battery-low", "The icon used when the battery is below 20%", "other");
|
||||
add_icon (win, "battery-missing", "", "other");
|
||||
add_icon (win, "bluetooth-active", "", "other");
|
||||
add_icon (win, "bluetooth-disabled", "", "other");
|
||||
add_icon (win, "channel-insecure", "", "other");
|
||||
add_icon (win, "channel-secure", "", "other");
|
||||
add_icon (win, "computer-fail", "", "other");
|
||||
add_icon (win, "display-brightness", "", "other");
|
||||
add_icon (win, "keyboard-brightness", "", "other");
|
||||
add_icon (win, "folder-drag-accept", "The icon used for a folder while an object is being dragged onto it, that is of a type that the directory can contain", "other");
|
||||
add_icon (win, "folder-open", "The icon used for folders, while their contents are being displayed within the same window. This icon would normally be shown in a tree or list view, next to the main view of a folder's contents", "other");
|
||||
add_icon (win, "folder-visiting", "The icon used for folders, while their contents are being displayed in another window. This icon would typically be used when using multiple windows to navigate the hierarchy, such as in Nautilus's spatial mode", "other");
|
||||
add_icon (win, "image-loading", "The icon used when another image is being loaded, such as thumnails for larger images in the file manager", "other");
|
||||
add_icon (win, "image-missing", "The icon used when another image could not be loaded", "other");
|
||||
add_icon (win, "mail-signed", "The icon used for an electronic mail that contains a signature", "other");
|
||||
add_icon (win, "mail-signed-verified", "The icon used for an electronic mail that contains a signature which has also been verified by the security system", "other");
|
||||
add_icon (win, "network-cellular-3g", "", "other");
|
||||
add_icon (win, "network-cellular-4g", "", "other");
|
||||
add_icon (win, "network-cellular-edge", "", "other");
|
||||
add_icon (win, "network-cellular-gprs", "", "other");
|
||||
add_icon (win, "network-cellular-umts", "", "other");
|
||||
add_icon (win, "network-cellular-acquiring", "", "other");
|
||||
add_icon (win, "network-cellular-connected", "", "other");
|
||||
add_icon (win, "network-cellular-no-route", "", "other");
|
||||
add_icon (win, "network-cellular-offline", "", "other");
|
||||
add_icon (win, "network-cellular-signal-excellent", "", "other");
|
||||
add_icon (win, "network-cellular-signal-good", "", "other");
|
||||
add_icon (win, "network-cellular-signal-ok", "", "other");
|
||||
add_icon (win, "network-cellular-signal-weak", "", "other");
|
||||
add_icon (win, "network-cellular-signal-none", "", "other");
|
||||
add_icon (win, "network-vpn-acquiring", "", "other");
|
||||
add_icon (win, "network-vpn", "", "other");
|
||||
add_icon (win, "network-wired-acquiring", "", "other");
|
||||
add_icon (win, "network-wired-disconnected", "", "other");
|
||||
add_icon (win, "network-wired-no-route", "", "other");
|
||||
add_icon (win, "network-wired-offline", "", "other");
|
||||
add_icon (win, "network-wireless-acquiring", "", "other");
|
||||
add_icon (win, "network-wireless-connected", "", "other");
|
||||
add_icon (win, "network-wireless-encrypted", "", "other");
|
||||
add_icon (win, "network-wireless-hotspot", "", "other");
|
||||
add_icon (win, "network-wireless-no-route", "", "other");
|
||||
add_icon (win, "network-wireless-offline", "", "other");
|
||||
add_icon (win, "network-wireless-signal-excellent", "", "other");
|
||||
add_icon (win, "network-wireless-signal-good", "", "other");
|
||||
add_icon (win, "network-wireless-signal-ok", "", "other");
|
||||
add_icon (win, "network-wireless-signal-weak", "", "other");
|
||||
add_icon (win, "network-wireless-signal-none", "", "other");
|
||||
add_icon (win, "rotation-allowed", "", "other");
|
||||
add_icon (win, "rotation-locked", "", "other");
|
||||
add_icon (win, "software-update-available", "The icon used when an update is available for software installed on the computing device, through the system software update program", "other");
|
||||
add_icon (win, "software-update-urgent", "The icon used when an urgent update is available through the system software update program", "other");
|
||||
add_icon (win, "sync-error", "The icon used when an error occurs while attempting to synchronize data from the computing device, to another device", "other");
|
||||
add_icon (win, "sync-synchronizing", "The icon used while data is successfully synchronizing to another device", "other");
|
||||
add_icon (win, "touchpad-disabled", "", "other");
|
||||
add_icon (win, "trophy-bronze", "", "other");
|
||||
add_icon (win, "trophy-silver", "", "other");
|
||||
add_icon (win, "trophy-gold", "", "other");
|
||||
add_icon (win, key, value, context);
|
||||
}
|
||||
g_strfreev (keys);
|
||||
}
|
||||
g_strfreev (groups);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -694,6 +281,16 @@ key_press_event_cb (GtkWidget *widget,
|
||||
return gtk_search_bar_handle_event (GTK_SEARCH_BAR (win->searchbar), event);
|
||||
}
|
||||
|
||||
static void
|
||||
copy_to_clipboard (GtkButton *button,
|
||||
IconBrowserWindow *win)
|
||||
{
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
clipboard = gtk_clipboard_get_default (gdk_display_get_default ());
|
||||
gtk_clipboard_set_text (clipboard, gtk_window_get_title (GTK_WINDOW (win->details)), -1);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
icon_visible_func (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
@@ -748,7 +345,7 @@ symbolic_toggled (GtkToggleButton *toggle, IconBrowserWindow *win)
|
||||
|
||||
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_tree_model_filter_refilter (win->filter_model);
|
||||
gtk_widget_queue_draw (win->list);
|
||||
}
|
||||
@@ -821,7 +418,7 @@ icon_browser_window_init (IconBrowserWindow *win)
|
||||
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, context_free);
|
||||
|
||||
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));
|
||||
@@ -866,6 +463,7 @@ icon_browser_window_class_init (IconBrowserWindowClass *class)
|
||||
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), key_press_event_cb);
|
||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), copy_to_clipboard);
|
||||
}
|
||||
|
||||
IconBrowserWindow *
|
||||
|
@@ -8,8 +8,8 @@
|
||||
</object>
|
||||
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Icon Browser</property>
|
||||
<property name="default-width">600</property>
|
||||
<property name="default-height">800</property>
|
||||
<property name="default-width">1024</property>
|
||||
<property name="default-height">768</property>
|
||||
<signal name="key-press-event" handler="key_press_event_cb"/>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="header">
|
||||
@@ -109,7 +109,7 @@
|
||||
<object class="GtkCellRendererPixbuf" id="cell">
|
||||
<property name="xpad">10</property>
|
||||
<property name="ypad">10</property>
|
||||
<property name="stock-size">5</property>
|
||||
<property name="stock-size">6</property>
|
||||
<property name="follow-state">True</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -320,6 +320,21 @@
|
||||
<property name="width">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Copy to Clipboard</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin">20</property>
|
||||
<signal name="clicked" handler="copy_to_clipboard"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">4</property>
|
||||
<property name="width">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -1637,6 +1637,16 @@ scale_format_value (GtkScale *scale, gdouble value)
|
||||
return g_strdup_printf ("%0.*f", 1, value);
|
||||
}
|
||||
|
||||
static void
|
||||
adjustment3_value_changed (GtkAdjustment *adj, GtkProgressBar *pbar)
|
||||
{
|
||||
double fraction;
|
||||
|
||||
fraction = gtk_adjustment_get_value (adj) / (gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj));
|
||||
|
||||
gtk_progress_bar_set_fraction (pbar, fraction);
|
||||
}
|
||||
|
||||
static void
|
||||
activate (GApplication *app)
|
||||
{
|
||||
@@ -1910,6 +1920,12 @@ activate (GApplication *app)
|
||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "decrease_button");
|
||||
g_object_set_data (G_OBJECT (widget), "decrease_button", widget2);
|
||||
|
||||
adj = (GtkAdjustment *)gtk_builder_get_object (builder, "adjustment3");
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "progressbar1");
|
||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "progressbar2");
|
||||
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget);
|
||||
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget2);
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET (window));
|
||||
|
||||
g_object_unref (builder);
|
||||
|
@@ -1,8 +1,3 @@
|
||||
.circular-button {
|
||||
border-radius: 20px;
|
||||
-gtk-outline-radius: 20px;
|
||||
}
|
||||
|
||||
.small-button {
|
||||
padding: 0;
|
||||
outline-width: 0;
|
||||
|
@@ -103,8 +103,9 @@
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment3">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">4</property>
|
||||
<property name="value">1</property>
|
||||
<property name="value">2</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">1</property>
|
||||
</object>
|
||||
@@ -495,6 +496,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="placeholder-text" translatable="yes">Click icon to change mode</property>
|
||||
<property name="secondary_icon_name">view-refresh-symbolic</property>
|
||||
<property name="secondary_icon_tooltip_text">Change mode</property>
|
||||
<signal name="icon-release" handler="on_entry_icon_release" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -3107,7 +3109,7 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="visible">1</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
<class name="circular-button"/>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -3749,6 +3751,7 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="popover">notebook_info_popover</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
@@ -3759,7 +3762,6 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
<class name="circular"/>
|
||||
<class name="flat"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
@@ -10,9 +10,9 @@
|
||||
<releaseinfo>
|
||||
This document is for the GDK 3 library, version &version;
|
||||
The latest versions can be found online at
|
||||
<ulink role="online-location" url="http://developer.gnome.org/gdk3/">http://developer.gnome.org/gdk3/</ulink>.
|
||||
<ulink role="online-location" url="https://developer.gnome.org/gdk3/">https://developer.gnome.org/gdk3/</ulink>.
|
||||
If you are looking for the older GDK 2 series of libraries,
|
||||
see <ulink role="online-location" url="http://developer.gnome.org/gdk2/">http://developer.gnome.org/gdk2/</ulink>.
|
||||
see <ulink role="online-location" url="https://developer.gnome.org/gdk2/">https://developer.gnome.org/gdk2/</ulink>.
|
||||
</releaseinfo>
|
||||
</bookinfo>
|
||||
|
||||
|
@@ -278,8 +278,6 @@ GTKDOC_LIBS = \
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--output-format=xml --name-space=gtk
|
||||
|
||||
MKHTML_OPTIONS="--path=\"$(abs_srcdir):$(top_srcdir)/examples\""
|
||||
|
||||
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
|
||||
content_files = \
|
||||
broadway.xml \
|
||||
|
@@ -140,7 +140,7 @@ How to compile GTK+ itself
|
||||
<listitem>
|
||||
<para>
|
||||
<ulink
|
||||
url="http://pkg-config.freedesktop.org">pkg-config</ulink>
|
||||
url="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</ulink>
|
||||
is a tool for tracking the compilation flags needed for
|
||||
libraries that are used by the GTK+ libraries. (For each
|
||||
library, a small <literal>.pc</literal> text file is installed
|
||||
@@ -153,7 +153,7 @@ How to compile GTK+ itself
|
||||
The GTK+ makefiles will mostly work with different versions
|
||||
of <command>make</command>, however, there tends to be
|
||||
a few incompatibilities, so the GTK+ team recommends
|
||||
installing <ulink url="http://www.gnu.org/software/make">GNU
|
||||
installing <ulink url="https://www.gnu.org/software/make">GNU
|
||||
make</ulink> if you don't already have it on your system
|
||||
and using it. (It may be called <command>gmake</command>
|
||||
rather than <command>make</command>.)
|
||||
@@ -171,24 +171,24 @@ How to compile GTK+ itself
|
||||
The GLib library provides core non-graphical functionality
|
||||
such as high level data types, Unicode manipulation, and
|
||||
an object and type system to C programs. It is available
|
||||
from the <ulink url="http://ftp.gtk.org/pub/glib/">GTK+
|
||||
from the <ulink url="https://ftp.gtk.org/pub/glib/">GTK+
|
||||
FTP site</ulink> or
|
||||
<ulink url="http://download.gnome.org/sources/glib/">here</ulink>.
|
||||
<ulink url="https://download.gnome.org/sources/glib/">here</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <ulink url="http://git.gnome.org/browse/gdk-pixbuf/">GdkPixbuf library</ulink>
|
||||
The <ulink url="https://git.gnome.org/browse/gdk-pixbuf/">GdkPixbuf library</ulink>
|
||||
provides facilities for loading images in a variety of file formats.
|
||||
It is available
|
||||
<ulink url="http://download.gnome.org/sources/gdk-pixbuf/">here</ulink>.
|
||||
<ulink url="https://download.gnome.org/sources/gdk-pixbuf/">here</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<ulink url="http://www.pango.org">Pango</ulink> is a library
|
||||
for internationalized text handling. It is available
|
||||
<ulink url="http://download.gnome.org/sources/pango/">here</ulink>.
|
||||
<ulink url="https://download.gnome.org/sources/pango/">here</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
@@ -197,7 +197,7 @@ How to compile GTK+ itself
|
||||
interfaces allowing accessibility technologies such as
|
||||
screen readers to interact with a graphical user interface.
|
||||
It is available
|
||||
<ulink url="http://download.gnome.org/sources/atk/">here</ulink>.
|
||||
<ulink url="https://download.gnome.org/sources/atk/">here</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
@@ -205,7 +205,7 @@ How to compile GTK+ itself
|
||||
<ulink url="https://wiki.gnome.org/Projects/GObjectIntrospection">Gobject Introspection</ulink>
|
||||
is a framework for making introspection data available to
|
||||
language bindings. It is available
|
||||
<ulink url="http://download.gnome.org/sources/gobject-introspection/">here</ulink>.
|
||||
<ulink url="https://download.gnome.org/sources/gobject-introspection/">here</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
@@ -213,7 +213,7 @@ How to compile GTK+ itself
|
||||
<title>External dependencies</title>
|
||||
<listitem>
|
||||
<para>
|
||||
The <ulink url="http://www.gnu.org/software/libiconv/">GNU
|
||||
The <ulink url="https://www.gnu.org/software/libiconv/">GNU
|
||||
libiconv library</ulink> is needed to build GLib if your
|
||||
system doesn't have the <function>iconv()</function>
|
||||
function for doing conversion between character
|
||||
@@ -224,7 +224,7 @@ How to compile GTK+ itself
|
||||
<listitem>
|
||||
<para>
|
||||
The libintl library from the <ulink
|
||||
url="http://www.gnu.org/software/gettext/">GNU gettext
|
||||
url="https://www.gnu.org/software/gettext/">GNU gettext
|
||||
package</ulink> is needed if your system doesn't have the
|
||||
<function>gettext()</function> functionality for handling
|
||||
message translation databases.
|
||||
@@ -241,14 +241,14 @@ How to compile GTK+ itself
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <ulink url="http://www.fontconfig.org">fontconfig</ulink>
|
||||
The <ulink url="https://www.freedesktop.org/wiki/Software/fontconfig/">fontconfig</ulink>
|
||||
library provides Pango with a standard way of locating
|
||||
fonts and matching them against font names.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<ulink url="http://www.cairographics.org">Cairo</ulink>
|
||||
<ulink url="https://www.cairographics.org">Cairo</ulink>
|
||||
is a graphics library that supports vector graphics and image
|
||||
compositing. Both Pango and GTK+ use cairo for all of their
|
||||
drawing.
|
||||
@@ -263,13 +263,13 @@ How to compile GTK+ itself
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <ulink url="http://wayland.freedesktop.org">Wayland</ulink> libraries
|
||||
The <ulink url="https://wayland.freedesktop.org">Wayland</ulink> libraries
|
||||
are needed to build GTK+ with the Wayland backend.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <ulink url="http://www.freedesktop.org/wiki/Software/shared-mime-info">shared-mime-info</ulink>
|
||||
The <ulink url="https://www.freedesktop.org/wiki/Software/shared-mime-info">shared-mime-info</ulink>
|
||||
package is not a hard dependency of GTK+, but it contains definitions
|
||||
for mime types that are used by GIO and, indirectly, by GTK+.
|
||||
gdk-pixbuf will use GIO for mime type detection if possible. For this
|
||||
|
@@ -46,7 +46,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
|
||||
<para>
|
||||
We loosely follow the CSS
|
||||
<ulink url="http://www.w3.org/TR/css-values/#value-defs">value definition</ulink>
|
||||
<ulink url="https://www.w3.org/TR/css-values/#value-defs">value definition</ulink>
|
||||
specification in the formatting of syntax productions.
|
||||
<simplelist>
|
||||
<member>Nonterminals are enclosed in angle backets (〈〉), all other strings that are not listed here are literals</member>
|
||||
@@ -154,7 +154,7 @@ button, entry {
|
||||
|
||||
<para>
|
||||
To learn more about the @import rule, you can read the
|
||||
<ulink url="http://www.w3.org/TR/css3-cascade/#at-import">Cascading</ulink>
|
||||
<ulink url="https://www.w3.org/TR/css3-cascade/#at-import">Cascading</ulink>
|
||||
module of the CSS specification.
|
||||
</para>
|
||||
|
||||
@@ -360,85 +360,85 @@ checkbutton:indeterminate {
|
||||
<row>
|
||||
<entry>*</entry>
|
||||
<entry>any node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#universal-selector">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#universal-selector">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E</entry>
|
||||
<entry>any node with name E</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#type-selectors">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#type-selectors">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E.class</entry>
|
||||
<entry>any E node with the given style class</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#class-html">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#class-html">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E#id</entry>
|
||||
<entry>any E node with the given ID</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#id-selectors">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#id-selectors">CSS</ulink></entry>
|
||||
<entry>GTK+ uses the widget name as ID</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:nth‑child(〈nth‑child〉)</entry>
|
||||
<entry>any E node which is the n-th child of its parent node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:nth‑last‑child(〈nth‑child〉)</entry>
|
||||
<entry>any E node which is the n-th child of its parent node, counting from the end</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:first‑child</entry>
|
||||
<entry>any E node which is the first child of its parent node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:last‑child</entry>
|
||||
<entry>any E node which is the last child of its parent node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:only‑child</entry>
|
||||
<entry>any E node which is the only child of its parent node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
|
||||
<entry>Equivalent to E:first-child:last-child</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:link, E:visited</entry>
|
||||
<entry>any E node which represents a hyperlink, not yet visited (:link) or already visited (:visited)</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#link">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#link">CSS</ulink></entry>
|
||||
<entry>Corresponds to GTK_STATE_FLAG_LINK and GTK_STATE_FLAGS_VISITED</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:active, E:hover, E:focus</entry>
|
||||
<entry>any E node which is part of a widget with the corresponding state</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#useraction-pseudos">CSS</ulink></entry>
|
||||
<entry>Corresponds to GTK_STATE_FLAG_ACTIVE, GTK_STATE_FLAG_PRELIGHT and GTK_STATE_FLAGS_FOCUSED; GTK+ also allows E:prelight and E:focused</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:disabled</entry>
|
||||
<entry>any E node which is part of a widget with is disabled</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
|
||||
<entry>any E node which is part of a widget which is disabled</entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
|
||||
<entry>Corresponds to GTK_STATE_FLAG_INSENSITIVE; GTK+ also allows E:insensitive</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:checked</entry>
|
||||
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is checked</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
|
||||
<entry>Corresponds to GTK_STATE_FLAG_CHECKED</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E:indeterminate</entry>
|
||||
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is in an inconsistent state</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#indeterminate">CSS3</ulink>,
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#indeterminate">CSS3</ulink>,
|
||||
<ulink url="https://drafts.csswg.org/selectors/#indeterminate">CSS4</ulink></entry>
|
||||
<entry>Corresponds to GTK_STATE_FLAG_INCONSISTENT; GTK+ also allows E:inconsistent</entry>
|
||||
</row>
|
||||
@@ -451,7 +451,7 @@ checkbutton:indeterminate {
|
||||
<row>
|
||||
<entry>E:not(〈selector〉)</entry>
|
||||
<entry>any E node which does not match the simple selector 〈selector〉</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#negation">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#negation">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -469,25 +469,25 @@ checkbutton:indeterminate {
|
||||
<row>
|
||||
<entry>E F</entry>
|
||||
<entry>any F node which is a descendent of an E node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#descendent-combinators">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#descendent-combinators">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E > F</entry>
|
||||
<entry>any F node which is a child of an E node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#child-combinators">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#child-combinators">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E ~ F</entry>
|
||||
<entry>any F node which is preceded by an E node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#general-sibling-combinators">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#general-sibling-combinators">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>E + F</entry>
|
||||
<entry>any F node which is immediately preceded by an E node</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#adjacent-sibling-combinators">CSS</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#adjacent-sibling-combinators">CSS</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -499,7 +499,7 @@ checkbutton:indeterminate {
|
||||
|
||||
<para>
|
||||
To learn more about selectors in CSS, read the
|
||||
<ulink url="http://www.w3.org/TR/css3-selectors/">Selectors</ulink>
|
||||
<ulink url="https://www.w3.org/TR/css3-selectors/">Selectors</ulink>
|
||||
module of the CSS specification.
|
||||
</para>
|
||||
|
||||
@@ -532,7 +532,7 @@ checkbutton:indeterminate {
|
||||
|
||||
<para>
|
||||
For a list of valid color names and for more background on colors in
|
||||
CSS, see the <ulink url="http://www.w3.org/TR/css3-color/#svg-color">Color</ulink>
|
||||
CSS, see the <ulink url="https://www.w3.org/TR/css3-color/#svg-color">Color</ulink>
|
||||
module of the CSS specification.
|
||||
</para>
|
||||
|
||||
@@ -582,12 +582,21 @@ background-color: @bg_color;
|
||||
</example>
|
||||
|
||||
<para>
|
||||
GTK+ also allows to form color expressions, which can be nested and
|
||||
provide a rich language to define colors which are derived from a
|
||||
set of base colors.
|
||||
GTK+ also supports color expressions, which allow colors to be transformed
|
||||
to new ones and can be nested, providing a rich language to define colors.
|
||||
Color expressions resemble functions, taking 1 or more colors and in some
|
||||
cases a number as arguments.
|
||||
</para>
|
||||
<para>
|
||||
shade() leaves the color unchanged when the number is 1 and transforms it
|
||||
to black or white as the number approaches 0 or 2 respectively. For mix(),
|
||||
0 or 1 return the unaltered 1st or 2nd color respectively; numbers between
|
||||
0 and 1 return blends of the two; and numbers below 0 or above 1 intensify
|
||||
the RGB components of the 1st or 2nd color respectively. alpha() takes a
|
||||
number from 0 to 1 and applies that as the opacity of the supplied color.
|
||||
</para>
|
||||
|
||||
<literallayout><code>〈color expression〉 = ligher(〈color〉) | darker(〈color〉) | shade(〈number〉,〈color〉) | alpha(〈number〉,〈color〉) | mix(〈number〉,〈color〉,〈color〉)</code>
|
||||
<literallayout><code>〈color expression〉 = lighter(〈color〉) | darker(〈color〉) | shade(〈color〉,〈number〉) | alpha(〈color〉,〈number〉) | mix(〈color〉,〈color〉,〈number〉)</code>
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
@@ -645,7 +654,7 @@ button {
|
||||
<para>
|
||||
A crossfade lets you specify an image as an intermediate between two
|
||||
images. Crossfades are specified in the draft of the level 4
|
||||
<ulink url="http://www.w3.org/TR/css4-images">Image</ulink>
|
||||
<ulink url="https://www.w3.org/TR/css4-images">Image</ulink>
|
||||
module of the CSS specification.
|
||||
</para>
|
||||
|
||||
@@ -726,7 +735,7 @@ label {
|
||||
To learn more about gradients in CSS, including details of how color stops
|
||||
are placed on the gradient line and keywords for specifying radial sizes,
|
||||
you can read the
|
||||
<ulink url="http://www.w3.org/TR/css3-images/#gradients">Image</ulink>
|
||||
<ulink url="https://www.w3.org/TR/css3-images/#gradients">Image</ulink>
|
||||
module of the CSS specification.
|
||||
</para>
|
||||
|
||||
@@ -824,7 +833,7 @@ label {
|
||||
<programlisting><![CDATA[
|
||||
spinner {
|
||||
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
|
||||
-gtk-icon-palette: success blue, error magenta;
|
||||
-gtk-icon-palette: success blue, warning #fc3, error magenta;
|
||||
}
|
||||
arrow.fancy {
|
||||
-gtk-icon-source: -gtk-icontheme('pan-down');
|
||||
|
@@ -94,7 +94,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
The calc() notation adds considerable expressive power. There are limits
|
||||
on what types can be combined in such an expression (e.g. it does not make
|
||||
sense to add a number and a time). For the full details, see the
|
||||
<ulink url="http://www.w3.org/TR/css3-values/#calc-notation">CSS3 Values and
|
||||
<ulink url="https://www.w3.org/TR/css3-values/#calc-notation">CSS3 Values and
|
||||
Units</ulink> spec.
|
||||
</para>
|
||||
|
||||
@@ -108,7 +108,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<term>4 values: </term><listitem>top right bottom left</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>3 values: </term><listitem>top horizontal left</listitem>
|
||||
<term>3 values: </term><listitem>top horizontal bottom</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>2 values: </term><listitem>vertical horizontal</listitem>
|
||||
@@ -134,8 +134,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>rgba(1,1,1,1)</code></entry>
|
||||
<entry>✓</entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-color">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-color/#foreground">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-color">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-color/#foreground">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -144,7 +144,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>1</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-color/#opacity">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-color/#opacity">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -172,8 +172,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>gtk-font-name setting</entry>
|
||||
<entry>✓</entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-family">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-fonts/#font-family-prop">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-family">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-fonts/#font-family-prop">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -182,8 +182,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>gtk-font-name setting</entry>
|
||||
<entry>✓</entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-size-props">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-fonts/#font-size-prop">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-size-props">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-fonts/#font-size-prop">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -192,8 +192,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>normal</code></entry>
|
||||
<entry>✓</entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-style">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-fonts/#font-style-prop">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-style">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-fonts/#font-style-prop">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -202,8 +202,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>normal</code></entry>
|
||||
<entry>✓</entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-variant">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-fonts/#descdef-font-variant">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-variant">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-fonts/#descdef-font-variant">CSS3</ulink></entry>
|
||||
<entry>only CSS2 values supported</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -212,8 +212,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>normal</code></entry>
|
||||
<entry>✓</entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-weight">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-fonts/#font-weight-prop">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-weight">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-fonts/#font-weight-prop">CSS3</ulink></entry>
|
||||
<entry>normal is synonymous with 400, bold with 700</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -222,7 +222,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>normal</code></entry>
|
||||
<entry>✓</entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-fonts/#font-stretch-prop">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-fonts/#font-stretch-prop">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -245,8 +245,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>font</entry>
|
||||
<entry><code>[ 〈font-style〉 || 〈font-variant〉 || 〈font-weight〉 || 〈font-stretch〉 ]? 〈font-size〉 〈font-family〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-shorthand">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-fonts/#font-prop">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-shorthand">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-fonts/#font-prop">CSS3</ulink></entry>
|
||||
<entry>CSS allows line-height, etc</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -278,7 +278,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>currentColor</code></entry>
|
||||
<entry>✓</entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-ui/#caret-color">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-ui/#caret-color">CSS3</ulink></entry>
|
||||
<entry>CSS allows an auto value</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -314,7 +314,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry>✓</entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-text/#letter-spacing">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-text/#letter-spacing">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -323,8 +323,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#propdef-text-decoration">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css-text-decor-3/#text-decoration-line-property">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#propdef-text-decoration">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-line-property">CSS3</ulink></entry>
|
||||
<entry>CSS allows overline</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -333,7 +333,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>currentColor</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css-text-decor-3/#text-decoration-color-property">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-color-property">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -342,7 +342,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>solid</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css-text-decor-3/#text-decoration-style-property">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-style-property">CSS3</ulink></entry>
|
||||
<entry>CSS allows dashed and dotted</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -351,7 +351,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry>✓</entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css-text-decor-3/#text-shadow-property">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-shadow-property">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -365,7 +365,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>text‑decoration</entry>
|
||||
<entry><code>〈text-decoration-line〉 || 〈text-decoration-style〉 || 〈text-decoration-color〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css-text-decor-3/#text-decoration-property">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-property">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -500,8 +500,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-width">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#min-width">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-width">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#min-width">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -510,8 +510,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-height">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#min-height">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-height">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#min-height">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -520,8 +520,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-top">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#margin-top">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-top">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#margin-top">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages or auto</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -530,8 +530,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-right">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#margin-right">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-right">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#margin-right">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages or auto</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -540,8 +540,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-bottom">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#margin-bottom">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-bottom">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#margin-bottom">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages or auto</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -550,8 +550,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-left">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#margin-left">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-left">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#margin-left">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages or auto</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -560,8 +560,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-top">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#padding-top">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-top">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#padding-top">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -570,8 +570,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-right">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#padding-right">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-right">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#padding-right">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -580,8 +580,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-bottom">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#padding-bottom">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-bottom">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#padding-bottom">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -590,8 +590,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-left">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#padding-left">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-left">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#padding-left">CSS3</ulink></entry>
|
||||
<entry>CSS allows percentages</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -605,16 +605,16 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>margin</entry>
|
||||
<entry><code>〈length〉{1,4}</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#margin">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#margin">CSS3</ulink></entry>
|
||||
<entry>a 'four sides' shorthand</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>padding</entry>
|
||||
<entry><code>〈length〉{1,4}</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-box/#padding">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-box/#padding">CSS3</ulink></entry>
|
||||
<entry>a 'four sides' shorthand</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -636,8 +636,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-width">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-width">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry>CSS allows other values</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -646,8 +646,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry>CSS allows other values</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -656,8 +656,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-width">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-width">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry>CSS allows other values</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -666,8 +666,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry>CSS allows other values</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -676,8 +676,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-style">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-style">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -686,8 +686,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-style">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-style">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -696,8 +696,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-style">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-style">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -706,8 +706,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-style">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-style">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -716,8 +716,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-right-radius">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-right-radius">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -726,8 +726,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-right-radius">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-right-radius">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -736,8 +736,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-left-radius">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-left-radius">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -746,8 +746,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-left-radius">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-left-radius">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -756,8 +756,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>currentColor</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-color">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-color">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -766,8 +766,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>currentColor</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-color">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-color">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -776,8 +776,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>currentColor</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-color">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-color">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -786,8 +786,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>currentColor</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-color">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-color">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -796,7 +796,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-background/#the-border-image-source">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-background/#the-border-image-source">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -805,7 +805,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>stretch</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR//css3-background/#the-border-image-repeat">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR//css3-background/#the-border-image-repeat">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -814,7 +814,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>100%</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR//css3-background/#the-border-image-slice">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR//css3-background/#the-border-image-slice">CSS3</ulink></entry>
|
||||
<entry>a 'four sides' shorthand</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -823,7 +823,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>1</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR//css3-background/#the-border-image-width">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR//css3-background/#the-border-image-width">CSS3</ulink></entry>
|
||||
<entry>a 'four sides' shorthand</entry>
|
||||
</row>
|
||||
|
||||
@@ -838,77 +838,77 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>border‑width</entry>
|
||||
<entry><code>〈length〉{1,4}</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-width">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-width">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||
<entry>a 'four sides' shorthand</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border‑style</entry>
|
||||
<entry><code>〈border style〉{1,4}</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-style">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-style">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||
<entry>a 'four sides' shorthand</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border‑color</entry>
|
||||
<entry><code>〈color〉{1,4}</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-background/#border-color">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-color">CSS3</ulink></entry>
|
||||
<entry>a 'four sides' shorthand</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border‑top</entry>
|
||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#border-top">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#border-top">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border‑left</entry>
|
||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#border-left">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#border-left">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border‑bottom</entry>
|
||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#border-bottom">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#border-bottom">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border‑right</entry>
|
||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#border-right">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#border-right">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border</entry>
|
||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#border">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#border">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border‑radius</entry>
|
||||
<entry><code>[ 〈length〉 | 〈percentage〉 ]{1,4} [ / [ 〈length〉 | 〈percentage> ]{1,4} ]?</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-background/#border-radius">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-radius">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>border‑image</entry>
|
||||
<entry><code>〈border-image-source〉 || 〈border-image-slice〉 [ / 〈border-image-width〉 | / 〈border-image-width〉? / 〈border-image-outset〉 ]? || 〈border-image-repeat〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-background/#border-image">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-image">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -934,8 +934,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-style">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-ui/#outline-style">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-style">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-ui/#outline-style">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -944,8 +944,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-width">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-ui/#outline-width">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-width">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-ui/#outline-width">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -954,8 +954,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>currentColor</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-color">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-ui/#outline-color">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-color">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-ui/#outline-color">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -964,7 +964,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0px</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-ui/#outline-offset">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-ui/#outline-offset">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1014,8 +1014,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>outline</entry>
|
||||
<entry><code>〈outline-color〉 || 〈outline-style〉 || 〈outline-width〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-ui/#propdef-outline">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-ui/#propdef-outline">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1048,8 +1048,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>rgba(0,0,0,0)</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-color">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#background-color">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-color">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#background-color">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1058,7 +1058,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>border-box</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-background/#background-clip">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-background/#background-clip">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1067,7 +1067,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>padding-box</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-background/#background-origin">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-background/#background-origin">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1076,7 +1076,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>auto</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-background/#background-size">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-background/#background-size">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1085,8 +1085,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-position">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#background-position">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-position">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#background-position">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1095,8 +1095,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>repeat</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-repeat">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#background-repeat">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-repeat">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#background-repeat">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1105,8 +1105,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-image">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#background-image">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-image">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#background-image">CSS3</ulink></entry>
|
||||
<entry>not supported: urls without quotes, CSS radial gradients, colors in crossfades</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1124,7 +1124,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry>✓</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-background/#box-shadow">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-background/#box-shadow">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -1138,8 +1138,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><para>background</para></entry>
|
||||
<entry><code>[ 〈bg-layer〉 , ]* 〈final-bg-layer〉</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background">CSS2</ulink>,
|
||||
<ulink url="http://www.w3.org/TR/css3-background/#background">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background">CSS2</ulink>,
|
||||
<ulink url="https://www.w3.org/TR/css3-background/#background">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -1181,7 +1181,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>all</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition-property">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition-property">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1190,7 +1190,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0s</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition-duration">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition-duration">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1199,7 +1199,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>ease</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition-timing-function">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition-timing-function">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1208,7 +1208,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0s</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition-delay">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition-delay">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -1222,7 +1222,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>transition</entry>
|
||||
<entry><code>〈single-transition〉 [ , 〈single-transition〉 ]*</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -1250,7 +1250,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-name">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-name">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1259,7 +1259,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0s</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-duration">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-duration">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1268,7 +1268,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>ease</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-timing-function">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-timing-function">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1277,7 +1277,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>1</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-iteration-count">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-iteration-count">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1286,7 +1286,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>normal</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-direction">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-direction">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1295,7 +1295,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>running</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-play-state">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-play-state">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1304,7 +1304,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>0s</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-delay">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-delay">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -1313,7 +1313,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry><code>none</code></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-fill-mode">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-fill-mode">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@@ -1327,7 +1327,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry>animation</entry>
|
||||
<entry><code>〈single‑animation〉 [ , 〈single‑animation〉]*</code></entry>
|
||||
<entry>see individual properties</entry>
|
||||
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation">CSS3</ulink></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
@@ -1051,7 +1051,7 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
|
||||
<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
|
||||
when the 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
|
||||
|
@@ -57,7 +57,8 @@
|
||||
<varlistentry>
|
||||
<term><option>simplify</option></term>
|
||||
<listitem><para>Simplifies the .ui file by removing properties that
|
||||
are set to their default values and write the resulting XML to stdout.</para></listitem>
|
||||
are set to their default values and write the resulting XML to stdout,
|
||||
or back to the input file.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>enumerate</option></term>
|
||||
@@ -71,6 +72,16 @@
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Simplify Options</title>
|
||||
<para>The <option>simplify</option> command accepts the following options:</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>--replace</option></term>
|
||||
<listitem><para>Write the content back to the .ui file instead of stdout.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Preview Options</title>
|
||||
<para>The <option>preview</option> command accepts the following options:</para>
|
||||
<variablelist>
|
||||
|
@@ -12,9 +12,9 @@
|
||||
<releaseinfo>
|
||||
This document is for the GTK+ 3 library, version &version;.
|
||||
The latest versions can be found online at
|
||||
<ulink role="online-location" url="http://developer.gnome.org/gtk3/">http://developer.gnome.org/gtk3/</ulink>.
|
||||
<ulink role="online-location" url="https://developer.gnome.org/gtk3/">https://developer.gnome.org/gtk3/</ulink>.
|
||||
If you are looking for the older GTK+ 2 series of libraries,
|
||||
see <ulink role="online-location" url="http://developer.gnome.org/gtk2/">http://developer.gnome.org/gtk2/</ulink>.
|
||||
see <ulink role="online-location" url="https://developer.gnome.org/gtk2/">https://developer.gnome.org/gtk2/</ulink>.
|
||||
</releaseinfo>
|
||||
</bookinfo>
|
||||
|
||||
|
@@ -2259,6 +2259,7 @@ gtk_menu_set_title
|
||||
gtk_menu_get_title
|
||||
gtk_menu_set_monitor
|
||||
gtk_menu_get_monitor
|
||||
gtk_menu_place_on_monitor
|
||||
gtk_menu_get_tearoff_state
|
||||
gtk_menu_set_reserve_toggle_size
|
||||
gtk_menu_get_reserve_toggle_size
|
||||
@@ -3214,35 +3215,39 @@ GtkScrolledWindow
|
||||
GtkScrolledWindowClass
|
||||
gtk_scrolled_window_new
|
||||
gtk_scrolled_window_get_hadjustment
|
||||
gtk_scrolled_window_set_hadjustment
|
||||
gtk_scrolled_window_get_vadjustment
|
||||
gtk_scrolled_window_set_vadjustment
|
||||
gtk_scrolled_window_get_hscrollbar
|
||||
gtk_scrolled_window_get_vscrollbar
|
||||
GtkPolicyType
|
||||
gtk_scrolled_window_get_policy
|
||||
gtk_scrolled_window_set_policy
|
||||
gtk_scrolled_window_add_with_viewport
|
||||
GtkCornerType
|
||||
gtk_scrolled_window_get_placement
|
||||
gtk_scrolled_window_set_placement
|
||||
gtk_scrolled_window_unset_placement
|
||||
gtk_scrolled_window_set_shadow_type
|
||||
gtk_scrolled_window_set_hadjustment
|
||||
gtk_scrolled_window_set_vadjustment
|
||||
gtk_scrolled_window_get_placement
|
||||
gtk_scrolled_window_get_policy
|
||||
gtk_scrolled_window_get_shadow_type
|
||||
gtk_scrolled_window_set_shadow_type
|
||||
gtk_scrolled_window_get_kinetic_scrolling
|
||||
gtk_scrolled_window_set_kinetic_scrolling
|
||||
gtk_scrolled_window_get_capture_button_press
|
||||
gtk_scrolled_window_set_capture_button_press
|
||||
gtk_scrolled_window_get_overlay_scrolling
|
||||
gtk_scrolled_window_set_overlay_scrolling
|
||||
gtk_scrolled_window_get_min_content_width
|
||||
gtk_scrolled_window_set_min_content_width
|
||||
gtk_scrolled_window_get_min_content_height
|
||||
gtk_scrolled_window_set_min_content_height
|
||||
gtk_scrolled_window_set_kinetic_scrolling
|
||||
gtk_scrolled_window_get_kinetic_scrolling
|
||||
gtk_scrolled_window_set_capture_button_press
|
||||
gtk_scrolled_window_get_capture_button_press
|
||||
gtk_scrolled_window_set_overlay_scrolling
|
||||
gtk_scrolled_window_get_overlay_scrolling
|
||||
gtk_scrolled_window_set_propagate_natural_width
|
||||
gtk_scrolled_window_get_max_content_width
|
||||
gtk_scrolled_window_set_max_content_width
|
||||
gtk_scrolled_window_get_max_content_height
|
||||
gtk_scrolled_window_set_max_content_height
|
||||
gtk_scrolled_window_get_propagate_natural_width
|
||||
gtk_scrolled_window_set_propagate_natural_height
|
||||
gtk_scrolled_window_set_propagate_natural_width
|
||||
gtk_scrolled_window_get_propagate_natural_height
|
||||
gtk_scrolled_window_set_propagate_natural_height
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_SCROLLED_WINDOW
|
||||
@@ -7077,7 +7082,7 @@ GtkPrintOperationPrivate
|
||||
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gtk/gtkprintunixdialog.h</INCLUDE>
|
||||
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||
<FILE>gtkprintunixdialog</FILE>
|
||||
<TITLE>GtkPrintUnixDialog</TITLE>
|
||||
GtkPrintUnixDialog
|
||||
@@ -7424,7 +7429,7 @@ gtk_print_context_get_type
|
||||
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gtk/gtkprintjob.h</INCLUDE>
|
||||
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||
<FILE>gtkprintjob</FILE>
|
||||
<TITLE>GtkPrintJob</TITLE>
|
||||
GtkPrintJob
|
||||
@@ -7434,6 +7439,7 @@ gtk_print_job_get_settings
|
||||
gtk_print_job_get_printer
|
||||
gtk_print_job_get_title
|
||||
gtk_print_job_get_status
|
||||
gtk_print_job_set_source_fd
|
||||
gtk_print_job_set_source_file
|
||||
gtk_print_job_get_surface
|
||||
gtk_print_job_send
|
||||
@@ -7475,7 +7481,7 @@ gtk_print_job_get_type
|
||||
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gtk/gtkpagesetupunixdialog.h</INCLUDE>
|
||||
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||
<FILE>gtkpagesetupunixdialog</FILE>
|
||||
<TITLE>GtkPageSetupUnixDialog</TITLE>
|
||||
GtkPageSetupUnixDialog
|
||||
@@ -7533,7 +7539,7 @@ gtk_mount_operation_get_parent
|
||||
gtk_mount_operation_set_screen
|
||||
gtk_mount_operation_get_screen
|
||||
gtk_show_uri
|
||||
gtk_show_uri_on_parent
|
||||
gtk_show_uri_on_window
|
||||
<SUBSECTION Standard>
|
||||
GTK_IS_MOUNT_OPERATION
|
||||
GTK_IS_MOUNT_OPERATION_CLASS
|
||||
@@ -8093,6 +8099,7 @@ GtkFlowBox
|
||||
gtk_flow_box_new
|
||||
gtk_flow_box_insert
|
||||
gtk_flow_box_get_child_at_index
|
||||
gtk_flow_box_get_child_at_pos
|
||||
gtk_flow_box_set_hadjustment
|
||||
gtk_flow_box_set_vadjustment
|
||||
|
||||
|
@@ -184,8 +184,9 @@
|
||||
<listitem>If you are opening a document or URI by launching a command
|
||||
like <literal>firefox http://my-favourite-website.com</literal> or
|
||||
<literal>gnome-open ghelp:epiphany</literal>, it is best to just use
|
||||
gtk_show_uri(); as an added benefit, your application will henceforth
|
||||
respect the users preference for what application to use.</listitem>
|
||||
gtk_show_uri_on_window(); as an added benefit, your application will
|
||||
henceforth respect the users preference for what application to use and
|
||||
correctly open links in sandboxed applications.</listitem>
|
||||
<listitem>If you are launching a regular, installed application that
|
||||
has a desktop file, it is best to use GIOs #GAppInfo with a suitable
|
||||
launch context.
|
||||
|
@@ -415,7 +415,7 @@
|
||||
|
||||
<para>
|
||||
It is worth mentioning that the new file format does not support
|
||||
custom keybindings nor stock icon mappings as the RC format did.
|
||||
stock icon mappings as the RC format did.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
@@ -35,11 +35,11 @@ How do I get started with GTK+?
|
||||
</para></question>
|
||||
|
||||
<answer><para>
|
||||
The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers some
|
||||
<ulink url="http://www.gtk.org/documentation.php">tutorials</ulink> and other
|
||||
The GTK+ <ulink url="https://www.gtk.org">website</ulink> offers some
|
||||
<ulink url="https://www.gtk.org/documentation.php">tutorials</ulink> and other
|
||||
documentation (most of it about GTK+ 2.x, but mostly still applicable).
|
||||
More documentation ranging from whitepapers to online books can be found at
|
||||
the <ulink url="http://developer.gnome.org">GNOME developer's site</ulink>.
|
||||
the <ulink url="https://developer.gnome.org">GNOME developer's site</ulink>.
|
||||
After studying these materials you should be well prepared to come back to
|
||||
this reference manual for details.
|
||||
</para></answer>
|
||||
@@ -77,7 +77,7 @@ specific widgets and functions.
|
||||
<para>
|
||||
If you have a question not covered in the manual, feel free to
|
||||
ask on the mailing lists and please <ulink
|
||||
url="http://bugzilla.gnome.org">file a bug report</ulink> against the
|
||||
url="https://bugzilla.gnome.org">file a bug report</ulink> against the
|
||||
documentation.
|
||||
</para>
|
||||
|
||||
@@ -106,7 +106,7 @@ For strings returned from functions, they will be declared "const"
|
||||
if they should not be freed. Non-const strings should be
|
||||
freed with g_free(). Arrays follow the same rule. If you find an
|
||||
undocumented exception to the rules, please report a bug to <ulink
|
||||
url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.
|
||||
url="https://bugzilla.gnome.org">https://bugzilla.gnome.org</ulink>.
|
||||
</para>
|
||||
|
||||
</answer>
|
||||
@@ -180,7 +180,7 @@ How do I internationalize a GTK+ program?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
Most people use <ulink url="http://www.gnu.org/software/gettext/">GNU
|
||||
Most people use <ulink url="https://www.gnu.org/software/gettext/">GNU
|
||||
gettext</ulink>, already required in order to install GLib. On a UNIX
|
||||
or Linux system with gettext installed, type <literal>info gettext</literal>
|
||||
to read the documentation.
|
||||
@@ -281,7 +281,7 @@ zero-terminated strings.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
More information about Unicode and UTF-8 can be found in the
|
||||
<ulink url="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode
|
||||
<ulink url="https://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode
|
||||
FAQ for Unix/Linux</ulink>.
|
||||
GLib provides functions for converting strings between UTF-8 and other
|
||||
encodings, see g_locale_to_utf8() and g_convert().
|
||||
@@ -376,7 +376,7 @@ How do I use GTK+ with C++?
|
||||
There are two ways to approach this. The GTK+ header files use the subset
|
||||
of C that's also valid C++, so you can simply use the normal GTK+ API
|
||||
in a C++ program. Alternatively, you can use a "C++ binding"
|
||||
such as <ulink url="http://gtkmm.sourceforge.net/">gtkmm</ulink>
|
||||
such as <ulink url="https://www.gtkmm.org/">gtkmm</ulink>
|
||||
which provides a native C++ API.
|
||||
</para>
|
||||
<para>
|
||||
@@ -415,9 +415,9 @@ How do I use GTK+ with other non-C languages?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
See the <ulink url="http://www.gtk.org/language-bindings.php">list of language
|
||||
See the <ulink url="https://www.gtk.org/language-bindings.php">list of language
|
||||
bindings</ulink> on <ulink
|
||||
url="http://www.gtk.org">http://www.gtk.org</ulink>.
|
||||
url="https://www.gtk.org">https://www.gtk.org</ulink>.
|
||||
</para>
|
||||
|
||||
</answer>
|
||||
@@ -473,8 +473,8 @@ To draw a piece of text, use a Pango layout and pango_cairo_show_layout().
|
||||
|
||||
<para>
|
||||
See also the
|
||||
<ulink url="http://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html">Cairo Rendering</ulink>
|
||||
section of <ulink url="http://developer.gnome.org/pango/stable/">Pango manual</ulink>.
|
||||
<ulink url="https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html">Cairo Rendering</ulink>
|
||||
section of <ulink url="https://developer.gnome.org/pango/stable/">Pango manual</ulink>.
|
||||
</para>
|
||||
</answer>
|
||||
|
||||
@@ -505,8 +505,8 @@ pango_layout_get_pixel_size(), using code like the following:
|
||||
|
||||
<para>
|
||||
See also the
|
||||
<ulink url="http://developer.gnome.org/pango/stable/pango-Layout-Objects.html">Layout Objects</ulink>
|
||||
section of <ulink url="http://developer.gnome.org/pango/stable/">Pango manual</ulink>.
|
||||
<ulink url="https://developer.gnome.org/pango/stable/pango-Layout-Objects.html">Layout Objects</ulink>
|
||||
section of <ulink url="https://developer.gnome.org/pango/stable/">Pango manual</ulink>.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
@@ -22,7 +22,7 @@ Getting help with GTK+
|
||||
<para>
|
||||
If you encounter a bug, misfeature, or missing feature in GTK+, please
|
||||
file a bug report on
|
||||
<ulink url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.
|
||||
<ulink url="https://bugzilla.gnome.org">https://bugzilla.gnome.org</ulink>.
|
||||
We'd also appreciate reports of incomplete or misleading information in
|
||||
the GTK+ documentation; file those against the "docs" component of the "gtk+"
|
||||
product in Bugzilla.
|
||||
@@ -72,7 +72,7 @@ There are several mailing lists dedicated to GTK+ and related
|
||||
libraries. Discussion of GLib, Pango, and ATK in addition to GTK+
|
||||
proper is welcome on these lists. You can subscribe or view the
|
||||
archives of these lists on
|
||||
<ulink url="http://mail.gnome.org">http://mail.gnome.org</ulink>.
|
||||
<ulink url="https://mail.gnome.org">http://mail.gnome.org</ulink>.
|
||||
If you aren't subscribed to the list, any message you post to
|
||||
the list will be held for manual moderation, which might take
|
||||
some days to happen.
|
||||
|
@@ -522,15 +522,30 @@ nevertheless.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GTK_CSD</envar></title>
|
||||
|
||||
<para>
|
||||
The default value of this environment variable is 1. If changed to 0, this
|
||||
disables the default use of client-side decorations on GTK+ windows, thus
|
||||
making the window manager responsible for drawing the decorations of
|
||||
windows that do not have a custom titlebar widget.
|
||||
</para>
|
||||
<para>
|
||||
CSD is always used for windows with a custom titlebar widget set, as the WM
|
||||
should not draw another titlebar or other decorations around the custom one.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
|
||||
|
||||
<para>
|
||||
GTK+ uses these environment variables to locate icon themes
|
||||
and MIME information. For more information, see
|
||||
<ulink url="http://freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</ulink>,
|
||||
the <ulink url="http://freedesktop.org/Standards/shared-mime-info-spec">Shared MIME-info Database</ulink>
|
||||
and the <ulink url="http://freedesktop.org/Standards/basedir-spec">Base Directory Specification</ulink>.
|
||||
<ulink url="https://freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</ulink>,
|
||||
the <ulink url="https://freedesktop.org/Standards/shared-mime-info-spec">Shared MIME-info Database</ulink>
|
||||
and the <ulink url="https://freedesktop.org/Standards/basedir-spec">Base Directory Specification</ulink>.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
@@ -539,7 +554,7 @@ nevertheless.
|
||||
|
||||
<para>
|
||||
GTK+ uses this environment variable to provide startup notification
|
||||
according to the <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">Startup Notification Spec</ulink>.
|
||||
according to the <ulink url="https://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">Startup Notification Spec</ulink>.
|
||||
Following the specification, GTK+ unsets this variable after reading
|
||||
it (to keep it from leaking to child processes). So, if you need its
|
||||
value for your own purposes, you have to read it before calling
|
||||
|
@@ -148,13 +148,10 @@ displays after the widget is created with gtk_text_view_set_buffer().
|
||||
|
||||
<para>
|
||||
|
||||
There are two ways to affect text attributes in #GtkTextView.
|
||||
You can change the default attributes for a given #GtkTextView, and you can
|
||||
apply tags that change the attributes for a region of text. For text features
|
||||
that come from the theme — such as font and foreground color — use
|
||||
standard #GtkWidget functions such as gtk_widget_modify_font() or
|
||||
gtk_widget_override_color(). For other attributes there are dedicated methods on
|
||||
#GtkTextView such as gtk_text_view_set_tabs().
|
||||
The way to affect text attributes in #GtkTextView is to
|
||||
apply tags that change the attributes for a region of text.
|
||||
For text features that come from the theme — such as font and
|
||||
foreground color — use CSS to override their default values.
|
||||
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *view;
|
||||
@@ -163,6 +160,8 @@ gtk_widget_override_color(). For other attributes there are dedicated methods on
|
||||
PangoFontDescription *font_desc;
|
||||
GdkRGBA rgba;
|
||||
GtkTextTag *tag;
|
||||
GtkCssProvider *provider;
|
||||
GtkStyleContext *context;
|
||||
|
||||
view = gtk_text_view_new (<!-- -->);
|
||||
|
||||
@@ -170,14 +169,19 @@ gtk_widget_override_color(). For other attributes there are dedicated methods on
|
||||
|
||||
gtk_text_buffer_set_text (buffer, "Hello, this is some text", -1);
|
||||
|
||||
/* Change default font throughout the widget */
|
||||
font_desc = pango_font_description_from_string ("Serif 15");
|
||||
gtk_widget_modify_font (view, font_desc);
|
||||
pango_font_description_free (font_desc);
|
||||
|
||||
/* Change default color throughout the widget */
|
||||
gdk_rgba_parse ("green", &rgba);
|
||||
gtk_widget_override_color (view, GTK_STATE_FLAG_NORMAL, &rgba);
|
||||
/* Change default font and color throughout the widget */
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (provider,
|
||||
"textview {"
|
||||
" font: 15 serif;"
|
||||
" color: green;"
|
||||
"}",
|
||||
-1,
|
||||
NULL);
|
||||
context = gtk_widget_get_style_context (view);
|
||||
gtk_style_context_add_provider (context,
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
|
||||
/* Change left margin throughout the widget */
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);
|
||||
|
@@ -32,7 +32,7 @@ options or environment variables.
|
||||
|
||||
<para>
|
||||
For up-to-date information about the current status of this backend, see
|
||||
the <ulink url="http://wayland.freedesktop.org/gtk.html">project page</ulink>.
|
||||
the <ulink url="https://wiki.gnome.org/Initiatives/Wayland/GTK%2B">project page</ulink>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
@@ -28,7 +28,8 @@ noinst_PROGRAMS = \
|
||||
grid-packing \
|
||||
drawing \
|
||||
builder \
|
||||
search-bar
|
||||
search-bar \
|
||||
listbox-dnd
|
||||
|
||||
EXTRA_DIST = builder.ui
|
||||
|
||||
|
@@ -125,8 +125,6 @@ close_window (void)
|
||||
{
|
||||
if (surface)
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
static void
|
||||
|
155
examples/listbox-dnd.c
Normal file
155
examples/listbox-dnd.c
Normal file
@@ -0,0 +1,155 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkTargetEntry entries[] = {
|
||||
{ "GTK_LIST_BOX_ROW", GTK_TARGET_SAME_APP, 0 }
|
||||
};
|
||||
|
||||
static void
|
||||
drag_begin (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *row;
|
||||
GtkAllocation alloc;
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
int x, y;
|
||||
|
||||
row = gtk_widget_get_ancestor (widget, GTK_TYPE_LIST_BOX_ROW);
|
||||
gtk_widget_get_allocation (row, &alloc);
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, alloc.width, alloc.height);
|
||||
cr = cairo_create (surface);
|
||||
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (row), "drag-icon");
|
||||
gtk_widget_draw (row, cr);
|
||||
gtk_style_context_remove_class (gtk_widget_get_style_context (row), "drag-icon");
|
||||
|
||||
gtk_widget_translate_coordinates (widget, row, 0, 0, &x, &y);
|
||||
cairo_surface_set_device_offset (surface, -x, -y);
|
||||
gtk_drag_set_icon_surface (context, surface);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_surface_destroy (surface);
|
||||
}
|
||||
|
||||
void
|
||||
drag_data_get (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_selection_data_set (selection_data,
|
||||
gdk_atom_intern_static_string ("GTK_LIST_BOX_ROW"),
|
||||
32,
|
||||
(const guchar *)&widget,
|
||||
sizeof (gpointer));
|
||||
}
|
||||
|
||||
static void
|
||||
drag_data_received (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint32 time,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *target;
|
||||
GtkWidget *row;
|
||||
GtkWidget *source;
|
||||
int pos;
|
||||
|
||||
target = widget;
|
||||
|
||||
pos = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (target));
|
||||
row = (gpointer)* (gpointer*)gtk_selection_data_get_data (selection_data);
|
||||
source = gtk_widget_get_ancestor (row, GTK_TYPE_LIST_BOX_ROW);
|
||||
|
||||
if (source == target)
|
||||
return;
|
||||
|
||||
g_object_ref (source);
|
||||
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (source)), source);
|
||||
gtk_list_box_insert (GTK_LIST_BOX (gtk_widget_get_parent (target)), source, pos);
|
||||
g_object_unref (source);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_row (const gchar *text)
|
||||
{
|
||||
GtkWidget *row, *handle, *box, *label, *image;
|
||||
|
||||
row = gtk_list_box_row_new ();
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
g_object_set (box, "margin-start", 10, "margin-end", 10, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (row), box);
|
||||
|
||||
handle = gtk_event_box_new ();
|
||||
image = gtk_image_new_from_icon_name ("open-menu-symbolic", 1);
|
||||
gtk_container_add (GTK_CONTAINER (handle), image);
|
||||
gtk_container_add (GTK_CONTAINER (box), handle);
|
||||
|
||||
label = gtk_label_new (text);
|
||||
gtk_container_add_with_properties (GTK_CONTAINER (box), label, "expand", TRUE, NULL);
|
||||
|
||||
gtk_drag_source_set (handle, GDK_BUTTON1_MASK, entries, 1, GDK_ACTION_MOVE);
|
||||
g_signal_connect (handle, "drag-begin", G_CALLBACK (drag_begin), NULL);
|
||||
g_signal_connect (handle, "drag-data-get", G_CALLBACK (drag_data_get), NULL);
|
||||
|
||||
gtk_drag_dest_set (row, GTK_DEST_DEFAULT_ALL, entries, 1, GDK_ACTION_MOVE);
|
||||
g_signal_connect (row, "drag-data-received", G_CALLBACK (drag_data_received), NULL);
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
static const char *css =
|
||||
".drag-icon { "
|
||||
" background: white; "
|
||||
" border: 1px solid black; "
|
||||
"}";
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window, *list, *sw, *row;
|
||||
gint i;
|
||||
gchar *text;
|
||||
GtkCssProvider *provider;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (provider, css, -1, NULL);
|
||||
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), -1, 300);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
gtk_container_add (GTK_CONTAINER (window), sw);
|
||||
|
||||
list = gtk_list_box_new ();
|
||||
gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_NONE);
|
||||
gtk_container_add (GTK_CONTAINER (sw), list);
|
||||
|
||||
for (i = 0; i < 20; i++)
|
||||
{
|
||||
text = g_strdup_printf ("Row %d", i);
|
||||
row = create_row (text);
|
||||
gtk_list_box_insert (GTK_LIST_BOX (list), row, -1);
|
||||
}
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
@@ -440,12 +440,17 @@ gdkenumtypes.c: $(gdk_h_sources) gdkenumtypes.c.template
|
||||
# Marshaller generation
|
||||
#
|
||||
gdkmarshalers.h: gdkmarshalers.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||
--prefix=_gdk_marshal \
|
||||
--header \
|
||||
$(srcdir)/gdkmarshalers.list > gdkmarshalers-h.tmp \
|
||||
&& mv gdkmarshalers-h.tmp gdkmarshalers.h \
|
||||
|| ( rm -f gdkmarshalers-h.tmp && exit 1)
|
||||
gdkmarshalers.c: gdkmarshalers.list
|
||||
$(AM_V_GEN) (echo "#include \"gdkmarshalers.h\""; \
|
||||
$(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||
--prefix=_gdk_marshal \
|
||||
--body \
|
||||
$(srcdir)/gdkmarshalers.list > gdkmarshalers-c.tmp \
|
||||
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|
||||
|| ( rm -f gdkmarshalers-c.tmp && exit 1 )
|
||||
|
||||
@@ -459,29 +464,20 @@ stamp-gc-h: $(top_builddir)/config.status
|
||||
#
|
||||
# Resources
|
||||
#
|
||||
|
||||
glsl_sources := $(wildcard $(srcdir)/resources/glsl/*.glsl)
|
||||
|
||||
gdk.gresource.xml: Makefile.am
|
||||
$(AM_V_GEN) echo "<?xml version='1.0' encoding='UTF-8'?>" > $@; \
|
||||
echo "<gresources>" >> $@; \
|
||||
echo " <gresource prefix='/org/gtk/libgdk'>" >> $@; \
|
||||
for f in $(srcdir)/resources/glsl/*.glsl; do \
|
||||
for f in $(glsl_sources); do \
|
||||
n=`basename $$f`; \
|
||||
echo " <file alias='glsl/$$n'>resources/glsl/$$n</file>" >> $@; \
|
||||
done; \
|
||||
echo " </gresource>" >> $@; \
|
||||
echo "</gresources>" >> $@;
|
||||
|
||||
glsl_sources = \
|
||||
resources/glsl/gl3-texture-2d.fs.glsl \
|
||||
resources/glsl/gl3-texture-2d.vs.glsl \
|
||||
resources/glsl/gl3-texture-rect.fs.glsl \
|
||||
resources/glsl/gl3-texture-rect.vs.glsl \
|
||||
resources/glsl/gl2-texture-2d.fs.glsl \
|
||||
resources/glsl/gl2-texture-2d.fs.glsl \
|
||||
resources/glsl/gl2-texture-rect.vs.glsl \
|
||||
resources/glsl/gl2-texture-rect.vs.glsl \
|
||||
resources/glsl/gles2-texture.fs.glsl \
|
||||
resources/glsl/gles2-texture.vs.glsl
|
||||
|
||||
EXTRA_DIST += $(glsl_sources)
|
||||
CLEANFILES += gdk.gresource.xml
|
||||
|
||||
|
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
-DG_LOG_USE_STRUCTURED=1 \
|
||||
-DGDK_COMPILATION \
|
||||
-DGDK_DISABLE_DEPRECATION_WARNINGS \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
|
@@ -17,6 +17,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#ifndef HAVE_DECL_ISNAN
|
||||
|
@@ -162,8 +162,10 @@ gdk_app_launch_context_get_display (GAppLaunchContext *context,
|
||||
GdkAppLaunchContext *ctx = GDK_APP_LAUNCH_CONTEXT (context);
|
||||
GdkDisplay *display;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
if (ctx->screen)
|
||||
return gdk_screen_make_display_name (ctx->screen);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (ctx->display)
|
||||
display = ctx->display;
|
||||
|
@@ -1708,6 +1708,7 @@ _gdk_device_translate_window_coord (GdkDevice *device,
|
||||
device_width = axis_info_x->max_value - axis_info_x->min_value;
|
||||
device_height = axis_info_y->max_value - axis_info_y->min_value;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
if (device_width > 0)
|
||||
x_min = axis_info_x->min_value;
|
||||
else
|
||||
@@ -1723,6 +1724,7 @@ _gdk_device_translate_window_coord (GdkDevice *device,
|
||||
device_height = gdk_screen_get_height (gdk_window_get_screen (window));
|
||||
y_min = 0;
|
||||
}
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
window_width = gdk_window_get_width (window);
|
||||
window_height = gdk_window_get_height (window);
|
||||
@@ -1805,6 +1807,7 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
|
||||
|
||||
axis_width = axis_info.max_value - axis_info.min_value;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
if (axis_info.use == GDK_AXIS_X)
|
||||
{
|
||||
if (axis_width > 0)
|
||||
@@ -1823,6 +1826,7 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
|
||||
|
||||
offset = - window_root_y - window->abs_y;
|
||||
}
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (axis_value)
|
||||
*axis_value = offset + scale * (value - axis_info.min_value);
|
||||
|
@@ -2343,9 +2343,7 @@ gdk_error_trap_pop_internal (gboolean need_code)
|
||||
result = 0;
|
||||
for (l = trap->displays; l != NULL; l = l->next)
|
||||
{
|
||||
gint code = 0;
|
||||
|
||||
code = class->pop_error_trap (l->data, !need_code);
|
||||
gint code = class->pop_error_trap (l->data, !need_code);
|
||||
|
||||
/* we use the error on the last display listed, why not. */
|
||||
if (code != 0)
|
||||
@@ -2553,12 +2551,14 @@ get_fallback_monitor (GdkDisplay *display)
|
||||
}
|
||||
|
||||
screen = gdk_display_get_default_screen (display);
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gdk_monitor_set_size (monitor,
|
||||
gdk_screen_get_width (screen),
|
||||
gdk_screen_get_height (screen));
|
||||
gdk_monitor_set_physical_size (monitor,
|
||||
gdk_screen_get_width_mm (screen),
|
||||
gdk_screen_get_height_mm (screen));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
return monitor;
|
||||
}
|
||||
|
@@ -273,12 +273,12 @@ static GdkBackend gdk_backends[] = {
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
{ "wayland", _gdk_wayland_display_open },
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_MIR
|
||||
{ "mir", _gdk_mir_display_open },
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
{ "x11", _gdk_x11_display_open },
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_MIR
|
||||
{ "mir", _gdk_mir_display_open },
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_BROADWAY
|
||||
{ "broadway", _gdk_broadway_display_open },
|
||||
#endif
|
||||
|
@@ -409,6 +409,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
alpha_size == 0 &&
|
||||
direct_window != NULL &&
|
||||
direct_window->current_paint.use_gl &&
|
||||
gdk_gl_context_has_framebuffer_blit (paint_context) &&
|
||||
trivial_transform &&
|
||||
clip_region != NULL)
|
||||
{
|
||||
|
@@ -105,7 +105,8 @@ typedef struct {
|
||||
guint debug_enabled : 1;
|
||||
guint forward_compatible : 1;
|
||||
guint is_legacy : 1;
|
||||
guint use_es : 1;
|
||||
|
||||
int use_es;
|
||||
|
||||
GdkGLContextPaintData *paint_data;
|
||||
} GdkGLContextPrivate;
|
||||
@@ -153,6 +154,7 @@ gdk_gl_context_finalize (GObject *gobject)
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||
|
||||
g_clear_pointer (&priv->paint_data, g_free);
|
||||
G_OBJECT_CLASS (gdk_gl_context_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -362,6 +364,9 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
|
||||
static void
|
||||
gdk_gl_context_init (GdkGLContext *self)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
|
||||
|
||||
priv->use_es = -1;
|
||||
}
|
||||
|
||||
/*< private >
|
||||
@@ -572,7 +577,7 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
|
||||
/* Enforce a minimum context version number of 3.2 */
|
||||
version = (major * 100) + minor;
|
||||
|
||||
if (priv->use_es || (_gdk_gl_flags & GDK_GL_GLES) != 0)
|
||||
if (priv->use_es > 0 || (_gdk_gl_flags & GDK_GL_GLES) != 0)
|
||||
min_ver = 200;
|
||||
else
|
||||
min_ver = 302;
|
||||
@@ -608,7 +613,7 @@ gdk_gl_context_get_required_version (GdkGLContext *context,
|
||||
|
||||
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
||||
|
||||
if (priv->use_es || (_gdk_gl_flags & GDK_GL_GLES) != 0)
|
||||
if (priv->use_es > 0 || (_gdk_gl_flags & GDK_GL_GLES) != 0)
|
||||
{
|
||||
default_major = 2;
|
||||
default_minor = 0;
|
||||
@@ -683,13 +688,18 @@ gdk_gl_context_set_is_legacy (GdkGLContext *context,
|
||||
/**
|
||||
* gdk_gl_context_set_use_es:
|
||||
* @context: a #GdkGLContext:
|
||||
* @use_es: whether the context should use OpenGL ES instead of OpenGL
|
||||
* @use_es: whether the context should use OpenGL ES instead of OpenGL,
|
||||
* or -1 to allow auto-detection
|
||||
*
|
||||
* Requests that GDK create a OpenGL ES context instead of an OpenGL one,
|
||||
* if the platform and windowing system allows it.
|
||||
*
|
||||
* The @context must not have been realized.
|
||||
*
|
||||
* By default, GDK will attempt to automatically detect whether the
|
||||
* underlying GL implementation is OpenGL or OpenGL ES once the @context
|
||||
* is realized.
|
||||
*
|
||||
* You should check the return value of gdk_gl_context_get_use_es() after
|
||||
* calling gdk_gl_context_realize() to decide whether to use the OpenGL or
|
||||
* OpenGL ES API, extensions, or shaders.
|
||||
@@ -698,14 +708,15 @@ gdk_gl_context_set_is_legacy (GdkGLContext *context,
|
||||
*/
|
||||
void
|
||||
gdk_gl_context_set_use_es (GdkGLContext *context,
|
||||
gboolean use_es)
|
||||
int use_es)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||
|
||||
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
||||
g_return_if_fail (!priv->realized);
|
||||
|
||||
priv->use_es = !!use_es;
|
||||
if (priv->use_es != use_es)
|
||||
priv->use_es = use_es;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -725,7 +736,10 @@ gdk_gl_context_get_use_es (GdkGLContext *context)
|
||||
|
||||
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
|
||||
|
||||
return priv->use_es;
|
||||
if (!priv->realized)
|
||||
return FALSE;
|
||||
|
||||
return priv->use_es > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -769,9 +783,11 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
if (priv->extensions_checked)
|
||||
return;
|
||||
|
||||
priv->use_es = !epoxy_is_desktop_gl ();
|
||||
priv->gl_version = epoxy_gl_version ();
|
||||
|
||||
if (priv->use_es < 0)
|
||||
priv->use_es = !epoxy_is_desktop_gl ();
|
||||
|
||||
if (priv->use_es)
|
||||
{
|
||||
has_npot = priv->gl_version >= 20;
|
||||
@@ -796,6 +812,10 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
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_unpack_subimage = TRUE;
|
||||
|
||||
/* We asked for a core profile, but we didn't get one, so we're in legacy mode */
|
||||
if (priv->gl_version < 32)
|
||||
priv->is_legacy = TRUE;
|
||||
}
|
||||
|
||||
if (!priv->use_es && G_UNLIKELY (_gdk_gl_flags & GDK_GL_TEXTURE_RECTANGLE))
|
||||
@@ -808,7 +828,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
g_warning ("GL implementation doesn't support any form of non-power-of-two textures");
|
||||
|
||||
GDK_NOTE (OPENGL,
|
||||
g_message ("%s version: %d.%d\n"
|
||||
g_message ("%s version: %d.%d (%s)\n"
|
||||
"* GLSL version: %s\n"
|
||||
"* Extensions checked:\n"
|
||||
" - GL_ARB_texture_non_power_of_two: %s\n"
|
||||
" - GL_ARB_texture_rectangle: %s\n"
|
||||
@@ -817,6 +838,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
"* Using texture rectangle: %s",
|
||||
priv->use_es ? "OpenGL ES" : "OpenGL",
|
||||
priv->gl_version / 10, priv->gl_version % 10,
|
||||
priv->is_legacy ? "legacy" : "core",
|
||||
glGetString (GL_SHADING_LANGUAGE_VERSION),
|
||||
has_npot ? "yes" : "no",
|
||||
has_texture_rectangle ? "yes" : "no",
|
||||
priv->has_gl_framebuffer_blit ? "yes" : "no",
|
||||
|
@@ -75,7 +75,7 @@ GDK_AVAILABLE_IN_3_16
|
||||
gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context);
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
void gdk_gl_context_set_use_es (GdkGLContext *context,
|
||||
gboolean use_es);
|
||||
int use_es);
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
gboolean gdk_gl_context_get_use_es (GdkGLContext *context);
|
||||
|
||||
|
@@ -104,14 +104,14 @@ GDK_DEPRECATED_IN_3_0_FOR(gdk_display_device_is_grabbed)
|
||||
gboolean gdk_pointer_is_grabbed (void);
|
||||
#endif /* GDK_MULTIDEVICE_SAFE */
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_width (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_height (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_width_mm (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_height_mm (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@@ -150,7 +150,7 @@ parse_rgb_value (const gchar *str,
|
||||
*
|
||||
* Where “r”, “g”, “b” and “a” are respectively the red, green, blue and
|
||||
* alpha color values. In the last two cases, r g and b are either integers
|
||||
* in the range 0 to 255 or precentage values in the range 0% to 100%, and
|
||||
* in the range 0 to 255 or percentage values in the range 0% to 100%, and
|
||||
* a is a floating point value in the range 0 to 1.
|
||||
*
|
||||
* Returns: %TRUE if the parsing succeeded
|
||||
|
@@ -222,6 +222,8 @@ get_monitor_num (GdkMonitor *monitor)
|
||||
* a monitor close to (@x,@y) if the point is not in any monitor.
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_display_get_monitor_at_point() instead
|
||||
**/
|
||||
gint
|
||||
gdk_screen_get_monitor_at_point (GdkScreen *screen,
|
||||
@@ -251,6 +253,8 @@ gdk_screen_get_monitor_at_point (GdkScreen *screen,
|
||||
* close to @window.
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_display_get_monitor_at_window() instead
|
||||
**/
|
||||
gint
|
||||
gdk_screen_get_monitor_at_window (GdkScreen *screen,
|
||||
@@ -275,11 +279,15 @@ gdk_screen_get_monitor_at_window (GdkScreen *screen,
|
||||
* gdk_screen_get_monitor_scale_factor()).
|
||||
*
|
||||
* Returns: the width of the default screen in pixels.
|
||||
*
|
||||
* Deprecated: 3.22: Use per-monitor information
|
||||
**/
|
||||
gint
|
||||
gdk_screen_width (void)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
return gdk_screen_get_width (gdk_screen_get_default ());
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,11 +298,15 @@ gdk_screen_width (void)
|
||||
* gdk_screen_get_monitor_scale_factor()).
|
||||
*
|
||||
* Returns: the height of the default screen in pixels.
|
||||
*
|
||||
* Deprecated: 3.22: Use per-monitor information
|
||||
**/
|
||||
gint
|
||||
gdk_screen_height (void)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
return gdk_screen_get_height (gdk_screen_get_default ());
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,11 +317,15 @@ gdk_screen_height (void)
|
||||
*
|
||||
* Returns: the width of the default screen in millimeters,
|
||||
* though it is not always correct.
|
||||
*
|
||||
* Deprecated: 3.22: Use per-monitor information
|
||||
**/
|
||||
gint
|
||||
gdk_screen_width_mm (void)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
return gdk_screen_get_width_mm (gdk_screen_get_default ());
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -320,11 +336,15 @@ gdk_screen_width_mm (void)
|
||||
*
|
||||
* Returns: the height of the default screen in millimeters,
|
||||
* though it is not always correct.
|
||||
*
|
||||
* Deprecated: 3.22: Use per-monitor information
|
||||
**/
|
||||
gint
|
||||
gdk_screen_height_mm (void)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
return gdk_screen_get_height_mm (gdk_screen_get_default ());
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -529,6 +549,8 @@ gdk_screen_get_display (GdkScreen *screen)
|
||||
* Returns: the width of @screen in pixels.
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22: Use per-monitor information instead
|
||||
**/
|
||||
gint
|
||||
gdk_screen_get_width (GdkScreen *screen)
|
||||
@@ -549,6 +571,8 @@ gdk_screen_get_width (GdkScreen *screen)
|
||||
* Returns: the height of @screen in pixels.
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22: Use per-monitor information instead
|
||||
**/
|
||||
gint
|
||||
gdk_screen_get_height (GdkScreen *screen)
|
||||
@@ -571,6 +595,8 @@ gdk_screen_get_height (GdkScreen *screen)
|
||||
* Returns: the width of @screen in millimeters.
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22: Use per-monitor information instead
|
||||
**/
|
||||
gint
|
||||
gdk_screen_get_width_mm (GdkScreen *screen)
|
||||
@@ -592,6 +618,8 @@ gdk_screen_get_width_mm (GdkScreen *screen)
|
||||
*
|
||||
* Returns: the heigth of @screen in millimeters.
|
||||
*
|
||||
* Deprecated: 3.22: Use per-monitor information instead
|
||||
*
|
||||
* Since: 2.2
|
||||
**/
|
||||
gint
|
||||
@@ -612,6 +640,8 @@ gdk_screen_get_height_mm (GdkScreen *screen)
|
||||
* Returns: the index
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22
|
||||
**/
|
||||
gint
|
||||
gdk_screen_get_number (GdkScreen *screen)
|
||||
@@ -658,6 +688,8 @@ get_monitor (GdkScreen *screen,
|
||||
* Returns: number of monitors which @screen consists of
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_display_get_n_monitors() instead
|
||||
*/
|
||||
gint
|
||||
gdk_screen_get_n_monitors (GdkScreen *screen)
|
||||
@@ -686,6 +718,8 @@ gdk_screen_get_n_monitors (GdkScreen *screen)
|
||||
* Returns: An integer index for the primary monitor, or 0 if none is configured.
|
||||
*
|
||||
* Since: 2.20
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_display_get_primary_monitor() instead
|
||||
*/
|
||||
gint
|
||||
gdk_screen_get_primary_monitor (GdkScreen *screen)
|
||||
@@ -713,6 +747,8 @@ gdk_screen_get_primary_monitor (GdkScreen *screen)
|
||||
* Returns: the width of the monitor, or -1 if not available
|
||||
*
|
||||
* Since: 2.14
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_monitor_get_width_mm() instead
|
||||
*/
|
||||
gint
|
||||
gdk_screen_get_monitor_width_mm (GdkScreen *screen,
|
||||
@@ -739,6 +775,8 @@ gdk_screen_get_monitor_width_mm (GdkScreen *screen,
|
||||
* Returns: the height of the monitor, or -1 if not available
|
||||
*
|
||||
* Since: 2.14
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_monitor_get_height_mm() instead
|
||||
*/
|
||||
gint
|
||||
gdk_screen_get_monitor_height_mm (GdkScreen *screen,
|
||||
@@ -768,6 +806,8 @@ gdk_screen_get_monitor_height_mm (GdkScreen *screen,
|
||||
* of the monitor, or %NULL if the name cannot be determined
|
||||
*
|
||||
* Since: 2.14
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_monitor_get_model() instead
|
||||
*/
|
||||
gchar *
|
||||
gdk_screen_get_monitor_plug_name (GdkScreen *screen,
|
||||
@@ -803,6 +843,8 @@ gdk_screen_get_monitor_plug_name (GdkScreen *screen,
|
||||
* gdk_screen_get_width() and gdk_screen_get_height().
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_monitor_get_geometry() instead
|
||||
*/
|
||||
void
|
||||
gdk_screen_get_monitor_geometry (GdkScreen *screen,
|
||||
@@ -844,6 +886,8 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
|
||||
* @screen, use gdk_screen_get_n_monitors().
|
||||
*
|
||||
* Since: 3.4
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_monitor_get_workarea() instead
|
||||
*/
|
||||
void
|
||||
gdk_screen_get_monitor_workarea (GdkScreen *screen,
|
||||
@@ -972,6 +1016,8 @@ gdk_screen_is_composited (GdkScreen *screen)
|
||||
* Returns: a newly allocated string, free with g_free()
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 3.22
|
||||
**/
|
||||
gchar *
|
||||
gdk_screen_make_display_name (GdkScreen *screen)
|
||||
@@ -1004,6 +1050,8 @@ gdk_screen_make_display_name (GdkScreen *screen)
|
||||
* or %NULL.
|
||||
*
|
||||
* Since: 2.10
|
||||
*
|
||||
* Deprecated: 3.22
|
||||
**/
|
||||
GdkWindow *
|
||||
gdk_screen_get_active_window (GdkScreen *screen)
|
||||
@@ -1088,8 +1136,11 @@ gdk_screen_get_setting (GdkScreen *screen,
|
||||
* particular monitor, but most of the time you’re drawing to a window
|
||||
* where it is better to use gdk_window_get_scale_factor() instead.
|
||||
*
|
||||
* Since: 3.10
|
||||
* Returns: the scale factor
|
||||
*
|
||||
* Since: 3.10
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_monitor_get_scale_factor() instead
|
||||
*/
|
||||
gint
|
||||
gdk_screen_get_monitor_scale_factor (GdkScreen *screen,
|
||||
@@ -1099,7 +1150,9 @@ gdk_screen_get_monitor_scale_factor (GdkScreen *screen,
|
||||
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), 1);
|
||||
g_return_val_if_fail (monitor_num >= 0, 1);
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
g_return_val_if_fail (monitor_num < gdk_screen_get_n_monitors (screen), 1);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
monitor = get_monitor (screen, monitor_num);
|
||||
|
||||
|
@@ -52,54 +52,54 @@ GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_screen_get_root_window (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDisplay * gdk_screen_get_display (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_get_number (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_get_width (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_get_height (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_get_width_mm (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_screen_get_height_mm (GdkScreen *screen);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GList * gdk_screen_list_visuals (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GList * gdk_screen_get_toplevel_windows (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gchar * gdk_screen_make_display_name (GdkScreen *screen);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_get_n_monitors)
|
||||
gint gdk_screen_get_n_monitors (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_get_primary_monitor)
|
||||
gint gdk_screen_get_primary_monitor (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_geometry)
|
||||
void gdk_screen_get_monitor_geometry (GdkScreen *screen,
|
||||
gint monitor_num,
|
||||
GdkRectangle *dest);
|
||||
GDK_AVAILABLE_IN_3_4
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_workarea)
|
||||
void gdk_screen_get_monitor_workarea (GdkScreen *screen,
|
||||
gint monitor_num,
|
||||
GdkRectangle *dest);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_get_monitor_at_point)
|
||||
gint gdk_screen_get_monitor_at_point (GdkScreen *screen,
|
||||
gint x,
|
||||
gint y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_get_monitor_at_window)
|
||||
gint gdk_screen_get_monitor_at_window (GdkScreen *screen,
|
||||
GdkWindow *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_width_mm)
|
||||
gint gdk_screen_get_monitor_width_mm (GdkScreen *screen,
|
||||
gint monitor_num);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_height_mm)
|
||||
gint gdk_screen_get_monitor_height_mm (GdkScreen *screen,
|
||||
gint monitor_num);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_model)
|
||||
gchar * gdk_screen_get_monitor_plug_name (GdkScreen *screen,
|
||||
gint monitor_num);
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_scale_factor)
|
||||
gint gdk_screen_get_monitor_scale_factor (GdkScreen *screen,
|
||||
gint monitor_num);
|
||||
|
||||
@@ -123,7 +123,7 @@ void gdk_screen_set_resolution (GdkScreen *screen,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gdouble gdk_screen_get_resolution (GdkScreen *screen);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
GdkWindow *gdk_screen_get_active_window (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GList *gdk_screen_get_window_stack (GdkScreen *screen);
|
||||
|
@@ -172,16 +172,6 @@
|
||||
*/
|
||||
#define GDK_VERSION_3_22 (G_ENCODE_VERSION (3, 22))
|
||||
|
||||
/**
|
||||
* GDK_VERSION_3_90:
|
||||
*
|
||||
* A macro that evaluates to the 3.90 version of GDK, in a format
|
||||
* that can be used by the C pre-processor.
|
||||
*
|
||||
* Since: 3.90
|
||||
*/
|
||||
#define GDK_VERSION_3_90 (G_ENCODE_VERSION (3, 90))
|
||||
|
||||
/* evaluates to the current stable version; for development cycles,
|
||||
* this means the next stable target
|
||||
*/
|
||||
@@ -422,11 +412,5 @@
|
||||
# define GDK_AVAILABLE_IN_3_22 _GDK_EXTERN
|
||||
#endif
|
||||
|
||||
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_90
|
||||
# define GDK_AVAILABLE_IN_3_90 GDK_UNAVAILABLE(3, 90)
|
||||
#else
|
||||
# define GDK_AVAILABLE_IN_3_90 _GDK_EXTERN
|
||||
#endif
|
||||
|
||||
#endif /* __GDK_VERSION_MACROS_H__ */
|
||||
|
||||
|
@@ -88,6 +88,8 @@ gdk_visual_class_init (GdkVisualClass *visual_class)
|
||||
*
|
||||
* Returns: (transfer container) (element-type GdkVisual):
|
||||
* a list of visuals; the list must be freed, but not its contents
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_screen_list_visuals (gdk_screen_get_default ()).
|
||||
*/
|
||||
GList*
|
||||
gdk_list_visuals (void)
|
||||
@@ -103,6 +105,8 @@ gdk_list_visuals (void)
|
||||
* The return value should not be freed.
|
||||
*
|
||||
* Returns: (transfer none): system visual
|
||||
*
|
||||
* Deprecated: 3.22: Use gdk_screen_get_system_visual (gdk_screen_get_default ()).
|
||||
*/
|
||||
GdkVisual*
|
||||
gdk_visual_get_system (void)
|
||||
@@ -118,6 +122,9 @@ gdk_visual_get_system (void)
|
||||
* per pixel.
|
||||
*
|
||||
* Returns: best available depth
|
||||
*
|
||||
* Deprecated: 3.22: Visual selection should be done using
|
||||
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
|
||||
*/
|
||||
gint
|
||||
gdk_visual_get_best_depth (void)
|
||||
@@ -133,6 +140,9 @@ gdk_visual_get_best_depth (void)
|
||||
* Return the best available visual type for the default GDK screen.
|
||||
*
|
||||
* Returns: best visual type
|
||||
*
|
||||
* Deprecated: 3.22: Visual selection should be done using
|
||||
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
|
||||
*/
|
||||
GdkVisualType
|
||||
gdk_visual_get_best_type (void)
|
||||
@@ -149,6 +159,9 @@ gdk_visual_get_best_type (void)
|
||||
* GDK screen. The return value should not be freed.
|
||||
*
|
||||
* Returns: (transfer none): best visual
|
||||
*
|
||||
* Deprecated: 3.22: Visual selection should be done using
|
||||
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
|
||||
*/
|
||||
GdkVisual*
|
||||
gdk_visual_get_best (void)
|
||||
@@ -168,6 +181,9 @@ gdk_visual_get_best (void)
|
||||
* not be freed. %NULL may be returned if no visual supports @depth.
|
||||
*
|
||||
* Returns: (transfer none): best visual for the given depth
|
||||
*
|
||||
* Deprecated: 3.22: Visual selection should be done using
|
||||
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
|
||||
*/
|
||||
GdkVisual*
|
||||
gdk_visual_get_best_with_depth (gint depth)
|
||||
@@ -187,6 +203,9 @@ gdk_visual_get_best_with_depth (gint depth)
|
||||
* @visual_type.
|
||||
*
|
||||
* Returns: (transfer none): best visual of the given type
|
||||
*
|
||||
* Deprecated: 3.22: Visual selection should be done using
|
||||
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
|
||||
*/
|
||||
GdkVisual*
|
||||
gdk_visual_get_best_with_type (GdkVisualType visual_type)
|
||||
@@ -207,6 +226,9 @@ gdk_visual_get_best_with_type (GdkVisualType visual_type)
|
||||
*
|
||||
* Returns: (nullable) (transfer none): best visual with both @depth
|
||||
* and @visual_type, or %NULL if none
|
||||
*
|
||||
* Deprecated: 3.22: Visual selection should be done using
|
||||
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
|
||||
*/
|
||||
GdkVisual*
|
||||
gdk_visual_get_best_with_both (gint depth,
|
||||
@@ -229,6 +251,9 @@ gdk_visual_get_best_with_both (gint depth,
|
||||
* visual, removing duplicates.
|
||||
*
|
||||
* The array returned by this function should not be freed.
|
||||
*
|
||||
* Deprecated: 3.22: Visual selection should be done using
|
||||
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
|
||||
*/
|
||||
void
|
||||
gdk_query_depths (gint **depths,
|
||||
@@ -251,6 +276,9 @@ gdk_query_depths (gint **depths,
|
||||
* visual, removing duplicates.
|
||||
*
|
||||
* The array returned by this function should not be freed.
|
||||
*
|
||||
* Deprecated: 3.22: Visual selection should be done using
|
||||
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
|
||||
*/
|
||||
void
|
||||
gdk_query_visual_types (GdkVisualType **visual_types,
|
||||
|
@@ -82,30 +82,30 @@ typedef enum
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_visual_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
gint gdk_visual_get_best_depth (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
GdkVisualType gdk_visual_get_best_type (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_screen_get_system_visual)
|
||||
GdkVisual* gdk_visual_get_system (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
GdkVisual* gdk_visual_get_best (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
GdkVisual* gdk_visual_get_best_with_depth (gint depth);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
GdkVisual* gdk_visual_get_best_with_both (gint depth,
|
||||
GdkVisualType visual_type);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
void gdk_query_depths (gint **depths,
|
||||
gint *count);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
void gdk_query_visual_types (GdkVisualType **visual_types,
|
||||
gint *count);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_screen_list_visuals)
|
||||
GList* gdk_list_visuals (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@@ -637,6 +637,12 @@ gdk_window_is_offscreen (GdkWindow *window)
|
||||
return window->window_type == GDK_WINDOW_OFFSCREEN;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_window_is_subsurface (GdkWindow *window)
|
||||
{
|
||||
return window->window_type == GDK_WINDOW_SUBSURFACE;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gdk_window_get_impl_window (GdkWindow *window)
|
||||
{
|
||||
@@ -973,9 +979,12 @@ recompute_visible_regions_internal (GdkWindow *private,
|
||||
old_abs_y = private->abs_y;
|
||||
|
||||
/* Update absolute position */
|
||||
if (gdk_window_has_impl (private))
|
||||
if ((gdk_window_has_impl (private) &&
|
||||
private->window_type != GDK_WINDOW_SUBSURFACE) ||
|
||||
(gdk_window_is_toplevel (private) &&
|
||||
private->window_type == GDK_WINDOW_SUBSURFACE))
|
||||
{
|
||||
/* Native window starts here */
|
||||
/* Native windows and toplevel subsurfaces start here */
|
||||
private->abs_x = 0;
|
||||
private->abs_y = 0;
|
||||
}
|
||||
@@ -1461,6 +1470,11 @@ gdk_window_new (GdkWindow *parent,
|
||||
if (window->parent->window_type == GDK_WINDOW_ROOT)
|
||||
native = TRUE; /* Always use native windows for toplevels */
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (window->window_type == GDK_WINDOW_SUBSURFACE)
|
||||
native = TRUE; /* Always use native windows for subsurfaces as well */
|
||||
#endif
|
||||
|
||||
if (gdk_window_is_offscreen (window))
|
||||
{
|
||||
_gdk_offscreen_window_new (window, attributes, attributes_mask);
|
||||
@@ -2022,6 +2036,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
|
||||
case GDK_WINDOW_TEMP:
|
||||
case GDK_WINDOW_FOREIGN:
|
||||
case GDK_WINDOW_OFFSCREEN:
|
||||
case GDK_WINDOW_SUBSURFACE:
|
||||
if (window->window_type == GDK_WINDOW_FOREIGN && !foreign_destroy)
|
||||
{
|
||||
/* Logically, it probably makes more sense to send
|
||||
@@ -2420,6 +2435,8 @@ gdk_window_get_effective_parent (GdkWindow *window)
|
||||
|
||||
if (gdk_window_is_offscreen (window))
|
||||
return gdk_offscreen_window_get_embedder (window);
|
||||
else if (gdk_window_is_subsurface (window))
|
||||
return window->transient_for;
|
||||
else
|
||||
return window->parent;
|
||||
}
|
||||
@@ -2446,7 +2463,8 @@ gdk_window_get_toplevel (GdkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
|
||||
|
||||
while (window->window_type == GDK_WINDOW_CHILD)
|
||||
while (window->window_type == GDK_WINDOW_CHILD ||
|
||||
window->window_type == GDK_WINDOW_SUBSURFACE)
|
||||
{
|
||||
if (gdk_window_is_toplevel (window))
|
||||
break;
|
||||
@@ -3491,7 +3509,9 @@ gdk_window_clear_backing_region (GdkWindow *window)
|
||||
|
||||
for (bg_window = window; bg_window; bg_window = bg_window->parent)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
pattern = gdk_window_get_background_pattern (bg_window);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (pattern)
|
||||
break;
|
||||
|
||||
@@ -4004,12 +4024,10 @@ static void
|
||||
before_process_all_updates (void)
|
||||
{
|
||||
GSList *displays, *l;
|
||||
GdkDisplayClass *display_class;
|
||||
|
||||
displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
|
||||
display_class = GDK_DISPLAY_GET_CLASS (displays->data);
|
||||
for (l = displays; l; l = l->next)
|
||||
display_class->before_process_all_updates (l->data);
|
||||
GDK_DISPLAY_GET_CLASS (l->data)->before_process_all_updates (l->data);
|
||||
|
||||
g_slist_free (displays);
|
||||
}
|
||||
@@ -4018,12 +4036,10 @@ static void
|
||||
after_process_all_updates (void)
|
||||
{
|
||||
GSList *displays, *l;
|
||||
GdkDisplayClass *display_class;
|
||||
|
||||
displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
|
||||
display_class = GDK_DISPLAY_GET_CLASS (displays->data);
|
||||
for (l = displays; l; l = l->next)
|
||||
display_class->after_process_all_updates (l->data);
|
||||
GDK_DISPLAY_GET_CLASS (l->data)->after_process_all_updates (l->data);
|
||||
|
||||
g_slist_free (displays);
|
||||
}
|
||||
@@ -4044,6 +4060,7 @@ after_process_all_updates (void)
|
||||
* Calls gdk_window_process_updates() for all windows (see #GdkWindow)
|
||||
* in the application.
|
||||
*
|
||||
* Deprecated: 3.22
|
||||
**/
|
||||
void
|
||||
gdk_window_process_all_updates (void)
|
||||
@@ -4191,6 +4208,7 @@ gdk_window_process_updates_with_mode (GdkWindow *window,
|
||||
* case, where GDK delivers them in an idle handler). Occasionally
|
||||
* this is useful to produce nicer scrolling behavior, for example.
|
||||
*
|
||||
* Deprecated: 3.22
|
||||
**/
|
||||
void
|
||||
gdk_window_process_updates (GdkWindow *window,
|
||||
@@ -4792,7 +4810,8 @@ gdk_window_thaw_toplevel_updates (GdkWindow *window)
|
||||
* yourself, though you might want to use this function to enable
|
||||
* updates sometime after application startup time.
|
||||
*
|
||||
**/
|
||||
* Deprecated: 3.22
|
||||
*/
|
||||
void
|
||||
gdk_window_set_debug_updates (gboolean setting)
|
||||
{
|
||||
@@ -6341,9 +6360,7 @@ gdk_window_move_region (GdkWindow *window,
|
||||
* gtk_style_context_set_background() — if you're implementing a
|
||||
* custom widget.
|
||||
*
|
||||
* See also gdk_window_set_background_pattern().
|
||||
*
|
||||
* Deprecated: 3.4: Use gdk_window_set_background_rgba() instead.
|
||||
* Deprecated: 3.4: Don't use this function
|
||||
*/
|
||||
void
|
||||
gdk_window_set_background (GdkWindow *window,
|
||||
@@ -6357,7 +6374,9 @@ gdk_window_set_background (GdkWindow *window,
|
||||
color->green / 65535.,
|
||||
color->blue / 65535.);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gdk_window_set_background_pattern (window, pattern);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
cairo_pattern_destroy (pattern);
|
||||
}
|
||||
@@ -6370,6 +6389,8 @@ gdk_window_set_background (GdkWindow *window,
|
||||
* Sets the background color of @window.
|
||||
*
|
||||
* See also gdk_window_set_background_pattern().
|
||||
*
|
||||
* Deprecated: 3.22: Don't use this function
|
||||
**/
|
||||
void
|
||||
gdk_window_set_background_rgba (GdkWindow *window,
|
||||
@@ -6398,7 +6419,9 @@ gdk_window_set_background_rgba (GdkWindow *window,
|
||||
pattern = cairo_pattern_create_rgba (rgba->red, rgba->green,
|
||||
rgba->blue, rgba->alpha);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gdk_window_set_background_pattern (window, pattern);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
cairo_pattern_destroy (pattern);
|
||||
}
|
||||
@@ -6416,6 +6439,8 @@ gdk_window_set_background_rgba (GdkWindow *window,
|
||||
*
|
||||
* The windowing system will normally fill a window with its background
|
||||
* when the window is obscured then exposed.
|
||||
*
|
||||
* Deprecated: 3.22: Don't use this function
|
||||
*/
|
||||
void
|
||||
gdk_window_set_background_pattern (GdkWindow *window,
|
||||
@@ -6453,6 +6478,8 @@ gdk_window_set_background_pattern (GdkWindow *window,
|
||||
* background or %NULL to use the parent’s background.
|
||||
*
|
||||
* Since: 2.22
|
||||
*
|
||||
* Deprecated: 3.22: Don't use this function
|
||||
**/
|
||||
cairo_pattern_t *
|
||||
gdk_window_get_background_pattern (GdkWindow *window)
|
||||
@@ -6556,8 +6583,18 @@ gdk_window_set_cursor (GdkWindow *window,
|
||||
|
||||
for (s = seats; s; s = s->next)
|
||||
{
|
||||
GList *devices, *d;
|
||||
|
||||
device = gdk_seat_get_pointer (s->data);
|
||||
gdk_window_set_cursor_internal (window, device, window->cursor);
|
||||
|
||||
devices = gdk_seat_get_slaves (s->data, GDK_SEAT_CAPABILITY_TABLET_STYLUS);
|
||||
for (d = devices; d; d = d->next)
|
||||
{
|
||||
device = gdk_device_get_associated_device (d->data);
|
||||
gdk_window_set_cursor_internal (window, device, window->cursor);
|
||||
}
|
||||
g_list_free (devices);
|
||||
}
|
||||
|
||||
g_list_free (seats);
|
||||
@@ -10166,6 +10203,10 @@ gdk_window_create_similar_surface (GdkWindow * window,
|
||||
* scale);
|
||||
* ]|
|
||||
*
|
||||
* Note that unlike cairo_surface_create_similar_image(), the new
|
||||
* surface's device scale is set to @scale, or to the scale factor of
|
||||
* @window if @scale is 0.
|
||||
*
|
||||
* Returns: a pointer to the newly allocated surface. The caller
|
||||
* owns the surface and should call cairo_surface_destroy() when done
|
||||
* with it.
|
||||
@@ -10832,10 +10873,10 @@ void
|
||||
gdk_window_fullscreen_on_monitor (GdkWindow *window,
|
||||
gint monitor)
|
||||
{
|
||||
GdkScreen *screen = gdk_window_get_screen (window);
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
|
||||
g_return_if_fail (monitor >= 0);
|
||||
g_return_if_fail (monitor < gdk_screen_get_n_monitors (screen));
|
||||
g_return_if_fail (monitor < gdk_display_get_n_monitors (display));
|
||||
|
||||
if (GDK_WINDOW_IMPL_GET_CLASS (window->impl)->fullscreen_on_monitor != NULL)
|
||||
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->fullscreen_on_monitor (window, monitor);
|
||||
|
@@ -771,16 +771,16 @@ void gdk_window_set_startup_id (GdkWindow *window,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_transient_for (GdkWindow *window,
|
||||
GdkWindow *parent);
|
||||
GDK_DEPRECATED_IN_3_4_FOR(gdk_window_set_background_rgba)
|
||||
GDK_DEPRECATED_IN_3_4
|
||||
void gdk_window_set_background (GdkWindow *window,
|
||||
const GdkColor *color);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
void gdk_window_set_background_rgba (GdkWindow *window,
|
||||
const GdkRGBA *rgba);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
void gdk_window_set_background_pattern (GdkWindow *window,
|
||||
cairo_pattern_t *pattern);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@@ -1054,14 +1054,14 @@ void gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window);
|
||||
GDK_DEPRECATED_IN_3_16
|
||||
void gdk_window_thaw_toplevel_updates_libgtk_only (GdkWindow *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
void gdk_window_process_all_updates (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
void gdk_window_process_updates (GdkWindow *window,
|
||||
gboolean update_children);
|
||||
|
||||
/* Enable/disable flicker, so you can tell if your code is inefficient. */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
void gdk_window_set_debug_updates (gboolean setting);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "gdkmir-private.h"
|
||||
|
||||
#include <mir_toolkit/events/window_placement.h>
|
||||
|
||||
static void
|
||||
_gdk_mir_print_modifiers (unsigned int modifiers)
|
||||
{
|
||||
@@ -127,6 +129,7 @@ _gdk_mir_print_touch_event (const MirInputEvent *event)
|
||||
}
|
||||
switch (mir_touch_event_tooltype (touch_event, i))
|
||||
{
|
||||
default:
|
||||
case mir_touch_tooltype_unknown:
|
||||
g_printerr (" ? ");
|
||||
break;
|
||||
@@ -200,30 +203,45 @@ _gdk_mir_print_motion_event (const MirInputEvent *event)
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_surface_event (const MirSurfaceEvent *event)
|
||||
_gdk_mir_print_input_event (const MirInputEvent *event)
|
||||
{
|
||||
g_printerr ("SURFACE\n");
|
||||
g_printerr ("INPUT\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_window_event (const MirWindowEvent *event)
|
||||
{
|
||||
g_printerr ("WINDOW\n");
|
||||
g_printerr (" Attribute ");
|
||||
switch (mir_surface_event_get_attribute (event))
|
||||
switch (mir_window_event_get_attribute (event))
|
||||
{
|
||||
case mir_surface_attrib_type:
|
||||
case mir_window_attrib_type:
|
||||
g_printerr ("type");
|
||||
break;
|
||||
case mir_surface_attrib_state:
|
||||
case mir_window_attrib_state:
|
||||
g_printerr ("state");
|
||||
break;
|
||||
case mir_surface_attrib_swapinterval:
|
||||
case mir_window_attrib_swapinterval:
|
||||
g_printerr ("swapinterval");
|
||||
break;
|
||||
case mir_surface_attrib_focus:
|
||||
case mir_window_attrib_focus:
|
||||
g_printerr ("focus");
|
||||
break;
|
||||
case mir_window_attrib_dpi:
|
||||
g_printerr ("dpi");
|
||||
break;
|
||||
case mir_window_attrib_visibility:
|
||||
g_printerr ("visibility");
|
||||
break;
|
||||
case mir_window_attrib_preferred_orientation:
|
||||
g_printerr ("preferred_orientation");
|
||||
break;
|
||||
default:
|
||||
g_printerr ("%u", mir_surface_event_get_attribute (event));
|
||||
g_printerr ("%u", mir_window_event_get_attribute (event));
|
||||
break;
|
||||
}
|
||||
g_printerr ("\n");
|
||||
g_printerr (" Value %i\n", mir_surface_event_get_attribute_value (event));
|
||||
g_printerr (" Value %i\n", mir_window_event_get_attribute_value (event));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -233,12 +251,237 @@ _gdk_mir_print_resize_event (const MirResizeEvent *event)
|
||||
g_printerr (" Size (%i, %i)\n", mir_resize_event_get_width (event), mir_resize_event_get_height (event));
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_prompt_session_state_change_event (const MirPromptSessionEvent *event)
|
||||
{
|
||||
g_printerr ("PROMPT_SESSION_STATE_CHANGE\n");
|
||||
g_printerr (" State ");
|
||||
|
||||
switch (mir_prompt_session_event_get_state (event))
|
||||
{
|
||||
case mir_prompt_session_state_stopped:
|
||||
g_printerr ("stopped");
|
||||
break;
|
||||
case mir_prompt_session_state_started:
|
||||
g_printerr ("started");
|
||||
break;
|
||||
case mir_prompt_session_state_suspended:
|
||||
g_printerr ("suspended");
|
||||
break;
|
||||
default:
|
||||
g_printerr ("%u", mir_prompt_session_event_get_state (event));
|
||||
break;
|
||||
}
|
||||
|
||||
g_printerr ("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_orientation_event (const MirOrientationEvent *event)
|
||||
{
|
||||
g_printerr ("ORIENTATION\n");
|
||||
g_printerr (" Direction ");
|
||||
|
||||
switch (mir_orientation_event_get_direction (event))
|
||||
{
|
||||
case mir_orientation_normal:
|
||||
g_printerr ("normal");
|
||||
break;
|
||||
case mir_orientation_left:
|
||||
g_printerr ("left");
|
||||
break;
|
||||
case mir_orientation_inverted:
|
||||
g_printerr ("inverted");
|
||||
break;
|
||||
case mir_orientation_right:
|
||||
g_printerr ("right");
|
||||
break;
|
||||
default:
|
||||
g_printerr ("%u", mir_orientation_event_get_direction (event));
|
||||
break;
|
||||
}
|
||||
|
||||
g_printerr ("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_close_event (void)
|
||||
{
|
||||
g_printerr ("CLOSED\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_keymap_event (const MirKeymapEvent *event)
|
||||
{
|
||||
g_printerr ("KEYMAP\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_window_output_event (const MirWindowOutputEvent *event)
|
||||
{
|
||||
g_printerr ("WINDOW_OUTPUT\n");
|
||||
g_printerr (" DPI %d\n", mir_window_output_event_get_dpi (event));
|
||||
g_printerr (" Form Factor ");
|
||||
|
||||
switch (mir_window_output_event_get_form_factor (event))
|
||||
{
|
||||
case mir_form_factor_unknown:
|
||||
g_printerr ("unknown");
|
||||
break;
|
||||
case mir_form_factor_phone:
|
||||
g_printerr ("phone");
|
||||
break;
|
||||
case mir_form_factor_tablet:
|
||||
g_printerr ("tablet");
|
||||
break;
|
||||
case mir_form_factor_monitor:
|
||||
g_printerr ("monitor");
|
||||
break;
|
||||
case mir_form_factor_tv:
|
||||
g_printerr ("tv");
|
||||
break;
|
||||
case mir_form_factor_projector:
|
||||
g_printerr ("projector");
|
||||
break;
|
||||
default:
|
||||
g_printerr ("%u", mir_window_output_event_get_form_factor (event));
|
||||
break;
|
||||
}
|
||||
|
||||
g_printerr ("\n");
|
||||
g_printerr (" Scale %f\n", mir_window_output_event_get_scale (event));
|
||||
g_printerr (" Refresh Rate %lf\n", mir_window_output_event_get_refresh_rate (event));
|
||||
g_printerr (" Output ID %u\n", mir_window_output_event_get_output_id (event));
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_input_device_state_event (const MirInputDeviceStateEvent *event)
|
||||
{
|
||||
MirPointerButtons buttons;
|
||||
MirInputEventModifiers modifiers;
|
||||
gint i;
|
||||
gint j;
|
||||
|
||||
g_printerr ("INPUT_DEVICE_STATE\n");
|
||||
g_printerr (" Pointer Buttons\n");
|
||||
buttons = mir_input_device_state_event_pointer_buttons (event);
|
||||
|
||||
if (buttons == 0)
|
||||
g_printerr (" none\n");
|
||||
else
|
||||
{
|
||||
if (buttons & mir_pointer_button_primary)
|
||||
g_printerr (" primary\n");
|
||||
if (buttons & mir_pointer_button_secondary)
|
||||
g_printerr (" secondary\n");
|
||||
if (buttons & mir_pointer_button_tertiary)
|
||||
g_printerr (" tertiary\n");
|
||||
if (buttons & mir_pointer_button_back)
|
||||
g_printerr (" back\n");
|
||||
if (buttons & mir_pointer_button_forward)
|
||||
g_printerr (" forward\n");
|
||||
if (buttons & mir_pointer_button_side)
|
||||
g_printerr (" side\n");
|
||||
if (buttons & mir_pointer_button_extra)
|
||||
g_printerr (" extra\n");
|
||||
if (buttons & mir_pointer_button_task)
|
||||
g_printerr (" task\n");
|
||||
}
|
||||
|
||||
g_printerr (" Pointer Axis\n");
|
||||
g_printerr (" X %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_x));
|
||||
g_printerr (" Y %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_y));
|
||||
g_printerr (" V Scroll %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_vscroll));
|
||||
g_printerr (" H Scroll %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_hscroll));
|
||||
g_printerr (" Relative X %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_relative_x));
|
||||
g_printerr (" Relative Y %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_relative_y));
|
||||
g_printerr (" Time %ld\n", mir_input_device_state_event_time (event));
|
||||
g_printerr (" Event Modifiers\n");
|
||||
modifiers = mir_input_device_state_event_modifiers (event);
|
||||
|
||||
if (modifiers & mir_input_event_modifier_none)
|
||||
g_printerr (" none\n");
|
||||
if (modifiers & mir_input_event_modifier_alt)
|
||||
g_printerr (" alt\n");
|
||||
if (modifiers & mir_input_event_modifier_alt_left)
|
||||
g_printerr (" alt_left\n");
|
||||
if (modifiers & mir_input_event_modifier_alt_right)
|
||||
g_printerr (" alt_right\n");
|
||||
if (modifiers & mir_input_event_modifier_shift)
|
||||
g_printerr (" shift\n");
|
||||
if (modifiers & mir_input_event_modifier_shift_left)
|
||||
g_printerr (" shift_left\n");
|
||||
if (modifiers & mir_input_event_modifier_shift_right)
|
||||
g_printerr (" shift_right\n");
|
||||
if (modifiers & mir_input_event_modifier_sym)
|
||||
g_printerr (" sym\n");
|
||||
if (modifiers & mir_input_event_modifier_function)
|
||||
g_printerr (" function\n");
|
||||
if (modifiers & mir_input_event_modifier_ctrl)
|
||||
g_printerr (" ctrl\n");
|
||||
if (modifiers & mir_input_event_modifier_ctrl_left)
|
||||
g_printerr (" ctrl_left\n");
|
||||
if (modifiers & mir_input_event_modifier_ctrl_right)
|
||||
g_printerr (" ctrl_right\n");
|
||||
if (modifiers & mir_input_event_modifier_meta)
|
||||
g_printerr (" meta\n");
|
||||
if (modifiers & mir_input_event_modifier_meta_left)
|
||||
g_printerr (" meta_left\n");
|
||||
if (modifiers & mir_input_event_modifier_meta_right)
|
||||
g_printerr (" meta_right\n");
|
||||
if (modifiers & mir_input_event_modifier_caps_lock)
|
||||
g_printerr (" caps_lock\n");
|
||||
if (modifiers & mir_input_event_modifier_num_lock)
|
||||
g_printerr (" num_lock\n");
|
||||
if (modifiers & mir_input_event_modifier_scroll_lock)
|
||||
g_printerr (" scroll_lock\n");
|
||||
|
||||
for (i = 0; i < mir_input_device_state_event_device_count (event); i++)
|
||||
{
|
||||
g_printerr (" Device %ld\n", mir_input_device_state_event_device_id (event, i));
|
||||
|
||||
for (j = 0; j < mir_input_device_state_event_device_pressed_keys_count (event, i); j++)
|
||||
g_printerr (" Pressed %u\n", mir_input_device_state_event_device_pressed_keys_for_index (event, i, j));
|
||||
|
||||
g_printerr (" Pointer Buttons\n");
|
||||
buttons = mir_input_device_state_event_device_pointer_buttons (event, i);
|
||||
|
||||
if (buttons == 0)
|
||||
g_printerr (" none\n");
|
||||
else
|
||||
{
|
||||
if (buttons & mir_pointer_button_primary)
|
||||
g_printerr (" primary\n");
|
||||
if (buttons & mir_pointer_button_secondary)
|
||||
g_printerr (" secondary\n");
|
||||
if (buttons & mir_pointer_button_tertiary)
|
||||
g_printerr (" tertiary\n");
|
||||
if (buttons & mir_pointer_button_back)
|
||||
g_printerr (" back\n");
|
||||
if (buttons & mir_pointer_button_forward)
|
||||
g_printerr (" forward\n");
|
||||
if (buttons & mir_pointer_button_side)
|
||||
g_printerr (" side\n");
|
||||
if (buttons & mir_pointer_button_extra)
|
||||
g_printerr (" extra\n");
|
||||
if (buttons & mir_pointer_button_task)
|
||||
g_printerr (" task\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_mir_print_window_placement_event (const MirWindowPlacementEvent *event)
|
||||
{
|
||||
MirRectangle rect = mir_window_placement_get_relative_position (event);
|
||||
|
||||
g_printerr ("WINDOW_PLACEMENT\n");
|
||||
g_printerr (" X %d\n", rect.left);
|
||||
g_printerr (" Y %d\n", rect.top);
|
||||
g_printerr (" Width %u\n", rect.width);
|
||||
g_printerr (" Height %u\n", rect.height);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_mir_print_event (const MirEvent *event)
|
||||
{
|
||||
@@ -260,6 +503,9 @@ _gdk_mir_print_event (const MirEvent *event)
|
||||
case mir_input_event_type_pointer:
|
||||
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
|
||||
break;
|
||||
default:
|
||||
_gdk_mir_print_input_event (mir_event_get_input_event (event));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case mir_event_type_key:
|
||||
@@ -268,15 +514,33 @@ _gdk_mir_print_event (const MirEvent *event)
|
||||
case mir_event_type_motion:
|
||||
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
|
||||
break;
|
||||
case mir_event_type_surface:
|
||||
_gdk_mir_print_surface_event (mir_event_get_surface_event (event));
|
||||
case mir_event_type_window:
|
||||
_gdk_mir_print_window_event (mir_event_get_window_event (event));
|
||||
break;
|
||||
case mir_event_type_resize:
|
||||
_gdk_mir_print_resize_event (mir_event_get_resize_event (event));
|
||||
break;
|
||||
case mir_event_type_close_surface:
|
||||
case mir_event_type_prompt_session_state_change:
|
||||
_gdk_mir_print_prompt_session_state_change_event (mir_event_get_prompt_session_event (event));
|
||||
break;
|
||||
case mir_event_type_orientation:
|
||||
_gdk_mir_print_orientation_event (mir_event_get_orientation_event (event));
|
||||
break;
|
||||
case mir_event_type_close_window:
|
||||
_gdk_mir_print_close_event ();
|
||||
break;
|
||||
case mir_event_type_keymap:
|
||||
_gdk_mir_print_keymap_event (mir_event_get_keymap_event (event));
|
||||
break;
|
||||
case mir_event_type_window_output:
|
||||
_gdk_mir_print_window_output_event (mir_event_get_window_output_event (event));
|
||||
break;
|
||||
case mir_event_type_input_device_state:
|
||||
_gdk_mir_print_input_device_state_event (mir_event_get_input_device_state_event (event));
|
||||
break;
|
||||
case mir_event_type_window_placement:
|
||||
_gdk_mir_print_window_placement_event (mir_event_get_window_placement_event (event));
|
||||
break;
|
||||
default:
|
||||
g_printerr ("EVENT %u\n", mir_event_get_type (event));
|
||||
break;
|
||||
|
@@ -83,13 +83,17 @@ GdkCursor *_gdk_mir_cursor_new_for_name (GdkDisplay *display, const gchar *name)
|
||||
|
||||
const gchar *_gdk_mir_cursor_get_name (GdkCursor *cursor);
|
||||
|
||||
MirWindow *_gdk_mir_window_get_mir_window (GdkWindow *window);
|
||||
|
||||
GdkWindowImpl *_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window, GdkWindowAttr *attributes, gint attributes_mask);
|
||||
|
||||
void _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState state);
|
||||
void _gdk_mir_window_impl_set_window_state (GdkMirWindowImpl *impl, MirWindowState state);
|
||||
|
||||
void _gdk_mir_window_impl_set_surface_type (GdkMirWindowImpl *impl, MirSurfaceType type);
|
||||
void _gdk_mir_window_impl_set_window_type (GdkMirWindowImpl *impl, MirWindowType type);
|
||||
|
||||
void _gdk_mir_window_set_surface_output (GdkWindow *window, gdouble scale);
|
||||
void _gdk_mir_window_set_scale (GdkWindow *window, gdouble scale);
|
||||
|
||||
void _gdk_mir_window_set_final_rect (GdkWindow *window, MirRectangle rect);
|
||||
|
||||
void _gdk_mir_window_impl_set_cursor_state (GdkMirWindowImpl *impl, gdouble x, gdouble y, gboolean cursor_inside, guint button_state);
|
||||
|
||||
@@ -107,6 +111,15 @@ void _gdk_mir_event_source_queue (GdkMirWindowReference *window_ref, const MirEv
|
||||
|
||||
MirPixelFormat _gdk_mir_display_get_pixel_format (GdkDisplay *display, MirBufferUsage usage);
|
||||
|
||||
void _gdk_mir_display_focus_window (GdkDisplay *display, GdkWindow *window);
|
||||
|
||||
void _gdk_mir_display_unfocus_window (GdkDisplay *display, GdkWindow *window);
|
||||
|
||||
void _gdk_mir_display_create_paste (GdkDisplay *display,
|
||||
const gchar * const *paste_formats,
|
||||
gconstpointer paste_data,
|
||||
gsize paste_size);
|
||||
|
||||
gboolean _gdk_mir_display_init_egl_display (GdkDisplay *display);
|
||||
|
||||
EGLDisplay _gdk_mir_display_get_egl_display (GdkDisplay *display);
|
||||
|
@@ -41,7 +41,7 @@ MirConnection *gdk_mir_display_get_mir_connection (GdkDisplay *display);
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
GType gdk_mir_window_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
MirSurface *gdk_mir_window_get_mir_surface (GdkWindow *window);
|
||||
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
|
@@ -147,7 +147,6 @@ gdk_mir_cursor_get_surface (GdkCursor *cursor,
|
||||
gdouble *x_hot,
|
||||
gdouble *y_hot)
|
||||
{
|
||||
g_printerr ("gdk_mir_cursor_get_surface\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,6 @@ static GList *
|
||||
gdk_mir_device_manager_list_devices (GdkDeviceManager *device_manager,
|
||||
GdkDeviceType type)
|
||||
{
|
||||
//g_printerr ("gdk_mir_device_manager_list_devices (%u)\n", type);
|
||||
GdkMirDeviceManager *dm = GDK_MIR_DEVICE_MANAGER (device_manager);
|
||||
|
||||
if (type == GDK_DEVICE_TYPE_MASTER)
|
||||
@@ -79,7 +78,6 @@ gdk_mir_device_manager_list_devices (GdkDeviceManager *device_manager,
|
||||
static GdkDevice *
|
||||
gdk_mir_device_manager_get_client_pointer (GdkDeviceManager *device_manager)
|
||||
{
|
||||
//g_printerr ("gdk_mir_device_manager_get_client_pointer\n");
|
||||
return GDK_MIR_DEVICE_MANAGER (device_manager)->pointer;
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,10 @@
|
||||
#include "gdkmir.h"
|
||||
#include "gdkmir-private.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <com/ubuntu/content/glib/content-hub-glib.h>
|
||||
|
||||
#define GDK_TYPE_DISPLAY_MIR (gdk_mir_display_get_type ())
|
||||
#define GDK_MIR_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_MIR, GdkMirDisplay))
|
||||
#define GDK_MIR_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_MIR, GdkMirDisplayClass))
|
||||
@@ -47,6 +51,8 @@ typedef struct GdkMirDisplay
|
||||
|
||||
GdkKeymap *keymap;
|
||||
|
||||
GdkWindow *focused_window;
|
||||
|
||||
MirPixelFormat sw_pixel_format;
|
||||
MirPixelFormat hw_pixel_format;
|
||||
|
||||
@@ -55,6 +61,10 @@ typedef struct GdkMirDisplay
|
||||
guint have_egl_buffer_age : 1;
|
||||
guint have_egl_swap_buffers_with_damage : 1;
|
||||
guint have_egl_surfaceless_context : 1;
|
||||
|
||||
ContentHubService *content_service;
|
||||
ContentHubHandler *content_handler;
|
||||
GVariant *paste_data;
|
||||
} GdkMirDisplay;
|
||||
|
||||
typedef struct GdkMirDisplayClass
|
||||
@@ -100,22 +110,27 @@ static void get_pixel_formats (MirConnection *, MirPixelFormat *sw, MirPixelForm
|
||||
|
||||
G_DEFINE_TYPE (GdkMirDisplay, gdk_mir_display, GDK_TYPE_DISPLAY)
|
||||
|
||||
static void
|
||||
pasteboard_changed_cb (GdkMirDisplay *display,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_clear_pointer (&display->paste_data, g_variant_unref);
|
||||
}
|
||||
|
||||
GdkDisplay *
|
||||
_gdk_mir_display_open (const gchar *display_name)
|
||||
{
|
||||
MirConnection *connection;
|
||||
MirPixelFormat sw_pixel_format, hw_pixel_format;
|
||||
GdkMirDisplay *display;
|
||||
GDBusConnection *session;
|
||||
|
||||
//g_printerr ("gdk_mir_display_open\n");
|
||||
|
||||
connection = mir_connect_sync (NULL, "GDK-Mir");
|
||||
connection = mir_connect_sync (NULL, g_get_prgname ());
|
||||
if (!connection)
|
||||
return NULL;
|
||||
|
||||
if (!mir_connection_is_valid (connection))
|
||||
{
|
||||
g_printerr ("Failed to connect to Mir: %s\n", mir_connection_get_error_message (connection));
|
||||
mir_connection_release (connection);
|
||||
return NULL;
|
||||
}
|
||||
@@ -138,6 +153,45 @@ _gdk_mir_display_open (const gchar *display_name)
|
||||
display->sw_pixel_format = sw_pixel_format;
|
||||
display->hw_pixel_format = hw_pixel_format;
|
||||
|
||||
session = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
|
||||
|
||||
display->content_service = content_hub_service_proxy_new_sync (
|
||||
session,
|
||||
G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
|
||||
"com.ubuntu.content.dbus.Service",
|
||||
"/",
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
g_signal_connect_swapped (
|
||||
display->content_service,
|
||||
"pasteboard-changed",
|
||||
G_CALLBACK (pasteboard_changed_cb),
|
||||
display);
|
||||
|
||||
display->content_handler = content_hub_handler_skeleton_new ();
|
||||
|
||||
g_dbus_interface_skeleton_export (
|
||||
G_DBUS_INTERFACE_SKELETON (display->content_handler),
|
||||
session,
|
||||
"/org/gnome/gtk/content/handler",
|
||||
NULL);
|
||||
|
||||
g_object_unref (session);
|
||||
|
||||
content_hub_service_call_register_import_export_handler_sync (
|
||||
display->content_service,
|
||||
g_application_get_application_id (g_application_get_default ()),
|
||||
"/org/gnome/gtk/content/handler",
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
content_hub_service_call_handler_active_sync (
|
||||
display->content_service,
|
||||
g_application_get_application_id (g_application_get_default ()),
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
g_signal_emit_by_name (display, "opened");
|
||||
|
||||
return GDK_DISPLAY (display);
|
||||
@@ -173,6 +227,10 @@ gdk_mir_display_dispose (GObject *object)
|
||||
{
|
||||
GdkMirDisplay *display = GDK_MIR_DISPLAY (object);
|
||||
|
||||
g_clear_pointer (&display->paste_data, g_variant_unref);
|
||||
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (display->content_handler));
|
||||
g_clear_object (&display->content_handler);
|
||||
g_clear_object (&display->content_service);
|
||||
g_clear_object (&display->screen);
|
||||
g_clear_object (&display->keymap);
|
||||
g_clear_pointer (&display->event_source, g_source_unref);
|
||||
@@ -193,40 +251,34 @@ gdk_mir_display_finalize (GObject *object)
|
||||
static const gchar *
|
||||
gdk_mir_display_get_name (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_name\n");
|
||||
return "Mir";
|
||||
}
|
||||
|
||||
static GdkScreen *
|
||||
gdk_mir_display_get_default_screen (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_default_screen\n");
|
||||
return GDK_MIR_DISPLAY (display)->screen;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_beep (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_beep\n");
|
||||
/* No system level beep... */
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_sync (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_sync\n");
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_flush (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_flush\n");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_display_has_pending (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_has_pending\n");
|
||||
/* We don't need to poll for events - so nothing pending */
|
||||
return FALSE;
|
||||
}
|
||||
@@ -234,27 +286,23 @@ gdk_mir_display_has_pending (GdkDisplay *display)
|
||||
static void
|
||||
gdk_mir_display_queue_events (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_queue_events\n");
|
||||
/* We don't need to poll for events - so don't do anything*/
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_make_default (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_make_default\n");
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gdk_mir_display_get_default_group (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_default_group\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_display_supports_shapes (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_supports_shapes\n");
|
||||
/* Mir doesn't support shaped windows */
|
||||
return FALSE;
|
||||
}
|
||||
@@ -262,42 +310,36 @@ gdk_mir_display_supports_shapes (GdkDisplay *display)
|
||||
static gboolean
|
||||
gdk_mir_display_supports_input_shapes (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_supports_input_shapes\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_display_supports_composite (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_supports_composite\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_display_supports_clipboard_persistence (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_supports_clipboard_persistence\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_display_supports_cursor_alpha (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_supports_cursor_alpha\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_display_supports_cursor_color (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_supports_cursor_color\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_display_supports_selection_notification (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_supports_selection_notification\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -305,7 +347,6 @@ static gboolean
|
||||
gdk_mir_display_request_selection_notification (GdkDisplay *display,
|
||||
GdkAtom selection)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_request_selection_notification\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -316,7 +357,6 @@ gdk_mir_display_store_clipboard (GdkDisplay *display,
|
||||
const GdkAtom *targets,
|
||||
gint n_targets)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_store_clipboard\n");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -324,7 +364,6 @@ gdk_mir_display_get_default_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_default_cursor_size\n");
|
||||
*width = *height = 32; // FIXME: Random value
|
||||
}
|
||||
|
||||
@@ -333,7 +372,6 @@ gdk_mir_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_maximal_cursor_size\n");
|
||||
*width = *height = 32; // FIXME: Random value
|
||||
}
|
||||
|
||||
@@ -357,33 +395,28 @@ gdk_mir_display_get_cursor_for_surface (GdkDisplay *display,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_cursor_for_surface (%f, %f)\n", x, y);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GdkAppLaunchContext *
|
||||
gdk_mir_display_get_app_launch_context (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_app_launch_context\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_before_process_all_updates (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_before_process_all_updates\n");
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_after_process_all_updates (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_after_process_all_updates\n");
|
||||
}
|
||||
|
||||
static gulong
|
||||
gdk_mir_display_get_next_serial (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_next_serial\n");
|
||||
return GDK_MIR_DISPLAY (display)->serial++;
|
||||
}
|
||||
|
||||
@@ -391,7 +424,6 @@ static void
|
||||
gdk_mir_display_notify_startup_complete (GdkDisplay *display,
|
||||
const gchar *startup_id)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_notify_startup_complete\n");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -403,12 +435,6 @@ gdk_mir_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_create_window_impl");
|
||||
//g_printerr (" window=%p", window);
|
||||
//g_printerr (" location=(%d, %d)", window->x, window->y);
|
||||
//g_printerr (" size=(%d, %d)", window->width, window->height);
|
||||
//g_printerr ("\n");
|
||||
|
||||
if (attributes->wclass == GDK_INPUT_OUTPUT)
|
||||
{
|
||||
window->impl = _gdk_mir_window_impl_new (display, window, attributes, attributes_mask);
|
||||
@@ -427,21 +453,18 @@ gdk_mir_display_create_window_impl (GdkDisplay *display,
|
||||
static GdkKeymap *
|
||||
gdk_mir_display_get_keymap (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_keymap\n");
|
||||
return GDK_MIR_DISPLAY (display)->keymap;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_push_error_trap (GdkDisplay *display)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_push_error_trap\n");
|
||||
}
|
||||
|
||||
static gint
|
||||
gdk_mir_display_pop_error_trap (GdkDisplay *display,
|
||||
gboolean ignored)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_pop_error_trap\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -449,7 +472,6 @@ static GdkWindow *
|
||||
gdk_mir_display_get_selection_owner (GdkDisplay *display,
|
||||
GdkAtom selection)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_selection_owner\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -460,7 +482,28 @@ gdk_mir_display_set_selection_owner (GdkDisplay *display,
|
||||
guint32 time,
|
||||
gboolean send_event)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_set_selection_owner\n");
|
||||
GdkEvent *event;
|
||||
|
||||
if (selection == GDK_SELECTION_CLIPBOARD)
|
||||
{
|
||||
if (owner)
|
||||
{
|
||||
event = gdk_event_new (GDK_SELECTION_REQUEST);
|
||||
event->selection.window = g_object_ref (owner);
|
||||
event->selection.send_event = FALSE;
|
||||
event->selection.selection = selection;
|
||||
event->selection.target = gdk_atom_intern_static_string ("TARGETS");
|
||||
event->selection.property = gdk_atom_intern_static_string ("AVAILABLE_TARGETS");
|
||||
event->selection.time = GDK_CURRENT_TIME;
|
||||
event->selection.requestor = g_object_ref (owner);
|
||||
|
||||
gdk_event_put (event);
|
||||
gdk_event_free (event);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -472,7 +515,6 @@ gdk_mir_display_send_selection_notify (GdkDisplay *display,
|
||||
GdkAtom property,
|
||||
guint32 time)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_send_selection_notify\n");
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -482,10 +524,261 @@ gdk_mir_display_get_selection_property (GdkDisplay *display,
|
||||
GdkAtom *ret_type,
|
||||
gint *ret_format)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_get_selection_property\n");
|
||||
gint length;
|
||||
|
||||
gdk_property_get (requestor,
|
||||
gdk_atom_intern_static_string ("GDK_SELECTION"),
|
||||
GDK_NONE,
|
||||
0,
|
||||
G_MAXULONG,
|
||||
FALSE,
|
||||
ret_type,
|
||||
ret_format,
|
||||
&length,
|
||||
data);
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
static gint
|
||||
get_format_score (const gchar *format,
|
||||
GdkAtom target,
|
||||
GdkAtom *out_type,
|
||||
gint *out_size)
|
||||
{
|
||||
const gchar *target_string;
|
||||
GdkAtom dummy_type;
|
||||
gint dummy_size;
|
||||
|
||||
target_string = _gdk_atom_name_const (target);
|
||||
|
||||
if (!out_type)
|
||||
out_type = &dummy_type;
|
||||
|
||||
if (!out_size)
|
||||
out_size = &dummy_size;
|
||||
|
||||
if (!g_ascii_strcasecmp (format, target_string))
|
||||
{
|
||||
*out_type = GDK_SELECTION_TYPE_STRING;
|
||||
*out_size = sizeof (guchar);
|
||||
|
||||
return G_MAXINT;
|
||||
}
|
||||
|
||||
if (target == gdk_atom_intern_static_string ("UTF8_STRING"))
|
||||
return get_format_score (format, gdk_atom_intern_static_string ("text/plain;charset=utf-8"), out_type, out_size);
|
||||
|
||||
/* TODO: use best media type for COMPOUND_TEXT target */
|
||||
if (target == gdk_atom_intern_static_string ("COMPOUND_TEXT"))
|
||||
return get_format_score (format, gdk_atom_intern_static_string ("text/plain;charset=utf-8"), out_type, out_size);
|
||||
|
||||
if (target == GDK_TARGET_STRING)
|
||||
return get_format_score (format, gdk_atom_intern_static_string ("text/plain;charset=iso-8859-1"), out_type, out_size);
|
||||
|
||||
if (target == gdk_atom_intern_static_string ("GTK_TEXT_BUFFER_CONTENTS"))
|
||||
return get_format_score (format, gdk_atom_intern_static_string ("text/plain;charset=utf-8"), out_type, out_size);
|
||||
|
||||
if (g_content_type_is_a (format, target_string))
|
||||
{
|
||||
*out_type = GDK_SELECTION_TYPE_STRING;
|
||||
*out_size = sizeof (guchar);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (g_content_type_is_a (target_string, format))
|
||||
{
|
||||
*out_type = GDK_SELECTION_TYPE_STRING;
|
||||
*out_size = sizeof (guchar);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gint
|
||||
get_best_format_index (const gchar * const *formats,
|
||||
guint n_formats,
|
||||
GdkAtom target,
|
||||
GdkAtom *out_type,
|
||||
gint *out_size)
|
||||
{
|
||||
gint best_i = -1;
|
||||
gint best_score = 0;
|
||||
GdkAtom best_type;
|
||||
gint best_size;
|
||||
gint score;
|
||||
GdkAtom type;
|
||||
gint size;
|
||||
gint i;
|
||||
|
||||
if (!out_type)
|
||||
out_type = &best_type;
|
||||
|
||||
if (!out_size)
|
||||
out_size = &best_size;
|
||||
|
||||
*out_type = GDK_NONE;
|
||||
*out_size = 0;
|
||||
|
||||
for (i = 0; i < n_formats; i++)
|
||||
{
|
||||
score = get_format_score (formats[i], target, &type, &size);
|
||||
|
||||
if (score > best_score)
|
||||
{
|
||||
best_i = i;
|
||||
best_score = score;
|
||||
*out_type = type;
|
||||
*out_size = size;
|
||||
}
|
||||
}
|
||||
|
||||
return best_i;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_real_convert_selection (GdkDisplay *display,
|
||||
GdkWindow *requestor,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
guint32 time)
|
||||
{
|
||||
GdkMirDisplay *mir_display = GDK_MIR_DISPLAY (display);
|
||||
const gchar *paste_data;
|
||||
gsize paste_size;
|
||||
const gint *paste_header;
|
||||
GPtrArray *paste_formats;
|
||||
GArray *paste_targets;
|
||||
GdkAtom paste_target;
|
||||
GdkEvent *event;
|
||||
gint best_i;
|
||||
GdkAtom best_type;
|
||||
gint best_size;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (mir_display->paste_data);
|
||||
|
||||
paste_data = g_variant_get_fixed_array (mir_display->paste_data, &paste_size, sizeof (guchar));
|
||||
paste_header = (const gint *) paste_data;
|
||||
|
||||
if (paste_data)
|
||||
{
|
||||
paste_formats = g_ptr_array_new_full (paste_header[0], g_free);
|
||||
|
||||
for (i = 0; i < paste_header[0]; i++)
|
||||
g_ptr_array_add (paste_formats, g_strndup (paste_data + paste_header[1 + 4 * i], paste_header[2 + 4 * i]));
|
||||
}
|
||||
else
|
||||
paste_formats = g_ptr_array_new_with_free_func (g_free);
|
||||
|
||||
if (target == gdk_atom_intern_static_string ("TARGETS"))
|
||||
{
|
||||
paste_targets = g_array_sized_new (TRUE, FALSE, sizeof (GdkAtom), paste_formats->len);
|
||||
|
||||
for (i = 0; i < paste_formats->len; i++)
|
||||
{
|
||||
paste_target = gdk_atom_intern (g_ptr_array_index (paste_formats, i), FALSE);
|
||||
g_array_append_val (paste_targets, paste_target);
|
||||
}
|
||||
|
||||
gdk_property_change (requestor,
|
||||
gdk_atom_intern_static_string ("GDK_SELECTION"),
|
||||
GDK_SELECTION_TYPE_ATOM,
|
||||
8 * sizeof (GdkAtom),
|
||||
GDK_PROP_MODE_REPLACE,
|
||||
(const guchar *) paste_targets->data,
|
||||
paste_targets->len);
|
||||
|
||||
g_array_unref (paste_targets);
|
||||
|
||||
event = gdk_event_new (GDK_SELECTION_NOTIFY);
|
||||
event->selection.window = g_object_ref (requestor);
|
||||
event->selection.send_event = FALSE;
|
||||
event->selection.selection = selection;
|
||||
event->selection.target = target;
|
||||
event->selection.property = gdk_atom_intern_static_string ("GDK_SELECTION");
|
||||
event->selection.time = time;
|
||||
event->selection.requestor = g_object_ref (requestor);
|
||||
|
||||
gdk_event_put (event);
|
||||
gdk_event_free (event);
|
||||
}
|
||||
else
|
||||
{
|
||||
best_i = get_best_format_index ((const gchar * const *) paste_formats->pdata,
|
||||
paste_formats->len,
|
||||
target,
|
||||
&best_type,
|
||||
&best_size);
|
||||
|
||||
if (best_i >= 0)
|
||||
{
|
||||
gdk_property_change (requestor,
|
||||
gdk_atom_intern_static_string ("GDK_SELECTION"),
|
||||
best_type,
|
||||
8 * best_size,
|
||||
GDK_PROP_MODE_REPLACE,
|
||||
(const guchar *) paste_data + paste_header[3 + 4 * best_i],
|
||||
paste_header[4 + 4 * best_i] / best_size);
|
||||
|
||||
event = gdk_event_new (GDK_SELECTION_NOTIFY);
|
||||
event->selection.window = g_object_ref (requestor);
|
||||
event->selection.send_event = FALSE;
|
||||
event->selection.selection = selection;
|
||||
event->selection.target = target;
|
||||
event->selection.property = gdk_atom_intern_static_string ("GDK_SELECTION");
|
||||
event->selection.time = time;
|
||||
event->selection.requestor = g_object_ref (requestor);
|
||||
|
||||
gdk_event_put (event);
|
||||
gdk_event_free (event);
|
||||
}
|
||||
}
|
||||
|
||||
g_ptr_array_unref (paste_formats);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkWindow *requestor;
|
||||
GdkAtom selection;
|
||||
GdkAtom target;
|
||||
guint32 time;
|
||||
} ConvertInfo;
|
||||
|
||||
static void
|
||||
paste_data_ready_cb (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
{
|
||||
ContentHubService *content_service = CONTENT_HUB_SERVICE (source_object);
|
||||
ConvertInfo *info = user_data;
|
||||
GdkMirDisplay *mir_display = GDK_MIR_DISPLAY (info->display);
|
||||
gboolean result;
|
||||
|
||||
g_clear_pointer (&mir_display->paste_data, g_variant_unref);
|
||||
|
||||
result = content_hub_service_call_get_latest_paste_data_finish (content_service,
|
||||
&mir_display->paste_data,
|
||||
res,
|
||||
NULL);
|
||||
|
||||
if (result)
|
||||
gdk_mir_display_real_convert_selection (info->display,
|
||||
info->requestor,
|
||||
info->selection,
|
||||
info->target,
|
||||
info->time);
|
||||
|
||||
g_object_unref (info->requestor);
|
||||
g_object_unref (info->display);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_display_convert_selection (GdkDisplay *display,
|
||||
GdkWindow *requestor,
|
||||
@@ -493,7 +786,46 @@ gdk_mir_display_convert_selection (GdkDisplay *display,
|
||||
GdkAtom target,
|
||||
guint32 time)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_convert_selection\n");
|
||||
GdkMirDisplay *mir_display = GDK_MIR_DISPLAY (display);
|
||||
MirWindow *mir_window;
|
||||
MirWindowId *mir_window_id;
|
||||
ConvertInfo *info;
|
||||
|
||||
if (selection != GDK_SELECTION_CLIPBOARD)
|
||||
return;
|
||||
else if (mir_display->paste_data)
|
||||
gdk_mir_display_real_convert_selection (display, requestor, selection, target, time);
|
||||
else if (mir_display->focused_window)
|
||||
{
|
||||
mir_window = _gdk_mir_window_get_mir_window (mir_display->focused_window);
|
||||
|
||||
if (!mir_window)
|
||||
return;
|
||||
|
||||
mir_window_id = mir_window_request_window_id_sync (mir_window);
|
||||
|
||||
if (!mir_window_id)
|
||||
return;
|
||||
|
||||
if (mir_window_id_is_valid (mir_window_id))
|
||||
{
|
||||
info = g_new (ConvertInfo, 1);
|
||||
info->display = g_object_ref (display);
|
||||
info->requestor = g_object_ref (requestor);
|
||||
info->selection = selection;
|
||||
info->target = target;
|
||||
info->time = time;
|
||||
|
||||
content_hub_service_call_get_latest_paste_data (
|
||||
mir_display->content_service,
|
||||
mir_window_id_as_string (mir_window_id),
|
||||
NULL,
|
||||
paste_data_ready_cb,
|
||||
info);
|
||||
}
|
||||
|
||||
mir_window_id_release (mir_window_id);
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -504,15 +836,44 @@ gdk_mir_display_text_property_to_utf8_list (GdkDisplay *display,
|
||||
gint length,
|
||||
gchar ***list)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_text_property_to_utf8_list\n");
|
||||
return 0;
|
||||
GPtrArray *array;
|
||||
const gchar *ptr;
|
||||
gsize chunk_len;
|
||||
gchar *copy;
|
||||
guint nitems;
|
||||
|
||||
ptr = (const gchar *) text;
|
||||
array = g_ptr_array_new ();
|
||||
|
||||
/* split text into utf-8 strings */
|
||||
while (ptr < (const gchar *) &text[length])
|
||||
{
|
||||
chunk_len = strlen (ptr);
|
||||
|
||||
if (g_utf8_validate (ptr, chunk_len, NULL))
|
||||
{
|
||||
copy = g_strndup (ptr, chunk_len);
|
||||
g_ptr_array_add (array, copy);
|
||||
}
|
||||
|
||||
ptr = &ptr[chunk_len + 1];
|
||||
}
|
||||
|
||||
nitems = array->len;
|
||||
g_ptr_array_add (array, NULL);
|
||||
|
||||
if (list)
|
||||
*list = (gchar **) g_ptr_array_free (array, FALSE);
|
||||
else
|
||||
g_ptr_array_free (array, TRUE);
|
||||
|
||||
return nitems;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
gdk_mir_display_utf8_to_string_target (GdkDisplay *display,
|
||||
const gchar *str)
|
||||
{
|
||||
//g_printerr ("gdk_mir_display_utf8_to_string_target\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -582,6 +943,62 @@ _gdk_mir_display_get_pixel_format (GdkDisplay *display,
|
||||
return mir_dpy->sw_pixel_format;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_mir_display_focus_window (GdkDisplay *display,
|
||||
GdkWindow *window)
|
||||
{
|
||||
GdkMirDisplay *mir_display = GDK_MIR_DISPLAY (display);
|
||||
|
||||
g_set_object (&mir_display->focused_window, window);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_mir_display_unfocus_window (GdkDisplay *display,
|
||||
GdkWindow *window)
|
||||
{
|
||||
GdkMirDisplay *mir_display = GDK_MIR_DISPLAY (display);
|
||||
|
||||
if (window == mir_display->focused_window)
|
||||
g_clear_object (&mir_display->focused_window);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_mir_display_create_paste (GdkDisplay *display,
|
||||
const gchar * const *paste_formats,
|
||||
gconstpointer paste_data,
|
||||
gsize paste_size)
|
||||
{
|
||||
GdkMirDisplay *mir_display = GDK_MIR_DISPLAY (display);
|
||||
MirWindow *mir_window;
|
||||
MirWindowId *mir_window_id;
|
||||
|
||||
if (!mir_display->focused_window)
|
||||
return;
|
||||
|
||||
mir_window = _gdk_mir_window_get_mir_window (mir_display->focused_window);
|
||||
|
||||
if (!mir_window)
|
||||
return;
|
||||
|
||||
mir_window_id = mir_window_request_window_id_sync (mir_window);
|
||||
|
||||
if (!mir_window_id)
|
||||
return;
|
||||
|
||||
if (mir_window_id_is_valid (mir_window_id))
|
||||
content_hub_service_call_create_paste_sync (
|
||||
mir_display->content_service,
|
||||
g_application_get_application_id (g_application_get_default ()),
|
||||
mir_window_id_as_string (mir_window_id),
|
||||
g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, paste_data, paste_size, sizeof (guchar)),
|
||||
paste_formats,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
mir_window_id_release (mir_window_id);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_mir_display_init_egl_display (GdkDisplay *display)
|
||||
{
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#include "gdkmir.h"
|
||||
#include "gdkmir-private.h"
|
||||
|
||||
#include <mir_toolkit/events/window_placement.h>
|
||||
|
||||
#define NANO_TO_MILLI(x) ((x) / 1000000)
|
||||
|
||||
struct _GdkMirWindowReference {
|
||||
@@ -240,9 +242,15 @@ generate_focus_event (GdkWindow *window, gboolean focused)
|
||||
GdkEvent *event;
|
||||
|
||||
if (focused)
|
||||
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
|
||||
{
|
||||
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
|
||||
_gdk_mir_display_focus_window (gdk_window_get_display (window), window);
|
||||
}
|
||||
else
|
||||
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
|
||||
{
|
||||
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
|
||||
_gdk_mir_display_unfocus_window (gdk_window_get_display (window), window);
|
||||
}
|
||||
|
||||
event = gdk_event_new (GDK_FOCUS_CHANGE);
|
||||
event->focus_change.send_event = FALSE;
|
||||
@@ -436,45 +444,46 @@ handle_motion_event (GdkWindow *window, const MirInputEvent *event)
|
||||
}
|
||||
|
||||
static void
|
||||
handle_surface_event (GdkWindow *window, const MirSurfaceEvent *event)
|
||||
handle_window_event (GdkWindow *window,
|
||||
const MirWindowEvent *event)
|
||||
{
|
||||
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||
MirSurfaceState state;
|
||||
MirWindowState state;
|
||||
|
||||
switch (mir_surface_event_get_attribute (event))
|
||||
switch (mir_window_event_get_attribute (event))
|
||||
{
|
||||
case mir_surface_attrib_type:
|
||||
_gdk_mir_window_impl_set_surface_type (impl, mir_surface_event_get_attribute_value (event));
|
||||
case mir_window_attrib_type:
|
||||
_gdk_mir_window_impl_set_window_type (impl, mir_window_event_get_attribute_value (event));
|
||||
break;
|
||||
case mir_surface_attrib_state:
|
||||
state = mir_surface_event_get_attribute_value (event);
|
||||
_gdk_mir_window_impl_set_surface_state (impl, state);
|
||||
case mir_window_attrib_state:
|
||||
state = mir_window_event_get_attribute_value (event);
|
||||
_gdk_mir_window_impl_set_window_state (impl, state);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case mir_surface_state_restored:
|
||||
case mir_surface_state_hidden:
|
||||
case mir_window_state_restored:
|
||||
case mir_window_state_hidden:
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_ICONIFIED |
|
||||
GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN,
|
||||
0);
|
||||
break;
|
||||
case mir_surface_state_minimized:
|
||||
case mir_window_state_minimized:
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN,
|
||||
GDK_WINDOW_STATE_ICONIFIED);
|
||||
break;
|
||||
case mir_surface_state_maximized:
|
||||
case mir_surface_state_vertmaximized:
|
||||
case mir_surface_state_horizmaximized:
|
||||
case mir_window_state_maximized:
|
||||
case mir_window_state_vertmaximized:
|
||||
case mir_window_state_horizmaximized:
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_ICONIFIED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN,
|
||||
GDK_WINDOW_STATE_MAXIMIZED);
|
||||
break;
|
||||
case mir_surface_state_fullscreen:
|
||||
case mir_window_state_fullscreen:
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_ICONIFIED |
|
||||
GDK_WINDOW_STATE_MAXIMIZED,
|
||||
@@ -485,10 +494,10 @@ handle_surface_event (GdkWindow *window, const MirSurfaceEvent *event)
|
||||
}
|
||||
|
||||
break;
|
||||
case mir_surface_attrib_swapinterval:
|
||||
case mir_window_attrib_swapinterval:
|
||||
break;
|
||||
case mir_surface_attrib_focus:
|
||||
generate_focus_event (window, mir_surface_event_get_attribute_value (event) != 0);
|
||||
case mir_window_attrib_focus:
|
||||
generate_focus_event (window, mir_window_event_get_attribute_value (event) != 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -529,10 +538,17 @@ handle_close_event (GdkWindow *window)
|
||||
}
|
||||
|
||||
static void
|
||||
handle_surface_output_event (GdkWindow *window,
|
||||
const MirSurfaceOutputEvent *event)
|
||||
handle_window_output_event (GdkWindow *window,
|
||||
const MirWindowOutputEvent *event)
|
||||
{
|
||||
_gdk_mir_window_set_surface_output (window, mir_surface_output_event_get_scale (event));
|
||||
_gdk_mir_window_set_scale (window, mir_window_output_event_get_scale (event));
|
||||
}
|
||||
|
||||
static void
|
||||
handle_window_placement_event (GdkWindow *window,
|
||||
const MirWindowPlacementEvent *event)
|
||||
{
|
||||
_gdk_mir_window_set_final_rect (window, mir_window_placement_get_relative_position (event));
|
||||
}
|
||||
|
||||
typedef struct
|
||||
@@ -565,6 +581,8 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
|
||||
case mir_input_event_type_pointer:
|
||||
handle_motion_event (window, input_event);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -574,27 +592,31 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
|
||||
case mir_event_type_motion:
|
||||
handle_motion_event (window, mir_event_get_input_event (event));
|
||||
break;
|
||||
case mir_event_type_surface:
|
||||
handle_surface_event (window, mir_event_get_surface_event (event));
|
||||
case mir_event_type_window:
|
||||
handle_window_event (window, mir_event_get_window_event (event));
|
||||
break;
|
||||
case mir_event_type_resize:
|
||||
handle_resize_event (window, mir_event_get_resize_event (event));
|
||||
break;
|
||||
case mir_event_type_prompt_session_state_change:
|
||||
// FIXME?
|
||||
break;
|
||||
case mir_event_type_orientation:
|
||||
// FIXME?
|
||||
break;
|
||||
case mir_event_type_close_surface:
|
||||
case mir_event_type_close_window:
|
||||
handle_close_event (window);
|
||||
break;
|
||||
case mir_event_type_surface_output:
|
||||
handle_surface_output_event (window, mir_event_get_surface_output_event (event));
|
||||
case mir_event_type_keymap:
|
||||
break;
|
||||
case mir_event_type_window_output:
|
||||
handle_window_output_event (window, mir_event_get_window_output_event (event));
|
||||
break;
|
||||
case mir_event_type_input_device_state:
|
||||
break;
|
||||
case mir_event_type_window_placement:
|
||||
handle_window_placement_event (window, mir_event_get_window_placement_event (event));
|
||||
break;
|
||||
default:
|
||||
g_warning ("Ignoring unknown Mir event %d", mir_event_get_type (event));
|
||||
// FIXME?
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -63,7 +63,6 @@ gdk_mir_keyboard_get_history (GdkDevice *device,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events)
|
||||
{
|
||||
g_printerr ("gdk_mir_keyboard_get_history\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -73,7 +72,6 @@ gdk_mir_keyboard_get_state (GdkDevice *device,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
g_printerr ("gdk_mir_keyboard_get_state\n");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -81,7 +79,6 @@ gdk_mir_keyboard_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keyboard_set_window_cursor\n");
|
||||
/* Keyboards don't have cursors... */
|
||||
}
|
||||
|
||||
@@ -91,7 +88,6 @@ gdk_mir_keyboard_warp (GdkDevice *device,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keyboard_warp\n");
|
||||
/* Can't warp a keyboard... */
|
||||
}
|
||||
|
||||
@@ -106,7 +102,6 @@ gdk_mir_keyboard_query_state (GdkDevice *device,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
g_printerr ("gdk_mir_keyboard_query_state\n");
|
||||
}
|
||||
|
||||
static GdkGrabStatus
|
||||
@@ -118,7 +113,6 @@ gdk_mir_keyboard_grab (GdkDevice *device,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keyboard_grab\n");
|
||||
/* Mir doesn't do grabs, so sure, you have the grab */
|
||||
return GDK_GRAB_SUCCESS;
|
||||
}
|
||||
@@ -127,7 +121,6 @@ static void
|
||||
gdk_mir_keyboard_ungrab (GdkDevice *device,
|
||||
guint32 time_)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keyboard_ungrab\n");
|
||||
/* Mir doesn't do grabs */
|
||||
}
|
||||
|
||||
@@ -138,7 +131,6 @@ gdk_mir_keyboard_window_at_position (GdkDevice *device,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keyboard_window_at_position (%f, %f)\n", *win_x, *win_y);
|
||||
/* Keyboard don't have locations... */
|
||||
return NULL; // FIXME: Or the window with the keyboard focus?
|
||||
}
|
||||
@@ -148,7 +140,6 @@ gdk_mir_keyboard_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
g_printerr ("gdk_mir_keyboard_select_window_events\n");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -64,7 +64,6 @@ _gdk_mir_keymap_new (void)
|
||||
static PangoDirection
|
||||
gdk_mir_keymap_get_direction (GdkKeymap *keymap)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_get_direction\n");
|
||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||
gint i;
|
||||
|
||||
@@ -80,28 +79,24 @@ gdk_mir_keymap_get_direction (GdkKeymap *keymap)
|
||||
static gboolean
|
||||
gdk_mir_keymap_have_bidi_layouts (GdkKeymap *keymap)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_have_bidi_layouts\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_keymap_get_caps_lock_state (GdkKeymap *keymap)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_get_caps_lock_state\n");
|
||||
return xkb_state_led_name_is_active (GDK_MIR_KEYMAP (keymap)->xkb_state, XKB_LED_NAME_CAPS);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_keymap_get_num_lock_state (GdkKeymap *keymap)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_get_num_lock_state\n");
|
||||
return xkb_state_led_name_is_active (GDK_MIR_KEYMAP (keymap)->xkb_state, XKB_LED_NAME_NUM);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_keymap_get_scroll_lock_state (GdkKeymap *keymap)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_get_scroll_lock_state\n");
|
||||
return xkb_state_led_name_is_active (GDK_MIR_KEYMAP (keymap)->xkb_state, XKB_LED_NAME_SCROLL);
|
||||
}
|
||||
|
||||
@@ -111,7 +106,6 @@ gdk_mir_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
GdkKeymapKey **keys,
|
||||
gint *n_keys)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_get_entries_for_keyval\n");
|
||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||
GArray *key_array;
|
||||
guint keycode;
|
||||
@@ -164,7 +158,6 @@ gdk_mir_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
guint **keyvals,
|
||||
gint *n_entries)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_get_entries_for_keycode\n");
|
||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||
gint num_layouts, layout;
|
||||
gint num_entries;
|
||||
@@ -214,7 +207,6 @@ static guint
|
||||
gdk_mir_keymap_lookup_key (GdkKeymap *keymap,
|
||||
const GdkKeymapKey *key)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_lookup_key\n");
|
||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||
const xkb_keysym_t *syms;
|
||||
int num_syms;
|
||||
@@ -292,7 +284,6 @@ gdk_mir_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
gint *effective_level,
|
||||
GdkModifierType *consumed_modifiers)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_translate_keyboard_state\n");
|
||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||
struct xkb_state *xkb_state;
|
||||
guint32 modifiers;
|
||||
@@ -330,7 +321,6 @@ static void
|
||||
gdk_mir_keymap_add_virtual_modifiers (GdkKeymap *keymap,
|
||||
GdkModifierType *state)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_add_virtual_modifiers\n");
|
||||
// FIXME: What is this?
|
||||
}
|
||||
|
||||
@@ -338,7 +328,6 @@ static gboolean
|
||||
gdk_mir_keymap_map_virtual_modifiers (GdkKeymap *keymap,
|
||||
GdkModifierType *state)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_map_virtual_modifiers\n");
|
||||
// FIXME: What is this?
|
||||
return TRUE;
|
||||
}
|
||||
@@ -346,7 +335,6 @@ gdk_mir_keymap_map_virtual_modifiers (GdkKeymap *keymap,
|
||||
static guint
|
||||
gdk_mir_keymap_get_modifier_state (GdkKeymap *keymap)
|
||||
{
|
||||
//g_printerr ("gdk_mir_keymap_get_modifier_state\n");
|
||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||
xkb_mod_mask_t mods;
|
||||
|
||||
|
@@ -93,7 +93,6 @@ gdk_mir_pointer_get_history (GdkDevice *device,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events)
|
||||
{
|
||||
g_printerr ("gdk_mir_pointer_get_history\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -103,7 +102,6 @@ gdk_mir_pointer_get_state (GdkDevice *device,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
//g_printerr ("gdk_mir_pointer_get_state\n");
|
||||
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
||||
gdouble x, y;
|
||||
|
||||
@@ -120,7 +118,6 @@ gdk_mir_pointer_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
//g_printerr ("gdk_mir_pointer_set_window_cursor\n");
|
||||
/* Mir doesn't support cursors */
|
||||
}
|
||||
|
||||
@@ -130,7 +127,6 @@ gdk_mir_pointer_warp (GdkDevice *device,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
//g_printerr ("gdk_mir_pointer_warp\n");
|
||||
/* Mir doesn't support warping */
|
||||
}
|
||||
|
||||
@@ -145,7 +141,6 @@ gdk_mir_pointer_query_state (GdkDevice *device,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
//g_printerr ("gdk_mir_pointer_query_state\n");
|
||||
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
||||
|
||||
if (root_window)
|
||||
@@ -173,7 +168,6 @@ gdk_mir_pointer_grab (GdkDevice *device,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
//g_printerr ("gdk_mir_pointer_grab\n");
|
||||
/* Mir doesn't do grabs, so sure, you have the grab */
|
||||
return GDK_GRAB_SUCCESS;
|
||||
}
|
||||
@@ -182,7 +176,6 @@ static void
|
||||
gdk_mir_pointer_ungrab (GdkDevice *device,
|
||||
guint32 time_)
|
||||
{
|
||||
//g_printerr ("gdk_mir_pointer_ungrab\n");
|
||||
/* Mir doesn't do grabs */
|
||||
|
||||
GdkDeviceGrabInfo *grab = _gdk_display_get_last_device_grab (gdk_device_get_display (device), device);
|
||||
@@ -198,7 +191,6 @@ gdk_mir_pointer_window_at_position (GdkDevice *device,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel)
|
||||
{
|
||||
//g_printerr ("gdk_mir_pointer_window_at_position\n");
|
||||
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
||||
|
||||
if (win_x)
|
||||
@@ -216,7 +208,6 @@ gdk_mir_pointer_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
g_printerr ("gdk_mir_pointer_select_window_events\n");
|
||||
// FIXME?
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -74,6 +74,7 @@
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
|
||||
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
|
||||
_gdk_quartz_events_update_focus_window (window, TRUE);
|
||||
}
|
||||
|
||||
@@ -82,6 +83,7 @@
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
|
||||
_gdk_quartz_events_update_focus_window (window, FALSE);
|
||||
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
|
||||
}
|
||||
|
||||
-(void)windowDidBecomeMain:(NSNotification *)aNotification
|
||||
@@ -838,4 +840,19 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
inMaximizeTransition = NO;
|
||||
}
|
||||
|
||||
-(NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize
|
||||
{
|
||||
return [[window screen] frame].size;
|
||||
}
|
||||
|
||||
-(void)windowWillEnterFullScreen:(NSNotification *)aNotification
|
||||
{
|
||||
lastUnfullscreenFrame = [self frame];
|
||||
}
|
||||
|
||||
-(void)windowWillExitFullScreen:(NSNotification *)aNotification
|
||||
{
|
||||
[self setFrame:lastUnfullscreenFrame display:YES];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -37,6 +37,7 @@
|
||||
|
||||
NSRect lastUnmaximizedFrame;
|
||||
NSRect lastMaximizedFrame;
|
||||
NSRect lastUnfullscreenFrame;
|
||||
BOOL inMaximizeTransition;
|
||||
}
|
||||
|
||||
|
@@ -29,6 +29,7 @@ libgdk_quartz_la_SOURCES = \
|
||||
gdkdevicemanager-core-quartz.c \
|
||||
gdkdevicemanager-core-quartz.h \
|
||||
gdkdisplay-quartz.c \
|
||||
gdkdisplay-quartz.h \
|
||||
gdkdisplaymanager-quartz.c \
|
||||
gdkdnd-quartz.c \
|
||||
gdkdnd-quartz.h \
|
||||
@@ -38,6 +39,8 @@ libgdk_quartz_la_SOURCES = \
|
||||
gdkglcontext-quartz.h \
|
||||
gdkglobals-quartz.c \
|
||||
gdkkeys-quartz.c \
|
||||
gdkmonitor-quartz.c \
|
||||
gdkmonitor-quartz.h \
|
||||
gdkprivate-quartz.h \
|
||||
gdkproperty-quartz.c \
|
||||
gdkquartz.h \
|
||||
@@ -62,6 +65,7 @@ libgdkquartzinclude_HEADERS = \
|
||||
gdkquartzdisplaymanager.h \
|
||||
gdkquartzdnd.h \
|
||||
gdkquartzkeys.h \
|
||||
gdkquartzmonitor.h \
|
||||
gdkquartzscreen.h \
|
||||
gdkquartzutils.h \
|
||||
gdkquartzvisual.h \
|
||||
|
@@ -26,18 +26,11 @@
|
||||
#include "gdkquartzwindow.h"
|
||||
#include "gdkquartzdisplay.h"
|
||||
#include "gdkquartzdevicemanager-core.h"
|
||||
#include "gdkscreen.h"
|
||||
#include "gdkmonitorprivate.h"
|
||||
#include "gdkdisplay-quartz.h"
|
||||
|
||||
|
||||
struct _GdkQuartzDisplay
|
||||
{
|
||||
GdkDisplay display;
|
||||
};
|
||||
|
||||
struct _GdkQuartzDisplayClass
|
||||
{
|
||||
GdkDisplayClass display_class;
|
||||
};
|
||||
|
||||
static GdkWindow *
|
||||
gdk_quartz_display_get_default_group (GdkDisplay *display)
|
||||
{
|
||||
@@ -196,12 +189,45 @@ gdk_quartz_display_notify_startup_complete (GdkDisplay *display,
|
||||
/* FIXME: Implement? */
|
||||
}
|
||||
|
||||
static int
|
||||
gdk_quartz_display_get_n_monitors (GdkDisplay *display)
|
||||
{
|
||||
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
|
||||
|
||||
return quartz_display->monitors->len;
|
||||
}
|
||||
|
||||
|
||||
static GdkMonitor *
|
||||
gdk_quartz_display_get_monitor (GdkDisplay *display,
|
||||
int monitor_num)
|
||||
{
|
||||
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
|
||||
|
||||
if (0 <= monitor_num || monitor_num < quartz_display->monitors->len)
|
||||
return (GdkMonitor *)quartz_display->monitors->pdata[monitor_num];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GdkMonitor *
|
||||
gdk_quartz_display_get_primary_monitor (GdkDisplay *display)
|
||||
{
|
||||
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
|
||||
|
||||
return quartz_display->monitors->pdata[0];
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE (GdkQuartzDisplay, gdk_quartz_display, GDK_TYPE_DISPLAY)
|
||||
|
||||
static void
|
||||
gdk_quartz_display_init (GdkQuartzDisplay *display)
|
||||
{
|
||||
GDK_QUARTZ_ALLOC_POOL;
|
||||
|
||||
display->monitors = g_ptr_array_new_with_free_func (g_object_unref);
|
||||
|
||||
GDK_QUARTZ_RELEASE_POOL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -209,14 +235,14 @@ gdk_quartz_display_dispose (GObject *object)
|
||||
{
|
||||
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (object);
|
||||
|
||||
g_ptr_array_free (display_quartz->monitors, TRUE);
|
||||
|
||||
G_OBJECT_CLASS (gdk_quartz_display_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_display_finalize (GObject *object)
|
||||
{
|
||||
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (object);
|
||||
|
||||
G_OBJECT_CLASS (gdk_quartz_display_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@@ -268,6 +294,9 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
|
||||
display_class->convert_selection = _gdk_quartz_display_convert_selection;
|
||||
display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
|
||||
display_class->utf8_to_string_target = _gdk_quartz_display_utf8_to_string_target;
|
||||
display_class->get_n_monitors = gdk_quartz_display_get_n_monitors;
|
||||
display_class->get_monitor = gdk_quartz_display_get_monitor;
|
||||
display_class->get_primary_monitor = gdk_quartz_display_get_primary_monitor;
|
||||
|
||||
ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||
|
||||
|
235
gdk/quartz/gdkdisplay-quartz.h
Normal file
235
gdk/quartz/gdkdisplay-quartz.h
Normal file
@@ -0,0 +1,235 @@
|
||||
/*
|
||||
* gdkdisplay-quartz.h
|
||||
*
|
||||
* Copyright 2017 Tom Schoonjans
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_QUARTZ_DISPLAY__
|
||||
#define __GDK_QUARTZ_DISPLAY__
|
||||
|
||||
#include "gdkdisplayprivate.h"
|
||||
#include "gdkkeys.h"
|
||||
#include "gdkwindow.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkmain.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
struct _GdkQuartzDisplay
|
||||
{
|
||||
GdkDisplay parent_instance;
|
||||
/*Display *xdisplay;
|
||||
GdkScreen *screen;
|
||||
GList *screens;
|
||||
|
||||
GSource *event_source;
|
||||
|
||||
gint grab_count;
|
||||
*/
|
||||
/* Visual infos for creating Windows */
|
||||
/*int window_depth;
|
||||
Visual *window_visual;
|
||||
Colormap window_colormap;
|
||||
*/
|
||||
/* Keyboard related information */
|
||||
/*gint xkb_event_type;
|
||||
gboolean use_xkb;
|
||||
*/
|
||||
/* Whether we were able to turn on detectable-autorepeat using
|
||||
* XkbSetDetectableAutorepeat. If FALSE, we'll fall back
|
||||
* to checking the next event with XPending().
|
||||
*/
|
||||
/*gboolean have_xkb_autorepeat;
|
||||
|
||||
GdkKeymap *keymap;
|
||||
guint keymap_serial;
|
||||
|
||||
gboolean have_xfixes;
|
||||
gint xfixes_event_base;
|
||||
|
||||
gboolean have_xcomposite;
|
||||
gboolean have_xdamage;
|
||||
gint xdamage_event_base;
|
||||
|
||||
gboolean have_randr12;
|
||||
gboolean have_randr13;
|
||||
gboolean have_randr15;
|
||||
gint xrandr_event_base;
|
||||
*/
|
||||
/* If the SECURITY extension is in place, whether this client holds
|
||||
* a trusted authorization and so is allowed to make various requests
|
||||
* (grabs, properties etc.) Otherwise always TRUE.
|
||||
*/
|
||||
/*gboolean trusted_client;
|
||||
*/
|
||||
/* drag and drop information */
|
||||
/*GdkDragContext *current_dest_drag;
|
||||
*/
|
||||
/* Mapping to/from virtual atoms */
|
||||
/*GHashTable *atom_from_virtual;
|
||||
GHashTable *atom_to_virtual;
|
||||
*/
|
||||
/* Session Management leader window see ICCCM */
|
||||
/*Window leader_window;
|
||||
GdkWindow *leader_gdk_window;
|
||||
gboolean leader_window_title_set;
|
||||
*/
|
||||
/* List of functions to go from extension event => X window */
|
||||
/*GSList *event_types;
|
||||
*/
|
||||
/* X ID hashtable */
|
||||
/*GHashTable *xid_ht;
|
||||
*/
|
||||
/* translation queue */
|
||||
/*GQueue *translate_queue;
|
||||
*/
|
||||
/* input GdkWindow list */
|
||||
/*GList *input_windows;
|
||||
*/
|
||||
GPtrArray *monitors;
|
||||
|
||||
/* Startup notification */
|
||||
/*gchar *startup_notification_id;
|
||||
*/
|
||||
/* Time of most recent user interaction. */
|
||||
/*gulong user_time;
|
||||
*/
|
||||
/* Sets of atoms for DND */
|
||||
/*guint base_dnd_atoms_precached : 1;
|
||||
guint xdnd_atoms_precached : 1;
|
||||
guint motif_atoms_precached : 1;
|
||||
guint use_sync : 1;
|
||||
|
||||
guint have_shapes : 1;
|
||||
guint have_input_shapes : 1;
|
||||
gint shape_event_base;
|
||||
|
||||
GSList *error_traps;
|
||||
|
||||
gint wm_moveresize_button;
|
||||
*/
|
||||
/* GLX information */
|
||||
/*gint glx_version;
|
||||
gint glx_error_base;
|
||||
gint glx_event_base;
|
||||
*/
|
||||
/* Translation between X server time and system-local monotonic time */
|
||||
/*gint64 server_time_query_time;
|
||||
gint64 server_time_offset;
|
||||
*/
|
||||
/*guint server_time_is_monotonic_time : 1;
|
||||
|
||||
guint have_glx : 1;
|
||||
*/
|
||||
/* GLX extensions we check */
|
||||
/*guint has_glx_swap_interval : 1;
|
||||
guint has_glx_create_context : 1;
|
||||
guint has_glx_texture_from_pixmap : 1;
|
||||
guint has_glx_video_sync : 1;
|
||||
guint has_glx_buffer_age : 1;
|
||||
guint has_glx_sync_control : 1;
|
||||
guint has_glx_multisample : 1;
|
||||
guint has_glx_visual_rating : 1;
|
||||
guint has_glx_create_es2_context : 1;*/
|
||||
};
|
||||
|
||||
struct _GdkQuartzDisplayClass
|
||||
{
|
||||
GdkDisplayClass parent_class;
|
||||
};
|
||||
|
||||
/* Display methods - events */
|
||||
void _gdk_quartz_display_queue_events (GdkDisplay *display);
|
||||
gboolean _gdk_quartz_display_has_pending (GdkDisplay *display);
|
||||
|
||||
void _gdk_quartz_display_event_data_copy (GdkDisplay *display,
|
||||
const GdkEvent *src,
|
||||
GdkEvent *dst);
|
||||
void _gdk_quartz_display_event_data_free (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
|
||||
/* Display methods - cursor */
|
||||
GdkCursor *_gdk_quartz_display_get_cursor_for_type (GdkDisplay *display,
|
||||
GdkCursorType type);
|
||||
GdkCursor *_gdk_quartz_display_get_cursor_for_name (GdkDisplay *display,
|
||||
const gchar *name);
|
||||
GdkCursor *_gdk_quartz_display_get_cursor_for_surface (GdkDisplay *display,
|
||||
cairo_surface_t *surface,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
gboolean _gdk_quartz_display_supports_cursor_alpha (GdkDisplay *display);
|
||||
gboolean _gdk_quartz_display_supports_cursor_color (GdkDisplay *display);
|
||||
void _gdk_quartz_display_get_default_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height);
|
||||
void _gdk_quartz_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height);
|
||||
|
||||
/* Display methods - window */
|
||||
void _gdk_quartz_display_before_process_all_updates (GdkDisplay *display);
|
||||
void _gdk_quartz_display_after_process_all_updates (GdkDisplay *display);
|
||||
void _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkScreen *screen,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask);
|
||||
|
||||
/* Display methods - keymap */
|
||||
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
|
||||
|
||||
/* Display methods - selection */
|
||||
gboolean _gdk_quartz_display_set_selection_owner (GdkDisplay *display,
|
||||
GdkWindow *owner,
|
||||
GdkAtom selection,
|
||||
guint32 time,
|
||||
gboolean send_event);
|
||||
GdkWindow * _gdk_quartz_display_get_selection_owner (GdkDisplay *display,
|
||||
GdkAtom selection);
|
||||
gint _gdk_quartz_display_get_selection_property (GdkDisplay *display,
|
||||
GdkWindow *requestor,
|
||||
guchar **data,
|
||||
GdkAtom *ret_type,
|
||||
gint *ret_format);
|
||||
void _gdk_quartz_display_convert_selection (GdkDisplay *display,
|
||||
GdkWindow *requestor,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
guint32 time);
|
||||
gint _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
|
||||
GdkAtom encoding,
|
||||
gint format,
|
||||
const guchar *text,
|
||||
gint length,
|
||||
gchar ***list);
|
||||
gchar * _gdk_quartz_display_utf8_to_string_target (GdkDisplay *displayt,
|
||||
const gchar *str);
|
||||
/*
|
||||
GdkScreen *_gdk_x11_display_screen_for_xrootwin (GdkDisplay *display,
|
||||
Window xrootwin);
|
||||
void _gdk_x11_display_error_event (GdkDisplay *display,
|
||||
XErrorEvent *error);
|
||||
|
||||
GdkFilterReturn _gdk_wm_protocols_filter (GdkXEvent *xev,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
*/
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_QUARTZ_DISPLAY__ */
|
58
gdk/quartz/gdkmonitor-quartz.c
Normal file
58
gdk/quartz/gdkmonitor-quartz.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright © 2017 Tom Schoonjans
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "gdkmonitor-quartz.h"
|
||||
#include "gdkscreen-quartz.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GdkQuartzMonitor, gdk_quartz_monitor, GDK_TYPE_MONITOR)
|
||||
|
||||
static void
|
||||
gdk_quartz_monitor_get_workarea (GdkMonitor *monitor,
|
||||
GdkRectangle *dest)
|
||||
{
|
||||
GdkQuartzScreen *quartz_screen = GDK_QUARTZ_SCREEN(gdk_display_get_default_screen (monitor->display));
|
||||
GdkQuartzMonitor *quartz_monitor = GDK_QUARTZ_MONITOR(monitor);
|
||||
|
||||
GDK_QUARTZ_ALLOC_POOL;
|
||||
|
||||
NSRect rect = [quartz_monitor->nsscreen visibleFrame];
|
||||
|
||||
dest->x = rect.origin.x - quartz_screen->min_x;
|
||||
dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
|
||||
dest->width = rect.size.width;
|
||||
dest->height = rect.size.height;
|
||||
|
||||
GDK_QUARTZ_RELEASE_POOL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_monitor_init (GdkQuartzMonitor *monitor)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_monitor_class_init (GdkQuartzMonitorClass *class)
|
||||
{
|
||||
GDK_MONITOR_CLASS (class)->get_workarea = gdk_quartz_monitor_get_workarea;
|
||||
}
|
||||
|
41
gdk/quartz/gdkmonitor-quartz.h
Normal file
41
gdk/quartz/gdkmonitor-quartz.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright © 2017 Tom Schoonjans
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_QUARTZ_MONITOR_PRIVATE_H__
|
||||
#define __GDK_QUARTZ_MONITOR_PRIVATE_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "gdkmonitorprivate.h"
|
||||
|
||||
#include "gdkquartzmonitor.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
|
||||
struct _GdkQuartzMonitor
|
||||
{
|
||||
GdkMonitor parent;
|
||||
|
||||
NSScreen *nsscreen;
|
||||
};
|
||||
|
||||
struct _GdkQuartzMonitorClass {
|
||||
GdkMonitorClass parent_class;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -116,17 +116,6 @@ void _gdk_quartz_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height);
|
||||
|
||||
/* Display methods - window */
|
||||
void _gdk_quartz_display_before_process_all_updates (GdkDisplay *display);
|
||||
void _gdk_quartz_display_after_process_all_updates (GdkDisplay *display);
|
||||
void _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkScreen *screen,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask);
|
||||
|
||||
/* Display methods - keymap */
|
||||
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
|
||||
|
||||
|
@@ -49,7 +49,11 @@ typedef enum
|
||||
GDK_OSX_SNOW_LEOPARD = 6,
|
||||
GDK_OSX_LION = 7,
|
||||
GDK_OSX_MOUNTAIN_LION = 8,
|
||||
GDK_OSX_CURRENT = 8,
|
||||
GDK_OSX_MAVERICKS = 9,
|
||||
GDK_OSX_YOSEMITE = 10,
|
||||
GDK_OSX_EL_CAPITAN = 11,
|
||||
GDK_OSX_SIERRA = 12,
|
||||
GDK_OSX_CURRENT = 12,
|
||||
GDK_OSX_NEW = 99
|
||||
} GdkOSXVersion;
|
||||
|
||||
@@ -71,6 +75,7 @@ G_END_DECLS
|
||||
#include <gdk/quartz/gdkquartzdisplaymanager.h>
|
||||
#include <gdk/quartz/gdkquartzdnd.h>
|
||||
#include <gdk/quartz/gdkquartzkeys.h>
|
||||
#include <gdk/quartz/gdkquartzmonitor.h>
|
||||
#include <gdk/quartz/gdkquartzscreen.h>
|
||||
#include <gdk/quartz/gdkquartzutils.h>
|
||||
#include <gdk/quartz/gdkquartzvisual.h>
|
||||
|
45
gdk/quartz/gdkquartzmonitor.h
Normal file
45
gdk/quartz/gdkquartzmonitor.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* gdkquartzmonitor.h
|
||||
*
|
||||
* Copyright 2017 Tom Schoonjans
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_QUARTZ_MONITOR_H__
|
||||
#define __GDK_QUARTZ_MONITOR_H__
|
||||
|
||||
#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdkquartz.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkmonitor.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_QUARTZ_MONITOR (gdk_quartz_monitor_get_type ())
|
||||
#define GDK_QUARTZ_MONITOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_MONITOR, GdkQuartzMonitor))
|
||||
#define GDK_IS_QUARTZ_MONITOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_MONITOR))
|
||||
|
||||
typedef struct _GdkQuartzMonitor GdkQuartzMonitor;
|
||||
typedef struct _GdkQuartzMonitorClass GdkQuartzMonitorClass;
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GType gdk_quartz_monitor_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_QUARTZ_MONITOR_H__ */
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
#include "gdkprivate-quartz.h"
|
||||
#include "gdkdisplay-quartz.h"
|
||||
#include "gdkmonitor-quartz.h"
|
||||
|
||||
|
||||
/* A couple of notes about this file are in order. In GDK, a
|
||||
@@ -66,17 +68,18 @@ static void display_reconfiguration_callback (CGDirectDisplayID displ
|
||||
CGDisplayChangeSummaryFlags flags,
|
||||
void *userInfo);
|
||||
|
||||
static gint get_mm_from_pixels (NSScreen *screen, int pixels);
|
||||
|
||||
G_DEFINE_TYPE (GdkQuartzScreen, gdk_quartz_screen, GDK_TYPE_SCREEN);
|
||||
|
||||
static void
|
||||
gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
|
||||
{
|
||||
GdkScreen *screen = GDK_SCREEN (quartz_screen);
|
||||
NSScreen *nsscreen;
|
||||
NSDictionary *dd = [[[NSScreen screens] objectAtIndex:0] deviceDescription];
|
||||
NSSize size = [[dd valueForKey:NSDeviceResolution] sizeValue];
|
||||
|
||||
nsscreen = [[NSScreen screens] objectAtIndex:0];
|
||||
_gdk_screen_set_resolution (screen,
|
||||
72.0 * [nsscreen userSpaceScaleFactor]);
|
||||
_gdk_screen_set_resolution (screen, size.width);
|
||||
|
||||
gdk_quartz_screen_calculate_layout (quartz_screen);
|
||||
|
||||
@@ -103,21 +106,16 @@ gdk_quartz_screen_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (gdk_quartz_screen_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_screen_screen_rects_free (GdkQuartzScreen *screen)
|
||||
{
|
||||
screen->n_screens = 0;
|
||||
g_clear_pointer (&screen->screen_rects, g_free);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_screen_finalize (GObject *object)
|
||||
{
|
||||
GdkQuartzScreen *screen = GDK_QUARTZ_SCREEN (object);
|
||||
|
||||
gdk_quartz_screen_screen_rects_free (screen);
|
||||
G_OBJECT_CLASS (gdk_quartz_screen_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
/* Protocol to build cleanly for OSX < 10.7 */
|
||||
@protocol ScaleFactor
|
||||
- (CGFloat) backingScaleFactor;
|
||||
@end
|
||||
|
||||
static void
|
||||
gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
||||
@@ -125,11 +123,14 @@ gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
||||
NSArray *array;
|
||||
int i;
|
||||
int max_x, max_y;
|
||||
GdkDisplay *display = gdk_screen_get_display (GDK_SCREEN (screen));
|
||||
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (display);
|
||||
|
||||
g_ptr_array_free (display_quartz->monitors, TRUE);
|
||||
display_quartz->monitors = g_ptr_array_new_with_free_func (g_object_unref);
|
||||
|
||||
GDK_QUARTZ_ALLOC_POOL;
|
||||
|
||||
gdk_quartz_screen_screen_rects_free (screen);
|
||||
|
||||
array = [NSScreen screens];
|
||||
|
||||
screen->width = 0;
|
||||
@@ -144,6 +145,12 @@ gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
||||
*/
|
||||
for (i = 0; i < [array count]; i++)
|
||||
{
|
||||
GdkQuartzMonitor *monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
|
||||
"display", display,
|
||||
NULL);
|
||||
g_ptr_array_add (display_quartz->monitors, monitor);
|
||||
monitor->nsscreen = [array objectAtIndex:i];
|
||||
|
||||
NSRect rect = [[array objectAtIndex:i] frame];
|
||||
|
||||
screen->min_x = MIN (screen->min_x, rect.origin.x);
|
||||
@@ -156,22 +163,31 @@ gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
||||
screen->width = max_x - screen->min_x;
|
||||
screen->height = max_y - screen->min_y;
|
||||
|
||||
screen->n_screens = [array count];
|
||||
screen->screen_rects = g_new0 (GdkRectangle, screen->n_screens);
|
||||
|
||||
for (i = 0; i < screen->n_screens; i++)
|
||||
for (i = 0; i < [array count] ; i++)
|
||||
{
|
||||
NSScreen *nsscreen;
|
||||
NSRect rect;
|
||||
GdkMonitor *monitor;
|
||||
|
||||
monitor = GDK_MONITOR(display_quartz->monitors->pdata[i]);
|
||||
nsscreen = [array objectAtIndex:i];
|
||||
rect = [nsscreen frame];
|
||||
|
||||
screen->screen_rects[i].x = rect.origin.x - screen->min_x;
|
||||
screen->screen_rects[i].y
|
||||
monitor->geometry.x = rect.origin.x - screen->min_x;
|
||||
monitor->geometry.y
|
||||
= screen->height - (rect.origin.y + rect.size.height) + screen->min_y;
|
||||
screen->screen_rects[i].width = rect.size.width;
|
||||
screen->screen_rects[i].height = rect.size.height;
|
||||
monitor->geometry.width = rect.size.width;
|
||||
monitor->geometry.height = rect.size.height;
|
||||
if (gdk_quartz_osx_version() >= GDK_OSX_LION)
|
||||
monitor->scale_factor = [(id <ScaleFactor>) nsscreen backingScaleFactor];
|
||||
else
|
||||
monitor->scale_factor = 1;
|
||||
monitor->width_mm = get_mm_from_pixels(nsscreen, monitor->geometry.width);
|
||||
monitor->height_mm = get_mm_from_pixels(nsscreen, monitor->geometry.height);
|
||||
monitor->refresh_rate = 0; // unknown
|
||||
monitor->manufacturer = NULL; // unknown
|
||||
monitor->model = NULL; // unknown
|
||||
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN; // unknown
|
||||
}
|
||||
|
||||
GDK_QUARTZ_RELEASE_POOL;
|
||||
@@ -318,17 +334,35 @@ gdk_quartz_screen_get_height (GdkScreen *screen)
|
||||
static gint
|
||||
get_mm_from_pixels (NSScreen *screen, int pixels)
|
||||
{
|
||||
/* userSpaceScaleFactor is in "pixels per point",
|
||||
* 72 is the number of points per inch,
|
||||
* and 25.4 is the number of millimeters per inch.
|
||||
*/
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
|
||||
float dpi = [screen userSpaceScaleFactor] * 72.0;
|
||||
#else
|
||||
float dpi = 96.0 / 72.0;
|
||||
#endif
|
||||
const float mm_per_inch = 25.4;
|
||||
NSDictionary *dd = [[[NSScreen screens] objectAtIndex:0] deviceDescription];
|
||||
NSSize size = [[dd valueForKey:NSDeviceResolution] sizeValue];
|
||||
float dpi = size.width;
|
||||
return (pixels / dpi) * mm_per_inch;
|
||||
}
|
||||
|
||||
return (pixels / dpi) * 25.4;
|
||||
static gchar *
|
||||
gdk_quartz_screen_make_display_name (GdkScreen *screen)
|
||||
{
|
||||
return g_strdup (gdk_display_get_name (_gdk_display));
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gdk_quartz_screen_get_active_window (GdkScreen *screen)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GList *
|
||||
gdk_quartz_screen_get_window_stack (GdkScreen *screen)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_quartz_screen_is_composited (GdkScreen *screen)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static NSScreen *
|
||||
@@ -361,127 +395,6 @@ gdk_quartz_screen_get_height_mm (GdkScreen *screen)
|
||||
GDK_QUARTZ_SCREEN (screen)->height);
|
||||
}
|
||||
|
||||
static gint
|
||||
gdk_quartz_screen_get_n_monitors (GdkScreen *screen)
|
||||
{
|
||||
return GDK_QUARTZ_SCREEN (screen)->n_screens;
|
||||
}
|
||||
|
||||
static gint
|
||||
gdk_quartz_screen_get_primary_monitor (GdkScreen *screen)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gint
|
||||
gdk_quartz_screen_get_monitor_width_mm (GdkScreen *screen,
|
||||
gint monitor_num)
|
||||
{
|
||||
return get_mm_from_pixels (get_nsscreen_for_monitor (monitor_num),
|
||||
GDK_QUARTZ_SCREEN (screen)->screen_rects[monitor_num].width);
|
||||
}
|
||||
|
||||
static gint
|
||||
gdk_quartz_screen_get_monitor_height_mm (GdkScreen *screen,
|
||||
gint monitor_num)
|
||||
{
|
||||
return get_mm_from_pixels (get_nsscreen_for_monitor (monitor_num),
|
||||
GDK_QUARTZ_SCREEN (screen)->screen_rects[monitor_num].height);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
gdk_quartz_screen_get_monitor_plug_name (GdkScreen *screen,
|
||||
gint monitor_num)
|
||||
{
|
||||
/* FIXME: Is there some useful name we could use here? */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_screen_get_monitor_geometry (GdkScreen *screen,
|
||||
gint monitor_num,
|
||||
GdkRectangle *dest)
|
||||
{
|
||||
*dest = GDK_QUARTZ_SCREEN (screen)->screen_rects[monitor_num];
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_screen_get_monitor_workarea (GdkScreen *screen,
|
||||
gint monitor_num,
|
||||
GdkRectangle *dest)
|
||||
{
|
||||
GdkQuartzScreen *quartz_screen = GDK_QUARTZ_SCREEN (screen);
|
||||
NSArray *array;
|
||||
NSScreen *nsscreen;
|
||||
NSRect rect;
|
||||
|
||||
GDK_QUARTZ_ALLOC_POOL;
|
||||
|
||||
array = [NSScreen screens];
|
||||
nsscreen = [array objectAtIndex:monitor_num];
|
||||
rect = [nsscreen visibleFrame];
|
||||
|
||||
dest->x = rect.origin.x - quartz_screen->min_x;
|
||||
dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
|
||||
dest->width = rect.size.width;
|
||||
dest->height = rect.size.height;
|
||||
|
||||
GDK_QUARTZ_RELEASE_POOL;
|
||||
}
|
||||
|
||||
/* Protocol to build cleanly for OSX < 10.7 */
|
||||
@protocol ScaleFactor
|
||||
- (CGFloat) backingScaleFactor;
|
||||
@end
|
||||
|
||||
gint
|
||||
_gdk_quartz_screen_get_monitor_scale_factor (GdkScreen *screen,
|
||||
gint monitor_num)
|
||||
{
|
||||
GdkQuartzScreen *quartz_screen;
|
||||
NSArray *array;
|
||||
NSScreen *nsscreen;
|
||||
gint scale_factor = 1;
|
||||
|
||||
quartz_screen = GDK_QUARTZ_SCREEN (screen);
|
||||
|
||||
GDK_QUARTZ_ALLOC_POOL;
|
||||
|
||||
array = [NSScreen screens];
|
||||
nsscreen = [array objectAtIndex:monitor_num];
|
||||
|
||||
if (gdk_quartz_osx_version() >= GDK_OSX_LION)
|
||||
scale_factor = [(id <ScaleFactor>) nsscreen backingScaleFactor];
|
||||
|
||||
GDK_QUARTZ_RELEASE_POOL;
|
||||
|
||||
return scale_factor;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
gdk_quartz_screen_make_display_name (GdkScreen *screen)
|
||||
{
|
||||
return g_strdup (gdk_display_get_name (_gdk_display));
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gdk_quartz_screen_get_active_window (GdkScreen *screen)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GList *
|
||||
gdk_quartz_screen_get_window_stack (GdkScreen *screen)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_quartz_screen_is_composited (GdkScreen *screen)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_screen_class_init (GdkQuartzScreenClass *klass)
|
||||
{
|
||||
@@ -498,13 +411,6 @@ gdk_quartz_screen_class_init (GdkQuartzScreenClass *klass)
|
||||
screen_class->get_height_mm = gdk_quartz_screen_get_height_mm;
|
||||
screen_class->get_number = gdk_quartz_screen_get_number;
|
||||
screen_class->get_root_window = gdk_quartz_screen_get_root_window;
|
||||
screen_class->get_n_monitors = gdk_quartz_screen_get_n_monitors;
|
||||
screen_class->get_primary_monitor = gdk_quartz_screen_get_primary_monitor;
|
||||
screen_class->get_monitor_width_mm = gdk_quartz_screen_get_monitor_width_mm;
|
||||
screen_class->get_monitor_height_mm = gdk_quartz_screen_get_monitor_height_mm;
|
||||
screen_class->get_monitor_plug_name = gdk_quartz_screen_get_monitor_plug_name;
|
||||
screen_class->get_monitor_geometry = gdk_quartz_screen_get_monitor_geometry;
|
||||
screen_class->get_monitor_workarea = gdk_quartz_screen_get_monitor_workarea;
|
||||
screen_class->is_composited = gdk_quartz_screen_is_composited;
|
||||
screen_class->make_display_name = gdk_quartz_screen_make_display_name;
|
||||
screen_class->get_active_window = gdk_quartz_screen_get_active_window;
|
||||
@@ -522,5 +428,4 @@ gdk_quartz_screen_class_init (GdkQuartzScreenClass *klass)
|
||||
screen_class->query_depths = _gdk_quartz_screen_query_depths;
|
||||
screen_class->query_visual_types = _gdk_quartz_screen_query_visual_types;
|
||||
screen_class->list_visuals = _gdk_quartz_screen_list_visuals;
|
||||
screen_class->get_monitor_scale_factor = _gdk_quartz_screen_get_monitor_scale_factor;
|
||||
}
|
||||
|
@@ -36,9 +36,6 @@ struct _GdkQuartzScreen
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
int n_screens;
|
||||
GdkRectangle *screen_rects;
|
||||
|
||||
guint screen_changed_id;
|
||||
|
||||
guint emit_monitors_changed : 1;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user