Compare commits
1368 Commits
wip/carlos
...
benzea/use
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ac8066a743 | ||
![]() |
c4fa30ac7d | ||
![]() |
84ea4ad990 | ||
![]() |
64685f4b20 | ||
![]() |
bf594e9fb6 | ||
![]() |
3958e75ed2 | ||
![]() |
802309caf9 | ||
![]() |
468b09c01e | ||
![]() |
c13ea4f48d | ||
![]() |
1e7285b2bb | ||
![]() |
a8cb84c711 | ||
![]() |
9075a5bf1e | ||
![]() |
bd4ebd23f4 | ||
![]() |
31c7bcac29 | ||
![]() |
d3b1168e26 | ||
![]() |
674f52ba74 | ||
![]() |
498264959a | ||
![]() |
e89cea8e5a | ||
![]() |
e32e20521d | ||
![]() |
9d5092cef5 | ||
![]() |
68d0c11d88 | ||
![]() |
fdf830940b | ||
![]() |
10daade1c0 | ||
![]() |
9a3a6dc212 | ||
![]() |
f9599b64d0 | ||
![]() |
a46fd33460 | ||
![]() |
d5a70c7669 | ||
![]() |
573ba108d9 | ||
![]() |
9325bd9d8e | ||
![]() |
420fb28d3f | ||
![]() |
5613f4f7f4 | ||
![]() |
02db9ee577 | ||
![]() |
4aab814c37 | ||
![]() |
a48206e827 | ||
![]() |
99cc435730 | ||
![]() |
67d9995280 | ||
![]() |
82233cce65 | ||
![]() |
2e97ba316d | ||
![]() |
7186d09085 | ||
![]() |
4fccc903b5 | ||
![]() |
06fa131235 | ||
![]() |
132fbf49d7 | ||
![]() |
d02c124e1d | ||
![]() |
554644f9e0 | ||
![]() |
cc444d4991 | ||
![]() |
4bf5b7d78d | ||
![]() |
cb91f44ba4 | ||
![]() |
f7e256e9a1 | ||
![]() |
bbec8abb68 | ||
![]() |
d60d671fec | ||
![]() |
8dc730e5ca | ||
![]() |
0cf98c5641 | ||
![]() |
4bacb3621b | ||
![]() |
aef865afc4 | ||
![]() |
d70ddc65ea | ||
![]() |
832a522cce | ||
![]() |
79491df2b8 | ||
![]() |
9f50b2cef2 | ||
![]() |
96e1883361 | ||
![]() |
0d1c18a4ce | ||
![]() |
40205d8f1b | ||
![]() |
4ede6ea8c5 | ||
![]() |
77b3c0d670 | ||
![]() |
3819291cb7 | ||
![]() |
30964051fe | ||
![]() |
ae4ae61a5f | ||
![]() |
a91138c8f8 | ||
![]() |
27b6d1892f | ||
![]() |
2a8f0c2801 | ||
![]() |
9e2e44c0c2 | ||
![]() |
5e117b3f5a | ||
![]() |
294b4eda4c | ||
![]() |
7faf9f91db | ||
![]() |
4b5abdc988 | ||
![]() |
629dc4c770 | ||
![]() |
3f65837e0d | ||
![]() |
549f60fe49 | ||
![]() |
26147afb08 | ||
![]() |
fd0ce66ac1 | ||
![]() |
c621d4d571 | ||
![]() |
6f30cf0004 | ||
![]() |
8c7ec44681 | ||
![]() |
8329c6b069 | ||
![]() |
f11170fecb | ||
![]() |
48e6fccc95 | ||
![]() |
61026d181b | ||
![]() |
5145b33e01 | ||
![]() |
8ce3b3d99e | ||
![]() |
e696f639ab | ||
![]() |
9c43b12206 | ||
![]() |
78a7c93802 | ||
![]() |
5c68596744 | ||
![]() |
61b1ead1a2 | ||
![]() |
138907c480 | ||
![]() |
66f02ae93d | ||
![]() |
455535128a | ||
![]() |
53431fce2a | ||
![]() |
339372ac99 | ||
![]() |
cb9d6b79ef | ||
![]() |
e8e5ccf82d | ||
![]() |
3f2a6f58eb | ||
![]() |
98c0fe934b | ||
![]() |
49c8d42317 | ||
![]() |
5c986060f0 | ||
![]() |
404e713227 | ||
![]() |
542bad60ba | ||
![]() |
6f4c7d66a4 | ||
![]() |
c843102eec | ||
![]() |
b753213f9b | ||
![]() |
599d8e3287 | ||
![]() |
1c89fce30e | ||
![]() |
0247d35e5a | ||
![]() |
427670cc63 | ||
![]() |
4af4b79123 | ||
![]() |
5582d7b3be | ||
![]() |
4cccba5cac | ||
![]() |
f4bf48a7d7 | ||
![]() |
353d7909f6 | ||
![]() |
a586f6a152 | ||
![]() |
e44bd2edb4 | ||
![]() |
8598b654ba | ||
![]() |
a1116bc6c8 | ||
![]() |
8e172aeecb | ||
![]() |
51f68f1054 | ||
![]() |
92375c75f8 | ||
![]() |
22d1febf3c | ||
![]() |
5aa971b177 | ||
![]() |
e922c640ef | ||
![]() |
f5050a4f80 | ||
![]() |
8cac82318f | ||
![]() |
23e9fd3dfa | ||
![]() |
13fd213064 | ||
![]() |
c69dc7566b | ||
![]() |
c6f5b7f1a1 | ||
![]() |
1076b31464 | ||
![]() |
0d006bc8d9 | ||
![]() |
794d3239c7 | ||
![]() |
e5af790acb | ||
![]() |
48639ac5da | ||
![]() |
e7b2f9603e | ||
![]() |
46b3811e22 | ||
![]() |
7adaaab2d6 | ||
![]() |
289e24f1f7 | ||
![]() |
c4d1e150ba | ||
![]() |
293ec0a1cb | ||
![]() |
24b38a5059 | ||
![]() |
c74f4f6340 | ||
![]() |
3e9f8471fc | ||
![]() |
0a41f0f855 | ||
![]() |
375d35be60 | ||
![]() |
6da568e29a | ||
![]() |
c039764d52 | ||
![]() |
d3afe4308a | ||
![]() |
d48fec8855 | ||
![]() |
d992722c24 | ||
![]() |
81bb4f0051 | ||
![]() |
b078917500 | ||
![]() |
ec1c94d4a7 | ||
![]() |
faad63adce | ||
![]() |
244f55df28 | ||
![]() |
f7ad7e6c0f | ||
![]() |
e0ebc4de60 | ||
![]() |
14bb104ef0 | ||
![]() |
f3b9fc8159 | ||
![]() |
8907a29912 | ||
![]() |
a5f986259f | ||
![]() |
bcc519e4ee | ||
![]() |
044238b503 | ||
![]() |
03b59f9e19 | ||
![]() |
7193938d27 | ||
![]() |
5afec87b96 | ||
![]() |
a4f51da184 | ||
![]() |
0545b93232 | ||
![]() |
9cbf83d59c | ||
![]() |
07ca100130 | ||
![]() |
6944839ab6 | ||
![]() |
4a76f66a54 | ||
![]() |
bacbbbd628 | ||
![]() |
c85fb107c0 | ||
![]() |
13f10e36e4 | ||
![]() |
2644e54c51 | ||
![]() |
0e5a5df5fe | ||
![]() |
806ebc464a | ||
![]() |
54ac1f6b59 | ||
![]() |
9b16b74b5d | ||
![]() |
9172901458 | ||
![]() |
ffa0a24848 | ||
![]() |
efe5bed5b4 | ||
![]() |
e865fcc460 | ||
![]() |
16eb461054 | ||
![]() |
c11ef6ef07 | ||
![]() |
95eda361c1 | ||
![]() |
662c76c4fc | ||
![]() |
ff799a1abe | ||
![]() |
155b7bf569 | ||
![]() |
47155ed524 | ||
![]() |
db91439bb0 | ||
![]() |
77aad0869f | ||
![]() |
dc1a28c42a | ||
![]() |
955b27637c | ||
![]() |
1f5b403524 | ||
![]() |
5e87d67e5f | ||
![]() |
f133de2dd4 | ||
![]() |
60800d2313 | ||
![]() |
db90c0d509 | ||
![]() |
e5b0f474ab | ||
![]() |
1688cf7c44 | ||
![]() |
2202c0d02e | ||
![]() |
dbb95cbe5f | ||
![]() |
ae238d1d4d | ||
![]() |
6051712919 | ||
![]() |
6bfa61a3a7 | ||
![]() |
cf89e4d2cd | ||
![]() |
d47324e8d7 | ||
![]() |
ee4638ef5c | ||
![]() |
6ee7c0f486 | ||
![]() |
f4f7e31303 | ||
![]() |
7c036c5896 | ||
![]() |
793c2ac58d | ||
![]() |
13d9e4db30 | ||
![]() |
e84dbd7faf | ||
![]() |
711023ea93 | ||
![]() |
468dc99dc9 | ||
![]() |
6b8ee80fd0 | ||
![]() |
17e39ad79c | ||
![]() |
46aeb9634f | ||
![]() |
3f9c5d04d4 | ||
![]() |
40a76590dd | ||
![]() |
f2b3dd318f | ||
![]() |
942883577e | ||
![]() |
23fa59b77c | ||
![]() |
9678fd5306 | ||
![]() |
563e7139b6 | ||
![]() |
2e9faaf67a | ||
![]() |
4918893326 | ||
![]() |
3e5960b5a2 | ||
![]() |
b294e62aed | ||
![]() |
c63f54b7a7 | ||
![]() |
3186e45ae5 | ||
![]() |
ed7afd9e80 | ||
![]() |
683f18639e | ||
![]() |
e17494f3bd | ||
![]() |
c36c865987 | ||
![]() |
a99f579127 | ||
![]() |
acc7b83322 | ||
![]() |
95662fd3d8 | ||
![]() |
b3980f7a94 | ||
![]() |
ac626f7334 | ||
![]() |
b622a8b55d | ||
![]() |
b6170dbe7b | ||
![]() |
d6bf4800ed | ||
![]() |
a60457c2d8 | ||
![]() |
33d1bae03f | ||
![]() |
013b336690 | ||
![]() |
096d78479b | ||
![]() |
68fca552d7 | ||
![]() |
18e0a8f7bf | ||
![]() |
cd2ee44216 | ||
![]() |
ebf9ac091d | ||
![]() |
cf791c09f0 | ||
![]() |
1d8807a171 | ||
![]() |
f18e2d2e62 | ||
![]() |
71c3f4af31 | ||
![]() |
3078394951 | ||
![]() |
a7f4f5b291 | ||
![]() |
bd1630a12c | ||
![]() |
67d5ebb187 | ||
![]() |
ba7b8a5de3 | ||
![]() |
d54c548aac | ||
![]() |
f01db80387 | ||
![]() |
5e0989532e | ||
![]() |
673f4295e8 | ||
![]() |
1f04b1ae69 | ||
![]() |
26a7387f40 | ||
![]() |
bd5266a05e | ||
![]() |
eb3ffeff0a | ||
![]() |
0731eb629c | ||
![]() |
34a38827b7 | ||
![]() |
3076895e98 | ||
![]() |
0e4c23c985 | ||
![]() |
fb49e9def7 | ||
![]() |
45e77c1d87 | ||
![]() |
cf107c89b8 | ||
![]() |
6a8830a551 | ||
![]() |
4523251849 | ||
![]() |
5f4e8789df | ||
![]() |
eaf0aa1f07 | ||
![]() |
96da0c60bd | ||
![]() |
da36575d7f | ||
![]() |
7716a418ce | ||
![]() |
6ab2e30fff | ||
![]() |
8b0289a5ba | ||
![]() |
d810c0576d | ||
![]() |
82f56054d4 | ||
![]() |
de362537c6 | ||
![]() |
ba9fb16048 | ||
![]() |
148cba3270 | ||
![]() |
c5bb2e3f56 | ||
![]() |
049e7882b7 | ||
![]() |
f297a5faa5 | ||
![]() |
40e6aa7d94 | ||
![]() |
668be1f4bd | ||
![]() |
a444a4c5f5 | ||
![]() |
05da4a6094 | ||
![]() |
db8fcc0537 | ||
![]() |
86a5358812 | ||
![]() |
ff8ed70f84 | ||
![]() |
179d5ba6a6 | ||
![]() |
98892391d7 | ||
![]() |
45a8806e65 | ||
![]() |
e1fa0734a9 | ||
![]() |
8665084df1 | ||
![]() |
62072838c9 | ||
![]() |
c5b7d73ce2 | ||
![]() |
0556138b9f | ||
![]() |
d57dbe1d4c | ||
![]() |
5d646a5d6f | ||
![]() |
e82a657cd9 | ||
![]() |
8c89ea5f0a | ||
![]() |
8cfa8dc0c1 | ||
![]() |
bdf5e3f357 | ||
![]() |
94682e69aa | ||
![]() |
160cc9182d | ||
![]() |
cd293f764e | ||
![]() |
a5d0cfe8fb | ||
![]() |
ba0f17f5b1 | ||
![]() |
16875340cb | ||
![]() |
959a418cc3 | ||
![]() |
7c7ccb2e43 | ||
![]() |
cada2b54fe | ||
![]() |
3ecae81809 | ||
![]() |
4f2b217a6a | ||
![]() |
b1a1d4e13d | ||
![]() |
f7315c9a36 | ||
![]() |
9ac52f0340 | ||
![]() |
f059466337 | ||
![]() |
dcd0f4322a | ||
![]() |
65d8f27b6b | ||
![]() |
bdceb3acdb | ||
![]() |
8e204e036a | ||
![]() |
553211dd81 | ||
![]() |
97010ac64d | ||
![]() |
c2d03bf73e | ||
![]() |
22c8f179d2 | ||
![]() |
d4ff5e2d31 | ||
![]() |
2773e8adf8 | ||
![]() |
e17d70a592 | ||
![]() |
da213febdc | ||
![]() |
7c2e926c44 | ||
![]() |
c474ad6a53 | ||
![]() |
877ecc1bb4 | ||
![]() |
0d0286d59e | ||
![]() |
23f77a1b63 | ||
![]() |
317ce05a27 | ||
![]() |
a8155a0471 | ||
![]() |
5e7fa20f06 | ||
![]() |
3a688988e0 | ||
![]() |
34ff206604 | ||
![]() |
5c1be2233d | ||
![]() |
e1751ad9ee | ||
![]() |
84cc89e19a | ||
![]() |
ea4665bf51 | ||
![]() |
227d272049 | ||
![]() |
e53db92a7b | ||
![]() |
dd2b1278a0 | ||
![]() |
f2e2fcf758 | ||
![]() |
dfd44ff971 | ||
![]() |
943b069996 | ||
![]() |
2a56de80a2 | ||
![]() |
69a0c1dc80 | ||
![]() |
1b4709794e | ||
![]() |
1cc249fe18 | ||
![]() |
446bd04b6c | ||
![]() |
9234fcb624 | ||
![]() |
59a697f773 | ||
![]() |
d49d10b14f | ||
![]() |
4c15d32b55 | ||
![]() |
73eaf51770 | ||
![]() |
81ee8886ce | ||
![]() |
658c741420 | ||
![]() |
65cc8c1ea2 | ||
![]() |
d9597d2148 | ||
![]() |
fc3831c797 | ||
![]() |
ce86f90efb | ||
![]() |
b5f50028f2 | ||
![]() |
2c388e2155 | ||
![]() |
fb6e2743ec | ||
![]() |
6ee006c851 | ||
![]() |
107e521553 | ||
![]() |
7735a919d1 | ||
![]() |
9f617ae43d | ||
![]() |
104bdde746 | ||
![]() |
2a990cc140 | ||
![]() |
3e41568074 | ||
![]() |
66ae09b670 | ||
![]() |
7b97c7b35e | ||
![]() |
ca318c1520 | ||
![]() |
cbb4f6c892 | ||
![]() |
092b3edb51 | ||
![]() |
8d6d2d07dd | ||
![]() |
fa461525ee | ||
![]() |
8e510a07c4 | ||
![]() |
e153524748 | ||
![]() |
eb8a1f42bc | ||
![]() |
89cd9d382d | ||
![]() |
488991b0f6 | ||
![]() |
e2330617ac | ||
![]() |
5e6d98e79f | ||
![]() |
5eaf655224 | ||
![]() |
2c1553570f | ||
![]() |
c937dd5ba3 | ||
![]() |
26b76ee95d | ||
![]() |
006eb6d81e | ||
![]() |
0cdf13ac12 | ||
![]() |
0a3f25c303 | ||
![]() |
105a3f757a | ||
![]() |
f376a318ba | ||
![]() |
4b88c1832a | ||
![]() |
fc8aa1cdb1 | ||
![]() |
7049b2f274 | ||
![]() |
0f51ae7cf0 | ||
![]() |
437f6b3d59 | ||
![]() |
05e1a6c2ca | ||
![]() |
25c1a85384 | ||
![]() |
bba8f6c53e | ||
![]() |
dbe9daeb76 | ||
![]() |
8fd55fef85 | ||
![]() |
acfd03da30 | ||
![]() |
f352c3d79d | ||
![]() |
4bf0bd3f55 | ||
![]() |
76f2579e44 | ||
![]() |
0706e021f5 | ||
![]() |
b5775e3d85 | ||
![]() |
cd70595b50 | ||
![]() |
1d2913d9b9 | ||
![]() |
b8a49a682e | ||
![]() |
82901f89d5 | ||
![]() |
c9c53cb55f | ||
![]() |
1e637bd7e1 | ||
![]() |
63a0b702c9 | ||
![]() |
031003a5dc | ||
![]() |
b69d2aa6a0 | ||
![]() |
d7d2612218 | ||
![]() |
7a0340c57d | ||
![]() |
0863bd2408 | ||
![]() |
594cc7c7d6 | ||
![]() |
0b19078b2b | ||
![]() |
7811865e84 | ||
![]() |
0e69fe0781 | ||
![]() |
26b08d87a8 | ||
![]() |
321ab3b367 | ||
![]() |
4d0869e206 | ||
![]() |
d13cea6ccb | ||
![]() |
6922f0e16a | ||
![]() |
31df06d94e | ||
![]() |
ecec9a7eaa | ||
![]() |
ab7af2d0c5 | ||
![]() |
f92e0bec0b | ||
![]() |
7a22f6fd3f | ||
![]() |
850ef51879 | ||
![]() |
ef2e04a613 | ||
![]() |
e16b75a0b7 | ||
![]() |
8cdcf529e9 | ||
![]() |
280167f217 | ||
![]() |
a72f3fdabb | ||
![]() |
dd6227e3bf | ||
![]() |
1271ce1cab | ||
![]() |
998114791f | ||
![]() |
8a73324a0f | ||
![]() |
9065edfc95 | ||
![]() |
5111e33948 | ||
![]() |
4cf828323d | ||
![]() |
35776c5d29 | ||
![]() |
2f27b8d5fa | ||
![]() |
be4131b3c4 | ||
![]() |
854feafa83 | ||
![]() |
f423736a70 | ||
![]() |
fdbac25e0d | ||
![]() |
bcfac0d6dc | ||
![]() |
682d43b5ab | ||
![]() |
cd273e82ad | ||
![]() |
3c0067dc69 | ||
![]() |
a957c2f0c2 | ||
![]() |
908203c735 | ||
![]() |
2f072af02b | ||
![]() |
de98fb29da | ||
![]() |
82c92177ff | ||
![]() |
14c706e51b | ||
![]() |
a70823dd1c | ||
![]() |
fdda8adfcf | ||
![]() |
8f242f8bf0 | ||
![]() |
36a14e65c2 | ||
![]() |
6ed5d2e2b4 | ||
![]() |
d4eb222644 | ||
![]() |
a14fd1b955 | ||
![]() |
ab1107973b | ||
![]() |
4ab483d991 | ||
![]() |
dabf72f3c0 | ||
![]() |
907a1f5e48 | ||
![]() |
97140ab634 | ||
![]() |
dc9c5417bc | ||
![]() |
556e7694de | ||
![]() |
1a5cba5df5 | ||
![]() |
cd0990c581 | ||
![]() |
96e831dd8a | ||
![]() |
65fde269c6 | ||
![]() |
ad138210b3 | ||
![]() |
6968f17f3f | ||
![]() |
7e69d1400a | ||
![]() |
ccefa87351 | ||
![]() |
a3c97ee535 | ||
![]() |
77229f99b8 | ||
![]() |
a51437ee2b | ||
![]() |
78232fa3eb | ||
![]() |
433e1b388d | ||
![]() |
9b7d918537 | ||
![]() |
4c59eb0910 | ||
![]() |
5cfea4fee3 | ||
![]() |
7275cf60bd | ||
![]() |
acbefa5263 | ||
![]() |
2b64861ee1 | ||
![]() |
ea90b803fa | ||
![]() |
56e8aab280 | ||
![]() |
1b58341e50 | ||
![]() |
634c31d7cb | ||
![]() |
b8dcd5f842 | ||
![]() |
14e02635ff | ||
![]() |
9b3b5badfb | ||
![]() |
47c1558287 | ||
![]() |
cc7e843c44 | ||
![]() |
cfb8f18cef | ||
![]() |
c0a71720af | ||
![]() |
8b03d9ecc3 | ||
![]() |
ea54ce7d96 | ||
![]() |
cb31e3e12a | ||
![]() |
c710a56903 | ||
![]() |
96d5bde9b7 | ||
![]() |
ad72fa46b0 | ||
![]() |
fa4580de53 | ||
![]() |
5e343e2c16 | ||
![]() |
ef93bb6471 | ||
![]() |
d6aaef9954 | ||
![]() |
2ca351366e | ||
![]() |
f54bf022bd | ||
![]() |
e56df455ae | ||
![]() |
54101b1948 | ||
![]() |
829d9c863c | ||
![]() |
f304fa4869 | ||
![]() |
a32559e5ae | ||
![]() |
8e13292d62 | ||
![]() |
29ea5306eb | ||
![]() |
fb9e8768a3 | ||
![]() |
c747be84d9 | ||
![]() |
2d7adb90c8 | ||
![]() |
6b35a4901e | ||
![]() |
4c1fde9deb | ||
![]() |
425e65049b | ||
![]() |
d3f30d9ece | ||
![]() |
75cffd0ec4 | ||
![]() |
e33d6b2908 | ||
![]() |
a50907513a | ||
![]() |
c0130ca8f7 | ||
![]() |
9d4e4e2bd4 | ||
![]() |
bdc7cc8ab9 | ||
![]() |
13deb22223 | ||
![]() |
220e4caf36 | ||
![]() |
5c617ac286 | ||
![]() |
bc08ad2fbb | ||
![]() |
0947bc37d3 | ||
![]() |
959eb98090 | ||
![]() |
32dcf77a8f | ||
![]() |
75349f8cde | ||
![]() |
eac227a203 | ||
![]() |
bc166aa6b4 | ||
![]() |
5fa8b24b2b | ||
![]() |
9d65eab549 | ||
![]() |
c4a9117ef8 | ||
![]() |
0db38c4999 | ||
![]() |
8ee00cee60 | ||
![]() |
984aad4b86 | ||
![]() |
9af90bf9c1 | ||
![]() |
12ea2fcb51 | ||
![]() |
55cd110c63 | ||
![]() |
f37a172dc7 | ||
![]() |
ad62a659eb | ||
![]() |
15c9458e92 | ||
![]() |
a3baf14e72 | ||
![]() |
f57ce7254d | ||
![]() |
4d8190972d | ||
![]() |
b7ef8796b2 | ||
![]() |
7e8a864992 | ||
![]() |
f3660dc60e | ||
![]() |
0eb355e29d | ||
![]() |
3ccb7cf4b2 | ||
![]() |
578ff22464 | ||
![]() |
73db35c53c | ||
![]() |
76445bcb97 | ||
![]() |
6792903c4f | ||
![]() |
17c217848d | ||
![]() |
07de258f48 | ||
![]() |
ee3e195b79 | ||
![]() |
a0bdf44c2d | ||
![]() |
3259c7e150 | ||
![]() |
e9e28baab7 | ||
![]() |
d20f6c7969 | ||
![]() |
93c7d571af | ||
![]() |
d526283ab9 | ||
![]() |
782056adab | ||
![]() |
0521706617 | ||
![]() |
989a281b5f | ||
![]() |
18838bcefc | ||
![]() |
f780706f09 | ||
![]() |
358911a049 | ||
![]() |
1b9672b5db | ||
![]() |
08c6b801d2 | ||
![]() |
80c8a287ee | ||
![]() |
7ab07b05e9 | ||
![]() |
141373f0ba | ||
![]() |
0c5866a9e1 | ||
![]() |
879f5f0dbb | ||
![]() |
123b40105d | ||
![]() |
7ef32f747b | ||
![]() |
e8949292c1 | ||
![]() |
f5a2694eba | ||
![]() |
319f7f5b63 | ||
![]() |
9a10b8ff94 | ||
![]() |
8b62f4884d | ||
![]() |
500a692e3b | ||
![]() |
d3d1ff1aae | ||
![]() |
ca51cd8488 | ||
![]() |
9109fa0eb8 | ||
![]() |
79b5ece241 | ||
![]() |
cda9579034 | ||
![]() |
82b222f218 | ||
![]() |
56a5c5e4d1 | ||
![]() |
b95d7e8276 | ||
![]() |
5b98cc7a3a | ||
![]() |
4de892b02a | ||
![]() |
efe6c13d93 | ||
![]() |
aae9f3a3e6 | ||
![]() |
f501fdcc56 | ||
![]() |
90a5582a73 | ||
![]() |
ac7aa11417 | ||
![]() |
cc5968109b | ||
![]() |
0f6ab787ac | ||
![]() |
2812338b7a | ||
![]() |
ddbdb5fa77 | ||
![]() |
35007ebae0 | ||
![]() |
09bab98b1e | ||
![]() |
aee8bfce3f | ||
![]() |
92868182c9 | ||
![]() |
08a3cbfc6c | ||
![]() |
59fb26cb00 | ||
![]() |
87c734cef9 | ||
![]() |
c755fb6995 | ||
![]() |
e9cc220c8e | ||
![]() |
92f210039e | ||
![]() |
aef393efd0 | ||
![]() |
6836317e41 | ||
![]() |
61e51cdef6 | ||
![]() |
7868ab761f | ||
![]() |
e6c8939c30 | ||
![]() |
ac5d9ec558 | ||
![]() |
9c8ff5dbe8 | ||
![]() |
7738316dff | ||
![]() |
1c3d8defb5 | ||
![]() |
b2ae03c428 | ||
![]() |
456698c814 | ||
![]() |
9189b7b512 | ||
![]() |
4259cfd4c6 | ||
![]() |
4fdefb5b2e | ||
![]() |
5ca0ef078d | ||
![]() |
a5265365dd | ||
![]() |
62f576e15b | ||
![]() |
73bc3c4426 | ||
![]() |
57772e5850 | ||
![]() |
7c8baf8ed9 | ||
![]() |
0e3c062406 | ||
![]() |
4bc7425332 | ||
![]() |
a2a8f0cdaa | ||
![]() |
faa7b2d4e5 | ||
![]() |
a95644dbdc | ||
![]() |
720f363241 | ||
![]() |
3794df608c | ||
![]() |
2c893beff1 | ||
![]() |
a3c425ad89 | ||
![]() |
1d144486d1 | ||
![]() |
9cd3b07472 | ||
![]() |
6061abbf90 | ||
![]() |
55c084e6e1 | ||
![]() |
45289b3d65 | ||
![]() |
6df34eb4b7 | ||
![]() |
3e68c9e8fa | ||
![]() |
fc0ce11fcd | ||
![]() |
c08a24bb40 | ||
![]() |
78560b8426 | ||
![]() |
0eab73dc2e | ||
![]() |
dd8c8e82f2 | ||
![]() |
62f4e0501f | ||
![]() |
6d8293a422 | ||
![]() |
b80250e483 | ||
![]() |
bd0f1bd338 | ||
![]() |
2439255f32 | ||
![]() |
c327b2df95 | ||
![]() |
9aee47daa9 | ||
![]() |
ecf7e53206 | ||
![]() |
8038eaa99f | ||
![]() |
9bcb50fa09 | ||
![]() |
c17af6c794 | ||
![]() |
4a184d74d5 | ||
![]() |
1f133b3ed2 | ||
![]() |
84616bef27 | ||
![]() |
040de396b2 | ||
![]() |
5a4bc15d0b | ||
![]() |
01e20a6ba9 | ||
![]() |
b0b1ff36ae | ||
![]() |
5ed9abd51a | ||
![]() |
65c5260312 | ||
![]() |
7d9674149f | ||
![]() |
25376b3b3c | ||
![]() |
b86a67c80a | ||
![]() |
7419ab7de5 | ||
![]() |
6b853ffdbd | ||
![]() |
ad220fc025 | ||
![]() |
5bd85ef7e5 | ||
![]() |
73f83f1ab6 | ||
![]() |
5cb6286436 | ||
![]() |
1c25b75571 | ||
![]() |
f2f4af0d50 | ||
![]() |
a8f8bc563e | ||
![]() |
46248748a9 | ||
![]() |
da7372a2fa | ||
![]() |
de97b54595 | ||
![]() |
d7d97f2477 | ||
![]() |
7776941b89 | ||
![]() |
4061c8384b | ||
![]() |
b850f5a732 | ||
![]() |
7645c51c54 | ||
![]() |
f1837b785b | ||
![]() |
22978b9d07 | ||
![]() |
1206879a20 | ||
![]() |
dc5925b7d1 | ||
![]() |
b138006bb7 | ||
![]() |
bca08c2c4e | ||
![]() |
6541d49fe7 | ||
![]() |
c3c6668343 | ||
![]() |
70de90ebce | ||
![]() |
0756fd4636 | ||
![]() |
8c339dac3e | ||
![]() |
06a7c22bcd | ||
![]() |
ca88826ce9 | ||
![]() |
7229a07b6c | ||
![]() |
85f4772a4f | ||
![]() |
f2fb3945d1 | ||
![]() |
d7d75dd8e7 | ||
![]() |
54fe0d311d | ||
![]() |
fefac75e96 | ||
![]() |
5e46940332 | ||
![]() |
1767672375 | ||
![]() |
6fc4cd3c0c | ||
![]() |
feb9d129db | ||
![]() |
2b519cba36 | ||
![]() |
832fc798d5 | ||
![]() |
bd0743a421 | ||
![]() |
20731887f2 | ||
![]() |
980d9b1042 | ||
![]() |
bd7704f9e1 | ||
![]() |
68f18f1fe9 | ||
![]() |
c655166398 | ||
![]() |
e14613e74e | ||
![]() |
f71151a5dd | ||
![]() |
6022b23923 | ||
![]() |
d08763c18c | ||
![]() |
fcb408ad5d | ||
![]() |
51f9e04ef1 | ||
![]() |
2fc7760cee | ||
![]() |
f2d2d473b7 | ||
![]() |
e1f839f48f | ||
![]() |
eccc791f3b | ||
![]() |
6055f04814 | ||
![]() |
0185909ee3 | ||
![]() |
c35e56196a | ||
![]() |
181c7cab32 | ||
![]() |
740a62044e | ||
![]() |
0bf0366933 | ||
![]() |
70bacb9402 | ||
![]() |
57dfe4696d | ||
![]() |
22a91f23ad | ||
![]() |
6aa1026600 | ||
![]() |
75dff3e7c9 | ||
![]() |
bea7600471 | ||
![]() |
8932388dda | ||
![]() |
2238c9f180 | ||
![]() |
ca21ca6745 | ||
![]() |
2bbd2e5563 | ||
![]() |
691d58e69b | ||
![]() |
d84c7269b2 | ||
![]() |
aba689312f | ||
![]() |
f2d9a11013 | ||
![]() |
596376c408 | ||
![]() |
1f62a8dbd9 | ||
![]() |
f59d62bc8f | ||
![]() |
5d5d296551 | ||
![]() |
065bf752f4 | ||
![]() |
4d3e804391 | ||
![]() |
15a2ccd21b | ||
![]() |
fef5753a19 | ||
![]() |
f3fd7cf92b | ||
![]() |
5c500ad402 | ||
![]() |
e7fd068a78 | ||
![]() |
171e5fc3c2 | ||
![]() |
7b7d881386 | ||
![]() |
44905d96da | ||
![]() |
73e8127d5d | ||
![]() |
11e2005563 | ||
![]() |
02fc0b4533 | ||
![]() |
36155f72d0 | ||
![]() |
c63d0173b5 | ||
![]() |
7fcdd60ac5 | ||
![]() |
a8984a81c2 | ||
![]() |
769a02b630 | ||
![]() |
576330edce | ||
![]() |
a2a114e79c | ||
![]() |
79e22853ea | ||
![]() |
be72b22964 | ||
![]() |
2464f00902 | ||
![]() |
9b5d9f3cb3 | ||
![]() |
088117a619 | ||
![]() |
4a19628829 | ||
![]() |
0cd54c5735 | ||
![]() |
cc2c670a5e | ||
![]() |
769a01f4e9 | ||
![]() |
9c1afbbb67 | ||
![]() |
376725e30e | ||
![]() |
b836e661cf | ||
![]() |
446e82e86d | ||
![]() |
f2020913fd | ||
![]() |
d9fb11b043 | ||
![]() |
56ddaaa380 | ||
![]() |
1efb32d300 | ||
![]() |
6dba56223a | ||
![]() |
2ff6beea35 | ||
![]() |
689c7f4107 | ||
![]() |
59bf1f4838 | ||
![]() |
db0f85ba5d | ||
![]() |
425611eadf | ||
![]() |
9213574870 | ||
![]() |
3073acc3b0 | ||
![]() |
a61d525111 | ||
![]() |
4064d9a7a7 | ||
![]() |
8a06cfdd81 | ||
![]() |
d3e789e677 | ||
![]() |
c24d8e856b | ||
![]() |
9db9793f33 | ||
![]() |
c237bc5f45 | ||
![]() |
178b975d6a | ||
![]() |
4abca411f3 | ||
![]() |
e48c7c009a | ||
![]() |
36b361617d | ||
![]() |
5eac1d696d | ||
![]() |
9b53583945 | ||
![]() |
1dbf25afa1 | ||
![]() |
e415cc538a | ||
![]() |
67a3715ded | ||
![]() |
35aa278194 | ||
![]() |
a76762a05e | ||
![]() |
ccf27e5f83 | ||
![]() |
912a9ecfba | ||
![]() |
0487d672ed | ||
![]() |
e94a0fced9 | ||
![]() |
a3b86447f7 | ||
![]() |
1d76eace1e | ||
![]() |
c1303bd642 | ||
![]() |
db11a37a68 | ||
![]() |
0d0b9da6f8 | ||
![]() |
ab0b407da4 | ||
![]() |
c33b330799 | ||
![]() |
144b24bfcc | ||
![]() |
4d21650d6d | ||
![]() |
a6fc656e91 | ||
![]() |
a38bae259e | ||
![]() |
c53aa89098 | ||
![]() |
851b7d0639 | ||
![]() |
b4c78726cf | ||
![]() |
c9cc07fd3a | ||
![]() |
f6eb2a8cf8 | ||
![]() |
08e5589836 | ||
![]() |
4f5a5e84fc | ||
![]() |
0786683189 | ||
![]() |
4887de533c | ||
![]() |
57945a730f | ||
![]() |
78254146f3 | ||
![]() |
3e2a2cf532 | ||
![]() |
04b240b50c | ||
![]() |
7810f0e276 | ||
![]() |
9b8f9b65b8 | ||
![]() |
e741cab3f4 | ||
![]() |
53748e3da7 | ||
![]() |
17c5436f6e | ||
![]() |
04fb6f7659 | ||
![]() |
e5e58f8075 | ||
![]() |
1da0355528 | ||
![]() |
e5881156f6 | ||
![]() |
60170cff70 | ||
![]() |
e2bea48073 | ||
![]() |
bbfaf8204b | ||
![]() |
b3e19ee669 | ||
![]() |
75e2bfb062 | ||
![]() |
a859d76c72 | ||
![]() |
2145333969 | ||
![]() |
1b61b9cd73 | ||
![]() |
a2c545c321 | ||
![]() |
3cd8f3b7dc | ||
![]() |
033ce2d956 | ||
![]() |
2b47e89405 | ||
![]() |
80d11287eb | ||
![]() |
f869e4d54b | ||
![]() |
c1059df7f9 | ||
![]() |
e3d3df985f | ||
![]() |
86ff3dfb3c | ||
![]() |
7e0d185120 | ||
![]() |
61c173b777 | ||
![]() |
f99cd18254 | ||
![]() |
0405786573 | ||
![]() |
b016ff29f6 | ||
![]() |
3f2e86f67c | ||
![]() |
0aa4a526c6 | ||
![]() |
85c2aef4bc | ||
![]() |
76664ef891 | ||
![]() |
b1ea768949 | ||
![]() |
ea9d8a895b | ||
![]() |
38432da328 | ||
![]() |
430f354cd9 | ||
![]() |
1cf4279745 | ||
![]() |
7713006f5b | ||
![]() |
465e13128b | ||
![]() |
86de79cfc5 | ||
![]() |
1d77641f0b | ||
![]() |
2f217109aa | ||
![]() |
5e0523cc8b | ||
![]() |
dbe6e01e12 | ||
![]() |
103c469cc9 | ||
![]() |
ef074ea510 | ||
![]() |
39bac6eabd | ||
![]() |
0200f4fcd9 | ||
![]() |
439afb3f19 | ||
![]() |
b01edc22f3 | ||
![]() |
e8bca5052a | ||
![]() |
468882ecec | ||
![]() |
be3c89d823 | ||
![]() |
7719e33e68 | ||
![]() |
deef9960a4 | ||
![]() |
9305b6d8ee | ||
![]() |
62de4b4f82 | ||
![]() |
ea0a89bde8 | ||
![]() |
4faeb12731 | ||
![]() |
91ac64bb44 | ||
![]() |
ed56edc7ba | ||
![]() |
6eeba2434a | ||
![]() |
7fb7b28cd6 | ||
![]() |
08aec58c22 | ||
![]() |
52945f383d | ||
![]() |
fecc57ddf0 | ||
![]() |
0d7a929b83 | ||
![]() |
991f9505ad | ||
![]() |
358b67871f | ||
![]() |
2b1acea1b0 | ||
![]() |
91aee3d5c4 | ||
![]() |
02812fb988 | ||
![]() |
29211c9020 | ||
![]() |
68fba458b3 | ||
![]() |
9c2fdcdbb2 | ||
![]() |
d4a0893d76 | ||
![]() |
7a6c755833 | ||
![]() |
45244852ac | ||
![]() |
e96136e418 | ||
![]() |
eae6e7a889 | ||
![]() |
a48b6cc9ca | ||
![]() |
786305f7d6 | ||
![]() |
30a2483e6e | ||
![]() |
f5f0aa1023 | ||
![]() |
b86fba2f3c | ||
![]() |
f7ecf3b618 | ||
![]() |
7a17e236f7 | ||
![]() |
df7d8e2cbf | ||
![]() |
9e82f9af25 | ||
![]() |
329c4bc5b3 | ||
![]() |
706c5a7565 | ||
![]() |
24b3467584 | ||
![]() |
9e0e35d2a7 | ||
![]() |
dae2c1d420 | ||
![]() |
01d0316fd7 | ||
![]() |
7e2a0ede16 | ||
![]() |
7738b5c00b | ||
![]() |
454651f79f | ||
![]() |
bf8bc65cc9 | ||
![]() |
6a89e7969f | ||
![]() |
3ffc4f8876 | ||
![]() |
b4d973fbe4 | ||
![]() |
da1e917b38 | ||
![]() |
160d2d56d9 | ||
![]() |
3468144847 | ||
![]() |
ae6d9e35bd | ||
![]() |
ac15a8abca | ||
![]() |
5480a3f238 | ||
![]() |
0d50a37091 | ||
![]() |
1ca0fdc928 | ||
![]() |
23a8ea2821 | ||
![]() |
ee4bb2240b | ||
![]() |
81ae886dda | ||
![]() |
63c40a9711 | ||
![]() |
8374be46d2 | ||
![]() |
5d1a87d355 | ||
![]() |
34312c272b | ||
![]() |
2b8f5e65b6 | ||
![]() |
a934fa07b8 | ||
![]() |
c6d1cf4af4 | ||
![]() |
8dbe4210b4 | ||
![]() |
02c99524bf | ||
![]() |
17d00d49d4 | ||
![]() |
634f512bb0 | ||
![]() |
5c009c20ab | ||
![]() |
535ce00abb | ||
![]() |
37144f0609 | ||
![]() |
ab76576340 | ||
![]() |
09aa82db49 | ||
![]() |
c95db7c542 | ||
![]() |
a984622cd1 | ||
![]() |
156980eff9 | ||
![]() |
736cac43e9 | ||
![]() |
3ba79961fe | ||
![]() |
7718e67f5c | ||
![]() |
ba8f5a1178 | ||
![]() |
502da973eb | ||
![]() |
eccf7b105c | ||
![]() |
bcee890434 | ||
![]() |
251fa024c4 | ||
![]() |
471b61bd14 | ||
![]() |
7df86fb246 | ||
![]() |
3f29b47809 | ||
![]() |
9ab3a02a8a | ||
![]() |
ca2be8ef5b | ||
![]() |
1783ea5af1 | ||
![]() |
862e56f01d | ||
![]() |
2b9cd50e84 | ||
![]() |
e71f44dbd6 | ||
![]() |
c881b4970d | ||
![]() |
d79f176142 | ||
![]() |
ce6acf9dca | ||
![]() |
2a15e5f16a | ||
![]() |
fb40e2eefb | ||
![]() |
fc09fa50a5 | ||
![]() |
48f04c7968 | ||
![]() |
007297f1a6 | ||
![]() |
302a171c08 | ||
![]() |
893e894fff | ||
![]() |
2aaed7bdfc | ||
![]() |
249f9a4a2e | ||
![]() |
68166f33d9 | ||
![]() |
28954e8271 | ||
![]() |
22884b0b00 | ||
![]() |
d2415da0d4 | ||
![]() |
96f7bf28f1 | ||
![]() |
db486ad897 | ||
![]() |
8180927de2 | ||
![]() |
191c31b0f0 | ||
![]() |
a94841abf1 | ||
![]() |
b624e94ab1 | ||
![]() |
e3f3274bbf | ||
![]() |
d2ca5cc26b | ||
![]() |
3de6f7ebfe | ||
![]() |
38ff01d6d0 | ||
![]() |
40103d6f41 | ||
![]() |
ab7ef5f8bf | ||
![]() |
2c1a951b6e | ||
![]() |
6ec330ccfa | ||
![]() |
20c1295a33 | ||
![]() |
fa4a787386 | ||
![]() |
85b734fde8 | ||
![]() |
28419cdedf | ||
![]() |
3b46a8cd70 | ||
![]() |
b2d0184c6e | ||
![]() |
808a75b231 | ||
![]() |
88e4ff7409 | ||
![]() |
3cc3b7526c | ||
![]() |
53b59d8bff | ||
![]() |
40e7e5d356 | ||
![]() |
4cae9b5b11 | ||
![]() |
72aeeb8c37 | ||
![]() |
7b3dee2d97 | ||
![]() |
5199c7834d | ||
![]() |
afe8610b4a | ||
![]() |
9d49e8abd0 | ||
![]() |
4043d0b455 | ||
![]() |
34ee46022e | ||
![]() |
ee507d9ab2 | ||
![]() |
28e0a7bfb5 | ||
![]() |
58f7059ea4 | ||
![]() |
d15e11bfe7 | ||
![]() |
1eabaf12da | ||
![]() |
fe86694ddd | ||
![]() |
a1969c98cd | ||
![]() |
47663c7e0f | ||
![]() |
9843e21fff | ||
![]() |
5c27bf6a2b | ||
![]() |
f0b9654deb | ||
![]() |
a1e325f749 | ||
![]() |
00b4556051 | ||
![]() |
86b5247770 | ||
![]() |
23f31e518e | ||
![]() |
f580b28a27 | ||
![]() |
b4f1569640 | ||
![]() |
f2d7165a52 | ||
![]() |
1bd3c13fe1 | ||
![]() |
5d1eccfb6f | ||
![]() |
c96cf0608d | ||
![]() |
056c45fe0c | ||
![]() |
2ac7f7f1e5 | ||
![]() |
318164779c | ||
![]() |
7bd33e7b00 | ||
![]() |
f8d62da2dc | ||
![]() |
303e02bdac | ||
![]() |
e2525f286d | ||
![]() |
9b8510ac56 | ||
![]() |
8a87e87a05 | ||
![]() |
9aca31c814 | ||
![]() |
a555a2c8eb | ||
![]() |
32504ae917 | ||
![]() |
80ceeb2848 | ||
![]() |
1574099449 | ||
![]() |
efb1ee9730 | ||
![]() |
a871d56f88 | ||
![]() |
d83a325f98 | ||
![]() |
4f72099023 | ||
![]() |
8856a396fd | ||
![]() |
b0fb39bb54 | ||
![]() |
7abceb434d | ||
![]() |
3e472faf5c | ||
![]() |
eabb789381 | ||
![]() |
1f1f49dc79 | ||
![]() |
3fd0e23ed9 | ||
![]() |
033a771e8c | ||
![]() |
6cbaeae64d | ||
![]() |
6a5772c881 | ||
![]() |
ed17559f88 | ||
![]() |
58cc4c2433 | ||
![]() |
4a65897567 | ||
![]() |
e0811ce141 | ||
![]() |
d597449a0e | ||
![]() |
cbd3ad8585 | ||
![]() |
3d89b47757 | ||
![]() |
8b09542fd9 | ||
![]() |
e5a9e9c93b | ||
![]() |
a8c972cd6b | ||
![]() |
9d9d455bba | ||
![]() |
8bc8dc66f2 | ||
![]() |
ceb4fe2151 | ||
![]() |
412d5685ba | ||
![]() |
baf98bb205 | ||
![]() |
f2c033b1b4 | ||
![]() |
4be4d85f84 | ||
![]() |
c695471475 | ||
![]() |
97a3b88f25 | ||
![]() |
1e1cb4961b | ||
![]() |
e3966882e8 | ||
![]() |
af3662775e | ||
![]() |
9234777e36 | ||
![]() |
02813d74e1 | ||
![]() |
d3beb3ddb7 | ||
![]() |
ad5555bf42 | ||
![]() |
789a3ef029 | ||
![]() |
3512647419 | ||
![]() |
42953a50bb | ||
![]() |
f4c2b69934 | ||
![]() |
d7ec5d3022 | ||
![]() |
7442de81bb | ||
![]() |
f76b3edf9c | ||
![]() |
c67b0bd7e2 | ||
![]() |
5356cd3c7d | ||
![]() |
bc657c9feb | ||
![]() |
52e074b08a | ||
![]() |
f1b148e488 | ||
![]() |
df3d2389a9 | ||
![]() |
ac7ca3265e | ||
![]() |
cc07702386 | ||
![]() |
1f796f1fbf | ||
![]() |
65312be59d | ||
![]() |
5a6a602da8 | ||
![]() |
8d9a5e3c7e | ||
![]() |
1c6ea5d1db | ||
![]() |
ca0b6fc3ac | ||
![]() |
7c3a0d54cc | ||
![]() |
16a2eab290 | ||
![]() |
41a69f194d | ||
![]() |
b77e6f0c98 | ||
![]() |
b67394dcd1 | ||
![]() |
f9e33a89fd | ||
![]() |
39e9e53871 | ||
![]() |
7f3fda6df6 | ||
![]() |
73ce5b3a8d | ||
![]() |
53319a121f | ||
![]() |
cf2d06e9b9 | ||
![]() |
d39211f438 | ||
![]() |
909464f749 | ||
![]() |
5669b64021 | ||
![]() |
8f0b4767de | ||
![]() |
9e75ce2ad7 | ||
![]() |
c010a3b195 | ||
![]() |
7c807c6e2a | ||
![]() |
9a20271f90 | ||
![]() |
1760a6e560 | ||
![]() |
8c2b805d88 | ||
![]() |
2f01418d45 | ||
![]() |
a76107a19f | ||
![]() |
6372e3e4db | ||
![]() |
c80ba819e7 | ||
![]() |
14c6a347c1 | ||
![]() |
11bd847896 | ||
![]() |
870f38542d | ||
![]() |
c22edeff1f | ||
![]() |
183de60d91 | ||
![]() |
176b508029 | ||
![]() |
9be189daa7 | ||
![]() |
bf12a2497b | ||
![]() |
55d168d01a | ||
![]() |
8a9a78ec8a | ||
![]() |
803ffc19a4 | ||
![]() |
ddd2ce3a88 | ||
![]() |
979e689278 | ||
![]() |
2c1ab8b3cc | ||
![]() |
252e64a0ea | ||
![]() |
d2f1edd6c6 | ||
![]() |
944a4763f6 | ||
![]() |
22a296f971 | ||
![]() |
ef2153739c | ||
![]() |
9e1c8e2c22 | ||
![]() |
fca0e6abb1 | ||
![]() |
6975c8b424 | ||
![]() |
f4f823f238 | ||
![]() |
1c67260bd4 | ||
![]() |
79f90c147c | ||
![]() |
4e751a3b58 | ||
![]() |
1c2e8fcf06 | ||
![]() |
00ca387ec7 | ||
![]() |
5688f1cf6e | ||
![]() |
7bd668e6d0 | ||
![]() |
1dc602e289 | ||
![]() |
ec518c4f24 | ||
![]() |
0d9295523e | ||
![]() |
a4443885a3 | ||
![]() |
ef8f2876e3 | ||
![]() |
75071aba68 | ||
![]() |
a81435ab5f | ||
![]() |
6fe46cac60 | ||
![]() |
c3b9ef7bf5 | ||
![]() |
b70c0eb9a5 | ||
![]() |
f3dd97e67b | ||
![]() |
77fb0a0003 | ||
![]() |
58d2a674c4 | ||
![]() |
9e2ed4104d | ||
![]() |
3f9b4a1ab5 | ||
![]() |
2aa0ec004a | ||
![]() |
f798912cbd | ||
![]() |
3bf80a967c | ||
![]() |
6c3b0cfc36 | ||
![]() |
43633d6b2f | ||
![]() |
fdd531f307 | ||
![]() |
70c45f8941 | ||
![]() |
b82fa2c610 | ||
![]() |
eaacbb3289 | ||
![]() |
54fdd633fe | ||
![]() |
29ed84e921 | ||
![]() |
d587fc1ef4 | ||
![]() |
285d717ceb | ||
![]() |
616a149917 | ||
![]() |
f578c4daaa | ||
![]() |
830495b7c6 | ||
![]() |
4d02f68057 | ||
![]() |
31c5a0009f | ||
![]() |
c91d9df481 | ||
![]() |
e64cbfcc3f | ||
![]() |
3c2d85b544 | ||
![]() |
96c4dd817e | ||
![]() |
ba7af4f7d3 | ||
![]() |
edfe5cc3b7 | ||
![]() |
07e65a6ef2 | ||
![]() |
d574cf59f1 | ||
![]() |
47402d848d | ||
![]() |
922f14276a | ||
![]() |
8c5ad7ea2d | ||
![]() |
20c5e2525e | ||
![]() |
325fec31da | ||
![]() |
cbb2a286f2 | ||
![]() |
e9eaa37401 | ||
![]() |
dbe73c3296 | ||
![]() |
b4ae6cdd62 | ||
![]() |
317414ab26 | ||
![]() |
b63e104561 | ||
![]() |
02b184bfd7 | ||
![]() |
d8c7583922 | ||
![]() |
25f36b3892 | ||
![]() |
0f0b411f6e | ||
![]() |
5a71ed4411 | ||
![]() |
de76074336 | ||
![]() |
f63b69bb23 | ||
![]() |
a54f9e835c | ||
![]() |
7a941138de | ||
![]() |
2c5404532b | ||
![]() |
be259117f5 | ||
![]() |
6932b3cbb3 | ||
![]() |
b76bf20092 | ||
![]() |
a62dbc6680 | ||
![]() |
442dcc7855 | ||
![]() |
23e7a0a099 | ||
![]() |
7f2dbb6c44 | ||
![]() |
8a0d0ce987 | ||
![]() |
0789c3fb9f | ||
![]() |
31d99c51cb | ||
![]() |
30550ef688 | ||
![]() |
b04cca9eab | ||
![]() |
e0fd7a6d05 | ||
![]() |
923751aa39 | ||
![]() |
6de81b0513 | ||
![]() |
7ae698795e | ||
![]() |
72692b1144 | ||
![]() |
177b4df217 | ||
![]() |
a08d7cf48a | ||
![]() |
3fa6a92cc5 | ||
![]() |
d5a7bbd094 | ||
![]() |
de41f3ea28 | ||
![]() |
5c3ec27b4b | ||
![]() |
8655bc5d8d | ||
![]() |
2e53ce8e75 | ||
![]() |
2528a39781 | ||
![]() |
e02fef8e2f | ||
![]() |
e352011830 | ||
![]() |
7f551ba776 | ||
![]() |
3838341d83 | ||
![]() |
adc5670ea9 | ||
![]() |
08130912f0 | ||
![]() |
371b97af27 | ||
![]() |
562cf14258 | ||
![]() |
c57ae7fc9c | ||
![]() |
6c91683380 | ||
![]() |
25f416c13d | ||
![]() |
8d91135926 | ||
![]() |
1bbb5c8107 | ||
![]() |
12a42a9295 | ||
![]() |
01cea0d9ef | ||
![]() |
f615eea7ee | ||
![]() |
cbbd3e366a | ||
![]() |
ede10dded0 | ||
![]() |
982d135ace | ||
![]() |
548c0f16f4 | ||
![]() |
bbd295ae09 | ||
![]() |
c55004864d | ||
![]() |
54685091f1 | ||
![]() |
d4a9535f04 | ||
![]() |
44477390a9 | ||
![]() |
caf27c4c16 | ||
![]() |
576e7a43df | ||
![]() |
c242558398 | ||
![]() |
8c9e827aab | ||
![]() |
2bcc9e2b86 | ||
![]() |
5c66afbf63 | ||
![]() |
84aeb8f715 | ||
![]() |
3738579dd3 | ||
![]() |
1ca60f424a |
@@ -1,20 +1,79 @@
|
||||
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
|
||||
image: registry.gitlab.gnome.org/gnome/mutter/master:v3
|
||||
|
||||
stages:
|
||||
- review
|
||||
- build
|
||||
- test
|
||||
|
||||
check-commit-log:
|
||||
stage: review
|
||||
variables:
|
||||
GIT_DEPTH: "100"
|
||||
script:
|
||||
- ./.gitlab-ci/check-commit-log.sh
|
||||
only:
|
||||
- merge_requests
|
||||
|
||||
build-mutter:
|
||||
stage: build
|
||||
script:
|
||||
- meson . build -Degl_device=true -Dwayland_eglstream=true
|
||||
- meson . build -Dbuildtype=debugoptimized -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
|
||||
- ninja -C build
|
||||
- ninja -C build install
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- build
|
||||
only:
|
||||
- merge_requests
|
||||
- /^.*$/
|
||||
|
||||
build-without-native-backend-and-wayland:
|
||||
stage: build
|
||||
script:
|
||||
- meson . build -Dbuildtype=debugoptimized -Dnative_backend=false -Dudev=false -Dwayland=false -Dcore_tests=false --werror --prefix /usr
|
||||
- ninja -C build
|
||||
- ninja -C build install
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- build
|
||||
only:
|
||||
- merge_requests
|
||||
- /^.*$/
|
||||
|
||||
test-mutter:
|
||||
stage: test
|
||||
dependencies:
|
||||
- build-mutter
|
||||
variables:
|
||||
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
|
||||
GSETTINGS_SCHEMA_DIR: "$CI_PROJECT_DIR/build/data"
|
||||
G_SLICE: "always-malloc"
|
||||
MALLOC_CHECK_: "3"
|
||||
NO_AT_BRIDGE: "1"
|
||||
MALLOC_PERTURB_: "123"
|
||||
script:
|
||||
- meson . build -Degl_device=true -Dwayland_eglstream=true
|
||||
- ninja -C build
|
||||
- glib-compile-schemas $PWD/build/data
|
||||
- env XDG_RUNTIME_DIR=/tmp/ GSETTINGS_SCHEMA_DIR=$PWD/build/data dbus-run-session -- xvfb-run -s '+iglx -noreset' meson test -C build -t 10 --verbose --no-stdsplit --wrap catchsegv
|
||||
- dconf update
|
||||
- mkdir -m 700 $XDG_RUNTIME_DIR
|
||||
- glib-compile-schemas $GSETTINGS_SCHEMA_DIR
|
||||
- >
|
||||
dbus-run-session -- xvfb-run -s '+iglx -noreset'
|
||||
meson test -C build --no-rebuild -t 10 --verbose --no-stdsplit --print-errorlogs --wrap catchsegv
|
||||
only:
|
||||
- merge_requests
|
||||
- /^.*$/
|
||||
|
||||
can-build-gnome-shell:
|
||||
stage: test
|
||||
dependencies:
|
||||
- build-mutter
|
||||
before_script:
|
||||
- meson install --no-rebuild -C build
|
||||
script:
|
||||
- .gitlab-ci/checkout-gnome-shell.sh
|
||||
- meson gnome-shell gnome-shell/build --prefix /usr -Dman=false
|
||||
- ninja -C gnome-shell/build install
|
||||
only:
|
||||
- merge_requests
|
||||
- /^.*$/
|
||||
|
@@ -1,20 +1,29 @@
|
||||
FROM fedora:29
|
||||
# Rebuild and push with
|
||||
#
|
||||
# cd .gitlab-ci/
|
||||
# podman build --format docker --no-cache -t registry.gitlab.gnome.org/gnome/mutter/master:v3 .
|
||||
# podman push registry.gitlab.gnome.org/gnome/mutter/master:v3
|
||||
#
|
||||
|
||||
FROM fedora:31
|
||||
|
||||
RUN dnf -y update && dnf -y upgrade && \
|
||||
dnf install -y 'dnf-command(builddep)' && \
|
||||
dnf install -y 'dnf-command(copr)' && \
|
||||
dnf copr enable -y fmuellner/gnome-shell-ci && \
|
||||
dnf -y update && dnf -y upgrade && \
|
||||
|
||||
dnf builddep -y mutter && \
|
||||
|
||||
# Until Fedora catches up with meson build-deps
|
||||
dnf install -y meson xorg-x11-server-Xorg gnome-settings-daemon-devel egl-wayland-devel xorg-x11-server-Xwayland && \
|
||||
# Until Fedora catches up with new build-deps
|
||||
dnf install -y 'pkgconfig(graphene-gobject-1.0)' 'pkgconfig(sysprof-capture-3)' && \
|
||||
|
||||
# For running unit tests
|
||||
dnf install -y xorg-x11-server-Xvfb mesa-dri-drivers dbus dbus-x11 && \
|
||||
dnf install -y xorg-x11-server-Xvfb mesa-dri-drivers dbus dbus-x11 '*/xvfb-run' gdm-lib accountsservice-libs gnome-control-center && \
|
||||
|
||||
# Unpackaged versions
|
||||
dnf install -y https://copr-be.cloud.fedoraproject.org/results/jadahl/mutter-ci/fedora-29-x86_64/00836095-gsettings-desktop-schemas/gsettings-desktop-schemas-3.30.1-1.20181206git918efdd69be53.fc29.x86_64.rpm https://copr-be.cloud.fedoraproject.org/results/jadahl/mutter-ci/fedora-29-x86_64/00836095-gsettings-desktop-schemas/gsettings-desktop-schemas-devel-3.30.1-1.20181206git918efdd69be53.fc29.x86_64.rpm && \
|
||||
# GNOME Shell
|
||||
dnf builddep -y gnome-shell --setopt=install_weak_deps=False && \
|
||||
dnf remove -y gnome-bluetooth-libs-devel dbus-glib-devel upower-devel python3-devel && \
|
||||
dnf remove -y --noautoremove mutter mutter-devel && \
|
||||
|
||||
# Packages not yet in stable
|
||||
dnf install -y https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-0.2.5-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-devel-0.2.5-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-libs-0.2.5-1.fc29.x86_64.rpm && \
|
||||
|
||||
dnf install -y intltool redhat-rpm-config make && \
|
||||
dnf clean all
|
||||
|
60
.gitlab-ci/check-commit-log.sh
Executable file
60
.gitlab-ci/check-commit-log.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
|
||||
echo Cannot review non-merge request
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git fetch $CI_MERGE_REQUEST_PROJECT_URL.git $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
||||
|
||||
branch_point=$(git merge-base HEAD FETCH_HEAD)
|
||||
|
||||
commits=$(git log --format='format:%H' $branch_point..$CI_COMMIT_SHA)
|
||||
|
||||
if [ -z "$commits" ]; then
|
||||
echo Commit range empty
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function commit_message_has_url() {
|
||||
commit=$1
|
||||
commit_message=$(git show -s --format='format:%b' $commit)
|
||||
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
|
||||
return $?
|
||||
}
|
||||
|
||||
function commit_message_subject_is_compliant() {
|
||||
commit=$1
|
||||
commit_message_subject=$(git show -s --format='format:%s' $commit)
|
||||
|
||||
if echo "$commit_message_subject" | grep -qe "\(^meta-\|^Meta\)"; then
|
||||
echo " - message subject should not be prefixed with 'meta-' or 'Meta'"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if echo "$commit_message_subject" | grep -qe "\.[ch]:"; then
|
||||
echo " - message subject prefix should not include .c, .h, etc."
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
RET=0
|
||||
for commit in $commits; do
|
||||
commit_short=$(echo $commit | cut -c -8)
|
||||
|
||||
if ! commit_message_has_url $commit; then
|
||||
echo "Commit $commit_short needs a merge request or issue URL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
errors=$(commit_message_subject_is_compliant $commit)
|
||||
if [ $? != 0 ]; then
|
||||
echo "Commit message for $commit_short is not compliant:"
|
||||
echo "$errors"
|
||||
RET=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $RET
|
33
.gitlab-ci/checkout-gnome-shell.sh
Executable file
33
.gitlab-ci/checkout-gnome-shell.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
gnome_shell_target=
|
||||
|
||||
git clone https://gitlab.gnome.org/GNOME/gnome-shell.git
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo Checkout failed
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd gnome-shell
|
||||
|
||||
if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
|
||||
merge_request_remote=${CI_MERGE_REQUEST_SOURCE_PROJECT_URL//mutter/gnome-shell}
|
||||
merge_request_branch=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
||||
|
||||
echo Looking for $merge_request_branch on remote ...
|
||||
if git fetch -q $merge_request_remote $merge_request_branch 2>/dev/null; then
|
||||
gnome_shell_target=FETCH_HEAD
|
||||
else
|
||||
gnome_shell_target=origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
||||
echo Using $gnome_shell_target instead
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$gnome_shell_target" ]; then
|
||||
gnome_shell_target=$(git branch -r -l origin/$CI_COMMIT_REF_NAME)
|
||||
gnome_shell_target=${gnome_shell_target:-origin/master}
|
||||
echo Using $gnome_shell_target instead
|
||||
fi
|
||||
|
||||
git checkout -q $gnome_shell_target
|
408
NEWS
408
NEWS
@@ -1,3 +1,411 @@
|
||||
3.35.3
|
||||
======
|
||||
* backends/native: Correct dy value in pinch gesture event [Yariv; !974]
|
||||
* Upload clipping rectangles in parallel [Daniel; !969]
|
||||
* More cogl API cleanups [Adam; !978, !977, !973]
|
||||
* Fix window recording on HiDPI [Pascal; !976]
|
||||
* Fix top-left pixel being insensitive to clicks [Sebastian; #893]
|
||||
* Misc. bug fixes and cleanups [Daniel, Adam; !979, !980]
|
||||
|
||||
Contributors:
|
||||
Yariv Barkan, Adam Jackson, Sebastian Keller, Pascal Nowack, Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Fran Dieguez [gl], Dz Chen [zh_CN]
|
||||
|
||||
3.35.2
|
||||
======
|
||||
* Don't emit focus event after destruction [Marco; gnome-shell#1704, !860]
|
||||
* Add a notion of pixel format planes [Niels; !858]
|
||||
* Replace various Cogl/Clutter types with Graphene [Georges; !458]
|
||||
* Improve CoglJournal [Georges, Jasper; !402]
|
||||
* Split pick and paint [Georges; !865]
|
||||
* Remove deprecated/unused cogl/clutter APIs [Adam; !866, !878, !879, !880,
|
||||
!885, !900, !902, !904, !896, !913, !922, !883, !903, !921, !933, !819]
|
||||
* Fix hang when opening not-responding dialog on Xorg [Carlos; !876]
|
||||
* Allow changing Clutter debug flags at runtime [Georges; !862]
|
||||
* Fix frozen grabs on Xorg after weeks of inactivity [Jonas; !886]
|
||||
* Fix triggering popups from stylus devices o wayland [Carlos; #886]
|
||||
* Fix fallback to GLES2 [Adam; #635]
|
||||
* Fix buffer age checks on multiple monitors [Carlos; !906]
|
||||
* Adjust to Sysprof API change [Christian; !908]
|
||||
* Improve support for (X11) fullscreen games under wayland [Hans; !739]
|
||||
* Support shadow framebuffers for offscreen rendering [Olivier; !877]
|
||||
* Fix hang after interacting with desktop icons on X11 [Marco; !909]
|
||||
* Don't double scale when getting absolute surface coordinates [Xiang; !915]
|
||||
* Respect NET_WM_TRANSIENT_FOR for override-redirect windows [Marco; !920]
|
||||
* Kill window effects on destroy [Robert; !924]
|
||||
* Remove deprecated ClutterTexture [Jonas; !932]
|
||||
* Use regions instead of bounding box for clipping and culling [Carlos; !867]
|
||||
* Use partial damage for dma-buf and EGLImage buffers on wayland [Robert; #947]
|
||||
* Do not stack transients underneath their always-on-top parent [Florian; #587]
|
||||
* Add explicit paint/pick contexts [Jonas; !935]
|
||||
* Fix KMS freeze after pageflip fallback [Pekka; !953]
|
||||
* Fixed crashes [Robert, Carlos, Jonas, Marco, Hans, Tim; !856, !869, !912,
|
||||
!895, !928, #591, !823, !960]
|
||||
* Plugged memory leaks [Niels, Robert, Carlos, Marco; !847, !868, !873, #908]
|
||||
* Misc. bug fixes and cleanups [Niels, Robert, Jonas, Marco, Carlos, Daniel,
|
||||
Jan, Adam, Cosimo, Florian, Thomas, Georges, Hans, Corentin, Christian,
|
||||
Benjamin; !853, !822, !451, !854, !816, !857, !859, !734, !844, !851, #876,
|
||||
!874, !673, !692, !888, !889, !894, !901, !905, !872, !898, !911, !918, !863,
|
||||
#878, !811, !893, !925, !926, !890, !931, !927, !934, !938, !940, !947, !941,
|
||||
!929, !949, !952, !871, !955, !956, !958, !907, !965, !964, !966]
|
||||
|
||||
Contributors:
|
||||
Marco Trevisan (Treviño), Jan Alexander Steffens (heftig),
|
||||
Thomas Hindoe Paaboel Andersen, Benjamin Berg, Cosimo Cecchi, Tim Crawford,
|
||||
Piotr Drąg, Xiang Fan, Olivier Fourdan, Carlos Garnacho, Hans de Goede,
|
||||
Niels De Graef, Christian Hergert, Adam Jackson, Robert Mader,
|
||||
Florian Müllner, Georges Basile Stavracas Neto, Bastien Nocera, Corentin Noël,
|
||||
Pekka Paalanen, Jasper St. Pierre, Christian Rauch, Daniel van Vugt,
|
||||
Jonas Ådahl
|
||||
|
||||
Translators:
|
||||
Bruce Cowan [en_GB]
|
||||
|
||||
3.35.1
|
||||
======
|
||||
* Fix immediate screen blank after releaseing inhibitor [Tim; #573]
|
||||
* Respond to frame callbacks regardless of damage [Jonas; !839]
|
||||
* selection [Carlos; !842]
|
||||
* Fix Night Light on wayland [Jonas; !840]
|
||||
* Fix various copy+paste/DND regressions [Carlos; !848, #789, #842,
|
||||
#793, #845, #854]
|
||||
* Misc. bug fixes and cleanups [Daniel, Marco, Jonas, Georges;
|
||||
!841, !764, !837, !846]
|
||||
|
||||
Contributors:
|
||||
Marco Trevisan (Treviño), Carlos Garnacho, Tim Klocke,
|
||||
Georges Basile Stavracas Neto, Daniel van Vugt, Jonas Ådahl
|
||||
|
||||
3.34.1
|
||||
======
|
||||
* Fix startup of X11 session services on wayland [Carlos; #771]
|
||||
* Fix _NET_ACTIVE_WINDOW emission [Carlos; #751]
|
||||
* Fix initial view perspective [Marco; !803]
|
||||
* Fix screenshots and window animations when scaled [Robert; !758]
|
||||
* Re-enable coredumps when capabilities are set [Jonas; !811]
|
||||
* Fix scaling of DND surface actors [Robert; !780]
|
||||
* Optimize blitting of untransformed offscreen stage views [Olivier; !809, !820]
|
||||
* Fix freeze of pointer event delivery on X11 [Olivier; !821]
|
||||
* Fix scaling of stylus input coordinates with HiDPI [Dorian; !830]
|
||||
* Fix memory leak when using implicit animations [Jonas; !828]
|
||||
* Fix numlock state for native backend [Carlos; #769]
|
||||
* Fixed crashes [Marco, Olivier, Jonas Å.; !805, #823, !808, !825,
|
||||
#844, !826, #779]
|
||||
* Misc. bug fixes and cleanups [Jonas Å., Georges, Jonas D., Michal, Daniel,
|
||||
Iain, Adam, Marco, Carlos, Ting-Wei, Hans, Robert; !787, !795, !791, !797,
|
||||
!772, !775, !799, !778, !785, !782, !796, #819, !814, !769, !817, !783, !786,
|
||||
!829, !774, #822]
|
||||
|
||||
Contributors:
|
||||
Marco Trevisan (Treviño), Jonas Dreßler, Olivier Fourdan, Carlos Garnacho,
|
||||
Hans de Goede, Adam Jackson, Ting-Wei Lan, Iain Lane, Michal Lazo,
|
||||
Robert Mader, Georges Basile Stavracas Neto, Dorian Stoll, Daniel van Vugt,
|
||||
Jonas Ådahl
|
||||
|
||||
Translators:
|
||||
Milo Casagrande [it], Nathan Follens [nl], Matej Urbančič [sl],
|
||||
Ask Hjorth Larsen [da], Alan Mortensen [da], Jordi Mas [ca]
|
||||
|
||||
3.34.0
|
||||
======
|
||||
* Fix xdg-output v3 support [Olivier; !771]
|
||||
* Fix crash when changing decoration state [Jonas; !773]
|
||||
* Add and remove connectors on hot-plug [Jonas; !743]
|
||||
|
||||
Contributors:
|
||||
Olivier Fourdan, Jonas Ådahl
|
||||
|
||||
Translators:
|
||||
Rafael Fontenelle [pt_BR], Gwan-gyeong Mun [ko], Christian Kirbach [de],
|
||||
Claude Paroz [fr], Milo Casagrande [it], Emin Tufan Çetin [tr],
|
||||
Ryuta Fujii [ja]
|
||||
|
||||
3.33.92
|
||||
=======
|
||||
* Turn MetaShapedTexture into a ClutterContent implementation [Georges; !409]
|
||||
* Restore inhibit shortcut for overlay key [Olivier; #734]
|
||||
* Misc. pointer a11y improvements [Jonas D., Olivier; !746, !747, !745, !761]
|
||||
* Fix position of drag surfaces [Robert; !684]
|
||||
* Implement subsurface.place_below() for parents [Robert; !664]
|
||||
* Add meta_window_actor_get_image() [Jonas Å.; !752]
|
||||
* Revert faulty optimization from !719 [Jonas Å.; #735]
|
||||
* Add additional sysprof trace points [Jonas Å.; !757, !765]
|
||||
* Remove GLX "threaded swap wait" used on Nvidia [Daniel; !602]
|
||||
* Implement geometric picking [Daniel; !189]
|
||||
* Fix lost keyboard focus after DND [Olivier; #747]
|
||||
* Misc. bug fixes and cleanups [Florian, Carlos, Piotr, Hans, Georges, Robert,
|
||||
Ray, Mart, Rémi; !740, !672, !749, !751, !753, !730, !755, !756, !750, !715,
|
||||
#738944, !657, !768]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Rémi Bernon, Piotr Drąg, Jonas Dreßler, Olivier Fourdan,
|
||||
Carlos Garnacho, Hans de Goede, Robert Mader, Florian Müllner,
|
||||
Georges Basile Stavracas Neto, Mart Raudsepp, Ray Strode, Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Piotr Drąg [pl], Марко Костић [sr], Rūdolfs Mazurs [lv], Matej Urbančič [sl],
|
||||
Balázs Úr [hu], Fran Dieguez [gl], Jordi Mas [ca], Anders Jonsson [sv],
|
||||
Trần Ngọc Quân [vi], Tim Sabsch [de], Fabio Tomat [fur], Goran Vidović [hr],
|
||||
Marek Černocký [cs]
|
||||
|
||||
3.33.91
|
||||
=======
|
||||
* Fix primary selection copy and paste between X11 and wayland [Hans; #702]
|
||||
* Improve monitor hotplug support [Hans; !713]
|
||||
* Remove a source of frame skips [Daniel; !719]
|
||||
* Fix windows being lowered after unmaximizing with double click [Olivier; #88]
|
||||
* Remove Clutter API for global grabs [Jonas D.; !536]
|
||||
* Improve processing of incompressible events [Daniel; !711]
|
||||
* Add xdg-output v3 support [Olivier; !704]
|
||||
* Misc. bug fixes and cleanups [Jonas Å., Marco, Carlos, Adam, Albert, Niels,
|
||||
Olivier, Florian; !722, !385, !728, !726, !500, !731, !727, !700, !735, !738]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Albert Vaca Cintora, Jonas Dreßler, Olivier Fourdan,
|
||||
Carlos Garnacho, Hans de Goede, Niels De Graef, Adam Jackson, Florian Müllner,
|
||||
Marco Trevisan (Treviño), Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Asier Sarasua Garmendia [eu], Kukuh Syafaat [id], Florentina Mușat [ro],
|
||||
Aurimas Černius [lt], Daniel Mustieles [es]
|
||||
|
||||
3.33.90
|
||||
=======
|
||||
* Fix visibility of clones with hidden source [Florian; #683]
|
||||
* Reduce freezes when opening some popup windows [Carlos; #556]
|
||||
* Be more thorough when excluding obscured areas from painting [Carlos; !698]
|
||||
* Make it possible to start Xwayland on demand [Carlos; !709]
|
||||
* clutter: Expose layout_manager to transitions [Florian; !716]
|
||||
* Misc. bug fixes and cleanups [Mark, Florian, Iain, Niels, Carlos, Ray; !671,
|
||||
!691, !694, !696, !703, !707, !697, !710, !708, !714, #719, !721]
|
||||
|
||||
Contributors:
|
||||
Mark Blakeney, Carlos Garnacho, Niels De Graef, Iain Lane, Florian Müllner,
|
||||
Ray Strode
|
||||
|
||||
Translators:
|
||||
Asier Sarasua Garmendia [eu], Rafael Fontenelle [pt_BR], Fabio Tomat [fur],
|
||||
Florentina Mușat [ro]
|
||||
|
||||
3.33.4
|
||||
======
|
||||
* Discard page flip retries on hotplug [Jonas; !630]
|
||||
* Add xdg-output v2 support [Olivier; #645]
|
||||
* Restore DRM format fallbacks [Jonas; !662]
|
||||
* Don't emit ::size-changed when only position changed [Daniel; !568]
|
||||
* Expose workspace layout properties [Florian; !618]
|
||||
* Don't use grab modifiers when shortcuts are inhibited [Olivier; #642]
|
||||
* Fix stuttering due to unchanged power save mode notifications [Georges; !674]
|
||||
* Add API to reorder workspaces [Adam; !670]
|
||||
* Make picking a new focus window more reliable [Marco; !669]
|
||||
* Defer actor allocation till shown [Carlos; !677]
|
||||
* Try to use primary GPU for copy instead of glReadPixels [Pekka; !615]
|
||||
* Unset pointer focus when the cursor is hidden [Jonas D.; !448]
|
||||
* Fix modifier-drag on wayland subsurfaces [Robert; !604]
|
||||
* Fix background corruption on Nvidia after resuming from suspend [Daniel; !600]
|
||||
* Only grab the locate-pointer key when necessary [Olivier; !685, #647]
|
||||
* Misc. bug fixes and cleanups [Florian, Jonas, Daniel, Robert, Olivier,
|
||||
Georges, Marco, Carlos, Emmanuele; !648, !650, !647, !656, !658, !637,
|
||||
!663, !660, !659, !665, !666, !668, !667, #667, !676, !678, #672, !680,
|
||||
!683, !688, !689, !687]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Emmanuele Bassi, Adam Bieńkowski, Piotr Drąg, Jonas Dreßler,
|
||||
Olivier Fourdan, Carlos Garnacho, Robert Mader, Florian Müllner,
|
||||
Georges Basile Stavracas Neto, Pekka Paalanen, Marco Trevisan (Treviño),
|
||||
Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Fabio Tomat [fur], Kukuh Syafaat [id]
|
||||
|
||||
3.33.3
|
||||
======
|
||||
* Prepare for running Xwayland on demand [Carlos; !420]
|
||||
* Fix text selection color rendering [Florian; #494]
|
||||
* Fix black shadows when using fractional scaling [Robert; #609]
|
||||
* Honor startup sequence workspace on wayland [Carlos; gnome-shell#674]
|
||||
* Only emit 'grab-op-end` signal after dropping grabs [Marco; !596]
|
||||
* Add a Sysprof-based profiler [Jonas, Georges; !197, !603]
|
||||
* Relax "xwayland-allow-grabs" setting [Olivier; #597]
|
||||
* Implement locate-pointer accessibility feature [Olivier; !453]
|
||||
* Implement mouse accessibility [Olivier; !512]
|
||||
* Consolidate frame throttling [Daniel, Georges; !363]
|
||||
* Fix setting blank cursor under wayland [Jonas; #630]
|
||||
* Pixel-align OpenGL cursors [Jonas; !610]
|
||||
* Handle returning from fullscreen/maximization better [Jonas; !621]
|
||||
* Improve screencast support on multi-monitor systems [Georges; !623]
|
||||
* Fix running X11 applications with sudo under wayland [Hans; #643]
|
||||
* Implement toggle-keys notification [Olivier; #637]
|
||||
* Add initial KMS transactional support [Jonas; !525]
|
||||
* Improve finding new focus window when the old one is closed [Marco; #308]
|
||||
* Misc. bug fixes and cleanups [Jonas, Carlos, Marco, Florian, Pekka, Robert,
|
||||
Douglas, Georges, Daniel, Emil, Niels, Hans, Olivier, Ting-Wei, Corentin;
|
||||
!591, #398, !592, !581, !597, !598, !593, !497, #591, !545, gtk#1675, !601,
|
||||
#568, !564, !605, !609, !115, !214, !611, !617, !616, !619, !624, !622, !627,
|
||||
!628, !629, !632, !633, !631, !636, !639, !638, !634, !640, !529, !644, !590]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Piotr Drąg, Olivier Fourdan, Carlos Garnacho, Hans de Goede,
|
||||
Niels De Graef, Ting-Wei Lan, Robert Mader, Florian Müllner,
|
||||
Georges Basile Stavracas Neto, Corentin Noël, Pekka Paalanen, Douglas R. Reno,
|
||||
Marco Trevisan (Treviño), Emil Velikov, Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Balázs Úr [hu], Daniel Mustieles [es], Nathan Follens [nl], Goran Vidović [hr]
|
||||
|
||||
3.33.2
|
||||
======
|
||||
* Fix rendering lag on Xorg [Daniel; !520, !281]
|
||||
* Misc. bug fixes and cleanups [Carlos, Marco, Jonas D., Florian, Niels,
|
||||
Daniel, Benjamin, Jonas Å., Ignacio, Vasilis; #598, !576, !547, !578,
|
||||
!583, !582, !469, !524, !119, !571, !584, !585, !586, #425]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Benjamin Berg, Jonas Dreßler, Carlos Garnacho, Niels De Graef,
|
||||
Vasilis Liaskovitis, Florian Müllner, Ignacio Casal Quinteiro,
|
||||
Marco Trevisan (Treviño), Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Daniel Mustieles [es]
|
||||
|
||||
3.33.1
|
||||
======
|
||||
* Remove unused APIs and outdated driver support
|
||||
[Adam; !481, !468, !489, !487, !546]
|
||||
* Enable EGL_IMG_context_priority [Adam; !454]
|
||||
* Disable mouse keys with Numlock on [Olivier; #530]
|
||||
* Fix crash when restarting on X11 [Marco; #576]
|
||||
* Implement clipboard manager [Carlos; !320]
|
||||
* Fix spurious idle signals that prevent session unblank [Jonas Å.; !543]
|
||||
* Fix mapping of touchscreens that don't report dimensions [Carlos; #581]
|
||||
* Fix propagating fractional scaling factor [Robert; !537]
|
||||
* Add experimental RT scheduling support [Carlos; !460]
|
||||
* Misc. bug fixes and cleanups [Robert, Carlos, Olivier, Ray, Marco, Jonas D.,
|
||||
Georges, Daniel V., Daniel M; !467, !504, !551, !552, #575, #556, !557, !442,
|
||||
!562, !535, !548, #586, !567, !396, !422, !507]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Piotr Drąg, Jonas Dreßler, Olivier Fourdan, Carlos Garnacho,
|
||||
Adam Jackson, Robert Mader, Daniel García Moreno, Florian Müllner,
|
||||
Georges Basile Stavracas Neto, Ray Strode, Marco Trevisan (Treviño),
|
||||
Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Daniel Mustieles [es], Fabio Tomat [fur], Kukuh Syafaat [id]
|
||||
|
||||
3.32.1
|
||||
======
|
||||
* Fix fallback app menu on wayland [Florian; #493]
|
||||
* Fix elogind support [Tom; !491]
|
||||
* Fix startup notifications not timing out [Carlos; #501]
|
||||
* Fix keyboard accessibility toggle from keys
|
||||
[Olivier, Carlos; !501, #529, !531]
|
||||
* Fix touchscreen input on rotated displays [Carlos; #514]
|
||||
* Work around hangul text input bug [Carlos; #1365]
|
||||
* Fix blurry wallpaper scaling [Daniel; !505]
|
||||
* Fix placement of window menu when using fractional scaling [Jan; #527]
|
||||
* Fix repaint issues of offscreen effects on secondary monitors [Daniel; !511]
|
||||
* Fix windows not getting focus after launch [Daniel; #505]
|
||||
* Properly advertise support for 'underscan' property [Jonas; !507]
|
||||
* Improve power-saving handling [Jonas; !506]
|
||||
* Fix moving windows by super+touch [Jonas D.; !495]
|
||||
* Misc. bug fixes and cleanups [Benjamin, Florian, Adam, Marco, Pablo,
|
||||
Erik, Jonas, Heiher, Pekka, Daniel, Olivier, Carlos; !478, !475, !480,
|
||||
!482, #490, !488, #491, #480, !477, !496, !492, !485, !515, !519, !521,
|
||||
!216, !538, #541, #523]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Pablo Barciela, Benjamin Berg, Tom Briden, Jonas Dreßler,
|
||||
Olivier Fourdan, Carlos Garnacho, Jan Alexander Steffens (heftig), Heiher,
|
||||
Adam Jackson, Erik Kurzinger, Florian Müllner, Pekka Paalanen,
|
||||
Marco Trevisan (Treviño), Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Khaled Hosny [ar], Goran Vidović [hr], Daniel Mustieles [es]
|
||||
|
||||
3.32.0
|
||||
======
|
||||
* Fix deadlock when cancelling a theme sound [Andrea; !474]
|
||||
* Stop swizzling BGRA buffers (bye-bye inverted colors in screenshots
|
||||
and animations) [Carlos; !486]
|
||||
|
||||
Contributors:
|
||||
Andrea Azzarone, Carlos Garnacho, Robert Mader
|
||||
|
||||
3.31.92
|
||||
=======
|
||||
* Fix flicker of apps that use multiple SHM buffers [Jonas Å.; #199]
|
||||
* Don't disable page flips after temporary failues [Jonas Å.; #460]
|
||||
* Improve redraw performance [Carlos; !196]
|
||||
* Add cursor-mode support to window screencasting [Jonas Å.; !413]
|
||||
* Add back support for system-wide monitor configurations [Jonas Å.; !253]
|
||||
* Add fractional scaling support [Marco, Jonas Å.; !3]
|
||||
* Consider remapped keys when guessing keycode from keysym [Andrea; #443]
|
||||
* Stop turning on-screen-keyboard off on focus changes [Carlos; !432]
|
||||
* Fix crashes [Robert, Carlos, Jonas D., Florian; !447, #361, !426, #479]
|
||||
* Misc. bug fixes and cleanups [Benjamin, Adam, Olivier, Niels, Piotr; !457,
|
||||
!452, !459, !380, !361, !461, !464, !471, !473, !463]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Andrea Azzarone, Benjamin Berg, Piotr Drąg, Jonas Dreßler,
|
||||
Olivier Fourdan, Carlos Garnacho, Niels De Graef, Adam Jackson, Robert Mader,
|
||||
Florian Müllner, Marco Trevisan (Treviño)
|
||||
|
||||
Translators:
|
||||
Milo Casagrande [it], Tim Sabsch [de], Trần Ngọc Quân [vi],
|
||||
Gwan-gyeong Mun [ko], Марко Костић [sr], Daniel Mustieles [es],
|
||||
Rūdolfs Mazurs [lv], Nathan Follens [nl]
|
||||
|
||||
3.31.91
|
||||
=======
|
||||
* Fix infinite loop in EDID matching [Marco; #459]
|
||||
* wayland: Don't resetin text-input state prematurely [Carlos; !410]
|
||||
* wayland: Don't maximize windows if minimum size is too big [Olivier; #463]
|
||||
* Fix crash when using "restore shortcuts" without focus window [Olivier; #464]
|
||||
* Add flag parameter to grab accelerator API [Andrea; !169]
|
||||
* Reuse old CRTC if possible to avoid flicker on hotplug [Pekka, Emilio; #373]
|
||||
* Misc. bug fixes and cleanups [Marco, Jonas, Niels, Adam, Olivier; !436,
|
||||
!421, #462, !439, !440, !444, !321, !445, !456]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Andrea Azzarone, Olivier Fourdan, Carlos Garnacho,
|
||||
Niels De Graef, Adam Jackson, Emilio Pozuelo Monfort, Pekka Paalanen,
|
||||
Marco Trevisan (Treviño)
|
||||
|
||||
Translators:
|
||||
Jiri Grönroos [fi], Charles Monzat [fr], Claude Paroz [fr], Fran Dieguez [gl],
|
||||
Emin Tufan Çetin [tr], Aurimas Černius [lt], Anders Jonsson [sv],
|
||||
Matej Urbančič [sl], Marek Cernocky [cs], Daniel Șerbănescu [ro],
|
||||
Alan Mortensen [da], Baurzhan Muftakhidinov [kk], Yi-Jyun Pan [zh_TW],
|
||||
Daniel Mustieles [es], Rafael Fontenelle [pt_BR]
|
||||
|
||||
3.31.90
|
||||
=======
|
||||
* Fix support of extended characters in on-screen keyboard [Andrea; #109]
|
||||
* Improve selection of the primary GPU [Pekka, Emilio; !271]
|
||||
* Screen-cast cursor updates as PipeWire stream metadata [Jonas; !357]
|
||||
* Fix rendering glitches in magnifier [Daniel; gnome-shell#387]
|
||||
* Fix monitor recording on HiDPI [Jonas; !415]
|
||||
* Honour secondary GPU supported pixel formats [Pekka; !341]
|
||||
* Fall back to CPU copy path when using a software renderer [Emilio; !325]
|
||||
* Remove fallback app menu [Florian; gnome-shell#624]
|
||||
* wayland: Add support for viewporter protocol [Robert; !323]
|
||||
* Misc. bug fixes and cleanups [Florian, Carlos, Olivier, Marco, Robert,
|
||||
Daniel, Pekka, Jonas, Ole, Georges; !391, #335, #442, !406, !395, #447,
|
||||
!375, gnome-shell#349, #451, !416, #784199, !408, !181, !405]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Andrea Azzarone, Ole Jørgen Brønner, Piotr Drąg, Olivier Fourdan,
|
||||
Dariusz Gadomski, Carlos Garnacho, Antoine Jacoutot, Iain Lane, Robert Mader,
|
||||
Emilio Pozuelo Monfort, Florian Müllner, Georges Basile Stavracas Neto,
|
||||
Pekka Paalanen, Marco Trevisan (Treviño), Josh Triplett, Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Fabio Tomat [fur], Balázs Úr [hu], Daniel Mustieles [es], Kukuh Syafaat [id],
|
||||
Jordi Mas [ca], Piotr Drąg [pl]
|
||||
|
||||
3.31.4
|
||||
======
|
||||
* keybindings: Limit corner move to current monitor [Jānis; #320]
|
||||
|
14
README.md
14
README.md
@@ -22,6 +22,20 @@ by Gala, elementary OS's window manager. It can also be run standalone, using
|
||||
the command "mutter", but just running plain mutter is only intended for
|
||||
debugging purposes.
|
||||
|
||||
## Contributing
|
||||
|
||||
To contribute, open merge requests at https://gitlab.gnome.org/GNOME/mutter.
|
||||
|
||||
The coding style used is primarily the GNU flavor of the [GNOME coding
|
||||
style](https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en)
|
||||
with some minor additions such as preferring `stdint.h` types over GLib
|
||||
fundamental types, and a soft 80 character line limit. However, in general,
|
||||
look at the file you're editing for inspiration.
|
||||
|
||||
Commit messages should follow the [GNOME commit message
|
||||
guidelines](https://wiki.gnome.org/Git/CommitMessages). We require an URL
|
||||
to either an issue or a merge request in each commit.
|
||||
|
||||
## License
|
||||
|
||||
Mutter is distributed under the terms of the GNU General Public License,
|
||||
|
@@ -310,11 +310,7 @@ cally_actor_finalize (GObject *obj)
|
||||
|
||||
_cally_actor_clean_action_list (cally_actor);
|
||||
|
||||
if (priv->action_idle_handler)
|
||||
{
|
||||
g_source_remove (priv->action_idle_handler);
|
||||
priv->action_idle_handler = 0;
|
||||
}
|
||||
g_clear_handle_id (&priv->action_idle_handler, g_source_remove);
|
||||
|
||||
if (priv->action_queue)
|
||||
{
|
||||
@@ -657,7 +653,7 @@ cally_actor_get_extents (AtkComponent *component,
|
||||
ClutterActor *actor = NULL;
|
||||
gint top_level_x, top_level_y;
|
||||
gfloat f_width, f_height;
|
||||
ClutterVertex verts[4];
|
||||
graphene_point3d_t verts[4];
|
||||
ClutterActor *stage = NULL;
|
||||
|
||||
g_return_if_fail (CALLY_IS_ACTOR (component));
|
||||
@@ -737,11 +733,7 @@ cally_actor_grab_focus (AtkComponent *component)
|
||||
*
|
||||
* This gets the top level origin, it is, the position of the stage in
|
||||
* the global screen. You can see it as the absolute display position
|
||||
* of the stage.
|
||||
*
|
||||
* FIXME: only the case with x11 is implemented, other backends are
|
||||
* required
|
||||
*
|
||||
* of the stage. This is 0,0 for a compositor.
|
||||
*/
|
||||
void
|
||||
_cally_actor_get_top_level_origin (ClutterActor *actor,
|
||||
@@ -749,54 +741,11 @@ _cally_actor_get_top_level_origin (ClutterActor *actor,
|
||||
gint *yp)
|
||||
{
|
||||
/* default values */
|
||||
gint x = 0;
|
||||
gint y = 0;
|
||||
|
||||
#ifdef CLUTTER_WINDOWING_X11
|
||||
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
|
||||
{
|
||||
ClutterActor *stage = NULL;
|
||||
Display *display = NULL;
|
||||
Window root_window;
|
||||
Window stage_window;
|
||||
Window child;
|
||||
gint return_val = 0;
|
||||
|
||||
stage = clutter_actor_get_stage (actor);
|
||||
|
||||
/* FIXME: what happens if you use another display with
|
||||
clutter_backend_x11_set_display ?*/
|
||||
display = clutter_x11_get_default_display ();
|
||||
root_window = clutter_x11_get_root_window ();
|
||||
stage_window = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
||||
|
||||
return_val = XTranslateCoordinates (display, stage_window, root_window,
|
||||
0, 0, &x, &y,
|
||||
&child);
|
||||
|
||||
if (!return_val)
|
||||
g_warning ("[x11] We were not able to get proper absolute "
|
||||
"position of the stage");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
static gboolean yet_warned = FALSE;
|
||||
|
||||
if (!yet_warned)
|
||||
{
|
||||
yet_warned = TRUE;
|
||||
|
||||
g_warning ("The current Clutter backend does not support using "
|
||||
"atk_component_get_extents() with ATK_XY_SCREEN.");
|
||||
}
|
||||
}
|
||||
|
||||
if (xp)
|
||||
*xp = x;
|
||||
*xp = 0;
|
||||
|
||||
if (yp)
|
||||
*yp = y;
|
||||
*yp = 0;
|
||||
}
|
||||
|
||||
/* AtkAction implementation */
|
||||
@@ -1044,10 +993,8 @@ _cally_actor_clean_action_list (CallyActor *cally_actor)
|
||||
|
||||
if (priv->action_list)
|
||||
{
|
||||
g_list_foreach (priv->action_list,
|
||||
(GFunc) _cally_actor_destroy_action_info,
|
||||
NULL);
|
||||
g_list_free (priv->action_list);
|
||||
g_list_free_full (priv->action_list,
|
||||
(GDestroyNotify) _cally_actor_destroy_action_info);
|
||||
priv->action_list = NULL;
|
||||
}
|
||||
}
|
||||
|
@@ -75,8 +75,8 @@ struct _CallyRootPrivate
|
||||
GSList *stage_list;
|
||||
|
||||
/* signals id */
|
||||
guint stage_added_id;
|
||||
guint stage_removed_id;
|
||||
gulong stage_added_id;
|
||||
gulong stage_removed_id;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (CallyRoot, cally_root, ATK_TYPE_GOBJECT_ACCESSIBLE)
|
||||
@@ -149,11 +149,9 @@ cally_root_finalize (GObject *object)
|
||||
|
||||
stage_manager = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (root));
|
||||
|
||||
g_signal_handler_disconnect (stage_manager,
|
||||
root->priv->stage_added_id);
|
||||
g_clear_signal_handler (&root->priv->stage_added_id, stage_manager);
|
||||
|
||||
g_signal_handler_disconnect (stage_manager,
|
||||
root->priv->stage_added_id);
|
||||
g_clear_signal_handler (&root->priv->stage_removed_id, stage_manager);
|
||||
|
||||
G_OBJECT_CLASS (cally_root_parent_class)->finalize (object);
|
||||
}
|
||||
|
@@ -247,11 +247,7 @@ cally_text_finalize (GObject *obj)
|
||||
/* g_object_unref (cally_text->priv->textutil); */
|
||||
/* cally_text->priv->textutil = NULL; */
|
||||
|
||||
if (cally_text->priv->insert_idle_handler)
|
||||
{
|
||||
g_source_remove (cally_text->priv->insert_idle_handler);
|
||||
cally_text->priv->insert_idle_handler = 0;
|
||||
}
|
||||
g_clear_handle_id (&cally_text->priv->insert_idle_handler, g_source_remove);
|
||||
|
||||
G_OBJECT_CLASS (cally_text_parent_class)->finalize (obj);
|
||||
}
|
||||
@@ -1438,7 +1434,7 @@ static void cally_text_get_character_extents (AtkText *text,
|
||||
PangoLayout *layout;
|
||||
PangoRectangle extents;
|
||||
const gchar *text_value;
|
||||
ClutterVertex verts[4];
|
||||
graphene_point3d_t verts[4];
|
||||
|
||||
actor = CALLY_GET_CLUTTER_ACTOR (text);
|
||||
if (actor == NULL) /* State is defunct */
|
||||
@@ -2294,7 +2290,7 @@ _cally_misc_get_index_at_point (ClutterText *clutter_text,
|
||||
gint index, x_window, y_window, x_toplevel, y_toplevel;
|
||||
gint x_temp, y_temp;
|
||||
gboolean ret;
|
||||
ClutterVertex verts[4];
|
||||
graphene_point3d_t verts[4];
|
||||
PangoLayout *layout;
|
||||
gint x_layout, y_layout;
|
||||
|
||||
|
@@ -1,98 +0,0 @@
|
||||
/* CALLY - The Clutter Accessibility Implementation Library
|
||||
*
|
||||
* Copyright (C) 2009 Igalia, S.L.
|
||||
*
|
||||
* Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
|
||||
*
|
||||
* 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, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:cally-texture
|
||||
* @Title: CallyTexture
|
||||
* @short_description: Implementation of the ATK interfaces for a #ClutterTexture
|
||||
* @see_also: #ClutterTexture
|
||||
*
|
||||
* #CallyTexture implements the required ATK interfaces of #ClutterTexture
|
||||
*
|
||||
* In particular it sets a proper role for the texture.
|
||||
*/
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "cally-texture.h"
|
||||
#include "cally-actor-private.h"
|
||||
|
||||
#include "deprecated/clutter-texture.h"
|
||||
|
||||
/* AtkObject */
|
||||
static void cally_texture_real_initialize (AtkObject *obj,
|
||||
gpointer data);
|
||||
|
||||
G_DEFINE_TYPE (CallyTexture, cally_texture, CALLY_TYPE_ACTOR)
|
||||
|
||||
static void
|
||||
cally_texture_class_init (CallyTextureClass *klass)
|
||||
{
|
||||
/* GObjectClass *gobject_class = G_OBJECT_CLASS (klass); */
|
||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||
|
||||
class->initialize = cally_texture_real_initialize;
|
||||
}
|
||||
|
||||
static void
|
||||
cally_texture_init (CallyTexture *texture)
|
||||
{
|
||||
/* nothing to do yet */
|
||||
}
|
||||
|
||||
/**
|
||||
* cally_texture_new:
|
||||
* @actor: a #ClutterActor
|
||||
*
|
||||
* Creates a new #CallyTexture for the given @actor. @actor must be
|
||||
* a #ClutterTexture.
|
||||
*
|
||||
* Return value: the newly created #AtkObject
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
AtkObject*
|
||||
cally_texture_new (ClutterActor *actor)
|
||||
{
|
||||
GObject *object = NULL;
|
||||
AtkObject *accessible = NULL;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_TEXTURE (actor), NULL);
|
||||
|
||||
object = g_object_new (CALLY_TYPE_TEXTURE, NULL);
|
||||
|
||||
accessible = ATK_OBJECT (object);
|
||||
atk_object_initialize (accessible, actor);
|
||||
|
||||
return accessible;
|
||||
}
|
||||
|
||||
static void
|
||||
cally_texture_real_initialize (AtkObject *obj,
|
||||
gpointer data)
|
||||
{
|
||||
ATK_OBJECT_CLASS (cally_texture_parent_class)->initialize (obj, data);
|
||||
|
||||
/* default role */
|
||||
obj->role = ATK_ROLE_IMAGE;
|
||||
}
|
@@ -1,84 +0,0 @@
|
||||
/* CALLY - The Clutter Accessibility Implementation Library
|
||||
*
|
||||
* Copyright (C) 2009 Igalia, S.L.
|
||||
*
|
||||
* Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
|
||||
*
|
||||
* 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 __CALLY_TEXTURE_H__
|
||||
#define __CALLY_TEXTURE_H__
|
||||
|
||||
#if !defined(__CALLY_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <cally/cally.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <cally/cally-actor.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CALLY_TYPE_TEXTURE (cally_texture_get_type ())
|
||||
#define CALLY_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALLY_TYPE_TEXTURE, CallyTexture))
|
||||
#define CALLY_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALLY_TYPE_TEXTURE, CallyTextureClass))
|
||||
#define CALLY_IS_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALLY_TYPE_TEXTURE))
|
||||
#define CALLY_IS_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALLY_TYPE_TEXTURE))
|
||||
#define CALLY_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALLY_TYPE_TEXTURE, CallyTextureClass))
|
||||
|
||||
typedef struct _CallyTexture CallyTexture;
|
||||
typedef struct _CallyTextureClass CallyTextureClass;
|
||||
typedef struct _CallyTexturePrivate CallyTexturePrivate;
|
||||
|
||||
/**
|
||||
* CallyTexture:
|
||||
*
|
||||
* The <structname>CallyTexture</structname> structure contains only
|
||||
* private data and should be accessed using the provided API
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
struct _CallyTexture
|
||||
{
|
||||
/*< private >*/
|
||||
CallyActor parent;
|
||||
|
||||
CallyTexturePrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* CallyTextureClass:
|
||||
*
|
||||
* The <structname>CallyTextureClass</structname> structure contains
|
||||
* only private data
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
struct _CallyTextureClass
|
||||
{
|
||||
/*< private >*/
|
||||
CallyActorClass parent_class;
|
||||
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[8];
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType cally_texture_get_type (void) G_GNUC_CONST;
|
||||
CLUTTER_EXPORT
|
||||
AtkObject *cally_texture_new (ClutterActor *actor);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CALLY_TEXTURE_H__ */
|
@@ -39,7 +39,6 @@
|
||||
#include "cally-group.h"
|
||||
#include "cally-stage.h"
|
||||
#include "cally-text.h"
|
||||
#include "cally-texture.h"
|
||||
#include "cally-rectangle.h"
|
||||
#include "cally-clone.h"
|
||||
|
||||
@@ -56,7 +55,6 @@ CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_ACTOR, cally_actor, cally_actor_new)
|
||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_GROUP, cally_group, cally_group_new)
|
||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_STAGE, cally_stage, cally_stage_new)
|
||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXT, cally_text, cally_text_new)
|
||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXTURE, cally_texture, cally_texture_new)
|
||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_RECTANGLE, cally_rectangle, cally_rectangle_new)
|
||||
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_CLONE, cally_clone, cally_clone_new)
|
||||
|
||||
@@ -78,7 +76,6 @@ cally_accessibility_init (void)
|
||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_GROUP, cally_group);
|
||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_STAGE, cally_stage);
|
||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXT, cally_text);
|
||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXTURE, cally_texture);
|
||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_RECTANGLE, cally_rectangle);
|
||||
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_CLONE, cally_clone);
|
||||
|
||||
|
@@ -32,7 +32,6 @@
|
||||
#include "cally-root.h"
|
||||
#include "cally-stage.h"
|
||||
#include "cally-text.h"
|
||||
#include "cally-texture.h"
|
||||
#include "cally-util.h"
|
||||
|
||||
#undef __CALLY_H_INSIDE__
|
||||
|
12
clutter/clutter/clutter-actor-box-private.h
Normal file
12
clutter/clutter/clutter-actor-box-private.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef __CLUTTER_ACTOR_BOX_PRIVATE_H__
|
||||
#define __CLUTTER_ACTOR_BOX_PRIVATE_H__
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void _clutter_actor_box_enlarge_for_effects (ClutterActorBox *box);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_ACTOR_BOX_PRIVATE_H__ */
|
@@ -5,6 +5,7 @@
|
||||
#include "clutter-types.h"
|
||||
#include "clutter-interval.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-actor-box-private.h"
|
||||
|
||||
/**
|
||||
* clutter_actor_box_new:
|
||||
@@ -339,7 +340,7 @@ clutter_actor_box_contains (const ClutterActorBox *box,
|
||||
/**
|
||||
* clutter_actor_box_from_vertices:
|
||||
* @box: a #ClutterActorBox
|
||||
* @verts: (array fixed-size=4): array of four #ClutterVertex
|
||||
* @verts: (array fixed-size=4): array of four #graphene_point3d_t
|
||||
*
|
||||
* Calculates the bounding box represented by the four vertices; for details
|
||||
* of the vertex array see clutter_actor_get_abs_allocation_vertices().
|
||||
@@ -347,8 +348,8 @@ clutter_actor_box_contains (const ClutterActorBox *box,
|
||||
* Since: 1.0
|
||||
*/
|
||||
void
|
||||
clutter_actor_box_from_vertices (ClutterActorBox *box,
|
||||
const ClutterVertex verts[])
|
||||
clutter_actor_box_from_vertices (ClutterActorBox *box,
|
||||
const graphene_point3d_t verts[])
|
||||
{
|
||||
gfloat x_1, x_2, y_1, y_2;
|
||||
|
||||
@@ -542,6 +543,78 @@ clutter_actor_box_set_size (ClutterActorBox *box,
|
||||
box->y2 = box->y1 + height;
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_actor_box_enlarge_for_effects (ClutterActorBox *box)
|
||||
{
|
||||
float width, height;
|
||||
|
||||
/* The aim here is that for a given rectangle defined with floating point
|
||||
* coordinates we want to determine a stable quantized size in pixels
|
||||
* that doesn't vary due to the original box's sub-pixel position.
|
||||
*
|
||||
* The reason this is important is because effects will use this
|
||||
* API to determine the size of offscreen framebuffers and so for
|
||||
* a fixed-size object that may be animated accross the screen we
|
||||
* want to make sure that the stage paint-box has an equally stable
|
||||
* size so that effects aren't made to continuously re-allocate
|
||||
* a corresponding fbo.
|
||||
*
|
||||
* The other thing we consider is that the calculation of this box is
|
||||
* subject to floating point precision issues that might be slightly
|
||||
* different to the precision issues involved with actually painting the
|
||||
* actor, which might result in painting slightly leaking outside the
|
||||
* user's calculated paint-volume. For this we simply aim to pad out the
|
||||
* paint-volume by at least half a pixel all the way around.
|
||||
*/
|
||||
width = box->x2 - box->x1;
|
||||
height = box->y2 - box->y1;
|
||||
width = CLUTTER_NEARBYINT (width);
|
||||
height = CLUTTER_NEARBYINT (height);
|
||||
/* XXX: NB the width/height may now be up to 0.5px too small so we
|
||||
* must also pad by 0.25px all around to account for this. In total we
|
||||
* must padd by at least 0.75px around all sides. */
|
||||
|
||||
/* XXX: The furthest that we can overshoot the bottom right corner by
|
||||
* here is 1.75px in total if you consider that the 0.75 padding could
|
||||
* just cross an integer boundary and so ceil will effectively add 1.
|
||||
*/
|
||||
box->x2 = ceilf (box->x2 + 0.75);
|
||||
box->y2 = ceilf (box->y2 + 0.75);
|
||||
|
||||
/* Now we redefine the top-left relative to the bottom right based on the
|
||||
* rounded width/height determined above + a constant so that the overall
|
||||
* size of the box will be stable and not dependant on the box's
|
||||
* position.
|
||||
*
|
||||
* Adding 3px to the width/height will ensure we cover the maximum of
|
||||
* 1.75px padding on the bottom/right and still ensure we have > 0.75px
|
||||
* padding on the top/left.
|
||||
*/
|
||||
box->x1 = box->x2 - width - 3;
|
||||
box->y1 = box->y2 - height - 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_actor_box_scale:
|
||||
* @box: a #ClutterActorBox
|
||||
* @scale: scale factor for resizing this box
|
||||
*
|
||||
* Rescale the @box by provided @scale factor.
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
void
|
||||
clutter_actor_box_scale (ClutterActorBox *box,
|
||||
gfloat scale)
|
||||
{
|
||||
g_return_if_fail (box != NULL);
|
||||
|
||||
box->x1 *= scale;
|
||||
box->x2 *= scale;
|
||||
box->y1 *= scale;
|
||||
box->y2 *= scale;
|
||||
}
|
||||
|
||||
G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterActorBox, clutter_actor_box,
|
||||
clutter_actor_box_copy,
|
||||
clutter_actor_box_free,
|
||||
|
@@ -51,7 +51,7 @@
|
||||
struct _ClutterActorMetaPrivate
|
||||
{
|
||||
ClutterActor *actor;
|
||||
guint destroy_id;
|
||||
gulong destroy_id;
|
||||
|
||||
gchar *name;
|
||||
|
||||
@@ -91,11 +91,7 @@ clutter_actor_meta_real_set_actor (ClutterActorMeta *meta,
|
||||
if (meta->priv->actor == actor)
|
||||
return;
|
||||
|
||||
if (meta->priv->destroy_id != 0)
|
||||
{
|
||||
g_signal_handler_disconnect (meta->priv->actor, meta->priv->destroy_id);
|
||||
meta->priv->destroy_id = 0;
|
||||
}
|
||||
g_clear_signal_handler (&meta->priv->destroy_id, meta->priv->actor);
|
||||
|
||||
meta->priv->actor = actor;
|
||||
|
||||
@@ -162,8 +158,8 @@ clutter_actor_meta_finalize (GObject *gobject)
|
||||
{
|
||||
ClutterActorMetaPrivate *priv = CLUTTER_ACTOR_META (gobject)->priv;
|
||||
|
||||
if (priv->destroy_id != 0 && priv->actor != NULL)
|
||||
g_signal_handler_disconnect (priv->actor, priv->destroy_id);
|
||||
if (priv->actor != NULL)
|
||||
g_clear_signal_handler (&priv->destroy_id, priv->actor);
|
||||
|
||||
g_free (priv->name);
|
||||
|
||||
@@ -577,8 +573,7 @@ _clutter_meta_group_clear_metas (ClutterMetaGroup *group)
|
||||
{
|
||||
g_list_foreach (group->meta, (GFunc) _clutter_actor_meta_set_actor, NULL);
|
||||
|
||||
g_list_foreach (group->meta, (GFunc) g_object_unref, NULL);
|
||||
g_list_free (group->meta);
|
||||
g_list_free_full (group->meta, g_object_unref);
|
||||
group->meta = NULL;
|
||||
}
|
||||
|
||||
|
@@ -53,7 +53,8 @@ typedef enum
|
||||
* Controls some options for how clutter_actor_traverse() iterates
|
||||
* through the graph.
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_ACTOR_TRAVERSE_DEPTH_FIRST = 1L<<0,
|
||||
CLUTTER_ACTOR_TRAVERSE_BREADTH_FIRST = 1L<<1
|
||||
} ClutterActorTraverseFlags;
|
||||
@@ -74,7 +75,8 @@ typedef enum {
|
||||
* the continuing traversal. It may stop traversal completely, just
|
||||
* skip over children for the current actor or continue as normal.
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_ACTOR_TRAVERSE_VISIT_CONTINUE = 1L<<0,
|
||||
CLUTTER_ACTOR_TRAVERSE_VISIT_SKIP_CHILDREN = 1L<<1,
|
||||
CLUTTER_ACTOR_TRAVERSE_VISIT_BREAK = 1L<<2
|
||||
@@ -133,7 +135,7 @@ struct _AnchorCoord
|
||||
} fraction;
|
||||
|
||||
/* Use when is_fractional == FALSE */
|
||||
ClutterVertex units;
|
||||
graphene_point3d_t units;
|
||||
} v;
|
||||
};
|
||||
|
||||
@@ -161,7 +163,7 @@ struct _SizeRequest
|
||||
struct _ClutterLayoutInfo
|
||||
{
|
||||
/* fixed position coordinates */
|
||||
ClutterPoint fixed_pos;
|
||||
graphene_point_t fixed_pos;
|
||||
|
||||
ClutterMargin margin;
|
||||
|
||||
@@ -171,8 +173,8 @@ struct _ClutterLayoutInfo
|
||||
guint x_expand : 1;
|
||||
guint y_expand : 1;
|
||||
|
||||
ClutterSize minimum;
|
||||
ClutterSize natural;
|
||||
graphene_size_t minimum;
|
||||
graphene_size_t natural;
|
||||
};
|
||||
|
||||
const ClutterLayoutInfo * _clutter_actor_get_layout_info_or_defaults (ClutterActor *self);
|
||||
@@ -201,13 +203,13 @@ struct _ClutterTransformInfo
|
||||
AnchorCoord anchor;
|
||||
|
||||
/* translation */
|
||||
ClutterVertex translation;
|
||||
graphene_point3d_t translation;
|
||||
|
||||
/* z_position */
|
||||
gfloat z_position;
|
||||
|
||||
/* transformation center */
|
||||
ClutterPoint pivot;
|
||||
graphene_point_t pivot;
|
||||
gfloat pivot_z;
|
||||
|
||||
CoglMatrix transform;
|
||||
@@ -240,9 +242,6 @@ ClutterAnimationInfo * _clutter_actor_get_animation_info
|
||||
ClutterTransition * _clutter_actor_create_transition (ClutterActor *self,
|
||||
GParamSpec *pspec,
|
||||
...);
|
||||
ClutterTransition * _clutter_actor_get_transition (ClutterActor *self,
|
||||
GParamSpec *pspec);
|
||||
|
||||
gboolean _clutter_actor_foreach_child (ClutterActor *self,
|
||||
ClutterForeachCallback callback,
|
||||
gpointer user_data);
|
||||
@@ -275,6 +274,9 @@ void _clutter_actor_set_enable_paint_unmapped
|
||||
void _clutter_actor_set_has_pointer (ClutterActor *self,
|
||||
gboolean has_pointer);
|
||||
|
||||
void _clutter_actor_set_has_key_focus (ClutterActor *self,
|
||||
gboolean has_key_focus);
|
||||
|
||||
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
|
||||
ClutterRedrawFlags flags,
|
||||
const ClutterPaintVolume *clip_volume);
|
||||
@@ -283,9 +285,6 @@ void _clutter_actor_queue_redraw_full
|
||||
const ClutterPaintVolume *volume,
|
||||
ClutterEffect *effect);
|
||||
|
||||
ClutterPaintVolume * _clutter_actor_get_queue_redraw_clip (ClutterActor *self);
|
||||
void _clutter_actor_set_queue_redraw_clip (ClutterActor *self,
|
||||
ClutterPaintVolume *clip_volume);
|
||||
void _clutter_actor_finish_queue_redraw (ClutterActor *self,
|
||||
ClutterPaintVolume *clip);
|
||||
|
||||
@@ -298,8 +297,6 @@ const gchar * _clutter_actor_get_debug_name
|
||||
void _clutter_actor_push_clone_paint (void);
|
||||
void _clutter_actor_pop_clone_paint (void);
|
||||
|
||||
guint32 _clutter_actor_get_pick_id (ClutterActor *self);
|
||||
|
||||
void _clutter_actor_shader_pre_paint (ClutterActor *actor,
|
||||
gboolean repeat);
|
||||
void _clutter_actor_shader_post_paint (ClutterActor *actor);
|
||||
@@ -316,8 +313,10 @@ void _clutter_actor_detach_clone
|
||||
void _clutter_actor_queue_redraw_on_clones (ClutterActor *actor);
|
||||
void _clutter_actor_queue_relayout_on_clones (ClutterActor *actor);
|
||||
void _clutter_actor_queue_only_relayout (ClutterActor *actor);
|
||||
void _clutter_actor_queue_update_resource_scale_recursive (ClutterActor *actor);
|
||||
|
||||
CoglFramebuffer * _clutter_actor_get_active_framebuffer (ClutterActor *actor);
|
||||
gboolean _clutter_actor_get_real_resource_scale (ClutterActor *actor,
|
||||
float *resource_scale);
|
||||
|
||||
ClutterPaintNode * clutter_actor_create_texture_paint_node (ClutterActor *self,
|
||||
CoglTexture *texture);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,8 @@
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
#include <clutter/clutter-event.h>
|
||||
#include <clutter/clutter-paint-context.h>
|
||||
#include <clutter/clutter-pick-context.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -228,16 +230,18 @@ struct _ClutterActorClass
|
||||
void (* unrealize) (ClutterActor *self);
|
||||
void (* map) (ClutterActor *self);
|
||||
void (* unmap) (ClutterActor *self);
|
||||
void (* paint) (ClutterActor *self);
|
||||
void (* paint) (ClutterActor *self,
|
||||
ClutterPaintContext *paint_context);
|
||||
void (* parent_set) (ClutterActor *actor,
|
||||
ClutterActor *old_parent);
|
||||
|
||||
void (* destroy) (ClutterActor *self);
|
||||
void (* pick) (ClutterActor *actor,
|
||||
const ClutterColor *color);
|
||||
ClutterPickContext *pick_context);
|
||||
|
||||
void (* queue_redraw) (ClutterActor *actor,
|
||||
ClutterActor *leaf_that_queued);
|
||||
gboolean (* queue_redraw) (ClutterActor *actor,
|
||||
ClutterActor *leaf_that_queued,
|
||||
ClutterPaintVolume *paint_volume);
|
||||
|
||||
/* size negotiation */
|
||||
void (* get_preferred_width) (ClutterActor *self,
|
||||
@@ -349,9 +353,17 @@ void clutter_actor_map
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_unmap (ClutterActor *self);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_paint (ClutterActor *self);
|
||||
void clutter_actor_paint (ClutterActor *self,
|
||||
ClutterPaintContext *paint_context);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_continue_paint (ClutterActor *self);
|
||||
void clutter_actor_continue_paint (ClutterActor *self,
|
||||
ClutterPaintContext *paint_context);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_pick (ClutterActor *actor,
|
||||
ClutterPickContext *pick_context);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_continue_pick (ClutterActor *actor,
|
||||
ClutterPickContext *pick_context);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_queue_redraw (ClutterActor *self);
|
||||
CLUTTER_EXPORT
|
||||
@@ -430,7 +442,7 @@ void clutter_actor_get_allocation_box
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_get_allocation_vertices (ClutterActor *self,
|
||||
ClutterActor *ancestor,
|
||||
ClutterVertex verts[]);
|
||||
graphene_point3d_t *verts);
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_has_allocation (ClutterActor *self);
|
||||
CLUTTER_EXPORT
|
||||
@@ -583,6 +595,11 @@ gboolean clutter_actor_is_in_clone_paint
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_get_paint_box (ClutterActor *self,
|
||||
ClutterActorBox *box);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_get_resource_scale (ClutterActor *self,
|
||||
gfloat *resource_scale);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_has_overlaps (ClutterActor *self);
|
||||
|
||||
@@ -811,16 +828,16 @@ gboolean clutter_actor_transform_stage_point
|
||||
gfloat *y_out);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
|
||||
ClutterVertex verts[]);
|
||||
graphene_point3d_t *verts);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_apply_transform_to_point (ClutterActor *self,
|
||||
const ClutterVertex *point,
|
||||
ClutterVertex *vertex);
|
||||
const graphene_point3d_t *point,
|
||||
graphene_point3d_t *vertex);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
|
||||
ClutterActor *ancestor,
|
||||
const ClutterVertex *point,
|
||||
ClutterVertex *vertex);
|
||||
const graphene_point3d_t *point,
|
||||
graphene_point3d_t *vertex);
|
||||
|
||||
/* Implicit animations */
|
||||
CLUTTER_EXPORT
|
||||
@@ -896,6 +913,11 @@ void clutter_actor_bind_model_with_properties
|
||||
const char *first_model_property,
|
||||
...);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_actor_pick_box (ClutterActor *self,
|
||||
ClutterPickContext *pick_context,
|
||||
const ClutterActorBox *box);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_ACTOR_H__ */
|
||||
|
@@ -30,7 +30,7 @@
|
||||
* to control how a #ClutterAnimation will animate a property.
|
||||
*
|
||||
* Each #ClutterAnimatable should implement the
|
||||
* #ClutterAnimatableIface.interpolate_property() virtual function of the
|
||||
* #ClutterAnimatableInterface.interpolate_property() virtual function of the
|
||||
* interface to compute the animation state between two values of an interval
|
||||
* depending on a progress factor, expressed as a floating point value.
|
||||
*
|
||||
@@ -54,10 +54,8 @@
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
#include "deprecated/clutter-animatable.h"
|
||||
#include "deprecated/clutter-animation.h"
|
||||
|
||||
typedef ClutterAnimatableIface ClutterAnimatableInterface;
|
||||
G_DEFINE_INTERFACE (ClutterAnimatable, clutter_animatable, G_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
@@ -65,80 +63,6 @@ clutter_animatable_default_init (ClutterAnimatableInterface *iface)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_animatable_animate_property:
|
||||
* @animatable: a #ClutterAnimatable
|
||||
* @animation: a #ClutterAnimation
|
||||
* @property_name: the name of the animated property
|
||||
* @initial_value: the initial value of the animation interval
|
||||
* @final_value: the final value of the animation interval
|
||||
* @progress: the progress factor
|
||||
* @value: return location for the animation value
|
||||
*
|
||||
* Calls the animate_property() virtual function for @animatable.
|
||||
*
|
||||
* The @initial_value and @final_value #GValue<!-- -->s must contain
|
||||
* the same type; @value must have been initialized to the same
|
||||
* type of @initial_value and @final_value.
|
||||
*
|
||||
* All implementation of the #ClutterAnimatable interface must
|
||||
* implement this function.
|
||||
*
|
||||
* Return value: %TRUE if the value has been validated and can
|
||||
* be applied to the #ClutterAnimatable, and %FALSE otherwise
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.8: Use clutter_animatable_interpolate_value()
|
||||
* instead
|
||||
*/
|
||||
gboolean
|
||||
clutter_animatable_animate_property (ClutterAnimatable *animatable,
|
||||
ClutterAnimation *animation,
|
||||
const gchar *property_name,
|
||||
const GValue *initial_value,
|
||||
const GValue *final_value,
|
||||
gdouble progress,
|
||||
GValue *value)
|
||||
{
|
||||
ClutterAnimatableIface *iface;
|
||||
gboolean res;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), FALSE);
|
||||
g_return_val_if_fail (CLUTTER_IS_ANIMATION (animation), FALSE);
|
||||
g_return_val_if_fail (property_name != NULL, FALSE);
|
||||
g_return_val_if_fail (initial_value != NULL && final_value != NULL, FALSE);
|
||||
g_return_val_if_fail (G_VALUE_TYPE (initial_value) != G_TYPE_INVALID, FALSE);
|
||||
g_return_val_if_fail (G_VALUE_TYPE (final_value) != G_TYPE_INVALID, FALSE);
|
||||
g_return_val_if_fail (value != NULL, FALSE);
|
||||
g_return_val_if_fail (G_VALUE_TYPE (value) == G_VALUE_TYPE (initial_value) &&
|
||||
G_VALUE_TYPE (value) == G_VALUE_TYPE (final_value),
|
||||
FALSE);
|
||||
|
||||
iface = CLUTTER_ANIMATABLE_GET_IFACE (animatable);
|
||||
if (iface->animate_property == NULL)
|
||||
{
|
||||
ClutterInterval *interval;
|
||||
|
||||
interval = clutter_animation_get_interval (animation, property_name);
|
||||
if (interval == NULL)
|
||||
return FALSE;
|
||||
|
||||
res = clutter_animatable_interpolate_value (animatable, property_name,
|
||||
interval,
|
||||
progress,
|
||||
value);
|
||||
}
|
||||
else
|
||||
res = iface->animate_property (animatable, animation,
|
||||
property_name,
|
||||
initial_value, final_value,
|
||||
progress,
|
||||
value);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_animatable_find_property:
|
||||
* @animatable: a #ClutterAnimatable
|
||||
@@ -155,7 +79,7 @@ GParamSpec *
|
||||
clutter_animatable_find_property (ClutterAnimatable *animatable,
|
||||
const gchar *property_name)
|
||||
{
|
||||
ClutterAnimatableIface *iface;
|
||||
ClutterAnimatableInterface *iface;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), NULL);
|
||||
g_return_val_if_fail (property_name != NULL, NULL);
|
||||
@@ -185,7 +109,7 @@ clutter_animatable_get_initial_state (ClutterAnimatable *animatable,
|
||||
const gchar *property_name,
|
||||
GValue *value)
|
||||
{
|
||||
ClutterAnimatableIface *iface;
|
||||
ClutterAnimatableInterface *iface;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_ANIMATABLE (animatable));
|
||||
g_return_if_fail (property_name != NULL);
|
||||
@@ -214,7 +138,7 @@ clutter_animatable_set_final_state (ClutterAnimatable *animatable,
|
||||
const gchar *property_name,
|
||||
const GValue *value)
|
||||
{
|
||||
ClutterAnimatableIface *iface;
|
||||
ClutterAnimatableInterface *iface;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_ANIMATABLE (animatable));
|
||||
g_return_if_fail (property_name != NULL);
|
||||
@@ -260,7 +184,7 @@ clutter_animatable_interpolate_value (ClutterAnimatable *animatable,
|
||||
gdouble progress,
|
||||
GValue *value)
|
||||
{
|
||||
ClutterAnimatableIface *iface;
|
||||
ClutterAnimatableInterface *iface;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), FALSE);
|
||||
g_return_val_if_fail (property_name != NULL, FALSE);
|
||||
|
@@ -33,24 +33,15 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_ANIMATABLE (clutter_animatable_get_type ())
|
||||
#define CLUTTER_ANIMATABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_ANIMATABLE, ClutterAnimatable))
|
||||
#define CLUTTER_IS_ANIMATABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_ANIMATABLE))
|
||||
#define CLUTTER_ANIMATABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_ANIMATABLE, ClutterAnimatableIface))
|
||||
#define CLUTTER_TYPE_ANIMATABLE (clutter_animatable_get_type ())
|
||||
|
||||
typedef struct _ClutterAnimatableIface ClutterAnimatableIface;
|
||||
CLUTTER_EXPORT
|
||||
G_DECLARE_INTERFACE (ClutterAnimatable, clutter_animatable,
|
||||
CLUTTER, ANIMATABLE,
|
||||
GObject)
|
||||
|
||||
/**
|
||||
* ClutterAnimatable:
|
||||
*
|
||||
* #ClutterAnimatable is an opaque structure whose members cannot be directly
|
||||
* accessed
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* ClutterAnimatableIface:
|
||||
* ClutterAnimatableInterface:
|
||||
* @animate_property: virtual function for custom interpolation of a
|
||||
* property. This virtual function is deprecated
|
||||
* @find_property: virtual function for retrieving the #GParamSpec of
|
||||
@@ -67,7 +58,7 @@ typedef struct _ClutterAnimatableIface ClutterAnimatableIface;
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
struct _ClutterAnimatableIface
|
||||
struct _ClutterAnimatableInterface
|
||||
{
|
||||
/*< private >*/
|
||||
GTypeInterface parent_iface;
|
||||
@@ -95,9 +86,6 @@ struct _ClutterAnimatableIface
|
||||
GValue *value);
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType clutter_animatable_get_type (void) G_GNUC_CONST;
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GParamSpec *clutter_animatable_find_property (ClutterAnimatable *animatable,
|
||||
const gchar *property_name);
|
||||
|
@@ -34,7 +34,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAction, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorMeta, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAlignConstraint, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAnimatable, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBackend, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindConstraint, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindingPool, g_object_unref)
|
||||
@@ -49,10 +48,8 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterClone, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColorizeEffect, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterConstraint, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterContainer, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterContent, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDeformEffect, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDesaturateEffect, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDeviceManager, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDragAction, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDropAction, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterEffect, g_object_unref)
|
||||
@@ -93,13 +90,10 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorBox, clutter_actor_box_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColor, clutter_color_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMargin, clutter_margin_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMatrix, clutter_matrix_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintContext, clutter_paint_context_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintNode, clutter_paint_node_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintVolume, clutter_paint_volume_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPathNode, clutter_path_node_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPoint, clutter_point_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterRect, clutter_rect_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSize, clutter_size_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterVertex, clutter_vertex_free)
|
||||
|
||||
#endif /* __GI_SCANNER__ */
|
||||
|
||||
|
@@ -24,10 +24,9 @@
|
||||
|
||||
#include <clutter/clutter-backend.h>
|
||||
#include <clutter/clutter-device-manager.h>
|
||||
#include <clutter/clutter-keymap.h>
|
||||
#include <clutter/clutter-stage-window.h>
|
||||
|
||||
#include "clutter-event-translator.h"
|
||||
|
||||
#define CLUTTER_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
||||
#define CLUTTER_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BACKEND))
|
||||
#define CLUTTER_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
||||
@@ -57,9 +56,11 @@ struct _ClutterBackend
|
||||
gfloat units_per_em;
|
||||
gint32 units_serial;
|
||||
|
||||
GList *event_translators;
|
||||
ClutterStageWindow *stage_window;
|
||||
|
||||
ClutterInputMethod *input_method;
|
||||
|
||||
ClutterKeymap *keymap;
|
||||
};
|
||||
|
||||
struct _ClutterBackendClass
|
||||
@@ -90,12 +91,6 @@ struct _ClutterBackendClass
|
||||
GError **error);
|
||||
ClutterDeviceManager *(* get_device_manager) (ClutterBackend *backend);
|
||||
|
||||
void (* copy_event_data) (ClutterBackend *backend,
|
||||
const ClutterEvent *src,
|
||||
ClutterEvent *dest);
|
||||
void (* free_event_data) (ClutterBackend *backend,
|
||||
ClutterEvent *event);
|
||||
|
||||
gboolean (* translate_event) (ClutterBackend *backend,
|
||||
gpointer native,
|
||||
ClutterEvent *event);
|
||||
@@ -104,6 +99,8 @@ struct _ClutterBackendClass
|
||||
|
||||
void (* bell_notify) (ClutterBackend *backend);
|
||||
|
||||
ClutterKeymap * (* get_keymap) (ClutterBackend *backend);
|
||||
|
||||
/* signals */
|
||||
void (* resolution_changed) (ClutterBackend *backend);
|
||||
void (* font_changed) (ClutterBackend *backend);
|
||||
@@ -131,17 +128,11 @@ void _clutter_backend_copy_event_data (Clutter
|
||||
ClutterEvent *dest);
|
||||
void _clutter_backend_free_event_data (ClutterBackend *backend,
|
||||
ClutterEvent *event);
|
||||
CLUTTER_EXPORT
|
||||
gboolean _clutter_backend_translate_event (ClutterBackend *backend,
|
||||
gpointer native,
|
||||
ClutterEvent *event);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_backend_add_event_translator (ClutterBackend *backend,
|
||||
ClutterEventTranslator *translator);
|
||||
|
||||
void _clutter_backend_remove_event_translator (ClutterBackend *backend,
|
||||
ClutterEventTranslator *translator);
|
||||
|
||||
ClutterFeatureFlags _clutter_backend_get_features (ClutterBackend *backend);
|
||||
|
||||
gfloat _clutter_backend_get_units_per_em (ClutterBackend *backend,
|
||||
@@ -150,12 +141,10 @@ gint32 _clutter_backend_get_units_serial (Clutter
|
||||
|
||||
PangoDirection _clutter_backend_get_keymap_direction (ClutterBackend *backend);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend);
|
||||
|
||||
void clutter_set_allowed_drivers (const char *drivers);
|
||||
|
||||
void clutter_try_set_windowing_backend (const char *drivers);
|
||||
CLUTTER_EXPORT
|
||||
ClutterStageWindow * clutter_backend_get_stage_window (ClutterBackend *backend);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -53,9 +53,6 @@
|
||||
#include "clutter-stage-window.h"
|
||||
#include "clutter-device-manager-private.h"
|
||||
|
||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||
#include "deprecated/clutter-backend.h"
|
||||
|
||||
#ifdef CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT
|
||||
#include "wayland/clutter-wayland-compositor.h"
|
||||
#endif
|
||||
@@ -65,9 +62,6 @@
|
||||
#ifdef CLUTTER_INPUT_X11
|
||||
#include "x11/clutter-backend-x11.h"
|
||||
#endif
|
||||
#ifdef CLUTTER_INPUT_EVDEV
|
||||
#include "evdev/clutter-device-manager-evdev.h"
|
||||
#endif
|
||||
#ifdef CLUTTER_WINDOWING_EGL
|
||||
#include "egl/clutter-backend-eglnative.h"
|
||||
#endif
|
||||
@@ -107,10 +101,12 @@ clutter_backend_dispose (GObject *gobject)
|
||||
/* clear the events still in the queue of the main context */
|
||||
_clutter_clear_events_queue ();
|
||||
|
||||
/* remove all event translators */
|
||||
g_clear_pointer (&backend->event_translators, g_list_free);
|
||||
|
||||
g_clear_pointer (&backend->dummy_onscreen, cogl_object_unref);
|
||||
if (backend->stage_window)
|
||||
{
|
||||
g_object_remove_weak_pointer (G_OBJECT (backend->stage_window),
|
||||
(gpointer *) &backend->stage_window);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (clutter_backend_parent_class)->dispose (gobject);
|
||||
}
|
||||
@@ -400,7 +396,7 @@ clutter_backend_real_create_context (ClutterBackend *backend,
|
||||
else
|
||||
g_set_error_literal (error, CLUTTER_INIT_ERROR,
|
||||
CLUTTER_INIT_ERROR_BACKEND,
|
||||
_("Unable to initialize the Clutter backend: no available drivers found."));
|
||||
"Unable to initialize the Clutter backend: no available drivers found.");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -529,40 +525,7 @@ _clutter_create_backend (void)
|
||||
static void
|
||||
clutter_backend_real_init_events (ClutterBackend *backend)
|
||||
{
|
||||
const char *input_backend = NULL;
|
||||
|
||||
input_backend = g_getenv ("CLUTTER_INPUT_BACKEND");
|
||||
if (input_backend != NULL)
|
||||
input_backend = g_intern_string (input_backend);
|
||||
|
||||
#ifdef CLUTTER_INPUT_X11
|
||||
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11) &&
|
||||
(input_backend == NULL || input_backend == I_(CLUTTER_INPUT_X11)))
|
||||
{
|
||||
_clutter_backend_x11_events_init (backend);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CLUTTER_INPUT_EVDEV
|
||||
/* Evdev can be used regardless of the windowing system */
|
||||
if ((input_backend != NULL && strcmp (input_backend, CLUTTER_INPUT_EVDEV) == 0)
|
||||
#ifdef CLUTTER_WINDOWING_EGL
|
||||
/* but we do want to always use it for EGL native */
|
||||
|| clutter_check_windowing_backend (CLUTTER_WINDOWING_EGL)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
_clutter_events_evdev_init (backend);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (input_backend != NULL)
|
||||
{
|
||||
if (input_backend != I_(CLUTTER_INPUT_NULL))
|
||||
g_error ("Unrecognized input backend '%s'", input_backend);
|
||||
}
|
||||
else
|
||||
g_error ("Unknown input backend");
|
||||
g_error ("Unknown input backend");
|
||||
}
|
||||
|
||||
static ClutterDeviceManager *
|
||||
@@ -577,32 +540,16 @@ clutter_backend_real_get_device_manager (ClutterBackend *backend)
|
||||
return backend->device_manager;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_backend_real_translate_event (ClutterBackend *backend,
|
||||
gpointer native,
|
||||
ClutterEvent *event)
|
||||
static ClutterKeymap *
|
||||
clutter_backend_real_get_keymap (ClutterBackend *backend)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = backend->event_translators;
|
||||
l != NULL;
|
||||
l = l->next)
|
||||
if (G_UNLIKELY (backend->keymap == NULL))
|
||||
{
|
||||
ClutterEventTranslator *translator = l->data;
|
||||
ClutterTranslateReturn retval;
|
||||
|
||||
retval = _clutter_event_translator_translate_event (translator,
|
||||
native,
|
||||
event);
|
||||
|
||||
if (retval == CLUTTER_TRANSLATE_QUEUE)
|
||||
return TRUE;
|
||||
|
||||
if (retval == CLUTTER_TRANSLATE_REMOVE)
|
||||
return FALSE;
|
||||
g_critical ("No keymap available, expect broken keyboard input");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return backend->keymap;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -627,8 +574,7 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (ClutterBackendClass, resolution_changed),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
@@ -645,8 +591,7 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (ClutterBackendClass, font_changed),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
@@ -663,8 +608,7 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (ClutterBackendClass, settings_changed),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
klass->resolution_changed = clutter_backend_real_resolution_changed;
|
||||
@@ -672,9 +616,9 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
||||
|
||||
klass->init_events = clutter_backend_real_init_events;
|
||||
klass->get_device_manager = clutter_backend_real_get_device_manager;
|
||||
klass->translate_event = clutter_backend_real_translate_event;
|
||||
klass->create_context = clutter_backend_real_create_context;
|
||||
klass->get_features = clutter_backend_real_get_features;
|
||||
klass->get_keymap = clutter_backend_real_get_keymap;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -683,7 +627,7 @@ clutter_backend_init (ClutterBackend *self)
|
||||
self->units_per_em = -1.0;
|
||||
self->units_serial = 1;
|
||||
|
||||
self->dummy_onscreen = COGL_INVALID_HANDLE;
|
||||
self->dummy_onscreen = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -751,6 +695,10 @@ _clutter_backend_create_stage (ClutterBackend *backend,
|
||||
|
||||
g_assert (CLUTTER_IS_STAGE_WINDOW (stage_window));
|
||||
|
||||
backend->stage_window = stage_window;
|
||||
g_object_add_weak_pointer (G_OBJECT (backend->stage_window),
|
||||
(gpointer *) &backend->stage_window);
|
||||
|
||||
return stage_window;
|
||||
}
|
||||
|
||||
@@ -835,37 +783,24 @@ _clutter_backend_copy_event_data (ClutterBackend *backend,
|
||||
const ClutterEvent *src,
|
||||
ClutterEvent *dest)
|
||||
{
|
||||
ClutterEventExtenderInterface *iface;
|
||||
ClutterBackendClass *klass;
|
||||
ClutterDeviceManagerClass *device_manager_class;
|
||||
ClutterDeviceManager *device_manager;
|
||||
|
||||
klass = CLUTTER_BACKEND_GET_CLASS (backend);
|
||||
if (CLUTTER_IS_EVENT_EXTENDER (backend->device_manager))
|
||||
{
|
||||
iface = CLUTTER_EVENT_EXTENDER_GET_IFACE (backend->device_manager);
|
||||
iface->copy_event_data (CLUTTER_EVENT_EXTENDER (backend->device_manager),
|
||||
src, dest);
|
||||
}
|
||||
else if (klass->copy_event_data != NULL)
|
||||
klass->copy_event_data (backend, src, dest);
|
||||
device_manager = clutter_device_manager_get_default ();
|
||||
device_manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
|
||||
device_manager_class->copy_event_data (device_manager, src, dest);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_backend_free_event_data (ClutterBackend *backend,
|
||||
ClutterEvent *event)
|
||||
{
|
||||
ClutterEventExtenderInterface *iface;
|
||||
ClutterBackendClass *klass;
|
||||
ClutterDeviceManagerClass *device_manager_class;
|
||||
ClutterDeviceManager *device_manager;
|
||||
|
||||
klass = CLUTTER_BACKEND_GET_CLASS (backend);
|
||||
|
||||
if (CLUTTER_IS_EVENT_EXTENDER (backend->device_manager))
|
||||
{
|
||||
iface = CLUTTER_EVENT_EXTENDER_GET_IFACE (backend->device_manager);
|
||||
iface->free_event_data (CLUTTER_EVENT_EXTENDER (backend->device_manager),
|
||||
event);
|
||||
}
|
||||
else if (klass->free_event_data != NULL)
|
||||
klass->free_event_data (backend, event);
|
||||
device_manager = clutter_device_manager_get_default ();
|
||||
device_manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
|
||||
device_manager_class->free_event_data (device_manager, event);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -890,129 +825,6 @@ clutter_get_default_backend (void)
|
||||
return clutter_context->backend;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_set_double_click_time:
|
||||
* @backend: a #ClutterBackend
|
||||
* @msec: milliseconds between two button press events
|
||||
*
|
||||
* Sets the maximum time between two button press events, used to
|
||||
* verify whether it's a double click event or not.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:double-click-time instead
|
||||
*/
|
||||
void
|
||||
clutter_backend_set_double_click_time (ClutterBackend *backend,
|
||||
guint msec)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
|
||||
g_object_set (settings, "double-click-time", msec, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_double_click_time:
|
||||
* @backend: a #ClutterBackend
|
||||
*
|
||||
* Gets the maximum time between two button press events, as set
|
||||
* by clutter_backend_set_double_click_time().
|
||||
*
|
||||
* Return value: a time in milliseconds
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:double-click-time instead
|
||||
*/
|
||||
guint
|
||||
clutter_backend_get_double_click_time (ClutterBackend *backend)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
gint retval;
|
||||
|
||||
g_object_get (settings, "double-click-time", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_set_double_click_distance:
|
||||
* @backend: a #ClutterBackend
|
||||
* @distance: a distance, in pixels
|
||||
*
|
||||
* Sets the maximum distance used to verify a double click event.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead
|
||||
*/
|
||||
void
|
||||
clutter_backend_set_double_click_distance (ClutterBackend *backend,
|
||||
guint distance)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
|
||||
g_object_set (settings, "double-click-distance", distance, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_double_click_distance:
|
||||
* @backend: a #ClutterBackend
|
||||
*
|
||||
* Retrieves the distance used to verify a double click event
|
||||
*
|
||||
* Return value: a distance, in pixels.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead
|
||||
*/
|
||||
guint
|
||||
clutter_backend_get_double_click_distance (ClutterBackend *backend)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
gint retval;
|
||||
|
||||
g_object_get (settings, "double-click-distance", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_set_resolution:
|
||||
* @backend: a #ClutterBackend
|
||||
* @dpi: the resolution in "dots per inch" (Physical inches aren't
|
||||
* actually involved; the terminology is conventional).
|
||||
*
|
||||
* Sets the resolution for font handling on the screen. This is a
|
||||
* scale factor between points specified in a #PangoFontDescription
|
||||
* and cairo units. The default value is 96, meaning that a 10 point
|
||||
* font will be 13 units high. (10 * 96. / 72. = 13.3).
|
||||
*
|
||||
* Applications should never need to call this function.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:font-dpi instead
|
||||
*/
|
||||
void
|
||||
clutter_backend_set_resolution (ClutterBackend *backend,
|
||||
gdouble dpi)
|
||||
{
|
||||
ClutterSettings *settings;
|
||||
gint resolution;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_BACKEND (backend));
|
||||
|
||||
if (dpi < 0)
|
||||
resolution = -1;
|
||||
else
|
||||
resolution = dpi * 1024;
|
||||
|
||||
settings = clutter_settings_get_default ();
|
||||
g_object_set (settings, "font-dpi", resolution, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_resolution:
|
||||
* @backend: a #ClutterBackend
|
||||
@@ -1118,61 +930,6 @@ clutter_backend_get_font_options (ClutterBackend *backend)
|
||||
return backend->font_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_set_font_name:
|
||||
* @backend: a #ClutterBackend
|
||||
* @font_name: the name of the font
|
||||
*
|
||||
* Sets the default font to be used by Clutter. The @font_name string
|
||||
* must either be %NULL, which means that the font name from the
|
||||
* default #ClutterBackend will be used; or be something that can
|
||||
* be parsed by the pango_font_description_from_string() function.
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:font-name instead
|
||||
*/
|
||||
void
|
||||
clutter_backend_set_font_name (ClutterBackend *backend,
|
||||
const gchar *font_name)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
|
||||
g_object_set (settings, "font-name", font_name, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_font_name:
|
||||
* @backend: a #ClutterBackend
|
||||
*
|
||||
* Retrieves the default font name as set by
|
||||
* clutter_backend_set_font_name().
|
||||
*
|
||||
* Return value: the font name for the backend. The returned string is
|
||||
* owned by the #ClutterBackend and should never be modified or freed
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:font-name instead
|
||||
*/
|
||||
const gchar *
|
||||
clutter_backend_get_font_name (ClutterBackend *backend)
|
||||
{
|
||||
ClutterSettings *settings;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_BACKEND (backend), NULL);
|
||||
|
||||
settings = clutter_settings_get_default ();
|
||||
|
||||
/* XXX yuck. but we return a const pointer, so we need to
|
||||
* store it in the backend
|
||||
*/
|
||||
g_free (backend->font_name);
|
||||
g_object_get (settings, "font-name", &backend->font_name, NULL);
|
||||
|
||||
return backend->font_name;
|
||||
}
|
||||
|
||||
gint32
|
||||
_clutter_backend_get_units_serial (ClutterBackend *backend)
|
||||
{
|
||||
@@ -1189,28 +946,6 @@ _clutter_backend_translate_event (ClutterBackend *backend,
|
||||
event);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_backend_add_event_translator (ClutterBackend *backend,
|
||||
ClutterEventTranslator *translator)
|
||||
{
|
||||
if (g_list_find (backend->event_translators, translator) != NULL)
|
||||
return;
|
||||
|
||||
backend->event_translators =
|
||||
g_list_prepend (backend->event_translators, translator);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_backend_remove_event_translator (ClutterBackend *backend,
|
||||
ClutterEventTranslator *translator)
|
||||
{
|
||||
if (g_list_find (backend->event_translators, translator) == NULL)
|
||||
return;
|
||||
|
||||
backend->event_translators =
|
||||
g_list_remove (backend->event_translators, translator);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_cogl_context: (skip)
|
||||
* @backend: a #ClutterBackend
|
||||
@@ -1262,61 +997,6 @@ clutter_wayland_set_compositor_display (void *display)
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* clutter_set_windowing_backend:
|
||||
* @backend_type: a comma separated list of windowing backends
|
||||
*
|
||||
* Restricts Clutter to only use the specified backend or list of backends.
|
||||
*
|
||||
* You can use one of the `CLUTTER_WINDOWING_*` symbols, e.g.
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* clutter_set_windowing_backend (CLUTTER_WINDOWING_X11);
|
||||
* ]|
|
||||
*
|
||||
* Will force Clutter to use the X11 windowing and input backend, and terminate
|
||||
* if the X11 backend could not be initialized successfully.
|
||||
*
|
||||
* Since Clutter 1.26, you can also use a comma-separated list of windowing
|
||||
* system backends to provide a fallback in case backends are not available or
|
||||
* enabled, e.g.:
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* clutter_set_windowing_backend ("gdk,wayland,x11");
|
||||
* ]|
|
||||
*
|
||||
* Will make Clutter test for the GDK, Wayland, and X11 backends in that order.
|
||||
*
|
||||
* You can use the `*` special value to ask Clutter to use the internally
|
||||
* defined list of backends. For instance:
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* clutter_set_windowing_backend ("x11,wayland,*");
|
||||
* ]|
|
||||
*
|
||||
* Will make Clutter test the X11 and Wayland backends, and then fall back
|
||||
* to the internal list of available backends.
|
||||
*
|
||||
* This function must be called before the first API call to Clutter, including
|
||||
* clutter_get_option_context()
|
||||
*
|
||||
* Since: 1.16
|
||||
*/
|
||||
void
|
||||
clutter_set_windowing_backend (const char *backend_type)
|
||||
{
|
||||
g_return_if_fail (backend_type != NULL);
|
||||
|
||||
allowed_backends = g_strdup (backend_type);
|
||||
}
|
||||
|
||||
void
|
||||
clutter_try_set_windowing_backend (const char *backend_type)
|
||||
{
|
||||
if (allowed_backends == NULL)
|
||||
clutter_set_windowing_backend (backend_type);
|
||||
}
|
||||
|
||||
PangoDirection
|
||||
_clutter_backend_get_keymap_direction (ClutterBackend *backend)
|
||||
{
|
||||
@@ -1329,27 +1009,6 @@ _clutter_backend_get_keymap_direction (ClutterBackend *backend)
|
||||
return PANGO_DIRECTION_NEUTRAL;
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend)
|
||||
{
|
||||
if (backend->dummy_onscreen == COGL_INVALID_HANDLE)
|
||||
{
|
||||
CoglError *internal_error = NULL;
|
||||
|
||||
backend->dummy_onscreen = cogl_onscreen_new (backend->cogl_context, 1, 1);
|
||||
|
||||
if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (backend->dummy_onscreen),
|
||||
&internal_error))
|
||||
{
|
||||
g_critical ("Unable to create dummy onscreen: %s", internal_error->message);
|
||||
cogl_error_free (internal_error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
cogl_set_framebuffer (COGL_FRAMEBUFFER (backend->dummy_onscreen));
|
||||
}
|
||||
|
||||
void
|
||||
clutter_set_allowed_drivers (const char *drivers)
|
||||
{
|
||||
@@ -1399,3 +1058,23 @@ clutter_backend_set_input_method (ClutterBackend *backend,
|
||||
{
|
||||
g_set_object (&backend->input_method, method);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_keymap:
|
||||
* @backend: the #ClutterBackend
|
||||
*
|
||||
* Gets the keymap used by Clutter
|
||||
*
|
||||
* Returns: (transfer none): the keymap
|
||||
**/
|
||||
ClutterKeymap *
|
||||
clutter_backend_get_keymap (ClutterBackend *backend)
|
||||
{
|
||||
return CLUTTER_BACKEND_GET_CLASS (backend)->get_keymap (backend);
|
||||
}
|
||||
|
||||
ClutterStageWindow *
|
||||
clutter_backend_get_stage_window (ClutterBackend *backend)
|
||||
{
|
||||
return backend->stage_window;
|
||||
}
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <cogl/cogl.h>
|
||||
|
||||
#include <clutter/clutter-config.h>
|
||||
#include <clutter/clutter-keymap.h>
|
||||
#include <clutter/clutter-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
@@ -59,9 +60,6 @@ GType clutter_backend_get_type (void) G_GNUC_CONST;
|
||||
CLUTTER_EXPORT
|
||||
ClutterBackend * clutter_get_default_backend (void);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_set_windowing_backend (const char *backend_type);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gdouble clutter_backend_get_resolution (ClutterBackend *backend);
|
||||
|
||||
@@ -83,6 +81,9 @@ ClutterInputMethod * clutter_backend_get_input_method (Clutter
|
||||
CLUTTER_EXPORT
|
||||
void clutter_backend_set_input_method (ClutterBackend *backend,
|
||||
ClutterInputMethod *method);
|
||||
CLUTTER_EXPORT
|
||||
ClutterKeymap * clutter_backend_get_keymap (ClutterBackend *backend);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_BACKEND_H__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
|
||||
|
||||
typedef struct _ClutterBezier ClutterBezier;
|
||||
|
||||
ClutterBezier *_clutter_bezier_new ();
|
||||
ClutterBezier *_clutter_bezier_new (void);
|
||||
|
||||
void _clutter_bezier_free (ClutterBezier * b);
|
||||
|
||||
|
@@ -49,10 +49,10 @@
|
||||
|
||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||
#include "deprecated/clutter-container.h"
|
||||
#include "deprecated/clutter-bin-layout.h"
|
||||
|
||||
#include "clutter-actor-private.h"
|
||||
#include "clutter-animatable.h"
|
||||
#include "clutter-bin-layout.h"
|
||||
#include "clutter-child-meta.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-enum-types.h"
|
||||
@@ -698,187 +698,3 @@ clutter_bin_layout_new (ClutterBinAlignment x_align,
|
||||
"y-align", y_align,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_bin_layout_set_alignment:
|
||||
* @self: a #ClutterBinLayout
|
||||
* @child: (allow-none): a child of @container
|
||||
* @x_align: the horizontal alignment policy to be used for the @child
|
||||
* inside @container
|
||||
* @y_align: the vertical aligment policy to be used on the @child
|
||||
* inside @container
|
||||
*
|
||||
* Sets the horizontal and vertical alignment policies to be applied
|
||||
* to a @child of @self
|
||||
*
|
||||
* If @child is %NULL then the @x_align and @y_align values will
|
||||
* be set as the default alignment policies
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12: Use the #ClutterActor:x-align and
|
||||
* #ClutterActor:y-align properties of #ClutterActor instead.
|
||||
*/
|
||||
void
|
||||
clutter_bin_layout_set_alignment (ClutterBinLayout *self,
|
||||
ClutterActor *child,
|
||||
ClutterBinAlignment x_align,
|
||||
ClutterBinAlignment y_align)
|
||||
{
|
||||
ClutterBinLayoutPrivate *priv;
|
||||
ClutterLayoutManager *manager;
|
||||
ClutterLayoutMeta *meta;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self));
|
||||
g_return_if_fail (child == NULL || CLUTTER_IS_ACTOR (child));
|
||||
|
||||
priv = self->priv;
|
||||
|
||||
if (priv->container == NULL)
|
||||
{
|
||||
if (child == NULL)
|
||||
{
|
||||
set_x_align (self, x_align);
|
||||
set_y_align (self, y_align);
|
||||
}
|
||||
else
|
||||
g_warning ("The layout of type '%s' must be associated to "
|
||||
"a ClutterContainer before setting the alignment "
|
||||
"on its children",
|
||||
G_OBJECT_TYPE_NAME (self));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
manager = CLUTTER_LAYOUT_MANAGER (self);
|
||||
meta = clutter_layout_manager_get_child_meta (manager,
|
||||
priv->container,
|
||||
child);
|
||||
g_assert (CLUTTER_IS_BIN_LAYER (meta));
|
||||
|
||||
set_layer_x_align (CLUTTER_BIN_LAYER (meta), x_align);
|
||||
set_layer_y_align (CLUTTER_BIN_LAYER (meta), y_align);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_bin_layout_get_alignment:
|
||||
* @self: a #ClutterBinLayout
|
||||
* @child: (allow-none): a child of @container
|
||||
* @x_align: (out) (allow-none): return location for the horizontal
|
||||
* alignment policy
|
||||
* @y_align: (out) (allow-none): return location for the vertical
|
||||
* alignment policy
|
||||
*
|
||||
* Retrieves the horizontal and vertical alignment policies for
|
||||
* a child of @self
|
||||
*
|
||||
* If @child is %NULL the default alignment policies will be returned
|
||||
* instead
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12: Use the #ClutterActor:x-align and the
|
||||
* #ClutterActor:y-align properties of #ClutterActor instead.
|
||||
*/
|
||||
void
|
||||
clutter_bin_layout_get_alignment (ClutterBinLayout *self,
|
||||
ClutterActor *child,
|
||||
ClutterBinAlignment *x_align,
|
||||
ClutterBinAlignment *y_align)
|
||||
{
|
||||
ClutterBinLayoutPrivate *priv;
|
||||
ClutterLayoutManager *manager;
|
||||
ClutterLayoutMeta *meta;
|
||||
ClutterBinLayer *layer;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self));
|
||||
|
||||
priv = self->priv;
|
||||
|
||||
if (priv->container == NULL)
|
||||
{
|
||||
if (child == NULL)
|
||||
{
|
||||
if (x_align)
|
||||
*x_align = priv->x_align;
|
||||
|
||||
if (y_align)
|
||||
*y_align = priv->y_align;
|
||||
}
|
||||
else
|
||||
g_warning ("The layout of type '%s' must be associated to "
|
||||
"a ClutterContainer before getting the alignment "
|
||||
"of its children",
|
||||
G_OBJECT_TYPE_NAME (self));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
manager = CLUTTER_LAYOUT_MANAGER (self);
|
||||
meta = clutter_layout_manager_get_child_meta (manager,
|
||||
priv->container,
|
||||
child);
|
||||
g_assert (CLUTTER_IS_BIN_LAYER (meta));
|
||||
|
||||
layer = CLUTTER_BIN_LAYER (meta);
|
||||
|
||||
if (x_align)
|
||||
*x_align = layer->x_align;
|
||||
|
||||
if (y_align)
|
||||
*y_align = layer->y_align;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_bin_layout_add:
|
||||
* @self: a #ClutterBinLayout
|
||||
* @child: a #ClutterActor
|
||||
* @x_align: horizontal alignment policy for @child
|
||||
* @y_align: vertical alignment policy for @child
|
||||
*
|
||||
* Adds a #ClutterActor to the container using @self and
|
||||
* sets the alignment policies for it
|
||||
*
|
||||
* This function is equivalent to clutter_container_add_actor()
|
||||
* and clutter_layout_manager_child_set_property() but it does not
|
||||
* require a pointer to the #ClutterContainer associated to the
|
||||
* #ClutterBinLayout
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12: Use clutter_actor_add_child() instead.
|
||||
*/
|
||||
void
|
||||
clutter_bin_layout_add (ClutterBinLayout *self,
|
||||
ClutterActor *child,
|
||||
ClutterBinAlignment x_align,
|
||||
ClutterBinAlignment y_align)
|
||||
{
|
||||
ClutterBinLayoutPrivate *priv;
|
||||
ClutterLayoutManager *manager;
|
||||
ClutterLayoutMeta *meta;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self));
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (child));
|
||||
|
||||
priv = self->priv;
|
||||
|
||||
if (priv->container == NULL)
|
||||
{
|
||||
g_warning ("The layout of type '%s' must be associated to "
|
||||
"a ClutterContainer before adding children",
|
||||
G_OBJECT_TYPE_NAME (self));
|
||||
return;
|
||||
}
|
||||
|
||||
clutter_container_add_actor (priv->container, child);
|
||||
|
||||
manager = CLUTTER_LAYOUT_MANAGER (self);
|
||||
meta = clutter_layout_manager_get_child_meta (manager,
|
||||
priv->container,
|
||||
child);
|
||||
g_assert (CLUTTER_IS_BIN_LAYER (meta));
|
||||
|
||||
set_layer_x_align (CLUTTER_BIN_LAYER (meta), x_align);
|
||||
set_layer_y_align (CLUTTER_BIN_LAYER (meta), y_align);
|
||||
}
|
||||
|
@@ -152,7 +152,9 @@ clutter_bind_constraint_update_allocation (ClutterConstraint *constraint,
|
||||
ClutterBindConstraint *bind = CLUTTER_BIND_CONSTRAINT (constraint);
|
||||
gfloat source_width, source_height;
|
||||
gfloat actor_width, actor_height;
|
||||
ClutterVertex source_position = { 0., };
|
||||
graphene_point3d_t source_position;
|
||||
|
||||
source_position = GRAPHENE_POINT3D_INIT (0.f, 0.f, 0.f);
|
||||
|
||||
if (bind->source == NULL)
|
||||
return;
|
||||
|
@@ -235,8 +235,7 @@ clutter_binding_pool_finalize (GObject *gobject)
|
||||
|
||||
g_hash_table_destroy (pool->entries_hash);
|
||||
|
||||
g_slist_foreach (pool->entries, (GFunc) binding_entry_free, NULL);
|
||||
g_slist_free (pool->entries);
|
||||
g_slist_free_full (pool->entries, (GDestroyNotify) binding_entry_free);
|
||||
|
||||
G_OBJECT_CLASS (clutter_binding_pool_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
@@ -99,7 +99,8 @@ G_DEFINE_TYPE (ClutterBlurEffect,
|
||||
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||
|
||||
static gboolean
|
||||
clutter_blur_effect_pre_paint (ClutterEffect *effect)
|
||||
clutter_blur_effect_pre_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterBlurEffect *self = CLUTTER_BLUR_EFFECT (effect);
|
||||
ClutterEffectClass *parent_class;
|
||||
@@ -124,7 +125,7 @@ clutter_blur_effect_pre_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
parent_class = CLUTTER_EFFECT_CLASS (clutter_blur_effect_parent_class);
|
||||
if (parent_class->pre_paint (effect))
|
||||
if (parent_class->pre_paint (effect, paint_context))
|
||||
{
|
||||
ClutterOffscreenEffect *offscreen_effect =
|
||||
CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
@@ -157,10 +158,12 @@ clutter_blur_effect_pre_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterBlurEffect *self = CLUTTER_BLUR_EFFECT (effect);
|
||||
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
|
||||
CoglFramebuffer *framebuffer =
|
||||
clutter_paint_context_get_framebuffer (paint_context);
|
||||
guint8 paint_opacity;
|
||||
|
||||
paint_opacity = clutter_actor_get_paint_opacity (self->actor);
|
||||
@@ -178,11 +181,11 @@ clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_blur_effect_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
clutter_blur_effect_modify_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
gfloat cur_width, cur_height;
|
||||
ClutterVertex origin;
|
||||
graphene_point3d_t origin;
|
||||
|
||||
clutter_paint_volume_get_origin (volume, &origin);
|
||||
cur_width = clutter_paint_volume_get_width (volume);
|
||||
@@ -223,7 +226,7 @@ clutter_blur_effect_class_init (ClutterBlurEffectClass *klass)
|
||||
gobject_class->dispose = clutter_blur_effect_dispose;
|
||||
|
||||
effect_class->pre_paint = clutter_blur_effect_pre_paint;
|
||||
effect_class->get_paint_volume = clutter_blur_effect_get_paint_volume;
|
||||
effect_class->modify_paint_volume = clutter_blur_effect_modify_paint_volume;
|
||||
|
||||
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
||||
offscreen_class->paint_target = clutter_blur_effect_paint_target;
|
||||
@@ -249,9 +252,7 @@ clutter_blur_effect_init (ClutterBlurEffect *self)
|
||||
cogl_pipeline_add_layer_snippet (klass->base_pipeline, 0, snippet);
|
||||
cogl_object_unref (snippet);
|
||||
|
||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
|
||||
0, /* layer number */
|
||||
COGL_TEXTURE_TYPE_2D);
|
||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline, 0);
|
||||
}
|
||||
|
||||
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
||||
|
@@ -150,9 +150,9 @@ typedef struct _RequestedSize
|
||||
gfloat natural_size;
|
||||
} RequestedSize;
|
||||
|
||||
static gint distribute_natural_allocation (gint extra_space,
|
||||
guint n_requested_sizes,
|
||||
RequestedSize *sizes);
|
||||
static float distribute_natural_allocation (float extra_space,
|
||||
unsigned int n_requested_sizes,
|
||||
RequestedSize *sizes);
|
||||
static void count_expand_children (ClutterLayoutManager *layout,
|
||||
ClutterContainer *container,
|
||||
gint *visible_children,
|
||||
@@ -624,7 +624,19 @@ get_preferred_size_for_opposite_orientation (ClutterBoxLayout *self,
|
||||
else
|
||||
{
|
||||
/* Bring children up to size first */
|
||||
size = distribute_natural_allocation (MAX (0, size), nvis_children, sizes);
|
||||
if (isnormal (size) || size == 0)
|
||||
{
|
||||
size = distribute_natural_allocation (MAX (0, size),
|
||||
nvis_children,
|
||||
sizes);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_critical ("Actor %s (%p) received the invalid "
|
||||
"value %f as minimum/natural size\n",
|
||||
G_OBJECT_TYPE_NAME (container), container, size);
|
||||
size = 0;
|
||||
}
|
||||
|
||||
/* Calculate space which hasn't distributed yet,
|
||||
* and is available for expanding children.
|
||||
@@ -879,17 +891,18 @@ compare_gap (gconstpointer p1,
|
||||
*
|
||||
* Pulled from gtksizerequest.c from Gtk+
|
||||
*/
|
||||
static gint
|
||||
distribute_natural_allocation (gint extra_space,
|
||||
guint n_requested_sizes,
|
||||
static float
|
||||
distribute_natural_allocation (float extra_space,
|
||||
unsigned int n_requested_sizes,
|
||||
RequestedSize *sizes)
|
||||
{
|
||||
guint *spreading;
|
||||
gint i;
|
||||
unsigned int *spreading;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (isnormal (extra_space) || extra_space == 0, 0);
|
||||
g_return_val_if_fail (extra_space >= 0, 0);
|
||||
|
||||
spreading = g_newa (guint, n_requested_sizes);
|
||||
spreading = g_newa (unsigned int, n_requested_sizes);
|
||||
|
||||
for (i = 0; i < n_requested_sizes; i++)
|
||||
spreading[i] = i;
|
||||
@@ -913,7 +926,7 @@ distribute_natural_allocation (gint extra_space,
|
||||
|
||||
/* Sort descending by gap and position. */
|
||||
g_qsort_with_data (spreading,
|
||||
n_requested_sizes, sizeof (guint),
|
||||
n_requested_sizes, sizeof (unsigned int),
|
||||
compare_gap, sizes);
|
||||
|
||||
/* Distribute available space.
|
||||
@@ -925,11 +938,11 @@ distribute_natural_allocation (gint extra_space,
|
||||
* Sort order and reducing remaining space by assigned space
|
||||
* ensures that space is distributed equally.
|
||||
*/
|
||||
gint glue = (extra_space + i) / (i + 1);
|
||||
gint gap = sizes[(spreading[i])].natural_size
|
||||
- sizes[(spreading[i])].minimum_size;
|
||||
int glue = (extra_space + i) / (i + 1);
|
||||
int gap = sizes[(spreading[i])].natural_size
|
||||
- sizes[(spreading[i])].minimum_size;
|
||||
|
||||
gint extra = MIN (glue, gap);
|
||||
int extra = MIN (glue, gap);
|
||||
|
||||
sizes[spreading[i]].minimum_size += extra;
|
||||
|
||||
@@ -1056,7 +1069,9 @@ clutter_box_layout_allocate (ClutterLayoutManager *layout,
|
||||
else
|
||||
{
|
||||
/* Bring children up to size first */
|
||||
size = distribute_natural_allocation (MAX (0, size), nvis_children, sizes);
|
||||
size = (gint) distribute_natural_allocation (MAX (0, (float) size),
|
||||
nvis_children,
|
||||
sizes);
|
||||
|
||||
/* Calculate space which hasn't distributed yet,
|
||||
* and is available for expanding children.
|
||||
|
@@ -121,16 +121,17 @@ G_DEFINE_TYPE (ClutterBrightnessContrastEffect,
|
||||
static gboolean
|
||||
will_have_no_effect (ClutterBrightnessContrastEffect *self)
|
||||
{
|
||||
return (self->brightness_red == no_change &&
|
||||
self->brightness_green == no_change &&
|
||||
self->brightness_blue == no_change &&
|
||||
self->contrast_red == no_change &&
|
||||
self->contrast_green == no_change &&
|
||||
self->contrast_blue == no_change);
|
||||
return (G_APPROX_VALUE (self->brightness_red, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->brightness_green, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->brightness_blue, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->contrast_red, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->contrast_green, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->contrast_blue, no_change, FLT_EPSILON));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_brightness_contrast_effect_pre_paint (ClutterEffect *effect)
|
||||
clutter_brightness_contrast_effect_pre_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterBrightnessContrastEffect *self = CLUTTER_BRIGHTNESS_CONTRAST_EFFECT (effect);
|
||||
ClutterEffectClass *parent_class;
|
||||
@@ -156,7 +157,7 @@ clutter_brightness_contrast_effect_pre_paint (ClutterEffect *effect)
|
||||
|
||||
parent_class =
|
||||
CLUTTER_EFFECT_CLASS (clutter_brightness_contrast_effect_parent_class);
|
||||
if (parent_class->pre_paint (effect))
|
||||
if (parent_class->pre_paint (effect, paint_context))
|
||||
{
|
||||
ClutterOffscreenEffect *offscreen_effect =
|
||||
CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
@@ -175,10 +176,12 @@ clutter_brightness_contrast_effect_pre_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_brightness_contrast_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
clutter_brightness_contrast_effect_paint_target (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterBrightnessContrastEffect *self = CLUTTER_BRIGHTNESS_CONTRAST_EFFECT (effect);
|
||||
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
|
||||
CoglFramebuffer *framebuffer =
|
||||
clutter_paint_context_get_framebuffer (paint_context);
|
||||
ClutterActor *actor;
|
||||
guint8 paint_opacity;
|
||||
|
||||
@@ -438,9 +441,7 @@ clutter_brightness_contrast_effect_init (ClutterBrightnessContrastEffect *self)
|
||||
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
||||
cogl_object_unref (snippet);
|
||||
|
||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
|
||||
0, /* layer number */
|
||||
COGL_TEXTURE_TYPE_2D);
|
||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline, 0);
|
||||
}
|
||||
|
||||
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
||||
@@ -496,9 +497,9 @@ clutter_brightness_contrast_effect_set_brightness_full (ClutterBrightnessContras
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
|
||||
|
||||
if (red == effect->brightness_red &&
|
||||
green == effect->brightness_green &&
|
||||
blue == effect->brightness_blue)
|
||||
if (G_APPROX_VALUE (red, effect->brightness_red, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (green, effect->brightness_green, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (blue, effect->brightness_blue, FLT_EPSILON))
|
||||
return;
|
||||
|
||||
effect->brightness_red = red;
|
||||
@@ -586,9 +587,9 @@ clutter_brightness_contrast_effect_set_contrast_full (ClutterBrightnessContrastE
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
|
||||
|
||||
if (red == effect->contrast_red &&
|
||||
green == effect->contrast_green &&
|
||||
blue == effect->contrast_blue)
|
||||
if (G_APPROX_VALUE (red, effect->contrast_red, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (green, effect->contrast_green, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (blue, effect->contrast_blue, FLT_EPSILON))
|
||||
return;
|
||||
|
||||
effect->contrast_red = red;
|
||||
|
@@ -44,6 +44,7 @@
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <cogl/cogl.h>
|
||||
#include <cairo-gobject.h>
|
||||
|
||||
@@ -69,6 +70,7 @@ struct _ClutterCanvasPrivate
|
||||
|
||||
int width;
|
||||
int height;
|
||||
float scale_factor;
|
||||
|
||||
CoglTexture *texture;
|
||||
gboolean dirty;
|
||||
@@ -82,6 +84,7 @@ enum
|
||||
|
||||
PROP_WIDTH,
|
||||
PROP_HEIGHT,
|
||||
PROP_SCALE_FACTOR,
|
||||
|
||||
LAST_PROP
|
||||
};
|
||||
@@ -97,7 +100,7 @@ enum
|
||||
|
||||
static guint canvas_signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
static void clutter_content_iface_init (ClutterContentIface *iface);
|
||||
static void clutter_content_iface_init (ClutterContentInterface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (ClutterCanvas, clutter_canvas, G_TYPE_OBJECT,
|
||||
G_ADD_PRIVATE (ClutterCanvas)
|
||||
@@ -178,6 +181,19 @@ clutter_canvas_set_property (GObject *gobject,
|
||||
}
|
||||
break;
|
||||
|
||||
case PROP_SCALE_FACTOR:
|
||||
{
|
||||
gfloat new_scale_factor = g_value_get_float (value);
|
||||
|
||||
if (priv->scale_factor != new_scale_factor)
|
||||
{
|
||||
priv->scale_factor = new_scale_factor;
|
||||
|
||||
clutter_content_invalidate (CLUTTER_CONTENT (gobject));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||
break;
|
||||
@@ -202,6 +218,10 @@ clutter_canvas_get_property (GObject *gobject,
|
||||
g_value_set_int (value, priv->height);
|
||||
break;
|
||||
|
||||
case PROP_SCALE_FACTOR:
|
||||
g_value_set_float (value, priv->scale_factor);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||
break;
|
||||
@@ -245,6 +265,19 @@ clutter_canvas_class_init (ClutterCanvasClass *klass)
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* ClutterCanvas:scale-factor:
|
||||
*
|
||||
* The height of the canvas.
|
||||
*/
|
||||
obj_props[PROP_SCALE_FACTOR] =
|
||||
g_param_spec_float ("scale-factor",
|
||||
P_("Scale Factor"),
|
||||
P_("The Scale factor of the canvas"),
|
||||
0.01f, G_MAXFLOAT,
|
||||
1.0f,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* ClutterCanvas::draw:
|
||||
@@ -291,12 +324,14 @@ clutter_canvas_init (ClutterCanvas *self)
|
||||
|
||||
self->priv->width = -1;
|
||||
self->priv->height = -1;
|
||||
self->priv->scale_factor = 1.0f;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_canvas_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *root)
|
||||
clutter_canvas_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *root,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterCanvas *self = CLUTTER_CANVAS (content);
|
||||
ClutterCanvasPrivate *priv = self->priv;
|
||||
@@ -340,8 +375,8 @@ clutter_canvas_emit_draw (ClutterCanvas *self)
|
||||
|
||||
priv->dirty = TRUE;
|
||||
|
||||
real_width = priv->width;
|
||||
real_height = priv->height;
|
||||
real_width = ceilf (priv->width * priv->scale_factor);
|
||||
real_height = ceilf (priv->height * priv->scale_factor);
|
||||
|
||||
CLUTTER_NOTE (MISC, "Creating Cairo surface with size %d x %d",
|
||||
priv->width, priv->height);
|
||||
@@ -387,6 +422,10 @@ clutter_canvas_emit_draw (ClutterCanvas *self)
|
||||
mapped_buffer = FALSE;
|
||||
}
|
||||
|
||||
cairo_surface_set_device_scale (surface,
|
||||
priv->scale_factor,
|
||||
priv->scale_factor);
|
||||
|
||||
self->priv->cr = cr = cairo_create (surface);
|
||||
|
||||
g_signal_emit (self, canvas_signals[DRAW], 0,
|
||||
@@ -448,16 +487,16 @@ clutter_canvas_get_preferred_size (ClutterContent *content,
|
||||
return FALSE;
|
||||
|
||||
if (width != NULL)
|
||||
*width = priv->width;
|
||||
*width = ceilf (priv->width * priv->scale_factor);
|
||||
|
||||
if (height != NULL)
|
||||
*height = priv->height;
|
||||
*height = ceilf (priv->height * priv->scale_factor);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_content_iface_init (ClutterContentIface *iface)
|
||||
clutter_content_iface_init (ClutterContentInterface *iface)
|
||||
{
|
||||
iface->invalidate = clutter_canvas_invalidate;
|
||||
iface->paint_content = clutter_canvas_paint_content;
|
||||
@@ -560,3 +599,48 @@ clutter_canvas_set_size (ClutterCanvas *canvas,
|
||||
|
||||
return clutter_canvas_invalidate_internal (canvas, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_canvas_set_scale_factor:
|
||||
* @canvas: a #ClutterCanvas
|
||||
* @scale: the integer scaling factor of the canvas
|
||||
*
|
||||
* Sets the scaling factor of the @canvas, and invalidates the content.
|
||||
*
|
||||
* This function will cause the @canvas to be invalidated only
|
||||
* if the scale factor of the canvas surface has changed.
|
||||
*/
|
||||
void
|
||||
clutter_canvas_set_scale_factor (ClutterCanvas *canvas,
|
||||
float scale)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_CANVAS (canvas));
|
||||
g_return_if_fail (scale > 0.0f);
|
||||
|
||||
if (canvas->priv->scale_factor != scale)
|
||||
{
|
||||
canvas->priv->scale_factor = scale;
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (canvas));
|
||||
clutter_content_invalidate (CLUTTER_CONTENT (canvas));
|
||||
g_object_thaw_notify (G_OBJECT (canvas));
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (canvas), obj_props[PROP_SCALE_FACTOR]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_canvas_get_scale_factor:
|
||||
* @canvas: a #ClutterCanvas
|
||||
*
|
||||
* Gets the scale factor of the @canvas.
|
||||
*
|
||||
* Return value: the current @canvas scale factor or -1 if invalid
|
||||
*/
|
||||
float
|
||||
clutter_canvas_get_scale_factor (ClutterCanvas *canvas)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_CANVAS (canvas), -1.0f);
|
||||
|
||||
return canvas->priv->scale_factor;
|
||||
}
|
||||
|
@@ -97,9 +97,9 @@ gboolean clutter_canvas_set_size (ClutterCanvas *
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_canvas_set_scale_factor (ClutterCanvas *canvas,
|
||||
int scale);
|
||||
float scale);
|
||||
CLUTTER_EXPORT
|
||||
int clutter_canvas_get_scale_factor (ClutterCanvas *canvas);
|
||||
float clutter_canvas_get_scale_factor (ClutterCanvas *canvas);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -105,8 +105,8 @@ struct _ClutterClickActionPrivate
|
||||
{
|
||||
ClutterActor *stage;
|
||||
|
||||
guint event_id;
|
||||
guint capture_id;
|
||||
gulong event_id;
|
||||
gulong capture_id;
|
||||
guint long_press_id;
|
||||
|
||||
gint long_press_threshold;
|
||||
@@ -202,11 +202,7 @@ click_action_emit_long_press (gpointer data)
|
||||
CLUTTER_LONG_PRESS_ACTIVATE,
|
||||
&result);
|
||||
|
||||
if (priv->capture_id != 0)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
priv->capture_id = 0;
|
||||
}
|
||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
||||
|
||||
click_action_set_pressed (action, FALSE);
|
||||
click_action_set_held (action, FALSE);
|
||||
@@ -261,8 +257,7 @@ click_action_cancel_long_press (ClutterClickAction *action)
|
||||
|
||||
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
|
||||
|
||||
g_source_remove (priv->long_press_id);
|
||||
priv->long_press_id = 0;
|
||||
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
||||
|
||||
g_signal_emit (action, click_signals[LONG_PRESS], 0,
|
||||
actor,
|
||||
@@ -355,6 +350,10 @@ on_captured_event (ClutterActor *stage,
|
||||
|
||||
switch (clutter_event_type (event))
|
||||
{
|
||||
case CLUTTER_TOUCH_CANCEL:
|
||||
clutter_click_action_release (action);
|
||||
break;
|
||||
|
||||
case CLUTTER_TOUCH_END:
|
||||
has_button = FALSE;
|
||||
case CLUTTER_BUTTON_RELEASE:
|
||||
@@ -371,17 +370,9 @@ on_captured_event (ClutterActor *stage,
|
||||
click_action_cancel_long_press (action);
|
||||
|
||||
/* disconnect the capture */
|
||||
if (priv->capture_id != 0)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
priv->capture_id = 0;
|
||||
}
|
||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
||||
|
||||
if (priv->long_press_id != 0)
|
||||
{
|
||||
g_source_remove (priv->long_press_id);
|
||||
priv->long_press_id = 0;
|
||||
}
|
||||
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
||||
|
||||
if (!clutter_actor_contains (actor, clutter_event_get_source (event)))
|
||||
return CLUTTER_EVENT_PROPAGATE;
|
||||
@@ -449,7 +440,7 @@ clutter_click_action_set_actor (ClutterActorMeta *meta,
|
||||
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
||||
|
||||
if (old_actor != NULL)
|
||||
g_signal_handler_disconnect (old_actor, priv->event_id);
|
||||
g_clear_signal_handler (&priv->event_id, old_actor);
|
||||
|
||||
priv->event_id = 0;
|
||||
}
|
||||
@@ -457,17 +448,13 @@ clutter_click_action_set_actor (ClutterActorMeta *meta,
|
||||
if (priv->capture_id != 0)
|
||||
{
|
||||
if (priv->stage != NULL)
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
||||
|
||||
priv->capture_id = 0;
|
||||
priv->stage = NULL;
|
||||
}
|
||||
|
||||
if (priv->long_press_id != 0)
|
||||
{
|
||||
g_source_remove (priv->long_press_id);
|
||||
priv->long_press_id = 0;
|
||||
}
|
||||
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
||||
|
||||
click_action_set_pressed (action, FALSE);
|
||||
click_action_set_held (action, FALSE);
|
||||
@@ -541,24 +528,12 @@ clutter_click_action_dispose (GObject *gobject)
|
||||
{
|
||||
ClutterClickActionPrivate *priv = CLUTTER_CLICK_ACTION (gobject)->priv;
|
||||
|
||||
if (priv->event_id)
|
||||
{
|
||||
g_signal_handler_disconnect (clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (gobject)),
|
||||
priv->event_id);
|
||||
priv->event_id = 0;
|
||||
}
|
||||
g_clear_signal_handler (&priv->event_id,
|
||||
clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (gobject)));
|
||||
|
||||
if (priv->capture_id)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
priv->capture_id = 0;
|
||||
}
|
||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
||||
|
||||
if (priv->long_press_id)
|
||||
{
|
||||
g_source_remove (priv->long_press_id);
|
||||
priv->long_press_id = 0;
|
||||
}
|
||||
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
||||
|
||||
G_OBJECT_CLASS (clutter_click_action_parent_class)->dispose (gobject);
|
||||
}
|
||||
@@ -662,8 +637,7 @@ clutter_click_action_class_init (ClutterClickActionClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterClickActionClass, clicked),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
|
||||
@@ -757,11 +731,7 @@ clutter_click_action_release (ClutterClickAction *action)
|
||||
return;
|
||||
|
||||
/* disconnect the capture */
|
||||
if (priv->capture_id != 0)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
priv->capture_id = 0;
|
||||
}
|
||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
||||
|
||||
click_action_cancel_long_press (action);
|
||||
click_action_set_held (action, FALSE);
|
||||
|
@@ -152,7 +152,8 @@ clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_clone_paint (ClutterActor *actor)
|
||||
clutter_clone_paint (ClutterActor *actor,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterClone *self = CLUTTER_CLONE (actor);
|
||||
ClutterClonePrivate *priv = self->priv;
|
||||
@@ -189,7 +190,7 @@ clutter_clone_paint (ClutterActor *actor)
|
||||
if (clutter_actor_is_realized (priv->clone_source))
|
||||
{
|
||||
_clutter_actor_push_clone_paint ();
|
||||
clutter_actor_paint (priv->clone_source);
|
||||
clutter_actor_paint (priv->clone_source, paint_context);
|
||||
_clutter_actor_pop_clone_paint ();
|
||||
}
|
||||
|
||||
@@ -252,6 +253,13 @@ clutter_clone_allocate (ClutterActor *self,
|
||||
if (priv->clone_source == NULL)
|
||||
return;
|
||||
|
||||
/* ClutterActor delays allocating until the actor is shown; however
|
||||
* we cannot paint it correctly in that case, so force an allocation.
|
||||
*/
|
||||
if (clutter_actor_get_parent (priv->clone_source) != NULL &&
|
||||
!clutter_actor_has_allocation (priv->clone_source))
|
||||
clutter_actor_allocate_preferred_size (priv->clone_source, flags);
|
||||
|
||||
#if 0
|
||||
/* XXX - this is wrong: ClutterClone cannot clone unparented
|
||||
* actors, as it will break all invariants
|
||||
@@ -393,8 +401,7 @@ clutter_clone_set_source_internal (ClutterClone *self,
|
||||
|
||||
if (priv->clone_source != NULL)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->clone_source, priv->source_destroy_id);
|
||||
priv->source_destroy_id = 0;
|
||||
g_clear_signal_handler (&priv->source_destroy_id, priv->clone_source);
|
||||
_clutter_actor_detach_clone (priv->clone_source, CLUTTER_ACTOR (self));
|
||||
g_object_unref (priv->clone_source);
|
||||
priv->clone_source = NULL;
|
||||
|
@@ -105,7 +105,8 @@ G_DEFINE_TYPE (ClutterColorizeEffect,
|
||||
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||
|
||||
static gboolean
|
||||
clutter_colorize_effect_pre_paint (ClutterEffect *effect)
|
||||
clutter_colorize_effect_pre_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterColorizeEffect *self = CLUTTER_COLORIZE_EFFECT (effect);
|
||||
ClutterEffectClass *parent_class;
|
||||
@@ -126,7 +127,7 @@ clutter_colorize_effect_pre_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
parent_class = CLUTTER_EFFECT_CLASS (clutter_colorize_effect_parent_class);
|
||||
if (parent_class->pre_paint (effect))
|
||||
if (parent_class->pre_paint (effect, paint_context))
|
||||
{
|
||||
ClutterOffscreenEffect *offscreen_effect =
|
||||
CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
@@ -145,10 +146,12 @@ clutter_colorize_effect_pre_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_colorize_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
clutter_colorize_effect_paint_target (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterColorizeEffect *self = CLUTTER_COLORIZE_EFFECT (effect);
|
||||
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
|
||||
CoglFramebuffer *framebuffer =
|
||||
clutter_paint_context_get_framebuffer (paint_context);
|
||||
ClutterActor *actor;
|
||||
guint8 paint_opacity;
|
||||
|
||||
@@ -293,9 +296,7 @@ clutter_colorize_effect_init (ClutterColorizeEffect *self)
|
||||
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
||||
cogl_object_unref (snippet);
|
||||
|
||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
|
||||
0, /* layer number */
|
||||
COGL_TEXTURE_TYPE_2D);
|
||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline, 0);
|
||||
}
|
||||
|
||||
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
||||
|
@@ -48,7 +48,7 @@
|
||||
* Constraints provide a way to build user interfaces by using
|
||||
* relations between #ClutterActors, without explicit fixed
|
||||
* positioning and sizing, similarly to how fluid layout managers like
|
||||
* #ClutterBoxLayout and #ClutterTableLayout lay out their children.
|
||||
* #ClutterBoxLayout lay out their children.
|
||||
*
|
||||
* Constraints are attached to a #ClutterActor, and are available
|
||||
* for inspection using clutter_actor_get_constraints().
|
||||
|
@@ -118,37 +118,6 @@ container_real_remove (ClutterContainer *container,
|
||||
clutter_actor_remove_child (CLUTTER_ACTOR (container), actor);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
ClutterCallback callback;
|
||||
gpointer data;
|
||||
} ForeachClosure;
|
||||
|
||||
static gboolean
|
||||
foreach_cb (ClutterActor *actor,
|
||||
gpointer data)
|
||||
{
|
||||
ForeachClosure *clos = data;
|
||||
|
||||
clos->callback (actor, clos->data);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
container_real_foreach (ClutterContainer *container,
|
||||
ClutterCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
ForeachClosure clos;
|
||||
|
||||
clos.callback = callback;
|
||||
clos.data = user_data;
|
||||
|
||||
_clutter_actor_foreach_child (CLUTTER_ACTOR (container),
|
||||
foreach_cb,
|
||||
&clos);
|
||||
}
|
||||
|
||||
static void
|
||||
container_real_raise (ClutterContainer *container,
|
||||
ClutterActor *child,
|
||||
@@ -197,8 +166,7 @@ clutter_container_default_init (ClutterContainerInterface *iface)
|
||||
iface_type,
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (ClutterContainerIface, actor_added),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
/**
|
||||
@@ -216,8 +184,7 @@ clutter_container_default_init (ClutterContainerInterface *iface)
|
||||
iface_type,
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (ClutterContainerIface, actor_removed),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
|
||||
@@ -245,7 +212,6 @@ clutter_container_default_init (ClutterContainerInterface *iface)
|
||||
|
||||
iface->add = container_real_add;
|
||||
iface->remove = container_real_remove;
|
||||
iface->foreach = container_real_foreach;
|
||||
iface->raise = container_real_raise;
|
||||
iface->lower = container_real_lower;
|
||||
iface->sort_depth_order = container_real_sort_depth_order;
|
||||
@@ -418,33 +384,6 @@ clutter_container_add_actor (ClutterContainer *container,
|
||||
container_add_actor (container, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_container_add_valist: (skip)
|
||||
* @container: a #ClutterContainer
|
||||
* @first_actor: the first #ClutterActor to add
|
||||
* @var_args: list of actors to add, followed by %NULL
|
||||
*
|
||||
* Alternative va_list version of clutter_container_add().
|
||||
*
|
||||
* This function will call #ClutterContainerIface.add(), which is a
|
||||
* deprecated virtual function. The default implementation will
|
||||
* call clutter_actor_add_child().
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_add_child() instead.
|
||||
*/
|
||||
void
|
||||
clutter_container_add_valist (ClutterContainer *container,
|
||||
ClutterActor *first_actor,
|
||||
va_list var_args)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (first_actor));
|
||||
|
||||
container_add_valist (container, first_actor, var_args);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_container_remove: (skip)
|
||||
* @container: a #ClutterContainer
|
||||
@@ -508,42 +447,6 @@ clutter_container_remove_actor (ClutterContainer *container,
|
||||
container_remove_actor (container, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_container_remove_valist: (skip)
|
||||
* @container: a #ClutterContainer
|
||||
* @first_actor: the first #ClutterActor to add
|
||||
* @var_args: list of actors to remove, followed by %NULL
|
||||
*
|
||||
* Alternative va_list version of clutter_container_remove().
|
||||
*
|
||||
* This function will call #ClutterContainerIface.remove(), which is a
|
||||
* deprecated virtual function. The default implementation will call
|
||||
* clutter_actor_remove_child().
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_remove_child() instead.
|
||||
*/
|
||||
void
|
||||
clutter_container_remove_valist (ClutterContainer *container,
|
||||
ClutterActor *first_actor,
|
||||
va_list var_args)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (first_actor));
|
||||
|
||||
container_remove_valist (container, first_actor, var_args);
|
||||
}
|
||||
|
||||
static void
|
||||
get_children_cb (ClutterActor *child,
|
||||
gpointer data)
|
||||
{
|
||||
GList **children = data;
|
||||
|
||||
*children = g_list_prepend (*children, child);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_container_get_children:
|
||||
* @container: a #ClutterContainer
|
||||
@@ -561,108 +464,9 @@ get_children_cb (ClutterActor *child,
|
||||
GList *
|
||||
clutter_container_get_children (ClutterContainer *container)
|
||||
{
|
||||
GList *retval;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_CONTAINER (container), NULL);
|
||||
|
||||
retval = NULL;
|
||||
clutter_container_foreach (container, get_children_cb, &retval);
|
||||
|
||||
return g_list_reverse (retval);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_container_foreach:
|
||||
* @container: a #ClutterContainer
|
||||
* @callback: (scope call): a function to be called for each child
|
||||
* @user_data: data to be passed to the function, or %NULL
|
||||
*
|
||||
* Calls @callback for each child of @container that was added
|
||||
* by the application (with clutter_container_add_actor()). Does
|
||||
* not iterate over "internal" children that are part of the
|
||||
* container's own implementation, if any.
|
||||
*
|
||||
* This function calls the #ClutterContainerIface.foreach()
|
||||
* virtual function, which has been deprecated.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_get_first_child() or
|
||||
* clutter_actor_get_last_child() to retrieve the beginning of
|
||||
* the list of children, and clutter_actor_get_next_sibling()
|
||||
* and clutter_actor_get_previous_sibling() to iterate over it;
|
||||
* alternatively, use the #ClutterActorIter API.
|
||||
*/
|
||||
void
|
||||
clutter_container_foreach (ClutterContainer *container,
|
||||
ClutterCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
if (G_UNLIKELY (_clutter_diagnostic_enabled ()))
|
||||
{
|
||||
ClutterContainerIface *iface = CLUTTER_CONTAINER_GET_IFACE (container);
|
||||
|
||||
if (iface->foreach != container_real_foreach)
|
||||
_clutter_diagnostic_message ("The ClutterContainer::foreach() "
|
||||
"virtual function has been deprecated "
|
||||
"and it should not be overridden by "
|
||||
"newly written code");
|
||||
}
|
||||
#endif /* CLUTTER_ENABLE_DEBUG */
|
||||
|
||||
CLUTTER_CONTAINER_GET_IFACE (container)->foreach (container,
|
||||
callback,
|
||||
user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_container_foreach_with_internals:
|
||||
* @container: a #ClutterContainer
|
||||
* @callback: (scope call): a function to be called for each child
|
||||
* @user_data: data to be passed to the function, or %NULL
|
||||
*
|
||||
* Calls @callback for each child of @container, including "internal"
|
||||
* children built in to the container itself that were never added
|
||||
* by the application.
|
||||
*
|
||||
* This function calls the #ClutterContainerIface.foreach_with_internals()
|
||||
* virtual function, which has been deprecated.
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.10: See clutter_container_foreach().
|
||||
*/
|
||||
void
|
||||
clutter_container_foreach_with_internals (ClutterContainer *container,
|
||||
ClutterCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
ClutterContainerIface *iface;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
iface = CLUTTER_CONTAINER_GET_IFACE (container);
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
if (G_UNLIKELY (_clutter_diagnostic_enabled ()))
|
||||
{
|
||||
if (iface->foreach_with_internals != NULL)
|
||||
_clutter_diagnostic_message ("The ClutterContainer::foreach_with_internals() "
|
||||
"virtual function has been deprecated "
|
||||
"and it should not be overridden by "
|
||||
"newly written code");
|
||||
}
|
||||
#endif /* CLUTTER_ENABLE_DEBUG */
|
||||
|
||||
if (iface->foreach_with_internals != NULL)
|
||||
iface->foreach_with_internals (container, callback, user_data);
|
||||
else
|
||||
iface->foreach (container, callback, user_data);
|
||||
return clutter_actor_get_children (CLUTTER_ACTOR (container));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -59,14 +59,6 @@ typedef struct _ClutterContainerIface ClutterContainerIface;
|
||||
* function is deprecated, and it should not be overridden.
|
||||
* @remove: virtual function for removing an actor from the container. This
|
||||
* virtual function is deprecated, and it should not be overridden.
|
||||
* @foreach: virtual function for iterating over the container's children.
|
||||
* This virtual function is deprecated, and it should not be overridden.
|
||||
* @foreach_with_internals: virtual functions for iterating over the
|
||||
* container's children, both added using the #ClutterContainer API
|
||||
* and internal children. The implementation of this virtual function
|
||||
* is required only if the #ClutterContainer implementation has
|
||||
* internal children. This virtual function is deprecated, and it should
|
||||
* not be overridden.
|
||||
* @raise: virtual function for raising a child. This virtual function is
|
||||
* deprecated and it should not be overridden.
|
||||
* @lower: virtual function for lowering a child. This virtual function is
|
||||
@@ -88,7 +80,7 @@ typedef struct _ClutterContainerIface ClutterContainerIface;
|
||||
* @actor_removed: class handler for #ClutterContainer::actor-removed
|
||||
* @child_notify: class handler for #ClutterContainer::child-notify
|
||||
*
|
||||
* Base interface for container actors. The @add, @remove and @foreach
|
||||
* Base interface for container actors. The @add and @remove
|
||||
* virtual functions must be provided by any implementation; the other
|
||||
* virtual functions are optional.
|
||||
*
|
||||
@@ -104,13 +96,6 @@ struct _ClutterContainerIface
|
||||
ClutterActor *actor);
|
||||
void (* remove) (ClutterContainer *container,
|
||||
ClutterActor *actor);
|
||||
void (* foreach) (ClutterContainer *container,
|
||||
ClutterCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
void (* foreach_with_internals) (ClutterContainer *container,
|
||||
ClutterCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
/* child stacking */
|
||||
void (* raise) (ClutterContainer *container,
|
||||
|
@@ -34,9 +34,10 @@ void _clutter_content_attached (ClutterContent *conte
|
||||
void _clutter_content_detached (ClutterContent *content,
|
||||
ClutterActor *actor);
|
||||
|
||||
void _clutter_content_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *node);
|
||||
void _clutter_content_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -38,14 +38,13 @@
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#include "clutter-actor-private.h"
|
||||
#include "clutter-content-private.h"
|
||||
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-marshal.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
typedef struct _ClutterContentIface ClutterContentInterface;
|
||||
|
||||
enum
|
||||
{
|
||||
ATTACHED,
|
||||
@@ -92,9 +91,15 @@ clutter_content_real_invalidate (ClutterContent *content)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_content_real_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *context)
|
||||
clutter_content_real_invalidate_size (ClutterContent *content)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_content_real_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *context,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -108,6 +113,7 @@ clutter_content_default_init (ClutterContentInterface *iface)
|
||||
iface->attached = clutter_content_real_attached;
|
||||
iface->detached = clutter_content_real_detached;
|
||||
iface->invalidate = clutter_content_real_invalidate;
|
||||
iface->invalidate_size = clutter_content_real_invalidate_size;
|
||||
|
||||
/**
|
||||
* ClutterContent::attached:
|
||||
@@ -123,9 +129,8 @@ clutter_content_default_init (ClutterContentInterface *iface)
|
||||
g_signal_new (I_("attached"),
|
||||
G_TYPE_FROM_INTERFACE (iface),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (ClutterContentIface, attached),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
G_STRUCT_OFFSET (ClutterContentInterface, attached),
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
|
||||
@@ -143,9 +148,8 @@ clutter_content_default_init (ClutterContentInterface *iface)
|
||||
g_signal_new (I_("detached"),
|
||||
G_TYPE_FROM_INTERFACE (iface),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (ClutterContentIface, detached),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
G_STRUCT_OFFSET (ClutterContentInterface, detached),
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
}
|
||||
@@ -188,6 +192,45 @@ clutter_content_invalidate (ClutterContent *content)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_content_invalidate_size:
|
||||
* @content: a #ClutterContent
|
||||
*
|
||||
* Signals that @content's size changed. Attached actors with request mode
|
||||
* set to %CLUTTER_REQUEST_CONTENT_SIZE will have a relayout queued.
|
||||
*
|
||||
* Attached actors with other request modes are not redrawn. To redraw them
|
||||
* too, use clutter_content_invalidate().
|
||||
*/
|
||||
void
|
||||
clutter_content_invalidate_size (ClutterContent *content)
|
||||
{
|
||||
ClutterActor *actor;
|
||||
GHashTable *actors;
|
||||
GHashTableIter iter;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_CONTENT (content));
|
||||
|
||||
CLUTTER_CONTENT_GET_IFACE (content)->invalidate_size (content);
|
||||
|
||||
actors = g_object_get_qdata (G_OBJECT (content), quark_content_actors);
|
||||
if (actors == NULL)
|
||||
return;
|
||||
|
||||
g_hash_table_iter_init (&iter, actors);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *) &actor, NULL))
|
||||
{
|
||||
ClutterRequestMode request_mode;
|
||||
|
||||
g_assert (actor != NULL);
|
||||
|
||||
request_mode = clutter_actor_get_request_mode (actor);
|
||||
|
||||
if (request_mode == CLUTTER_REQUEST_CONTENT_SIZE)
|
||||
_clutter_actor_queue_only_relayout (actor);
|
||||
}
|
||||
}
|
||||
|
||||
/*< private >
|
||||
* _clutter_content_attached:
|
||||
* @content: a #ClutterContent
|
||||
@@ -199,7 +242,7 @@ clutter_content_invalidate (ClutterContent *content)
|
||||
* is associated to a #ClutterContent, to set up a backpointer from
|
||||
* the @content to the @actor.
|
||||
*
|
||||
* This function will invoke the #ClutterContentIface.attached() virtual
|
||||
* This function will invoke the #ClutterContentInterface.attached() virtual
|
||||
* function.
|
||||
*/
|
||||
void
|
||||
@@ -233,7 +276,7 @@ _clutter_content_attached (ClutterContent *content,
|
||||
* This function should be used internally every time a #ClutterActor
|
||||
* removes the association with a #ClutterContent.
|
||||
*
|
||||
* This function will invoke the #ClutterContentIface.detached() virtual
|
||||
* This function will invoke the #ClutterContentInterface.detached() virtual
|
||||
* function.
|
||||
*/
|
||||
void
|
||||
@@ -258,19 +301,22 @@ _clutter_content_detached (ClutterContent *content,
|
||||
* _clutter_content_paint_content:
|
||||
* @content: a #ClutterContent
|
||||
* @actor: a #ClutterActor
|
||||
* @context: a #ClutterPaintNode
|
||||
* @node: a #ClutterPaintNode
|
||||
* @paint_context: a #ClutterPaintContext
|
||||
*
|
||||
* Creates the render tree for the @content and @actor.
|
||||
*
|
||||
* This function will invoke the #ClutterContentIface.paint_content()
|
||||
* This function will invoke the #ClutterContentInterface.paint_content()
|
||||
* virtual function.
|
||||
*/
|
||||
void
|
||||
_clutter_content_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *node)
|
||||
_clutter_content_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
CLUTTER_CONTENT_GET_IFACE (content)->paint_content (content, actor, node);
|
||||
CLUTTER_CONTENT_GET_IFACE (content)->paint_content (content, actor, node,
|
||||
paint_context);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -33,24 +33,13 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_CONTENT (clutter_content_get_type ())
|
||||
#define CLUTTER_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_CONTENT, ClutterContent))
|
||||
#define CLUTTER_IS_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_CONTENT))
|
||||
#define CLUTTER_CONTENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_CONTENT, ClutterContentIface))
|
||||
#define CLUTTER_TYPE_CONTENT (clutter_content_get_type ())
|
||||
|
||||
typedef struct _ClutterContentIface ClutterContentIface;
|
||||
CLUTTER_EXPORT
|
||||
G_DECLARE_INTERFACE (ClutterContent, clutter_content, CLUTTER, CONTENT, GObject)
|
||||
|
||||
/**
|
||||
* ClutterContent:
|
||||
*
|
||||
* The #ClutterContent structure is an opaque type
|
||||
* whose members cannot be acccessed directly.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
|
||||
/**
|
||||
* ClutterContentIface:
|
||||
* ClutterContentInterface:
|
||||
* @get_preferred_size: virtual function; should be overridden by subclasses
|
||||
* of #ClutterContent that have a natural size
|
||||
* @paint_content: virtual function; called each time the content needs to
|
||||
@@ -62,12 +51,12 @@ typedef struct _ClutterContentIface ClutterContentIface;
|
||||
* @invalidate: virtual function; called each time a #ClutterContent state
|
||||
* is changed.
|
||||
*
|
||||
* The #ClutterContentIface structure contains only
|
||||
* The #ClutterContentInterface structure contains only
|
||||
* private data.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
struct _ClutterContentIface
|
||||
struct _ClutterContentInterface
|
||||
{
|
||||
/*< private >*/
|
||||
GTypeInterface g_iface;
|
||||
@@ -76,9 +65,10 @@ struct _ClutterContentIface
|
||||
gboolean (* get_preferred_size) (ClutterContent *content,
|
||||
gfloat *width,
|
||||
gfloat *height);
|
||||
void (* paint_content) (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *node);
|
||||
void (* paint_content) (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context);
|
||||
|
||||
void (* attached) (ClutterContent *content,
|
||||
ClutterActor *actor);
|
||||
@@ -86,10 +76,9 @@ struct _ClutterContentIface
|
||||
ClutterActor *actor);
|
||||
|
||||
void (* invalidate) (ClutterContent *content);
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType clutter_content_get_type (void) G_GNUC_CONST;
|
||||
void (* invalidate_size) (ClutterContent *content);
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_content_get_preferred_size (ClutterContent *content,
|
||||
@@ -98,6 +87,9 @@ gboolean clutter_content_get_preferred_size (ClutterContent *content
|
||||
CLUTTER_EXPORT
|
||||
void clutter_content_invalidate (ClutterContent *content);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_content_invalidate_size (ClutterContent *content);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_CONTENT_H__ */
|
||||
|
@@ -6,43 +6,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
CLUTTER_DEBUG_MISC = 1 << 0,
|
||||
CLUTTER_DEBUG_ACTOR = 1 << 1,
|
||||
CLUTTER_DEBUG_TEXTURE = 1 << 2,
|
||||
CLUTTER_DEBUG_EVENT = 1 << 3,
|
||||
CLUTTER_DEBUG_PAINT = 1 << 4,
|
||||
CLUTTER_DEBUG_PANGO = 1 << 5,
|
||||
CLUTTER_DEBUG_BACKEND = 1 << 6,
|
||||
CLUTTER_DEBUG_SCHEDULER = 1 << 7,
|
||||
CLUTTER_DEBUG_SCRIPT = 1 << 8,
|
||||
CLUTTER_DEBUG_SHADER = 1 << 9,
|
||||
CLUTTER_DEBUG_MULTISTAGE = 1 << 10,
|
||||
CLUTTER_DEBUG_ANIMATION = 1 << 11,
|
||||
CLUTTER_DEBUG_LAYOUT = 1 << 12,
|
||||
CLUTTER_DEBUG_PICK = 1 << 13,
|
||||
CLUTTER_DEBUG_EVENTLOOP = 1 << 14,
|
||||
CLUTTER_DEBUG_CLIPPING = 1 << 15,
|
||||
CLUTTER_DEBUG_OOB_TRANSFORMS = 1 << 16
|
||||
} ClutterDebugFlag;
|
||||
|
||||
typedef enum {
|
||||
CLUTTER_DEBUG_NOP_PICKING = 1 << 0,
|
||||
CLUTTER_DEBUG_DUMP_PICK_BUFFERS = 1 << 1
|
||||
} ClutterPickDebugFlag;
|
||||
|
||||
typedef enum {
|
||||
CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 0,
|
||||
CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS = 1 << 1,
|
||||
CLUTTER_DEBUG_REDRAWS = 1 << 2,
|
||||
CLUTTER_DEBUG_PAINT_VOLUMES = 1 << 3,
|
||||
CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4,
|
||||
CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5,
|
||||
CLUTTER_DEBUG_CONTINUOUS_REDRAW = 1 << 6,
|
||||
CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7,
|
||||
CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8,
|
||||
} ClutterDrawDebugFlag;
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
|
||||
#define CLUTTER_HAS_DEBUG(type) ((clutter_debug_flags & CLUTTER_DEBUG_##type) != FALSE)
|
||||
@@ -80,9 +43,9 @@ extern guint clutter_pick_debug_flags;
|
||||
extern guint clutter_paint_debug_flags;
|
||||
|
||||
void _clutter_debug_messagev (const char *format,
|
||||
va_list var_args);
|
||||
va_list var_args) G_GNUC_PRINTF (1, 0);
|
||||
void _clutter_debug_message (const char *format,
|
||||
...);
|
||||
...) G_GNUC_PRINTF (1, 2);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -147,7 +147,7 @@ clutter_deform_effect_set_actor (ClutterActorMeta *meta,
|
||||
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
||||
|
||||
if (old_actor != NULL)
|
||||
g_signal_handler_disconnect (old_actor, priv->allocation_id);
|
||||
g_clear_signal_handler (&priv->allocation_id, old_actor);
|
||||
|
||||
priv->allocation_id = 0;
|
||||
}
|
||||
@@ -166,18 +166,20 @@ clutter_deform_effect_set_actor (ClutterActorMeta *meta,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterDeformEffect *self= CLUTTER_DEFORM_EFFECT (effect);
|
||||
ClutterDeformEffectPrivate *priv = self->priv;
|
||||
CoglHandle material;
|
||||
CoglPipeline *pipeline;
|
||||
CoglDepthState depth_state;
|
||||
CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
|
||||
CoglFramebuffer *fb =
|
||||
clutter_paint_context_get_framebuffer (paint_context);
|
||||
|
||||
if (priv->is_dirty)
|
||||
{
|
||||
ClutterRect rect;
|
||||
graphene_rect_t rect;
|
||||
gboolean mapped_buffer;
|
||||
CoglVertexP3T2C4 *verts;
|
||||
ClutterActor *actor;
|
||||
@@ -193,8 +195,8 @@ clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
*/
|
||||
if (clutter_offscreen_effect_get_target_rect (effect, &rect))
|
||||
{
|
||||
width = clutter_rect_get_width (&rect);
|
||||
height = clutter_rect_get_height (&rect);
|
||||
width = graphene_rect_get_width (&rect);
|
||||
height = graphene_rect_get_height (&rect);
|
||||
}
|
||||
else
|
||||
clutter_actor_get_size (actor, &width, &height);
|
||||
@@ -282,6 +284,7 @@ clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
/* enable depth testing */
|
||||
cogl_depth_state_init (&depth_state);
|
||||
cogl_depth_state_set_test_enabled (&depth_state, TRUE);
|
||||
cogl_depth_state_set_test_function (&depth_state, COGL_DEPTH_TEST_FUNCTION_LEQUAL);
|
||||
cogl_pipeline_set_depth_state (pipeline, &depth_state, NULL);
|
||||
|
||||
/* enable backface culling if we have a back material */
|
||||
|
@@ -5,39 +5,14 @@
|
||||
|
||||
#include "deprecated/clutter-actor.h"
|
||||
#include "deprecated/clutter-alpha.h"
|
||||
#include "deprecated/clutter-animatable.h"
|
||||
#include "deprecated/clutter-animation.h"
|
||||
#include "deprecated/clutter-animator.h"
|
||||
#include "deprecated/clutter-backend.h"
|
||||
#include "deprecated/clutter-behaviour.h"
|
||||
#include "deprecated/clutter-behaviour-depth.h"
|
||||
#include "deprecated/clutter-behaviour-ellipse.h"
|
||||
#include "deprecated/clutter-behaviour-opacity.h"
|
||||
#include "deprecated/clutter-behaviour-path.h"
|
||||
#include "deprecated/clutter-behaviour-rotate.h"
|
||||
#include "deprecated/clutter-behaviour-scale.h"
|
||||
#include "deprecated/clutter-bin-layout.h"
|
||||
#include "deprecated/clutter-box.h"
|
||||
#include "deprecated/clutter-cairo-texture.h"
|
||||
#include "deprecated/clutter-container.h"
|
||||
#include "deprecated/clutter-frame-source.h"
|
||||
#include "deprecated/clutter-group.h"
|
||||
#include "deprecated/clutter-input-device.h"
|
||||
#include "deprecated/clutter-keysyms.h"
|
||||
#include "deprecated/clutter-list-model.h"
|
||||
#include "deprecated/clutter-main.h"
|
||||
#include "deprecated/clutter-model.h"
|
||||
#include "deprecated/clutter-rectangle.h"
|
||||
#include "deprecated/clutter-score.h"
|
||||
#include "deprecated/clutter-shader.h"
|
||||
#include "deprecated/clutter-stage-manager.h"
|
||||
#include "deprecated/clutter-stage.h"
|
||||
#include "deprecated/clutter-state.h"
|
||||
#include "deprecated/clutter-table-layout.h"
|
||||
#include "deprecated/clutter-texture.h"
|
||||
#include "deprecated/clutter-timeline.h"
|
||||
#include "deprecated/clutter-timeout-pool.h"
|
||||
#include "deprecated/clutter-util.h"
|
||||
|
||||
#undef __CLUTTER_DEPRECATED_H_INSIDE__
|
||||
|
||||
|
@@ -112,7 +112,8 @@ G_DEFINE_TYPE (ClutterDesaturateEffect,
|
||||
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||
|
||||
static gboolean
|
||||
clutter_desaturate_effect_pre_paint (ClutterEffect *effect)
|
||||
clutter_desaturate_effect_pre_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterDesaturateEffect *self = CLUTTER_DESATURATE_EFFECT (effect);
|
||||
ClutterEffectClass *parent_class;
|
||||
@@ -133,7 +134,7 @@ clutter_desaturate_effect_pre_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
parent_class = CLUTTER_EFFECT_CLASS (clutter_desaturate_effect_parent_class);
|
||||
if (parent_class->pre_paint (effect))
|
||||
if (parent_class->pre_paint (effect, paint_context))
|
||||
{
|
||||
ClutterOffscreenEffect *offscreen_effect =
|
||||
CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
@@ -152,10 +153,12 @@ clutter_desaturate_effect_pre_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_desaturate_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
clutter_desaturate_effect_paint_target (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterDesaturateEffect *self = CLUTTER_DESATURATE_EFFECT (effect);
|
||||
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
|
||||
CoglFramebuffer *framebuffer =
|
||||
clutter_paint_context_get_framebuffer (paint_context);
|
||||
ClutterActor *actor;
|
||||
CoglHandle texture;
|
||||
guint8 paint_opacity;
|
||||
@@ -297,9 +300,7 @@ clutter_desaturate_effect_init (ClutterDesaturateEffect *self)
|
||||
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
|
||||
cogl_object_unref (snippet);
|
||||
|
||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
|
||||
0, /* layer number */
|
||||
COGL_TEXTURE_TYPE_2D);
|
||||
cogl_pipeline_set_layer_null_texture (klass->base_pipeline, 0);
|
||||
}
|
||||
|
||||
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
|
||||
|
@@ -69,6 +69,23 @@ typedef struct _ClutterTouchInfo
|
||||
gfloat current_y;
|
||||
} ClutterTouchInfo;
|
||||
|
||||
typedef struct _ClutterPtrA11yData
|
||||
{
|
||||
int n_btn_pressed;
|
||||
float current_x;
|
||||
float current_y;
|
||||
|
||||
float dwell_x;
|
||||
float dwell_y;
|
||||
gboolean dwell_drag_started;
|
||||
gboolean dwell_gesture_started;
|
||||
guint dwell_timer;
|
||||
guint dwell_position_timer;
|
||||
|
||||
guint secondary_click_timer;
|
||||
gboolean secondary_click_triggered;
|
||||
} ClutterPtrA11yData;
|
||||
|
||||
struct _ClutterInputDevice
|
||||
{
|
||||
GObject parent_instance;
|
||||
@@ -143,6 +160,10 @@ struct _ClutterInputDevice
|
||||
|
||||
guint has_cursor : 1;
|
||||
guint is_enabled : 1;
|
||||
|
||||
/* Accessiblity */
|
||||
ClutterVirtualInputDevice *accessibility_virtual_device;
|
||||
ClutterPtrA11yData *ptr_a11y_data;
|
||||
};
|
||||
|
||||
typedef void (*ClutterEmitInputDeviceEvent) (ClutterEvent *event,
|
||||
@@ -167,44 +188,21 @@ struct _ClutterInputDeviceClass
|
||||
gboolean (* is_grouped) (ClutterInputDevice *device,
|
||||
ClutterInputDevice *other_device);
|
||||
|
||||
gboolean (* get_physical_size) (ClutterInputDevice *device,
|
||||
gdouble *width,
|
||||
gdouble *height);
|
||||
|
||||
/* Keyboard accessbility */
|
||||
void (* process_kbd_a11y_event) (ClutterEvent *event,
|
||||
ClutterInputDevice *device,
|
||||
ClutterEmitInputDeviceEvent emit_event_func);
|
||||
};
|
||||
|
||||
/* Platform-dependent interface */
|
||||
typedef struct _ClutterEventExtender ClutterEventExtender;
|
||||
typedef struct _ClutterEventExtenderInterface ClutterEventExtenderInterface;
|
||||
|
||||
#define CLUTTER_TYPE_EVENT_EXTENDER (clutter_event_extender_get_type ())
|
||||
#define CLUTTER_EVENT_EXTENDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CLUTTER_TYPE_EVENT_EXTENDER, ClutterEventExtender))
|
||||
#define CLUTTER_IS_EVENT_EXTENDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CLUTTER_TYPE_EVENT_EXTENDER))
|
||||
#define CLUTTER_EVENT_EXTENDER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), CLUTTER_TYPE_EVENT_EXTENDER, ClutterEventExtenderInterface))
|
||||
|
||||
struct _ClutterEventExtenderInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
void (* copy_event_data) (ClutterEventExtender *event_extender,
|
||||
const ClutterEvent *src,
|
||||
ClutterEvent *dest);
|
||||
void (* free_event_data) (ClutterEventExtender *event_extender,
|
||||
ClutterEvent *event);
|
||||
};
|
||||
|
||||
GType clutter_event_extender_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* device manager */
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_device_manager_add_device (ClutterDeviceManager *device_manager,
|
||||
ClutterInputDevice *device);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_device_manager_remove_device (ClutterDeviceManager *device_manager,
|
||||
ClutterInputDevice *device);
|
||||
void _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_device_manager_select_stage_events (ClutterDeviceManager *device_manager,
|
||||
ClutterStage *stage);
|
||||
ClutterBackend *_clutter_device_manager_get_backend (ClutterDeviceManager *device_manager);
|
||||
@@ -212,25 +210,35 @@ ClutterBackend *_clutter_device_manager_get_backend (ClutterDeviceMa
|
||||
void _clutter_device_manager_compress_motion (ClutterDeviceManager *device_manger,
|
||||
ClutterEvent *event,
|
||||
const ClutterEvent *to_discard);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_device_manager_ensure_a11y_state (ClutterDeviceManager *device_manager);
|
||||
|
||||
/* input device */
|
||||
CLUTTER_EXPORT
|
||||
gboolean _clutter_input_device_has_sequence (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_add_event_sequence (ClutterInputDevice *device,
|
||||
ClutterEvent *event);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_remove_event_sequence (ClutterInputDevice *device,
|
||||
ClutterEvent *event);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_set_coords (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
gfloat x,
|
||||
gfloat y,
|
||||
ClutterStage *stage);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_set_state (ClutterInputDevice *device,
|
||||
ClutterModifierType state);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_set_time (ClutterInputDevice *device,
|
||||
guint32 time_);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_set_stage (ClutterInputDevice *device,
|
||||
ClutterStage *stage);
|
||||
CLUTTER_EXPORT
|
||||
ClutterStage * _clutter_input_device_get_stage (ClutterInputDevice *device);
|
||||
void _clutter_input_device_set_actor (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
@@ -239,44 +247,57 @@ void _clutter_input_device_set_actor (ClutterInputDev
|
||||
ClutterActor * _clutter_input_device_update (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
gboolean emit_crossing);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_set_n_keys (ClutterInputDevice *device,
|
||||
guint n_keys);
|
||||
CLUTTER_EXPORT
|
||||
guint _clutter_input_device_add_axis (ClutterInputDevice *device,
|
||||
ClutterInputAxis axis,
|
||||
gdouble min_value,
|
||||
gdouble max_value,
|
||||
gdouble resolution);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_reset_axes (ClutterInputDevice *device);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_set_associated_device (ClutterInputDevice *device,
|
||||
ClutterInputDevice *associated);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_add_slave (ClutterInputDevice *master,
|
||||
ClutterInputDevice *slave);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_remove_slave (ClutterInputDevice *master,
|
||||
ClutterInputDevice *slave);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean _clutter_input_device_translate_axis (ClutterInputDevice *device,
|
||||
guint index_,
|
||||
gdouble value,
|
||||
gdouble *axis_value);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_add_scroll_info (ClutterInputDevice *device,
|
||||
guint index_,
|
||||
ClutterScrollDirection direction,
|
||||
gdouble increment);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_reset_scroll_info (ClutterInputDevice *device);
|
||||
CLUTTER_EXPORT
|
||||
gboolean _clutter_input_device_get_scroll_delta (ClutterInputDevice *device,
|
||||
guint index_,
|
||||
gdouble value,
|
||||
ClutterScrollDirection *direction_p,
|
||||
gdouble *delta_p);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterInputDeviceTool * clutter_input_device_lookup_tool (ClutterInputDevice *device,
|
||||
guint64 serial,
|
||||
ClutterInputDeviceToolType type);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_device_add_tool (ClutterInputDevice *device,
|
||||
ClutterInputDeviceTool *tool);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_device_update_from_tool (ClutterInputDevice *device,
|
||||
ClutterInputDeviceTool *tool);
|
||||
|
||||
|
@@ -47,6 +47,7 @@
|
||||
#include "clutter-stage-private.h"
|
||||
#include "clutter-virtual-input-device.h"
|
||||
#include "clutter-input-device-tool.h"
|
||||
#include "clutter-input-pointer-a11y-private.h"
|
||||
|
||||
struct _ClutterDeviceManagerPrivate
|
||||
{
|
||||
@@ -55,6 +56,8 @@ struct _ClutterDeviceManagerPrivate
|
||||
|
||||
/* Keyboard a11y */
|
||||
ClutterKbdA11ySettings kbd_a11y_settings;
|
||||
/* Pointer a11y */
|
||||
ClutterPointerA11ySettings pointer_a11y_settings;
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -75,6 +78,9 @@ enum
|
||||
TOOL_CHANGED,
|
||||
KBD_A11Y_MASK_CHANGED,
|
||||
KBD_A11Y_FLAGS_CHANGED,
|
||||
PTR_A11Y_DWELL_CLICK_TYPE_CHANGED,
|
||||
PTR_A11Y_TIMEOUT_STARTED,
|
||||
PTR_A11Y_TIMEOUT_STOPPED,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
@@ -85,22 +91,14 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (ClutterDeviceManager,
|
||||
clutter_device_manager,
|
||||
G_TYPE_OBJECT)
|
||||
|
||||
G_DEFINE_INTERFACE (ClutterEventExtender,
|
||||
clutter_event_extender,
|
||||
CLUTTER_TYPE_DEVICE_MANAGER)
|
||||
|
||||
static void
|
||||
clutter_event_extender_default_init (ClutterEventExtenderInterface *iface)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_device_manager_set_property (GObject *gobject,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ClutterDeviceManagerPrivate *priv = CLUTTER_DEVICE_MANAGER (gobject)->priv;
|
||||
ClutterDeviceManager *self = CLUTTER_DEVICE_MANAGER (gobject);
|
||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (self);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
@@ -119,7 +117,8 @@ clutter_device_manager_get_property (GObject *gobject,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ClutterDeviceManagerPrivate *priv = CLUTTER_DEVICE_MANAGER (gobject)->priv;
|
||||
ClutterDeviceManager *self = CLUTTER_DEVICE_MANAGER (gobject);
|
||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (self);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
@@ -165,8 +164,7 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_INPUT_DEVICE);
|
||||
|
||||
@@ -185,8 +183,7 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_INPUT_DEVICE);
|
||||
|
||||
@@ -239,12 +236,74 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_UINT,
|
||||
G_TYPE_UINT);
|
||||
|
||||
/**
|
||||
* ClutterDeviceManager::ptr-a11y-dwell-click-type-changed:
|
||||
* @manager: the #ClutterDeviceManager that emitted the signal
|
||||
* @click_type: the new #ClutterPointerA11yDwellClickType mode
|
||||
*
|
||||
* The ::ptr-a11y-dwell-click-type-changed signal is emitted each time
|
||||
* the ClutterPointerA11yDwellClickType mode is changed as the result
|
||||
* of pointer accessibility operations.
|
||||
*/
|
||||
manager_signals[PTR_A11Y_DWELL_CLICK_TYPE_CHANGED] =
|
||||
g_signal_new (I_("ptr-a11y-dwell-click-type-changed"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__FLAGS,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_POINTER_A11Y_DWELL_CLICK_TYPE);
|
||||
|
||||
/**
|
||||
* ClutterDeviceManager::ptr-a11y-timeout-started:
|
||||
* @manager: the #ClutterDeviceManager that emitted the signal
|
||||
* @device: the core pointer #ClutterInputDevice
|
||||
* @timeout_type: the type of timeout #ClutterPointerA11yTimeoutType
|
||||
* @delay: the delay in ms before secondary-click is triggered.
|
||||
*
|
||||
* The ::ptr-a11y-timeout-started signal is emitted when a
|
||||
* pointer accessibility timeout delay is started, so that upper
|
||||
* layers can notify the user with some visual feedback.
|
||||
*/
|
||||
manager_signals[PTR_A11Y_TIMEOUT_STARTED] =
|
||||
g_signal_new (I_("ptr-a11y-timeout-started"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT_FLAGS_UINT,
|
||||
G_TYPE_NONE, 3,
|
||||
CLUTTER_TYPE_INPUT_DEVICE,
|
||||
CLUTTER_TYPE_POINTER_A11Y_TIMEOUT_TYPE,
|
||||
G_TYPE_UINT);
|
||||
|
||||
/**
|
||||
* ClutterDeviceManager::ptr-a11y-timeout-stopped:
|
||||
* @manager: the #ClutterDeviceManager that emitted the signal
|
||||
* @device: the core pointer #ClutterInputDevice
|
||||
* @timeout_type: the type of timeout #ClutterPointerA11yTimeoutType
|
||||
* @clicked: %TRUE if the timeout finished and triggered a click
|
||||
*
|
||||
* The ::ptr-a11y-timeout-stopped signal is emitted when a running
|
||||
* pointer accessibility timeout delay is stopped, either because
|
||||
* it's triggered at the end of the delay or cancelled, so that
|
||||
* upper layers can notify the user with some visual feedback.
|
||||
*/
|
||||
manager_signals[PTR_A11Y_TIMEOUT_STOPPED] =
|
||||
g_signal_new (I_("ptr-a11y-timeout-stopped"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT_FLAGS_BOOLEAN,
|
||||
G_TYPE_NONE, 3,
|
||||
CLUTTER_TYPE_INPUT_DEVICE,
|
||||
CLUTTER_TYPE_POINTER_A11Y_TIMEOUT_TYPE,
|
||||
G_TYPE_BOOLEAN);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_device_manager_init (ClutterDeviceManager *self)
|
||||
{
|
||||
self->priv = clutter_device_manager_get_instance_private (self);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,7 +322,7 @@ clutter_device_manager_get_default (void)
|
||||
{
|
||||
ClutterBackend *backend = clutter_get_default_backend ();
|
||||
|
||||
return backend->device_manager;
|
||||
return CLUTTER_BACKEND_GET_CLASS (backend)->get_device_manager (backend);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -487,9 +546,11 @@ _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager)
|
||||
ClutterBackend *
|
||||
_clutter_device_manager_get_backend (ClutterDeviceManager *manager)
|
||||
{
|
||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (manager);
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_DEVICE_MANAGER (manager), NULL);
|
||||
|
||||
return manager->priv->backend;
|
||||
return priv->backend;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -546,17 +607,25 @@ _clutter_device_manager_compress_motion (ClutterDeviceManager *device_manager,
|
||||
manager_class->compress_motion (device_manager, event, to_discard);
|
||||
}
|
||||
|
||||
void
|
||||
clutter_device_manager_ensure_a11y_state (ClutterDeviceManager *device_manager)
|
||||
{
|
||||
ClutterInputDevice *core_pointer;
|
||||
|
||||
core_pointer = clutter_device_manager_get_core_device (device_manager,
|
||||
CLUTTER_POINTER_DEVICE);
|
||||
if (core_pointer)
|
||||
{
|
||||
if (_clutter_is_input_pointer_a11y_enabled (core_pointer))
|
||||
_clutter_input_pointer_a11y_add_device (core_pointer);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
are_kbd_a11y_settings_equal (ClutterKbdA11ySettings *a,
|
||||
ClutterKbdA11ySettings *b)
|
||||
{
|
||||
return (a->controls == b->controls &&
|
||||
a->slowkeys_delay == b->slowkeys_delay &&
|
||||
a->debounce_delay == b->debounce_delay &&
|
||||
a->timeout_delay == b->timeout_delay &&
|
||||
a->mousekeys_init_delay == b->mousekeys_init_delay &&
|
||||
a->mousekeys_max_speed == b->mousekeys_max_speed &&
|
||||
a->mousekeys_accel_time == b->mousekeys_accel_time);
|
||||
return (memcmp (a, b, sizeof (ClutterKbdA11ySettings)) == 0);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -564,13 +633,14 @@ clutter_device_manager_set_kbd_a11y_settings (ClutterDeviceManager *device_man
|
||||
ClutterKbdA11ySettings *settings)
|
||||
{
|
||||
ClutterDeviceManagerClass *manager_class;
|
||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (device_manager);
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
||||
|
||||
if (are_kbd_a11y_settings_equal (&device_manager->priv->kbd_a11y_settings, settings))
|
||||
if (are_kbd_a11y_settings_equal (&priv->kbd_a11y_settings, settings))
|
||||
return;
|
||||
|
||||
device_manager->priv->kbd_a11y_settings = *settings;
|
||||
priv->kbd_a11y_settings = *settings;
|
||||
|
||||
manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
|
||||
if (manager_class->apply_kbd_a11y_settings)
|
||||
@@ -581,7 +651,103 @@ void
|
||||
clutter_device_manager_get_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
||||
ClutterKbdA11ySettings *settings)
|
||||
{
|
||||
ClutterDeviceManagerPrivate *priv = clutter_device_manager_get_instance_private (device_manager);
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
||||
|
||||
*settings = device_manager->priv->kbd_a11y_settings;
|
||||
*settings = priv->kbd_a11y_settings;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
are_pointer_a11y_settings_equal (ClutterPointerA11ySettings *a,
|
||||
ClutterPointerA11ySettings *b)
|
||||
{
|
||||
return (memcmp (a, b, sizeof (ClutterPointerA11ySettings)) == 0);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_device_manager_enable_pointer_a11y (ClutterDeviceManager *device_manager)
|
||||
{
|
||||
ClutterInputDevice *core_pointer;
|
||||
|
||||
core_pointer = clutter_device_manager_get_core_device (device_manager,
|
||||
CLUTTER_POINTER_DEVICE);
|
||||
|
||||
_clutter_input_pointer_a11y_add_device (core_pointer);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_device_manager_disable_pointer_a11y (ClutterDeviceManager *device_manager)
|
||||
{
|
||||
ClutterInputDevice *core_pointer;
|
||||
|
||||
core_pointer = clutter_device_manager_get_core_device (device_manager,
|
||||
CLUTTER_POINTER_DEVICE);
|
||||
|
||||
_clutter_input_pointer_a11y_remove_device (core_pointer);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_device_manager_set_pointer_a11y_settings:
|
||||
* @device_manager: a #ClutterDeviceManager
|
||||
* @settings: a pointer to a #ClutterPointerA11ySettings
|
||||
*
|
||||
* Sets the pointer accessibility settings
|
||||
**/
|
||||
void
|
||||
clutter_device_manager_set_pointer_a11y_settings (ClutterDeviceManager *device_manager,
|
||||
ClutterPointerA11ySettings *settings)
|
||||
{
|
||||
ClutterDeviceManagerPrivate *priv =
|
||||
clutter_device_manager_get_instance_private (device_manager);
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
||||
|
||||
if (are_pointer_a11y_settings_equal (&priv->pointer_a11y_settings, settings))
|
||||
return;
|
||||
|
||||
if (priv->pointer_a11y_settings.controls == 0 && settings->controls != 0)
|
||||
clutter_device_manager_enable_pointer_a11y (device_manager);
|
||||
else if (priv->pointer_a11y_settings.controls != 0 && settings->controls == 0)
|
||||
clutter_device_manager_disable_pointer_a11y (device_manager);
|
||||
|
||||
priv->pointer_a11y_settings = *settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_device_manager_get_pointer_a11y_settings:
|
||||
* @device_manager: a #ClutterDeviceManager
|
||||
* @settings: a pointer to a #ClutterPointerA11ySettings
|
||||
*
|
||||
* Gets the current pointer accessibility settings
|
||||
**/
|
||||
void
|
||||
clutter_device_manager_get_pointer_a11y_settings (ClutterDeviceManager *device_manager,
|
||||
ClutterPointerA11ySettings *settings)
|
||||
{
|
||||
ClutterDeviceManagerPrivate *priv =
|
||||
clutter_device_manager_get_instance_private (device_manager);
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
||||
|
||||
*settings = priv->pointer_a11y_settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_device_manager_set_pointer_a11y_dwell_click_type:
|
||||
* @device_manager: a #ClutterDeviceManager
|
||||
* @click_type: type of click as #ClutterPointerA11yDwellClickType
|
||||
*
|
||||
* Sets the dwell click type
|
||||
**/
|
||||
void
|
||||
clutter_device_manager_set_pointer_a11y_dwell_click_type (ClutterDeviceManager *device_manager,
|
||||
ClutterPointerA11yDwellClickType click_type)
|
||||
{
|
||||
ClutterDeviceManagerPrivate *priv =
|
||||
clutter_device_manager_get_instance_private (device_manager);
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager));
|
||||
|
||||
priv->pointer_a11y_settings.dwell_click_type = click_type;
|
||||
}
|
||||
|
@@ -33,16 +33,12 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_DEVICE_MANAGER (clutter_device_manager_get_type ())
|
||||
#define CLUTTER_DEVICE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManager))
|
||||
#define CLUTTER_IS_DEVICE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_DEVICE_MANAGER))
|
||||
#define CLUTTER_DEVICE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManagerClass))
|
||||
#define CLUTTER_IS_DEVICE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_DEVICE_MANAGER))
|
||||
#define CLUTTER_DEVICE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManagerClass))
|
||||
#define CLUTTER_TYPE_DEVICE_MANAGER (clutter_device_manager_get_type ())
|
||||
CLUTTER_EXPORT
|
||||
G_DECLARE_DERIVABLE_TYPE (ClutterDeviceManager, clutter_device_manager,
|
||||
CLUTTER, DEVICE_MANAGER, GObject)
|
||||
|
||||
typedef struct _ClutterDeviceManager ClutterDeviceManager;
|
||||
typedef struct _ClutterDeviceManagerPrivate ClutterDeviceManagerPrivate;
|
||||
typedef struct _ClutterDeviceManagerClass ClutterDeviceManagerClass;
|
||||
|
||||
/**
|
||||
* ClutterVirtualDeviceType:
|
||||
@@ -74,19 +70,25 @@ typedef struct _ClutterKbdA11ySettings
|
||||
} ClutterKbdA11ySettings;
|
||||
|
||||
/**
|
||||
* ClutterDeviceManager:
|
||||
* ClutterPointerA11ySettings:
|
||||
*
|
||||
* The #ClutterDeviceManager structure contains only private data
|
||||
* The #ClutterPointerA11ySettings structure contains pointer accessibility
|
||||
* settings
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
struct _ClutterDeviceManager
|
||||
typedef struct _ClutterPointerA11ySettings
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
|
||||
ClutterDeviceManagerPrivate *priv;
|
||||
};
|
||||
ClutterPointerA11yFlags controls;
|
||||
ClutterPointerA11yDwellClickType dwell_click_type;
|
||||
ClutterPointerA11yDwellMode dwell_mode;
|
||||
ClutterPointerA11yDwellDirection dwell_gesture_single;
|
||||
ClutterPointerA11yDwellDirection dwell_gesture_double;
|
||||
ClutterPointerA11yDwellDirection dwell_gesture_drag;
|
||||
ClutterPointerA11yDwellDirection dwell_gesture_secondary;
|
||||
gint secondary_click_delay;
|
||||
gint dwell_delay;
|
||||
gint dwell_threshold;
|
||||
} ClutterPointerA11ySettings;
|
||||
|
||||
/**
|
||||
* ClutterDeviceManagerClass:
|
||||
@@ -121,12 +123,17 @@ struct _ClutterDeviceManagerClass
|
||||
/* Keyboard accessbility */
|
||||
void (* apply_kbd_a11y_settings) (ClutterDeviceManager *device_manger,
|
||||
ClutterKbdA11ySettings *settings);
|
||||
/* padding */
|
||||
gpointer _padding[6];
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType clutter_device_manager_get_type (void) G_GNUC_CONST;
|
||||
/* Event platform data */
|
||||
void (* copy_event_data) (ClutterDeviceManager *device_manager,
|
||||
const ClutterEvent *src,
|
||||
ClutterEvent *dest);
|
||||
void (* free_event_data) (ClutterDeviceManager *device_manager,
|
||||
ClutterEvent *event);
|
||||
|
||||
/* padding */
|
||||
gpointer _padding[4];
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterDeviceManager *clutter_device_manager_get_default (void);
|
||||
@@ -152,10 +159,23 @@ ClutterVirtualDeviceType clutter_device_manager_get_supported_virtual_device_typ
|
||||
CLUTTER_EXPORT
|
||||
void clutter_device_manager_set_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
||||
ClutterKbdA11ySettings *settings);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_device_manager_get_kbd_a11y_settings (ClutterDeviceManager *device_manager,
|
||||
ClutterKbdA11ySettings *settings);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_device_manager_set_pointer_a11y_settings (ClutterDeviceManager *device_manager,
|
||||
ClutterPointerA11ySettings *settings);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_device_manager_get_pointer_a11y_settings (ClutterDeviceManager *device_manager,
|
||||
ClutterPointerA11ySettings *settings);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_device_manager_set_pointer_a11y_dwell_click_type (ClutterDeviceManager *device_manager,
|
||||
ClutterPointerA11yDwellClickType click_type);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_DEVICE_MANAGER_H__ */
|
||||
|
@@ -81,7 +81,7 @@ struct _ClutterDragActionPrivate
|
||||
gint y_drag_threshold;
|
||||
ClutterActor *drag_handle;
|
||||
ClutterDragAxis drag_axis;
|
||||
ClutterRect drag_area;
|
||||
graphene_rect_t drag_area;
|
||||
|
||||
ClutterInputDevice *device;
|
||||
ClutterEventSequence *sequence;
|
||||
@@ -315,11 +315,7 @@ emit_drag_end (ClutterDragAction *action,
|
||||
goto out;
|
||||
|
||||
/* disconnect the capture */
|
||||
if (priv->capture_id != 0)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
priv->capture_id = 0;
|
||||
}
|
||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
||||
|
||||
clutter_stage_set_motion_events_enabled (priv->stage,
|
||||
priv->motion_events_enabled);
|
||||
@@ -478,8 +474,8 @@ clutter_drag_action_set_actor (ClutterActorMeta *meta,
|
||||
old_actor = clutter_actor_meta_get_actor (meta);
|
||||
if (old_actor != NULL)
|
||||
{
|
||||
g_signal_handler_disconnect (old_actor, priv->button_press_id);
|
||||
g_signal_handler_disconnect (old_actor, priv->touch_begin_id);
|
||||
g_clear_signal_handler (&priv->button_press_id, old_actor);
|
||||
g_clear_signal_handler (&priv->touch_begin_id, old_actor);
|
||||
}
|
||||
|
||||
priv->button_press_id = 0;
|
||||
@@ -489,7 +485,7 @@ clutter_drag_action_set_actor (ClutterActorMeta *meta,
|
||||
if (priv->capture_id != 0)
|
||||
{
|
||||
if (priv->stage != NULL)
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
||||
|
||||
priv->capture_id = 0;
|
||||
priv->stage = NULL;
|
||||
@@ -542,7 +538,7 @@ clutter_drag_action_real_drag_motion (ClutterDragAction *action,
|
||||
|
||||
if (action->priv->drag_area_set)
|
||||
{
|
||||
ClutterRect *drag_area = &action->priv->drag_area;
|
||||
graphene_rect_t *drag_area = &action->priv->drag_area;
|
||||
|
||||
x = CLAMP (x, drag_area->origin.x, drag_area->origin.x + drag_area->size.width);
|
||||
y = CLAMP (y, drag_area->origin.y, drag_area->origin.y + drag_area->size.height);
|
||||
@@ -668,7 +664,7 @@ clutter_drag_action_dispose (GObject *gobject)
|
||||
priv->motion_events_enabled);
|
||||
|
||||
if (priv->stage != NULL)
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
g_clear_signal_handler (&priv->capture_id, priv->stage);
|
||||
|
||||
priv->capture_id = 0;
|
||||
priv->stage = NULL;
|
||||
@@ -681,8 +677,8 @@ clutter_drag_action_dispose (GObject *gobject)
|
||||
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (gobject));
|
||||
if (actor != NULL)
|
||||
{
|
||||
g_signal_handler_disconnect (actor, priv->button_press_id);
|
||||
g_signal_handler_disconnect (actor, priv->touch_begin_id);
|
||||
g_clear_signal_handler (&priv->button_press_id, actor);
|
||||
g_clear_signal_handler (&priv->touch_begin_id, actor);
|
||||
}
|
||||
|
||||
priv->button_press_id = 0;
|
||||
@@ -811,7 +807,7 @@ clutter_drag_action_class_init (ClutterDragActionClass *klass)
|
||||
g_param_spec_boxed ("drag-area",
|
||||
P_("Drag Area"),
|
||||
P_("Constrains the dragging to a rectangle"),
|
||||
CLUTTER_TYPE_RECT,
|
||||
GRAPHENE_TYPE_RECT,
|
||||
CLUTTER_PARAM_READWRITE);
|
||||
|
||||
/**
|
||||
@@ -1267,10 +1263,10 @@ clutter_drag_action_get_motion_coords (ClutterDragAction *action,
|
||||
/**
|
||||
* clutter_drag_action_get_drag_area:
|
||||
* @action: a #ClutterDragAction
|
||||
* @drag_area: (out caller-allocates): a #ClutterRect to be filled
|
||||
* @drag_area: (out caller-allocates): a #graphene_rect_t to be filled
|
||||
*
|
||||
* Retrieves the "drag area" associated with @action, that
|
||||
* is a #ClutterRect that constrains the actor movements,
|
||||
* is a #graphene_rect_t that constrains the actor movements,
|
||||
* in parents coordinates.
|
||||
*
|
||||
* Returns: %TRUE if the actor is actually constrained (and thus
|
||||
@@ -1278,7 +1274,7 @@ clutter_drag_action_get_motion_coords (ClutterDragAction *action,
|
||||
*/
|
||||
gboolean
|
||||
clutter_drag_action_get_drag_area (ClutterDragAction *action,
|
||||
ClutterRect *drag_area)
|
||||
graphene_rect_t *drag_area)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_DRAG_ACTION (action), FALSE);
|
||||
|
||||
@@ -1298,8 +1294,8 @@ clutter_drag_action_get_drag_area (ClutterDragAction *action,
|
||||
* If @drag_area is %NULL, the actor is not constrained.
|
||||
*/
|
||||
void
|
||||
clutter_drag_action_set_drag_area (ClutterDragAction *action,
|
||||
const ClutterRect *drag_area)
|
||||
clutter_drag_action_set_drag_area (ClutterDragAction *action,
|
||||
const graphene_rect_t *drag_area)
|
||||
{
|
||||
ClutterDragActionPrivate *priv;
|
||||
|
||||
|
@@ -141,11 +141,11 @@ void clutter_drag_action_get_motion_coords (ClutterDragAction *actio
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_drag_action_get_drag_area (ClutterDragAction *action,
|
||||
ClutterRect *drag_area);
|
||||
graphene_rect_t *drag_area);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_drag_action_set_drag_area (ClutterDragAction *action,
|
||||
const ClutterRect *drag_area);
|
||||
void clutter_drag_action_set_drag_area (ClutterDragAction *action,
|
||||
const graphene_rect_t *drag_area);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -107,7 +107,7 @@ drop_target_free (gpointer _data)
|
||||
{
|
||||
DropTarget *data = _data;
|
||||
|
||||
g_signal_handler_disconnect (data->stage, data->capture_id);
|
||||
g_clear_signal_handler (&data->capture_id, data->stage);
|
||||
g_hash_table_destroy (data->actions);
|
||||
g_free (data);
|
||||
}
|
||||
@@ -326,12 +326,10 @@ clutter_drop_action_set_actor (ClutterActorMeta *meta,
|
||||
{
|
||||
drop_action_unregister (CLUTTER_DROP_ACTION (meta));
|
||||
|
||||
if (priv->mapped_id != 0)
|
||||
g_signal_handler_disconnect (priv->actor, priv->mapped_id);
|
||||
g_clear_signal_handler (&priv->mapped_id, priv->actor);
|
||||
|
||||
priv->stage = NULL;
|
||||
priv->actor = NULL;
|
||||
priv->mapped_id = 0;
|
||||
}
|
||||
|
||||
priv->actor = actor;
|
||||
@@ -428,8 +426,7 @@ clutter_drop_action_class_init (ClutterDropActionClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterDropActionClass, over_in),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
|
||||
@@ -448,8 +445,7 @@ clutter_drop_action_class_init (ClutterDropActionClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterDropActionClass, over_out),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
|
||||
|
@@ -5,15 +5,18 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
|
||||
void _clutter_effect_post_paint (ClutterEffect *effect);
|
||||
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
gboolean _clutter_effect_pre_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context);
|
||||
void _clutter_effect_post_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context);
|
||||
gboolean _clutter_effect_modify_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
||||
void _clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void _clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
ClutterPickContext *pick_context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -100,13 +100,13 @@
|
||||
* // Clear the previous state //
|
||||
* if (self->rect_1)
|
||||
* {
|
||||
* cogl_handle_unref (self->rect_1);
|
||||
* cogl_object_unref (self->rect_1);
|
||||
* self->rect_1 = NULL;
|
||||
* }
|
||||
*
|
||||
* if (self->rect_2)
|
||||
* {
|
||||
* cogl_handle_unref (self->rect_2);
|
||||
* cogl_object_unref (self->rect_2);
|
||||
* self->rect_2 = NULL;
|
||||
* }
|
||||
*
|
||||
@@ -177,25 +177,28 @@ G_DEFINE_ABSTRACT_TYPE (ClutterEffect,
|
||||
CLUTTER_TYPE_ACTOR_META);
|
||||
|
||||
static gboolean
|
||||
clutter_effect_real_pre_paint (ClutterEffect *effect)
|
||||
clutter_effect_real_pre_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_effect_real_post_paint (ClutterEffect *effect)
|
||||
clutter_effect_real_post_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_effect_real_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
clutter_effect_real_modify_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_effect_real_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
||||
@@ -206,24 +209,24 @@ clutter_effect_real_paint (ClutterEffect *effect,
|
||||
effects that haven't migrated to use the 'paint' virtual yet. This
|
||||
just calls the old pre and post virtuals before chaining on */
|
||||
|
||||
pre_paint_succeeded = _clutter_effect_pre_paint (effect);
|
||||
pre_paint_succeeded = _clutter_effect_pre_paint (effect, paint_context);
|
||||
|
||||
actor = clutter_actor_meta_get_actor (actor_meta);
|
||||
clutter_actor_continue_paint (actor);
|
||||
clutter_actor_continue_paint (actor, paint_context);
|
||||
|
||||
if (pre_paint_succeeded)
|
||||
_clutter_effect_post_paint (effect);
|
||||
_clutter_effect_post_paint (effect, paint_context);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_effect_real_pick (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
clutter_effect_real_pick (ClutterEffect *effect,
|
||||
ClutterPickContext *pick_context)
|
||||
{
|
||||
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
||||
ClutterActor *actor;
|
||||
|
||||
actor = clutter_actor_meta_get_actor (actor_meta);
|
||||
clutter_actor_continue_paint (actor);
|
||||
clutter_actor_continue_pick (actor, pick_context);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -252,7 +255,7 @@ clutter_effect_class_init (ClutterEffectClass *klass)
|
||||
|
||||
klass->pre_paint = clutter_effect_real_pre_paint;
|
||||
klass->post_paint = clutter_effect_real_post_paint;
|
||||
klass->get_paint_volume = clutter_effect_real_get_paint_volume;
|
||||
klass->modify_paint_volume = clutter_effect_real_modify_paint_volume;
|
||||
klass->paint = clutter_effect_real_paint;
|
||||
klass->pick = clutter_effect_real_pick;
|
||||
}
|
||||
@@ -263,47 +266,51 @@ clutter_effect_init (ClutterEffect *self)
|
||||
}
|
||||
|
||||
gboolean
|
||||
_clutter_effect_pre_paint (ClutterEffect *effect)
|
||||
_clutter_effect_pre_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||
|
||||
return CLUTTER_EFFECT_GET_CLASS (effect)->pre_paint (effect);
|
||||
return CLUTTER_EFFECT_GET_CLASS (effect)->pre_paint (effect, paint_context);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_effect_post_paint (ClutterEffect *effect)
|
||||
_clutter_effect_post_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||
|
||||
CLUTTER_EFFECT_GET_CLASS (effect)->post_paint (effect);
|
||||
CLUTTER_EFFECT_GET_CLASS (effect)->post_paint (effect, paint_context);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||
|
||||
CLUTTER_EFFECT_GET_CLASS (effect)->paint (effect, flags);
|
||||
CLUTTER_EFFECT_GET_CLASS (effect)->paint (effect, paint_context, flags);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
_clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterPickContext *pick_context)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||
|
||||
CLUTTER_EFFECT_GET_CLASS (effect)->pick (effect, flags);
|
||||
CLUTTER_EFFECT_GET_CLASS (effect)->pick (effect, pick_context);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
_clutter_effect_modify_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||
g_return_val_if_fail (volume != NULL, FALSE);
|
||||
|
||||
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume (effect, volume);
|
||||
return CLUTTER_EFFECT_GET_CLASS (effect)->modify_paint_volume (effect,
|
||||
volume);
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -311,7 +318,7 @@ _clutter_effect_has_custom_paint_volume (ClutterEffect *effect)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||
|
||||
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume != clutter_effect_real_get_paint_volume;
|
||||
return CLUTTER_EFFECT_GET_CLASS (effect)->modify_paint_volume != clutter_effect_real_modify_paint_volume;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,6 +30,8 @@
|
||||
#endif
|
||||
|
||||
#include <clutter/clutter-actor-meta.h>
|
||||
#include <clutter/clutter-paint-context.h>
|
||||
#include <clutter/clutter-pick-context.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -60,7 +62,7 @@ struct _ClutterEffect
|
||||
* ClutterEffectClass:
|
||||
* @pre_paint: virtual function
|
||||
* @post_paint: virtual function
|
||||
* @get_paint_volume: virtual function
|
||||
* @modify_paint_volume: virtual function
|
||||
* @paint: virtual function
|
||||
* @pick: virtual function
|
||||
*
|
||||
@@ -74,16 +76,19 @@ struct _ClutterEffectClass
|
||||
ClutterActorMetaClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
gboolean (* pre_paint) (ClutterEffect *effect);
|
||||
void (* post_paint) (ClutterEffect *effect);
|
||||
gboolean (* pre_paint) (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context);
|
||||
void (* post_paint) (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context);
|
||||
|
||||
gboolean (* get_paint_volume) (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
gboolean (* modify_paint_volume) (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
|
||||
void (* paint) (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void (* pick) (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void (* paint) (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void (* pick) (ClutterEffect *effect,
|
||||
ClutterPickContext *pick_context);
|
||||
|
||||
/*< private >*/
|
||||
void (* _clutter_effect4) (void);
|
||||
|
@@ -13,7 +13,7 @@ G_BEGIN_DECLS
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* enumerations from "@filename@" */
|
||||
/* enumerations from "@basename@" */
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
|
@@ -51,7 +51,8 @@ G_BEGIN_DECLS
|
||||
*
|
||||
* Deprecated: 1.22: Use the normalized #ClutterActor pivot point instead
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_GRAVITY >*/
|
||||
typedef enum /*< prefix=CLUTTER_GRAVITY >*/
|
||||
{
|
||||
CLUTTER_GRAVITY_NONE = 0,
|
||||
CLUTTER_GRAVITY_NORTH,
|
||||
CLUTTER_GRAVITY_NORTH_EAST,
|
||||
@@ -74,7 +75,8 @@ typedef enum { /*< prefix=CLUTTER_GRAVITY >*/
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER >*/
|
||||
typedef enum /*< prefix=CLUTTER >*/
|
||||
{
|
||||
CLUTTER_X_AXIS,
|
||||
CLUTTER_Y_AXIS,
|
||||
CLUTTER_Z_AXIS
|
||||
@@ -91,7 +93,8 @@ typedef enum { /*< prefix=CLUTTER >*/
|
||||
*
|
||||
* Deprecated: 1.22
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_ROTATE >*/
|
||||
typedef enum /*< prefix=CLUTTER_ROTATE >*/
|
||||
{
|
||||
CLUTTER_ROTATE_CW,
|
||||
CLUTTER_ROTATE_CCW
|
||||
} ClutterRotateDirection;
|
||||
@@ -107,7 +110,8 @@ typedef enum { /*< prefix=CLUTTER_ROTATE >*/
|
||||
*
|
||||
* Since: 0.8
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_REQUEST >*/
|
||||
typedef enum /*< prefix=CLUTTER_REQUEST >*/
|
||||
{
|
||||
CLUTTER_REQUEST_HEIGHT_FOR_WIDTH,
|
||||
CLUTTER_REQUEST_WIDTH_FOR_HEIGHT,
|
||||
CLUTTER_REQUEST_CONTENT_SIZE
|
||||
@@ -200,7 +204,8 @@ typedef enum { /*< prefix=CLUTTER_REQUEST >*/
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_CUSTOM_MODE = 0,
|
||||
|
||||
/* linear */
|
||||
@@ -272,23 +277,6 @@ typedef enum {
|
||||
CLUTTER_ANIMATION_LAST
|
||||
} ClutterAnimationMode;
|
||||
|
||||
/**
|
||||
* ClutterFontFlags:
|
||||
* @CLUTTER_FONT_MIPMAPPING: Set to use mipmaps for the glyph cache textures.
|
||||
* @CLUTTER_FONT_HINTING: Set to enable hinting on the glyphs.
|
||||
*
|
||||
* Runtime flags to change the font quality. To be used with
|
||||
* clutter_set_font_flags().
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.22: Use #cairo_font_options_t instead
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_FONT >*/
|
||||
CLUTTER_FONT_MIPMAPPING = (1 << 0),
|
||||
CLUTTER_FONT_HINTING = (1 << 1)
|
||||
} ClutterFontFlags;
|
||||
|
||||
/**
|
||||
* ClutterTextDirection:
|
||||
* @CLUTTER_TEXT_DIRECTION_DEFAULT: Use the default setting, as returned
|
||||
@@ -300,7 +288,8 @@ typedef enum { /*< prefix=CLUTTER_FONT >*/
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_TEXT_DIRECTION_DEFAULT,
|
||||
CLUTTER_TEXT_DIRECTION_LTR,
|
||||
CLUTTER_TEXT_DIRECTION_RTL
|
||||
@@ -315,7 +304,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_VERTEX_SHADER,
|
||||
CLUTTER_FRAGMENT_SHADER
|
||||
} ClutterShaderType;
|
||||
@@ -350,7 +340,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_SHIFT_MASK = 1 << 0,
|
||||
CLUTTER_LOCK_MASK = 1 << 1,
|
||||
CLUTTER_CONTROL_MASK = 1 << 2,
|
||||
@@ -416,7 +407,8 @@ typedef enum {
|
||||
* Keyboard accessibility features applied to a ClutterInputDevice keyboard.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_A11Y_KEYBOARD_ENABLED = 1 << 0,
|
||||
CLUTTER_A11Y_TIMEOUT_ENABLED = 1 << 1,
|
||||
CLUTTER_A11Y_MOUSE_KEYS_ENABLED = 1 << 2,
|
||||
@@ -433,6 +425,88 @@ typedef enum {
|
||||
CLUTTER_A11Y_FEATURE_STATE_CHANGE_BEEP = 1 << 13,
|
||||
} ClutterKeyboardA11yFlags;
|
||||
|
||||
/**
|
||||
* ClutterPointerA11yFlags:
|
||||
* @CLUTTER_A11Y_POINTER_ENABLED:
|
||||
* @CLUTTER_A11Y_SECONDARY_CLICK_ENABLED:
|
||||
* @CLUTTER_A11Y_DWELL_ENABLED:
|
||||
*
|
||||
* Pointer accessibility features applied to a ClutterInputDevice pointer.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
CLUTTER_A11Y_SECONDARY_CLICK_ENABLED = 1 << 0,
|
||||
CLUTTER_A11Y_DWELL_ENABLED = 1 << 1,
|
||||
} ClutterPointerA11yFlags;
|
||||
|
||||
/**
|
||||
* ClutterPointerA11yDwellClickType:
|
||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_NONE: Internal use only
|
||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY:
|
||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_SECONDARY:
|
||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_MIDDLE:
|
||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_DOUBLE:
|
||||
* @CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG:
|
||||
*
|
||||
* Dwell click types.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_NONE,
|
||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY,
|
||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_SECONDARY,
|
||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_MIDDLE,
|
||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_DOUBLE,
|
||||
CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG,
|
||||
} ClutterPointerA11yDwellClickType;
|
||||
|
||||
/**
|
||||
* ClutterPointerA11yDwellDirection:
|
||||
* @CLUTTER_A11Y_DWELL_DIRECTION_NONE:
|
||||
* @CLUTTER_A11Y_DWELL_DIRECTION_LEFT:
|
||||
* @CLUTTER_A11Y_DWELL_DIRECTION_RIGHT:
|
||||
* @CLUTTER_A11Y_DWELL_DIRECTION_UP:
|
||||
* @CLUTTER_A11Y_DWELL_DIRECTION_DOWN:
|
||||
*
|
||||
* Dwell gesture directions.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
CLUTTER_A11Y_DWELL_DIRECTION_NONE,
|
||||
CLUTTER_A11Y_DWELL_DIRECTION_LEFT,
|
||||
CLUTTER_A11Y_DWELL_DIRECTION_RIGHT,
|
||||
CLUTTER_A11Y_DWELL_DIRECTION_UP,
|
||||
CLUTTER_A11Y_DWELL_DIRECTION_DOWN,
|
||||
} ClutterPointerA11yDwellDirection;
|
||||
|
||||
/**
|
||||
* ClutterPointerA11yDwellMode:
|
||||
* @CLUTTER_A11Y_DWELL_MODE_WINDOW:
|
||||
* @CLUTTER_A11Y_DWELL_MODE_GESTURE:
|
||||
*
|
||||
* Dwell mode.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
CLUTTER_A11Y_DWELL_MODE_WINDOW,
|
||||
CLUTTER_A11Y_DWELL_MODE_GESTURE,
|
||||
} ClutterPointerA11yDwellMode;
|
||||
|
||||
/**
|
||||
* ClutterPointerA11yTimeoutType:
|
||||
* @CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK:
|
||||
* @CLUTTER_A11Y_TIMEOUT_TYPE_DWELL:
|
||||
* @CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE:
|
||||
*
|
||||
* Pointer accessibility timeout type.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE,
|
||||
} ClutterPointerA11yTimeoutType;
|
||||
|
||||
/**
|
||||
* ClutterActorFlags:
|
||||
* @CLUTTER_ACTOR_MAPPED: the actor will be painted (is visible, and inside
|
||||
@@ -448,7 +522,8 @@ typedef enum {
|
||||
*
|
||||
* Flags used to signal the state of an actor.
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_ACTOR >*/
|
||||
typedef enum /*< prefix=CLUTTER_ACTOR >*/
|
||||
{
|
||||
CLUTTER_ACTOR_MAPPED = 1 << 1,
|
||||
CLUTTER_ACTOR_REALIZED = 1 << 2,
|
||||
CLUTTER_ACTOR_REACTIVE = 1 << 3,
|
||||
@@ -468,7 +543,8 @@ typedef enum { /*< prefix=CLUTTER_ACTOR >*/
|
||||
*
|
||||
* Since: 1.8
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
|
||||
typedef enum /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
|
||||
{
|
||||
CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY = 1<<0,
|
||||
CLUTTER_OFFSCREEN_REDIRECT_ALWAYS = 1<<1
|
||||
} ClutterOffscreenRedirect;
|
||||
@@ -492,7 +568,8 @@ typedef enum { /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_ALLOCATION_NONE = 0,
|
||||
CLUTTER_ABSOLUTE_ORIGIN_CHANGED = 1 << 1,
|
||||
CLUTTER_DELEGATE_LAYOUT = 1 << 2
|
||||
@@ -509,7 +586,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_ALIGN >*/
|
||||
typedef enum /*< prefix=CLUTTER_ALIGN >*/
|
||||
{
|
||||
CLUTTER_ALIGN_X_AXIS,
|
||||
CLUTTER_ALIGN_Y_AXIS,
|
||||
CLUTTER_ALIGN_BOTH
|
||||
@@ -526,7 +604,8 @@ typedef enum { /*< prefix=CLUTTER_ALIGN >*/
|
||||
*
|
||||
* Deprecated: 1.22
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INTERPOLATION_LINEAR,
|
||||
CLUTTER_INTERPOLATION_CUBIC
|
||||
} ClutterInterpolation;
|
||||
@@ -551,7 +630,8 @@ typedef enum {
|
||||
* Deprecated: 1.12: Use #ClutterActorAlign and the #ClutterActor
|
||||
* API instead
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_BIN_ALIGNMENT_FIXED,
|
||||
CLUTTER_BIN_ALIGNMENT_FILL,
|
||||
CLUTTER_BIN_ALIGNMENT_START,
|
||||
@@ -576,7 +656,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_BIND >*/
|
||||
typedef enum /*< prefix=CLUTTER_BIND >*/
|
||||
{
|
||||
CLUTTER_BIND_X,
|
||||
CLUTTER_BIND_Y,
|
||||
CLUTTER_BIND_WIDTH,
|
||||
@@ -595,7 +676,8 @@ typedef enum { /*< prefix=CLUTTER_BIND >*/
|
||||
*
|
||||
* Flags passed to the ‘paint’ or ‘pick’ method of #ClutterEffect.
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_EFFECT_PAINT >*/
|
||||
typedef enum /*< prefix=CLUTTER_EFFECT_PAINT >*/
|
||||
{
|
||||
CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0)
|
||||
} ClutterEffectPaintFlags;
|
||||
|
||||
@@ -611,7 +693,8 @@ typedef enum { /*< prefix=CLUTTER_EFFECT_PAINT >*/
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_BOX_ALIGNMENT_START,
|
||||
CLUTTER_BOX_ALIGNMENT_END,
|
||||
CLUTTER_BOX_ALIGNMENT_CENTER
|
||||
@@ -628,7 +711,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.8
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_LONG_PRESS >*/
|
||||
typedef enum /*< prefix=CLUTTER_LONG_PRESS >*/
|
||||
{
|
||||
CLUTTER_LONG_PRESS_QUERY,
|
||||
CLUTTER_LONG_PRESS_ACTIVATE,
|
||||
CLUTTER_LONG_PRESS_CANCEL
|
||||
@@ -686,7 +770,8 @@ typedef enum { /*< prefix=CLUTTER_LONG_PRESS >*/
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_COLOR >*/
|
||||
typedef enum /*< prefix=CLUTTER_COLOR >*/
|
||||
{
|
||||
/* CGA/EGA-like palette */
|
||||
CLUTTER_COLOR_WHITE = 0,
|
||||
CLUTTER_COLOR_BLACK,
|
||||
@@ -750,7 +835,8 @@ typedef enum { /*< prefix=CLUTTER_COLOR >*/
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_DRAG >*/
|
||||
typedef enum /*< prefix=CLUTTER_DRAG >*/
|
||||
{
|
||||
CLUTTER_DRAG_AXIS_NONE = 0,
|
||||
|
||||
CLUTTER_DRAG_X_AXIS,
|
||||
@@ -767,7 +853,8 @@ typedef enum { /*< prefix=CLUTTER_DRAG >*/
|
||||
*
|
||||
* Since: 0.6
|
||||
*/
|
||||
typedef enum { /*< flags prefix=CLUTTER_EVENT >*/
|
||||
typedef enum /*< flags prefix=CLUTTER_EVENT >*/
|
||||
{
|
||||
CLUTTER_EVENT_NONE = 0,
|
||||
CLUTTER_EVENT_FLAG_SYNTHETIC = 1 << 0,
|
||||
CLUTTER_EVENT_FLAG_INPUT_METHOD = 1 << 1,
|
||||
@@ -812,7 +899,8 @@ typedef enum { /*< flags prefix=CLUTTER_EVENT >*/
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER >*/
|
||||
typedef enum /*< prefix=CLUTTER >*/
|
||||
{
|
||||
CLUTTER_NOTHING = 0,
|
||||
CLUTTER_KEY_PRESS,
|
||||
CLUTTER_KEY_RELEASE,
|
||||
@@ -857,7 +945,8 @@ typedef enum { /*< prefix=CLUTTER >*/
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_SCROLL >*/
|
||||
typedef enum /*< prefix=CLUTTER_SCROLL >*/
|
||||
{
|
||||
CLUTTER_SCROLL_UP,
|
||||
CLUTTER_SCROLL_DOWN,
|
||||
CLUTTER_SCROLL_LEFT,
|
||||
@@ -867,28 +956,21 @@ typedef enum { /*< prefix=CLUTTER_SCROLL >*/
|
||||
|
||||
/**
|
||||
* ClutterStageState:
|
||||
* @CLUTTER_STAGE_STATE_FULLSCREEN: Fullscreen mask
|
||||
* @CLUTTER_STAGE_STATE_OFFSCREEN: Offscreen mask (deprecated)
|
||||
* @CLUTTER_STAGE_STATE_ACTIVATED: Activated mask
|
||||
*
|
||||
* Stage state masks, used by the #ClutterEvent of type %CLUTTER_STAGE_STATE.
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
typedef enum {
|
||||
CLUTTER_STAGE_STATE_FULLSCREEN = (1 << 1),
|
||||
CLUTTER_STAGE_STATE_OFFSCREEN = (1 << 2),
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_STAGE_STATE_ACTIVATED = (1 << 3)
|
||||
} ClutterStageState;
|
||||
|
||||
/**
|
||||
* ClutterFeatureFlags:
|
||||
* @CLUTTER_FEATURE_TEXTURE_NPOT: Set if NPOTS textures supported.
|
||||
* @CLUTTER_FEATURE_SWAP_THROTTLE: Set if backend throttles buffer swaps.
|
||||
* @CLUTTER_FEATURE_TEXTURE_YUV: Set if YUV based textures supported.
|
||||
* @CLUTTER_FEATURE_TEXTURE_READ_PIXELS: Set if texture pixels can be read.
|
||||
* @CLUTTER_FEATURE_STAGE_STATIC: Set if stage size if fixed (i.e framebuffer)
|
||||
* @CLUTTER_FEATURE_STAGE_USER_RESIZE: Set if stage is able to be user resized.
|
||||
* @CLUTTER_FEATURE_STAGE_CURSOR: Set if stage has a graphical cursor.
|
||||
* @CLUTTER_FEATURE_SHADERS_GLSL: Set if the backend supports GLSL shaders.
|
||||
* @CLUTTER_FEATURE_OFFSCREEN: Set if the backend supports offscreen rendering.
|
||||
@@ -902,12 +984,8 @@ typedef enum {
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_FEATURE_TEXTURE_NPOT = (1 << 2),
|
||||
CLUTTER_FEATURE_SWAP_THROTTLE = (1 << 3),
|
||||
CLUTTER_FEATURE_TEXTURE_YUV = (1 << 4),
|
||||
CLUTTER_FEATURE_TEXTURE_READ_PIXELS = (1 << 5),
|
||||
CLUTTER_FEATURE_STAGE_STATIC = (1 << 6),
|
||||
CLUTTER_FEATURE_STAGE_USER_RESIZE = (1 << 7),
|
||||
CLUTTER_FEATURE_STAGE_CURSOR = (1 << 8),
|
||||
CLUTTER_FEATURE_SHADERS_GLSL = (1 << 9),
|
||||
CLUTTER_FEATURE_OFFSCREEN = (1 << 10),
|
||||
@@ -927,7 +1005,8 @@ typedef enum
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_FLOW >*/
|
||||
typedef enum /*< prefix=CLUTTER_FLOW >*/
|
||||
{
|
||||
CLUTTER_FLOW_HORIZONTAL,
|
||||
CLUTTER_FLOW_VERTICAL
|
||||
} ClutterFlowOrientation;
|
||||
@@ -954,7 +1033,8 @@ typedef enum { /*< prefix=CLUTTER_FLOW >*/
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_POINTER_DEVICE,
|
||||
CLUTTER_KEYBOARD_DEVICE,
|
||||
CLUTTER_EXTENSION_DEVICE,
|
||||
@@ -982,7 +1062,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INPUT_MODE_MASTER,
|
||||
CLUTTER_INPUT_MODE_SLAVE,
|
||||
CLUTTER_INPUT_MODE_FLOATING
|
||||
@@ -1007,7 +1088,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INPUT_AXIS_IGNORE,
|
||||
|
||||
CLUTTER_INPUT_AXIS_X,
|
||||
@@ -1034,7 +1116,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_SNAP_EDGE_TOP,
|
||||
CLUTTER_SNAP_EDGE_RIGHT,
|
||||
CLUTTER_SNAP_EDGE_BOTTOM,
|
||||
@@ -1051,7 +1134,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_PICK_NONE = 0,
|
||||
CLUTTER_PICK_REACTIVE,
|
||||
CLUTTER_PICK_ALL
|
||||
@@ -1068,7 +1152,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.8
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_SWIPE_DIRECTION >*/
|
||||
typedef enum /*< prefix=CLUTTER_SWIPE_DIRECTION >*/
|
||||
{
|
||||
CLUTTER_SWIPE_DIRECTION_UP = 1 << 0,
|
||||
CLUTTER_SWIPE_DIRECTION_DOWN = 1 << 1,
|
||||
CLUTTER_SWIPE_DIRECTION_LEFT = 1 << 2,
|
||||
@@ -1088,7 +1173,8 @@ typedef enum { /*< prefix=CLUTTER_SWIPE_DIRECTION >*/
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_PAN >*/
|
||||
typedef enum /*< prefix=CLUTTER_PAN >*/
|
||||
{
|
||||
CLUTTER_PAN_AXIS_NONE = 0,
|
||||
|
||||
CLUTTER_PAN_X_AXIS,
|
||||
@@ -1097,28 +1183,6 @@ typedef enum { /*< prefix=CLUTTER_PAN >*/
|
||||
CLUTTER_PAN_AXIS_AUTO
|
||||
} ClutterPanAxis;
|
||||
|
||||
|
||||
/**
|
||||
* ClutterTableAlignment:
|
||||
* @CLUTTER_TABLE_ALIGNMENT_START: Align the child to the top or to the
|
||||
* left of a cell in the table, depending on the axis
|
||||
* @CLUTTER_TABLE_ALIGNMENT_CENTER: Align the child to the center of
|
||||
* a cell in the table
|
||||
* @CLUTTER_TABLE_ALIGNMENT_END: Align the child to the bottom or to the
|
||||
* right of a cell in the table, depending on the axis
|
||||
*
|
||||
* The alignment policies available on each axis of the #ClutterTableLayout
|
||||
*
|
||||
* Since: 1.4
|
||||
*
|
||||
* Deprecated: 1.22: Use the alignment properties of #ClutterActor
|
||||
*/
|
||||
typedef enum {
|
||||
CLUTTER_TABLE_ALIGNMENT_START,
|
||||
CLUTTER_TABLE_ALIGNMENT_CENTER,
|
||||
CLUTTER_TABLE_ALIGNMENT_END
|
||||
} ClutterTableAlignment;
|
||||
|
||||
/**
|
||||
* ClutterTextureFlags:
|
||||
* @CLUTTER_TEXTURE_NONE: No flags
|
||||
@@ -1126,15 +1190,15 @@ typedef enum {
|
||||
* @CLUTTER_TEXTURE_RGB_FLAG_PREMULT: Unused flag
|
||||
* @CLUTTER_TEXTURE_YUV_FLAG_YUV2: Unused flag
|
||||
*
|
||||
* Flags for clutter_texture_set_from_rgb_data() and
|
||||
* clutter_texture_set_from_yuv_data().
|
||||
* Flags for clutter_texture_set_from_rgb_data().
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.22: The #ClutterTexture class was the only user of
|
||||
* this API
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_TEXTURE >*/
|
||||
typedef enum /*< prefix=CLUTTER_TEXTURE >*/
|
||||
{
|
||||
CLUTTER_TEXTURE_NONE = 0,
|
||||
CLUTTER_TEXTURE_RGB_FLAG_BGR = 1 << 1,
|
||||
CLUTTER_TEXTURE_RGB_FLAG_PREMULT = 1 << 2, /* FIXME: not handled */
|
||||
@@ -1158,7 +1222,8 @@ typedef enum { /*< prefix=CLUTTER_TEXTURE >*/
|
||||
* this API; use #ClutterImage and clutter_actor_set_content_scaling_filters()
|
||||
* instead.
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_TEXTURE_QUALITY >*/
|
||||
typedef enum /*< prefix=CLUTTER_TEXTURE_QUALITY >*/
|
||||
{
|
||||
CLUTTER_TEXTURE_QUALITY_LOW,
|
||||
CLUTTER_TEXTURE_QUALITY_MEDIUM,
|
||||
CLUTTER_TEXTURE_QUALITY_HIGH
|
||||
@@ -1173,7 +1238,8 @@ typedef enum { /*< prefix=CLUTTER_TEXTURE_QUALITY >*/
|
||||
*
|
||||
* Since: 0.6
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_TIMELINE_FORWARD,
|
||||
CLUTTER_TIMELINE_BACKWARD
|
||||
} ClutterTimelineDirection;
|
||||
@@ -1192,7 +1258,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_UNIT >*/
|
||||
typedef enum /*< prefix=CLUTTER_UNIT >*/
|
||||
{
|
||||
CLUTTER_UNIT_PIXEL,
|
||||
CLUTTER_UNIT_EM,
|
||||
CLUTTER_UNIT_MM,
|
||||
@@ -1222,7 +1289,8 @@ typedef enum { /*< prefix=CLUTTER_UNIT >*/
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_PATH_MOVE_TO = 0,
|
||||
CLUTTER_PATH_LINE_TO = 1,
|
||||
CLUTTER_PATH_CURVE_TO = 2,
|
||||
@@ -1253,7 +1321,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_ACTOR_ALIGN_FILL,
|
||||
CLUTTER_ACTOR_ALIGN_START,
|
||||
CLUTTER_ACTOR_ALIGN_CENTER,
|
||||
@@ -1273,7 +1342,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_REPAINT_FLAGS_PRE_PAINT = 1 << 0,
|
||||
CLUTTER_REPAINT_FLAGS_POST_PAINT = 1 << 1,
|
||||
CLUTTER_REPAINT_FLAGS_QUEUE_REDRAW_ON_ADD = 1 << 2
|
||||
@@ -1298,7 +1368,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_CONTENT_GRAVITY_TOP_LEFT,
|
||||
CLUTTER_CONTENT_GRAVITY_TOP,
|
||||
CLUTTER_CONTENT_GRAVITY_TOP_RIGHT,
|
||||
@@ -1328,7 +1399,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_SCALING_FILTER_LINEAR,
|
||||
CLUTTER_SCALING_FILTER_NEAREST,
|
||||
CLUTTER_SCALING_FILTER_TRILINEAR
|
||||
@@ -1343,7 +1415,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_ORIENTATION_HORIZONTAL,
|
||||
CLUTTER_ORIENTATION_VERTICAL
|
||||
} ClutterOrientation;
|
||||
@@ -1359,7 +1432,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_SCROLL >*/
|
||||
typedef enum /*< prefix=CLUTTER_SCROLL >*/
|
||||
{
|
||||
CLUTTER_SCROLL_NONE = 0,
|
||||
|
||||
CLUTTER_SCROLL_HORIZONTALLY = 1 << 0,
|
||||
@@ -1379,7 +1453,8 @@ typedef enum { /*< prefix=CLUTTER_SCROLL >*/
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_GRID_POSITION_LEFT,
|
||||
CLUTTER_GRID_POSITION_RIGHT,
|
||||
CLUTTER_GRID_POSITION_TOP,
|
||||
@@ -1397,7 +1472,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_REPEAT_NONE = 0,
|
||||
CLUTTER_REPEAT_X_AXIS = 1 << 0,
|
||||
CLUTTER_REPEAT_Y_AXIS = 1 << 1,
|
||||
@@ -1419,7 +1495,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_STEP_MODE_START,
|
||||
CLUTTER_STEP_MODE_END
|
||||
} ClutterStepMode;
|
||||
@@ -1435,7 +1512,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
typedef enum { /*< prefix=CLUTTER_ZOOM >*/
|
||||
typedef enum /*< prefix=CLUTTER_ZOOM >*/
|
||||
{
|
||||
CLUTTER_ZOOM_X_AXIS,
|
||||
CLUTTER_ZOOM_Y_AXIS,
|
||||
CLUTTER_ZOOM_BOTH
|
||||
@@ -1458,7 +1536,8 @@ typedef enum { /*< prefix=CLUTTER_ZOOM >*/
|
||||
*
|
||||
* Since: 1.18
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_GESTURE_TRIGGER_EDGE_NONE = 0,
|
||||
CLUTTER_GESTURE_TRIGGER_EDGE_AFTER,
|
||||
CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE
|
||||
@@ -1494,7 +1573,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_TOUCHPAD_GESTURE_PHASE_BEGIN,
|
||||
CLUTTER_TOUCHPAD_GESTURE_PHASE_UPDATE,
|
||||
CLUTTER_TOUCHPAD_GESTURE_PHASE_END,
|
||||
@@ -1516,7 +1596,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_SCROLL_SOURCE_UNKNOWN,
|
||||
CLUTTER_SCROLL_SOURCE_WHEEL,
|
||||
CLUTTER_SCROLL_SOURCE_FINGER,
|
||||
@@ -1534,7 +1615,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_SCROLL_FINISHED_NONE = 0,
|
||||
CLUTTER_SCROLL_FINISHED_HORIZONTAL = 1 << 0,
|
||||
CLUTTER_SCROLL_FINISHED_VERTICAL = 1 << 1
|
||||
@@ -1555,7 +1637,8 @@ typedef enum {
|
||||
*
|
||||
* Since: 1.28
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INPUT_DEVICE_TOOL_NONE,
|
||||
CLUTTER_INPUT_DEVICE_TOOL_PEN,
|
||||
CLUTTER_INPUT_DEVICE_TOOL_ERASER,
|
||||
@@ -1566,17 +1649,20 @@ typedef enum {
|
||||
CLUTTER_INPUT_DEVICE_TOOL_LENS
|
||||
} ClutterInputDeviceToolType;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INPUT_DEVICE_PAD_SOURCE_UNKNOWN,
|
||||
CLUTTER_INPUT_DEVICE_PAD_SOURCE_FINGER,
|
||||
} ClutterInputDevicePadSource;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE,
|
||||
CLUTTER_INPUT_DEVICE_MAPPING_RELATIVE,
|
||||
} ClutterInputDeviceMapping;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INPUT_CONTENT_HINT_COMPLETION = 1 << 0,
|
||||
CLUTTER_INPUT_CONTENT_HINT_SPELLCHECK = 1 << 1,
|
||||
CLUTTER_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION = 1 << 2,
|
||||
@@ -1589,7 +1675,8 @@ typedef enum {
|
||||
CLUTTER_INPUT_CONTENT_HINT_MULTILINE = 1 << 9,
|
||||
} ClutterInputContentHintFlags;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INPUT_CONTENT_PURPOSE_NORMAL,
|
||||
CLUTTER_INPUT_CONTENT_PURPOSE_ALPHA,
|
||||
CLUTTER_INPUT_CONTENT_PURPOSE_DIGITS,
|
||||
@@ -1605,7 +1692,8 @@ typedef enum {
|
||||
CLUTTER_INPUT_CONTENT_PURPOSE_TERMINAL,
|
||||
} ClutterInputContentPurpose;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INPUT_PANEL_STATE_OFF,
|
||||
CLUTTER_INPUT_PANEL_STATE_ON,
|
||||
CLUTTER_INPUT_PANEL_STATE_TOGGLE,
|
||||
|
@@ -5,22 +5,28 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_event_set_pointer_emulated (ClutterEvent *event,
|
||||
gboolean is_emulated);
|
||||
|
||||
/* Reinjecting queued events for processing */
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_process_event (ClutterEvent *event);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean _clutter_event_process_filters (ClutterEvent *event);
|
||||
|
||||
/* clears the event queue inside the main context */
|
||||
void _clutter_clear_events_queue (void);
|
||||
void _clutter_clear_events_queue_for_stage (ClutterStage *stage);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_event_set_platform_data (ClutterEvent *event,
|
||||
gpointer data);
|
||||
CLUTTER_EXPORT
|
||||
gpointer _clutter_event_get_platform_data (const ClutterEvent *event);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_event_set_state_full (ClutterEvent *event,
|
||||
ClutterModifierType button_state,
|
||||
ClutterModifierType base_state,
|
||||
@@ -28,6 +34,7 @@ void _clutter_event_set_state_full (ClutterEvent *ev
|
||||
ClutterModifierType locked_state,
|
||||
ClutterModifierType effective_state);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_event_push (const ClutterEvent *event,
|
||||
gboolean do_copy);
|
||||
|
||||
|
@@ -1,38 +0,0 @@
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#include "clutter-event-translator.h"
|
||||
|
||||
#include "clutter-backend.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
#define clutter_event_translator_get_type _clutter_event_translator_get_type
|
||||
|
||||
typedef ClutterEventTranslatorIface ClutterEventTranslatorInterface;
|
||||
|
||||
G_DEFINE_INTERFACE (ClutterEventTranslator, clutter_event_translator, G_TYPE_OBJECT);
|
||||
|
||||
static ClutterTranslateReturn
|
||||
default_translate_event (ClutterEventTranslator *translator,
|
||||
gpointer native,
|
||||
ClutterEvent *event)
|
||||
{
|
||||
return CLUTTER_TRANSLATE_CONTINUE;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_event_translator_default_init (ClutterEventTranslatorIface *iface)
|
||||
{
|
||||
iface->translate_event = default_translate_event;
|
||||
}
|
||||
|
||||
ClutterTranslateReturn
|
||||
_clutter_event_translator_translate_event (ClutterEventTranslator *translator,
|
||||
gpointer native,
|
||||
ClutterEvent *translated)
|
||||
{
|
||||
ClutterEventTranslatorIface *iface;
|
||||
|
||||
iface = CLUTTER_EVENT_TRANSLATOR_GET_IFACE (translator);
|
||||
|
||||
return iface->translate_event (translator, native, translated);
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
#ifndef __CLUTTER_EVENT_TRANSLATOR_H__
|
||||
#define __CLUTTER_EVENT_TRANSLATOR_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <clutter/clutter-event.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_EVENT_TRANSLATOR (_clutter_event_translator_get_type ())
|
||||
#define CLUTTER_EVENT_TRANSLATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_EVENT_TRANSLATOR, ClutterEventTranslator))
|
||||
#define CLUTTER_IS_EVENT_TRANSLATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_EVENT_TRANSLATOR))
|
||||
#define CLUTTER_EVENT_TRANSLATOR_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_EVENT_TRANSLATOR, ClutterEventTranslatorIface))
|
||||
|
||||
typedef struct _ClutterEventTranslator ClutterEventTranslator;
|
||||
typedef struct _ClutterEventTranslatorIface ClutterEventTranslatorIface;
|
||||
|
||||
typedef enum {
|
||||
CLUTTER_TRANSLATE_CONTINUE,
|
||||
CLUTTER_TRANSLATE_REMOVE,
|
||||
CLUTTER_TRANSLATE_QUEUE
|
||||
} ClutterTranslateReturn;
|
||||
|
||||
struct _ClutterEventTranslatorIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
ClutterTranslateReturn (* translate_event) (ClutterEventTranslator *translator,
|
||||
gpointer native,
|
||||
ClutterEvent *translated);
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType _clutter_event_translator_get_type (void) G_GNUC_CONST;
|
||||
|
||||
ClutterTranslateReturn _clutter_event_translator_translate_event (ClutterEventTranslator *translator,
|
||||
gpointer native,
|
||||
ClutterEvent *translated);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_EVENT_TRANSLATOR_H__ */
|
@@ -370,7 +370,7 @@ clutter_event_get_coords (const ClutterEvent *event,
|
||||
gfloat *x,
|
||||
gfloat *y)
|
||||
{
|
||||
ClutterPoint coords;
|
||||
graphene_point_t coords;
|
||||
|
||||
g_return_if_fail (event != NULL);
|
||||
|
||||
@@ -386,15 +386,15 @@ clutter_event_get_coords (const ClutterEvent *event,
|
||||
/**
|
||||
* clutter_event_get_position:
|
||||
* @event: a #ClutterEvent
|
||||
* @position: a #ClutterPoint
|
||||
* @position: a #graphene_point_t
|
||||
*
|
||||
* Retrieves the event coordinates as a #ClutterPoint.
|
||||
* Retrieves the event coordinates as a #graphene_point_t.
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_event_get_position (const ClutterEvent *event,
|
||||
ClutterPoint *position)
|
||||
graphene_point_t *position)
|
||||
{
|
||||
g_return_if_fail (event != NULL);
|
||||
g_return_if_fail (position != NULL);
|
||||
@@ -415,42 +415,42 @@ clutter_event_get_position (const ClutterEvent *event,
|
||||
case CLUTTER_PAD_BUTTON_RELEASE:
|
||||
case CLUTTER_PAD_STRIP:
|
||||
case CLUTTER_PAD_RING:
|
||||
clutter_point_init (position, 0.f, 0.f);
|
||||
graphene_point_init (position, 0.f, 0.f);
|
||||
break;
|
||||
|
||||
case CLUTTER_ENTER:
|
||||
case CLUTTER_LEAVE:
|
||||
clutter_point_init (position, event->crossing.x, event->crossing.y);
|
||||
graphene_point_init (position, event->crossing.x, event->crossing.y);
|
||||
break;
|
||||
|
||||
case CLUTTER_BUTTON_PRESS:
|
||||
case CLUTTER_BUTTON_RELEASE:
|
||||
clutter_point_init (position, event->button.x, event->button.y);
|
||||
graphene_point_init (position, event->button.x, event->button.y);
|
||||
break;
|
||||
|
||||
case CLUTTER_MOTION:
|
||||
clutter_point_init (position, event->motion.x, event->motion.y);
|
||||
graphene_point_init (position, event->motion.x, event->motion.y);
|
||||
break;
|
||||
|
||||
case CLUTTER_TOUCH_BEGIN:
|
||||
case CLUTTER_TOUCH_UPDATE:
|
||||
case CLUTTER_TOUCH_END:
|
||||
case CLUTTER_TOUCH_CANCEL:
|
||||
clutter_point_init (position, event->touch.x, event->touch.y);
|
||||
graphene_point_init (position, event->touch.x, event->touch.y);
|
||||
break;
|
||||
|
||||
case CLUTTER_SCROLL:
|
||||
clutter_point_init (position, event->scroll.x, event->scroll.y);
|
||||
graphene_point_init (position, event->scroll.x, event->scroll.y);
|
||||
break;
|
||||
|
||||
case CLUTTER_TOUCHPAD_PINCH:
|
||||
clutter_point_init (position, event->touchpad_pinch.x,
|
||||
event->touchpad_pinch.y);
|
||||
graphene_point_init (position, event->touchpad_pinch.x,
|
||||
event->touchpad_pinch.y);
|
||||
break;
|
||||
|
||||
case CLUTTER_TOUCHPAD_SWIPE:
|
||||
clutter_point_init (position, event->touchpad_swipe.x,
|
||||
event->touchpad_swipe.y);
|
||||
graphene_point_init (position, event->touchpad_swipe.x,
|
||||
event->touchpad_swipe.y);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1021,6 +1021,9 @@ clutter_event_get_event_sequence (const ClutterEvent *event)
|
||||
event->type == CLUTTER_TOUCH_END ||
|
||||
event->type == CLUTTER_TOUCH_CANCEL)
|
||||
return event->touch.sequence;
|
||||
else if (event->type == CLUTTER_ENTER ||
|
||||
event->type == CLUTTER_LEAVE)
|
||||
return event->crossing.sequence;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -1793,12 +1796,12 @@ float
|
||||
clutter_event_get_distance (const ClutterEvent *source,
|
||||
const ClutterEvent *target)
|
||||
{
|
||||
ClutterPoint p0, p1;
|
||||
graphene_point_t p0, p1;
|
||||
|
||||
clutter_event_get_position (source, &p0);
|
||||
clutter_event_get_position (source, &p1);
|
||||
|
||||
return clutter_point_distance (&p0, &p1, NULL, NULL);
|
||||
return graphene_point_distance (&p0, &p1, NULL, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1819,17 +1822,17 @@ double
|
||||
clutter_event_get_angle (const ClutterEvent *source,
|
||||
const ClutterEvent *target)
|
||||
{
|
||||
ClutterPoint p0, p1;
|
||||
graphene_point_t p0, p1;
|
||||
float x_distance, y_distance;
|
||||
double angle;
|
||||
|
||||
clutter_event_get_position (source, &p0);
|
||||
clutter_event_get_position (target, &p1);
|
||||
|
||||
if (clutter_point_equals (&p0, &p1))
|
||||
if (graphene_point_equal (&p0, &p1))
|
||||
return 0;
|
||||
|
||||
clutter_point_distance (&p0, &p1, &x_distance, &y_distance);
|
||||
graphene_point_distance (&p0, &p1, &x_distance, &y_distance);
|
||||
|
||||
angle = atan2 (x_distance, y_distance);
|
||||
|
||||
@@ -2158,9 +2161,9 @@ clutter_event_get_scroll_source (const ClutterEvent *event)
|
||||
ClutterScrollFinishFlags
|
||||
clutter_event_get_scroll_finish_flags (const ClutterEvent *event)
|
||||
{
|
||||
g_return_val_if_fail (event != NULL, CLUTTER_SCROLL_SOURCE_UNKNOWN);
|
||||
g_return_val_if_fail (event != NULL, CLUTTER_SCROLL_FINISHED_NONE);
|
||||
g_return_val_if_fail (event->type == CLUTTER_SCROLL,
|
||||
CLUTTER_SCROLL_SOURCE_UNKNOWN);
|
||||
CLUTTER_SCROLL_FINISHED_NONE);
|
||||
|
||||
return event->scroll.finish_flags;
|
||||
}
|
||||
|
@@ -269,6 +269,7 @@ struct _ClutterCrossingEvent
|
||||
gfloat x;
|
||||
gfloat y;
|
||||
ClutterInputDevice *device;
|
||||
ClutterEventSequence *sequence;
|
||||
ClutterActor *related;
|
||||
};
|
||||
|
||||
@@ -685,7 +686,7 @@ void clutter_event_get_coords (const ClutterEv
|
||||
gfloat *y);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_event_get_position (const ClutterEvent *event,
|
||||
ClutterPoint *position);
|
||||
graphene_point_t *position);
|
||||
CLUTTER_EXPORT
|
||||
float clutter_event_get_distance (const ClutterEvent *source,
|
||||
const ClutterEvent *target);
|
||||
@@ -772,7 +773,10 @@ void clutter_event_get_gesture_motion_delta (const Clut
|
||||
gdouble *dx,
|
||||
gdouble *dy);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterScrollSource clutter_event_get_scroll_source (const ClutterEvent *event);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterScrollFinishFlags clutter_event_get_scroll_finish_flags (const ClutterEvent *event);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
|
@@ -33,8 +33,6 @@
|
||||
*
|
||||
* It is possible to ask whether Clutter has support for specific features at
|
||||
* run-time.
|
||||
*
|
||||
* See also cogl_get_features() and #CoglFeatureFlags
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
@@ -60,24 +58,13 @@ typedef struct ClutterFeatures
|
||||
static ClutterFeatures* __features = NULL;
|
||||
|
||||
static ClutterFeatureFlags
|
||||
clutter_features_from_cogl (guint cogl_flags)
|
||||
clutter_features_from_cogl (void)
|
||||
{
|
||||
ClutterFeatureFlags clutter_flags = 0;
|
||||
|
||||
if (cogl_flags & COGL_FEATURE_TEXTURE_NPOT)
|
||||
clutter_flags |= CLUTTER_FEATURE_TEXTURE_NPOT;
|
||||
|
||||
if (cogl_flags & COGL_FEATURE_TEXTURE_YUV)
|
||||
clutter_flags |= CLUTTER_FEATURE_TEXTURE_YUV;
|
||||
clutter_flags |= CLUTTER_FEATURE_SHADERS_GLSL;
|
||||
|
||||
if (cogl_flags & COGL_FEATURE_TEXTURE_READ_PIXELS)
|
||||
clutter_flags |= CLUTTER_FEATURE_TEXTURE_READ_PIXELS;
|
||||
|
||||
if (cogl_flags & COGL_FEATURE_SHADERS_GLSL)
|
||||
clutter_flags |= CLUTTER_FEATURE_SHADERS_GLSL;
|
||||
|
||||
if (cogl_flags & COGL_FEATURE_OFFSCREEN)
|
||||
clutter_flags |= CLUTTER_FEATURE_OFFSCREEN;
|
||||
clutter_flags |= CLUTTER_FEATURE_OFFSCREEN;
|
||||
|
||||
return clutter_flags;
|
||||
}
|
||||
@@ -105,7 +92,7 @@ _clutter_feature_init (GError **error)
|
||||
if (!_clutter_backend_create_context (context->backend, error))
|
||||
return FALSE;
|
||||
|
||||
__features->flags = (clutter_features_from_cogl (cogl_get_features ())
|
||||
__features->flags = (clutter_features_from_cogl ()
|
||||
| _clutter_backend_get_features (context->backend));
|
||||
|
||||
__features->features_set = TRUE;
|
||||
|
@@ -118,7 +118,7 @@ struct _ClutterGestureActionPrivate
|
||||
gint requested_nb_points;
|
||||
GArray *points;
|
||||
|
||||
guint actor_capture_id;
|
||||
gulong actor_capture_id;
|
||||
gulong stage_capture_id;
|
||||
|
||||
ClutterGestureTriggerEdge edge;
|
||||
@@ -308,11 +308,7 @@ cancel_gesture (ClutterGestureAction *action)
|
||||
|
||||
priv->in_gesture = FALSE;
|
||||
|
||||
if (priv->stage_capture_id != 0)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
|
||||
priv->stage_capture_id = 0;
|
||||
}
|
||||
g_clear_signal_handler (&priv->stage_capture_id, priv->stage);
|
||||
|
||||
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
|
||||
g_signal_emit (action, gesture_signals[GESTURE_CANCEL], 0, actor);
|
||||
@@ -481,11 +477,8 @@ stage_captured_event_cb (ClutterActor *stage,
|
||||
break;
|
||||
}
|
||||
|
||||
if (priv->points->len == 0 && priv->stage_capture_id)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
|
||||
priv->stage_capture_id = 0;
|
||||
}
|
||||
if (priv->points->len == 0)
|
||||
g_clear_signal_handler (&priv->stage_capture_id, priv->stage);
|
||||
|
||||
return CLUTTER_EVENT_PROPAGATE;
|
||||
}
|
||||
@@ -538,7 +531,7 @@ clutter_gesture_action_set_actor (ClutterActorMeta *meta,
|
||||
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
||||
|
||||
if (old_actor != NULL)
|
||||
g_signal_handler_disconnect (old_actor, priv->actor_capture_id);
|
||||
g_clear_signal_handler (&priv->actor_capture_id, old_actor);
|
||||
|
||||
priv->actor_capture_id = 0;
|
||||
}
|
||||
@@ -546,7 +539,7 @@ clutter_gesture_action_set_actor (ClutterActorMeta *meta,
|
||||
if (priv->stage_capture_id != 0)
|
||||
{
|
||||
if (priv->stage != NULL)
|
||||
g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
|
||||
g_clear_signal_handler (&priv->stage_capture_id, priv->stage);
|
||||
|
||||
priv->stage_capture_id = 0;
|
||||
priv->stage = NULL;
|
||||
@@ -804,8 +797,7 @@ clutter_gesture_action_class_init (ClutterGestureActionClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterGestureActionClass, gesture_end),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
|
||||
@@ -827,8 +819,7 @@ clutter_gesture_action_class_init (ClutterGestureActionClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterGestureActionClass, gesture_cancel),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
}
|
||||
|
111
clutter/clutter/clutter-graphene.c
Normal file
111
clutter/clutter/clutter-graphene.c
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
|
||||
*
|
||||
* Copyright (C) 2019 Endless, Inc
|
||||
* Copyright (C) 2009, 2010 Intel Corp
|
||||
*
|
||||
* 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 "clutter-build-config.h"
|
||||
|
||||
#include "clutter-graphene.h"
|
||||
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-types.h"
|
||||
|
||||
static gboolean
|
||||
graphene_point_progress (const GValue *a,
|
||||
const GValue *b,
|
||||
double progress,
|
||||
GValue *retval)
|
||||
{
|
||||
const graphene_point_t *ap = g_value_get_boxed (a);
|
||||
const graphene_point_t *bp = g_value_get_boxed (b);
|
||||
graphene_point_t res;
|
||||
|
||||
graphene_point_interpolate (ap, bp, progress, &res);
|
||||
|
||||
g_value_set_boxed (retval, &res);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
graphene_point3d_progress (const GValue *a,
|
||||
const GValue *b,
|
||||
double progress,
|
||||
GValue *retval)
|
||||
{
|
||||
const graphene_point3d_t *av = g_value_get_boxed (a);
|
||||
const graphene_point3d_t *bv = g_value_get_boxed (b);
|
||||
graphene_point3d_t res;
|
||||
|
||||
graphene_point3d_interpolate (av, bv, progress, &res);
|
||||
|
||||
g_value_set_boxed (retval, &res);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
graphene_rect_progress (const GValue *a,
|
||||
const GValue *b,
|
||||
double progress,
|
||||
GValue *retval)
|
||||
{
|
||||
const graphene_rect_t *rect_a = g_value_get_boxed (a);
|
||||
const graphene_rect_t *rect_b = g_value_get_boxed (b);
|
||||
graphene_rect_t res;
|
||||
|
||||
graphene_rect_interpolate (rect_a, rect_b, progress, &res);
|
||||
|
||||
g_value_set_boxed (retval, &res);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
graphene_size_progress (const GValue *a,
|
||||
const GValue *b,
|
||||
double progress,
|
||||
GValue *retval)
|
||||
{
|
||||
const graphene_size_t *as = g_value_get_boxed (a);
|
||||
const graphene_size_t *bs = g_value_get_boxed (b);
|
||||
graphene_size_t res;
|
||||
|
||||
graphene_size_interpolate (as, bs, progress, &res);
|
||||
|
||||
g_value_set_boxed (retval, &res);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_graphene_init (void)
|
||||
{
|
||||
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT,
|
||||
graphene_point_progress);
|
||||
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT3D,
|
||||
graphene_point3d_progress);
|
||||
clutter_interval_register_progress_func (GRAPHENE_TYPE_RECT,
|
||||
graphene_rect_progress);
|
||||
clutter_interval_register_progress_func (GRAPHENE_TYPE_SIZE,
|
||||
graphene_size_progress);
|
||||
}
|
@@ -3,9 +3,10 @@
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
||||
* Authored By Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
|
||||
*
|
||||
* Copyright (C) 2006 OpenedHand
|
||||
* Copyright (C) 2019 Endless, Inc
|
||||
* Copyright (C) 2009, 2010 Intel Corp
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -19,18 +20,11 @@
|
||||
*
|
||||
* 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 __CLUTTER_GLX_H__
|
||||
#define __CLUTTER_GLX_H__
|
||||
#ifndef CLUTTER_GRAPHENE_H
|
||||
#define CLUTTER_GRAPHENE_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <clutter/clutter.h>
|
||||
#include <clutter/glx/clutter-glx-texture-pixmap.h>
|
||||
void clutter_graphene_init (void);
|
||||
|
||||
#endif /* __CLUTTER_GLX_H__ */
|
||||
#endif
|
@@ -44,12 +44,12 @@
|
||||
* SECTION:clutter-grid-layout
|
||||
* @Short_description: A layout manager for a grid of actors
|
||||
* @Title: ClutterGridLayout
|
||||
* @See_also: #ClutterTableLayout, #ClutterBoxLayout
|
||||
* @See_also: #ClutterBoxLayout
|
||||
*
|
||||
* #ClutterGridLayout is a layout manager which arranges its child widgets in
|
||||
* rows and columns. It is a very similar to #ClutterTableLayout and
|
||||
* #ClutterBoxLayout, but it consistently uses #ClutterActor's
|
||||
* alignment and expansion flags instead of custom child properties.
|
||||
* rows and columns. It is a very similar to #ClutterBoxLayout, but it
|
||||
* consistently uses #ClutterActor's alignment and expansion flags instead of
|
||||
* custom child properties.
|
||||
*
|
||||
* Children are added using clutter_grid_layout_attach(). They can span
|
||||
* multiple rows or columns. It is also possible to add a child next to an
|
||||
|
@@ -53,9 +53,11 @@
|
||||
struct _ClutterImagePrivate
|
||||
{
|
||||
CoglTexture *texture;
|
||||
gint width;
|
||||
gint height;
|
||||
};
|
||||
|
||||
static void clutter_content_iface_init (ClutterContentIface *iface);
|
||||
static void clutter_content_iface_init (ClutterContentInterface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (ClutterImage, clutter_image, G_TYPE_OBJECT,
|
||||
G_ADD_PRIVATE (ClutterImage)
|
||||
@@ -68,6 +70,27 @@ clutter_image_error_quark (void)
|
||||
return g_quark_from_static_string ("clutter-image-error-quark");
|
||||
}
|
||||
|
||||
static void
|
||||
update_image_size (ClutterImage *self)
|
||||
{
|
||||
gint width, height;
|
||||
|
||||
if (self->priv->texture == NULL)
|
||||
return;
|
||||
|
||||
width = cogl_texture_get_width (self->priv->texture);
|
||||
height = cogl_texture_get_height (self->priv->texture);
|
||||
|
||||
if (self->priv->width == width &&
|
||||
self->priv->height == height)
|
||||
return;
|
||||
|
||||
self->priv->width = width;
|
||||
self->priv->height = height;
|
||||
|
||||
clutter_content_invalidate_size (CLUTTER_CONTENT (self));
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_image_finalize (GObject *gobject)
|
||||
{
|
||||
@@ -95,9 +118,10 @@ clutter_image_init (ClutterImage *self)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_image_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *root)
|
||||
clutter_image_paint_content (ClutterContent *content,
|
||||
ClutterActor *actor,
|
||||
ClutterPaintNode *root,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterImagePrivate *priv = CLUTTER_IMAGE (content)->priv;
|
||||
ClutterPaintNode *node;
|
||||
@@ -131,7 +155,7 @@ clutter_image_get_preferred_size (ClutterContent *content,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_content_iface_init (ClutterContentIface *iface)
|
||||
clutter_content_iface_init (ClutterContentInterface *iface)
|
||||
{
|
||||
iface->get_preferred_size = clutter_image_get_preferred_size;
|
||||
iface->paint_content = clutter_image_paint_content;
|
||||
@@ -233,11 +257,12 @@ clutter_image_set_data (ClutterImage *image,
|
||||
{
|
||||
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
||||
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
||||
_("Unable to load image data"));
|
||||
"Unable to load image data");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
||||
update_image_size (image);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -301,11 +326,12 @@ clutter_image_set_bytes (ClutterImage *image,
|
||||
{
|
||||
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
||||
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
||||
_("Unable to load image data"));
|
||||
"Unable to load image data");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
||||
update_image_size (image);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -394,11 +420,12 @@ clutter_image_set_area (ClutterImage *image,
|
||||
{
|
||||
g_set_error_literal (error, CLUTTER_IMAGE_ERROR,
|
||||
CLUTTER_IMAGE_ERROR_INVALID_DATA,
|
||||
_("Unable to load image data"));
|
||||
"Unable to load image data");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
clutter_content_invalidate (CLUTTER_CONTENT (image));
|
||||
update_image_size (image);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -63,7 +63,8 @@ typedef struct _ClutterImageClass ClutterImageClass;
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_IMAGE_ERROR_INVALID_DATA
|
||||
} ClutterImageError;
|
||||
|
||||
|
@@ -35,7 +35,8 @@ struct _ClutterInputDeviceToolPrivate
|
||||
guint64 id;
|
||||
};
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_TYPE,
|
||||
PROP_SERIAL,
|
||||
|
@@ -107,6 +107,9 @@ clutter_input_device_dispose (GObject *gobject)
|
||||
device->associated = NULL;
|
||||
}
|
||||
|
||||
if (device->accessibility_virtual_device)
|
||||
g_clear_object (&device->accessibility_virtual_device);
|
||||
|
||||
g_clear_pointer (&device->axes, g_array_unref);
|
||||
g_clear_pointer (&device->keys, g_array_unref);
|
||||
g_clear_pointer (&device->scroll_info, g_array_unref);
|
||||
@@ -834,6 +837,7 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
|
||||
event->crossing.x = device->current_x;
|
||||
event->crossing.y = device->current_y;
|
||||
event->crossing.related = actor;
|
||||
event->crossing.sequence = sequence;
|
||||
clutter_event_set_device (event, device);
|
||||
|
||||
/* we need to make sure that this event is processed
|
||||
@@ -870,6 +874,7 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
|
||||
event->crossing.y = device->current_y;
|
||||
event->crossing.source = actor;
|
||||
event->crossing.related = old_actor;
|
||||
event->crossing.sequence = sequence;
|
||||
clutter_event_set_device (event, device);
|
||||
|
||||
/* see above */
|
||||
@@ -986,7 +991,7 @@ clutter_input_device_get_enabled (ClutterInputDevice *device)
|
||||
gboolean
|
||||
clutter_input_device_get_coords (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
ClutterPoint *point)
|
||||
graphene_point_t *point)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
||||
g_return_val_if_fail (point != NULL, FALSE);
|
||||
@@ -1033,10 +1038,11 @@ _clutter_input_device_update (ClutterInputDevice *device,
|
||||
ClutterStage *stage;
|
||||
ClutterActor *new_cursor_actor;
|
||||
ClutterActor *old_cursor_actor;
|
||||
ClutterPoint point = { -1, -1 };
|
||||
graphene_point_t point = GRAPHENE_POINT_INIT (-1.0f, -1.0f);
|
||||
ClutterInputDeviceType device_type = device->device_type;
|
||||
|
||||
if (device->device_type == CLUTTER_KEYBOARD_DEVICE)
|
||||
return NULL;
|
||||
g_assert (device_type != CLUTTER_KEYBOARD_DEVICE &&
|
||||
device_type != CLUTTER_PAD_DEVICE);
|
||||
|
||||
stage = device->stage;
|
||||
if (G_UNLIKELY (stage == NULL))
|
||||
@@ -1919,6 +1925,157 @@ _clutter_input_device_reset_scroll_info (ClutterInputDevice *device)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_grab_actor_destroy (ClutterActor *actor,
|
||||
ClutterInputDevice *device)
|
||||
{
|
||||
switch (device->device_type)
|
||||
{
|
||||
case CLUTTER_POINTER_DEVICE:
|
||||
case CLUTTER_TABLET_DEVICE:
|
||||
device->pointer_grab_actor = NULL;
|
||||
break;
|
||||
|
||||
case CLUTTER_KEYBOARD_DEVICE:
|
||||
device->keyboard_grab_actor = NULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_input_device_grab:
|
||||
* @device: a #ClutterInputDevice
|
||||
* @actor: a #ClutterActor
|
||||
*
|
||||
* Acquires a grab on @actor for the given @device.
|
||||
*
|
||||
* Any event coming from @device will be delivered to @actor, bypassing
|
||||
* the usual event delivery mechanism, until the grab is released by
|
||||
* calling clutter_input_device_ungrab().
|
||||
*
|
||||
* The grab is client-side: even if the windowing system used by the Clutter
|
||||
* backend has the concept of "device grabs", Clutter will not use them.
|
||||
*
|
||||
* Only #ClutterInputDevice of types %CLUTTER_POINTER_DEVICE,
|
||||
* %CLUTTER_TABLET_DEVICE and %CLUTTER_KEYBOARD_DEVICE can hold a grab.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
void
|
||||
clutter_input_device_grab (ClutterInputDevice *device,
|
||||
ClutterActor *actor)
|
||||
{
|
||||
ClutterActor **grab_actor;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
|
||||
|
||||
switch (device->device_type)
|
||||
{
|
||||
case CLUTTER_POINTER_DEVICE:
|
||||
case CLUTTER_TABLET_DEVICE:
|
||||
grab_actor = &device->pointer_grab_actor;
|
||||
break;
|
||||
|
||||
case CLUTTER_KEYBOARD_DEVICE:
|
||||
grab_actor = &device->keyboard_grab_actor;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_critical ("Only pointer and keyboard devices can grab an actor");
|
||||
return;
|
||||
}
|
||||
|
||||
if (*grab_actor != NULL)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (*grab_actor,
|
||||
G_CALLBACK (on_grab_actor_destroy),
|
||||
device);
|
||||
}
|
||||
|
||||
*grab_actor = actor;
|
||||
|
||||
g_signal_connect (*grab_actor,
|
||||
"destroy",
|
||||
G_CALLBACK (on_grab_actor_destroy),
|
||||
device);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_input_device_ungrab:
|
||||
* @device: a #ClutterInputDevice
|
||||
*
|
||||
* Releases the grab on the @device, if one is in place.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
void
|
||||
clutter_input_device_ungrab (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterActor **grab_actor;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
||||
|
||||
switch (device->device_type)
|
||||
{
|
||||
case CLUTTER_POINTER_DEVICE:
|
||||
case CLUTTER_TABLET_DEVICE:
|
||||
grab_actor = &device->pointer_grab_actor;
|
||||
break;
|
||||
|
||||
case CLUTTER_KEYBOARD_DEVICE:
|
||||
grab_actor = &device->keyboard_grab_actor;
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (*grab_actor == NULL)
|
||||
return;
|
||||
|
||||
g_signal_handlers_disconnect_by_func (*grab_actor,
|
||||
G_CALLBACK (on_grab_actor_destroy),
|
||||
device);
|
||||
|
||||
*grab_actor = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_input_device_get_grabbed_actor:
|
||||
* @device: a #ClutterInputDevice
|
||||
*
|
||||
* Retrieves a pointer to the #ClutterActor currently grabbing all
|
||||
* the events coming from @device.
|
||||
*
|
||||
* Return value: (transfer none): a #ClutterActor, or %NULL
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
ClutterActor *
|
||||
clutter_input_device_get_grabbed_actor (ClutterInputDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), NULL);
|
||||
|
||||
switch (device->device_type)
|
||||
{
|
||||
case CLUTTER_POINTER_DEVICE:
|
||||
case CLUTTER_TABLET_DEVICE:
|
||||
return device->pointer_grab_actor;
|
||||
|
||||
case CLUTTER_KEYBOARD_DEVICE:
|
||||
return device->keyboard_grab_actor;
|
||||
|
||||
default:
|
||||
g_critical ("Only pointer and keyboard devices can grab an actor");
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
on_grab_sequence_actor_destroy (ClutterActor *actor,
|
||||
ClutterInputDevice *device)
|
||||
@@ -2284,15 +2441,3 @@ clutter_input_device_is_grouped (ClutterInputDevice *device,
|
||||
|
||||
return CLUTTER_INPUT_DEVICE_GET_CLASS (device)->is_grouped (device, other_device);
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_input_device_get_physical_size (ClutterInputDevice *device,
|
||||
gdouble *width,
|
||||
gdouble *height)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
||||
|
||||
return CLUTTER_INPUT_DEVICE_GET_CLASS (device)->get_physical_size (device,
|
||||
width,
|
||||
height);
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ gint clutter_input_device_get_device_id (ClutterInputDev
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_input_device_get_coords (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
ClutterPoint *point);
|
||||
graphene_point_t *point);
|
||||
CLUTTER_EXPORT
|
||||
ClutterModifierType clutter_input_device_get_modifier_state (ClutterInputDevice *device);
|
||||
CLUTTER_EXPORT
|
||||
@@ -171,10 +171,6 @@ void clutter_input_device_set_mapping_mode (ClutterInputDev
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_input_device_is_grouped (ClutterInputDevice *device,
|
||||
ClutterInputDevice *other_device);
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_input_device_get_physical_size (ClutterInputDevice *device,
|
||||
gdouble *width,
|
||||
gdouble *height);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -89,8 +89,8 @@ clutter_input_focus_reset (ClutterInputFocus *focus)
|
||||
}
|
||||
|
||||
void
|
||||
clutter_input_focus_set_cursor_location (ClutterInputFocus *focus,
|
||||
const ClutterRect *rect)
|
||||
clutter_input_focus_set_cursor_location (ClutterInputFocus *focus,
|
||||
const graphene_rect_t *rect)
|
||||
{
|
||||
ClutterInputFocusPrivate *priv;
|
||||
|
||||
@@ -175,7 +175,8 @@ clutter_input_focus_set_can_show_preedit (ClutterInputFocus *focus,
|
||||
}
|
||||
|
||||
void
|
||||
clutter_input_focus_request_toggle_input_panel (ClutterInputFocus *focus)
|
||||
clutter_input_focus_set_input_panel_state (ClutterInputFocus *focus,
|
||||
ClutterInputPanelState state)
|
||||
{
|
||||
ClutterInputFocusPrivate *priv;
|
||||
|
||||
@@ -184,7 +185,7 @@ clutter_input_focus_request_toggle_input_panel (ClutterInputFocus *focus)
|
||||
|
||||
priv = clutter_input_focus_get_instance_private (focus);
|
||||
|
||||
clutter_input_method_toggle_input_panel (priv->im);
|
||||
clutter_input_method_set_input_panel_state (priv->im, state);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -57,8 +57,8 @@ gboolean clutter_input_focus_is_focused (ClutterInputFocus *focus);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_focus_reset (ClutterInputFocus *focus);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_focus_set_cursor_location (ClutterInputFocus *focus,
|
||||
const ClutterRect *rect);
|
||||
void clutter_input_focus_set_cursor_location (ClutterInputFocus *focus,
|
||||
const graphene_rect_t *rect);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_focus_set_surrounding (ClutterInputFocus *focus,
|
||||
@@ -78,6 +78,7 @@ CLUTTER_EXPORT
|
||||
void clutter_input_focus_set_can_show_preedit (ClutterInputFocus *focus,
|
||||
gboolean can_show_preedit);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_focus_request_toggle_input_panel (ClutterInputFocus *focus);
|
||||
void clutter_input_focus_set_input_panel_state (ClutterInputFocus *focus,
|
||||
ClutterInputPanelState state);
|
||||
|
||||
#endif /* __CLUTTER_INPUT_FOCUS_H__ */
|
||||
|
@@ -26,8 +26,8 @@ ClutterInputFocus * clutter_input_method_get_focus (ClutterInputMethod *method);
|
||||
|
||||
void clutter_input_method_reset (ClutterInputMethod *method);
|
||||
|
||||
void clutter_input_method_set_cursor_location (ClutterInputMethod *method,
|
||||
const ClutterRect *rect);
|
||||
void clutter_input_method_set_cursor_location (ClutterInputMethod *method,
|
||||
const graphene_rect_t *rect);
|
||||
void clutter_input_method_set_surrounding (ClutterInputMethod *method,
|
||||
const gchar *text,
|
||||
guint cursor,
|
||||
|
@@ -37,7 +37,8 @@ struct _ClutterInputMethodPrivate
|
||||
gboolean can_show_preedit;
|
||||
};
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
COMMIT,
|
||||
DELETE_SURROUNDING,
|
||||
REQUEST_SURROUNDING,
|
||||
@@ -46,7 +47,8 @@ enum {
|
||||
N_SIGNALS,
|
||||
};
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_CONTENT_HINTS,
|
||||
PROP_CONTENT_PURPOSE,
|
||||
@@ -185,7 +187,7 @@ clutter_input_method_class_init (ClutterInputMethodClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, CLUTTER_TYPE_RECT);
|
||||
G_TYPE_NONE, 1, GRAPHENE_TYPE_RECT);
|
||||
|
||||
pspecs[PROP_CONTENT_HINTS] =
|
||||
g_param_spec_flags ("content-hints",
|
||||
@@ -264,9 +266,6 @@ clutter_input_method_focus_out (ClutterInputMethod *im)
|
||||
|
||||
klass = CLUTTER_INPUT_METHOD_GET_CLASS (im);
|
||||
klass->focus_out (im);
|
||||
|
||||
g_signal_emit (im, signals[INPUT_PANEL_STATE],
|
||||
0, CLUTTER_INPUT_PANEL_STATE_OFF);
|
||||
}
|
||||
|
||||
ClutterInputFocus *
|
||||
@@ -361,12 +360,12 @@ clutter_input_method_notify_key_event (ClutterInputMethod *im,
|
||||
}
|
||||
|
||||
void
|
||||
clutter_input_method_toggle_input_panel (ClutterInputMethod *im)
|
||||
clutter_input_method_set_input_panel_state (ClutterInputMethod *im,
|
||||
ClutterInputPanelState state)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_INPUT_METHOD (im));
|
||||
|
||||
g_signal_emit (im, signals[INPUT_PANEL_STATE], 0,
|
||||
CLUTTER_INPUT_PANEL_STATE_TOGGLE);
|
||||
g_signal_emit (im, signals[INPUT_PANEL_STATE], 0, state);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -378,8 +377,8 @@ clutter_input_method_reset (ClutterInputMethod *im)
|
||||
}
|
||||
|
||||
void
|
||||
clutter_input_method_set_cursor_location (ClutterInputMethod *im,
|
||||
const ClutterRect *rect)
|
||||
clutter_input_method_set_cursor_location (ClutterInputMethod *im,
|
||||
const graphene_rect_t *rect)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_INPUT_METHOD (im));
|
||||
|
||||
|
@@ -42,8 +42,8 @@ struct _ClutterInputMethodClass
|
||||
|
||||
void (* reset) (ClutterInputMethod *im);
|
||||
|
||||
void (* set_cursor_location) (ClutterInputMethod *im,
|
||||
const ClutterRect *rect);
|
||||
void (* set_cursor_location) (ClutterInputMethod *im,
|
||||
const graphene_rect_t *rect);
|
||||
void (* set_surrounding) (ClutterInputMethod *im,
|
||||
const gchar *text,
|
||||
guint cursor,
|
||||
@@ -83,7 +83,8 @@ void clutter_input_method_notify_key_event (ClutterInputMethod *im,
|
||||
const ClutterEvent *event,
|
||||
gboolean filtered);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_method_request_toggle_input_panel (ClutterInputMethod *im);
|
||||
void clutter_input_method_set_input_panel_state (ClutterInputMethod *im,
|
||||
ClutterInputPanelState state);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_method_forward_key (ClutterInputMethod *im,
|
||||
|
47
clutter/clutter/clutter-input-pointer-a11y-private.h
Normal file
47
clutter/clutter/clutter-input-pointer-a11y-private.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Red Hat
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* Author: Olivier Fourdan <ofourdan@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __CLUTTER_INPUT_POINTER_A11Y_H__
|
||||
#define __CLUTTER_INPUT_POINTER_A11Y_H__
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
#include "clutter-enum-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_pointer_a11y_add_device (ClutterInputDevice *device);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_pointer_a11y_remove_device (ClutterInputDevice *device);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_pointer_a11y_on_motion_event (ClutterInputDevice *device,
|
||||
float x,
|
||||
float y);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_pointer_a11y_on_button_event (ClutterInputDevice *device,
|
||||
int button,
|
||||
gboolean pressed);
|
||||
CLUTTER_EXPORT
|
||||
gboolean _clutter_is_input_pointer_a11y_enabled (ClutterInputDevice *device);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_INPUT_POINTER_A11Y_H__ */
|
709
clutter/clutter/clutter-input-pointer-a11y.c
Normal file
709
clutter/clutter/clutter-input-pointer-a11y.c
Normal file
@@ -0,0 +1,709 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Red Hat
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* Author: Olivier Fourdan <ofourdan@redhat.com>
|
||||
*
|
||||
* This reimplements in Clutter the same behavior as mousetweaks original
|
||||
* implementation by Gerd Kohlberger <gerdko gmail com>
|
||||
* mousetweaks Copyright (C) 2007-2010 Gerd Kohlberger <gerdko gmail com>
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#include "clutter-device-manager.h"
|
||||
#include "clutter-device-manager-private.h"
|
||||
#include "clutter-enum-types.h"
|
||||
#include "clutter-input-device.h"
|
||||
#include "clutter-input-pointer-a11y-private.h"
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-virtual-input-device.h"
|
||||
|
||||
static gboolean
|
||||
is_secondary_click_enabled (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
return (settings.controls & CLUTTER_A11Y_SECONDARY_CLICK_ENABLED);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_dwell_click_enabled (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
return (settings.controls & CLUTTER_A11Y_DWELL_ENABLED);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
get_secondary_click_delay (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
return settings.secondary_click_delay;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
get_dwell_delay (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
return settings.dwell_delay;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
get_dwell_threshold (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
return settings.dwell_threshold;
|
||||
}
|
||||
|
||||
static ClutterPointerA11yDwellMode
|
||||
get_dwell_mode (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
return settings.dwell_mode;
|
||||
}
|
||||
|
||||
static ClutterPointerA11yDwellClickType
|
||||
get_dwell_click_type (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
return settings.dwell_click_type;
|
||||
}
|
||||
|
||||
static ClutterPointerA11yDwellClickType
|
||||
get_dwell_click_type_for_direction (ClutterInputDevice *device,
|
||||
ClutterPointerA11yDwellDirection direction)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
if (direction == settings.dwell_gesture_single)
|
||||
return CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY;
|
||||
else if (direction == settings.dwell_gesture_double)
|
||||
return CLUTTER_A11Y_DWELL_CLICK_TYPE_DOUBLE;
|
||||
else if (direction == settings.dwell_gesture_drag)
|
||||
return CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG;
|
||||
else if (direction == settings.dwell_gesture_secondary)
|
||||
return CLUTTER_A11Y_DWELL_CLICK_TYPE_SECONDARY;
|
||||
|
||||
return CLUTTER_A11Y_DWELL_CLICK_TYPE_NONE;
|
||||
}
|
||||
|
||||
static void
|
||||
emit_button_press (ClutterInputDevice *device,
|
||||
gint button)
|
||||
{
|
||||
clutter_virtual_input_device_notify_button (device->accessibility_virtual_device,
|
||||
g_get_monotonic_time (),
|
||||
button,
|
||||
CLUTTER_BUTTON_STATE_PRESSED);
|
||||
}
|
||||
|
||||
static void
|
||||
emit_button_release (ClutterInputDevice *device,
|
||||
gint button)
|
||||
{
|
||||
clutter_virtual_input_device_notify_button (device->accessibility_virtual_device,
|
||||
g_get_monotonic_time (),
|
||||
button,
|
||||
CLUTTER_BUTTON_STATE_RELEASED);
|
||||
}
|
||||
|
||||
static void
|
||||
emit_button_click (ClutterInputDevice *device,
|
||||
gint button)
|
||||
{
|
||||
emit_button_press (device, button);
|
||||
emit_button_release (device, button);
|
||||
}
|
||||
|
||||
static void
|
||||
restore_dwell_position (ClutterInputDevice *device)
|
||||
{
|
||||
clutter_virtual_input_device_notify_absolute_motion (device->accessibility_virtual_device,
|
||||
g_get_monotonic_time (),
|
||||
device->ptr_a11y_data->dwell_x,
|
||||
device->ptr_a11y_data->dwell_y);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
trigger_secondary_click (gpointer data)
|
||||
{
|
||||
ClutterInputDevice *device = data;
|
||||
|
||||
device->ptr_a11y_data->secondary_click_triggered = TRUE;
|
||||
device->ptr_a11y_data->secondary_click_timer = 0;
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
||||
TRUE);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
start_secondary_click_timeout (ClutterInputDevice *device)
|
||||
{
|
||||
unsigned int delay = get_secondary_click_delay (device);
|
||||
|
||||
device->ptr_a11y_data->secondary_click_timer =
|
||||
clutter_threads_add_timeout (delay, trigger_secondary_click, device);
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-started",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
||||
delay);
|
||||
}
|
||||
|
||||
static void
|
||||
stop_secondary_click_timeout (ClutterInputDevice *device)
|
||||
{
|
||||
if (device->ptr_a11y_data->secondary_click_timer)
|
||||
{
|
||||
g_clear_handle_id (&device->ptr_a11y_data->secondary_click_timer,
|
||||
g_source_remove);
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
||||
FALSE);
|
||||
}
|
||||
device->ptr_a11y_data->secondary_click_triggered = FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
pointer_has_moved (ClutterInputDevice *device)
|
||||
{
|
||||
float dx, dy;
|
||||
gint threshold;
|
||||
|
||||
dx = device->ptr_a11y_data->dwell_x - device->ptr_a11y_data->current_x;
|
||||
dy = device->ptr_a11y_data->dwell_y - device->ptr_a11y_data->current_y;
|
||||
threshold = get_dwell_threshold (device);
|
||||
|
||||
/* Pythagorean theorem */
|
||||
return ((dx * dx) + (dy * dy)) > (threshold * threshold);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_secondary_click_pending (ClutterInputDevice *device)
|
||||
{
|
||||
return device->ptr_a11y_data->secondary_click_timer != 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_secondary_click_triggered (ClutterInputDevice *device)
|
||||
{
|
||||
return device->ptr_a11y_data->secondary_click_triggered;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_dwell_click_pending (ClutterInputDevice *device)
|
||||
{
|
||||
return device->ptr_a11y_data->dwell_timer != 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_dwell_dragging (ClutterInputDevice *device)
|
||||
{
|
||||
return device->ptr_a11y_data->dwell_drag_started;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_dwell_gesturing (ClutterInputDevice *device)
|
||||
{
|
||||
return device->ptr_a11y_data->dwell_gesture_started;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
has_button_pressed (ClutterInputDevice *device)
|
||||
{
|
||||
return device->ptr_a11y_data->n_btn_pressed > 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_start_secondary_click_timeout (ClutterInputDevice *device)
|
||||
{
|
||||
return !is_dwell_dragging (device);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_start_dwell (ClutterInputDevice *device)
|
||||
{
|
||||
/* We should trigger a dwell if we've not already started one, and if
|
||||
* no button is currently pressed or we are in the middle of a dwell
|
||||
* drag action.
|
||||
*/
|
||||
return !is_dwell_click_pending (device) &&
|
||||
(is_dwell_dragging (device) ||
|
||||
!has_button_pressed (device));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_stop_dwell (ClutterInputDevice *device)
|
||||
{
|
||||
/* We should stop a dwell if the motion exceeds the threshold, unless
|
||||
* we've started a gesture, because we want to keep the original dwell
|
||||
* location to both detect a gesture and restore the original pointer
|
||||
* location once the gesture is finished.
|
||||
*/
|
||||
return pointer_has_moved (device) &&
|
||||
!is_dwell_gesturing (device);
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
should_update_dwell_position (ClutterInputDevice *device)
|
||||
{
|
||||
return !is_dwell_gesturing (device) &&
|
||||
!is_dwell_click_pending (device) &&
|
||||
!is_secondary_click_pending (device);
|
||||
}
|
||||
|
||||
static void
|
||||
update_dwell_click_type (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterPointerA11ySettings settings;
|
||||
ClutterPointerA11yDwellClickType dwell_click_type;
|
||||
|
||||
clutter_device_manager_get_pointer_a11y_settings (device->device_manager, &settings);
|
||||
|
||||
dwell_click_type = settings.dwell_click_type;
|
||||
switch (dwell_click_type)
|
||||
{
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_DOUBLE:
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_SECONDARY:
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_MIDDLE:
|
||||
dwell_click_type = CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY;
|
||||
break;
|
||||
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG:
|
||||
if (!is_dwell_dragging (device))
|
||||
dwell_click_type = CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY;
|
||||
break;
|
||||
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY:
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (dwell_click_type != settings.dwell_click_type)
|
||||
{
|
||||
settings.dwell_click_type = dwell_click_type;
|
||||
clutter_device_manager_set_pointer_a11y_settings (device->device_manager,
|
||||
&settings);
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-dwell-click-type-changed",
|
||||
dwell_click_type);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
emit_dwell_click (ClutterInputDevice *device,
|
||||
ClutterPointerA11yDwellClickType dwell_click_type)
|
||||
{
|
||||
switch (dwell_click_type)
|
||||
{
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_PRIMARY:
|
||||
emit_button_click (device, CLUTTER_BUTTON_PRIMARY);
|
||||
break;
|
||||
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_DOUBLE:
|
||||
emit_button_click (device, CLUTTER_BUTTON_PRIMARY);
|
||||
emit_button_click (device, CLUTTER_BUTTON_PRIMARY);
|
||||
break;
|
||||
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG:
|
||||
if (is_dwell_dragging (device))
|
||||
{
|
||||
emit_button_release (device, CLUTTER_BUTTON_PRIMARY);
|
||||
device->ptr_a11y_data->dwell_drag_started = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
emit_button_press (device, CLUTTER_BUTTON_PRIMARY);
|
||||
device->ptr_a11y_data->dwell_drag_started = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_SECONDARY:
|
||||
emit_button_click (device, CLUTTER_BUTTON_SECONDARY);
|
||||
break;
|
||||
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_MIDDLE:
|
||||
emit_button_click (device, CLUTTER_BUTTON_MIDDLE);
|
||||
break;
|
||||
|
||||
case CLUTTER_A11Y_DWELL_CLICK_TYPE_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static ClutterPointerA11yDwellDirection
|
||||
get_dwell_direction (ClutterInputDevice *device)
|
||||
{
|
||||
float dx, dy;
|
||||
|
||||
dx = ABS (device->ptr_a11y_data->dwell_x - device->ptr_a11y_data->current_x);
|
||||
dy = ABS (device->ptr_a11y_data->dwell_y - device->ptr_a11y_data->current_y);
|
||||
|
||||
/* The pointer hasn't moved */
|
||||
if (!pointer_has_moved (device))
|
||||
return CLUTTER_A11Y_DWELL_DIRECTION_NONE;
|
||||
|
||||
if (device->ptr_a11y_data->dwell_x < device->ptr_a11y_data->current_x)
|
||||
{
|
||||
if (dx > dy)
|
||||
return CLUTTER_A11Y_DWELL_DIRECTION_LEFT;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dx > dy)
|
||||
return CLUTTER_A11Y_DWELL_DIRECTION_RIGHT;
|
||||
}
|
||||
|
||||
if (device->ptr_a11y_data->dwell_y < device->ptr_a11y_data->current_y)
|
||||
return CLUTTER_A11Y_DWELL_DIRECTION_UP;
|
||||
|
||||
return CLUTTER_A11Y_DWELL_DIRECTION_DOWN;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
trigger_clear_dwell_gesture (gpointer data)
|
||||
{
|
||||
ClutterInputDevice *device = data;
|
||||
|
||||
device->ptr_a11y_data->dwell_timer = 0;
|
||||
device->ptr_a11y_data->dwell_gesture_started = FALSE;
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
trigger_dwell_gesture (gpointer data)
|
||||
{
|
||||
ClutterInputDevice *device = data;
|
||||
ClutterPointerA11yDwellDirection direction;
|
||||
unsigned int delay = get_dwell_delay (device);
|
||||
|
||||
restore_dwell_position (device);
|
||||
direction = get_dwell_direction (device);
|
||||
emit_dwell_click (device,
|
||||
get_dwell_click_type_for_direction (device,
|
||||
direction));
|
||||
|
||||
/* Do not clear the gesture right away, otherwise we'll start another one */
|
||||
device->ptr_a11y_data->dwell_timer =
|
||||
clutter_threads_add_timeout (delay, trigger_clear_dwell_gesture, device);
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE,
|
||||
TRUE);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
start_dwell_gesture_timeout (ClutterInputDevice *device)
|
||||
{
|
||||
unsigned int delay = get_dwell_delay (device);
|
||||
|
||||
device->ptr_a11y_data->dwell_timer =
|
||||
clutter_threads_add_timeout (delay, trigger_dwell_gesture, device);
|
||||
device->ptr_a11y_data->dwell_gesture_started = TRUE;
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-started",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE,
|
||||
delay);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
trigger_dwell_click (gpointer data)
|
||||
{
|
||||
ClutterInputDevice *device = data;
|
||||
|
||||
device->ptr_a11y_data->dwell_timer = 0;
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
||||
TRUE);
|
||||
|
||||
if (get_dwell_mode (device) == CLUTTER_A11Y_DWELL_MODE_GESTURE)
|
||||
{
|
||||
if (is_dwell_dragging (device))
|
||||
emit_dwell_click (device, CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG);
|
||||
else
|
||||
start_dwell_gesture_timeout (device);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit_dwell_click (device, get_dwell_click_type (device));
|
||||
update_dwell_click_type (device);
|
||||
}
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
start_dwell_timeout (ClutterInputDevice *device)
|
||||
{
|
||||
unsigned int delay = get_dwell_delay (device);
|
||||
|
||||
device->ptr_a11y_data->dwell_timer =
|
||||
clutter_threads_add_timeout (delay, trigger_dwell_click, device);
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-started",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
||||
delay);
|
||||
}
|
||||
|
||||
static void
|
||||
stop_dwell_timeout (ClutterInputDevice *device)
|
||||
{
|
||||
if (device->ptr_a11y_data->dwell_timer)
|
||||
{
|
||||
g_clear_handle_id (&device->ptr_a11y_data->dwell_timer, g_source_remove);
|
||||
device->ptr_a11y_data->dwell_gesture_started = FALSE;
|
||||
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
trigger_dwell_position_timeout (gpointer data)
|
||||
{
|
||||
ClutterInputDevice *device = data;
|
||||
|
||||
device->ptr_a11y_data->dwell_position_timer = 0;
|
||||
|
||||
if (is_dwell_click_enabled (device))
|
||||
{
|
||||
if (!pointer_has_moved (device))
|
||||
start_dwell_timeout (device);
|
||||
}
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
start_dwell_position_timeout (ClutterInputDevice *device)
|
||||
{
|
||||
device->ptr_a11y_data->dwell_position_timer =
|
||||
clutter_threads_add_timeout (100, trigger_dwell_position_timeout, device);
|
||||
}
|
||||
|
||||
static void
|
||||
stop_dwell_position_timeout (ClutterInputDevice *device)
|
||||
{
|
||||
g_clear_handle_id (&device->ptr_a11y_data->dwell_position_timer,
|
||||
g_source_remove);
|
||||
}
|
||||
|
||||
static void
|
||||
update_dwell_position (ClutterInputDevice *device)
|
||||
{
|
||||
device->ptr_a11y_data->dwell_x = device->ptr_a11y_data->current_x;
|
||||
device->ptr_a11y_data->dwell_y = device->ptr_a11y_data->current_y;
|
||||
}
|
||||
|
||||
static void
|
||||
update_current_position (ClutterInputDevice *device,
|
||||
float x,
|
||||
float y)
|
||||
{
|
||||
device->ptr_a11y_data->current_x = x;
|
||||
device->ptr_a11y_data->current_y = y;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_device_core_pointer (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterInputDevice *core_pointer;
|
||||
|
||||
core_pointer = clutter_device_manager_get_core_device (device->device_manager,
|
||||
CLUTTER_POINTER_DEVICE);
|
||||
if (core_pointer == NULL)
|
||||
return FALSE;
|
||||
|
||||
return (core_pointer == device);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_input_pointer_a11y_add_device (ClutterInputDevice *device)
|
||||
{
|
||||
if (!is_device_core_pointer (device))
|
||||
return;
|
||||
|
||||
device->accessibility_virtual_device =
|
||||
clutter_device_manager_create_virtual_device (device->device_manager,
|
||||
CLUTTER_POINTER_DEVICE);
|
||||
|
||||
device->ptr_a11y_data = g_new0 (ClutterPtrA11yData, 1);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_input_pointer_a11y_remove_device (ClutterInputDevice *device)
|
||||
{
|
||||
if (!is_device_core_pointer (device))
|
||||
return;
|
||||
|
||||
/* Terminate a drag if started */
|
||||
if (is_dwell_dragging (device))
|
||||
emit_dwell_click (device, CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG);
|
||||
|
||||
stop_dwell_position_timeout (device);
|
||||
stop_dwell_timeout (device);
|
||||
stop_secondary_click_timeout (device);
|
||||
|
||||
g_clear_pointer (&device->ptr_a11y_data, g_free);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_input_pointer_a11y_on_motion_event (ClutterInputDevice *device,
|
||||
float x,
|
||||
float y)
|
||||
{
|
||||
if (!is_device_core_pointer (device))
|
||||
return;
|
||||
|
||||
if (!_clutter_is_input_pointer_a11y_enabled (device))
|
||||
return;
|
||||
|
||||
update_current_position (device, x, y);
|
||||
|
||||
if (is_secondary_click_enabled (device))
|
||||
{
|
||||
if (pointer_has_moved (device))
|
||||
stop_secondary_click_timeout (device);
|
||||
}
|
||||
|
||||
if (is_dwell_click_enabled (device))
|
||||
{
|
||||
stop_dwell_position_timeout (device);
|
||||
|
||||
if (should_stop_dwell (device))
|
||||
stop_dwell_timeout (device);
|
||||
|
||||
if (should_start_dwell (device))
|
||||
start_dwell_position_timeout (device);
|
||||
}
|
||||
|
||||
if (should_update_dwell_position (device))
|
||||
update_dwell_position (device);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_input_pointer_a11y_on_button_event (ClutterInputDevice *device,
|
||||
int button,
|
||||
gboolean pressed)
|
||||
{
|
||||
if (!is_device_core_pointer (device))
|
||||
return;
|
||||
|
||||
if (!_clutter_is_input_pointer_a11y_enabled (device))
|
||||
return;
|
||||
|
||||
if (pressed)
|
||||
{
|
||||
device->ptr_a11y_data->n_btn_pressed++;
|
||||
|
||||
stop_dwell_position_timeout (device);
|
||||
|
||||
if (is_dwell_click_enabled (device))
|
||||
stop_dwell_timeout (device);
|
||||
|
||||
if (is_dwell_dragging (device))
|
||||
stop_dwell_timeout (device);
|
||||
|
||||
if (is_secondary_click_enabled (device))
|
||||
{
|
||||
if (button == CLUTTER_BUTTON_PRIMARY)
|
||||
{
|
||||
if (should_start_secondary_click_timeout (device))
|
||||
start_secondary_click_timeout (device);
|
||||
}
|
||||
else if (is_secondary_click_pending (device))
|
||||
{
|
||||
stop_secondary_click_timeout (device);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_button_pressed (device))
|
||||
device->ptr_a11y_data->n_btn_pressed--;
|
||||
|
||||
if (is_secondary_click_triggered (device))
|
||||
{
|
||||
emit_button_click (device, CLUTTER_BUTTON_SECONDARY);
|
||||
stop_secondary_click_timeout (device);
|
||||
}
|
||||
|
||||
if (is_secondary_click_pending (device))
|
||||
stop_secondary_click_timeout (device);
|
||||
|
||||
if (is_dwell_dragging (device))
|
||||
emit_dwell_click (device, CLUTTER_A11Y_DWELL_CLICK_TYPE_DRAG);
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
_clutter_is_input_pointer_a11y_enabled (ClutterInputDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
||||
|
||||
return (is_secondary_click_enabled (device) || is_dwell_click_enabled (device));
|
||||
}
|
64
clutter/clutter/clutter-keymap.c
Normal file
64
clutter/clutter/clutter-keymap.c
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Red Hat
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* Author: Carlos Garnacho <carlosg@gnome.org>
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#include "clutter-keymap.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (ClutterKeymap, clutter_keymap, G_TYPE_OBJECT)
|
||||
|
||||
enum
|
||||
{
|
||||
STATE_CHANGED,
|
||||
N_SIGNALS
|
||||
};
|
||||
|
||||
static guint signals[N_SIGNALS] = { 0, };
|
||||
|
||||
static void
|
||||
clutter_keymap_class_init (ClutterKeymapClass *klass)
|
||||
{
|
||||
signals[STATE_CHANGED] =
|
||||
g_signal_new (I_("state-changed"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_keymap_init (ClutterKeymap *keymap)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_keymap_get_num_lock_state (ClutterKeymap *keymap)
|
||||
{
|
||||
return CLUTTER_KEYMAP_GET_CLASS (keymap)->get_num_lock_state (keymap);
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_keymap_get_caps_lock_state (ClutterKeymap *keymap)
|
||||
{
|
||||
return CLUTTER_KEYMAP_GET_CLASS (keymap)->get_caps_lock_state (keymap);
|
||||
}
|
56
clutter/clutter/clutter-keymap.h
Normal file
56
clutter/clutter/clutter-keymap.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Red Hat
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* Author: Carlos Garnacho <carlosg@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef CLUTTER_KEYMAP_H
|
||||
#define CLUTTER_KEYMAP_H
|
||||
|
||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <clutter/clutter-macros.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
typedef struct _ClutterKeymap ClutterKeymap;
|
||||
typedef struct _ClutterKeymapClass ClutterKeymapClass;
|
||||
|
||||
struct _ClutterKeymapClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
gboolean (* get_num_lock_state) (ClutterKeymap *keymap);
|
||||
gboolean (* get_caps_lock_state) (ClutterKeymap *keymap);
|
||||
};
|
||||
|
||||
#define CLUTTER_TYPE_KEYMAP (clutter_keymap_get_type ())
|
||||
CLUTTER_EXPORT
|
||||
G_DECLARE_DERIVABLE_TYPE (ClutterKeymap, clutter_keymap,
|
||||
CLUTTER, KEYMAP,
|
||||
GObject)
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_keymap_get_num_lock_state (ClutterKeymap *keymap);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_keymap_get_caps_lock_state (ClutterKeymap *keymap);
|
||||
|
||||
#endif /* CLUTTER_KEYMAP_H */
|
@@ -58,10 +58,6 @@ die "Could not open file keysymdef.h: $!\n"
|
||||
die "Could not open file clutter-keysyms.h: $!\n"
|
||||
unless open(OUT_KEYSYMS, ">:utf8", "clutter-keysyms.h");
|
||||
|
||||
# Output: clutter/clutter/deprecated/clutter-keysyms.h
|
||||
die "Could not open file clutter-keysyms-compat.h: $!\n"
|
||||
unless open(OUT_KEYSYMS_COMPAT, ">:utf8", "deprecated/clutter-keysyms.h");
|
||||
|
||||
my $LICENSE_HEADER= <<EOF;
|
||||
/* Clutter
|
||||
*
|
||||
@@ -85,7 +81,6 @@ my $LICENSE_HEADER= <<EOF;
|
||||
EOF
|
||||
|
||||
print OUT_KEYSYMS $LICENSE_HEADER;
|
||||
print OUT_KEYSYMS_COMPAT $LICENSE_HEADER;
|
||||
|
||||
print OUT_KEYSYMS<<EOF;
|
||||
|
||||
@@ -104,23 +99,6 @@ print OUT_KEYSYMS<<EOF;
|
||||
|
||||
EOF
|
||||
|
||||
print OUT_KEYSYMS_COMPAT<<EOF;
|
||||
/*
|
||||
* Compatibility version of clutter-keysyms.h.
|
||||
*
|
||||
* Since Clutter 1.4, the key symbol defines have been changed to have
|
||||
* a KEY_ prefix. This is a compatibility header that is included when
|
||||
* deprecated symbols are enabled. Consider porting to the new names
|
||||
* instead.
|
||||
*/
|
||||
|
||||
#ifndef __CLUTTER_KEYSYMS_DEPRECATED_H__
|
||||
#define __CLUTTER_KEYSYMS_DEPRECATED_H__
|
||||
|
||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||
|
||||
EOF
|
||||
|
||||
while (<IN_KEYSYMDEF>)
|
||||
{
|
||||
next if ( ! /^#define / );
|
||||
@@ -137,13 +115,8 @@ while (<IN_KEYSYMDEF>)
|
||||
my $element = $keysymelements[1];
|
||||
my $binding = $element;
|
||||
$binding =~ s/^XK_/CLUTTER_KEY_/g;
|
||||
my $compat_binding = $element;
|
||||
$compat_binding =~ s/^XK_/CLUTTER_/g;
|
||||
|
||||
my $deprecation = "CLUTTER_DEPRECATED_MACRO_FOR(\"Deprecated key symbol. Use $binding instead.\")";
|
||||
|
||||
printf OUT_KEYSYMS "#define %s 0x%03x\n", $binding, hex($keysymelements[2]);
|
||||
printf OUT_KEYSYMS_COMPAT "#define %s 0x%03x %s\n", $compat_binding, hex($keysymelements[2]), $deprecation;
|
||||
}
|
||||
|
||||
close IN_KEYSYMDEF;
|
||||
@@ -187,11 +160,8 @@ while (<IN_XF86KEYSYM>)
|
||||
my $element = $keysymelements[1];
|
||||
my $binding = $element;
|
||||
$binding =~ s/^XF86XK_/CLUTTER_KEY_/g;
|
||||
my $compat_binding = $element;
|
||||
$compat_binding =~ s/^XF86XK_/CLUTTER_/g;
|
||||
|
||||
printf OUT_KEYSYMS "#define %s 0x%03x\n", $binding, hex($keysymelements[2]);
|
||||
printf OUT_KEYSYMS_COMPAT "#define %s 0x%03x\n", $compat_binding, hex($keysymelements[2]);
|
||||
}
|
||||
|
||||
close IN_XF86KEYSYM;
|
||||
@@ -202,13 +172,6 @@ print OUT_KEYSYMS<<EOF;
|
||||
#endif /* __CLUTTER_KEYSYMS_H__ */
|
||||
EOF
|
||||
|
||||
print OUT_KEYSYMS_COMPAT<<EOF;
|
||||
|
||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||
|
||||
#endif /* __CLUTTER_KEYSYMS_DEPRECATED_H__ */
|
||||
EOF
|
||||
|
||||
foreach my $f (qw/ keysymdef.h XF86keysym.h /) {
|
||||
unlink $f or die "Unable to delete $f: $!";
|
||||
}
|
||||
|
@@ -98,11 +98,11 @@
|
||||
* |[
|
||||
* {
|
||||
* "type" : "ClutterBox",
|
||||
* "layout-manager" : { "type" : "ClutterTableLayout" },
|
||||
* "layout-manager" : { "type" : "ClutterGridLayout" },
|
||||
* "children" : [
|
||||
* {
|
||||
* "type" : "ClutterTexture",
|
||||
* "filename" : "image-00.png",
|
||||
* "type" : "ClutterText",
|
||||
* "text" : "Some text",
|
||||
*
|
||||
* "layout::row" : 0,
|
||||
* "layout::column" : 0,
|
||||
@@ -112,8 +112,8 @@
|
||||
* "layout::y-expand" : true
|
||||
* },
|
||||
* {
|
||||
* "type" : "ClutterTexture",
|
||||
* "filename" : "image-01.png",
|
||||
* "type" : "ClutterText",
|
||||
* "text" : "Some more text",
|
||||
*
|
||||
* "layout::row" : 0,
|
||||
* "layout::column" : 1,
|
||||
@@ -329,9 +329,6 @@ layout_manager_real_begin_animation (ClutterLayoutManager *manager,
|
||||
/* let the alpha take ownership of the timeline */
|
||||
g_object_unref (timeline);
|
||||
|
||||
g_signal_connect_swapped (timeline, "completed",
|
||||
G_CALLBACK (clutter_layout_manager_end_animation),
|
||||
manager);
|
||||
g_signal_connect_swapped (timeline, "new-frame",
|
||||
G_CALLBACK (clutter_layout_manager_layout_changed),
|
||||
manager);
|
||||
@@ -375,9 +372,6 @@ layout_manager_real_end_animation (ClutterLayoutManager *manager)
|
||||
if (clutter_timeline_is_playing (timeline))
|
||||
clutter_timeline_stop (timeline);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (timeline,
|
||||
G_CALLBACK (clutter_layout_manager_end_animation),
|
||||
manager);
|
||||
g_signal_handlers_disconnect_by_func (timeline,
|
||||
G_CALLBACK (clutter_layout_manager_layout_changed),
|
||||
manager);
|
||||
@@ -444,8 +438,7 @@ clutter_layout_manager_class_init (ClutterLayoutManagerClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (ClutterLayoutManagerClass,
|
||||
layout_changed),
|
||||
NULL, NULL,
|
||||
_clutter_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
|
@@ -213,15 +213,6 @@ void clutter_layout_manager_child_get_property (ClutterLayoutMa
|
||||
const gchar *property_name,
|
||||
GValue *value);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
ClutterAlpha * clutter_layout_manager_begin_animation (ClutterLayoutManager *manager,
|
||||
guint duration,
|
||||
gulong mode);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_layout_manager_end_animation (ClutterLayoutManager *manager);
|
||||
CLUTTER_DEPRECATED
|
||||
gdouble clutter_layout_manager_get_animation_progress (ClutterLayoutManager *manager);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_LAYOUT_MANAGER_H__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -34,6 +34,45 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_DEBUG_MISC = 1 << 0,
|
||||
CLUTTER_DEBUG_ACTOR = 1 << 1,
|
||||
CLUTTER_DEBUG_TEXTURE = 1 << 2,
|
||||
CLUTTER_DEBUG_EVENT = 1 << 3,
|
||||
CLUTTER_DEBUG_PAINT = 1 << 4,
|
||||
CLUTTER_DEBUG_PANGO = 1 << 5,
|
||||
CLUTTER_DEBUG_BACKEND = 1 << 6,
|
||||
CLUTTER_DEBUG_SCHEDULER = 1 << 7,
|
||||
CLUTTER_DEBUG_SCRIPT = 1 << 8,
|
||||
CLUTTER_DEBUG_SHADER = 1 << 9,
|
||||
CLUTTER_DEBUG_MULTISTAGE = 1 << 10,
|
||||
CLUTTER_DEBUG_ANIMATION = 1 << 11,
|
||||
CLUTTER_DEBUG_LAYOUT = 1 << 12,
|
||||
CLUTTER_DEBUG_PICK = 1 << 13,
|
||||
CLUTTER_DEBUG_EVENTLOOP = 1 << 14,
|
||||
CLUTTER_DEBUG_CLIPPING = 1 << 15,
|
||||
CLUTTER_DEBUG_OOB_TRANSFORMS = 1 << 16,
|
||||
} ClutterDebugFlag;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_DEBUG_NOP_PICKING = 1 << 0,
|
||||
} ClutterPickDebugFlag;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 0,
|
||||
CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS = 1 << 1,
|
||||
CLUTTER_DEBUG_REDRAWS = 1 << 2,
|
||||
CLUTTER_DEBUG_PAINT_VOLUMES = 1 << 3,
|
||||
CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4,
|
||||
CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5,
|
||||
CLUTTER_DEBUG_CONTINUOUS_REDRAW = 1 << 6,
|
||||
CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7,
|
||||
CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8,
|
||||
} ClutterDrawDebugFlag;
|
||||
|
||||
/**
|
||||
* CLUTTER_INIT_ERROR:
|
||||
*
|
||||
@@ -53,7 +92,8 @@ G_BEGIN_DECLS
|
||||
*
|
||||
* Since: 0.2
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_INIT_SUCCESS = 1,
|
||||
CLUTTER_INIT_ERROR_UNKNOWN = 0,
|
||||
CLUTTER_INIT_ERROR_THREADS = -1,
|
||||
@@ -116,9 +156,6 @@ void clutter_disable_accessibility (void);
|
||||
|
||||
/* Threading functions */
|
||||
CLUTTER_EXPORT
|
||||
void clutter_threads_set_lock_functions (GCallback enter_fn,
|
||||
GCallback leave_fn);
|
||||
CLUTTER_EXPORT
|
||||
guint clutter_threads_add_idle (GSourceFunc func,
|
||||
gpointer data);
|
||||
CLUTTER_EXPORT
|
||||
@@ -148,19 +185,6 @@ guint clutter_threads_add_repaint_func_full (ClutterRepaintF
|
||||
CLUTTER_EXPORT
|
||||
void clutter_threads_remove_repaint_func (guint handle_id);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_grab_pointer (ClutterActor *actor);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_ungrab_pointer (void);
|
||||
CLUTTER_EXPORT
|
||||
ClutterActor * clutter_get_pointer_grab (void);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_grab_keyboard (ClutterActor *actor);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_ungrab_keyboard (void);
|
||||
CLUTTER_EXPORT
|
||||
ClutterActor * clutter_get_keyboard_grab (void);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
PangoFontMap * clutter_get_font_map (void);
|
||||
|
||||
@@ -173,6 +197,15 @@ guint clutter_get_default_frame_rate (void);
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_check_windowing_backend (const char *backend_type);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_add_debug_flags (ClutterDebugFlag debug_flags,
|
||||
ClutterDrawDebugFlag draw_flags,
|
||||
ClutterPickDebugFlag pick_flags);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_remove_debug_flags (ClutterDebugFlag debug_flags,
|
||||
ClutterDrawDebugFlag draw_flags,
|
||||
ClutterPickDebugFlag pick_flags);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
BOOLEAN:BOXED
|
||||
BOOLEAN:BOXED,INT,INT
|
||||
BOOLEAN:OBJECT,BOOLEAN
|
||||
BOOLEAN:OBJECT,BOXED
|
||||
BOOLEAN:OBJECT,BOXED,DOUBLE
|
||||
BOOLEAN:OBJECT,DOUBLE
|
||||
BOOLEAN:OBJECT,ENUM
|
||||
@@ -11,29 +12,24 @@ BOOLEAN:OBJECT,FLOAT,FLOAT
|
||||
BOXED:UINT,UINT
|
||||
DOUBLE:VOID
|
||||
UINT:VOID
|
||||
VOID:BOOLEAN
|
||||
VOID:BOXED
|
||||
VOID:BOXED,FLAGS
|
||||
VOID:INT
|
||||
VOID:INT64,INT64,FLOAT,BOOLEAN
|
||||
VOID:INT,INT
|
||||
VOID:INT,POINTER
|
||||
VOID:FLOAT,FLOAT
|
||||
VOID:INT,INT,INT,INT
|
||||
VOID:OBJECT
|
||||
VOID:OBJECT,FLAGS
|
||||
VOID:OBJECT,FLAGS,BOOLEAN
|
||||
VOID:OBJECT,FLAGS,UINT
|
||||
VOID:OBJECT,FLOAT,FLOAT
|
||||
VOID:OBJECT,FLOAT,FLOAT,FLAGS
|
||||
VOID:OBJECT,OBJECT
|
||||
VOID:OBJECT,PARAM
|
||||
VOID:OBJECT,POINTER
|
||||
VOID:OBJECT,UINT
|
||||
VOID:POINTER
|
||||
VOID:STRING,BOOLEAN
|
||||
VOID:STRING,BOOLEAN,BOOLEAN
|
||||
VOID:STRING,INT
|
||||
VOID:UINT
|
||||
VOID:UINT,STRING,UINT
|
||||
VOID:UINT,UINT
|
||||
VOID:VOID
|
||||
VOID:STRING,INT,POINTER
|
||||
|
@@ -64,9 +64,6 @@ struct _ClutterMasterClockDefault
|
||||
/* the current state of the clock, in usecs */
|
||||
gint64 cur_tick;
|
||||
|
||||
/* the previous state of the clock, in usecs, used to compute the delta */
|
||||
gint64 prev_tick;
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
gint64 frame_budget;
|
||||
gint64 remaining_budget;
|
||||
@@ -77,12 +74,6 @@ struct _ClutterMasterClockDefault
|
||||
*/
|
||||
GSource *source;
|
||||
|
||||
/* If the master clock is idle that means it has
|
||||
* fallen back to idle polling for timeline
|
||||
* progressions and it may have been some time since
|
||||
* the last real stage update.
|
||||
*/
|
||||
guint idle : 1;
|
||||
guint ensure_next_iteration : 1;
|
||||
|
||||
guint paused : 1;
|
||||
@@ -109,7 +100,8 @@ static GSourceFuncs clock_funcs = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static void clutter_master_clock_iface_init (ClutterMasterClockIface *iface);
|
||||
static void
|
||||
clutter_master_clock_iface_init (ClutterMasterClockInterface *iface);
|
||||
|
||||
#define clutter_master_clock_default_get_type _clutter_master_clock_default_get_type
|
||||
|
||||
@@ -274,78 +266,12 @@ master_clock_reschedule_stage_updates (ClutterMasterClockDefault *master_clock,
|
||||
static gint
|
||||
master_clock_next_frame_delay (ClutterMasterClockDefault *master_clock)
|
||||
{
|
||||
gint64 now, next;
|
||||
gint swap_delay;
|
||||
|
||||
if (!master_clock_is_running (master_clock))
|
||||
return -1;
|
||||
|
||||
/* If all of the stages are busy waiting for a swap-buffers to complete
|
||||
* then we wait for one to be ready.. */
|
||||
swap_delay = master_clock_get_swap_wait_time (master_clock);
|
||||
if (swap_delay != 0)
|
||||
return swap_delay;
|
||||
|
||||
/* When we have sync-to-vblank, we count on swap-buffer requests (or
|
||||
* swap-buffer-complete events if supported in the backend) to throttle our
|
||||
* frame rate so no additional delay is needed to start the next frame.
|
||||
*
|
||||
* If the master-clock has become idle due to no timeline progression causing
|
||||
* redraws then we can no longer rely on vblank synchronization because the
|
||||
* last real stage update/redraw may have happened a long time ago and so we
|
||||
* fallback to polling for timeline progressions every 1/frame_rate seconds.
|
||||
*
|
||||
* (NB: if there aren't even any timelines running then the master clock will
|
||||
* be completely stopped in master_clock_is_running())
|
||||
*/
|
||||
if (clutter_feature_available (CLUTTER_FEATURE_SWAP_THROTTLE) &&
|
||||
!master_clock->idle)
|
||||
{
|
||||
CLUTTER_NOTE (SCHEDULER, "swap throttling available and updated stages");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (master_clock->prev_tick == 0)
|
||||
{
|
||||
/* If we weren't previously running, then draw the next frame
|
||||
* immediately
|
||||
*/
|
||||
CLUTTER_NOTE (SCHEDULER, "draw the first frame immediately");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Otherwise, wait at least 1/frame_rate seconds since we last
|
||||
* started a frame
|
||||
*/
|
||||
now = g_source_get_time (master_clock->source);
|
||||
|
||||
next = master_clock->prev_tick;
|
||||
|
||||
/* If time has gone backwards then there's no way of knowing how
|
||||
long we should wait so let's just dispatch immediately */
|
||||
if (now <= next)
|
||||
{
|
||||
CLUTTER_NOTE (SCHEDULER, "Time has gone backwards");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
next += (1000000L / clutter_get_default_frame_rate ());
|
||||
|
||||
if (next <= now)
|
||||
{
|
||||
CLUTTER_NOTE (SCHEDULER, "Less than %lu microsecs",
|
||||
1000000L / (gulong) clutter_get_default_frame_rate ());
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
CLUTTER_NOTE (SCHEDULER, "Waiting %" G_GINT64_FORMAT " msecs",
|
||||
(next - now) / 1000);
|
||||
|
||||
return (next - now) / 1000;
|
||||
}
|
||||
return master_clock_get_swap_wait_time (master_clock);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -411,8 +337,7 @@ master_clock_advance_timelines (ClutterMasterClockDefault *master_clock)
|
||||
for (l = timelines; l != NULL; l = l->next)
|
||||
_clutter_timeline_do_tick (l->data, master_clock->cur_tick / 1000);
|
||||
|
||||
g_slist_foreach (timelines, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (timelines);
|
||||
g_slist_free_full (timelines, g_object_unref);
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
if (_clutter_diagnostic_enabled ())
|
||||
@@ -530,7 +455,6 @@ clutter_clock_dispatch (GSource *source,
|
||||
{
|
||||
ClutterClockSource *clock_source = (ClutterClockSource *) source;
|
||||
ClutterMasterClockDefault *master_clock = clock_source->master_clock;
|
||||
gboolean stages_updated = FALSE;
|
||||
GSList *stages;
|
||||
|
||||
CLUTTER_NOTE (SCHEDULER, "Master clock [tick]");
|
||||
@@ -550,8 +474,6 @@ clutter_clock_dispatch (GSource *source,
|
||||
*/
|
||||
stages = master_clock_list_ready_stages (master_clock);
|
||||
|
||||
master_clock->idle = FALSE;
|
||||
|
||||
/* Each frame is split into three separate phases: */
|
||||
|
||||
/* 1. process all the events; each stage goes through its events queue
|
||||
@@ -564,19 +486,11 @@ clutter_clock_dispatch (GSource *source,
|
||||
master_clock_advance_timelines (master_clock);
|
||||
|
||||
/* 3. relayout and redraw the stages */
|
||||
stages_updated = master_clock_update_stages (master_clock, stages);
|
||||
|
||||
/* The master clock goes idle if no stages were updated and falls back
|
||||
* to polling for timeline progressions... */
|
||||
if (!stages_updated)
|
||||
master_clock->idle = TRUE;
|
||||
master_clock_update_stages (master_clock, stages);
|
||||
|
||||
master_clock_reschedule_stage_updates (master_clock, stages);
|
||||
|
||||
g_slist_foreach (stages, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (stages);
|
||||
|
||||
master_clock->prev_tick = master_clock->cur_tick;
|
||||
g_slist_free_full (stages, g_object_unref);
|
||||
|
||||
_clutter_threads_release_lock ();
|
||||
|
||||
@@ -609,7 +523,6 @@ clutter_master_clock_default_init (ClutterMasterClockDefault *self)
|
||||
source = clutter_clock_source_new (self);
|
||||
self->source = source;
|
||||
|
||||
self->idle = FALSE;
|
||||
self->ensure_next_iteration = FALSE;
|
||||
self->paused = FALSE;
|
||||
|
||||
@@ -689,7 +602,7 @@ clutter_master_clock_default_set_paused (ClutterMasterClock *clock,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_master_clock_iface_init (ClutterMasterClockIface *iface)
|
||||
clutter_master_clock_iface_init (ClutterMasterClockInterface *iface)
|
||||
{
|
||||
iface->add_timeline = clutter_master_clock_default_add_timeline;
|
||||
iface->remove_timeline = clutter_master_clock_default_remove_timeline;
|
||||
|
@@ -37,10 +37,6 @@
|
||||
#include "clutter-master-clock-default.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
#define clutter_master_clock_get_type _clutter_master_clock_get_type
|
||||
|
||||
typedef ClutterMasterClockIface ClutterMasterClockInterface;
|
||||
|
||||
G_DEFINE_INTERFACE (ClutterMasterClock, clutter_master_clock, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
|
@@ -28,15 +28,12 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_MASTER_CLOCK (_clutter_master_clock_get_type ())
|
||||
#define CLUTTER_MASTER_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_MASTER_CLOCK, ClutterMasterClock))
|
||||
#define CLUTTER_IS_MASTER_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_MASTER_CLOCK))
|
||||
#define CLUTTER_MASTER_CLOCK_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_MASTER_CLOCK, ClutterMasterClockIface))
|
||||
#define CLUTTER_TYPE_MASTER_CLOCK (clutter_master_clock_get_type ())
|
||||
G_DECLARE_INTERFACE (ClutterMasterClock, clutter_master_clock,
|
||||
CLUTTER, MASTER_CLOCK,
|
||||
GObject)
|
||||
|
||||
typedef struct _ClutterMasterClock ClutterMasterClock; /* dummy */
|
||||
typedef struct _ClutterMasterClockIface ClutterMasterClockIface;
|
||||
|
||||
struct _ClutterMasterClockIface
|
||||
struct _ClutterMasterClockInterface
|
||||
{
|
||||
/*< private >*/
|
||||
GTypeInterface parent_iface;
|
||||
@@ -51,8 +48,6 @@ struct _ClutterMasterClockIface
|
||||
gboolean paused);
|
||||
};
|
||||
|
||||
GType _clutter_master_clock_get_type (void) G_GNUC_CONST;
|
||||
|
||||
ClutterMasterClock * _clutter_master_clock_get_default (void);
|
||||
void _clutter_master_clock_add_timeline (ClutterMasterClock *master_clock,
|
||||
ClutterTimeline *timeline);
|
||||
|
@@ -26,10 +26,15 @@
|
||||
#define __CLUTTER_H_INSIDE__
|
||||
|
||||
#include "clutter-backend.h"
|
||||
#include "clutter-device-manager-private.h"
|
||||
#include "clutter-event-private.h"
|
||||
#include "clutter-input-pointer-a11y-private.h"
|
||||
#include "clutter-macros.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-stage-private.h"
|
||||
#include "clutter-stage-view.h"
|
||||
#include "cogl/clutter-stage-cogl.h"
|
||||
#include "x11/clutter-stage-x11.h"
|
||||
#include "clutter/x11/clutter-backend-x11.h"
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_set_custom_backend_func (ClutterBackend *(* func) (void));
|
||||
@@ -49,6 +54,12 @@ void clutter_stage_freeze_updates (ClutterStage *stage);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_stage_thaw_updates (ClutterStage *stage);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_stage_update_resource_scales (ClutterStage *stage);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_has_damage (ClutterActor *actor);
|
||||
|
||||
#undef __CLUTTER_H_INSIDE__
|
||||
|
||||
#endif /* __CLUTTER_MUTTER_H__ */
|
||||
|
@@ -66,12 +66,17 @@
|
||||
|
||||
#include "clutter-offscreen-effect.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "cogl/cogl.h"
|
||||
|
||||
#include "clutter-actor-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-stage-private.h"
|
||||
#include "clutter-paint-context-private.h"
|
||||
#include "clutter-paint-volume-private.h"
|
||||
#include "clutter-actor-box-private.h"
|
||||
|
||||
struct _ClutterOffscreenEffectPrivate
|
||||
{
|
||||
@@ -82,27 +87,19 @@ struct _ClutterOffscreenEffectPrivate
|
||||
ClutterActor *actor;
|
||||
ClutterActor *stage;
|
||||
|
||||
gfloat x_offset;
|
||||
gfloat y_offset;
|
||||
graphene_point3d_t position;
|
||||
|
||||
int fbo_offset_x;
|
||||
int fbo_offset_y;
|
||||
|
||||
/* This is the calculated size of the fbo before being passed
|
||||
through create_texture(). This needs to be tracked separately so
|
||||
that we can detect when a different size is calculated and
|
||||
regenerate the fbo */
|
||||
int fbo_width;
|
||||
int fbo_height;
|
||||
int target_width;
|
||||
int target_height;
|
||||
|
||||
gint old_opacity_override;
|
||||
|
||||
/* The matrix that was current the last time the fbo was updated. We
|
||||
need to keep track of this to detect when we can reuse the
|
||||
contents of the fbo without redrawing the actor. We need the
|
||||
actual matrix rather than just detecting queued redraws on the
|
||||
actor because any change in the parent hierarchy (even just a
|
||||
translation) could cause the actor to look completely different
|
||||
and it won't cause a redraw to be queued on the parent's
|
||||
children. */
|
||||
CoglMatrix last_matrix_drawn;
|
||||
};
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (ClutterOffscreenEffect,
|
||||
@@ -121,11 +118,7 @@ clutter_offscreen_effect_set_actor (ClutterActorMeta *meta,
|
||||
meta_class->set_actor (meta, actor);
|
||||
|
||||
/* clear out the previous state */
|
||||
if (priv->offscreen != NULL)
|
||||
{
|
||||
cogl_handle_unref (priv->offscreen);
|
||||
priv->offscreen = NULL;
|
||||
}
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
|
||||
/* we keep a back pointer here, to avoid going through the ActorMeta */
|
||||
priv->actor = clutter_actor_meta_get_actor (meta);
|
||||
@@ -141,8 +134,35 @@ clutter_offscreen_effect_real_create_texture (ClutterOffscreenEffect *effect,
|
||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE);
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_pipeline_filter_for_scale (ClutterOffscreenEffect *self,
|
||||
float resource_scale)
|
||||
{
|
||||
CoglPipelineFilter filter;
|
||||
|
||||
if (!self->priv->target)
|
||||
return;
|
||||
|
||||
/* If no fractional scaling is set, we're always going to render the texture
|
||||
at a 1:1 texel:pixel ratio so, in such case we can use 'nearest' filtering
|
||||
to decrease the effects of rounding errors in the geometry calculation;
|
||||
if instead we we're using a global fractional scaling we need to make sure
|
||||
that we're using the default linear effect, not to create artifacts when
|
||||
scaling down the texture */
|
||||
if (fmodf (resource_scale, 1.0f) == 0)
|
||||
filter = COGL_PIPELINE_FILTER_NEAREST;
|
||||
else
|
||||
filter = COGL_PIPELINE_FILTER_LINEAR;
|
||||
|
||||
cogl_pipeline_set_layer_filters (self->priv->target, 0 /* layer_index */,
|
||||
filter, filter);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
|
||||
update_fbo (ClutterEffect *effect,
|
||||
int target_width,
|
||||
int target_height,
|
||||
float resource_scale)
|
||||
{
|
||||
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
ClutterOffscreenEffectPrivate *priv = self->priv;
|
||||
@@ -157,10 +177,13 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (priv->fbo_width == fbo_width &&
|
||||
priv->fbo_height == fbo_height &&
|
||||
if (priv->target_width == target_width &&
|
||||
priv->target_height == target_height &&
|
||||
priv->offscreen != NULL)
|
||||
{
|
||||
ensure_pipeline_filter_for_scale (self, resource_scale);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (priv->target == NULL)
|
||||
{
|
||||
@@ -168,48 +191,32 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
|
||||
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||
|
||||
priv->target = cogl_pipeline_new (ctx);
|
||||
|
||||
/* We're always going to render the texture at a 1:1 texel:pixel
|
||||
ratio so we can use 'nearest' filtering to decrease the
|
||||
effects of rounding errors in the geometry calculation */
|
||||
cogl_pipeline_set_layer_filters (priv->target,
|
||||
0, /* layer_index */
|
||||
COGL_PIPELINE_FILTER_NEAREST,
|
||||
COGL_PIPELINE_FILTER_NEAREST);
|
||||
ensure_pipeline_filter_for_scale (self, resource_scale);
|
||||
}
|
||||
|
||||
if (priv->texture != NULL)
|
||||
{
|
||||
cogl_handle_unref (priv->texture);
|
||||
priv->texture = NULL;
|
||||
}
|
||||
|
||||
if (priv->offscreen != NULL)
|
||||
{
|
||||
cogl_handle_unref (priv->offscreen);
|
||||
priv->offscreen = NULL;
|
||||
}
|
||||
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
|
||||
priv->texture =
|
||||
clutter_offscreen_effect_create_texture (self, fbo_width, fbo_height);
|
||||
clutter_offscreen_effect_create_texture (self, target_width, target_height);
|
||||
if (priv->texture == NULL)
|
||||
return FALSE;
|
||||
|
||||
cogl_pipeline_set_layer_texture (priv->target, 0, priv->texture);
|
||||
|
||||
priv->fbo_width = fbo_width;
|
||||
priv->fbo_height = fbo_height;
|
||||
priv->target_width = target_width;
|
||||
priv->target_height = target_height;
|
||||
|
||||
priv->offscreen = cogl_offscreen_new_to_texture (priv->texture);
|
||||
if (priv->offscreen == NULL)
|
||||
{
|
||||
g_warning ("%s: Unable to create an Offscreen buffer", G_STRLOC);
|
||||
|
||||
cogl_handle_unref (priv->target);
|
||||
cogl_object_unref (priv->target);
|
||||
priv->target = NULL;
|
||||
|
||||
priv->fbo_width = 0;
|
||||
priv->fbo_height = 0;
|
||||
priv->target_width = 0;
|
||||
priv->target_height = 0;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -218,19 +225,25 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
|
||||
clutter_offscreen_effect_pre_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
ClutterOffscreenEffectPrivate *priv = self->priv;
|
||||
ClutterActorBox box;
|
||||
ClutterActorBox raw_box, box;
|
||||
ClutterActor *stage;
|
||||
CoglMatrix projection;
|
||||
CoglMatrix projection, old_modelview, modelview;
|
||||
const ClutterPaintVolume *volume;
|
||||
CoglColor transparent;
|
||||
gfloat stage_width, stage_height;
|
||||
gfloat fbo_width = -1, fbo_height = -1;
|
||||
gfloat width, height;
|
||||
gfloat xexpand, yexpand;
|
||||
int texture_width, texture_height;
|
||||
gfloat target_width = -1, target_height = -1;
|
||||
CoglFramebuffer *framebuffer;
|
||||
gfloat resource_scale;
|
||||
gfloat ceiled_resource_scale;
|
||||
graphene_point3d_t local_offset;
|
||||
gfloat old_viewport[4];
|
||||
|
||||
local_offset = GRAPHENE_POINT3D_INIT (0.0f, 0.0f, 0.0f);
|
||||
|
||||
if (!clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (effect)))
|
||||
return FALSE;
|
||||
@@ -241,101 +254,109 @@ clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
|
||||
stage = _clutter_actor_get_stage_internal (priv->actor);
|
||||
clutter_actor_get_size (stage, &stage_width, &stage_height);
|
||||
|
||||
/* The paint box is the bounding box of the actor's paint volume in
|
||||
* stage coordinates. This will give us the size for the framebuffer
|
||||
* we need to redirect its rendering offscreen and its position will
|
||||
* be used to setup an offset viewport */
|
||||
if (clutter_actor_get_paint_box (priv->actor, &box))
|
||||
if (_clutter_actor_get_real_resource_scale (priv->actor, &resource_scale))
|
||||
{
|
||||
clutter_actor_box_get_size (&box, &fbo_width, &fbo_height);
|
||||
clutter_actor_box_get_origin (&box, &priv->x_offset, &priv->y_offset);
|
||||
|
||||
fbo_width = MIN (fbo_width, stage_width);
|
||||
fbo_height = MIN (fbo_height, stage_height);
|
||||
ceiled_resource_scale = ceilf (resource_scale);
|
||||
stage_width *= ceiled_resource_scale;
|
||||
stage_height *= ceiled_resource_scale;
|
||||
}
|
||||
else
|
||||
{
|
||||
fbo_width = stage_width;
|
||||
fbo_height = stage_height;
|
||||
/* We are sure we have a resource scale set to a good value at paint */
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
if (fbo_width == stage_width)
|
||||
priv->x_offset = 0.0f;
|
||||
if (fbo_height == stage_height)
|
||||
priv->y_offset = 0.0f;
|
||||
/* Get the minimal bounding box for what we want to paint, relative to the
|
||||
* parent of priv->actor. Note that we may actually be painting a clone of
|
||||
* priv->actor so we need to be careful to avoid querying the transformation
|
||||
* of priv->actor (like clutter_actor_get_paint_box would). Just stay in
|
||||
* local coordinates for now...
|
||||
*/
|
||||
volume = clutter_actor_get_paint_volume (priv->actor);
|
||||
if (volume)
|
||||
{
|
||||
ClutterPaintVolume mutable_volume;
|
||||
|
||||
_clutter_paint_volume_copy_static (volume, &mutable_volume);
|
||||
_clutter_paint_volume_get_bounding_box (&mutable_volume, &raw_box);
|
||||
clutter_paint_volume_free (&mutable_volume);
|
||||
}
|
||||
else
|
||||
{
|
||||
clutter_actor_get_allocation_box (priv->actor, &raw_box);
|
||||
}
|
||||
|
||||
box = raw_box;
|
||||
_clutter_actor_box_enlarge_for_effects (&box);
|
||||
|
||||
priv->fbo_offset_x = box.x1 - raw_box.x1;
|
||||
priv->fbo_offset_y = box.y1 - raw_box.y1;
|
||||
|
||||
clutter_actor_box_scale (&box, ceiled_resource_scale);
|
||||
clutter_actor_box_get_size (&box, &target_width, &target_height);
|
||||
|
||||
target_width = ceilf (target_width);
|
||||
target_height = ceilf (target_height);
|
||||
|
||||
/* First assert that the framebuffer is the right size... */
|
||||
if (!update_fbo (effect, fbo_width, fbo_height))
|
||||
if (!update_fbo (effect, target_width, target_height, resource_scale))
|
||||
return FALSE;
|
||||
|
||||
texture_width = cogl_texture_get_width (priv->texture);
|
||||
texture_height = cogl_texture_get_height (priv->texture);
|
||||
framebuffer = clutter_paint_context_get_framebuffer (paint_context);
|
||||
cogl_framebuffer_get_modelview_matrix (framebuffer, &old_modelview);
|
||||
|
||||
/* get the current modelview matrix so that we can copy it to the
|
||||
* framebuffer. We also store the matrix that was last used when we
|
||||
* updated the FBO so that we can detect when we don't need to
|
||||
* update the FBO to paint a second time */
|
||||
cogl_get_modelview_matrix (&priv->last_matrix_drawn);
|
||||
clutter_paint_context_push_framebuffer (paint_context, priv->offscreen);
|
||||
|
||||
/* let's draw offscreen */
|
||||
cogl_push_framebuffer (priv->offscreen);
|
||||
|
||||
/* Copy the modelview that would have been used if rendering onscreen */
|
||||
cogl_set_modelview_matrix (&priv->last_matrix_drawn);
|
||||
|
||||
/* Set up the viewport so that it has the same size as the stage,
|
||||
* but offset it so that the actor of interest lands on our
|
||||
* framebuffer. */
|
||||
clutter_actor_get_size (priv->stage, &width, &height);
|
||||
|
||||
/* Expand the viewport if the actor is partially off-stage,
|
||||
* otherwise the actor will end up clipped to the stage viewport
|
||||
/* We don't want the FBO contents to be transformed. That could waste memory
|
||||
* (e.g. during zoom), or result in something that's not rectangular (clipped
|
||||
* incorrectly). So drop the modelview matrix of the current paint chain.
|
||||
* This is fine since paint_texture runs with the same modelview matrix,
|
||||
* so it will come out correctly whenever that is used to put the FBO
|
||||
* contents on screen...
|
||||
*/
|
||||
xexpand = 0.f;
|
||||
if (priv->x_offset < 0.f)
|
||||
xexpand = -priv->x_offset;
|
||||
if (priv->x_offset + texture_width > width)
|
||||
xexpand = MAX (xexpand, (priv->x_offset + texture_width) - width);
|
||||
clutter_actor_get_transform (priv->stage, &modelview);
|
||||
cogl_framebuffer_set_modelview_matrix (priv->offscreen, &modelview);
|
||||
|
||||
yexpand = 0.f;
|
||||
if (priv->y_offset < 0.f)
|
||||
yexpand = -priv->y_offset;
|
||||
if (priv->y_offset + texture_height > height)
|
||||
yexpand = MAX (yexpand, (priv->y_offset + texture_height) - height);
|
||||
/* Save the original viewport for calculating priv->position */
|
||||
_clutter_stage_get_viewport (CLUTTER_STAGE (priv->stage),
|
||||
&old_viewport[0],
|
||||
&old_viewport[1],
|
||||
&old_viewport[2],
|
||||
&old_viewport[3]);
|
||||
|
||||
/* Set the viewport */
|
||||
cogl_set_viewport (-(priv->x_offset + xexpand), -(priv->y_offset + yexpand),
|
||||
width + (2 * xexpand), height + (2 * yexpand));
|
||||
/* Set up the viewport so that it has the same size as the stage (avoid
|
||||
* distortion), but translated to account for the FBO offset...
|
||||
*/
|
||||
cogl_framebuffer_set_viewport (priv->offscreen,
|
||||
-priv->fbo_offset_x,
|
||||
-priv->fbo_offset_y,
|
||||
stage_width,
|
||||
stage_height);
|
||||
|
||||
/* Copy the stage's projection matrix across to the framebuffer */
|
||||
_clutter_stage_get_projection_matrix (CLUTTER_STAGE (priv->stage),
|
||||
&projection);
|
||||
|
||||
/* If we've expanded the viewport, make sure to scale the projection
|
||||
* matrix accordingly (as it's been initialised to work with the
|
||||
* original viewport and not our expanded one).
|
||||
/* Now save the global position of the effect (not just of the actor).
|
||||
* It doesn't appear anyone actually uses this yet, but get_target_rect is
|
||||
* documented as returning it. So we should...
|
||||
*/
|
||||
if (xexpand > 0.f || yexpand > 0.f)
|
||||
{
|
||||
gfloat new_width, new_height;
|
||||
_clutter_util_fully_transform_vertices (&old_modelview,
|
||||
&projection,
|
||||
old_viewport,
|
||||
&local_offset,
|
||||
&priv->position,
|
||||
1);
|
||||
|
||||
new_width = width + (2 * xexpand);
|
||||
new_height = height + (2 * yexpand);
|
||||
|
||||
cogl_matrix_scale (&projection,
|
||||
width / new_width,
|
||||
height / new_height,
|
||||
1);
|
||||
}
|
||||
|
||||
cogl_set_projection_matrix (&projection);
|
||||
cogl_framebuffer_set_projection_matrix (priv->offscreen, &projection);
|
||||
|
||||
cogl_color_init_from_4ub (&transparent, 0, 0, 0, 0);
|
||||
cogl_clear (&transparent,
|
||||
COGL_BUFFER_BIT_COLOR |
|
||||
COGL_BUFFER_BIT_DEPTH);
|
||||
cogl_framebuffer_clear (priv->offscreen,
|
||||
COGL_BUFFER_BIT_COLOR |
|
||||
COGL_BUFFER_BIT_DEPTH,
|
||||
&transparent);
|
||||
|
||||
cogl_push_matrix ();
|
||||
cogl_framebuffer_push_matrix (priv->offscreen);
|
||||
|
||||
/* Override the actor's opacity to fully opaque - we paint the offscreen
|
||||
* texture with the actor's paint opacity, so we need to do this to avoid
|
||||
@@ -349,10 +370,12 @@ clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_real_paint_target (ClutterOffscreenEffect *effect)
|
||||
clutter_offscreen_effect_real_paint_target (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterOffscreenEffectPrivate *priv = effect->priv;
|
||||
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
|
||||
CoglFramebuffer *framebuffer =
|
||||
clutter_paint_context_get_framebuffer (paint_context);
|
||||
guint8 paint_opacity;
|
||||
|
||||
paint_opacity = clutter_actor_get_paint_opacity (priv->actor);
|
||||
@@ -378,35 +401,50 @@ clutter_offscreen_effect_real_paint_target (ClutterOffscreenEffect *effect)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_paint_texture (ClutterOffscreenEffect *effect)
|
||||
clutter_offscreen_effect_paint_texture (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterOffscreenEffectPrivate *priv = effect->priv;
|
||||
CoglFramebuffer *framebuffer =
|
||||
clutter_paint_context_get_framebuffer (paint_context);
|
||||
CoglMatrix modelview;
|
||||
float resource_scale;
|
||||
|
||||
cogl_push_matrix ();
|
||||
cogl_framebuffer_push_matrix (framebuffer);
|
||||
|
||||
/* Now reset the modelview to put us in stage coordinates so
|
||||
* we can drawn the result of our offscreen render as a textured
|
||||
* quad... */
|
||||
/* The current modelview matrix is *almost* perfect already. It's only
|
||||
* missing a correction for the expanded FBO and offset rendering within...
|
||||
*/
|
||||
cogl_framebuffer_get_modelview_matrix (framebuffer, &modelview);
|
||||
|
||||
cogl_matrix_init_identity (&modelview);
|
||||
_clutter_actor_apply_modelview_transform (priv->stage, &modelview);
|
||||
cogl_matrix_translate (&modelview, priv->x_offset, priv->y_offset, 0.0f);
|
||||
cogl_set_modelview_matrix (&modelview);
|
||||
if (clutter_actor_get_resource_scale (priv->actor, &resource_scale) &&
|
||||
resource_scale != 1.0f)
|
||||
{
|
||||
float paint_scale = 1.0f / resource_scale;
|
||||
cogl_matrix_scale (&modelview, paint_scale, paint_scale, 1);
|
||||
}
|
||||
|
||||
cogl_matrix_translate (&modelview,
|
||||
priv->fbo_offset_x,
|
||||
priv->fbo_offset_y,
|
||||
0.0f);
|
||||
cogl_framebuffer_set_modelview_matrix (framebuffer, &modelview);
|
||||
|
||||
/* paint the target material; this is virtualized for
|
||||
* sub-classes that require special hand-holding
|
||||
*/
|
||||
clutter_offscreen_effect_paint_target (effect);
|
||||
clutter_offscreen_effect_paint_target (effect, paint_context);
|
||||
|
||||
cogl_pop_matrix ();
|
||||
cogl_framebuffer_pop_matrix (framebuffer);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_post_paint (ClutterEffect *effect)
|
||||
clutter_offscreen_effect_post_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
ClutterOffscreenEffectPrivate *priv = self->priv;
|
||||
CoglFramebuffer *framebuffer;
|
||||
|
||||
if (priv->offscreen == NULL ||
|
||||
priv->target == NULL ||
|
||||
@@ -416,36 +454,53 @@ clutter_offscreen_effect_post_paint (ClutterEffect *effect)
|
||||
/* Restore the previous opacity override */
|
||||
clutter_actor_set_opacity_override (priv->actor, priv->old_opacity_override);
|
||||
|
||||
cogl_pop_matrix ();
|
||||
cogl_pop_framebuffer ();
|
||||
framebuffer = clutter_paint_context_get_framebuffer (paint_context);
|
||||
cogl_framebuffer_pop_matrix (framebuffer);
|
||||
clutter_paint_context_pop_framebuffer (paint_context);
|
||||
|
||||
clutter_offscreen_effect_paint_texture (self);
|
||||
clutter_offscreen_effect_paint_texture (self, paint_context);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_paint (ClutterEffect *effect,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
ClutterOffscreenEffectPrivate *priv = self->priv;
|
||||
CoglMatrix matrix;
|
||||
|
||||
cogl_get_modelview_matrix (&matrix);
|
||||
|
||||
/* If we've already got a cached image for the same matrix and the
|
||||
actor hasn't been redrawn then we can just use the cached image
|
||||
in the fbo */
|
||||
if (priv->offscreen == NULL ||
|
||||
(flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY) ||
|
||||
!cogl_matrix_equal (&matrix, &priv->last_matrix_drawn))
|
||||
/* If we've already got a cached image and the actor hasn't been redrawn
|
||||
* then we can just use the cached image in the FBO.
|
||||
*/
|
||||
if (priv->offscreen == NULL || (flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY))
|
||||
{
|
||||
/* Chain up to the parent paint method which will call the pre and
|
||||
post paint functions to update the image */
|
||||
CLUTTER_EFFECT_CLASS (clutter_offscreen_effect_parent_class)->
|
||||
paint (effect, flags);
|
||||
ClutterEffectClass *effect_class = CLUTTER_EFFECT_GET_CLASS (effect);
|
||||
gboolean pre_paint_succeeded;
|
||||
|
||||
pre_paint_succeeded = effect_class->pre_paint (effect, paint_context);
|
||||
|
||||
clutter_actor_continue_paint (priv->actor, paint_context);
|
||||
|
||||
if (pre_paint_succeeded)
|
||||
effect_class->post_paint (effect, paint_context);
|
||||
else
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
}
|
||||
else
|
||||
clutter_offscreen_effect_paint_texture (self);
|
||||
clutter_offscreen_effect_paint_texture (self, paint_context);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_notify (GObject *gobject,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ClutterOffscreenEffect *offscreen_effect = CLUTTER_OFFSCREEN_EFFECT (gobject);
|
||||
ClutterOffscreenEffectPrivate *priv = offscreen_effect->priv;
|
||||
|
||||
if (strcmp (pspec->name, "enabled") == 0)
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
|
||||
G_OBJECT_CLASS (clutter_offscreen_effect_parent_class)->notify (gobject, pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -454,14 +509,9 @@ clutter_offscreen_effect_finalize (GObject *gobject)
|
||||
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (gobject);
|
||||
ClutterOffscreenEffectPrivate *priv = self->priv;
|
||||
|
||||
if (priv->offscreen)
|
||||
cogl_handle_unref (priv->offscreen);
|
||||
|
||||
if (priv->target)
|
||||
cogl_handle_unref (priv->target);
|
||||
|
||||
if (priv->texture)
|
||||
cogl_handle_unref (priv->texture);
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||
g_clear_pointer (&priv->target, cogl_object_unref);
|
||||
|
||||
G_OBJECT_CLASS (clutter_offscreen_effect_parent_class)->finalize (gobject);
|
||||
}
|
||||
@@ -483,6 +533,7 @@ clutter_offscreen_effect_class_init (ClutterOffscreenEffectClass *klass)
|
||||
effect_class->paint = clutter_offscreen_effect_paint;
|
||||
|
||||
gobject_class->finalize = clutter_offscreen_effect_finalize;
|
||||
gobject_class->notify = clutter_offscreen_effect_notify;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -505,7 +556,7 @@ clutter_offscreen_effect_init (ClutterOffscreenEffect *self)
|
||||
* used instead of clutter_offscreen_effect_get_target() when the
|
||||
* effect subclass wants to paint using its own material.
|
||||
*
|
||||
* Return value: (transfer none): a #CoglHandle or %COGL_INVALID_HANDLE. The
|
||||
* Return value: (transfer none): a #CoglHandle or %NULL. The
|
||||
* returned texture is owned by Clutter and it should not be
|
||||
* modified or freed
|
||||
*
|
||||
@@ -548,17 +599,20 @@ clutter_offscreen_effect_get_target (ClutterOffscreenEffect *effect)
|
||||
/**
|
||||
* clutter_offscreen_effect_paint_target:
|
||||
* @effect: a #ClutterOffscreenEffect
|
||||
* @paint_context: a #ClutterPaintContext
|
||||
*
|
||||
* Calls the paint_target() virtual function of the @effect
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
void
|
||||
clutter_offscreen_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
clutter_offscreen_effect_paint_target (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_OFFSCREEN_EFFECT (effect));
|
||||
|
||||
CLUTTER_OFFSCREEN_EFFECT_GET_CLASS (effect)->paint_target (effect);
|
||||
CLUTTER_OFFSCREEN_EFFECT_GET_CLASS (effect)->paint_target (effect,
|
||||
paint_context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -570,7 +624,7 @@ clutter_offscreen_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
* Calls the create_texture() virtual function of the @effect
|
||||
*
|
||||
* Return value: (transfer full): a handle to a Cogl texture, or
|
||||
* %COGL_INVALID_HANDLE. The returned handle has its reference
|
||||
* %NULL. The returned handle has its reference
|
||||
* count increased.
|
||||
*
|
||||
* Since: 1.4
|
||||
@@ -650,7 +704,7 @@ clutter_offscreen_effect_get_target_size (ClutterOffscreenEffect *effect,
|
||||
*/
|
||||
gboolean
|
||||
clutter_offscreen_effect_get_target_rect (ClutterOffscreenEffect *effect,
|
||||
ClutterRect *rect)
|
||||
graphene_rect_t *rect)
|
||||
{
|
||||
ClutterOffscreenEffectPrivate *priv;
|
||||
|
||||
@@ -662,11 +716,11 @@ clutter_offscreen_effect_get_target_rect (ClutterOffscreenEffect *effect,
|
||||
if (priv->texture == NULL)
|
||||
return FALSE;
|
||||
|
||||
clutter_rect_init (rect,
|
||||
priv->x_offset,
|
||||
priv->y_offset,
|
||||
cogl_texture_get_width (priv->texture),
|
||||
cogl_texture_get_height (priv->texture));
|
||||
graphene_rect_init (rect,
|
||||
priv->position.x,
|
||||
priv->position.y,
|
||||
cogl_texture_get_width (priv->texture),
|
||||
cogl_texture_get_height (priv->texture));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -79,7 +79,8 @@ struct _ClutterOffscreenEffectClass
|
||||
CoglHandle (* create_texture) (ClutterOffscreenEffect *effect,
|
||||
gfloat width,
|
||||
gfloat height);
|
||||
void (* paint_target) (ClutterOffscreenEffect *effect);
|
||||
void (* paint_target) (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context);
|
||||
|
||||
/*< private >*/
|
||||
void (* _clutter_offscreen1) (void);
|
||||
@@ -101,7 +102,8 @@ CLUTTER_EXPORT
|
||||
CoglHandle clutter_offscreen_effect_get_texture (ClutterOffscreenEffect *effect);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_offscreen_effect_paint_target (ClutterOffscreenEffect *effect);
|
||||
void clutter_offscreen_effect_paint_target (ClutterOffscreenEffect *effect,
|
||||
ClutterPaintContext *paint_context);
|
||||
CLUTTER_EXPORT
|
||||
CoglHandle clutter_offscreen_effect_create_texture (ClutterOffscreenEffect *effect,
|
||||
gfloat width,
|
||||
@@ -114,7 +116,7 @@ gboolean clutter_offscreen_effect_get_target_size (ClutterOffscree
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_offscreen_effect_get_target_rect (ClutterOffscreenEffect *effect,
|
||||
ClutterRect *rect);
|
||||
graphene_rect_t *rect);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -1,11 +1,5 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
||||
*
|
||||
* Copyright (C) 2006 OpenedHand
|
||||
* Copyright (C) 2019 Red Hat Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -21,20 +15,15 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
#ifndef CLUTTER_PAINT_CONTEXT_PRIVATE_H
|
||||
#define CLUTTER_PAINT_CONTEXT_PRIVATE_H
|
||||
|
||||
#ifndef __CLUTTER_UTIL_H__
|
||||
#define __CLUTTER_UTIL_H__
|
||||
#include "clutter-paint-context.h"
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
ClutterPaintContext * clutter_paint_context_new_for_view (ClutterStageView *view);
|
||||
|
||||
G_BEGIN_DECLS
|
||||
gboolean clutter_paint_context_is_drawing_off_stage (ClutterPaintContext *paint_context);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
gint clutter_util_next_p2 (gint a);
|
||||
CoglFramebuffer * clutter_paint_context_get_base_framebuffer (ClutterPaintContext *paint_context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_UTIL_H__ */
|
||||
#endif /* CLUTTER_PAINT_CONTEXT_PRIVATE_H */
|
161
clutter/clutter/clutter-paint-context.c
Normal file
161
clutter/clutter/clutter-paint-context.c
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Red Hat Inc.
|
||||
*
|
||||
* 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 "clutter-build-config.h"
|
||||
|
||||
#include "clutter-paint-context-private.h"
|
||||
|
||||
struct _ClutterPaintContext
|
||||
{
|
||||
grefcount ref_count;
|
||||
|
||||
GList *framebuffers;
|
||||
|
||||
ClutterStageView *view;
|
||||
};
|
||||
|
||||
G_DEFINE_BOXED_TYPE (ClutterPaintContext, clutter_paint_context,
|
||||
clutter_paint_context_ref,
|
||||
clutter_paint_context_unref)
|
||||
|
||||
ClutterPaintContext *
|
||||
clutter_paint_context_new_for_view (ClutterStageView *view)
|
||||
{
|
||||
ClutterPaintContext *paint_context;
|
||||
CoglFramebuffer *framebuffer;
|
||||
|
||||
paint_context = g_new0 (ClutterPaintContext, 1);
|
||||
g_ref_count_init (&paint_context->ref_count);
|
||||
paint_context->view = view;
|
||||
|
||||
framebuffer = clutter_stage_view_get_framebuffer (view);
|
||||
clutter_paint_context_push_framebuffer (paint_context, framebuffer);
|
||||
|
||||
return paint_context;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_paint_context_new_for_framebuffer: (skip)
|
||||
*/
|
||||
ClutterPaintContext *
|
||||
clutter_paint_context_new_for_framebuffer (CoglFramebuffer *framebuffer)
|
||||
{
|
||||
ClutterPaintContext *paint_context;
|
||||
|
||||
paint_context = g_new0 (ClutterPaintContext, 1);
|
||||
g_ref_count_init (&paint_context->ref_count);
|
||||
|
||||
clutter_paint_context_push_framebuffer (paint_context, framebuffer);
|
||||
|
||||
return paint_context;
|
||||
}
|
||||
|
||||
ClutterPaintContext *
|
||||
clutter_paint_context_ref (ClutterPaintContext *paint_context)
|
||||
{
|
||||
g_ref_count_inc (&paint_context->ref_count);
|
||||
return paint_context;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_paint_context_dispose (ClutterPaintContext *paint_context)
|
||||
{
|
||||
g_list_free_full (paint_context->framebuffers,
|
||||
cogl_object_unref);
|
||||
paint_context->framebuffers = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_paint_context_unref (ClutterPaintContext *paint_context)
|
||||
{
|
||||
if (g_ref_count_dec (&paint_context->ref_count))
|
||||
{
|
||||
clutter_paint_context_dispose (paint_context);
|
||||
g_free (paint_context);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
clutter_paint_context_destroy (ClutterPaintContext *paint_context)
|
||||
{
|
||||
clutter_paint_context_dispose (paint_context);
|
||||
clutter_paint_context_unref (paint_context);
|
||||
}
|
||||
|
||||
void
|
||||
clutter_paint_context_push_framebuffer (ClutterPaintContext *paint_context,
|
||||
CoglFramebuffer *framebuffer)
|
||||
{
|
||||
paint_context->framebuffers = g_list_prepend (paint_context->framebuffers,
|
||||
cogl_object_ref (framebuffer));
|
||||
}
|
||||
|
||||
void
|
||||
clutter_paint_context_pop_framebuffer (ClutterPaintContext *paint_context)
|
||||
{
|
||||
g_return_if_fail (paint_context->framebuffers);
|
||||
|
||||
cogl_object_unref (paint_context->framebuffers->data);
|
||||
paint_context->framebuffers =
|
||||
g_list_delete_link (paint_context->framebuffers,
|
||||
paint_context->framebuffers);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_paint_context_get_framebuffer:
|
||||
* @paint_context: The #ClutterPaintContext
|
||||
*
|
||||
* Returns: (transfer none): The #CoglFramebuffer used for drawing
|
||||
*/
|
||||
CoglFramebuffer *
|
||||
clutter_paint_context_get_framebuffer (ClutterPaintContext *paint_context)
|
||||
{
|
||||
g_return_val_if_fail (paint_context->framebuffers, NULL);
|
||||
|
||||
return paint_context->framebuffers->data;
|
||||
}
|
||||
|
||||
CoglFramebuffer *
|
||||
clutter_paint_context_get_base_framebuffer (ClutterPaintContext *paint_context)
|
||||
{
|
||||
return g_list_last (paint_context->framebuffers)->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_paint_context_get_stage_view: (skip)
|
||||
*/
|
||||
ClutterStageView *
|
||||
clutter_paint_context_get_stage_view (ClutterPaintContext *paint_context)
|
||||
{
|
||||
return paint_context->view;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_paint_context_is_drawing_off_stage: (skip)
|
||||
*
|
||||
* Return %TRUE if the paint context is currently drawing off stage.
|
||||
* This happens if there are any framebuffers pushed, and the base framebuffer
|
||||
* comes from the stage view.
|
||||
*/
|
||||
gboolean
|
||||
clutter_paint_context_is_drawing_off_stage (ClutterPaintContext *paint_context)
|
||||
{
|
||||
if (g_list_length (paint_context->framebuffers) > 1)
|
||||
return TRUE;
|
||||
|
||||
return !paint_context->view;
|
||||
}
|
62
clutter/clutter/clutter-paint-context.h
Normal file
62
clutter/clutter/clutter-paint-context.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Red Hat Inc.
|
||||
*
|
||||
* 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 CLUTTER_PAINT_CONTEXT_H
|
||||
#define CLUTTER_PAINT_CONTEXT_H
|
||||
|
||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "clutter-macros.h"
|
||||
#include "clutter-stage-view.h"
|
||||
|
||||
typedef struct _ClutterPaintContext ClutterPaintContext;
|
||||
|
||||
#define CLUTTER_TYPE_PAINT_CONTEXT (clutter_paint_context_get_type ())
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType clutter_paint_context_get_type (void);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterPaintContext * clutter_paint_context_new_for_framebuffer (CoglFramebuffer *framebuffer);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterPaintContext * clutter_paint_context_ref (ClutterPaintContext *paint_context);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_paint_context_unref (ClutterPaintContext *paint_context);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_paint_context_destroy (ClutterPaintContext *paint_context);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
CoglFramebuffer * clutter_paint_context_get_framebuffer (ClutterPaintContext *paint_context);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterStageView * clutter_paint_context_get_stage_view (ClutterPaintContext *paint_context);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_paint_context_push_framebuffer (ClutterPaintContext *paint_context,
|
||||
CoglFramebuffer *framebuffer);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_paint_context_pop_framebuffer (ClutterPaintContext *paint_context);
|
||||
|
||||
#endif /* CLUTTER_PAINT_CONTEXT_H */
|
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <json-glib/json-glib.h>
|
||||
#include <clutter/clutter-paint-context.h>
|
||||
#include <clutter/clutter-paint-node.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
@@ -63,9 +64,12 @@ struct _ClutterPaintNodeClass
|
||||
|
||||
void (* finalize) (ClutterPaintNode *node);
|
||||
|
||||
gboolean (* pre_draw) (ClutterPaintNode *node);
|
||||
void (* draw) (ClutterPaintNode *node);
|
||||
void (* post_draw) (ClutterPaintNode *node);
|
||||
gboolean (* pre_draw) (ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context);
|
||||
void (* draw) (ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context);
|
||||
void (* post_draw) (ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context);
|
||||
|
||||
JsonNode*(* serialize) (ClutterPaintNode *node);
|
||||
|
||||
@@ -74,9 +78,11 @@ struct _ClutterPaintNodeClass
|
||||
|
||||
#define PAINT_OP_INIT { PAINT_OP_INVALID }
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
PAINT_OP_INVALID = 0,
|
||||
PAINT_OP_TEX_RECT,
|
||||
PAINT_OP_MULTITEX_RECT,
|
||||
PAINT_OP_PATH,
|
||||
PAINT_OP_PRIMITIVE
|
||||
} PaintOpCode;
|
||||
@@ -85,6 +91,8 @@ struct _ClutterPaintOperation
|
||||
{
|
||||
PaintOpCode opcode;
|
||||
|
||||
GArray *multitex_coords;
|
||||
|
||||
union {
|
||||
float texrect[8];
|
||||
|
||||
@@ -94,7 +102,6 @@ struct _ClutterPaintOperation
|
||||
} op;
|
||||
};
|
||||
|
||||
GType _clutter_root_node_get_type (void) G_GNUC_CONST;
|
||||
GType _clutter_transform_node_get_type (void) G_GNUC_CONST;
|
||||
GType _clutter_dummy_node_get_type (void) G_GNUC_CONST;
|
||||
|
||||
@@ -107,13 +114,10 @@ void _clutter_paint_operation_paint_primitive (const C
|
||||
void _clutter_paint_node_init_types (void);
|
||||
gpointer _clutter_paint_node_create (GType gtype);
|
||||
|
||||
ClutterPaintNode * _clutter_root_node_new (CoglFramebuffer *framebuffer,
|
||||
const ClutterColor *clear_color,
|
||||
CoglBufferBit clear_flags);
|
||||
ClutterPaintNode * _clutter_transform_node_new (const CoglMatrix *matrix);
|
||||
ClutterPaintNode * _clutter_dummy_node_new (ClutterActor *actor);
|
||||
ClutterPaintNode * _clutter_dummy_node_new (ClutterActor *actor,
|
||||
CoglFramebuffer *framebuffer);
|
||||
|
||||
void _clutter_paint_node_paint (ClutterPaintNode *root);
|
||||
void _clutter_paint_node_dump_tree (ClutterPaintNode *root);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
@@ -139,32 +143,6 @@ G_GNUC_INTERNAL
|
||||
ClutterPaintNode * clutter_paint_node_get_last_child (ClutterPaintNode *node);
|
||||
G_GNUC_INTERNAL
|
||||
ClutterPaintNode * clutter_paint_node_get_parent (ClutterPaintNode *node);
|
||||
G_GNUC_INTERNAL
|
||||
CoglFramebuffer * clutter_paint_node_get_framebuffer (ClutterPaintNode *node);
|
||||
|
||||
#define CLUTTER_TYPE_LAYER_NODE (_clutter_layer_node_get_type ())
|
||||
#define CLUTTER_LAYER_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_LAYER_NODE, ClutterLayerNode))
|
||||
#define CLUTTER_IS_LAYER_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_LAYER_NODE))
|
||||
|
||||
/*
|
||||
* ClutterLayerNode:
|
||||
*
|
||||
* The #ClutterLayerNode structure is an opaque
|
||||
* type whose members cannot be directly accessed.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
typedef struct _ClutterLayerNode ClutterLayerNode;
|
||||
typedef struct _ClutterLayerNodeClass ClutterLayerNodeClass;
|
||||
|
||||
GType _clutter_layer_node_get_type (void) G_GNUC_CONST;
|
||||
|
||||
ClutterPaintNode * _clutter_layer_node_new (const CoglMatrix *projection,
|
||||
const cairo_rectangle_t *viewport,
|
||||
float width,
|
||||
float height,
|
||||
guint8 opacity);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -202,18 +202,21 @@ clutter_paint_node_real_finalize (ClutterPaintNode *node)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_paint_node_real_pre_draw (ClutterPaintNode *node)
|
||||
clutter_paint_node_real_pre_draw (ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_paint_node_real_draw (ClutterPaintNode *node)
|
||||
clutter_paint_node_real_draw (ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_paint_node_real_post_draw (ClutterPaintNode *node)
|
||||
clutter_paint_node_real_post_draw (ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -761,6 +764,11 @@ clutter_paint_operation_clear (ClutterPaintOperation *op)
|
||||
case PAINT_OP_TEX_RECT:
|
||||
break;
|
||||
|
||||
case PAINT_OP_MULTITEX_RECT:
|
||||
if (op->multitex_coords != NULL)
|
||||
g_array_unref (op->multitex_coords);
|
||||
break;
|
||||
|
||||
case PAINT_OP_PATH:
|
||||
if (op->op.path != NULL)
|
||||
cogl_object_unref (op->op.path);
|
||||
@@ -794,6 +802,27 @@ clutter_paint_op_init_tex_rect (ClutterPaintOperation *op,
|
||||
op->op.texrect[7] = y_2;
|
||||
}
|
||||
|
||||
static inline void
|
||||
clutter_paint_op_init_multitex_rect (ClutterPaintOperation *op,
|
||||
const ClutterActorBox *rect,
|
||||
const float *tex_coords,
|
||||
unsigned int tex_coords_len)
|
||||
{
|
||||
clutter_paint_operation_clear (op);
|
||||
|
||||
op->opcode = PAINT_OP_MULTITEX_RECT;
|
||||
op->multitex_coords = g_array_sized_new (FALSE, FALSE,
|
||||
sizeof (float),
|
||||
tex_coords_len);
|
||||
|
||||
g_array_append_vals (op->multitex_coords, tex_coords, tex_coords_len);
|
||||
|
||||
op->op.texrect[0] = rect->x1;
|
||||
op->op.texrect[1] = rect->y1;
|
||||
op->op.texrect[2] = rect->x2;
|
||||
op->op.texrect[3] = rect->y2;
|
||||
}
|
||||
|
||||
static inline void
|
||||
clutter_paint_op_init_path (ClutterPaintOperation *op,
|
||||
CoglPath *path)
|
||||
@@ -881,6 +910,33 @@ clutter_paint_node_add_texture_rectangle (ClutterPaintNode *node,
|
||||
g_array_append_val (node->operations, operation);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* clutter_paint_node_add_multitexture_rectangle:
|
||||
* @node: a #ClutterPaintNode
|
||||
* @rect: a #ClutterActorBox
|
||||
* @text_coords: array of multitexture values
|
||||
* @text_coords_len: number of items of @text_coords
|
||||
*
|
||||
* Adds a rectangle region to the @node, with multitexture coordinates.
|
||||
*/
|
||||
void
|
||||
clutter_paint_node_add_multitexture_rectangle (ClutterPaintNode *node,
|
||||
const ClutterActorBox *rect,
|
||||
const float *text_coords,
|
||||
unsigned int text_coords_len)
|
||||
{
|
||||
ClutterPaintOperation operation = PAINT_OP_INIT;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_PAINT_NODE (node));
|
||||
g_return_if_fail (rect != NULL);
|
||||
|
||||
clutter_paint_node_maybe_init_operations (node);
|
||||
|
||||
clutter_paint_op_init_multitex_rect (&operation, rect, text_coords, text_coords_len);
|
||||
g_array_append_val (node->operations, operation);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_paint_node_add_path: (skip)
|
||||
* @node: a #ClutterPaintNode
|
||||
@@ -936,37 +992,38 @@ clutter_paint_node_add_primitive (ClutterPaintNode *node,
|
||||
g_array_append_val (node->operations, operation);
|
||||
}
|
||||
|
||||
/*< private >
|
||||
* _clutter_paint_node_paint:
|
||||
/**
|
||||
* clutter_paint_node_paint:
|
||||
* @node: a #ClutterPaintNode
|
||||
*
|
||||
* Paints the @node using the class implementation, traversing
|
||||
* its children, if any.
|
||||
*/
|
||||
void
|
||||
_clutter_paint_node_paint (ClutterPaintNode *node)
|
||||
clutter_paint_node_paint (ClutterPaintNode *node,
|
||||
ClutterPaintContext *paint_context)
|
||||
{
|
||||
ClutterPaintNodeClass *klass = CLUTTER_PAINT_NODE_GET_CLASS (node);
|
||||
ClutterPaintNode *iter;
|
||||
gboolean res;
|
||||
|
||||
res = klass->pre_draw (node);
|
||||
res = klass->pre_draw (node, paint_context);
|
||||
|
||||
if (res)
|
||||
{
|
||||
klass->draw (node);
|
||||
klass->draw (node, paint_context);
|
||||
}
|
||||
|
||||
for (iter = node->first_child;
|
||||
iter != NULL;
|
||||
iter = iter->next_sibling)
|
||||
{
|
||||
_clutter_paint_node_paint (iter);
|
||||
clutter_paint_node_paint (iter, paint_context);
|
||||
}
|
||||
|
||||
if (res)
|
||||
{
|
||||
klass->post_draw (node);
|
||||
klass->post_draw (node, paint_context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1006,7 +1063,7 @@ clutter_paint_node_to_json (ClutterPaintNode *node)
|
||||
|
||||
if (node->operations != NULL)
|
||||
{
|
||||
guint i;
|
||||
guint i, j;
|
||||
|
||||
for (i = 0; i < node->operations->len; i++)
|
||||
{
|
||||
@@ -1031,14 +1088,27 @@ clutter_paint_node_to_json (ClutterPaintNode *node)
|
||||
json_builder_end_array (builder);
|
||||
break;
|
||||
|
||||
case PAINT_OP_MULTITEX_RECT:
|
||||
json_builder_set_member_name (builder, "texrect");
|
||||
json_builder_begin_array (builder);
|
||||
|
||||
for (j = 0; i < op->multitex_coords->len; j++)
|
||||
{
|
||||
float coord = g_array_index (op->multitex_coords, float, j);
|
||||
json_builder_add_double_value (builder, coord);
|
||||
}
|
||||
|
||||
json_builder_end_array (builder);
|
||||
break;
|
||||
|
||||
case PAINT_OP_PATH:
|
||||
json_builder_set_member_name (builder, "path");
|
||||
json_builder_add_int_value (builder, (gint64) op->op.path);
|
||||
json_builder_add_int_value (builder, (intptr_t) op->op.path);
|
||||
break;
|
||||
|
||||
case PAINT_OP_PRIMITIVE:
|
||||
json_builder_set_member_name (builder, "primitive");
|
||||
json_builder_add_int_value (builder, (gint64) op->op.primitive);
|
||||
json_builder_add_int_value (builder, (intptr_t) op->op.primitive);
|
||||
break;
|
||||
|
||||
case PAINT_OP_INVALID:
|
||||
@@ -1128,18 +1198,25 @@ clutter_paint_node_get_root (ClutterPaintNode *node)
|
||||
return iter;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_paint_node_get_framebuffer:
|
||||
* @node: a #ClutterPaintNode
|
||||
*
|
||||
* Retrieves the #CoglFramebuffer that @node will draw
|
||||
* into, if it the root node has a custom framebuffer set.
|
||||
*
|
||||
* Returns: (transfer none): a #CoglFramebuffer or %NULL if no custom one is
|
||||
* set.
|
||||
*/
|
||||
CoglFramebuffer *
|
||||
clutter_paint_node_get_framebuffer (ClutterPaintNode *node)
|
||||
{
|
||||
ClutterPaintNode *root = clutter_paint_node_get_root (node);
|
||||
ClutterPaintNodeClass *klass;
|
||||
|
||||
if (root == NULL)
|
||||
return NULL;
|
||||
|
||||
klass = CLUTTER_PAINT_NODE_GET_CLASS (root);
|
||||
if (klass->get_framebuffer != NULL)
|
||||
return klass->get_framebuffer (root);
|
||||
|
||||
return cogl_get_draw_framebuffer ();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user