Compare commits
560 Commits
css-variab
...
3.22.14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
348
NEWS
348
NEWS
@@ -1,3 +1,351 @@
|
|||||||
|
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
|
Overview of Changes in GTK+ 3.22.1
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,17 @@
|
|||||||
# Author: Fan, Chun-wei
|
# Author: Fan, Chun-wei
|
||||||
# November 05, 2012
|
# November 05, 2012
|
||||||
|
|
||||||
# MSVC_VER_LONG: Long Version of Visual Studio (2012, 2013, 14 and so on)
|
# MSVC_VER_LONG: Long Version of target 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_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017)
|
||||||
# MSVC_FORMAT_VER: Use 12 for MSVC 2012 through 2015
|
# 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:
|
%.sln:
|
||||||
sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
|
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:
|
%.vcxproj:
|
||||||
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
|
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 \
|
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
|
fi
|
||||||
|
|
||||||
%.props:
|
%.props: $(top_builddir)/build/win32/vs10/Makefile
|
||||||
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
|
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)/$@; \
|
sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||||
else \
|
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: $(top_builddir)/build/win32/vs9/$(1).vcproj
|
||||||
$(1).vs10.sourcefiles.filters: $(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/vs9/$(1).vcproj
|
||||||
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj
|
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj
|
||||||
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj.filters
|
-$(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 \
|
for F in $(_proj_files); do \
|
||||||
case $$$$F in \
|
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/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/vs9/$(1).headers
|
||||||
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vs10.headers
|
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vs10.headers
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ SUBDIRS = \
|
|||||||
vs10 \
|
vs10 \
|
||||||
vs11 \
|
vs11 \
|
||||||
vs12 \
|
vs12 \
|
||||||
vs14
|
vs14 \
|
||||||
|
vs15
|
||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
detectenv-msvc.mak \
|
detectenv-msvc.mak \
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ def main(argv):
|
|||||||
atk_min_ver = '2.15.1'
|
atk_min_ver = '2.15.1'
|
||||||
cairo_min_ver = '1.14.0'
|
cairo_min_ver = '1.14.0'
|
||||||
gdk_pixbuf_min_ver = '2.30.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'
|
glib_min_ver = '2.45.8'
|
||||||
|
|
||||||
cairo_backends = 'cairo-win32'
|
cairo_backends = 'cairo-win32'
|
||||||
@@ -41,14 +41,14 @@ def main(argv):
|
|||||||
gdk_args = gdk_parser.parse_args()
|
gdk_args = gdk_parser.parse_args()
|
||||||
if getattr(gdk_args, 'broadway', None) is 1:
|
if getattr(gdk_args, 'broadway', None) is 1:
|
||||||
# On Visual Studio, we link to zlib1.lib
|
# On Visual Studio, we link to zlib1.lib
|
||||||
broadway_extra_libs = '-lzlib1'
|
broadway_extra_libs = ' -lzlib1'
|
||||||
gdk_backends += ' broadway'
|
gdk_backends += ' broadway'
|
||||||
cairo_backends += ' cairo'
|
cairo_backends += ' cairo'
|
||||||
|
|
||||||
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
|
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
|
||||||
'@GDK_BACKENDS@': gdk_backends}
|
'@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 >= ' + cairo_min_ver + ' ' + \
|
||||||
'cairo-gobject >= ' + cairo_min_ver
|
'cairo-gobject >= ' + cairo_min_ver
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,15 @@ valid_actions = ['remove-prefix',
|
|||||||
'replace-str',
|
'replace-str',
|
||||||
'remove-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):
|
def replace_multi(src, dest, replace_items):
|
||||||
with open(src, 'r') as s:
|
with open_file(src, 'r') as s:
|
||||||
with open(dest, 'w') as d:
|
with open_file(dest, 'w') as d:
|
||||||
for line in s:
|
for line in s:
|
||||||
replace_dict = dict((re.escape(key), value) \
|
replace_dict = dict((re.escape(key), value) \
|
||||||
for key, value in replace_items.items())
|
for key, value in replace_items.items())
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ DISTCLEANFILES = \
|
|||||||
$(GENERATED_ITEMS)
|
$(GENERATED_ITEMS)
|
||||||
|
|
||||||
gtk3-install.props: $(top_srcdir)/build/win32/vs10/gtk3-install.propsin $(MSVC10_HEADERS_LISTS)
|
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 >$@
|
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gtk3-install.propsin >$@
|
||||||
rm $(MSVC10_HEADERS_LISTS)
|
rm $(MSVC10_HEADERS_LISTS)
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}</ProjectGuid>
|
<ProjectGuid>{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}</ProjectGuid>
|
||||||
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
|
<RootNamespace>gtkbuildertool</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{9F22107A-3EF7-4B52-B269-747B65307F36}</ProjectGuid>
|
<ProjectGuid>{9F22107A-3EF7-4B52-B269-747B65307F36}</ProjectGuid>
|
||||||
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
|
<RootNamespace>gtkquerysettings</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{FC98AF16-4C68-42DF-906B-93A6804C198A}</ProjectGuid>
|
<ProjectGuid>{FC98AF16-4C68-42DF-906B-93A6804C198A}</ProjectGuid>
|
||||||
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
|
<RootNamespace>gtkupdateiconcache</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ if "$(Configuration)" == "Debug_Broadway" goto DoDebug
|
|||||||
|
|
||||||
mkdir .\Release\$(Platform)\bin
|
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\
|
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
|
:DONE_BIN
|
||||||
|
|
||||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
|
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
|
||||||
|
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-3.0.pc"
|
||||||
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
|
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
|
||||||
</GtkDoInstallBin>
|
</GtkDoInstallBin>
|
||||||
<GtkDoInstall>
|
<GtkDoInstall>
|
||||||
@@ -110,18 +112,9 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
|
|||||||
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
|
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
|
||||||
#include "gailutil-3.vs10.headers"
|
#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
|
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\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
|
|
||||||
mkdir $(CopyDir)\share\glib-2.0\schemas
|
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.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||||
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.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>
|
<Project>{f280bf1a-777a-4fb5-8005-dfbe04621edb}</Project>
|
||||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="gtk-udpate-icon-cache.vcxproj">
|
<ProjectReference Include="gtk-update-icon-cache.vcxproj">
|
||||||
<Project>{fc98af16-4c68-42df-906b-93a6804c198a}</Project>
|
<Project>{fc98af16-4c68-42df-906b-93a6804c198a}</Project>
|
||||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
</ProjectReference>
|
</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

|
:DoRelease

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

|
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\

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

|
||||||
goto END

|
goto END

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

|
|||||||
:DONE_BIN

|
:DONE_BIN

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

|
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

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

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

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

|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
|||||||
24
configure.ac
24
configure.ac
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
m4_define([gtk_major_version], [3])
|
m4_define([gtk_major_version], [3])
|
||||||
m4_define([gtk_minor_version], [22])
|
m4_define([gtk_minor_version], [22])
|
||||||
m4_define([gtk_micro_version], [1])
|
m4_define([gtk_micro_version], [14])
|
||||||
m4_define([gtk_interface_age], [1])
|
m4_define([gtk_interface_age], [14])
|
||||||
m4_define([gtk_binary_age],
|
m4_define([gtk_binary_age],
|
||||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||||
m4_define([gtk_version],
|
m4_define([gtk_version],
|
||||||
@@ -81,7 +81,7 @@ AC_SUBST(INTROSPECTION_REQUIRED_VERSION)
|
|||||||
# Save this value here, since automake will set cflags later
|
# Save this value here, since automake will set cflags later
|
||||||
cflags_set=${CFLAGS+set}
|
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])
|
AM_MAINTAINER_MODE([enable])
|
||||||
|
|
||||||
# Support silent build rules. Disable
|
# Support silent build rules. Disable
|
||||||
@@ -464,7 +464,7 @@ else
|
|||||||
AM_CONDITIONAL(USE_WAYLAND, false)
|
AM_CONDITIONAL(USE_WAYLAND, false)
|
||||||
fi
|
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
|
if test "$enable_mir_backend" = "maybe" ; then
|
||||||
PKG_CHECK_EXISTS($MIR_DEPENDENCIES, [have_mir_deps=yes], [have_mir_deps=no])
|
PKG_CHECK_EXISTS($MIR_DEPENDENCIES, [have_mir_deps=yes], [have_mir_deps=no])
|
||||||
AC_MSG_CHECKING([for MIR_DEPENDENCIES])
|
AC_MSG_CHECKING([for MIR_DEPENDENCIES])
|
||||||
@@ -1815,6 +1815,14 @@ case "$host" in
|
|||||||
esac
|
esac
|
||||||
AC_SUBST(GDK_HIDDEN_VISIBILITY_CFLAGS)
|
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
|
# Output commands
|
||||||
##################################################
|
##################################################
|
||||||
@@ -1885,6 +1893,13 @@ if test "x${enable_Bsymbolic}" = "xyes" ; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(GTK_LINK_FLAGS)
|
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([
|
AC_CONFIG_FILES([
|
||||||
README
|
README
|
||||||
INSTALL
|
INSTALL
|
||||||
@@ -1947,6 +1962,7 @@ build/win32/vs10/gtk3-version-paths.props
|
|||||||
build/win32/vs11/Makefile
|
build/win32/vs11/Makefile
|
||||||
build/win32/vs12/Makefile
|
build/win32/vs12/Makefile
|
||||||
build/win32/vs14/Makefile
|
build/win32/vs14/Makefile
|
||||||
|
build/win32/vs15/Makefile
|
||||||
gdk/Makefile
|
gdk/Makefile
|
||||||
gdk/broadway/Makefile
|
gdk/broadway/Makefile
|
||||||
gdk/x11/Makefile
|
gdk/x11/Makefile
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ demos_base = \
|
|||||||
event_axes.c \
|
event_axes.c \
|
||||||
expander.c \
|
expander.c \
|
||||||
filtermodel.c \
|
filtermodel.c \
|
||||||
|
fishbowl.c \
|
||||||
foreigndrawing.c \
|
foreigndrawing.c \
|
||||||
gestures.c \
|
gestures.c \
|
||||||
glarea.c \
|
glarea.c \
|
||||||
@@ -63,6 +64,7 @@ demos_base = \
|
|||||||
spinbutton.c \
|
spinbutton.c \
|
||||||
spinner.c \
|
spinner.c \
|
||||||
stack.c \
|
stack.c \
|
||||||
|
tabs.c \
|
||||||
textmask.c \
|
textmask.c \
|
||||||
textview.c \
|
textview.c \
|
||||||
textscroll.c \
|
textscroll.c \
|
||||||
@@ -136,6 +138,8 @@ nodist_gtk3_demo_SOURCES = demos.h
|
|||||||
|
|
||||||
gtk3_demo_SOURCES = \
|
gtk3_demo_SOURCES = \
|
||||||
$(demos) \
|
$(demos) \
|
||||||
|
gtkfishbowl.c \
|
||||||
|
gtkfishbowl.h \
|
||||||
demo_resources.c \
|
demo_resources.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,11 @@
|
|||||||
<file>zoom_in_cursor.png</file>
|
<file>zoom_in_cursor.png</file>
|
||||||
<file>zoom_out_cursor.png</file>
|
<file>zoom_out_cursor.png</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
|
<gresource prefix="/fishbowl">
|
||||||
|
<file>fishbowl.ui</file>
|
||||||
|
<file>gtkfishbowl.c</file>
|
||||||
|
<file>gtkfishbowl.h</file>
|
||||||
|
</gresource>
|
||||||
<gresource prefix="/iconview">
|
<gresource prefix="/iconview">
|
||||||
<file preprocess="to-pixdata">gnome-fs-directory.png</file>
|
<file preprocess="to-pixdata">gnome-fs-directory.png</file>
|
||||||
<file preprocess="to-pixdata">gnome-fs-regular.png</file>
|
<file preprocess="to-pixdata">gnome-fs-regular.png</file>
|
||||||
@@ -150,6 +155,7 @@
|
|||||||
<file>event_axes.c</file>
|
<file>event_axes.c</file>
|
||||||
<file>expander.c</file>
|
<file>expander.c</file>
|
||||||
<file>filtermodel.c</file>
|
<file>filtermodel.c</file>
|
||||||
|
<file>fishbowl.c</file>
|
||||||
<file>flowbox.c</file>
|
<file>flowbox.c</file>
|
||||||
<file>foreigndrawing.c</file>
|
<file>foreigndrawing.c</file>
|
||||||
<file>font_features.c</file>
|
<file>font_features.c</file>
|
||||||
@@ -188,6 +194,7 @@
|
|||||||
<file>stack.c</file>
|
<file>stack.c</file>
|
||||||
<file>spinbutton.c</file>
|
<file>spinbutton.c</file>
|
||||||
<file>spinner.c</file>
|
<file>spinner.c</file>
|
||||||
|
<file>tabs.c</file>
|
||||||
<file>textview.c</file>
|
<file>textview.c</file>
|
||||||
<file>textscroll.c</file>
|
<file>textscroll.c</file>
|
||||||
<file>theming_style_classes.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" */
|
/* This information is taken from the GtkSpinButton docs, see "CSS nodes" */
|
||||||
spin_context = get_style (NULL, "spinbutton.horizontal:focus");
|
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");
|
up_context = get_style (spin_context, "button.up:focus:active");
|
||||||
down_context = get_style (spin_context, "button.down:focus");
|
down_context = get_style (spin_context, "button.down:focus");
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,17 @@ static gdouble swipe_x = 0;
|
|||||||
static gdouble swipe_y = 0;
|
static gdouble swipe_y = 0;
|
||||||
static gboolean long_pressed = FALSE;
|
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
|
static void
|
||||||
swipe_gesture_swept (GtkGestureSwipe *gesture,
|
swipe_gesture_swept (GtkGestureSwipe *gesture,
|
||||||
gdouble velocity_x,
|
gdouble velocity_x,
|
||||||
@@ -161,6 +172,19 @@ do_gestures (GtkWidget *do_widget)
|
|||||||
GTK_PHASE_BUBBLE);
|
GTK_PHASE_BUBBLE);
|
||||||
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
|
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 */
|
/* Long press */
|
||||||
gesture = gtk_gesture_long_press_new (drawing_area);
|
gesture = gtk_gesture_long_press_new (drawing_area);
|
||||||
g_signal_connect (gesture, "pressed",
|
g_signal_connect (gesture, "pressed",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
precision highp float;
|
precision mediump float;
|
||||||
|
|
||||||
void main() {
|
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;
|
GtkAdjustment *adj;
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE);
|
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
|
|
||||||
switch (axis)
|
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
|
/* Links
|
||||||
*
|
*
|
||||||
* GtkLabel can show hyperlinks. The default action is to call
|
* 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.
|
* this with a custom handler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ do_pickers (GtkWidget *do_widget)
|
|||||||
gtk_widget_set_hexpand (label, TRUE);
|
gtk_widget_set_hexpand (label, TRUE);
|
||||||
picker = gtk_file_chooser_button_new ("Pick a File",
|
picker = gtk_file_chooser_button_new ("Pick a File",
|
||||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
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), label, 0, 2, 1, 1);
|
||||||
gtk_grid_attach (GTK_GRID (table), picker, 1, 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;
|
||||||
|
}
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
</object>
|
</object>
|
||||||
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
|
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
|
||||||
<property name="title" translatable="yes">Icon Browser</property>
|
<property name="title" translatable="yes">Icon Browser</property>
|
||||||
<property name="default-width">600</property>
|
<property name="default-width">1024</property>
|
||||||
<property name="default-height">800</property>
|
<property name="default-height">768</property>
|
||||||
<signal name="key-press-event" handler="key_press_event_cb"/>
|
<signal name="key-press-event" handler="key_press_event_cb"/>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="header">
|
<object class="GtkHeaderBar" id="header">
|
||||||
|
|||||||
@@ -1637,6 +1637,16 @@ scale_format_value (GtkScale *scale, gdouble value)
|
|||||||
return g_strdup_printf ("%0.*f", 1, 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
|
static void
|
||||||
activate (GApplication *app)
|
activate (GApplication *app)
|
||||||
{
|
{
|
||||||
@@ -1910,6 +1920,12 @@ activate (GApplication *app)
|
|||||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "decrease_button");
|
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "decrease_button");
|
||||||
g_object_set_data (G_OBJECT (widget), "decrease_button", widget2);
|
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));
|
gtk_widget_show_all (GTK_WIDGET (window));
|
||||||
|
|
||||||
g_object_unref (builder);
|
g_object_unref (builder);
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
.circular-button {
|
|
||||||
border-radius: 20px;
|
|
||||||
-gtk-outline-radius: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.small-button {
|
.small-button {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
outline-width: 0;
|
outline-width: 0;
|
||||||
|
|||||||
@@ -103,8 +103,9 @@
|
|||||||
<property name="page_increment">10</property>
|
<property name="page_increment">10</property>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkAdjustment" id="adjustment3">
|
<object class="GtkAdjustment" id="adjustment3">
|
||||||
|
<property name="lower">0</property>
|
||||||
<property name="upper">4</property>
|
<property name="upper">4</property>
|
||||||
<property name="value">1</property>
|
<property name="value">2</property>
|
||||||
<property name="step_increment">1</property>
|
<property name="step_increment">1</property>
|
||||||
<property name="page_increment">1</property>
|
<property name="page_increment">1</property>
|
||||||
</object>
|
</object>
|
||||||
@@ -3107,7 +3108,7 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<property name="visible">1</property>
|
<property name="visible">1</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="image-button"/>
|
<class name="image-button"/>
|
||||||
<class name="circular-button"/>
|
<class name="circular"/>
|
||||||
</style>
|
</style>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage">
|
<object class="GtkImage">
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
<releaseinfo>
|
<releaseinfo>
|
||||||
This document is for the GDK 3 library, version &version;
|
This document is for the GDK 3 library, version &version;
|
||||||
The latest versions can be found online at
|
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,
|
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>
|
</releaseinfo>
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
|
|
||||||
|
|||||||
@@ -278,8 +278,6 @@ GTKDOC_LIBS = \
|
|||||||
# Extra options to supply to gtkdoc-mkdb
|
# Extra options to supply to gtkdoc-mkdb
|
||||||
MKDB_OPTIONS=--output-format=xml --name-space=gtk
|
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)
|
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
|
||||||
content_files = \
|
content_files = \
|
||||||
broadway.xml \
|
broadway.xml \
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ How to compile GTK+ itself
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<ulink
|
<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
|
is a tool for tracking the compilation flags needed for
|
||||||
libraries that are used by the GTK+ libraries. (For each
|
libraries that are used by the GTK+ libraries. (For each
|
||||||
library, a small <literal>.pc</literal> text file is installed
|
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
|
The GTK+ makefiles will mostly work with different versions
|
||||||
of <command>make</command>, however, there tends to be
|
of <command>make</command>, however, there tends to be
|
||||||
a few incompatibilities, so the GTK+ team recommends
|
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
|
make</ulink> if you don't already have it on your system
|
||||||
and using it. (It may be called <command>gmake</command>
|
and using it. (It may be called <command>gmake</command>
|
||||||
rather than <command>make</command>.)
|
rather than <command>make</command>.)
|
||||||
@@ -171,24 +171,24 @@ How to compile GTK+ itself
|
|||||||
The GLib library provides core non-graphical functionality
|
The GLib library provides core non-graphical functionality
|
||||||
such as high level data types, Unicode manipulation, and
|
such as high level data types, Unicode manipulation, and
|
||||||
an object and type system to C programs. It is available
|
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
|
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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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.
|
provides facilities for loading images in a variety of file formats.
|
||||||
It is available
|
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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<ulink url="http://www.pango.org">Pango</ulink> is a library
|
<ulink url="http://www.pango.org">Pango</ulink> is a library
|
||||||
for internationalized text handling. It is available
|
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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -197,7 +197,7 @@ How to compile GTK+ itself
|
|||||||
interfaces allowing accessibility technologies such as
|
interfaces allowing accessibility technologies such as
|
||||||
screen readers to interact with a graphical user interface.
|
screen readers to interact with a graphical user interface.
|
||||||
It is available
|
It is available
|
||||||
<ulink url="http://download.gnome.org/sources/atk/">here</ulink>.
|
<ulink url="https://download.gnome.org/sources/atk/">here</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -205,7 +205,7 @@ How to compile GTK+ itself
|
|||||||
<ulink url="https://wiki.gnome.org/Projects/GObjectIntrospection">Gobject Introspection</ulink>
|
<ulink url="https://wiki.gnome.org/Projects/GObjectIntrospection">Gobject Introspection</ulink>
|
||||||
is a framework for making introspection data available to
|
is a framework for making introspection data available to
|
||||||
language bindings. It is available
|
language bindings. It is available
|
||||||
<ulink url="http://download.gnome.org/sources/gobject-introspection/">here</ulink>.
|
<ulink url="https://download.gnome.org/sources/gobject-introspection/">here</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
@@ -213,7 +213,7 @@ How to compile GTK+ itself
|
|||||||
<title>External dependencies</title>
|
<title>External dependencies</title>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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
|
libiconv library</ulink> is needed to build GLib if your
|
||||||
system doesn't have the <function>iconv()</function>
|
system doesn't have the <function>iconv()</function>
|
||||||
function for doing conversion between character
|
function for doing conversion between character
|
||||||
@@ -224,7 +224,7 @@ How to compile GTK+ itself
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The libintl library from the <ulink
|
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
|
package</ulink> is needed if your system doesn't have the
|
||||||
<function>gettext()</function> functionality for handling
|
<function>gettext()</function> functionality for handling
|
||||||
message translation databases.
|
message translation databases.
|
||||||
@@ -241,14 +241,14 @@ How to compile GTK+ itself
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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
|
library provides Pango with a standard way of locating
|
||||||
fonts and matching them against font names.
|
fonts and matching them against font names.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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
|
is a graphics library that supports vector graphics and image
|
||||||
compositing. Both Pango and GTK+ use cairo for all of their
|
compositing. Both Pango and GTK+ use cairo for all of their
|
||||||
drawing.
|
drawing.
|
||||||
@@ -263,13 +263,13 @@ How to compile GTK+ itself
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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.
|
are needed to build GTK+ with the Wayland backend.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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
|
package is not a hard dependency of GTK+, but it contains definitions
|
||||||
for mime types that are used by GIO and, indirectly, by GTK+.
|
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
|
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>
|
<para>
|
||||||
We loosely follow the CSS
|
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.
|
specification in the formatting of syntax productions.
|
||||||
<simplelist>
|
<simplelist>
|
||||||
<member>Nonterminals are enclosed in angle backets (〈〉), all other strings that are not listed here are literals</member>
|
<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>
|
<para>
|
||||||
To learn more about the @import rule, you can read the
|
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.
|
module of the CSS specification.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -360,85 +360,85 @@ checkbutton:indeterminate {
|
|||||||
<row>
|
<row>
|
||||||
<entry>*</entry>
|
<entry>*</entry>
|
||||||
<entry>any node</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E</entry>
|
<entry>E</entry>
|
||||||
<entry>any node with name 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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E.class</entry>
|
<entry>E.class</entry>
|
||||||
<entry>any E node with the given style 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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E#id</entry>
|
<entry>E#id</entry>
|
||||||
<entry>any E node with the given 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>
|
<entry>GTK+ uses the widget name as ID</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:nth‑child(〈nth‑child〉)</entry>
|
<entry>E:nth‑child(〈nth‑child〉)</entry>
|
||||||
<entry>any E node which is the n-th child of its parent node</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:nth‑last‑child(〈nth‑child〉)</entry>
|
<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>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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:first‑child</entry>
|
<entry>E:first‑child</entry>
|
||||||
<entry>any E node which is the first child of its parent node</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:last‑child</entry>
|
<entry>E:last‑child</entry>
|
||||||
<entry>any E node which is the last child of its parent node</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:only‑child</entry>
|
<entry>E:only‑child</entry>
|
||||||
<entry>any E node which is the only child of its parent node</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>
|
<entry>Equivalent to E:first-child:last-child</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:link, E:visited</entry>
|
<entry>E:link, E:visited</entry>
|
||||||
<entry>any E node which represents a hyperlink, not yet visited (:link) or already visited (: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>
|
<entry>Corresponds to GTK_STATE_FLAG_LINK and GTK_STATE_FLAGS_VISITED</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:active, E:hover, E:focus</entry>
|
<entry>E:active, E:hover, E:focus</entry>
|
||||||
<entry>any E node which is part of a widget with the corresponding state</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>
|
<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>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:disabled</entry>
|
<entry>E:disabled</entry>
|
||||||
<entry>any E node which is part of a widget with is 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><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>
|
<entry>Corresponds to GTK_STATE_FLAG_INSENSITIVE; GTK+ also allows E:insensitive</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:checked</entry>
|
<entry>E:checked</entry>
|
||||||
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is 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>
|
<entry>Corresponds to GTK_STATE_FLAG_CHECKED</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E:indeterminate</entry>
|
<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>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>
|
<ulink url="https://drafts.csswg.org/selectors/#indeterminate">CSS4</ulink></entry>
|
||||||
<entry>Corresponds to GTK_STATE_FLAG_INCONSISTENT; GTK+ also allows E:inconsistent</entry>
|
<entry>Corresponds to GTK_STATE_FLAG_INCONSISTENT; GTK+ also allows E:inconsistent</entry>
|
||||||
</row>
|
</row>
|
||||||
@@ -451,7 +451,7 @@ checkbutton:indeterminate {
|
|||||||
<row>
|
<row>
|
||||||
<entry>E:not(〈selector〉)</entry>
|
<entry>E:not(〈selector〉)</entry>
|
||||||
<entry>any E node which does not match the simple selector 〈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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
@@ -469,25 +469,25 @@ checkbutton:indeterminate {
|
|||||||
<row>
|
<row>
|
||||||
<entry>E F</entry>
|
<entry>E F</entry>
|
||||||
<entry>any F node which is a descendent of an E node</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E > F</entry>
|
<entry>E > F</entry>
|
||||||
<entry>any F node which is a child of an E node</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E ~ F</entry>
|
<entry>E ~ F</entry>
|
||||||
<entry>any F node which is preceded by an E node</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>E + F</entry>
|
<entry>E + F</entry>
|
||||||
<entry>any F node which is immediately preceded by an E node</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -499,7 +499,7 @@ checkbutton:indeterminate {
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
To learn more about selectors in CSS, read the
|
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.
|
module of the CSS specification.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -532,7 +532,7 @@ checkbutton:indeterminate {
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
For a list of valid color names and for more background on colors in
|
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.
|
module of the CSS specification.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -582,12 +582,21 @@ background-color: @bg_color;
|
|||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
GTK+ also allows to form color expressions, which can be nested and
|
GTK+ also supports color expressions, which allow colors to be transformed
|
||||||
provide a rich language to define colors which are derived from a
|
to new ones and can be nested, providing a rich language to define colors.
|
||||||
set of base 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>
|
</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>
|
</literallayout>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -645,7 +654,7 @@ button {
|
|||||||
<para>
|
<para>
|
||||||
A crossfade lets you specify an image as an intermediate between two
|
A crossfade lets you specify an image as an intermediate between two
|
||||||
images. Crossfades are specified in the draft of the level 4
|
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.
|
module of the CSS specification.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -726,7 +735,7 @@ label {
|
|||||||
To learn more about gradients in CSS, including details of how color stops
|
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,
|
are placed on the gradient line and keywords for specifying radial sizes,
|
||||||
you can read the
|
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.
|
module of the CSS specification.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -824,7 +833,7 @@ label {
|
|||||||
<programlisting><![CDATA[
|
<programlisting><![CDATA[
|
||||||
spinner {
|
spinner {
|
||||||
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
|
-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 {
|
arrow.fancy {
|
||||||
-gtk-icon-source: -gtk-icontheme('pan-down');
|
-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
|
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
|
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
|
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.
|
Units</ulink> spec.
|
||||||
</para>
|
</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>
|
<term>4 values: </term><listitem>top right bottom left</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>3 values: </term><listitem>top horizontal left</listitem>
|
<term>3 values: </term><listitem>top horizontal bottom</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>2 values: </term><listitem>vertical horizontal</listitem>
|
<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><code>rgba(1,1,1,1)</code></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-color">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-color/#foreground">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>1</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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>gtk-font-name setting</entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-family">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-fonts/#font-family-prop">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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>gtk-font-name setting</entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-size-props">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-fonts/#font-size-prop">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>normal</code></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-style">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-fonts/#font-style-prop">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>normal</code></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-variant">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-fonts/#descdef-font-variant">CSS3</ulink></entry>
|
||||||
<entry>only CSS2 values supported</entry>
|
<entry>only CSS2 values supported</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>normal</code></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-weight">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<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>
|
<entry>normal is synonymous with 400, bold with 700</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>normal</code></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
@@ -245,8 +245,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
|||||||
<entry>font</entry>
|
<entry>font</entry>
|
||||||
<entry><code>[ 〈font-style〉 || 〈font-variant〉 || 〈font-weight〉 || 〈font-stretch〉 ]? 〈font-size〉 〈font-family〉</code></entry>
|
<entry><code>[ 〈font-style〉 || 〈font-variant〉 || 〈font-weight〉 || 〈font-stretch〉 ]? 〈font-size〉 〈font-family〉</code></entry>
|
||||||
<entry>see individual properties</entry>
|
<entry>see individual properties</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-shorthand">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-fonts/#font-prop">CSS3</ulink></entry>
|
||||||
<entry>CSS allows line-height, etc</entry>
|
<entry>CSS allows line-height, etc</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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><code>currentColor</code></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</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>
|
<entry>CSS allows an auto value</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#propdef-text-decoration">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-line-property">CSS3</ulink></entry>
|
||||||
<entry>CSS allows overline</entry>
|
<entry>CSS allows overline</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>currentColor</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>solid</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry>CSS allows dashed and dotted</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -365,7 +365,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
|||||||
<entry>text‑decoration</entry>
|
<entry>text‑decoration</entry>
|
||||||
<entry><code>〈text-decoration-line〉 || 〈text-decoration-style〉 || 〈text-decoration-color〉</code></entry>
|
<entry><code>〈text-decoration-line〉 || 〈text-decoration-style〉 || 〈text-decoration-color〉</code></entry>
|
||||||
<entry>see individual properties</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-width">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#min-width">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages</entry>
|
<entry>CSS allows percentages</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-height">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#min-height">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages</entry>
|
<entry>CSS allows percentages</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-top">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#margin-top">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages or auto</entry>
|
<entry>CSS allows percentages or auto</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-right">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#margin-right">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages or auto</entry>
|
<entry>CSS allows percentages or auto</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-bottom">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#margin-bottom">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages or auto</entry>
|
<entry>CSS allows percentages or auto</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-left">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#margin-left">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages or auto</entry>
|
<entry>CSS allows percentages or auto</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-top">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#padding-top">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages</entry>
|
<entry>CSS allows percentages</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-right">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#padding-right">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages</entry>
|
<entry>CSS allows percentages</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-bottom">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#padding-bottom">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages</entry>
|
<entry>CSS allows percentages</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-left">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#padding-left">CSS3</ulink></entry>
|
||||||
<entry>CSS allows percentages</entry>
|
<entry>CSS allows percentages</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -605,16 +605,16 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
|||||||
<entry>margin</entry>
|
<entry>margin</entry>
|
||||||
<entry><code>〈length〉{1,4}</code></entry>
|
<entry><code>〈length〉{1,4}</code></entry>
|
||||||
<entry>see individual properties</entry>
|
<entry>see individual properties</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#margin">CSS3</ulink></entry>
|
||||||
<entry>a 'four sides' shorthand</entry>
|
<entry>a 'four sides' shorthand</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>padding</entry>
|
<entry>padding</entry>
|
||||||
<entry><code>〈length〉{1,4}</code></entry>
|
<entry><code>〈length〉{1,4}</code></entry>
|
||||||
<entry>see individual properties</entry>
|
<entry>see individual properties</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-box/#padding">CSS3</ulink></entry>
|
||||||
<entry>a 'four sides' shorthand</entry>
|
<entry>a 'four sides' shorthand</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||||
<entry>CSS allows other values</entry>
|
<entry>CSS allows other values</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||||
<entry>CSS allows other values</entry>
|
<entry>CSS allows other values</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||||
<entry>CSS allows other values</entry>
|
<entry>CSS allows other values</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||||
<entry>CSS allows other values</entry>
|
<entry>CSS allows other values</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>currentColor</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>currentColor</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>currentColor</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>currentColor</code></entry>
|
||||||
<entry></entry>
|
<entry></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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>stretch</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>100%</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry>a 'four sides' shorthand</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>1</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry>a 'four sides' shorthand</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
@@ -838,77 +838,77 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
|||||||
<entry>border‑width</entry>
|
<entry>border‑width</entry>
|
||||||
<entry><code>〈length〉{1,4}</code></entry>
|
<entry><code>〈length〉{1,4}</code></entry>
|
||||||
<entry>see individual properties</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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
|
||||||
<entry>a 'four sides' shorthand</entry>
|
<entry>a 'four sides' shorthand</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border‑style</entry>
|
<entry>border‑style</entry>
|
||||||
<entry><code>〈border style〉{1,4}</code></entry>
|
<entry><code>〈border style〉{1,4}</code></entry>
|
||||||
<entry>see individual properties</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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
|
||||||
<entry>a 'four sides' shorthand</entry>
|
<entry>a 'four sides' shorthand</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border‑color</entry>
|
<entry>border‑color</entry>
|
||||||
<entry><code>〈color〉{1,4}</code></entry>
|
<entry><code>〈color〉{1,4}</code></entry>
|
||||||
<entry>see individual properties</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>
|
<entry>a 'four sides' shorthand</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border‑top</entry>
|
<entry>border‑top</entry>
|
||||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||||
<entry>see individual properties</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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#border-top">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border‑left</entry>
|
<entry>border‑left</entry>
|
||||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||||
<entry>see individual properties</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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#border-left">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border‑bottom</entry>
|
<entry>border‑bottom</entry>
|
||||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||||
<entry>see individual properties</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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#border-bottom">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border‑right</entry>
|
<entry>border‑right</entry>
|
||||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||||
<entry>see individual properties</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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#border-right">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border</entry>
|
<entry>border</entry>
|
||||||
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
|
||||||
<entry>see individual properties</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>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#border">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border‑radius</entry>
|
<entry>border‑radius</entry>
|
||||||
<entry><code>[ 〈length〉 | 〈percentage〉 ]{1,4} [ / [ 〈length〉 | 〈percentage> ]{1,4} ]?</code></entry>
|
<entry><code>[ 〈length〉 | 〈percentage〉 ]{1,4} [ / [ 〈length〉 | 〈percentage> ]{1,4} ]?</code></entry>
|
||||||
<entry>see individual properties</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>border‑image</entry>
|
<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><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>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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-style">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-ui/#outline-style">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-width">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-ui/#outline-width">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>currentColor</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-color">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-ui/#outline-color">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0px</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
@@ -1014,8 +1014,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
|||||||
<entry>outline</entry>
|
<entry>outline</entry>
|
||||||
<entry><code>〈outline-color〉 || 〈outline-style〉 || 〈outline-width〉</code></entry>
|
<entry><code>〈outline-color〉 || 〈outline-style〉 || 〈outline-width〉</code></entry>
|
||||||
<entry>see individual properties</entry>
|
<entry>see individual properties</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-ui/#propdef-outline">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>rgba(0,0,0,0)</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-color">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#background-color">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>border-box</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>padding-box</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>auto</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-position">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#background-position">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>repeat</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-repeat">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#background-repeat">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>✓</entry>
|
<entry>✓</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-image">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<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>
|
<entry>not supported: urls without quotes, CSS radial gradients, colors in crossfades</entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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><para>background</para></entry>
|
||||||
<entry><code>[ 〈bg-layer〉 , ]* 〈final-bg-layer〉</code></entry>
|
<entry><code>[ 〈bg-layer〉 , ]* 〈final-bg-layer〉</code></entry>
|
||||||
<entry>see individual properties</entry>
|
<entry>see individual properties</entry>
|
||||||
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background">CSS2</ulink>,
|
<entry><ulink url="https://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>
|
<ulink url="https://www.w3.org/TR/css3-background/#background">CSS3</ulink></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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><code>all</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0s</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>ease</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0s</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -1222,7 +1222,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
|||||||
<entry>transition</entry>
|
<entry>transition</entry>
|
||||||
<entry><code>〈single-transition〉 [ , 〈single-transition〉 ]*</code></entry>
|
<entry><code>〈single-transition〉 [ , 〈single-transition〉 ]*</code></entry>
|
||||||
<entry>see individual properties</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0s</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>ease</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>1</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>normal</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>running</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>0s</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
<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><code>none</code></entry>
|
||||||
<entry></entry>
|
<entry></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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -1327,7 +1327,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
|||||||
<entry>animation</entry>
|
<entry>animation</entry>
|
||||||
<entry><code>〈single‑animation〉 [ , 〈single‑animation〉]*</code></entry>
|
<entry><code>〈single‑animation〉 [ , 〈single‑animation〉]*</code></entry>
|
||||||
<entry>see individual properties</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>
|
<entry></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</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,
|
<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
|
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
|
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
|
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
|
details by providing a ready-to-use cairo context to the ::draw signal
|
||||||
|
|||||||
@@ -57,7 +57,8 @@
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>simplify</option></term>
|
<term><option>simplify</option></term>
|
||||||
<listitem><para>Simplifies the .ui file by removing properties that
|
<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>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>enumerate</option></term>
|
<term><option>enumerate</option></term>
|
||||||
@@ -71,6 +72,16 @@
|
|||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</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>
|
<refsect1><title>Preview Options</title>
|
||||||
<para>The <option>preview</option> command accepts the following options:</para>
|
<para>The <option>preview</option> command accepts the following options:</para>
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
<releaseinfo>
|
<releaseinfo>
|
||||||
This document is for the GTK+ 3 library, version &version;.
|
This document is for the GTK+ 3 library, version &version;.
|
||||||
The latest versions can be found online at
|
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,
|
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>
|
</releaseinfo>
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
|
|
||||||
|
|||||||
@@ -2259,6 +2259,7 @@ gtk_menu_set_title
|
|||||||
gtk_menu_get_title
|
gtk_menu_get_title
|
||||||
gtk_menu_set_monitor
|
gtk_menu_set_monitor
|
||||||
gtk_menu_get_monitor
|
gtk_menu_get_monitor
|
||||||
|
gtk_menu_place_on_monitor
|
||||||
gtk_menu_get_tearoff_state
|
gtk_menu_get_tearoff_state
|
||||||
gtk_menu_set_reserve_toggle_size
|
gtk_menu_set_reserve_toggle_size
|
||||||
gtk_menu_get_reserve_toggle_size
|
gtk_menu_get_reserve_toggle_size
|
||||||
@@ -3214,35 +3215,39 @@ GtkScrolledWindow
|
|||||||
GtkScrolledWindowClass
|
GtkScrolledWindowClass
|
||||||
gtk_scrolled_window_new
|
gtk_scrolled_window_new
|
||||||
gtk_scrolled_window_get_hadjustment
|
gtk_scrolled_window_get_hadjustment
|
||||||
|
gtk_scrolled_window_set_hadjustment
|
||||||
gtk_scrolled_window_get_vadjustment
|
gtk_scrolled_window_get_vadjustment
|
||||||
|
gtk_scrolled_window_set_vadjustment
|
||||||
gtk_scrolled_window_get_hscrollbar
|
gtk_scrolled_window_get_hscrollbar
|
||||||
gtk_scrolled_window_get_vscrollbar
|
gtk_scrolled_window_get_vscrollbar
|
||||||
GtkPolicyType
|
GtkPolicyType
|
||||||
|
gtk_scrolled_window_get_policy
|
||||||
gtk_scrolled_window_set_policy
|
gtk_scrolled_window_set_policy
|
||||||
gtk_scrolled_window_add_with_viewport
|
gtk_scrolled_window_add_with_viewport
|
||||||
GtkCornerType
|
GtkCornerType
|
||||||
|
gtk_scrolled_window_get_placement
|
||||||
gtk_scrolled_window_set_placement
|
gtk_scrolled_window_set_placement
|
||||||
gtk_scrolled_window_unset_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_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_get_min_content_width
|
||||||
gtk_scrolled_window_set_min_content_width
|
gtk_scrolled_window_set_min_content_width
|
||||||
gtk_scrolled_window_get_min_content_height
|
gtk_scrolled_window_get_min_content_height
|
||||||
gtk_scrolled_window_set_min_content_height
|
gtk_scrolled_window_set_min_content_height
|
||||||
gtk_scrolled_window_set_kinetic_scrolling
|
gtk_scrolled_window_get_max_content_width
|
||||||
gtk_scrolled_window_get_kinetic_scrolling
|
gtk_scrolled_window_set_max_content_width
|
||||||
gtk_scrolled_window_set_capture_button_press
|
gtk_scrolled_window_get_max_content_height
|
||||||
gtk_scrolled_window_get_capture_button_press
|
gtk_scrolled_window_set_max_content_height
|
||||||
gtk_scrolled_window_set_overlay_scrolling
|
|
||||||
gtk_scrolled_window_get_overlay_scrolling
|
|
||||||
gtk_scrolled_window_set_propagate_natural_width
|
|
||||||
gtk_scrolled_window_get_propagate_natural_width
|
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_get_propagate_natural_height
|
||||||
|
gtk_scrolled_window_set_propagate_natural_height
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GTK_SCROLLED_WINDOW
|
GTK_SCROLLED_WINDOW
|
||||||
@@ -7077,7 +7082,7 @@ GtkPrintOperationPrivate
|
|||||||
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<INCLUDE>gtk/gtkprintunixdialog.h</INCLUDE>
|
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||||
<FILE>gtkprintunixdialog</FILE>
|
<FILE>gtkprintunixdialog</FILE>
|
||||||
<TITLE>GtkPrintUnixDialog</TITLE>
|
<TITLE>GtkPrintUnixDialog</TITLE>
|
||||||
GtkPrintUnixDialog
|
GtkPrintUnixDialog
|
||||||
@@ -7424,7 +7429,7 @@ gtk_print_context_get_type
|
|||||||
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<INCLUDE>gtk/gtkprintjob.h</INCLUDE>
|
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||||
<FILE>gtkprintjob</FILE>
|
<FILE>gtkprintjob</FILE>
|
||||||
<TITLE>GtkPrintJob</TITLE>
|
<TITLE>GtkPrintJob</TITLE>
|
||||||
GtkPrintJob
|
GtkPrintJob
|
||||||
@@ -7434,6 +7439,7 @@ gtk_print_job_get_settings
|
|||||||
gtk_print_job_get_printer
|
gtk_print_job_get_printer
|
||||||
gtk_print_job_get_title
|
gtk_print_job_get_title
|
||||||
gtk_print_job_get_status
|
gtk_print_job_get_status
|
||||||
|
gtk_print_job_set_source_fd
|
||||||
gtk_print_job_set_source_file
|
gtk_print_job_set_source_file
|
||||||
gtk_print_job_get_surface
|
gtk_print_job_get_surface
|
||||||
gtk_print_job_send
|
gtk_print_job_send
|
||||||
@@ -7475,7 +7481,7 @@ gtk_print_job_get_type
|
|||||||
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<INCLUDE>gtk/gtkpagesetupunixdialog.h</INCLUDE>
|
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||||
<FILE>gtkpagesetupunixdialog</FILE>
|
<FILE>gtkpagesetupunixdialog</FILE>
|
||||||
<TITLE>GtkPageSetupUnixDialog</TITLE>
|
<TITLE>GtkPageSetupUnixDialog</TITLE>
|
||||||
GtkPageSetupUnixDialog
|
GtkPageSetupUnixDialog
|
||||||
@@ -7533,7 +7539,7 @@ gtk_mount_operation_get_parent
|
|||||||
gtk_mount_operation_set_screen
|
gtk_mount_operation_set_screen
|
||||||
gtk_mount_operation_get_screen
|
gtk_mount_operation_get_screen
|
||||||
gtk_show_uri
|
gtk_show_uri
|
||||||
gtk_show_uri_on_parent
|
gtk_show_uri_on_window
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GTK_IS_MOUNT_OPERATION
|
GTK_IS_MOUNT_OPERATION
|
||||||
GTK_IS_MOUNT_OPERATION_CLASS
|
GTK_IS_MOUNT_OPERATION_CLASS
|
||||||
@@ -8093,6 +8099,7 @@ GtkFlowBox
|
|||||||
gtk_flow_box_new
|
gtk_flow_box_new
|
||||||
gtk_flow_box_insert
|
gtk_flow_box_insert
|
||||||
gtk_flow_box_get_child_at_index
|
gtk_flow_box_get_child_at_index
|
||||||
|
gtk_flow_box_get_child_at_pos
|
||||||
gtk_flow_box_set_hadjustment
|
gtk_flow_box_set_hadjustment
|
||||||
gtk_flow_box_set_vadjustment
|
gtk_flow_box_set_vadjustment
|
||||||
|
|
||||||
|
|||||||
@@ -184,8 +184,9 @@
|
|||||||
<listitem>If you are opening a document or URI by launching a command
|
<listitem>If you are opening a document or URI by launching a command
|
||||||
like <literal>firefox http://my-favourite-website.com</literal> or
|
like <literal>firefox http://my-favourite-website.com</literal> or
|
||||||
<literal>gnome-open ghelp:epiphany</literal>, it is best to just use
|
<literal>gnome-open ghelp:epiphany</literal>, it is best to just use
|
||||||
gtk_show_uri(); as an added benefit, your application will henceforth
|
gtk_show_uri_on_window(); as an added benefit, your application will
|
||||||
respect the users preference for what application to use.</listitem>
|
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
|
<listitem>If you are launching a regular, installed application that
|
||||||
has a desktop file, it is best to use GIOs #GAppInfo with a suitable
|
has a desktop file, it is best to use GIOs #GAppInfo with a suitable
|
||||||
launch context.
|
launch context.
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ How do I get started with GTK+?
|
|||||||
</para></question>
|
</para></question>
|
||||||
|
|
||||||
<answer><para>
|
<answer><para>
|
||||||
The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers some
|
The GTK+ <ulink url="https://www.gtk.org">website</ulink> offers some
|
||||||
<ulink url="http://www.gtk.org/documentation.php">tutorials</ulink> and other
|
<ulink url="https://www.gtk.org/documentation.php">tutorials</ulink> and other
|
||||||
documentation (most of it about GTK+ 2.x, but mostly still applicable).
|
documentation (most of it about GTK+ 2.x, but mostly still applicable).
|
||||||
More documentation ranging from whitepapers to online books can be found at
|
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
|
After studying these materials you should be well prepared to come back to
|
||||||
this reference manual for details.
|
this reference manual for details.
|
||||||
</para></answer>
|
</para></answer>
|
||||||
@@ -77,7 +77,7 @@ specific widgets and functions.
|
|||||||
<para>
|
<para>
|
||||||
If you have a question not covered in the manual, feel free to
|
If you have a question not covered in the manual, feel free to
|
||||||
ask on the mailing lists and please <ulink
|
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.
|
documentation.
|
||||||
</para>
|
</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
|
if they should not be freed. Non-const strings should be
|
||||||
freed with g_free(). Arrays follow the same rule. If you find an
|
freed with g_free(). Arrays follow the same rule. If you find an
|
||||||
undocumented exception to the rules, please report a bug to <ulink
|
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>
|
</para>
|
||||||
|
|
||||||
</answer>
|
</answer>
|
||||||
@@ -180,7 +180,7 @@ How do I internationalize a GTK+ program?
|
|||||||
|
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<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
|
gettext</ulink>, already required in order to install GLib. On a UNIX
|
||||||
or Linux system with gettext installed, type <literal>info gettext</literal>
|
or Linux system with gettext installed, type <literal>info gettext</literal>
|
||||||
to read the documentation.
|
to read the documentation.
|
||||||
@@ -281,7 +281,7 @@ zero-terminated strings.
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
More information about Unicode and UTF-8 can be found in the
|
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>.
|
FAQ for Unix/Linux</ulink>.
|
||||||
GLib provides functions for converting strings between UTF-8 and other
|
GLib provides functions for converting strings between UTF-8 and other
|
||||||
encodings, see g_locale_to_utf8() and g_convert().
|
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
|
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
|
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"
|
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.
|
which provides a native C++ API.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -415,9 +415,9 @@ How do I use GTK+ with other non-C languages?
|
|||||||
|
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<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
|
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>
|
</para>
|
||||||
|
|
||||||
</answer>
|
</answer>
|
||||||
@@ -473,8 +473,8 @@ To draw a piece of text, use a Pango layout and pango_cairo_show_layout().
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
See also the
|
See also the
|
||||||
<ulink url="http://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html">Cairo Rendering</ulink>
|
<ulink url="https://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>.
|
section of <ulink url="https://developer.gnome.org/pango/stable/">Pango manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
|
|
||||||
@@ -505,8 +505,8 @@ pango_layout_get_pixel_size(), using code like the following:
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
See also the
|
See also the
|
||||||
<ulink url="http://developer.gnome.org/pango/stable/pango-Layout-Objects.html">Layout Objects</ulink>
|
<ulink url="https://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>.
|
section of <ulink url="https://developer.gnome.org/pango/stable/">Pango manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Getting help with GTK+
|
|||||||
<para>
|
<para>
|
||||||
If you encounter a bug, misfeature, or missing feature in GTK+, please
|
If you encounter a bug, misfeature, or missing feature in GTK+, please
|
||||||
file a bug report on
|
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
|
We'd also appreciate reports of incomplete or misleading information in
|
||||||
the GTK+ documentation; file those against the "docs" component of the "gtk+"
|
the GTK+ documentation; file those against the "docs" component of the "gtk+"
|
||||||
product in Bugzilla.
|
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+
|
libraries. Discussion of GLib, Pango, and ATK in addition to GTK+
|
||||||
proper is welcome on these lists. You can subscribe or view the
|
proper is welcome on these lists. You can subscribe or view the
|
||||||
archives of these lists on
|
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
|
If you aren't subscribed to the list, any message you post to
|
||||||
the list will be held for manual moderation, which might take
|
the list will be held for manual moderation, which might take
|
||||||
some days to happen.
|
some days to happen.
|
||||||
|
|||||||
@@ -528,9 +528,9 @@ nevertheless.
|
|||||||
<para>
|
<para>
|
||||||
GTK+ uses these environment variables to locate icon themes
|
GTK+ uses these environment variables to locate icon themes
|
||||||
and MIME information. For more information, see
|
and MIME information. For more information, see
|
||||||
<ulink url="http://freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</ulink>,
|
<ulink url="https://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>
|
the <ulink url="https://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>.
|
and the <ulink url="https://freedesktop.org/Standards/basedir-spec">Base Directory Specification</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
|
|
||||||
@@ -539,7 +539,7 @@ nevertheless.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
GTK+ uses this environment variable to provide startup notification
|
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
|
Following the specification, GTK+ unsets this variable after reading
|
||||||
it (to keep it from leaking to child processes). So, if you need its
|
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
|
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>
|
<para>
|
||||||
|
|
||||||
There are two ways to affect text attributes in #GtkTextView.
|
The way to affect text attributes in #GtkTextView is to
|
||||||
You can change the default attributes for a given #GtkTextView, and you can
|
apply tags that change the attributes for a region of text.
|
||||||
apply tags that change the attributes for a region of text. For text features
|
For text features that come from the theme — such as font and
|
||||||
that come from the theme — such as font and foreground color — use
|
foreground color — use CSS to override their default values.
|
||||||
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().
|
|
||||||
|
|
||||||
<informalexample><programlisting>
|
<informalexample><programlisting>
|
||||||
GtkWidget *view;
|
GtkWidget *view;
|
||||||
@@ -163,6 +160,8 @@ gtk_widget_override_color(). For other attributes there are dedicated methods on
|
|||||||
PangoFontDescription *font_desc;
|
PangoFontDescription *font_desc;
|
||||||
GdkRGBA rgba;
|
GdkRGBA rgba;
|
||||||
GtkTextTag *tag;
|
GtkTextTag *tag;
|
||||||
|
GtkCssProvider *provider;
|
||||||
|
GtkStyleContext *context;
|
||||||
|
|
||||||
view = gtk_text_view_new (<!-- -->);
|
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);
|
gtk_text_buffer_set_text (buffer, "Hello, this is some text", -1);
|
||||||
|
|
||||||
/* Change default font throughout the widget */
|
/* Change default font and color throughout the widget */
|
||||||
font_desc = pango_font_description_from_string ("Serif 15");
|
provider = gtk_css_provider_new ();
|
||||||
gtk_widget_modify_font (view, font_desc);
|
gtk_css_provider_load_from_data (provider,
|
||||||
pango_font_description_free (font_desc);
|
"textview {"
|
||||||
|
" font: 15 serif;"
|
||||||
/* Change default color throughout the widget */
|
" color: green;"
|
||||||
gdk_rgba_parse ("green", &rgba);
|
"}",
|
||||||
gtk_widget_override_color (view, GTK_STATE_FLAG_NORMAL, &rgba);
|
-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 */
|
/* Change left margin throughout the widget */
|
||||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);
|
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ options or environment variables.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
For up-to-date information about the current status of this backend, see
|
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>
|
</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ noinst_PROGRAMS = \
|
|||||||
grid-packing \
|
grid-packing \
|
||||||
drawing \
|
drawing \
|
||||||
builder \
|
builder \
|
||||||
search-bar
|
search-bar \
|
||||||
|
listbox-dnd
|
||||||
|
|
||||||
EXTRA_DIST = builder.ui
|
EXTRA_DIST = builder.ui
|
||||||
|
|
||||||
|
|||||||
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
|
# Marshaller generation
|
||||||
#
|
#
|
||||||
gdkmarshalers.h: gdkmarshalers.list
|
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 \
|
&& mv gdkmarshalers-h.tmp gdkmarshalers.h \
|
||||||
|| ( rm -f gdkmarshalers-h.tmp && exit 1)
|
|| ( rm -f gdkmarshalers-h.tmp && exit 1)
|
||||||
gdkmarshalers.c: gdkmarshalers.list
|
gdkmarshalers.c: gdkmarshalers.list
|
||||||
$(AM_V_GEN) (echo "#include \"gdkmarshalers.h\""; \
|
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||||
$(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
|
--prefix=_gdk_marshal \
|
||||||
|
--body \
|
||||||
|
$(srcdir)/gdkmarshalers.list > gdkmarshalers-c.tmp \
|
||||||
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|
||||||
|| ( rm -f gdkmarshalers-c.tmp && exit 1 )
|
|| ( rm -f gdkmarshalers-c.tmp && exit 1 )
|
||||||
|
|
||||||
@@ -459,29 +464,20 @@ stamp-gc-h: $(top_builddir)/config.status
|
|||||||
#
|
#
|
||||||
# Resources
|
# Resources
|
||||||
#
|
#
|
||||||
|
|
||||||
|
glsl_sources := $(wildcard $(srcdir)/resources/glsl/*.glsl)
|
||||||
|
|
||||||
gdk.gresource.xml: Makefile.am
|
gdk.gresource.xml: Makefile.am
|
||||||
$(AM_V_GEN) echo "<?xml version='1.0' encoding='UTF-8'?>" > $@; \
|
$(AM_V_GEN) echo "<?xml version='1.0' encoding='UTF-8'?>" > $@; \
|
||||||
echo "<gresources>" >> $@; \
|
echo "<gresources>" >> $@; \
|
||||||
echo " <gresource prefix='/org/gtk/libgdk'>" >> $@; \
|
echo " <gresource prefix='/org/gtk/libgdk'>" >> $@; \
|
||||||
for f in $(srcdir)/resources/glsl/*.glsl; do \
|
for f in $(glsl_sources); do \
|
||||||
n=`basename $$f`; \
|
n=`basename $$f`; \
|
||||||
echo " <file alias='glsl/$$n'>resources/glsl/$$n</file>" >> $@; \
|
echo " <file alias='glsl/$$n'>resources/glsl/$$n</file>" >> $@; \
|
||||||
done; \
|
done; \
|
||||||
echo " </gresource>" >> $@; \
|
echo " </gresource>" >> $@; \
|
||||||
echo "</gresources>" >> $@;
|
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)
|
EXTRA_DIST += $(glsl_sources)
|
||||||
CLEANFILES += gdk.gresource.xml
|
CLEANFILES += gdk.gresource.xml
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
|
|||||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||||
-DG_LOG_USE_STRUCTURED=1 \
|
-DG_LOG_USE_STRUCTURED=1 \
|
||||||
-DGDK_COMPILATION \
|
-DGDK_COMPILATION \
|
||||||
|
-DGDK_DISABLE_DEPRECATION_WARNINGS \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_srcdir)/gdk \
|
-I$(top_srcdir)/gdk \
|
||||||
-I$(top_builddir)/gdk \
|
-I$(top_builddir)/gdk \
|
||||||
|
|||||||
@@ -162,8 +162,10 @@ gdk_app_launch_context_get_display (GAppLaunchContext *context,
|
|||||||
GdkAppLaunchContext *ctx = GDK_APP_LAUNCH_CONTEXT (context);
|
GdkAppLaunchContext *ctx = GDK_APP_LAUNCH_CONTEXT (context);
|
||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
if (ctx->screen)
|
if (ctx->screen)
|
||||||
return gdk_screen_make_display_name (ctx->screen);
|
return gdk_screen_make_display_name (ctx->screen);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
if (ctx->display)
|
if (ctx->display)
|
||||||
display = 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_width = axis_info_x->max_value - axis_info_x->min_value;
|
||||||
device_height = axis_info_y->max_value - axis_info_y->min_value;
|
device_height = axis_info_y->max_value - axis_info_y->min_value;
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
if (device_width > 0)
|
if (device_width > 0)
|
||||||
x_min = axis_info_x->min_value;
|
x_min = axis_info_x->min_value;
|
||||||
else
|
else
|
||||||
@@ -1723,6 +1724,7 @@ _gdk_device_translate_window_coord (GdkDevice *device,
|
|||||||
device_height = gdk_screen_get_height (gdk_window_get_screen (window));
|
device_height = gdk_screen_get_height (gdk_window_get_screen (window));
|
||||||
y_min = 0;
|
y_min = 0;
|
||||||
}
|
}
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
window_width = gdk_window_get_width (window);
|
window_width = gdk_window_get_width (window);
|
||||||
window_height = gdk_window_get_height (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;
|
axis_width = axis_info.max_value - axis_info.min_value;
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
if (axis_info.use == GDK_AXIS_X)
|
if (axis_info.use == GDK_AXIS_X)
|
||||||
{
|
{
|
||||||
if (axis_width > 0)
|
if (axis_width > 0)
|
||||||
@@ -1823,6 +1826,7 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
|
|||||||
|
|
||||||
offset = - window_root_y - window->abs_y;
|
offset = - window_root_y - window->abs_y;
|
||||||
}
|
}
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
if (axis_value)
|
if (axis_value)
|
||||||
*axis_value = offset + scale * (value - axis_info.min_value);
|
*axis_value = offset + scale * (value - axis_info.min_value);
|
||||||
|
|||||||
@@ -2553,12 +2553,14 @@ get_fallback_monitor (GdkDisplay *display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
screen = gdk_display_get_default_screen (display);
|
screen = gdk_display_get_default_screen (display);
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
gdk_monitor_set_size (monitor,
|
gdk_monitor_set_size (monitor,
|
||||||
gdk_screen_get_width (screen),
|
gdk_screen_get_width (screen),
|
||||||
gdk_screen_get_height (screen));
|
gdk_screen_get_height (screen));
|
||||||
gdk_monitor_set_physical_size (monitor,
|
gdk_monitor_set_physical_size (monitor,
|
||||||
gdk_screen_get_width_mm (screen),
|
gdk_screen_get_width_mm (screen),
|
||||||
gdk_screen_get_height_mm (screen));
|
gdk_screen_get_height_mm (screen));
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
return monitor;
|
return monitor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,12 +273,12 @@ static GdkBackend gdk_backends[] = {
|
|||||||
#ifdef GDK_WINDOWING_WAYLAND
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
{ "wayland", _gdk_wayland_display_open },
|
{ "wayland", _gdk_wayland_display_open },
|
||||||
#endif
|
#endif
|
||||||
#ifdef GDK_WINDOWING_X11
|
|
||||||
{ "x11", _gdk_x11_display_open },
|
|
||||||
#endif
|
|
||||||
#ifdef GDK_WINDOWING_MIR
|
#ifdef GDK_WINDOWING_MIR
|
||||||
{ "mir", _gdk_mir_display_open },
|
{ "mir", _gdk_mir_display_open },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef GDK_WINDOWING_X11
|
||||||
|
{ "x11", _gdk_x11_display_open },
|
||||||
|
#endif
|
||||||
#ifdef GDK_WINDOWING_BROADWAY
|
#ifdef GDK_WINDOWING_BROADWAY
|
||||||
{ "broadway", _gdk_broadway_display_open },
|
{ "broadway", _gdk_broadway_display_open },
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -409,6 +409,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
|||||||
alpha_size == 0 &&
|
alpha_size == 0 &&
|
||||||
direct_window != NULL &&
|
direct_window != NULL &&
|
||||||
direct_window->current_paint.use_gl &&
|
direct_window->current_paint.use_gl &&
|
||||||
|
gdk_gl_context_has_framebuffer_blit (paint_context) &&
|
||||||
trivial_transform &&
|
trivial_transform &&
|
||||||
clip_region != NULL)
|
clip_region != NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ typedef struct {
|
|||||||
guint debug_enabled : 1;
|
guint debug_enabled : 1;
|
||||||
guint forward_compatible : 1;
|
guint forward_compatible : 1;
|
||||||
guint is_legacy : 1;
|
guint is_legacy : 1;
|
||||||
guint use_es : 1;
|
|
||||||
|
int use_es;
|
||||||
|
|
||||||
GdkGLContextPaintData *paint_data;
|
GdkGLContextPaintData *paint_data;
|
||||||
} GdkGLContextPrivate;
|
} GdkGLContextPrivate;
|
||||||
@@ -153,6 +154,7 @@ gdk_gl_context_finalize (GObject *gobject)
|
|||||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
g_clear_pointer (&priv->paint_data, g_free);
|
g_clear_pointer (&priv->paint_data, g_free);
|
||||||
|
G_OBJECT_CLASS (gdk_gl_context_parent_class)->finalize (gobject);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -362,6 +364,9 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
|
|||||||
static void
|
static void
|
||||||
gdk_gl_context_init (GdkGLContext *self)
|
gdk_gl_context_init (GdkGLContext *self)
|
||||||
{
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
|
||||||
|
|
||||||
|
priv->use_es = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*< private >
|
/*< private >
|
||||||
@@ -572,7 +577,7 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
|
|||||||
/* Enforce a minimum context version number of 3.2 */
|
/* Enforce a minimum context version number of 3.2 */
|
||||||
version = (major * 100) + minor;
|
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;
|
min_ver = 200;
|
||||||
else
|
else
|
||||||
min_ver = 302;
|
min_ver = 302;
|
||||||
@@ -608,7 +613,7 @@ gdk_gl_context_get_required_version (GdkGLContext *context,
|
|||||||
|
|
||||||
g_return_if_fail (GDK_IS_GL_CONTEXT (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_major = 2;
|
||||||
default_minor = 0;
|
default_minor = 0;
|
||||||
@@ -683,13 +688,18 @@ gdk_gl_context_set_is_legacy (GdkGLContext *context,
|
|||||||
/**
|
/**
|
||||||
* gdk_gl_context_set_use_es:
|
* gdk_gl_context_set_use_es:
|
||||||
* @context: a #GdkGLContext:
|
* @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,
|
* Requests that GDK create a OpenGL ES context instead of an OpenGL one,
|
||||||
* if the platform and windowing system allows it.
|
* if the platform and windowing system allows it.
|
||||||
*
|
*
|
||||||
* The @context must not have been realized.
|
* 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
|
* 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
|
* calling gdk_gl_context_realize() to decide whether to use the OpenGL or
|
||||||
* OpenGL ES API, extensions, or shaders.
|
* OpenGL ES API, extensions, or shaders.
|
||||||
@@ -698,14 +708,15 @@ gdk_gl_context_set_is_legacy (GdkGLContext *context,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_gl_context_set_use_es (GdkGLContext *context,
|
gdk_gl_context_set_use_es (GdkGLContext *context,
|
||||||
gboolean use_es)
|
int use_es)
|
||||||
{
|
{
|
||||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
|
||||||
g_return_if_fail (!priv->realized);
|
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);
|
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)
|
if (priv->extensions_checked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
priv->use_es = !epoxy_is_desktop_gl ();
|
|
||||||
priv->gl_version = epoxy_gl_version ();
|
priv->gl_version = epoxy_gl_version ();
|
||||||
|
|
||||||
|
if (priv->use_es < 0)
|
||||||
|
priv->use_es = !epoxy_is_desktop_gl ();
|
||||||
|
|
||||||
if (priv->use_es)
|
if (priv->use_es)
|
||||||
{
|
{
|
||||||
has_npot = priv->gl_version >= 20;
|
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_gl_framebuffer_blit = epoxy_has_gl_extension ("GL_EXT_framebuffer_blit");
|
||||||
priv->has_frame_terminator = epoxy_has_gl_extension ("GL_GREMEDY_frame_terminator");
|
priv->has_frame_terminator = epoxy_has_gl_extension ("GL_GREMEDY_frame_terminator");
|
||||||
priv->has_unpack_subimage = TRUE;
|
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))
|
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");
|
g_warning ("GL implementation doesn't support any form of non-power-of-two textures");
|
||||||
|
|
||||||
GDK_NOTE (OPENGL,
|
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"
|
"* Extensions checked:\n"
|
||||||
" - GL_ARB_texture_non_power_of_two: %s\n"
|
" - GL_ARB_texture_non_power_of_two: %s\n"
|
||||||
" - GL_ARB_texture_rectangle: %s\n"
|
" - GL_ARB_texture_rectangle: %s\n"
|
||||||
@@ -817,6 +838,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
|||||||
"* Using texture rectangle: %s",
|
"* Using texture rectangle: %s",
|
||||||
priv->use_es ? "OpenGL ES" : "OpenGL",
|
priv->use_es ? "OpenGL ES" : "OpenGL",
|
||||||
priv->gl_version / 10, priv->gl_version % 10,
|
priv->gl_version / 10, priv->gl_version % 10,
|
||||||
|
priv->is_legacy ? "legacy" : "core",
|
||||||
|
glGetString (GL_SHADING_LANGUAGE_VERSION),
|
||||||
has_npot ? "yes" : "no",
|
has_npot ? "yes" : "no",
|
||||||
has_texture_rectangle ? "yes" : "no",
|
has_texture_rectangle ? "yes" : "no",
|
||||||
priv->has_gl_framebuffer_blit ? "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);
|
gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context);
|
||||||
GDK_AVAILABLE_IN_3_22
|
GDK_AVAILABLE_IN_3_22
|
||||||
void gdk_gl_context_set_use_es (GdkGLContext *context,
|
void gdk_gl_context_set_use_es (GdkGLContext *context,
|
||||||
gboolean use_es);
|
int use_es);
|
||||||
GDK_AVAILABLE_IN_3_22
|
GDK_AVAILABLE_IN_3_22
|
||||||
gboolean gdk_gl_context_get_use_es (GdkGLContext *context);
|
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);
|
gboolean gdk_pointer_is_grabbed (void);
|
||||||
#endif /* GDK_MULTIDEVICE_SAFE */
|
#endif /* GDK_MULTIDEVICE_SAFE */
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
gint gdk_screen_width (void) G_GNUC_CONST;
|
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;
|
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;
|
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;
|
gint gdk_screen_height_mm (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
|||||||
@@ -222,6 +222,8 @@ get_monitor_num (GdkMonitor *monitor)
|
|||||||
* a monitor close to (@x,@y) if the point is not in any monitor.
|
* a monitor close to (@x,@y) if the point is not in any monitor.
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_display_get_monitor_at_point() instead
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_monitor_at_point (GdkScreen *screen,
|
gdk_screen_get_monitor_at_point (GdkScreen *screen,
|
||||||
@@ -251,6 +253,8 @@ gdk_screen_get_monitor_at_point (GdkScreen *screen,
|
|||||||
* close to @window.
|
* close to @window.
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_display_get_monitor_at_window() instead
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_monitor_at_window (GdkScreen *screen,
|
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()).
|
* gdk_screen_get_monitor_scale_factor()).
|
||||||
*
|
*
|
||||||
* Returns: the width of the default screen in pixels.
|
* Returns: the width of the default screen in pixels.
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use per-monitor information
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_width (void)
|
gdk_screen_width (void)
|
||||||
{
|
{
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
return gdk_screen_get_width (gdk_screen_get_default ());
|
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()).
|
* gdk_screen_get_monitor_scale_factor()).
|
||||||
*
|
*
|
||||||
* Returns: the height of the default screen in pixels.
|
* Returns: the height of the default screen in pixels.
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use per-monitor information
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_height (void)
|
gdk_screen_height (void)
|
||||||
{
|
{
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
return gdk_screen_get_height (gdk_screen_get_default ());
|
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,
|
* Returns: the width of the default screen in millimeters,
|
||||||
* though it is not always correct.
|
* though it is not always correct.
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use per-monitor information
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_width_mm (void)
|
gdk_screen_width_mm (void)
|
||||||
{
|
{
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
return gdk_screen_get_width_mm (gdk_screen_get_default ());
|
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,
|
* Returns: the height of the default screen in millimeters,
|
||||||
* though it is not always correct.
|
* though it is not always correct.
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use per-monitor information
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_height_mm (void)
|
gdk_screen_height_mm (void)
|
||||||
{
|
{
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
return gdk_screen_get_height_mm (gdk_screen_get_default ());
|
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.
|
* Returns: the width of @screen in pixels.
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use per-monitor information instead
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_width (GdkScreen *screen)
|
gdk_screen_get_width (GdkScreen *screen)
|
||||||
@@ -549,6 +571,8 @@ gdk_screen_get_width (GdkScreen *screen)
|
|||||||
* Returns: the height of @screen in pixels.
|
* Returns: the height of @screen in pixels.
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use per-monitor information instead
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_height (GdkScreen *screen)
|
gdk_screen_get_height (GdkScreen *screen)
|
||||||
@@ -571,6 +595,8 @@ gdk_screen_get_height (GdkScreen *screen)
|
|||||||
* Returns: the width of @screen in millimeters.
|
* Returns: the width of @screen in millimeters.
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use per-monitor information instead
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_width_mm (GdkScreen *screen)
|
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.
|
* Returns: the heigth of @screen in millimeters.
|
||||||
*
|
*
|
||||||
|
* Deprecated: 3.22: Use per-monitor information instead
|
||||||
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
@@ -612,6 +640,8 @@ gdk_screen_get_height_mm (GdkScreen *screen)
|
|||||||
* Returns: the index
|
* Returns: the index
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22
|
||||||
**/
|
**/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_number (GdkScreen *screen)
|
gdk_screen_get_number (GdkScreen *screen)
|
||||||
@@ -658,6 +688,8 @@ get_monitor (GdkScreen *screen,
|
|||||||
* Returns: number of monitors which @screen consists of
|
* Returns: number of monitors which @screen consists of
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_display_get_n_monitors() instead
|
||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_n_monitors (GdkScreen *screen)
|
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.
|
* Returns: An integer index for the primary monitor, or 0 if none is configured.
|
||||||
*
|
*
|
||||||
* Since: 2.20
|
* Since: 2.20
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_display_get_primary_monitor() instead
|
||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_primary_monitor (GdkScreen *screen)
|
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
|
* Returns: the width of the monitor, or -1 if not available
|
||||||
*
|
*
|
||||||
* Since: 2.14
|
* Since: 2.14
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_monitor_get_width_mm() instead
|
||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_monitor_width_mm (GdkScreen *screen,
|
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
|
* Returns: the height of the monitor, or -1 if not available
|
||||||
*
|
*
|
||||||
* Since: 2.14
|
* Since: 2.14
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_monitor_get_height_mm() instead
|
||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_monitor_height_mm (GdkScreen *screen,
|
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
|
* of the monitor, or %NULL if the name cannot be determined
|
||||||
*
|
*
|
||||||
* Since: 2.14
|
* Since: 2.14
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_monitor_get_model() instead
|
||||||
*/
|
*/
|
||||||
gchar *
|
gchar *
|
||||||
gdk_screen_get_monitor_plug_name (GdkScreen *screen,
|
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().
|
* gdk_screen_get_width() and gdk_screen_get_height().
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_monitor_get_geometry() instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_screen_get_monitor_geometry (GdkScreen *screen,
|
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().
|
* @screen, use gdk_screen_get_n_monitors().
|
||||||
*
|
*
|
||||||
* Since: 3.4
|
* Since: 3.4
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_monitor_get_workarea() instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_screen_get_monitor_workarea (GdkScreen *screen,
|
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()
|
* Returns: a newly allocated string, free with g_free()
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22
|
||||||
**/
|
**/
|
||||||
gchar *
|
gchar *
|
||||||
gdk_screen_make_display_name (GdkScreen *screen)
|
gdk_screen_make_display_name (GdkScreen *screen)
|
||||||
@@ -1004,6 +1050,8 @@ gdk_screen_make_display_name (GdkScreen *screen)
|
|||||||
* or %NULL.
|
* or %NULL.
|
||||||
*
|
*
|
||||||
* Since: 2.10
|
* Since: 2.10
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22
|
||||||
**/
|
**/
|
||||||
GdkWindow *
|
GdkWindow *
|
||||||
gdk_screen_get_active_window (GdkScreen *screen)
|
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
|
* 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.
|
* where it is better to use gdk_window_get_scale_factor() instead.
|
||||||
*
|
*
|
||||||
* Since: 3.10
|
|
||||||
* Returns: the scale factor
|
* Returns: the scale factor
|
||||||
|
*
|
||||||
|
* Since: 3.10
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_monitor_get_scale_factor() instead
|
||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
gdk_screen_get_monitor_scale_factor (GdkScreen *screen,
|
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 (GDK_IS_SCREEN (screen), 1);
|
||||||
g_return_val_if_fail (monitor_num >= 0, 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_return_val_if_fail (monitor_num < gdk_screen_get_n_monitors (screen), 1);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
monitor = get_monitor (screen, monitor_num);
|
monitor = get_monitor (screen, monitor_num);
|
||||||
|
|
||||||
|
|||||||
@@ -52,54 +52,54 @@ GDK_AVAILABLE_IN_ALL
|
|||||||
GdkWindow * gdk_screen_get_root_window (GdkScreen *screen);
|
GdkWindow * gdk_screen_get_root_window (GdkScreen *screen);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GdkDisplay * gdk_screen_get_display (GdkScreen *screen);
|
GdkDisplay * gdk_screen_get_display (GdkScreen *screen);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
gint gdk_screen_get_number (GdkScreen *screen);
|
gint gdk_screen_get_number (GdkScreen *screen);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
gint gdk_screen_get_width (GdkScreen *screen);
|
gint gdk_screen_get_width (GdkScreen *screen);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
gint gdk_screen_get_height (GdkScreen *screen);
|
gint gdk_screen_get_height (GdkScreen *screen);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
gint gdk_screen_get_width_mm (GdkScreen *screen);
|
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);
|
gint gdk_screen_get_height_mm (GdkScreen *screen);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GList * gdk_screen_list_visuals (GdkScreen *screen);
|
GList * gdk_screen_list_visuals (GdkScreen *screen);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GList * gdk_screen_get_toplevel_windows (GdkScreen *screen);
|
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);
|
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);
|
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);
|
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,
|
void gdk_screen_get_monitor_geometry (GdkScreen *screen,
|
||||||
gint monitor_num,
|
gint monitor_num,
|
||||||
GdkRectangle *dest);
|
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,
|
void gdk_screen_get_monitor_workarea (GdkScreen *screen,
|
||||||
gint monitor_num,
|
gint monitor_num,
|
||||||
GdkRectangle *dest);
|
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 gdk_screen_get_monitor_at_point (GdkScreen *screen,
|
||||||
gint x,
|
gint x,
|
||||||
gint y);
|
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,
|
gint gdk_screen_get_monitor_at_window (GdkScreen *screen,
|
||||||
GdkWindow *window);
|
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 gdk_screen_get_monitor_width_mm (GdkScreen *screen,
|
||||||
gint monitor_num);
|
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 gdk_screen_get_monitor_height_mm (GdkScreen *screen,
|
||||||
gint monitor_num);
|
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,
|
gchar * gdk_screen_get_monitor_plug_name (GdkScreen *screen,
|
||||||
gint monitor_num);
|
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 gdk_screen_get_monitor_scale_factor (GdkScreen *screen,
|
||||||
gint monitor_num);
|
gint monitor_num);
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ void gdk_screen_set_resolution (GdkScreen *screen,
|
|||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gdouble gdk_screen_get_resolution (GdkScreen *screen);
|
gdouble gdk_screen_get_resolution (GdkScreen *screen);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
GdkWindow *gdk_screen_get_active_window (GdkScreen *screen);
|
GdkWindow *gdk_screen_get_active_window (GdkScreen *screen);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GList *gdk_screen_get_window_stack (GdkScreen *screen);
|
GList *gdk_screen_get_window_stack (GdkScreen *screen);
|
||||||
|
|||||||
@@ -172,16 +172,6 @@
|
|||||||
*/
|
*/
|
||||||
#define GDK_VERSION_3_22 (G_ENCODE_VERSION (3, 22))
|
#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,
|
/* evaluates to the current stable version; for development cycles,
|
||||||
* this means the next stable target
|
* this means the next stable target
|
||||||
*/
|
*/
|
||||||
@@ -422,11 +412,5 @@
|
|||||||
# define GDK_AVAILABLE_IN_3_22 _GDK_EXTERN
|
# define GDK_AVAILABLE_IN_3_22 _GDK_EXTERN
|
||||||
#endif
|
#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__ */
|
#endif /* __GDK_VERSION_MACROS_H__ */
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ gdk_visual_class_init (GdkVisualClass *visual_class)
|
|||||||
*
|
*
|
||||||
* Returns: (transfer container) (element-type GdkVisual):
|
* Returns: (transfer container) (element-type GdkVisual):
|
||||||
* a list of visuals; the list must be freed, but not its contents
|
* 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*
|
GList*
|
||||||
gdk_list_visuals (void)
|
gdk_list_visuals (void)
|
||||||
@@ -103,6 +105,8 @@ gdk_list_visuals (void)
|
|||||||
* The return value should not be freed.
|
* The return value should not be freed.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): system visual
|
* Returns: (transfer none): system visual
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Use gdk_screen_get_system_visual (gdk_screen_get_default ()).
|
||||||
*/
|
*/
|
||||||
GdkVisual*
|
GdkVisual*
|
||||||
gdk_visual_get_system (void)
|
gdk_visual_get_system (void)
|
||||||
@@ -118,6 +122,9 @@ gdk_visual_get_system (void)
|
|||||||
* per pixel.
|
* per pixel.
|
||||||
*
|
*
|
||||||
* Returns: best available depth
|
* 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
|
gint
|
||||||
gdk_visual_get_best_depth (void)
|
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.
|
* Return the best available visual type for the default GDK screen.
|
||||||
*
|
*
|
||||||
* Returns: best visual type
|
* 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
|
GdkVisualType
|
||||||
gdk_visual_get_best_type (void)
|
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.
|
* GDK screen. The return value should not be freed.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): best visual
|
* 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*
|
GdkVisual*
|
||||||
gdk_visual_get_best (void)
|
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.
|
* not be freed. %NULL may be returned if no visual supports @depth.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): best visual for the given 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*
|
GdkVisual*
|
||||||
gdk_visual_get_best_with_depth (gint depth)
|
gdk_visual_get_best_with_depth (gint depth)
|
||||||
@@ -187,6 +203,9 @@ gdk_visual_get_best_with_depth (gint depth)
|
|||||||
* @visual_type.
|
* @visual_type.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): best visual of the given 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*
|
GdkVisual*
|
||||||
gdk_visual_get_best_with_type (GdkVisualType visual_type)
|
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
|
* Returns: (nullable) (transfer none): best visual with both @depth
|
||||||
* and @visual_type, or %NULL if none
|
* 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*
|
GdkVisual*
|
||||||
gdk_visual_get_best_with_both (gint depth,
|
gdk_visual_get_best_with_both (gint depth,
|
||||||
@@ -229,6 +251,9 @@ gdk_visual_get_best_with_both (gint depth,
|
|||||||
* visual, removing duplicates.
|
* visual, removing duplicates.
|
||||||
*
|
*
|
||||||
* The array returned by this function should not be freed.
|
* 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
|
void
|
||||||
gdk_query_depths (gint **depths,
|
gdk_query_depths (gint **depths,
|
||||||
@@ -251,6 +276,9 @@ gdk_query_depths (gint **depths,
|
|||||||
* visual, removing duplicates.
|
* visual, removing duplicates.
|
||||||
*
|
*
|
||||||
* The array returned by this function should not be freed.
|
* 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
|
void
|
||||||
gdk_query_visual_types (GdkVisualType **visual_types,
|
gdk_query_visual_types (GdkVisualType **visual_types,
|
||||||
|
|||||||
@@ -82,30 +82,30 @@ typedef enum
|
|||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gdk_visual_get_type (void) G_GNUC_CONST;
|
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);
|
gint gdk_visual_get_best_depth (void);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
GdkVisualType gdk_visual_get_best_type (void);
|
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);
|
GdkVisual* gdk_visual_get_system (void);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
GdkVisual* gdk_visual_get_best (void);
|
GdkVisual* gdk_visual_get_best (void);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
GdkVisual* gdk_visual_get_best_with_depth (gint depth);
|
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);
|
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,
|
GdkVisual* gdk_visual_get_best_with_both (gint depth,
|
||||||
GdkVisualType visual_type);
|
GdkVisualType visual_type);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
void gdk_query_depths (gint **depths,
|
void gdk_query_depths (gint **depths,
|
||||||
gint *count);
|
gint *count);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
void gdk_query_visual_types (GdkVisualType **visual_types,
|
void gdk_query_visual_types (GdkVisualType **visual_types,
|
||||||
gint *count);
|
gint *count);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22_FOR(gdk_screen_list_visuals)
|
||||||
GList* gdk_list_visuals (void);
|
GList* gdk_list_visuals (void);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
|||||||
@@ -637,6 +637,12 @@ gdk_window_is_offscreen (GdkWindow *window)
|
|||||||
return window->window_type == GDK_WINDOW_OFFSCREEN;
|
return window->window_type == GDK_WINDOW_OFFSCREEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdk_window_is_subsurface (GdkWindow *window)
|
||||||
|
{
|
||||||
|
return window->window_type == GDK_WINDOW_SUBSURFACE;
|
||||||
|
}
|
||||||
|
|
||||||
static GdkWindow *
|
static GdkWindow *
|
||||||
gdk_window_get_impl_window (GdkWindow *window)
|
gdk_window_get_impl_window (GdkWindow *window)
|
||||||
{
|
{
|
||||||
@@ -973,9 +979,12 @@ recompute_visible_regions_internal (GdkWindow *private,
|
|||||||
old_abs_y = private->abs_y;
|
old_abs_y = private->abs_y;
|
||||||
|
|
||||||
/* Update absolute position */
|
/* 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_x = 0;
|
||||||
private->abs_y = 0;
|
private->abs_y = 0;
|
||||||
}
|
}
|
||||||
@@ -1461,6 +1470,11 @@ gdk_window_new (GdkWindow *parent,
|
|||||||
if (window->parent->window_type == GDK_WINDOW_ROOT)
|
if (window->parent->window_type == GDK_WINDOW_ROOT)
|
||||||
native = TRUE; /* Always use native windows for toplevels */
|
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))
|
if (gdk_window_is_offscreen (window))
|
||||||
{
|
{
|
||||||
_gdk_offscreen_window_new (window, attributes, attributes_mask);
|
_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_TEMP:
|
||||||
case GDK_WINDOW_FOREIGN:
|
case GDK_WINDOW_FOREIGN:
|
||||||
case GDK_WINDOW_OFFSCREEN:
|
case GDK_WINDOW_OFFSCREEN:
|
||||||
|
case GDK_WINDOW_SUBSURFACE:
|
||||||
if (window->window_type == GDK_WINDOW_FOREIGN && !foreign_destroy)
|
if (window->window_type == GDK_WINDOW_FOREIGN && !foreign_destroy)
|
||||||
{
|
{
|
||||||
/* Logically, it probably makes more sense to send
|
/* 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))
|
if (gdk_window_is_offscreen (window))
|
||||||
return gdk_offscreen_window_get_embedder (window);
|
return gdk_offscreen_window_get_embedder (window);
|
||||||
|
else if (gdk_window_is_subsurface (window))
|
||||||
|
return window->transient_for;
|
||||||
else
|
else
|
||||||
return window->parent;
|
return window->parent;
|
||||||
}
|
}
|
||||||
@@ -2446,7 +2463,8 @@ gdk_window_get_toplevel (GdkWindow *window)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
|
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))
|
if (gdk_window_is_toplevel (window))
|
||||||
break;
|
break;
|
||||||
@@ -3491,7 +3509,9 @@ gdk_window_clear_backing_region (GdkWindow *window)
|
|||||||
|
|
||||||
for (bg_window = window; bg_window; bg_window = bg_window->parent)
|
for (bg_window = window; bg_window; bg_window = bg_window->parent)
|
||||||
{
|
{
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
pattern = gdk_window_get_background_pattern (bg_window);
|
pattern = gdk_window_get_background_pattern (bg_window);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
if (pattern)
|
if (pattern)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -4004,12 +4024,10 @@ static void
|
|||||||
before_process_all_updates (void)
|
before_process_all_updates (void)
|
||||||
{
|
{
|
||||||
GSList *displays, *l;
|
GSList *displays, *l;
|
||||||
GdkDisplayClass *display_class;
|
|
||||||
|
|
||||||
displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
|
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)
|
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);
|
g_slist_free (displays);
|
||||||
}
|
}
|
||||||
@@ -4018,12 +4036,10 @@ static void
|
|||||||
after_process_all_updates (void)
|
after_process_all_updates (void)
|
||||||
{
|
{
|
||||||
GSList *displays, *l;
|
GSList *displays, *l;
|
||||||
GdkDisplayClass *display_class;
|
|
||||||
|
|
||||||
displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
|
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)
|
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);
|
g_slist_free (displays);
|
||||||
}
|
}
|
||||||
@@ -4044,6 +4060,7 @@ after_process_all_updates (void)
|
|||||||
* Calls gdk_window_process_updates() for all windows (see #GdkWindow)
|
* Calls gdk_window_process_updates() for all windows (see #GdkWindow)
|
||||||
* in the application.
|
* in the application.
|
||||||
*
|
*
|
||||||
|
* Deprecated: 3.22
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gdk_window_process_all_updates (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
|
* case, where GDK delivers them in an idle handler). Occasionally
|
||||||
* this is useful to produce nicer scrolling behavior, for example.
|
* this is useful to produce nicer scrolling behavior, for example.
|
||||||
*
|
*
|
||||||
|
* Deprecated: 3.22
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gdk_window_process_updates (GdkWindow *window,
|
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
|
* yourself, though you might want to use this function to enable
|
||||||
* updates sometime after application startup time.
|
* updates sometime after application startup time.
|
||||||
*
|
*
|
||||||
**/
|
* Deprecated: 3.22
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gdk_window_set_debug_updates (gboolean setting)
|
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
|
* gtk_style_context_set_background() — if you're implementing a
|
||||||
* custom widget.
|
* custom widget.
|
||||||
*
|
*
|
||||||
* See also gdk_window_set_background_pattern().
|
* Deprecated: 3.4: Don't use this function
|
||||||
*
|
|
||||||
* Deprecated: 3.4: Use gdk_window_set_background_rgba() instead.
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_window_set_background (GdkWindow *window,
|
gdk_window_set_background (GdkWindow *window,
|
||||||
@@ -6357,7 +6374,9 @@ gdk_window_set_background (GdkWindow *window,
|
|||||||
color->green / 65535.,
|
color->green / 65535.,
|
||||||
color->blue / 65535.);
|
color->blue / 65535.);
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
gdk_window_set_background_pattern (window, pattern);
|
gdk_window_set_background_pattern (window, pattern);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
cairo_pattern_destroy (pattern);
|
cairo_pattern_destroy (pattern);
|
||||||
}
|
}
|
||||||
@@ -6370,6 +6389,8 @@ gdk_window_set_background (GdkWindow *window,
|
|||||||
* Sets the background color of @window.
|
* Sets the background color of @window.
|
||||||
*
|
*
|
||||||
* See also gdk_window_set_background_pattern().
|
* See also gdk_window_set_background_pattern().
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Don't use this function
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gdk_window_set_background_rgba (GdkWindow *window,
|
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,
|
pattern = cairo_pattern_create_rgba (rgba->red, rgba->green,
|
||||||
rgba->blue, rgba->alpha);
|
rgba->blue, rgba->alpha);
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
gdk_window_set_background_pattern (window, pattern);
|
gdk_window_set_background_pattern (window, pattern);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
cairo_pattern_destroy (pattern);
|
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
|
* The windowing system will normally fill a window with its background
|
||||||
* when the window is obscured then exposed.
|
* when the window is obscured then exposed.
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Don't use this function
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_window_set_background_pattern (GdkWindow *window,
|
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.
|
* background or %NULL to use the parent’s background.
|
||||||
*
|
*
|
||||||
* Since: 2.22
|
* Since: 2.22
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: Don't use this function
|
||||||
**/
|
**/
|
||||||
cairo_pattern_t *
|
cairo_pattern_t *
|
||||||
gdk_window_get_background_pattern (GdkWindow *window)
|
gdk_window_get_background_pattern (GdkWindow *window)
|
||||||
@@ -10166,6 +10193,10 @@ gdk_window_create_similar_surface (GdkWindow * window,
|
|||||||
* scale);
|
* 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
|
* Returns: a pointer to the newly allocated surface. The caller
|
||||||
* owns the surface and should call cairo_surface_destroy() when done
|
* owns the surface and should call cairo_surface_destroy() when done
|
||||||
* with it.
|
* with it.
|
||||||
@@ -10832,10 +10863,10 @@ void
|
|||||||
gdk_window_fullscreen_on_monitor (GdkWindow *window,
|
gdk_window_fullscreen_on_monitor (GdkWindow *window,
|
||||||
gint monitor)
|
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 >= 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)
|
if (GDK_WINDOW_IMPL_GET_CLASS (window->impl)->fullscreen_on_monitor != NULL)
|
||||||
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->fullscreen_on_monitor (window, monitor);
|
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
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gdk_window_set_transient_for (GdkWindow *window,
|
void gdk_window_set_transient_for (GdkWindow *window,
|
||||||
GdkWindow *parent);
|
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,
|
void gdk_window_set_background (GdkWindow *window,
|
||||||
const GdkColor *color);
|
const GdkColor *color);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
void gdk_window_set_background_rgba (GdkWindow *window,
|
void gdk_window_set_background_rgba (GdkWindow *window,
|
||||||
const GdkRGBA *rgba);
|
const GdkRGBA *rgba);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
void gdk_window_set_background_pattern (GdkWindow *window,
|
void gdk_window_set_background_pattern (GdkWindow *window,
|
||||||
cairo_pattern_t *pattern);
|
cairo_pattern_t *pattern);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow *window);
|
cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow *window);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
@@ -1054,14 +1054,14 @@ void gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window);
|
|||||||
GDK_DEPRECATED_IN_3_16
|
GDK_DEPRECATED_IN_3_16
|
||||||
void gdk_window_thaw_toplevel_updates_libgtk_only (GdkWindow *window);
|
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);
|
void gdk_window_process_all_updates (void);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_3_22
|
||||||
void gdk_window_process_updates (GdkWindow *window,
|
void gdk_window_process_updates (GdkWindow *window,
|
||||||
gboolean update_children);
|
gboolean update_children);
|
||||||
|
|
||||||
/* Enable/disable flicker, so you can tell if your code is inefficient. */
|
/* 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);
|
void gdk_window_set_debug_updates (gboolean setting);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include "gdkmir-private.h"
|
#include "gdkmir-private.h"
|
||||||
|
|
||||||
|
#include <mir_toolkit/events/window_placement.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_gdk_mir_print_modifiers (unsigned int modifiers)
|
_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))
|
switch (mir_touch_event_tooltype (touch_event, i))
|
||||||
{
|
{
|
||||||
|
default:
|
||||||
case mir_touch_tooltype_unknown:
|
case mir_touch_tooltype_unknown:
|
||||||
g_printerr (" ? ");
|
g_printerr (" ? ");
|
||||||
break;
|
break;
|
||||||
@@ -200,30 +203,45 @@ _gdk_mir_print_motion_event (const MirInputEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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 ");
|
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");
|
g_printerr ("type");
|
||||||
break;
|
break;
|
||||||
case mir_surface_attrib_state:
|
case mir_window_attrib_state:
|
||||||
g_printerr ("state");
|
g_printerr ("state");
|
||||||
break;
|
break;
|
||||||
case mir_surface_attrib_swapinterval:
|
case mir_window_attrib_swapinterval:
|
||||||
g_printerr ("swapinterval");
|
g_printerr ("swapinterval");
|
||||||
break;
|
break;
|
||||||
case mir_surface_attrib_focus:
|
case mir_window_attrib_focus:
|
||||||
g_printerr ("focus");
|
g_printerr ("focus");
|
||||||
break;
|
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:
|
default:
|
||||||
g_printerr ("%u", mir_surface_event_get_attribute (event));
|
g_printerr ("%u", mir_window_event_get_attribute (event));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
g_printerr ("\n");
|
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
|
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));
|
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
|
static void
|
||||||
_gdk_mir_print_close_event (void)
|
_gdk_mir_print_close_event (void)
|
||||||
{
|
{
|
||||||
g_printerr ("CLOSED\n");
|
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
|
void
|
||||||
_gdk_mir_print_event (const MirEvent *event)
|
_gdk_mir_print_event (const MirEvent *event)
|
||||||
{
|
{
|
||||||
@@ -260,6 +503,9 @@ _gdk_mir_print_event (const MirEvent *event)
|
|||||||
case mir_input_event_type_pointer:
|
case mir_input_event_type_pointer:
|
||||||
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
|
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
_gdk_mir_print_input_event (mir_event_get_input_event (event));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case mir_event_type_key:
|
case mir_event_type_key:
|
||||||
@@ -268,15 +514,33 @@ _gdk_mir_print_event (const MirEvent *event)
|
|||||||
case mir_event_type_motion:
|
case mir_event_type_motion:
|
||||||
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
|
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
|
||||||
break;
|
break;
|
||||||
case mir_event_type_surface:
|
case mir_event_type_window:
|
||||||
_gdk_mir_print_surface_event (mir_event_get_surface_event (event));
|
_gdk_mir_print_window_event (mir_event_get_window_event (event));
|
||||||
break;
|
break;
|
||||||
case mir_event_type_resize:
|
case mir_event_type_resize:
|
||||||
_gdk_mir_print_resize_event (mir_event_get_resize_event (event));
|
_gdk_mir_print_resize_event (mir_event_get_resize_event (event));
|
||||||
break;
|
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 ();
|
_gdk_mir_print_close_event ();
|
||||||
break;
|
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:
|
default:
|
||||||
g_printerr ("EVENT %u\n", mir_event_get_type (event));
|
g_printerr ("EVENT %u\n", mir_event_get_type (event));
|
||||||
break;
|
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);
|
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);
|
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);
|
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);
|
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);
|
gboolean _gdk_mir_display_init_egl_display (GdkDisplay *display);
|
||||||
|
|
||||||
EGLDisplay _gdk_mir_display_get_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
|
GDK_AVAILABLE_IN_3_16
|
||||||
GType gdk_mir_window_get_type (void);
|
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);
|
MirSurface *gdk_mir_window_get_mir_surface (GdkWindow *window);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ gdk_mir_cursor_get_surface (GdkCursor *cursor,
|
|||||||
gdouble *x_hot,
|
gdouble *x_hot,
|
||||||
gdouble *y_hot)
|
gdouble *y_hot)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_cursor_get_surface\n");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ static GList *
|
|||||||
gdk_mir_device_manager_list_devices (GdkDeviceManager *device_manager,
|
gdk_mir_device_manager_list_devices (GdkDeviceManager *device_manager,
|
||||||
GdkDeviceType type)
|
GdkDeviceType type)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_device_manager_list_devices (%u)\n", type);
|
|
||||||
GdkMirDeviceManager *dm = GDK_MIR_DEVICE_MANAGER (device_manager);
|
GdkMirDeviceManager *dm = GDK_MIR_DEVICE_MANAGER (device_manager);
|
||||||
|
|
||||||
if (type == GDK_DEVICE_TYPE_MASTER)
|
if (type == GDK_DEVICE_TYPE_MASTER)
|
||||||
@@ -79,7 +78,6 @@ gdk_mir_device_manager_list_devices (GdkDeviceManager *device_manager,
|
|||||||
static GdkDevice *
|
static GdkDevice *
|
||||||
gdk_mir_device_manager_get_client_pointer (GdkDeviceManager *device_manager)
|
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;
|
return GDK_MIR_DEVICE_MANAGER (device_manager)->pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,10 @@
|
|||||||
#include "gdkmir.h"
|
#include "gdkmir.h"
|
||||||
#include "gdkmir-private.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_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(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))
|
#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;
|
GdkKeymap *keymap;
|
||||||
|
|
||||||
|
GdkWindow *focused_window;
|
||||||
|
|
||||||
MirPixelFormat sw_pixel_format;
|
MirPixelFormat sw_pixel_format;
|
||||||
MirPixelFormat hw_pixel_format;
|
MirPixelFormat hw_pixel_format;
|
||||||
|
|
||||||
@@ -55,6 +61,10 @@ typedef struct GdkMirDisplay
|
|||||||
guint have_egl_buffer_age : 1;
|
guint have_egl_buffer_age : 1;
|
||||||
guint have_egl_swap_buffers_with_damage : 1;
|
guint have_egl_swap_buffers_with_damage : 1;
|
||||||
guint have_egl_surfaceless_context : 1;
|
guint have_egl_surfaceless_context : 1;
|
||||||
|
|
||||||
|
ContentHubService *content_service;
|
||||||
|
ContentHubHandler *content_handler;
|
||||||
|
GVariant *paste_data;
|
||||||
} GdkMirDisplay;
|
} GdkMirDisplay;
|
||||||
|
|
||||||
typedef struct GdkMirDisplayClass
|
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)
|
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 *
|
GdkDisplay *
|
||||||
_gdk_mir_display_open (const gchar *display_name)
|
_gdk_mir_display_open (const gchar *display_name)
|
||||||
{
|
{
|
||||||
MirConnection *connection;
|
MirConnection *connection;
|
||||||
MirPixelFormat sw_pixel_format, hw_pixel_format;
|
MirPixelFormat sw_pixel_format, hw_pixel_format;
|
||||||
GdkMirDisplay *display;
|
GdkMirDisplay *display;
|
||||||
|
GDBusConnection *session;
|
||||||
|
|
||||||
//g_printerr ("gdk_mir_display_open\n");
|
connection = mir_connect_sync (NULL, g_get_prgname ());
|
||||||
|
|
||||||
connection = mir_connect_sync (NULL, "GDK-Mir");
|
|
||||||
if (!connection)
|
if (!connection)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!mir_connection_is_valid (connection))
|
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);
|
mir_connection_release (connection);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -138,6 +153,45 @@ _gdk_mir_display_open (const gchar *display_name)
|
|||||||
display->sw_pixel_format = sw_pixel_format;
|
display->sw_pixel_format = sw_pixel_format;
|
||||||
display->hw_pixel_format = hw_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");
|
g_signal_emit_by_name (display, "opened");
|
||||||
|
|
||||||
return GDK_DISPLAY (display);
|
return GDK_DISPLAY (display);
|
||||||
@@ -173,6 +227,10 @@ gdk_mir_display_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
GdkMirDisplay *display = GDK_MIR_DISPLAY (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->screen);
|
||||||
g_clear_object (&display->keymap);
|
g_clear_object (&display->keymap);
|
||||||
g_clear_pointer (&display->event_source, g_source_unref);
|
g_clear_pointer (&display->event_source, g_source_unref);
|
||||||
@@ -193,40 +251,34 @@ gdk_mir_display_finalize (GObject *object)
|
|||||||
static const gchar *
|
static const gchar *
|
||||||
gdk_mir_display_get_name (GdkDisplay *display)
|
gdk_mir_display_get_name (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_name\n");
|
|
||||||
return "Mir";
|
return "Mir";
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkScreen *
|
static GdkScreen *
|
||||||
gdk_mir_display_get_default_screen (GdkDisplay *display)
|
gdk_mir_display_get_default_screen (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_default_screen\n");
|
|
||||||
return GDK_MIR_DISPLAY (display)->screen;
|
return GDK_MIR_DISPLAY (display)->screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_mir_display_beep (GdkDisplay *display)
|
gdk_mir_display_beep (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_beep\n");
|
|
||||||
/* No system level beep... */
|
/* No system level beep... */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_mir_display_sync (GdkDisplay *display)
|
gdk_mir_display_sync (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_sync\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_mir_display_flush (GdkDisplay *display)
|
gdk_mir_display_flush (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_flush\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_display_has_pending (GdkDisplay *display)
|
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 */
|
/* We don't need to poll for events - so nothing pending */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -234,27 +286,23 @@ gdk_mir_display_has_pending (GdkDisplay *display)
|
|||||||
static void
|
static void
|
||||||
gdk_mir_display_queue_events (GdkDisplay *display)
|
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*/
|
/* We don't need to poll for events - so don't do anything*/
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_mir_display_make_default (GdkDisplay *display)
|
gdk_mir_display_make_default (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_make_default\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkWindow *
|
static GdkWindow *
|
||||||
gdk_mir_display_get_default_group (GdkDisplay *display)
|
gdk_mir_display_get_default_group (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_default_group\n");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_display_supports_shapes (GdkDisplay *display)
|
gdk_mir_display_supports_shapes (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_supports_shapes\n");
|
|
||||||
/* Mir doesn't support shaped windows */
|
/* Mir doesn't support shaped windows */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -262,42 +310,36 @@ gdk_mir_display_supports_shapes (GdkDisplay *display)
|
|||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_display_supports_input_shapes (GdkDisplay *display)
|
gdk_mir_display_supports_input_shapes (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_supports_input_shapes\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_display_supports_composite (GdkDisplay *display)
|
gdk_mir_display_supports_composite (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_supports_composite\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_display_supports_clipboard_persistence (GdkDisplay *display)
|
gdk_mir_display_supports_clipboard_persistence (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_supports_clipboard_persistence\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_display_supports_cursor_alpha (GdkDisplay *display)
|
gdk_mir_display_supports_cursor_alpha (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_supports_cursor_alpha\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_display_supports_cursor_color (GdkDisplay *display)
|
gdk_mir_display_supports_cursor_color (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_supports_cursor_color\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_display_supports_selection_notification (GdkDisplay *display)
|
gdk_mir_display_supports_selection_notification (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_supports_selection_notification\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,7 +347,6 @@ static gboolean
|
|||||||
gdk_mir_display_request_selection_notification (GdkDisplay *display,
|
gdk_mir_display_request_selection_notification (GdkDisplay *display,
|
||||||
GdkAtom selection)
|
GdkAtom selection)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_request_selection_notification\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -316,7 +357,6 @@ gdk_mir_display_store_clipboard (GdkDisplay *display,
|
|||||||
const GdkAtom *targets,
|
const GdkAtom *targets,
|
||||||
gint n_targets)
|
gint n_targets)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_store_clipboard\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -324,7 +364,6 @@ gdk_mir_display_get_default_cursor_size (GdkDisplay *display,
|
|||||||
guint *width,
|
guint *width,
|
||||||
guint *height)
|
guint *height)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_default_cursor_size\n");
|
|
||||||
*width = *height = 32; // FIXME: Random value
|
*width = *height = 32; // FIXME: Random value
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,7 +372,6 @@ gdk_mir_display_get_maximal_cursor_size (GdkDisplay *display,
|
|||||||
guint *width,
|
guint *width,
|
||||||
guint *height)
|
guint *height)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_maximal_cursor_size\n");
|
|
||||||
*width = *height = 32; // FIXME: Random value
|
*width = *height = 32; // FIXME: Random value
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,33 +395,28 @@ gdk_mir_display_get_cursor_for_surface (GdkDisplay *display,
|
|||||||
gdouble x,
|
gdouble x,
|
||||||
gdouble y)
|
gdouble y)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_cursor_for_surface (%f, %f)\n", x, y);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkAppLaunchContext *
|
static GdkAppLaunchContext *
|
||||||
gdk_mir_display_get_app_launch_context (GdkDisplay *display)
|
gdk_mir_display_get_app_launch_context (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_app_launch_context\n");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_mir_display_before_process_all_updates (GdkDisplay *display)
|
gdk_mir_display_before_process_all_updates (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_before_process_all_updates\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_mir_display_after_process_all_updates (GdkDisplay *display)
|
gdk_mir_display_after_process_all_updates (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_after_process_all_updates\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gulong
|
static gulong
|
||||||
gdk_mir_display_get_next_serial (GdkDisplay *display)
|
gdk_mir_display_get_next_serial (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_next_serial\n");
|
|
||||||
return GDK_MIR_DISPLAY (display)->serial++;
|
return GDK_MIR_DISPLAY (display)->serial++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,7 +424,6 @@ static void
|
|||||||
gdk_mir_display_notify_startup_complete (GdkDisplay *display,
|
gdk_mir_display_notify_startup_complete (GdkDisplay *display,
|
||||||
const gchar *startup_id)
|
const gchar *startup_id)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_notify_startup_complete\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -403,12 +435,6 @@ gdk_mir_display_create_window_impl (GdkDisplay *display,
|
|||||||
GdkWindowAttr *attributes,
|
GdkWindowAttr *attributes,
|
||||||
gint attributes_mask)
|
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)
|
if (attributes->wclass == GDK_INPUT_OUTPUT)
|
||||||
{
|
{
|
||||||
window->impl = _gdk_mir_window_impl_new (display, window, attributes, attributes_mask);
|
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 *
|
static GdkKeymap *
|
||||||
gdk_mir_display_get_keymap (GdkDisplay *display)
|
gdk_mir_display_get_keymap (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_keymap\n");
|
|
||||||
return GDK_MIR_DISPLAY (display)->keymap;
|
return GDK_MIR_DISPLAY (display)->keymap;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_mir_display_push_error_trap (GdkDisplay *display)
|
gdk_mir_display_push_error_trap (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_push_error_trap\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
gdk_mir_display_pop_error_trap (GdkDisplay *display,
|
gdk_mir_display_pop_error_trap (GdkDisplay *display,
|
||||||
gboolean ignored)
|
gboolean ignored)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_pop_error_trap\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,7 +472,6 @@ static GdkWindow *
|
|||||||
gdk_mir_display_get_selection_owner (GdkDisplay *display,
|
gdk_mir_display_get_selection_owner (GdkDisplay *display,
|
||||||
GdkAtom selection)
|
GdkAtom selection)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_get_selection_owner\n");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -460,7 +482,28 @@ gdk_mir_display_set_selection_owner (GdkDisplay *display,
|
|||||||
guint32 time,
|
guint32 time,
|
||||||
gboolean send_event)
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,7 +515,6 @@ gdk_mir_display_send_selection_notify (GdkDisplay *display,
|
|||||||
GdkAtom property,
|
GdkAtom property,
|
||||||
guint32 time)
|
guint32 time)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_send_selection_notify\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
@@ -482,10 +524,261 @@ gdk_mir_display_get_selection_property (GdkDisplay *display,
|
|||||||
GdkAtom *ret_type,
|
GdkAtom *ret_type,
|
||||||
gint *ret_format)
|
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;
|
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
|
static void
|
||||||
gdk_mir_display_convert_selection (GdkDisplay *display,
|
gdk_mir_display_convert_selection (GdkDisplay *display,
|
||||||
GdkWindow *requestor,
|
GdkWindow *requestor,
|
||||||
@@ -493,7 +786,46 @@ gdk_mir_display_convert_selection (GdkDisplay *display,
|
|||||||
GdkAtom target,
|
GdkAtom target,
|
||||||
guint32 time)
|
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
|
static gint
|
||||||
@@ -504,15 +836,44 @@ gdk_mir_display_text_property_to_utf8_list (GdkDisplay *display,
|
|||||||
gint length,
|
gint length,
|
||||||
gchar ***list)
|
gchar ***list)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_text_property_to_utf8_list\n");
|
GPtrArray *array;
|
||||||
return 0;
|
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 *
|
static gchar *
|
||||||
gdk_mir_display_utf8_to_string_target (GdkDisplay *display,
|
gdk_mir_display_utf8_to_string_target (GdkDisplay *display,
|
||||||
const gchar *str)
|
const gchar *str)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_display_utf8_to_string_target\n");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -582,6 +943,62 @@ _gdk_mir_display_get_pixel_format (GdkDisplay *display,
|
|||||||
return mir_dpy->sw_pixel_format;
|
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
|
gboolean
|
||||||
_gdk_mir_display_init_egl_display (GdkDisplay *display)
|
_gdk_mir_display_init_egl_display (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
#include "gdkmir.h"
|
#include "gdkmir.h"
|
||||||
#include "gdkmir-private.h"
|
#include "gdkmir-private.h"
|
||||||
|
|
||||||
|
#include <mir_toolkit/events/window_placement.h>
|
||||||
|
|
||||||
#define NANO_TO_MILLI(x) ((x) / 1000000)
|
#define NANO_TO_MILLI(x) ((x) / 1000000)
|
||||||
|
|
||||||
struct _GdkMirWindowReference {
|
struct _GdkMirWindowReference {
|
||||||
@@ -240,9 +242,15 @@ generate_focus_event (GdkWindow *window, gboolean focused)
|
|||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
|
|
||||||
if (focused)
|
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
|
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 = gdk_event_new (GDK_FOCUS_CHANGE);
|
||||||
event->focus_change.send_event = FALSE;
|
event->focus_change.send_event = FALSE;
|
||||||
@@ -436,45 +444,46 @@ handle_motion_event (GdkWindow *window, const MirInputEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
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:
|
case mir_window_attrib_type:
|
||||||
_gdk_mir_window_impl_set_surface_type (impl, mir_surface_event_get_attribute_value (event));
|
_gdk_mir_window_impl_set_window_type (impl, mir_window_event_get_attribute_value (event));
|
||||||
break;
|
break;
|
||||||
case mir_surface_attrib_state:
|
case mir_window_attrib_state:
|
||||||
state = mir_surface_event_get_attribute_value (event);
|
state = mir_window_event_get_attribute_value (event);
|
||||||
_gdk_mir_window_impl_set_surface_state (impl, state);
|
_gdk_mir_window_impl_set_window_state (impl, state);
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case mir_surface_state_restored:
|
case mir_window_state_restored:
|
||||||
case mir_surface_state_hidden:
|
case mir_window_state_hidden:
|
||||||
gdk_synthesize_window_state (window,
|
gdk_synthesize_window_state (window,
|
||||||
GDK_WINDOW_STATE_ICONIFIED |
|
GDK_WINDOW_STATE_ICONIFIED |
|
||||||
GDK_WINDOW_STATE_MAXIMIZED |
|
GDK_WINDOW_STATE_MAXIMIZED |
|
||||||
GDK_WINDOW_STATE_FULLSCREEN,
|
GDK_WINDOW_STATE_FULLSCREEN,
|
||||||
0);
|
0);
|
||||||
break;
|
break;
|
||||||
case mir_surface_state_minimized:
|
case mir_window_state_minimized:
|
||||||
gdk_synthesize_window_state (window,
|
gdk_synthesize_window_state (window,
|
||||||
GDK_WINDOW_STATE_MAXIMIZED |
|
GDK_WINDOW_STATE_MAXIMIZED |
|
||||||
GDK_WINDOW_STATE_FULLSCREEN,
|
GDK_WINDOW_STATE_FULLSCREEN,
|
||||||
GDK_WINDOW_STATE_ICONIFIED);
|
GDK_WINDOW_STATE_ICONIFIED);
|
||||||
break;
|
break;
|
||||||
case mir_surface_state_maximized:
|
case mir_window_state_maximized:
|
||||||
case mir_surface_state_vertmaximized:
|
case mir_window_state_vertmaximized:
|
||||||
case mir_surface_state_horizmaximized:
|
case mir_window_state_horizmaximized:
|
||||||
gdk_synthesize_window_state (window,
|
gdk_synthesize_window_state (window,
|
||||||
GDK_WINDOW_STATE_ICONIFIED |
|
GDK_WINDOW_STATE_ICONIFIED |
|
||||||
GDK_WINDOW_STATE_FULLSCREEN,
|
GDK_WINDOW_STATE_FULLSCREEN,
|
||||||
GDK_WINDOW_STATE_MAXIMIZED);
|
GDK_WINDOW_STATE_MAXIMIZED);
|
||||||
break;
|
break;
|
||||||
case mir_surface_state_fullscreen:
|
case mir_window_state_fullscreen:
|
||||||
gdk_synthesize_window_state (window,
|
gdk_synthesize_window_state (window,
|
||||||
GDK_WINDOW_STATE_ICONIFIED |
|
GDK_WINDOW_STATE_ICONIFIED |
|
||||||
GDK_WINDOW_STATE_MAXIMIZED,
|
GDK_WINDOW_STATE_MAXIMIZED,
|
||||||
@@ -485,10 +494,10 @@ handle_surface_event (GdkWindow *window, const MirSurfaceEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case mir_surface_attrib_swapinterval:
|
case mir_window_attrib_swapinterval:
|
||||||
break;
|
break;
|
||||||
case mir_surface_attrib_focus:
|
case mir_window_attrib_focus:
|
||||||
generate_focus_event (window, mir_surface_event_get_attribute_value (event) != 0);
|
generate_focus_event (window, mir_window_event_get_attribute_value (event) != 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -529,10 +538,17 @@ handle_close_event (GdkWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_surface_output_event (GdkWindow *window,
|
handle_window_output_event (GdkWindow *window,
|
||||||
const MirSurfaceOutputEvent *event)
|
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
|
typedef struct
|
||||||
@@ -565,6 +581,8 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
|
|||||||
case mir_input_event_type_pointer:
|
case mir_input_event_type_pointer:
|
||||||
handle_motion_event (window, input_event);
|
handle_motion_event (window, input_event);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -574,27 +592,31 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
|
|||||||
case mir_event_type_motion:
|
case mir_event_type_motion:
|
||||||
handle_motion_event (window, mir_event_get_input_event (event));
|
handle_motion_event (window, mir_event_get_input_event (event));
|
||||||
break;
|
break;
|
||||||
case mir_event_type_surface:
|
case mir_event_type_window:
|
||||||
handle_surface_event (window, mir_event_get_surface_event (event));
|
handle_window_event (window, mir_event_get_window_event (event));
|
||||||
break;
|
break;
|
||||||
case mir_event_type_resize:
|
case mir_event_type_resize:
|
||||||
handle_resize_event (window, mir_event_get_resize_event (event));
|
handle_resize_event (window, mir_event_get_resize_event (event));
|
||||||
break;
|
break;
|
||||||
case mir_event_type_prompt_session_state_change:
|
case mir_event_type_prompt_session_state_change:
|
||||||
// FIXME?
|
|
||||||
break;
|
break;
|
||||||
case mir_event_type_orientation:
|
case mir_event_type_orientation:
|
||||||
// FIXME?
|
|
||||||
break;
|
break;
|
||||||
case mir_event_type_close_surface:
|
case mir_event_type_close_window:
|
||||||
handle_close_event (window);
|
handle_close_event (window);
|
||||||
break;
|
break;
|
||||||
case mir_event_type_surface_output:
|
case mir_event_type_keymap:
|
||||||
handle_surface_output_event (window, mir_event_get_surface_output_event (event));
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("Ignoring unknown Mir event %d", mir_event_get_type (event));
|
g_warning ("Ignoring unknown Mir event %d", mir_event_get_type (event));
|
||||||
// FIXME?
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ gdk_mir_keyboard_get_history (GdkDevice *device,
|
|||||||
GdkTimeCoord ***events,
|
GdkTimeCoord ***events,
|
||||||
gint *n_events)
|
gint *n_events)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_keyboard_get_history\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +72,6 @@ gdk_mir_keyboard_get_state (GdkDevice *device,
|
|||||||
gdouble *axes,
|
gdouble *axes,
|
||||||
GdkModifierType *mask)
|
GdkModifierType *mask)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_keyboard_get_state\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -81,7 +79,6 @@ gdk_mir_keyboard_set_window_cursor (GdkDevice *device,
|
|||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkCursor *cursor)
|
GdkCursor *cursor)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keyboard_set_window_cursor\n");
|
|
||||||
/* Keyboards don't have cursors... */
|
/* Keyboards don't have cursors... */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +88,6 @@ gdk_mir_keyboard_warp (GdkDevice *device,
|
|||||||
gdouble x,
|
gdouble x,
|
||||||
gdouble y)
|
gdouble y)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keyboard_warp\n");
|
|
||||||
/* Can't warp a keyboard... */
|
/* Can't warp a keyboard... */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +102,6 @@ gdk_mir_keyboard_query_state (GdkDevice *device,
|
|||||||
gdouble *win_y,
|
gdouble *win_y,
|
||||||
GdkModifierType *mask)
|
GdkModifierType *mask)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_keyboard_query_state\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkGrabStatus
|
static GdkGrabStatus
|
||||||
@@ -118,7 +113,6 @@ gdk_mir_keyboard_grab (GdkDevice *device,
|
|||||||
GdkCursor *cursor,
|
GdkCursor *cursor,
|
||||||
guint32 time_)
|
guint32 time_)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keyboard_grab\n");
|
|
||||||
/* Mir doesn't do grabs, so sure, you have the grab */
|
/* Mir doesn't do grabs, so sure, you have the grab */
|
||||||
return GDK_GRAB_SUCCESS;
|
return GDK_GRAB_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -127,7 +121,6 @@ static void
|
|||||||
gdk_mir_keyboard_ungrab (GdkDevice *device,
|
gdk_mir_keyboard_ungrab (GdkDevice *device,
|
||||||
guint32 time_)
|
guint32 time_)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keyboard_ungrab\n");
|
|
||||||
/* Mir doesn't do grabs */
|
/* Mir doesn't do grabs */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,7 +131,6 @@ gdk_mir_keyboard_window_at_position (GdkDevice *device,
|
|||||||
GdkModifierType *mask,
|
GdkModifierType *mask,
|
||||||
gboolean get_toplevel)
|
gboolean get_toplevel)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keyboard_window_at_position (%f, %f)\n", *win_x, *win_y);
|
|
||||||
/* Keyboard don't have locations... */
|
/* Keyboard don't have locations... */
|
||||||
return NULL; // FIXME: Or the window with the keyboard focus?
|
return NULL; // FIXME: Or the window with the keyboard focus?
|
||||||
}
|
}
|
||||||
@@ -148,7 +140,6 @@ gdk_mir_keyboard_select_window_events (GdkDevice *device,
|
|||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkEventMask event_mask)
|
GdkEventMask event_mask)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_keyboard_select_window_events\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ _gdk_mir_keymap_new (void)
|
|||||||
static PangoDirection
|
static PangoDirection
|
||||||
gdk_mir_keymap_get_direction (GdkKeymap *keymap)
|
gdk_mir_keymap_get_direction (GdkKeymap *keymap)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_get_direction\n");
|
|
||||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
@@ -80,28 +79,24 @@ gdk_mir_keymap_get_direction (GdkKeymap *keymap)
|
|||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_keymap_have_bidi_layouts (GdkKeymap *keymap)
|
gdk_mir_keymap_have_bidi_layouts (GdkKeymap *keymap)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_have_bidi_layouts\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_keymap_get_caps_lock_state (GdkKeymap *keymap)
|
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);
|
return xkb_state_led_name_is_active (GDK_MIR_KEYMAP (keymap)->xkb_state, XKB_LED_NAME_CAPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_keymap_get_num_lock_state (GdkKeymap *keymap)
|
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);
|
return xkb_state_led_name_is_active (GDK_MIR_KEYMAP (keymap)->xkb_state, XKB_LED_NAME_NUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_mir_keymap_get_scroll_lock_state (GdkKeymap *keymap)
|
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);
|
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,
|
GdkKeymapKey **keys,
|
||||||
gint *n_keys)
|
gint *n_keys)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_get_entries_for_keyval\n");
|
|
||||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||||
GArray *key_array;
|
GArray *key_array;
|
||||||
guint keycode;
|
guint keycode;
|
||||||
@@ -164,7 +158,6 @@ gdk_mir_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
|||||||
guint **keyvals,
|
guint **keyvals,
|
||||||
gint *n_entries)
|
gint *n_entries)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_get_entries_for_keycode\n");
|
|
||||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||||
gint num_layouts, layout;
|
gint num_layouts, layout;
|
||||||
gint num_entries;
|
gint num_entries;
|
||||||
@@ -214,7 +207,6 @@ static guint
|
|||||||
gdk_mir_keymap_lookup_key (GdkKeymap *keymap,
|
gdk_mir_keymap_lookup_key (GdkKeymap *keymap,
|
||||||
const GdkKeymapKey *key)
|
const GdkKeymapKey *key)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_lookup_key\n");
|
|
||||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||||
const xkb_keysym_t *syms;
|
const xkb_keysym_t *syms;
|
||||||
int num_syms;
|
int num_syms;
|
||||||
@@ -292,7 +284,6 @@ gdk_mir_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
|||||||
gint *effective_level,
|
gint *effective_level,
|
||||||
GdkModifierType *consumed_modifiers)
|
GdkModifierType *consumed_modifiers)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_translate_keyboard_state\n");
|
|
||||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||||
struct xkb_state *xkb_state;
|
struct xkb_state *xkb_state;
|
||||||
guint32 modifiers;
|
guint32 modifiers;
|
||||||
@@ -330,7 +321,6 @@ static void
|
|||||||
gdk_mir_keymap_add_virtual_modifiers (GdkKeymap *keymap,
|
gdk_mir_keymap_add_virtual_modifiers (GdkKeymap *keymap,
|
||||||
GdkModifierType *state)
|
GdkModifierType *state)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_add_virtual_modifiers\n");
|
|
||||||
// FIXME: What is this?
|
// FIXME: What is this?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,7 +328,6 @@ static gboolean
|
|||||||
gdk_mir_keymap_map_virtual_modifiers (GdkKeymap *keymap,
|
gdk_mir_keymap_map_virtual_modifiers (GdkKeymap *keymap,
|
||||||
GdkModifierType *state)
|
GdkModifierType *state)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_map_virtual_modifiers\n");
|
|
||||||
// FIXME: What is this?
|
// FIXME: What is this?
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -346,7 +335,6 @@ gdk_mir_keymap_map_virtual_modifiers (GdkKeymap *keymap,
|
|||||||
static guint
|
static guint
|
||||||
gdk_mir_keymap_get_modifier_state (GdkKeymap *keymap)
|
gdk_mir_keymap_get_modifier_state (GdkKeymap *keymap)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_keymap_get_modifier_state\n");
|
|
||||||
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
|
||||||
xkb_mod_mask_t mods;
|
xkb_mod_mask_t mods;
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ gdk_mir_pointer_get_history (GdkDevice *device,
|
|||||||
GdkTimeCoord ***events,
|
GdkTimeCoord ***events,
|
||||||
gint *n_events)
|
gint *n_events)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_pointer_get_history\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +102,6 @@ gdk_mir_pointer_get_state (GdkDevice *device,
|
|||||||
gdouble *axes,
|
gdouble *axes,
|
||||||
GdkModifierType *mask)
|
GdkModifierType *mask)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_pointer_get_state\n");
|
|
||||||
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
||||||
gdouble x, y;
|
gdouble x, y;
|
||||||
|
|
||||||
@@ -120,7 +118,6 @@ gdk_mir_pointer_set_window_cursor (GdkDevice *device,
|
|||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkCursor *cursor)
|
GdkCursor *cursor)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_pointer_set_window_cursor\n");
|
|
||||||
/* Mir doesn't support cursors */
|
/* Mir doesn't support cursors */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +127,6 @@ gdk_mir_pointer_warp (GdkDevice *device,
|
|||||||
gdouble x,
|
gdouble x,
|
||||||
gdouble y)
|
gdouble y)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_pointer_warp\n");
|
|
||||||
/* Mir doesn't support warping */
|
/* Mir doesn't support warping */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +141,6 @@ gdk_mir_pointer_query_state (GdkDevice *device,
|
|||||||
gdouble *win_y,
|
gdouble *win_y,
|
||||||
GdkModifierType *mask)
|
GdkModifierType *mask)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_pointer_query_state\n");
|
|
||||||
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
||||||
|
|
||||||
if (root_window)
|
if (root_window)
|
||||||
@@ -173,7 +168,6 @@ gdk_mir_pointer_grab (GdkDevice *device,
|
|||||||
GdkCursor *cursor,
|
GdkCursor *cursor,
|
||||||
guint32 time_)
|
guint32 time_)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_pointer_grab\n");
|
|
||||||
/* Mir doesn't do grabs, so sure, you have the grab */
|
/* Mir doesn't do grabs, so sure, you have the grab */
|
||||||
return GDK_GRAB_SUCCESS;
|
return GDK_GRAB_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -182,7 +176,6 @@ static void
|
|||||||
gdk_mir_pointer_ungrab (GdkDevice *device,
|
gdk_mir_pointer_ungrab (GdkDevice *device,
|
||||||
guint32 time_)
|
guint32 time_)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_pointer_ungrab\n");
|
|
||||||
/* Mir doesn't do grabs */
|
/* Mir doesn't do grabs */
|
||||||
|
|
||||||
GdkDeviceGrabInfo *grab = _gdk_display_get_last_device_grab (gdk_device_get_display (device), device);
|
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,
|
GdkModifierType *mask,
|
||||||
gboolean get_toplevel)
|
gboolean get_toplevel)
|
||||||
{
|
{
|
||||||
//g_printerr ("gdk_mir_pointer_window_at_position\n");
|
|
||||||
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
GdkMirPointer *p = GDK_MIR_POINTER (device);
|
||||||
|
|
||||||
if (win_x)
|
if (win_x)
|
||||||
@@ -216,7 +208,6 @@ gdk_mir_pointer_select_window_events (GdkDevice *device,
|
|||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkEventMask event_mask)
|
GdkEventMask event_mask)
|
||||||
{
|
{
|
||||||
g_printerr ("gdk_mir_pointer_select_window_events\n");
|
|
||||||
// FIXME?
|
// 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];
|
GdkWindow *window = [[self contentView] gdkWindow];
|
||||||
|
|
||||||
|
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
|
||||||
_gdk_quartz_events_update_focus_window (window, TRUE);
|
_gdk_quartz_events_update_focus_window (window, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
GdkWindow *window = [[self contentView] gdkWindow];
|
GdkWindow *window = [[self contentView] gdkWindow];
|
||||||
|
|
||||||
_gdk_quartz_events_update_focus_window (window, FALSE);
|
_gdk_quartz_events_update_focus_window (window, FALSE);
|
||||||
|
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)windowDidBecomeMain:(NSNotification *)aNotification
|
-(void)windowDidBecomeMain:(NSNotification *)aNotification
|
||||||
@@ -838,4 +840,19 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
|||||||
inMaximizeTransition = NO;
|
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
|
@end
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
NSRect lastUnmaximizedFrame;
|
NSRect lastUnmaximizedFrame;
|
||||||
NSRect lastMaximizedFrame;
|
NSRect lastMaximizedFrame;
|
||||||
|
NSRect lastUnfullscreenFrame;
|
||||||
BOOL inMaximizeTransition;
|
BOOL inMaximizeTransition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ libgdk_quartz_la_SOURCES = \
|
|||||||
gdkdevicemanager-core-quartz.c \
|
gdkdevicemanager-core-quartz.c \
|
||||||
gdkdevicemanager-core-quartz.h \
|
gdkdevicemanager-core-quartz.h \
|
||||||
gdkdisplay-quartz.c \
|
gdkdisplay-quartz.c \
|
||||||
|
gdkdisplay-quartz.h \
|
||||||
gdkdisplaymanager-quartz.c \
|
gdkdisplaymanager-quartz.c \
|
||||||
gdkdnd-quartz.c \
|
gdkdnd-quartz.c \
|
||||||
gdkdnd-quartz.h \
|
gdkdnd-quartz.h \
|
||||||
@@ -38,6 +39,8 @@ libgdk_quartz_la_SOURCES = \
|
|||||||
gdkglcontext-quartz.h \
|
gdkglcontext-quartz.h \
|
||||||
gdkglobals-quartz.c \
|
gdkglobals-quartz.c \
|
||||||
gdkkeys-quartz.c \
|
gdkkeys-quartz.c \
|
||||||
|
gdkmonitor-quartz.c \
|
||||||
|
gdkmonitor-quartz.h \
|
||||||
gdkprivate-quartz.h \
|
gdkprivate-quartz.h \
|
||||||
gdkproperty-quartz.c \
|
gdkproperty-quartz.c \
|
||||||
gdkquartz.h \
|
gdkquartz.h \
|
||||||
@@ -62,6 +65,7 @@ libgdkquartzinclude_HEADERS = \
|
|||||||
gdkquartzdisplaymanager.h \
|
gdkquartzdisplaymanager.h \
|
||||||
gdkquartzdnd.h \
|
gdkquartzdnd.h \
|
||||||
gdkquartzkeys.h \
|
gdkquartzkeys.h \
|
||||||
|
gdkquartzmonitor.h \
|
||||||
gdkquartzscreen.h \
|
gdkquartzscreen.h \
|
||||||
gdkquartzutils.h \
|
gdkquartzutils.h \
|
||||||
gdkquartzvisual.h \
|
gdkquartzvisual.h \
|
||||||
|
|||||||
@@ -26,18 +26,11 @@
|
|||||||
#include "gdkquartzwindow.h"
|
#include "gdkquartzwindow.h"
|
||||||
#include "gdkquartzdisplay.h"
|
#include "gdkquartzdisplay.h"
|
||||||
#include "gdkquartzdevicemanager-core.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 *
|
static GdkWindow *
|
||||||
gdk_quartz_display_get_default_group (GdkDisplay *display)
|
gdk_quartz_display_get_default_group (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
@@ -196,12 +189,45 @@ gdk_quartz_display_notify_startup_complete (GdkDisplay *display,
|
|||||||
/* FIXME: Implement? */
|
/* 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)
|
G_DEFINE_TYPE (GdkQuartzDisplay, gdk_quartz_display, GDK_TYPE_DISPLAY)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_quartz_display_init (GdkQuartzDisplay *display)
|
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
|
static void
|
||||||
@@ -209,14 +235,14 @@ gdk_quartz_display_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (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);
|
G_OBJECT_CLASS (gdk_quartz_display_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_quartz_display_finalize (GObject *object)
|
gdk_quartz_display_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (object);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gdk_quartz_display_parent_class)->finalize (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->convert_selection = _gdk_quartz_display_convert_selection;
|
||||||
display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
|
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->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 };
|
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 *width,
|
||||||
guint *height);
|
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 */
|
/* Display methods - keymap */
|
||||||
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
|
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ G_END_DECLS
|
|||||||
#include <gdk/quartz/gdkquartzdisplaymanager.h>
|
#include <gdk/quartz/gdkquartzdisplaymanager.h>
|
||||||
#include <gdk/quartz/gdkquartzdnd.h>
|
#include <gdk/quartz/gdkquartzdnd.h>
|
||||||
#include <gdk/quartz/gdkquartzkeys.h>
|
#include <gdk/quartz/gdkquartzkeys.h>
|
||||||
|
#include <gdk/quartz/gdkquartzmonitor.h>
|
||||||
#include <gdk/quartz/gdkquartzscreen.h>
|
#include <gdk/quartz/gdkquartzscreen.h>
|
||||||
#include <gdk/quartz/gdkquartzutils.h>
|
#include <gdk/quartz/gdkquartzutils.h>
|
||||||
#include <gdk/quartz/gdkquartzvisual.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 <gdk/gdk.h>
|
||||||
|
|
||||||
#include "gdkprivate-quartz.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
|
/* 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,
|
CGDisplayChangeSummaryFlags flags,
|
||||||
void *userInfo);
|
void *userInfo);
|
||||||
|
|
||||||
|
static gint get_mm_from_pixels (NSScreen *screen, int pixels);
|
||||||
|
|
||||||
G_DEFINE_TYPE (GdkQuartzScreen, gdk_quartz_screen, GDK_TYPE_SCREEN);
|
G_DEFINE_TYPE (GdkQuartzScreen, gdk_quartz_screen, GDK_TYPE_SCREEN);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
|
gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
|
||||||
{
|
{
|
||||||
GdkScreen *screen = GDK_SCREEN (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, size.width);
|
||||||
_gdk_screen_set_resolution (screen,
|
|
||||||
72.0 * [nsscreen userSpaceScaleFactor]);
|
|
||||||
|
|
||||||
gdk_quartz_screen_calculate_layout (quartz_screen);
|
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);
|
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
|
static void
|
||||||
gdk_quartz_screen_finalize (GObject *object)
|
gdk_quartz_screen_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GdkQuartzScreen *screen = GDK_QUARTZ_SCREEN (object);
|
G_OBJECT_CLASS (gdk_quartz_screen_parent_class)->finalize (object);
|
||||||
|
|
||||||
gdk_quartz_screen_screen_rects_free (screen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Protocol to build cleanly for OSX < 10.7 */
|
||||||
|
@protocol ScaleFactor
|
||||||
|
- (CGFloat) backingScaleFactor;
|
||||||
|
@end
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
||||||
@@ -125,11 +123,14 @@ gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
|||||||
NSArray *array;
|
NSArray *array;
|
||||||
int i;
|
int i;
|
||||||
int max_x, max_y;
|
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_ALLOC_POOL;
|
||||||
|
|
||||||
gdk_quartz_screen_screen_rects_free (screen);
|
|
||||||
|
|
||||||
array = [NSScreen screens];
|
array = [NSScreen screens];
|
||||||
|
|
||||||
screen->width = 0;
|
screen->width = 0;
|
||||||
@@ -144,6 +145,12 @@ gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
|||||||
*/
|
*/
|
||||||
for (i = 0; i < [array count]; i++)
|
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];
|
NSRect rect = [[array objectAtIndex:i] frame];
|
||||||
|
|
||||||
screen->min_x = MIN (screen->min_x, rect.origin.x);
|
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->width = max_x - screen->min_x;
|
||||||
screen->height = max_y - screen->min_y;
|
screen->height = max_y - screen->min_y;
|
||||||
|
|
||||||
screen->n_screens = [array count];
|
for (i = 0; i < [array count] ; i++)
|
||||||
screen->screen_rects = g_new0 (GdkRectangle, screen->n_screens);
|
|
||||||
|
|
||||||
for (i = 0; i < screen->n_screens; i++)
|
|
||||||
{
|
{
|
||||||
NSScreen *nsscreen;
|
NSScreen *nsscreen;
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
|
GdkMonitor *monitor;
|
||||||
|
|
||||||
|
monitor = GDK_MONITOR(display_quartz->monitors->pdata[i]);
|
||||||
nsscreen = [array objectAtIndex:i];
|
nsscreen = [array objectAtIndex:i];
|
||||||
rect = [nsscreen frame];
|
rect = [nsscreen frame];
|
||||||
|
|
||||||
screen->screen_rects[i].x = rect.origin.x - screen->min_x;
|
monitor->geometry.x = rect.origin.x - screen->min_x;
|
||||||
screen->screen_rects[i].y
|
monitor->geometry.y
|
||||||
= screen->height - (rect.origin.y + rect.size.height) + screen->min_y;
|
= screen->height - (rect.origin.y + rect.size.height) + screen->min_y;
|
||||||
screen->screen_rects[i].width = rect.size.width;
|
monitor->geometry.width = rect.size.width;
|
||||||
screen->screen_rects[i].height = rect.size.height;
|
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;
|
GDK_QUARTZ_RELEASE_POOL;
|
||||||
@@ -318,17 +334,35 @@ gdk_quartz_screen_get_height (GdkScreen *screen)
|
|||||||
static gint
|
static gint
|
||||||
get_mm_from_pixels (NSScreen *screen, int pixels)
|
get_mm_from_pixels (NSScreen *screen, int pixels)
|
||||||
{
|
{
|
||||||
/* userSpaceScaleFactor is in "pixels per point",
|
const float mm_per_inch = 25.4;
|
||||||
* 72 is the number of points per inch,
|
NSDictionary *dd = [[[NSScreen screens] objectAtIndex:0] deviceDescription];
|
||||||
* and 25.4 is the number of millimeters per inch.
|
NSSize size = [[dd valueForKey:NSDeviceResolution] sizeValue];
|
||||||
*/
|
float dpi = size.width;
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
|
return (pixels / dpi) * mm_per_inch;
|
||||||
float dpi = [screen userSpaceScaleFactor] * 72.0;
|
}
|
||||||
#else
|
|
||||||
float dpi = 96.0 / 72.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
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 *
|
static NSScreen *
|
||||||
@@ -361,127 +395,6 @@ gdk_quartz_screen_get_height_mm (GdkScreen *screen)
|
|||||||
GDK_QUARTZ_SCREEN (screen)->height);
|
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
|
static void
|
||||||
gdk_quartz_screen_class_init (GdkQuartzScreenClass *klass)
|
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_height_mm = gdk_quartz_screen_get_height_mm;
|
||||||
screen_class->get_number = gdk_quartz_screen_get_number;
|
screen_class->get_number = gdk_quartz_screen_get_number;
|
||||||
screen_class->get_root_window = gdk_quartz_screen_get_root_window;
|
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->is_composited = gdk_quartz_screen_is_composited;
|
||||||
screen_class->make_display_name = gdk_quartz_screen_make_display_name;
|
screen_class->make_display_name = gdk_quartz_screen_make_display_name;
|
||||||
screen_class->get_active_window = gdk_quartz_screen_get_active_window;
|
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_depths = _gdk_quartz_screen_query_depths;
|
||||||
screen_class->query_visual_types = _gdk_quartz_screen_query_visual_types;
|
screen_class->query_visual_types = _gdk_quartz_screen_query_visual_types;
|
||||||
screen_class->list_visuals = _gdk_quartz_screen_list_visuals;
|
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 width;
|
||||||
gint height;
|
gint height;
|
||||||
|
|
||||||
int n_screens;
|
|
||||||
GdkRectangle *screen_rects;
|
|
||||||
|
|
||||||
guint screen_changed_id;
|
guint screen_changed_id;
|
||||||
|
|
||||||
guint emit_monitors_changed : 1;
|
guint emit_monitors_changed : 1;
|
||||||
|
|||||||
@@ -2422,7 +2422,10 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (new_mask == NSBorderlessWindowMask)
|
if (new_mask == NSBorderlessWindowMask)
|
||||||
|
{
|
||||||
[impl->toplevel setContentSize:rect.size];
|
[impl->toplevel setContentSize:rect.size];
|
||||||
|
[impl->toplevel setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
[impl->toplevel setFrame:rect display:YES];
|
[impl->toplevel setFrame:rect display:YES];
|
||||||
|
|
||||||
@@ -2471,9 +2474,47 @@ static void
|
|||||||
gdk_quartz_window_set_functions (GdkWindow *window,
|
gdk_quartz_window_set_functions (GdkWindow *window,
|
||||||
GdkWMFunction functions)
|
GdkWMFunction functions)
|
||||||
{
|
{
|
||||||
|
GdkWindowImplQuartz *impl;
|
||||||
|
gboolean min, max, close;
|
||||||
|
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
|
|
||||||
/* FIXME: Implement */
|
impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||||
|
|
||||||
|
if (functions & GDK_FUNC_ALL)
|
||||||
|
{
|
||||||
|
min = !(functions & GDK_FUNC_MINIMIZE);
|
||||||
|
max = !(functions & GDK_FUNC_MAXIMIZE);
|
||||||
|
close = !(functions & GDK_FUNC_CLOSE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
min = (functions & GDK_FUNC_MINIMIZE);
|
||||||
|
max = (functions & GDK_FUNC_MAXIMIZE);
|
||||||
|
close = (functions & GDK_FUNC_CLOSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (impl->toplevel)
|
||||||
|
{
|
||||||
|
NSUInteger mask = [impl->toplevel styleMask];
|
||||||
|
|
||||||
|
if (min)
|
||||||
|
mask = mask | NSMiniaturizableWindowMask;
|
||||||
|
else
|
||||||
|
mask = mask & ~NSMiniaturizableWindowMask;
|
||||||
|
|
||||||
|
if (max)
|
||||||
|
mask = mask | NSResizableWindowMask;
|
||||||
|
else
|
||||||
|
mask = mask & ~NSResizableWindowMask;
|
||||||
|
|
||||||
|
if (close)
|
||||||
|
mask = mask | NSClosableWindowMask;
|
||||||
|
else
|
||||||
|
mask = mask & ~NSClosableWindowMask;
|
||||||
|
|
||||||
|
[impl->toplevel setStyleMask:mask];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#version 130
|
#version 110
|
||||||
|
|
||||||
varying vec2 vUv;
|
varying vec2 vUv;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
#version 130
|
#version 110
|
||||||
|
|
||||||
uniform sampler2D map;
|
|
||||||
|
|
||||||
attribute vec2 position;
|
attribute vec2 position;
|
||||||
attribute vec2 uv;
|
attribute vec2 uv;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#version 130
|
#version 110
|
||||||
|
|
||||||
varying vec2 vUv;
|
varying vec2 vUv;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
#version 130
|
#version 110
|
||||||
|
|
||||||
uniform sampler2DRect map;
|
|
||||||
|
|
||||||
attribute vec2 position;
|
attribute vec2 position;
|
||||||
attribute vec2 uv;
|
attribute vec2 uv;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
#version 150
|
#version 150
|
||||||
|
|
||||||
uniform sampler2D map;
|
|
||||||
|
|
||||||
in vec2 position;
|
in vec2 position;
|
||||||
in vec2 uv;
|
in vec2 uv;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
#version 150
|
#version 150
|
||||||
|
|
||||||
uniform sampler2DRect map;
|
|
||||||
|
|
||||||
attribute vec2 position;
|
attribute vec2 position;
|
||||||
attribute vec2 uv;
|
attribute vec2 uv;
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ _gdk_wayland_cursor_update (GdkWaylandDisplay *display_wayland,
|
|||||||
|
|
||||||
if (!c)
|
if (!c)
|
||||||
{
|
{
|
||||||
g_warning (G_STRLOC ": Unable to load %s from the cursor theme", cursor->name);
|
g_message ("Unable to load %s from the cursor theme", cursor->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -353,7 +353,10 @@ _gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
|
|||||||
return GDK_CURSOR (private);
|
return GDK_CURSOR (private);
|
||||||
|
|
||||||
if (!_gdk_wayland_cursor_update (display_wayland, private))
|
if (!_gdk_wayland_cursor_update (display_wayland, private))
|
||||||
return GDK_CURSOR (private);
|
{
|
||||||
|
g_object_unref (private);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Insert into cache. */
|
/* Insert into cache. */
|
||||||
g_hash_table_insert (display_wayland->cursor_cache,
|
g_hash_table_insert (display_wayland->cursor_cache,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user