mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-28 16:17:09 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59a6a1369d | ||
|
|
d06ce0683b | ||
|
|
5a9b08fe94 | ||
|
|
c7569e9d32 | ||
|
|
06fcf2eaa0 | ||
|
|
33e5d62da8 | ||
|
|
f0bae4444c | ||
|
|
0a5ace7f82 | ||
|
|
5b27cc70fc | ||
|
|
cf3340c01d | ||
|
|
950f73716a | ||
|
|
295c993d50 | ||
|
|
95ab7dad2a | ||
|
|
3d42f72e21 | ||
|
|
59d9d08158 | ||
|
|
3a9cbfdd9b | ||
|
|
bc7d5f6ce0 | ||
|
|
1131973f7a | ||
|
|
a46804080e | ||
|
|
81b25968ca | ||
|
|
f1463f41de | ||
|
|
0a10b81499 | ||
|
|
fd07118939 | ||
|
|
a0a757a621 | ||
|
|
7cd7f954c6 | ||
|
|
e673452b7d | ||
|
|
e24490e92f | ||
|
|
0c2345aed1 | ||
|
|
95b9def0d5 | ||
|
|
563fe9232c | ||
|
|
5ad525c1d8 | ||
|
|
fcde9eb405 | ||
|
|
39d03be6d7 | ||
|
|
43101379ed | ||
|
|
bce5b73e1c | ||
|
|
0b4a5a1c17 | ||
|
|
c609e2e5b1 | ||
|
|
f6bf02aa5c | ||
|
|
d52aa4c1a4 | ||
|
|
d6a961aa6c | ||
|
|
2665200eee | ||
|
|
469eb1c05a | ||
|
|
6a83f2efbf | ||
|
|
6422cb8568 | ||
|
|
6be4b719c8 | ||
|
|
0f566d0342 | ||
|
|
1de19f9bee | ||
|
|
5f8a88c0a2 | ||
|
|
1611a56754 | ||
|
|
73fcb8d2c3 | ||
|
|
bc0efac21f | ||
|
|
26341b162e | ||
|
|
c6957bec23 | ||
|
|
56ddd87189 | ||
|
|
5cdd258046 | ||
|
|
8b4ab267b6 | ||
|
|
613a19c236 | ||
|
|
e242cbe32f | ||
|
|
5f921a2908 | ||
|
|
39493ef4dc | ||
|
|
fef311f0b2 | ||
|
|
e98aeab8dc | ||
|
|
2ff96ba383 | ||
|
|
03d90aec9f | ||
|
|
57293a2896 | ||
|
|
cfd3311f86 | ||
|
|
51b09bc2ed | ||
|
|
ff54c6ffe5 | ||
|
|
4c836603c1 | ||
|
|
311d2262d6 | ||
|
|
209a0c6ab0 | ||
|
|
4c2b20c49f | ||
|
|
b7625c5726 | ||
|
|
872e299ad9 | ||
|
|
c60c19aad5 | ||
|
|
5d216dcc32 | ||
|
|
37c122a1de | ||
|
|
50ae4b9b44 | ||
|
|
695c55e464 | ||
|
|
a16903d570 | ||
|
|
3189931910 | ||
|
|
c3a8dc0798 | ||
|
|
848ed3fecc | ||
|
|
0d1f1f028a | ||
|
|
d4add19e6a | ||
|
|
bfaeae0023 | ||
|
|
70705c7db0 | ||
|
|
517d74a2d2 | ||
|
|
d68eee3c90 | ||
|
|
e575e7c69d | ||
|
|
d059fc8de2 | ||
|
|
5d9d787dac | ||
|
|
9696fbb3ba | ||
|
|
800329086e | ||
|
|
11be6af9d3 | ||
|
|
e0cc3b5580 | ||
|
|
e33d98a702 | ||
|
|
84f3cf048a | ||
|
|
ea579771a7 | ||
|
|
4db97ead1f | ||
|
|
2338501d21 | ||
|
|
81c061c3c8 | ||
|
|
356bf08c4b | ||
|
|
09a27e508f | ||
|
|
0b636032ee | ||
|
|
5f78f6bb37 | ||
|
|
272bc39c84 | ||
|
|
1e006c0589 | ||
|
|
7158eaee0f | ||
|
|
abfc47159e | ||
|
|
deade3d887 | ||
|
|
cf3e0b3d4d | ||
|
|
614deba4b7 | ||
|
|
53d40508a4 | ||
|
|
39f96f407f | ||
|
|
c8c6f470ce | ||
|
|
d78b493aad | ||
|
|
26f415f3db | ||
|
|
b66ef7a2f5 | ||
|
|
9b89614569 | ||
|
|
0d170a6f74 | ||
|
|
f0dd4a74d2 | ||
|
|
692a6b81e0 | ||
|
|
cf49cf2b64 | ||
|
|
b26accf037 | ||
|
|
5913d95ff2 | ||
|
|
e1b94799a2 | ||
|
|
385db01097 | ||
|
|
d787dea652 | ||
|
|
0adddb422b | ||
|
|
c444030334 | ||
|
|
a9da4ddfba | ||
|
|
57cc74410f | ||
|
|
3cc16ababb | ||
|
|
d4097b577b | ||
|
|
7ef6c14f3f | ||
|
|
cbb4e32992 | ||
|
|
6bc85062b9 | ||
|
|
b2dee57f4f | ||
|
|
a926754a6b | ||
|
|
7e470b0e78 | ||
|
|
9f81cac662 | ||
|
|
a14bdd894a | ||
|
|
7004e156b8 | ||
|
|
e293cf03ba | ||
|
|
07f226f024 | ||
|
|
4b2503e614 | ||
|
|
2df5352356 | ||
|
|
67ccb2aafd | ||
|
|
9a124dec50 | ||
|
|
d013822979 | ||
|
|
7f44e948d0 | ||
|
|
9a94fb9a7c | ||
|
|
dfc7e95fcd | ||
|
|
362b852ec2 | ||
|
|
9141e13640 | ||
|
|
4a22a38e63 | ||
|
|
c7ce12449b | ||
|
|
824557b4f1 | ||
|
|
022542ef1b | ||
|
|
3b12e71877 | ||
|
|
9593168196 | ||
|
|
b5c5c3f8ae | ||
|
|
492bd649ed | ||
|
|
bc1a880479 | ||
|
|
0748f26f42 | ||
|
|
2f72f24a49 | ||
|
|
43e174a604 | ||
|
|
13d36a2785 | ||
|
|
9ec3e9f7e6 | ||
|
|
148f1b1745 | ||
|
|
f76c9187a8 | ||
|
|
2e8eba7dd0 | ||
|
|
abeafa313d | ||
|
|
310c0f3e7a | ||
|
|
c426894ac9 | ||
|
|
bf6998672f | ||
|
|
ea83e92a16 | ||
|
|
d95e827e93 | ||
|
|
40f53732ff | ||
|
|
e2d2544ce6 | ||
|
|
7cefc7d5ab | ||
|
|
b59ed4b7d1 | ||
|
|
5e43b76753 | ||
|
|
894d0f64a2 | ||
|
|
c18e0f3479 | ||
|
|
8756b5de9f | ||
|
|
54a51ab02f | ||
|
|
741a93aebd | ||
|
|
aeb6642aad | ||
|
|
2fe23fa95b | ||
|
|
a6eb81e916 | ||
|
|
93ec7e48b6 | ||
|
|
956003092e | ||
|
|
96b75c41c1 | ||
|
|
d6933b83e3 | ||
|
|
e2ba3681a1 | ||
|
|
0b47b83849 | ||
|
|
08419c0c95 | ||
|
|
03bc5befd5 | ||
|
|
ed37fa4fc2 | ||
|
|
7268bcf92e | ||
|
|
2d462ec749 | ||
|
|
11a4941dc7 | ||
|
|
d6281fd804 | ||
|
|
550fb04731 | ||
|
|
e08a87fc93 | ||
|
|
cac16f1324 | ||
|
|
2efb66cae0 | ||
|
|
ad49fe0e0e | ||
|
|
ed0521df84 | ||
|
|
002a03c087 | ||
|
|
70535c6cb4 | ||
|
|
4013dbf70a | ||
|
|
b288e29eef | ||
|
|
871a99e22b | ||
|
|
a965f1023c | ||
|
|
a6af326b48 | ||
|
|
754b8f3014 | ||
|
|
a85386499e | ||
|
|
fe48d1cc64 | ||
|
|
c1aab8bf69 | ||
|
|
65d8a31a35 | ||
|
|
e97ae8bcdb | ||
|
|
883410eb14 | ||
|
|
0cb72162e4 | ||
|
|
2cb6c4bc9c | ||
|
|
5b111d3300 | ||
|
|
820689f5f9 | ||
|
|
2ae51d70fb | ||
|
|
86158f938d | ||
|
|
3f99c7b960 | ||
|
|
b266bd8e0a | ||
|
|
f6d25f58aa | ||
|
|
ccbccc2020 | ||
|
|
736193d355 | ||
|
|
47e32a812e | ||
|
|
ac769be3cb | ||
|
|
4de7e09c22 | ||
|
|
e787c6fbde | ||
|
|
a0a0330a6c | ||
|
|
46854579be | ||
|
|
d31af448ff | ||
|
|
91062be2ac | ||
|
|
6907dba86d | ||
|
|
d4cadc47e0 | ||
|
|
0904ae5dc7 | ||
|
|
a431b2ae56 | ||
|
|
4c7e1bcecf | ||
|
|
7364a960bc | ||
|
|
77bb2f4433 | ||
|
|
75077509d6 | ||
|
|
9ebf59e4ad | ||
|
|
20a50bc094 | ||
|
|
180bd4480f | ||
|
|
947ce61805 | ||
|
|
270648fc73 | ||
|
|
4ebd23bf56 | ||
|
|
0ea195a7a2 | ||
|
|
5978175ef8 | ||
|
|
f8e144d1f2 | ||
|
|
8c92b16d04 | ||
|
|
a9129c5772 | ||
|
|
72551be6b0 | ||
|
|
7d4cf8a47d | ||
|
|
b967f2f18f | ||
|
|
af3ff13513 | ||
|
|
d543f17606 | ||
|
|
e3e79aaf86 | ||
|
|
44bb22925f | ||
|
|
e88a3cd3d8 | ||
|
|
1340a8b81e | ||
|
|
d07e797f92 | ||
|
|
cdf4ca3612 | ||
|
|
ac50ae71c4 | ||
|
|
88ec285dc5 | ||
|
|
d5f637f206 | ||
|
|
f35c63482f | ||
|
|
940060c724 | ||
|
|
2466167c93 | ||
|
|
8e556e6ce1 | ||
|
|
9c44c1eccb | ||
|
|
70aa7516fc | ||
|
|
fcdeea30d9 | ||
|
|
b4fb53b3c3 | ||
|
|
4e752a6f8b | ||
|
|
a2183ed53a | ||
|
|
182f195a57 | ||
|
|
a0214a2956 | ||
|
|
51da6b7204 | ||
|
|
285a8e1101 | ||
|
|
de315cf780 | ||
|
|
7642ead8ce | ||
|
|
666fba74cd | ||
|
|
4d1077b759 | ||
|
|
561b4c3ffc | ||
|
|
f970fd377e | ||
|
|
383d70b446 | ||
|
|
82edb53d22 | ||
|
|
bf127a3f4d | ||
|
|
c089adf2b7 | ||
|
|
6a5c9ba048 | ||
|
|
c9c55c74bf | ||
|
|
5f854d75c7 | ||
|
|
3a3d77042a | ||
|
|
49e714431a | ||
|
|
f64680082c | ||
|
|
f3c1ea0bc4 | ||
|
|
31a2d3c185 | ||
|
|
1621cb7bf5 | ||
|
|
89fcfe3979 | ||
|
|
5dd702017f | ||
|
|
0f1b251c91 | ||
|
|
1fab00bf85 | ||
|
|
c8fcbd1864 | ||
|
|
7802d000fe | ||
|
|
9978a89991 | ||
|
|
87637f68dd | ||
|
|
727f4ad5c5 | ||
|
|
30f1488c5c | ||
|
|
28b04af4f5 | ||
|
|
62cb29a435 | ||
|
|
86d6e12f9e | ||
|
|
30147e9e01 | ||
|
|
a966689e88 | ||
|
|
42e1d5db2c | ||
|
|
877ed4c382 | ||
|
|
5ccb57c19d | ||
|
|
80d03b2f6f | ||
|
|
b31d3860e6 | ||
|
|
697177266b | ||
|
|
48b84e3100 | ||
|
|
27122b421d | ||
|
|
a305dd85da | ||
|
|
7bc4ae81dc | ||
|
|
8675244823 | ||
|
|
af7df5bcea | ||
|
|
0ceee74091 | ||
|
|
0b023c27de | ||
|
|
e1ea9b7209 | ||
|
|
9fa7401542 | ||
|
|
df65816504 | ||
|
|
62bcaebe14 | ||
|
|
d88d508180 | ||
|
|
0178f28f66 | ||
|
|
c226242d6d | ||
|
|
9a09deee91 | ||
|
|
2190256165 | ||
|
|
cdba9dbd17 | ||
|
|
df3be3bde0 | ||
|
|
4e43c9cfee | ||
|
|
a2d733392f | ||
|
|
7a5ad30a92 | ||
|
|
d894080582 | ||
|
|
8bfc65f88f | ||
|
|
fbf02782a6 | ||
|
|
1e88954b79 | ||
|
|
4e0cd74552 | ||
|
|
7530c4b5bd | ||
|
|
b47d207bd2 | ||
|
|
9ff29ccb94 | ||
|
|
6da322ed49 | ||
|
|
6e21fed525 | ||
|
|
74747f383c | ||
|
|
bde7d74f02 | ||
|
|
cdc818d936 | ||
|
|
8694a342b9 | ||
|
|
dd9e59d82f | ||
|
|
1b2b87d187 | ||
|
|
36c1f15894 | ||
|
|
c3877bad13 | ||
|
|
a118a062ec | ||
|
|
5e34e98b28 | ||
|
|
60ed1c9b3c | ||
|
|
e148806743 | ||
|
|
cd0dd795c8 | ||
|
|
e6468d960c | ||
|
|
219d72074d | ||
|
|
56779b033d | ||
|
|
73dc293c76 | ||
|
|
abaee60a55 | ||
|
|
2b99ac28eb | ||
|
|
f86fa9d483 | ||
|
|
529c78ef90 | ||
|
|
bc20a11744 | ||
|
|
6a2f28543d | ||
|
|
79c9e16ddb | ||
|
|
bb62e1ff45 | ||
|
|
95ac2ecfce | ||
|
|
7baf414d73 | ||
|
|
70255521f8 | ||
|
|
3dce463697 | ||
|
|
43f126635c | ||
|
|
c31c970e88 | ||
|
|
8dcb3349c7 | ||
|
|
b03bc62fef | ||
|
|
a8b46e9e9c | ||
|
|
4541934bd5 | ||
|
|
fa2382c0de | ||
|
|
5944085555 | ||
|
|
97f4215330 | ||
|
|
1d81705437 | ||
|
|
2f48b9df05 | ||
|
|
5541ad971d | ||
|
|
8d4ced06d6 | ||
|
|
07ba1c50b9 | ||
|
|
2f97ddc0a2 | ||
|
|
988d1ca680 | ||
|
|
fec1ccef76 | ||
|
|
884cd66dfa | ||
|
|
f41180d025 | ||
|
|
bebe28b95c | ||
|
|
358c940763 | ||
|
|
b3d6c70a45 | ||
|
|
5fc1c1101e | ||
|
|
f336b8401b | ||
|
|
78a0a8addf | ||
|
|
be5f46f92d | ||
|
|
07592ad802 | ||
|
|
1764c47131 | ||
|
|
f83c92d91b | ||
|
|
bf85472935 | ||
|
|
ff6856ec1f | ||
|
|
a4d532f85e | ||
|
|
18f51a113d | ||
|
|
12313a2646 | ||
|
|
3ce8e5e8af | ||
|
|
a8b54bc301 | ||
|
|
7f711b383a | ||
|
|
bbda500121 | ||
|
|
deb248c96e | ||
|
|
c8e9b72663 | ||
|
|
0ff551a2da | ||
|
|
aef1e366f4 | ||
|
|
41d8a80c8e | ||
|
|
cbd2cea0e9 | ||
|
|
0c5f5115e6 | ||
|
|
86da42231c | ||
|
|
20974f305a | ||
|
|
5a22e67680 | ||
|
|
bae24f0964 | ||
|
|
2871657b65 | ||
|
|
767a8b088e | ||
|
|
2f77a0a8c8 | ||
|
|
2900f37c23 | ||
|
|
a693fa7dc2 | ||
|
|
f7cb85401c | ||
|
|
433d5d6cc5 | ||
|
|
98b66f158f | ||
|
|
4fc71946ca | ||
|
|
59c609dc2d | ||
|
|
ce6525d8f2 | ||
|
|
bbd1776911 | ||
|
|
f196a67afe | ||
|
|
5f895b2ad9 | ||
|
|
e5c31ee766 | ||
|
|
9f244a1093 | ||
|
|
43c387d0a0 | ||
|
|
f662f45e86 | ||
|
|
602f3c5748 | ||
|
|
74f727cb2e | ||
|
|
dccc997e75 | ||
|
|
41858de966 | ||
|
|
86b4d9c9ab | ||
|
|
4144065fb8 | ||
|
|
7932f5f687 | ||
|
|
0a54e292e9 | ||
|
|
d3770381b8 | ||
|
|
a5f13a023c | ||
|
|
039121892b | ||
|
|
150f670d2e | ||
|
|
7fbd3ef4f3 | ||
|
|
c03386f438 | ||
|
|
058db9ccdf | ||
|
|
a8c623b0dd | ||
|
|
50b7ee5fc2 | ||
|
|
9a95f9b706 | ||
|
|
4da4e0b1ac | ||
|
|
151400eac0 | ||
|
|
f8bd1a67bc | ||
|
|
3f65456f3f | ||
|
|
8c102fcafd | ||
|
|
e8150805ff | ||
|
|
88391c47d2 | ||
|
|
8d8f51f660 | ||
|
|
d2d10421b6 | ||
|
|
0e0c95e0a9 | ||
|
|
61e22faeb9 | ||
|
|
d81d40f9b7 | ||
|
|
66de31895a | ||
|
|
bfec1da2a6 | ||
|
|
c76adc0602 | ||
|
|
306dd9602a | ||
|
|
85c63e90fa | ||
|
|
cf537dd421 | ||
|
|
334a77adaf | ||
|
|
6ce6de157b | ||
|
|
9eb0a8b40c | ||
|
|
f1d670502c | ||
|
|
3269650084 | ||
|
|
53edb5dcba | ||
|
|
1f46ba258e | ||
|
|
959407d7ea | ||
|
|
3eacf471ac | ||
|
|
a2b65ba39f | ||
|
|
444d9bb1f7 | ||
|
|
b54c186688 | ||
|
|
19372b2fbb | ||
|
|
77c76c53ae | ||
|
|
50ddc8e31c | ||
|
|
e67849db69 | ||
|
|
96a085170b | ||
|
|
ff6f42e291 | ||
|
|
f8ced41de6 | ||
|
|
072ac4e166 | ||
|
|
43b8b8de59 | ||
|
|
5fa10b3d7f | ||
|
|
fdac75dce0 | ||
|
|
44b8552307 | ||
|
|
6ad5529ee7 | ||
|
|
6b47d74be7 | ||
|
|
32f29cc159 | ||
|
|
0d4b076fd5 | ||
|
|
cddfc2ed84 | ||
|
|
41b37abc13 | ||
|
|
d3e1837244 | ||
|
|
1bc10fb83e | ||
|
|
7188627084 | ||
|
|
615d1e72d3 | ||
|
|
cb8fb1a0c1 | ||
|
|
ed728100c3 | ||
|
|
56e24ff4ef | ||
|
|
ba3a0030fc | ||
|
|
2094cda9e5 | ||
|
|
aad307d676 | ||
|
|
3fa8169353 | ||
|
|
5cf3418c15 | ||
|
|
3611804ecc | ||
|
|
c121c87b75 | ||
|
|
47f577b672 | ||
|
|
7ca92b6350 | ||
|
|
e4cc1d4c26 | ||
|
|
9a076cba39 | ||
|
|
74178caf8c | ||
|
|
4fee49aa43 | ||
|
|
fa13587088 | ||
|
|
2b715208c0 | ||
|
|
1bbd5ea4f1 | ||
|
|
4ea138ef19 | ||
|
|
a39c1caa4a | ||
|
|
b1b4ce2a66 | ||
|
|
7c92a9334d | ||
|
|
aaa4ad1cbc | ||
|
|
7b93d0878d | ||
|
|
1c29f6373e | ||
|
|
57bdcd4754 | ||
|
|
b95538a415 | ||
|
|
fa7c84b2b5 | ||
|
|
bc77048488 | ||
|
|
2f21b22a49 | ||
|
|
ec91986854 | ||
|
|
e7b03037be | ||
|
|
9ff822c7fd | ||
|
|
239924c63e | ||
|
|
2f85645e9d |
+3
-1
@@ -4,6 +4,8 @@
|
|||||||
*.al
|
*.al
|
||||||
*.a
|
*.a
|
||||||
*.so
|
*.so
|
||||||
|
\#
|
||||||
|
am--include-marker
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
.deps/
|
.deps/
|
||||||
@@ -23,8 +25,8 @@ Makefile.in
|
|||||||
/*config.h
|
/*config.h
|
||||||
/*config.h.in
|
/*config.h.in
|
||||||
/*config.h.in~
|
/*config.h.in~
|
||||||
|
|
||||||
/src/font/utils/emoji/
|
/src/font/utils/emoji/
|
||||||
/src/font/utils/ucd/
|
/src/font/utils/ucd/
|
||||||
/src/sysres/font_list
|
/src/sysres/font_list
|
||||||
/src/sysres/license/dat_files/
|
/src/sysres/license/dat_files/
|
||||||
|
/configure~
|
||||||
|
|||||||
+174
-78
File diff suppressed because it is too large
Load Diff
+174
-78
File diff suppressed because it is too large
Load Diff
+174
-78
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
MAJOR_VERSION = 4
|
MAJOR_VERSION = 5
|
||||||
MINOR_VERSION = 1
|
MINOR_VERSION = 0
|
||||||
MICRO_VERSION = 0
|
MICRO_VERSION = 0
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
|
|
||||||
|
|||||||
+285
-46
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -1,11 +1,11 @@
|
|||||||
Version 4.9.1 (2019/03/11)
|
Version 5.0.13 (2023/08/31)
|
||||||
|
|
||||||
This is the second preview version of MiniGUI 5.0.0, an unstable version.
|
This is a minor enhancement and bugfix release of MiniGUI 5.0.x, the stable version.
|
||||||
|
|
||||||
Other packages for MiniGUI resource, tools, components, and samples:
|
Other packages for MiniGUI resource, tools, components, and samples:
|
||||||
|
|
||||||
- GVFB: `gvfb-1.2.4.tar.gz`
|
- GVFB: `gvfb-1.2.5.tar.gz`
|
||||||
- The resource package: `minigui-res-4.0.0.tar.gz`
|
- The resource package: `minigui-res-5.0.6.tar.gz`
|
||||||
- mGUtils component: `libmgutils-1.5.0.tar.gz`
|
- mGUtils component: `libmgutils-1.5.0.tar.gz`
|
||||||
- mGPlus component: `libmgplus-1.5.0.tar.gz`
|
- mGPlus component: `libmgplus-1.5.0.tar.gz`
|
||||||
- mGEff component: `libmgeff-1.5.0.tar.gz`
|
- mGEff component: `libmgeff-1.5.0.tar.gz`
|
||||||
|
|||||||
Executable
+44
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm config.cache config.status -f
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--disable-shared \
|
||||||
|
--enable-static \
|
||||||
|
--with-osname=freertos \
|
||||||
|
--with-targetname=external \
|
||||||
|
--with-runmode=sa \
|
||||||
|
--enable-mgslicefallback \
|
||||||
|
--disable-videopcxvfb \
|
||||||
|
--disable-videoqvfb \
|
||||||
|
--disable-videodrm \
|
||||||
|
--disable-videofbcon \
|
||||||
|
--enable-videocommlcd \
|
||||||
|
--enable-dummyial \
|
||||||
|
--disable-consoleial \
|
||||||
|
--disable-libinputial \
|
||||||
|
--enable-commial \
|
||||||
|
--disable-consoleimps2 \
|
||||||
|
--disable-mousecalibrate \
|
||||||
|
--enable-incoreres \
|
||||||
|
--disable-cursor \
|
||||||
|
--disable-clipboard \
|
||||||
|
--disable-adv2dapi \
|
||||||
|
--disable-savebitmap \
|
||||||
|
--disable-savescreen \
|
||||||
|
--disable-dblclk \
|
||||||
|
--disable-splash \
|
||||||
|
--disable-latin9support \
|
||||||
|
--disable-fullunicode \
|
||||||
|
--disable-rbfsupport \
|
||||||
|
--disable-vbfsupport \
|
||||||
|
--disable-upfsupport \
|
||||||
|
--disable-qpfsupport \
|
||||||
|
--disable-ttfsupport \
|
||||||
|
--disable-complexscripts \
|
||||||
|
--disable-ttfcache \
|
||||||
|
--disable-jpgsupport \
|
||||||
|
--disable-pngsupport \
|
||||||
|
--disable-flatlf \
|
||||||
|
--disable-textmode \
|
||||||
|
--disable-shmopen
|
||||||
Executable
+41
@@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm config.cache config.status -f
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--disable-shared \
|
||||||
|
--enable-static \
|
||||||
|
--with-osname=linux \
|
||||||
|
--with-targetname=external \
|
||||||
|
--with-runmode=sa \
|
||||||
|
--enable-mgslicefallback \
|
||||||
|
--disable-videopcxvfb \
|
||||||
|
--disable-videoqvfb \
|
||||||
|
--disable-videodrm \
|
||||||
|
--disable-videofbcon \
|
||||||
|
--enable-videocommlcd \
|
||||||
|
--enable-dummyial \
|
||||||
|
--disable-consoleial \
|
||||||
|
--disable-libinputial \
|
||||||
|
--enable-commial \
|
||||||
|
--disable-consoleimps2 \
|
||||||
|
--disable-mousecalibrate \
|
||||||
|
--enable-incoreres \
|
||||||
|
--disable-cursor \
|
||||||
|
--disable-savebitmap \
|
||||||
|
--disable-savescreen \
|
||||||
|
--disable-dblclk \
|
||||||
|
--disable-splash \
|
||||||
|
--disable-latin9support \
|
||||||
|
--disable-fullunicode \
|
||||||
|
--disable-rbfsupport \
|
||||||
|
--disable-vbfsupport \
|
||||||
|
--disable-upfsupport \
|
||||||
|
--disable-qpfsupport \
|
||||||
|
--disable-ttfsupport \
|
||||||
|
--disable-complexscripts \
|
||||||
|
--disable-ttfcache \
|
||||||
|
--disable-jpgsupport \
|
||||||
|
--disable-pngsupport \
|
||||||
|
--disable-flatlf \
|
||||||
|
--disable-textmode
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# set your own targaet_os
|
||||||
|
TARGET_OS=freertos
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
# set your compile tool #
|
||||||
|
CC=arm-linux-gnueabihf-gcc
|
||||||
|
CXX=arm-linux-gnueabihf-g++
|
||||||
|
CPP=arm-linux-gnueabihf-g++
|
||||||
|
AR=arm-linux-gnueabihf-ar
|
||||||
|
AS=arm-linux-gnueabihf-as
|
||||||
|
RANLIB=arm-linux-gnueabihf-ranlib
|
||||||
|
MAKE=/usr/bin/make
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
ARFLAGS=-rc
|
||||||
|
COFLAG=-c
|
||||||
|
|
||||||
|
OBJ=o
|
||||||
|
LIBA=a
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
# if you don't want to create dynamic, delete it #
|
||||||
|
LIBSO=so
|
||||||
|
SOFLAGS=-fPIC -shared -o
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
# set your compile flags and install prefix path #
|
||||||
|
PREFIX=/usr/local
|
||||||
|
CFLAGS+=-g -Wall -fPIC
|
||||||
|
LDFLAGS+=
|
||||||
|
##################################################
|
||||||
|
|
||||||
+6
-1
@@ -172,5 +172,10 @@ tab2space() {
|
|||||||
# sed -i 's/\<checkAndGetMainWindowPtrOfMainWin\>/checkAndGetMainWinIfMainWin/g' `grep '\<checkAndGetMainWindowPtrOfMainWin\>' -rl include/ src/`
|
# sed -i 's/\<checkAndGetMainWindowPtrOfMainWin\>/checkAndGetMainWinIfMainWin/g' `grep '\<checkAndGetMainWindowPtrOfMainWin\>' -rl include/ src/`
|
||||||
# sed -i 's/\<checkAndGetMainWindowPtrOfControl\>/checkAndGetMainWinIfWindow/g' `grep '\<checkAndGetMainWindowPtrOfControl\>' -rl include/ src/`
|
# sed -i 's/\<checkAndGetMainWindowPtrOfControl\>/checkAndGetMainWinIfWindow/g' `grep '\<checkAndGetMainWindowPtrOfControl\>' -rl include/ src/`
|
||||||
|
|
||||||
sed -i 's/\<mg_GetMsgQueueForThisThread\>/getMsgQueueForThisThread/g' `grep '\<mg_GetMsgQueueForThisThread\>' -rl include/ src/`
|
# sed -i 's/\<mg_GetMsgQueueForThisThread\>/getMsgQueueForThisThread/g' `grep '\<mg_GetMsgQueueForThisThread\>' -rl include/ src/`
|
||||||
|
|
||||||
|
# sed -i 's/\<IS_SHAREDFB_SCHEMA\>/IS_SHAREDFB_SCHEMA_PROCS/g' `grep '\<IS_SHAREDFB_SCHEMA\>' -rl include/ src/`
|
||||||
|
|
||||||
|
sed -i 's/\<REQID_GETWPSURFACE\>/REQID_GETSHAREDSURFACE/g' `grep '\<REQID_GETWPSURFACE\>' -rl include/ src/`
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
+192
-173
File diff suppressed because it is too large
Load Diff
+78
-8
@@ -55,6 +55,36 @@ wallpaper_pattern_size=full
|
|||||||
# def_compositor_so=
|
# def_compositor_so=
|
||||||
#}}
|
#}}
|
||||||
|
|
||||||
|
#{{ifdef _MGGAL_SHADOW
|
||||||
|
[shadow]
|
||||||
|
real_engine=pc_xvfb
|
||||||
|
defaultmode=800x600-16bpp
|
||||||
|
|
||||||
|
# `cw`: rotating screen clock-wise.
|
||||||
|
# `ccw`: rotating screen counter clock-wise.
|
||||||
|
# `hflip`: flipping screen horizontally.
|
||||||
|
# `vflip`: flipping screen vertically.
|
||||||
|
rotate_screen=ccw
|
||||||
|
|
||||||
|
# Whether the async. update is enabled.
|
||||||
|
# Use `true` or `yes` for enabled, anything else for disabled.
|
||||||
|
# Since 5.0.13.
|
||||||
|
async_update=yes
|
||||||
|
|
||||||
|
# The synchronization interval for the asyn. updater (milli-seconds).
|
||||||
|
# This setting is only valid when `async_update` is enabled and
|
||||||
|
# the real engine does not provide WaitWBlank method.
|
||||||
|
# Since 5.0.13.
|
||||||
|
update_interval=15
|
||||||
|
|
||||||
|
# The minimal pixels to use the hardware accelerator.
|
||||||
|
# If the number of pixels to copy is less than this value,
|
||||||
|
# MiniGUI will use the software copy routine to update the real screen,
|
||||||
|
# even if the real device provides a hardware accelerator.
|
||||||
|
# Since 5.0.13.
|
||||||
|
min_pixels_using_hwaccl=4096
|
||||||
|
#}}
|
||||||
|
|
||||||
#{{ifdef _MGGAL_DRM
|
#{{ifdef _MGGAL_DRM
|
||||||
[drm]
|
[drm]
|
||||||
defaultmode=1024x768-32bpp
|
defaultmode=1024x768-32bpp
|
||||||
@@ -72,9 +102,40 @@ device=/dev/dri/card0
|
|||||||
# The default value is 96.
|
# The default value is 96.
|
||||||
dpi=96
|
dpi=96
|
||||||
|
|
||||||
|
# Whether double buffering is enabled.
|
||||||
|
# Use `true` or `yes` for enabled, anything else for disabled.
|
||||||
|
# Note that under compositing schema, double buffering is always enabled.
|
||||||
|
# Since 5.0.0.
|
||||||
|
double_buffering=true
|
||||||
|
|
||||||
|
# The update interval for the asyn. updater (milli-seconds).
|
||||||
|
# This setting is only valid when drmWaitVBlank doesn't work correctly.
|
||||||
|
# Since 5.0.13.
|
||||||
|
update_interval=15
|
||||||
|
|
||||||
|
# The minimal pixels to use the hardware accelerator.
|
||||||
|
# If the number of pixels to copy is less than this value,
|
||||||
|
# MiniGUI will use the software copy routine to update the real screen,
|
||||||
|
# even if the device provides a hardware accelerator.
|
||||||
|
# Since 5.0.13.
|
||||||
|
min_pixels_using_hwaccl=4096
|
||||||
|
|
||||||
# The filename of the shared library for the external driver.
|
# The filename of the shared library for the external driver.
|
||||||
# The equivalent environment variable: MG_GAL_DRM_DRIVER
|
# The equivalent environment variable: MG_GAL_DRM_DRIVER
|
||||||
exdriver=libhidrmdrivers.so.0
|
exdriver=libdrmdrivers.so
|
||||||
|
#}}
|
||||||
|
|
||||||
|
#{{ifdef _MGIAL_SINGLETOUCHKEY
|
||||||
|
[singletouchkey]
|
||||||
|
# The touch device; use none to disable touch event.
|
||||||
|
touch_dev=/dev/input/event0
|
||||||
|
# The key device; use none to disable key event.
|
||||||
|
key_dev=none
|
||||||
|
# The number of keys; only valid if the key device is not `none` and can be opened.
|
||||||
|
nr_keys=2
|
||||||
|
# The maps from Linux keycode to MiniGUI scancode; only valid if `nr_keys` > 0.
|
||||||
|
keycode2scancode0=20,1
|
||||||
|
keycode2scancode1=50,2
|
||||||
#}}
|
#}}
|
||||||
|
|
||||||
#{{ifdef _MGIAL_LIBINPUT
|
#{{ifdef _MGIAL_LIBINPUT
|
||||||
@@ -86,6 +147,22 @@ seat=seat0
|
|||||||
[fbcon]
|
[fbcon]
|
||||||
defaultmode=1024x768-16bpp
|
defaultmode=1024x768-16bpp
|
||||||
dpi=96
|
dpi=96
|
||||||
|
|
||||||
|
# Whether double buffering is enabled (only for threads and standalone runmodes).
|
||||||
|
# Use `true` or `yes` for enabled, anything else for disabled.
|
||||||
|
# Note that under compositing schema, double buffering is always enabled.
|
||||||
|
# Since 5.0.10.
|
||||||
|
double_buffering=true
|
||||||
|
|
||||||
|
# Whether the async. update is enabled.
|
||||||
|
# Use `true` or `yes` for enabled, anything else for disabled.
|
||||||
|
# Since 5.0.13.
|
||||||
|
async_update=yes
|
||||||
|
|
||||||
|
# The update interval for the asyn. updater (milli-seconds).
|
||||||
|
# This setting is only valid when drmWaitVBlank doesn't work correctly.
|
||||||
|
# Since 5.0.13.
|
||||||
|
update_interval=15
|
||||||
#}}
|
#}}
|
||||||
|
|
||||||
#{{ifdef _MGGAL_PCXVFB
|
#{{ifdef _MGGAL_PCXVFB
|
||||||
@@ -98,13 +175,6 @@ exec_file=/usr/local/bin/gvfb
|
|||||||
[rtos_xvfb]
|
[rtos_xvfb]
|
||||||
defaultmode=800x600-16bpp
|
defaultmode=800x600-16bpp
|
||||||
|
|
||||||
#{{ifdef _MGGAL_SHADOW
|
|
||||||
[shadow]
|
|
||||||
real_engine=pc_xvfb
|
|
||||||
defaultmode=800x600-16bpp
|
|
||||||
rotate_screen=normal
|
|
||||||
#}}
|
|
||||||
|
|
||||||
#{{ifdef _MGGAL_MLSHADOW
|
#{{ifdef _MGGAL_MLSHADOW
|
||||||
[mlshadow]
|
[mlshadow]
|
||||||
real_engine=qvfb
|
real_engine=qvfb
|
||||||
|
|||||||
@@ -311,6 +311,7 @@ MGUI_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
|||||||
defined(__amd64) || \
|
defined(__amd64) || \
|
||||||
(defined(__alpha__) || defined(__alpha)) || \
|
(defined(__alpha__) || defined(__alpha)) || \
|
||||||
defined(__arm__) || defined(__aarch64__) || \
|
defined(__arm__) || defined(__aarch64__) || \
|
||||||
|
defined(__loongarch__) || \
|
||||||
defined(__riscv) || \
|
defined(__riscv) || \
|
||||||
(defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \
|
(defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \
|
||||||
(defined(__mips__) && defined(__MIPSEL__)) || \
|
(defined(__mips__) && defined(__MIPSEL__)) || \
|
||||||
@@ -2346,6 +2347,7 @@ int init_minigui_printf (int (*output_char) (int ch),
|
|||||||
#define _ERR_PRINTF(fmt, ...) \
|
#define _ERR_PRINTF(fmt, ...) \
|
||||||
do { \
|
do { \
|
||||||
TCS_RED (stderr); \
|
TCS_RED (stderr); \
|
||||||
|
fprintf (stderr, "%s: ", __FUNCTION__); \
|
||||||
fprintf (stderr, fmt, ##__VA_ARGS__); \
|
fprintf (stderr, fmt, ##__VA_ARGS__); \
|
||||||
TCS_NONE (stderr); \
|
TCS_NONE (stderr); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|||||||
@@ -237,7 +237,6 @@ MG_EXPORT void GUIAPI NotifyParentEx (HWND hwnd, LINT id, int code,
|
|||||||
NotifyParentEx(hwnd, id, code, 0)
|
NotifyParentEx(hwnd, id, code, 0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \var typedef int (*STRCMP) (const char* s1, const char* s2, size_t n)
|
|
||||||
* \brief Type of general strncmp function.
|
* \brief Type of general strncmp function.
|
||||||
*
|
*
|
||||||
* The function compares the two strings \a s1 and \a s2. It returns
|
* The function compares the two strings \a s1 and \a s2. It returns
|
||||||
|
|||||||
@@ -698,7 +698,6 @@ extern "C" {
|
|||||||
#define EM_SETREADONLY 0xF0CF
|
#define EM_SETREADONLY 0xF0CF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \var typedef int (*ED_DRAWSEL_FUNC) (HWND hWnd, HDC hdc, int startx, int starty, const char* content, int len, int selout)
|
|
||||||
* \brief Type of the edit control callback function on drawing selected strings.
|
* \brief Type of the edit control callback function on drawing selected strings.
|
||||||
*
|
*
|
||||||
* \param hWnd Handle of the edit control.
|
* \param hWnd Handle of the edit control.
|
||||||
|
|||||||
+24
-25
@@ -131,7 +131,31 @@
|
|||||||
#define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084
|
#define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084
|
||||||
#define IAL_EVENT_GESTURE_PINCH_END 0x0085
|
#define IAL_EVENT_GESTURE_PINCH_END 0x0085
|
||||||
|
|
||||||
|
#define TABLET_TOOL_CHANGED_X (1 << 0)
|
||||||
|
#define TABLET_TOOL_CHANGED_Y (1 << 1)
|
||||||
|
#define TABLET_TOOL_CHANGED_PRESSURE (1 << 2)
|
||||||
|
#define TABLET_TOOL_CHANGED_DISTANCE (1 << 3)
|
||||||
|
#define TABLET_TOOL_CHANGED_TILT_X (1 << 4)
|
||||||
|
#define TABLET_TOOL_CHANGED_TILT_Y (1 << 5)
|
||||||
|
#define TABLET_TOOL_CHANGED_ROTATION (1 << 6)
|
||||||
|
#define TABLET_TOOL_CHANGED_SLIDER (1 << 7)
|
||||||
|
#define TABLET_TOOL_CHANGED_SIZE_MAJOR (1 << 8)
|
||||||
|
#define TABLET_TOOL_CHANGED_SIZE_MINOR (1 << 9)
|
||||||
|
#define TABLET_TOOL_CHANGED_WHEEL (1 << 10)
|
||||||
|
|
||||||
#ifndef TABLET_TOOL_X
|
#ifndef TABLET_TOOL_X
|
||||||
|
#define TABLET_TOOL_X 0
|
||||||
|
#define TABLET_TOOL_Y 1
|
||||||
|
#define TABLET_TOOL_PRESSURE 2
|
||||||
|
#define TABLET_TOOL_DISTANCE 3
|
||||||
|
#define TABLET_TOOL_TILT_X 4
|
||||||
|
#define TABLET_TOOL_TILT_Y 5
|
||||||
|
#define TABLET_TOOL_ROTATION 6
|
||||||
|
#define TABLET_TOOL_SLIDER 7
|
||||||
|
#define TABLET_TOOL_SIZE_MAJOR 8
|
||||||
|
#define TABLET_TOOL_SIZE_MINOR 9
|
||||||
|
#define TABLET_TOOL_WHEEL 10
|
||||||
|
|
||||||
#define TABLET_TOOL_PROXIMITY_STATE_INVALID 0
|
#define TABLET_TOOL_PROXIMITY_STATE_INVALID 0
|
||||||
#define TABLET_TOOL_PROXIMITY_STATE_OUT 1
|
#define TABLET_TOOL_PROXIMITY_STATE_OUT 1
|
||||||
#define TABLET_TOOL_PROXIMITY_STATE_IN 2
|
#define TABLET_TOOL_PROXIMITY_STATE_IN 2
|
||||||
@@ -149,31 +173,6 @@
|
|||||||
|
|
||||||
#define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
|
#define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
|
||||||
#define TABLET_PAD_STRIP_SOURCE_FINGER 1
|
#define TABLET_PAD_STRIP_SOURCE_FINGER 1
|
||||||
|
|
||||||
#define TABLET_TOOL_CHANGED_X (1 << 0)
|
|
||||||
#define TABLET_TOOL_CHANGED_Y (1 << 1)
|
|
||||||
#define TABLET_TOOL_CHANGED_PRESSURE (1 << 2)
|
|
||||||
#define TABLET_TOOL_CHANGED_DISTANCE (1 << 3)
|
|
||||||
#define TABLET_TOOL_CHANGED_TILT_X (1 << 4)
|
|
||||||
#define TABLET_TOOL_CHANGED_TILT_Y (1 << 5)
|
|
||||||
#define TABLET_TOOL_CHANGED_ROTATION (1 << 6)
|
|
||||||
#define TABLET_TOOL_CHANGED_SLIDER (1 << 7)
|
|
||||||
#define TABLET_TOOL_CHANGED_SIZE_MAJOR (1 << 8)
|
|
||||||
#define TABLET_TOOL_CHANGED_SIZE_MINOR (1 << 9)
|
|
||||||
#define TABLET_TOOL_CHANGED_WHEEL (1 << 10)
|
|
||||||
|
|
||||||
#define TABLET_TOOL_X 0
|
|
||||||
#define TABLET_TOOL_Y 1
|
|
||||||
#define TABLET_TOOL_PRESSURE 2
|
|
||||||
#define TABLET_TOOL_DISTANCE 3
|
|
||||||
#define TABLET_TOOL_TILT_X 4
|
|
||||||
#define TABLET_TOOL_TILT_Y 5
|
|
||||||
#define TABLET_TOOL_ROTATION 6
|
|
||||||
#define TABLET_TOOL_SLIDER 7
|
|
||||||
#define TABLET_TOOL_SIZE_MAJOR 8
|
|
||||||
#define TABLET_TOOL_SIZE_MINOR 9
|
|
||||||
#define TABLET_TOOL_WHEEL 10
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IAL_EVENT_TABLET_TOOL_AXIS 0x0090
|
#define IAL_EVENT_TABLET_TOOL_AXIS 0x0090
|
||||||
|
|||||||
+173
-117
File diff suppressed because it is too large
Load Diff
+683
-127
File diff suppressed because it is too large
Load Diff
+157
-17
File diff suppressed because it is too large
Load Diff
+142
-50
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -2,11 +2,12 @@ prefix=@prefix@
|
|||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
includedir=@includedir@
|
includedir=@includedir@
|
||||||
|
runmode=@MINIGUI_RUNMODE@
|
||||||
|
libsuffix=@MGLIB_SUFFIX@
|
||||||
|
|
||||||
Name: MiniGUI
|
Name: MiniGUI
|
||||||
Description: A mature cross-platform windowing and GUI system for embedded systems and IoT smart devices.
|
Description: A mature cross-platform windowing and GUI system for embedded systems and IoT smart devices.
|
||||||
Version: @MINIGUI_VERSION@
|
Version: @MINIGUI_VERSION@
|
||||||
Runmode: @MINIGUI_RUNMODE@
|
|
||||||
Requires:
|
Requires:
|
||||||
Libs: -L${libdir} -lminigui_@MGLIB_SUFFIX@ @DEP_LIBS@
|
Libs: -L${libdir} -lminigui_@MGLIB_SUFFIX@ @DEP_LIBS@
|
||||||
Libs.private:
|
Libs.private:
|
||||||
|
|||||||
+7
-32
@@ -1,12 +1,4 @@
|
|||||||
if MG_MINIMALGDI
|
COMMON_SUBDIRS = libc misc main kernel sysres ial control ex_ctrl font gui mybmp include textedit newgal newgdi
|
||||||
COMMON_SUBDIRS = misc kernel sysres include
|
|
||||||
|
|
||||||
COMMON_LADD = \
|
|
||||||
kernel/libkernel.la \
|
|
||||||
sysres/libsysres.la \
|
|
||||||
misc/libmisc.la
|
|
||||||
else
|
|
||||||
COMMON_SUBDIRS = libc misc main kernel sysres ial control ex_ctrl font gui mybmp include textedit
|
|
||||||
|
|
||||||
COMMON_LADD = \
|
COMMON_LADD = \
|
||||||
libc/liblibc.la \
|
libc/liblibc.la \
|
||||||
@@ -21,36 +13,19 @@ COMMON_LADD = \
|
|||||||
mybmp/libmybmp.la \
|
mybmp/libmybmp.la \
|
||||||
kernel/libkernel.la \
|
kernel/libkernel.la \
|
||||||
sysres/libsysres.la \
|
sysres/libsysres.la \
|
||||||
textedit/libtextedit.la
|
textedit/libtextedit.la \
|
||||||
endif
|
newgal/libnewgal.la \
|
||||||
|
newgdi/libnewgdi.la
|
||||||
if MGRM_STANDALONE
|
|
||||||
LITE_LADD = standalone/libstandalone.la
|
|
||||||
LITE_SUBDIRS = standalone
|
|
||||||
else
|
|
||||||
if MGRM_PROCESSES
|
|
||||||
LITE_LADD = server/libserver.la client/libclient.la
|
|
||||||
LITE_SUBDIRS = server client
|
|
||||||
else
|
|
||||||
LITE_LADD =
|
|
||||||
LITE_SUBDIRS =
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
NEWGAL_LADD = newgal/libnewgal.la newgdi/libnewgdi.la
|
|
||||||
NEWGAL_SUBDIRS = newgal newgdi
|
|
||||||
|
|
||||||
DIST_SUBDIRS = $(COMMON_SUBDIRS) newgal newgdi server client standalone
|
DIST_SUBDIRS = $(COMMON_SUBDIRS) newgal newgdi server client standalone
|
||||||
SUBDIRS = $(COMMON_SUBDIRS) $(NEWGAL_SUBDIRS) $(LITE_SUBDIRS)
|
SUBDIRS = $(COMMON_SUBDIRS) @RUNMODE_SUBDIRS@
|
||||||
|
|
||||||
MGSOURCES = template.c template.h
|
MGSOURCES = template.c template.h
|
||||||
MGLIBADD = $(COMMON_LADD) \
|
MGLIBADD = $(COMMON_LADD) @RUNMODE_LADD@
|
||||||
$(LITE_LADD) \
|
|
||||||
$(NEWGAL_LADD)
|
|
||||||
MGLDFLAGS = -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
MGLDFLAGS = -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||||
|
|
||||||
lib_LTLIBRARIES=libminigui_@MGLIB_SUFFIX@.la
|
lib_LTLIBRARIES=libminigui_@MGLIB_SUFFIX@.la
|
||||||
libminigui_@MGLIB_SUFFIX@_la_LIBADD=$(MGLIBADD)
|
libminigui_@MGLIB_SUFFIX@_la_LIBADD=$(MGLIBADD) @DEP_LIBS@
|
||||||
libminigui_@MGLIB_SUFFIX@_la_SOURCES=$(MGSOURCES)
|
libminigui_@MGLIB_SUFFIX@_la_SOURCES=$(MGSOURCES)
|
||||||
libminigui_@MGLIB_SUFFIX@_la_LDFLAGS=$(MGLDFLAGS)
|
libminigui_@MGLIB_SUFFIX@_la_LDFLAGS=$(MGLDFLAGS)
|
||||||
|
|
||||||
|
|||||||
+73
-28
@@ -154,9 +154,31 @@ int GUIAPI GetSockFD2Server (void)
|
|||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
static void check_live (BOOL woken)
|
||||||
|
{
|
||||||
|
static DWORD last_ticks;
|
||||||
|
REQUEST req;
|
||||||
|
|
||||||
|
__mg_update_tick_count (NULL);
|
||||||
|
|
||||||
|
// Since 5.0.6, only send IAMLIVE if the current ticks > (last_ticks + 100)
|
||||||
|
if (woken || __mg_tick_counter > last_ticks + 100) {
|
||||||
|
last_ticks = __mg_tick_counter;
|
||||||
|
|
||||||
|
/* Tell server that I am live */
|
||||||
|
req.id = REQID_IAMLIVE;
|
||||||
|
req.data = &__mg_tick_counter;
|
||||||
|
req.len_data = sizeof (unsigned int);
|
||||||
|
ClientRequest (&req, NULL, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void process_socket_message (MSG *msg)
|
static void process_socket_message (MSG *msg)
|
||||||
{
|
{
|
||||||
if (msg->message == MSG_UPDATECLIWIN &&
|
if (msg->message == MSG_WAKEUP_CLIENT) {
|
||||||
|
check_live (TRUE);
|
||||||
|
}
|
||||||
|
else if (msg->message == MSG_UPDATECLIWIN &&
|
||||||
__mg_client_check_hwnd (msg->hwnd, __mg_client_id)) {
|
__mg_client_check_hwnd (msg->hwnd, __mg_client_id)) {
|
||||||
__mg_update_window (msg->hwnd,
|
__mg_update_window (msg->hwnd,
|
||||||
LOSWORD(msg->wParam), HISWORD(msg->wParam),
|
LOSWORD(msg->wParam), HISWORD(msg->wParam),
|
||||||
@@ -192,7 +214,7 @@ int GUIAPI ClientRequestEx2 (const REQUEST* request,
|
|||||||
&& (__mg_client_id == 0 && request->id != REQID_JOINLAYER)) {
|
&& (__mg_client_id == 0 && request->id != REQID_JOINLAYER)) {
|
||||||
#elif defined(_MGSCHEMA_COMPOSITING)
|
#elif defined(_MGSCHEMA_COMPOSITING)
|
||||||
if (__mg_client_id == 0 && request->id != REQID_JOINLAYER &&
|
if (__mg_client_id == 0 && request->id != REQID_JOINLAYER &&
|
||||||
request->id != REQID_GETWPSURFACE) {
|
request->id != REQID_GETSHAREDSURFACE) {
|
||||||
#else
|
#else
|
||||||
if (__mg_client_id == 0 && request->id != REQID_JOINLAYER) {
|
if (__mg_client_id == 0 && request->id != REQID_JOINLAYER) {
|
||||||
#endif
|
#endif
|
||||||
@@ -366,27 +388,6 @@ sock_error:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_live (void)
|
|
||||||
{
|
|
||||||
REQUEST req;
|
|
||||||
|
|
||||||
#if 0 /* deprecated code */
|
|
||||||
/* Since 5.0.0, call __mg_update_tick_count instead */
|
|
||||||
if (__mg_tick_counter != SHAREDRES_TIMER_COUNTER) {
|
|
||||||
AlertDesktopTimerEvent ();
|
|
||||||
__mg_tick_counter = SHAREDRES_TIMER_COUNTER;
|
|
||||||
}
|
|
||||||
#endif /* deprecated code */
|
|
||||||
|
|
||||||
__mg_update_tick_count (NULL);
|
|
||||||
|
|
||||||
/* Tell server that I am live */
|
|
||||||
req.id = REQID_IAMLIVE;
|
|
||||||
req.data = &__mg_tick_counter;
|
|
||||||
req.len_data = sizeof (unsigned int);
|
|
||||||
ClientRequest (&req, NULL, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
||||||
{
|
{
|
||||||
static DWORD old_timer;
|
static DWORD old_timer;
|
||||||
@@ -398,7 +399,7 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
|||||||
struct timeval sel_timeout;
|
struct timeval sel_timeout;
|
||||||
MSG Msg;
|
MSG Msg;
|
||||||
|
|
||||||
check_live ();
|
check_live (FALSE);
|
||||||
|
|
||||||
/* rset gets modified each time around */
|
/* rset gets modified each time around */
|
||||||
rset = msg_queue->rfdset;
|
rset = msg_queue->rfdset;
|
||||||
@@ -433,14 +434,14 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
|||||||
static unsigned int old_mouse_move_serial = 0xdeadbeef;
|
static unsigned int old_mouse_move_serial = 0xdeadbeef;
|
||||||
int flag = 0, mouse_x = -1, mouse_y = -1, buttons = -1;
|
int flag = 0, mouse_x = -1, mouse_y = -1, buttons = -1;
|
||||||
|
|
||||||
check_live ();
|
check_live (FALSE);
|
||||||
if (wait && (__mg_tick_counter - old_timer) >= repeat_timeout) {
|
if (wait && (__mg_tick_counter - old_timer) >= repeat_timeout) {
|
||||||
Msg.hwnd = HWND_DESKTOP;
|
Msg.hwnd = HWND_DESKTOP;
|
||||||
Msg.message = MSG_TIMEOUT;
|
Msg.message = MSG_TIMEOUT;
|
||||||
Msg.wParam = (WPARAM)__mg_tick_counter;
|
Msg.wParam = (WPARAM)__mg_tick_counter;
|
||||||
Msg.lParam = 0;
|
Msg.lParam = 0;
|
||||||
Msg.time = __mg_tick_counter;
|
Msg.time = __mg_tick_counter;
|
||||||
// Since 5.0.0, we do not genenrate MSG_TIMEOUT message any more.
|
// Since 5.0.0, we do not genenrate MSG_TIMEOUT message here.
|
||||||
// kernel_QueueMessage (msg_queue, &Msg);
|
// kernel_QueueMessage (msg_queue, &Msg);
|
||||||
|
|
||||||
old_timer = __mg_tick_counter;
|
old_timer = __mg_tick_counter;
|
||||||
@@ -507,7 +508,7 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
|||||||
/* go through registered listen fds */
|
/* go through registered listen fds */
|
||||||
n += __mg_kernel_check_listen_fds (msg_queue, &rset, wsetptr, esetptr);
|
n += __mg_kernel_check_listen_fds (msg_queue, &rset, wsetptr, esetptr);
|
||||||
|
|
||||||
check_live ();
|
check_live (FALSE);
|
||||||
|
|
||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
old_timer = __mg_tick_counter;
|
old_timer = __mg_tick_counter;
|
||||||
@@ -569,12 +570,23 @@ GHANDLE GUIAPI JoinLayer (const char* layer_name, const char* client_name,
|
|||||||
|
|
||||||
__mg_layer = layer_handle;
|
__mg_layer = layer_handle;
|
||||||
|
|
||||||
zi = (ZORDERINFO*) shmat (joined_info.zo_shmid, 0, SHM_RDONLY);
|
zi = (ZORDERINFO*) shmat (joined_info.zi_shmid, 0, SHM_RDONLY);
|
||||||
if (zi == (void*)-1) {
|
if (zi == (void*)-1) {
|
||||||
return INV_LAYER_HANDLE;
|
return INV_LAYER_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
__mg_zorder_info = zi;
|
__mg_zorder_info = zi;
|
||||||
|
if (joined_info.zi_shmid == joined_info.def_zi_shmid) {
|
||||||
|
__mg_def_zorder_info = zi;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
zi = (ZORDERINFO*) shmat (joined_info.def_zi_shmid, 0, SHM_RDONLY);
|
||||||
|
if (zi == (void*)-1) {
|
||||||
|
return INV_LAYER_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
__mg_def_zorder_info = zi;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__mg_tick_counter = SHAREDRES_TIMER_COUNTER;
|
__mg_tick_counter = SHAREDRES_TIMER_COUNTER;
|
||||||
@@ -711,6 +723,39 @@ BOOL __mg_client_on_layer_changed (GHANDLE layer_handle, int zi_shmid)
|
|||||||
|
|
||||||
__mg_layer = layer_handle;
|
__mg_layer = layer_handle;
|
||||||
__mg_zorder_info = zi;
|
__mg_zorder_info = zi;
|
||||||
|
|
||||||
|
#if 0 /* obsolete */
|
||||||
|
ZORDERNODE* nodes;
|
||||||
|
int slot;
|
||||||
|
|
||||||
|
nodes = GET_ZORDERNODE(zi);
|
||||||
|
slot = zi->first_tooltip;
|
||||||
|
for (; slot > 0; slot = nodes[slot].next) {
|
||||||
|
if (nodes [slot].cli == __mg_client_id) {
|
||||||
|
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
|
||||||
|
assert (win);
|
||||||
|
win->idx_znode = slot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
slot = zi->first_topmost;
|
||||||
|
for (; slot > 0; slot = nodes[slot].next) {
|
||||||
|
if (nodes [slot].cli == __mg_client_id) {
|
||||||
|
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
|
||||||
|
assert (win);
|
||||||
|
win->idx_znode = slot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
slot = zi->first_normal;
|
||||||
|
for (; slot > 0; slot = nodes[slot].next) {
|
||||||
|
if (nodes [slot].cli == __mg_client_id) {
|
||||||
|
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
|
||||||
|
assert (win);
|
||||||
|
win->idx_znode = slot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* obsolete */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+53
-43
@@ -210,6 +210,7 @@ static void setup_dc (HWND hWnd, BIDISLEDITDATA *sled, HDC hdc, BOOL bSel)
|
|||||||
DWORD dwStyle = GetWindowStyle (hWnd);
|
DWORD dwStyle = GetWindowStyle (hWnd);
|
||||||
|
|
||||||
if (!bSel) {
|
if (!bSel) {
|
||||||
|
SetBkMode (hdc, BM_TRANSPARENT);
|
||||||
|
|
||||||
if (dwStyle & WS_DISABLED)
|
if (dwStyle & WS_DISABLED)
|
||||||
SetTextColor (hdc,
|
SetTextColor (hdc,
|
||||||
@@ -1069,6 +1070,7 @@ static int ascii_bidi_type[] = {
|
|||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||||
|
|
||||||
/*0x60~0x6f*/
|
/*0x60~0x6f*/
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
@@ -1085,21 +1087,23 @@ static int ascii_bidi_type[] = {
|
|||||||
static int inline get_char_bidi_type (LOGFONT* logfont, Achar32 chv)
|
static int inline get_char_bidi_type (LOGFONT* logfont, Achar32 chv)
|
||||||
{
|
{
|
||||||
DEVFONT* devfont;
|
DEVFONT* devfont;
|
||||||
|
int bidi_type = BIDI_TYPE_LTR;
|
||||||
|
|
||||||
if (IS_MBCHV(chv)) {
|
if (IS_MBCHV(chv)) {
|
||||||
devfont = logfont->devfonts[1];
|
devfont = logfont->devfonts[1];
|
||||||
|
|
||||||
if (devfont->charset_ops->bidi_char_type) {
|
if (devfont->charset_ops->bidi_char_type) {
|
||||||
return devfont->charset_ops->bidi_char_type (chv);
|
bidi_type = devfont->charset_ops->bidi_char_type (chv);
|
||||||
}
|
|
||||||
else {
|
|
||||||
return BIDI_TYPE_LTR;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return ascii_bidi_type[chv];
|
assert(chv < 0x80);
|
||||||
|
bidi_type = ascii_bidi_type[chv];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_DBG_PRINTF("chv: %X: bidi_type: %x\n", chv, bidi_type);
|
||||||
|
return bidi_type;
|
||||||
|
|
||||||
}
|
}
|
||||||
static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type,
|
static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type,
|
||||||
int r_char_type, int line_type)
|
int r_char_type, int line_type)
|
||||||
@@ -1108,53 +1112,60 @@ static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type,
|
|||||||
Achar32 chv;
|
Achar32 chv;
|
||||||
chv = GetACharValue (logfont, newtext, strlen(newtext), NULL, 0);
|
chv = GetACharValue (logfont, newtext, strlen(newtext), NULL, 0);
|
||||||
|
|
||||||
if (chv == INV_ACHAR_VALUE)
|
int type = CHAR_TYPE_UNKKOWN;
|
||||||
return -1;
|
|
||||||
|
if (chv == INV_ACHAR_VALUE) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
bidi_type = get_char_bidi_type (logfont, chv);
|
bidi_type = get_char_bidi_type (logfont, chv);
|
||||||
|
|
||||||
if (BIDI_IS_STRONG(bidi_type))
|
if (BIDI_IS_STRONG(bidi_type)) {
|
||||||
{
|
if (BIDI_IS_RTL(bidi_type)) {
|
||||||
if (BIDI_IS_RTL(bidi_type))
|
type = CHAR_TYPE_RTL;
|
||||||
{
|
goto done;
|
||||||
return CHAR_TYPE_RTL;
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
type = CHAR_TYPE_LTR;
|
||||||
return CHAR_TYPE_LTR;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BIDI_IS_NUMBER(bidi_type))
|
if (BIDI_IS_NUMBER(bidi_type)) {
|
||||||
{
|
type = CHAR_TYPE_LTR;
|
||||||
return CHAR_TYPE_LTR;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (l_char_type == r_char_type)
|
if (l_char_type == r_char_type) {
|
||||||
{
|
type = l_char_type;
|
||||||
return l_char_type;
|
goto done;
|
||||||
}
|
}
|
||||||
/* no left char */
|
/* no left char */
|
||||||
else if (l_char_type == -1)
|
else if (l_char_type == CHAR_TYPE_UNKKOWN) {
|
||||||
{
|
|
||||||
if (BIDI_IS_WEAK (bidi_type))
|
if (BIDI_IS_WEAK (bidi_type))
|
||||||
return r_char_type;
|
type = r_char_type;
|
||||||
else
|
else
|
||||||
return line_type;
|
type = line_type;
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
/* no right char */
|
/* no right char */
|
||||||
else if (r_char_type == -1)
|
else if (r_char_type == CHAR_TYPE_UNKKOWN) {
|
||||||
{
|
|
||||||
if (BIDI_IS_WEAK (bidi_type))
|
if (BIDI_IS_WEAK (bidi_type))
|
||||||
return l_char_type;
|
type = l_char_type;
|
||||||
else
|
else
|
||||||
return line_type;
|
type = line_type;
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
type = line_type;
|
||||||
return line_type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_DBG_PRINTF("l_char_type: %d, r_char_type: %d, line_type: %d, "
|
||||||
|
"type for %X: %d\n",
|
||||||
|
l_char_type, r_char_type, line_type, chv, type);
|
||||||
|
|
||||||
|
done:
|
||||||
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_line_rl_type (ACHARMAPINFO* map, int len)
|
static int get_line_rl_type (ACHARMAPINFO* map, int len)
|
||||||
@@ -2133,7 +2144,7 @@ esright_input_char_refresh (HWND hWnd,
|
|||||||
scroll_rc.right = cur_caret_x;
|
scroll_rc.right = cur_caret_x;
|
||||||
|
|
||||||
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
||||||
UpdateWindow(hWnd, FALSE);
|
UpdateInvalidClient(hWnd, TRUE);
|
||||||
edtSetCaretPos (hWnd, sled);
|
edtSetCaretPos (hWnd, sled);
|
||||||
|
|
||||||
sled->changed = TRUE;
|
sled->changed = TRUE;
|
||||||
@@ -2504,8 +2515,6 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
unsigned char charBuffer [4];
|
unsigned char charBuffer [4];
|
||||||
int chars;
|
int chars;
|
||||||
|
|
||||||
_DBG_PRINTF("get char-----------------char----%p\n", (PVOID)wParam);
|
|
||||||
|
|
||||||
if (dwStyle & ES_READONLY)
|
if (dwStyle & ES_READONLY)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -2526,9 +2535,6 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
else {
|
else {
|
||||||
chars = 1;
|
chars = 1;
|
||||||
|
|
||||||
if (charBuffer [0] == 127) // BS
|
|
||||||
charBuffer [0] = '\b';
|
|
||||||
|
|
||||||
if (dwStyle & ES_UPPERCASE) {
|
if (dwStyle & ES_UPPERCASE) {
|
||||||
charBuffer [0] = toupper (charBuffer[0]);
|
charBuffer [0] = toupper (charBuffer[0]);
|
||||||
}
|
}
|
||||||
@@ -2537,12 +2543,12 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chars == 1) {
|
if (chars > 1) {
|
||||||
if (charBuffer [0] < 0x20 && charBuffer[0] != '\b') //FIXME
|
_WRN_PRINTF("BIDISLEDIT only support ISO8859-6 charset\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else if (charBuffer [0] == '\b' || charBuffer [0] == 0x7F) {
|
||||||
if (wParam == '\b') { // backspace
|
// BS or DEL
|
||||||
int del = 1;
|
int del = 1;
|
||||||
|
|
||||||
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
|
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
|
||||||
@@ -2564,9 +2570,12 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
sleBackspaceText (hWnd, sled, del, FALSE, FALSE);
|
sleBackspaceText (hWnd, sled, del, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (charBuffer [0] < 0x20) {
|
||||||
|
// ignore all other control characters.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (dwStyle & ES_LEFT) {
|
if (dwStyle & ES_LEFT) {
|
||||||
//if ((dwStyle&0xffff) == ES_LEFT) {
|
|
||||||
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
||||||
set_edit_caret_pos(hWnd, sled);
|
set_edit_caret_pos(hWnd, sled);
|
||||||
|
|
||||||
@@ -2586,6 +2595,7 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
sleInsertText (hWnd, sled, (char* )charBuffer, chars, FALSE);
|
sleInsertText (hWnd, sled, (char* )charBuffer, chars, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-12
@@ -299,6 +299,14 @@ static void change_status_from_pose (PCONTROL pctrl, int new_pose,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* DK: When the radio or check button state changes do not erase the background,
|
||||||
|
* and the prospects for direct rendering */
|
||||||
|
btnGetRects (pctrl, &rcClient, &rcContent, &rcBitmap);
|
||||||
|
if (BUTTON_IS_PUSHBTN(pctrl) || (pctrl->dwStyle & BS_PUSHLIKE))
|
||||||
|
InvalidateRect((HWND)pctrl, NULL, TRUE);
|
||||||
|
else
|
||||||
|
InvalidateRect((HWND)pctrl, &rcBitmap, FALSE);
|
||||||
|
|
||||||
/* complete a click if the click if valid
|
/* complete a click if the click if valid
|
||||||
* (mouse lbutton up in button )*/
|
* (mouse lbutton up in button )*/
|
||||||
if (old_pose == BST_PUSHED && new_pose != BST_DISABLE
|
if (old_pose == BST_PUSHED && new_pose != BST_DISABLE
|
||||||
@@ -312,14 +320,6 @@ static void change_status_from_pose (PCONTROL pctrl, int new_pose,
|
|||||||
|
|
||||||
NotifyParent ((HWND)pctrl, pctrl->id, BN_CLICKED);
|
NotifyParent ((HWND)pctrl, pctrl->id, BN_CLICKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DK: When the radio or check button state changes do not erase the background,
|
|
||||||
* and the prospects for direct rendering */
|
|
||||||
btnGetRects (pctrl, &rcClient, &rcContent, &rcBitmap);
|
|
||||||
if (BUTTON_IS_PUSHBTN(pctrl) || (pctrl->dwStyle & BS_PUSHLIKE))
|
|
||||||
InvalidateRect((HWND)pctrl, NULL, TRUE);
|
|
||||||
else
|
|
||||||
InvalidateRect((HWND)pctrl, &rcBitmap, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*btnGetRects:
|
/*btnGetRects:
|
||||||
@@ -423,8 +423,8 @@ static void draw_bitmap_button (PCONTROL pctrl, HDC hdc, DWORD dwStyle,
|
|||||||
|
|
||||||
GetClientRect ((HWND)pctrl, &prcClient);
|
GetClientRect ((HWND)pctrl, &prcClient);
|
||||||
if (dwStyle & BS_REALSIZEIMAGE) {
|
if (dwStyle & BS_REALSIZEIMAGE) {
|
||||||
x += (w - bmp->bmWidth) >> 1;
|
x += (int)(w - bmp->bmWidth) >> 1;
|
||||||
y += (h - bmp->bmHeight) >> 1;
|
y += (int)(h - bmp->bmHeight) >> 1;
|
||||||
w = h = 0;
|
w = h = 0;
|
||||||
|
|
||||||
if (bmp->bmWidth > RECTW(prcClient)){
|
if (bmp->bmWidth > RECTW(prcClient)){
|
||||||
@@ -847,8 +847,6 @@ static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case BM_SETSTYLE:
|
case BM_SETSTYLE:
|
||||||
pctrl->dwStyle &= 0xFFFF0000;
|
pctrl->dwStyle &= 0xFFFF0000;
|
||||||
pctrl->dwStyle |= (DWORD)(wParam & 0x0000FFFF);
|
pctrl->dwStyle |= (DWORD)(wParam & 0x0000FFFF);
|
||||||
|
|||||||
@@ -63,21 +63,17 @@
|
|||||||
#include "ctrlmisc.h"
|
#include "ctrlmisc.h"
|
||||||
|
|
||||||
#define _ID_TIMER 100
|
#define _ID_TIMER 100
|
||||||
|
#define _MARGIN 10
|
||||||
|
|
||||||
static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
static int iBorder;
|
|
||||||
switch (message) {
|
switch (message) {
|
||||||
case MSG_CREATE:
|
case MSG_CREATE:
|
||||||
{
|
{
|
||||||
const WINDOWINFO *info;
|
|
||||||
int timeout = (int)GetWindowAdditionalData (hWnd);
|
int timeout = (int)GetWindowAdditionalData (hWnd);
|
||||||
if (timeout >= 10)
|
if (timeout >= 10)
|
||||||
SetTimer (hWnd, _ID_TIMER, timeout / 10);
|
SetTimer (hWnd, _ID_TIMER, timeout / 10);
|
||||||
|
|
||||||
info = GetWindowInfo (hWnd);
|
|
||||||
iBorder =
|
|
||||||
info->we_rdr->calc_we_area (hWnd, LFRDR_METRICS_BORDER, NULL);
|
|
||||||
SetWindowFont (hWnd,
|
SetWindowFont (hWnd,
|
||||||
(PLOGFONT)GetWindowElementAttr(hWnd, WE_FONT_TOOLTIP));
|
(PLOGFONT)GetWindowElementAttr(hWnd, WE_FONT_TOOLTIP));
|
||||||
break;
|
break;
|
||||||
@@ -102,7 +98,7 @@ static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
|
|||||||
|
|
||||||
SetTextColor (hdc,
|
SetTextColor (hdc,
|
||||||
GetWindowElementPixelEx(hWnd, hdc, WE_FGC_TOOLTIP));
|
GetWindowElementPixelEx(hWnd, hdc, WE_FGC_TOOLTIP));
|
||||||
TabbedTextOut (hdc, iBorder, iBorder, text);
|
TabbedTextOut (hdc, _MARGIN, _MARGIN, text);
|
||||||
|
|
||||||
EndPaint (hWnd, hdc);
|
EndPaint (hWnd, hdc);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -164,6 +160,7 @@ HWND CreateToolTipWin (HWND hParentWnd, int x, int y, int timeout_ms,
|
|||||||
|
|
||||||
CreateInfo.dwStyle = WS_VISIBLE;
|
CreateInfo.dwStyle = WS_VISIBLE;
|
||||||
CreateInfo.dwExStyle = WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_USEPARENTRDR;
|
CreateInfo.dwExStyle = WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_USEPARENTRDR;
|
||||||
|
CreateInfo.dwExStyle |= WS_EX_WINTYPE_TOOLTIP | WS_EX_TROUNDCNS | WS_EX_BROUNDCNS;
|
||||||
CreateInfo.spCaption = buf ? buf : text;
|
CreateInfo.spCaption = buf ? buf : text;
|
||||||
CreateInfo.hMenu = 0;
|
CreateInfo.hMenu = 0;
|
||||||
CreateInfo.hCursor = GetSystemCursor (IDC_ARROW);
|
CreateInfo.hCursor = GetSystemCursor (IDC_ARROW);
|
||||||
@@ -171,8 +168,8 @@ HWND CreateToolTipWin (HWND hParentWnd, int x, int y, int timeout_ms,
|
|||||||
CreateInfo.MainWindowProc = ToolTipWinProc;
|
CreateInfo.MainWindowProc = ToolTipWinProc;
|
||||||
CreateInfo.lx = x;
|
CreateInfo.lx = x;
|
||||||
CreateInfo.ty = y;
|
CreateInfo.ty = y;
|
||||||
CreateInfo.rx = CreateInfo.lx + text_size.cx;
|
CreateInfo.rx = CreateInfo.lx + text_size.cx + _MARGIN * 2;
|
||||||
CreateInfo.by = CreateInfo.ty + text_size.cy;
|
CreateInfo.by = CreateInfo.ty + text_size.cy + _MARGIN * 2;
|
||||||
CreateInfo.iBkColor =
|
CreateInfo.iBkColor =
|
||||||
GetWindowElementPixelEx (hParentWnd, HDC_SCREEN, WE_BGC_TOOLTIP);
|
GetWindowElementPixelEx (hParentWnd, HDC_SCREEN, WE_BGC_TOOLTIP);
|
||||||
CreateInfo.dwAddData = (DWORD) timeout_ms;
|
CreateInfo.dwAddData = (DWORD) timeout_ms;
|
||||||
@@ -218,7 +215,8 @@ void ResetToolTipWin (HWND hwnd, int x, int y, const char* text, ...)
|
|||||||
if (y + text_size.cy > g_rcScr.bottom)
|
if (y + text_size.cy > g_rcScr.bottom)
|
||||||
y = g_rcScr.bottom - text_size.cy;
|
y = g_rcScr.bottom - text_size.cy;
|
||||||
|
|
||||||
MoveWindow (hwnd, x, y, text_size.cx, text_size.cy, TRUE);
|
MoveWindow (hwnd, x, y,
|
||||||
|
text_size.cx + _MARGIN * 2, text_size.cy + _MARGIN * 2, TRUE);
|
||||||
ShowWindow (hwnd, SW_SHOWNORMAL);
|
ShowWindow (hwnd, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-10
@@ -1678,7 +1678,7 @@ esright_input_char_refresh (HWND hWnd,
|
|||||||
scroll_rc.right = cur_caret_x;
|
scroll_rc.right = cur_caret_x;
|
||||||
|
|
||||||
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
||||||
UpdateWindow(hWnd, FALSE);
|
UpdateInvalidClient(hWnd, TRUE);
|
||||||
edtSetCaretPos (hWnd, sled);
|
edtSetCaretPos (hWnd, sled);
|
||||||
|
|
||||||
sled->changed = TRUE;
|
sled->changed = TRUE;
|
||||||
@@ -2143,9 +2143,6 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
else {
|
else {
|
||||||
chars = 1;
|
chars = 1;
|
||||||
|
|
||||||
if (charBuffer [0] == 127) // BS
|
|
||||||
charBuffer [0] = '\b';
|
|
||||||
|
|
||||||
if (dwStyle & ES_UPPERCASE) {
|
if (dwStyle & ES_UPPERCASE) {
|
||||||
charBuffer [0] = toupper (charBuffer[0]);
|
charBuffer [0] = toupper (charBuffer[0]);
|
||||||
}
|
}
|
||||||
@@ -2154,12 +2151,8 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chars == 1) {
|
if (chars == 1 && (charBuffer[0] == '\b' || charBuffer[0] == 0x7F)) {
|
||||||
if (charBuffer [0] < 0x20 && charBuffer[0] != '\b') //FIXME
|
// ASCII BS or DEL
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (charBuffer[0] == '\b') { //backspace
|
|
||||||
int del;
|
int del;
|
||||||
|
|
||||||
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
|
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
|
||||||
@@ -2184,6 +2177,10 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
sleInsertText (hWnd, sled, NULL, del);
|
sleInsertText (hWnd, sled, NULL, del);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (chars == 1 && charBuffer [0] < 0x20) {
|
||||||
|
// ignore all other ASCII control characters.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (dwStyle & ES_LEFT) {
|
if (dwStyle & ES_LEFT) {
|
||||||
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ void mglist_set_itemops (MgList *mglst, PMGITEMOPS iop)
|
|||||||
mglst->iop = *iop;
|
mglst->iop = *iop;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
LRESULT DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
||||||
PSCRDATA pscrdata, MgList *mglst)
|
PSCRDATA pscrdata, MgList *mglst)
|
||||||
{
|
{
|
||||||
switch (message) {
|
switch (message) {
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ struct _MgList
|
|||||||
|
|
||||||
/* ------------------------- external api -------------------------- */
|
/* ------------------------- external api -------------------------- */
|
||||||
|
|
||||||
MG_EXPORT int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
MG_EXPORT LRESULT DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
||||||
PSCRDATA pscrdata, MgList *mglst);
|
PSCRDATA pscrdata, MgList *mglst);
|
||||||
|
|
||||||
MG_EXPORT SVITEM_DRAWFUNC mglist_set_itemdraw (MgList *mglst, SVITEM_DRAWFUNC draw_func);
|
MG_EXPORT SVITEM_DRAWFUNC mglist_set_itemdraw (MgList *mglst, SVITEM_DRAWFUNC draw_func);
|
||||||
|
|||||||
@@ -1433,10 +1433,12 @@ static LRESULT NewToolbarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARA
|
|||||||
item_info->add_data = item->add_data;
|
item_info->add_data = item->add_data;
|
||||||
|
|
||||||
if (item_info->which & MTB_WHICH_TEXT)
|
if (item_info->which & MTB_WHICH_TEXT)
|
||||||
strncpy (item_info->text, item->text, NTB_TEXT_LEN);
|
//strncpy (item_info->text, item->text, NTB_TEXT_LEN);
|
||||||
|
strcpy (item_info->text, item->text);
|
||||||
|
|
||||||
if (item_info->which & MTB_WHICH_TIP)
|
if (item_info->which & MTB_WHICH_TIP)
|
||||||
strncpy (item_info->tip, item->tip, NTB_TIP_LEN);
|
//strncpy (item_info->tip, item->tip, NTB_TIP_LEN);
|
||||||
|
strcpy (item_info->tip, item->tip);
|
||||||
|
|
||||||
return NTB_OKAY;
|
return NTB_OKAY;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,6 +172,10 @@ BOOL scrolled_set_cont_pos (HWND hWnd, PSCRDATA pscrdata, int cont_x, int cont_y
|
|||||||
SetScrollPos (hWnd, SB_VERT, cont_y);
|
SetScrollPos (hWnd, SB_VERT, cont_y);
|
||||||
bChange = TRUE;
|
bChange = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bChange)
|
||||||
|
UpdateInvalidClient(hWnd, FALSE);
|
||||||
|
|
||||||
return bChange;
|
return bChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,7 +589,7 @@ int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
LRESULT DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PSCRDATA pscrdata = NULL;
|
PSCRDATA pscrdata = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ typedef struct _scrdata
|
|||||||
typedef SCRDATA *PSCRDATA;
|
typedef SCRDATA *PSCRDATA;
|
||||||
|
|
||||||
|
|
||||||
MG_EXPORT int DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
MG_EXPORT LRESULT DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||||
MG_EXPORT int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h);
|
MG_EXPORT int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h);
|
||||||
MG_EXPORT void scrolled_destroy (PSCRDATA pscrdata);
|
MG_EXPORT void scrolled_destroy (PSCRDATA pscrdata);
|
||||||
MG_EXPORT void scrolled_hscroll (HWND hWnd, PSCRDATA pscrdata, WPARAM wParam, LPARAM lParam);
|
MG_EXPORT void scrolled_hscroll (HWND hWnd, PSCRDATA pscrdata, WPARAM wParam, LPARAM lParam);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2022, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -493,10 +493,15 @@ LRESULT ScrollViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MSG_DESTROY:
|
case MSG_DESTROY: {
|
||||||
scrollview_destroy (psvdata);
|
/* suppress a warning about calling free() before using the pointer */
|
||||||
free (psvdata);
|
PSVDATA svdata = (PSVDATA) GetWindowAdditionalData2 (hWnd);
|
||||||
|
if (svdata) {
|
||||||
|
scrollview_destroy(svdata);
|
||||||
|
free (svdata);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case MSG_GETDLGCODE:
|
case MSG_GETDLGCODE:
|
||||||
return DLGC_WANTARROWS;
|
return DLGC_WANTARROWS;
|
||||||
|
|||||||
@@ -2096,7 +2096,6 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
|
|||||||
rcInv.right = ptedata->svdata.scrdata.nContWidth;
|
rcInv.right = ptedata->svdata.scrdata.nContWidth;
|
||||||
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
||||||
REFRESH_NODE_EX(node, &rcInv);
|
REFRESH_NODE_EX(node, &rcInv);
|
||||||
// UpdateWindow(hWnd, FALSE);
|
|
||||||
|
|
||||||
newlinenr = NODE_LINENR(node);
|
newlinenr = NODE_LINENR(node);
|
||||||
rcInv.left = 0;
|
rcInv.left = 0;
|
||||||
@@ -2104,12 +2103,10 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
|
|||||||
rcInv.top += ptedata->nLineHeight;
|
rcInv.top += ptedata->nLineHeight;
|
||||||
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
||||||
REFRESH_NODE_EX(node, &rcInv);
|
REFRESH_NODE_EX(node, &rcInv);
|
||||||
// UpdateWindow(hWnd, FALSE);
|
|
||||||
}
|
}
|
||||||
/* houhh 20090814, UpdataWindow will invalidate all edit area, but
|
/* houhh 20090814, UpdataWindow will invalidate all edit area, but
|
||||||
* erase area is not same with msg_paint area.*/
|
* erase area is not same with msg_paint area.*/
|
||||||
UpdateWindow(hWnd, FALSE);
|
UpdateInvalidClient(hWnd, TRUE);
|
||||||
//SendMessage(hWnd, MSG_PAINT, 0, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2022, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -283,7 +283,7 @@ static void DrawCoolBox (HWND hWnd, HDC hdc, PCOOLBARCTRL pdata)
|
|||||||
WINDOWINFO *info;
|
WINDOWINFO *info;
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
if (tmpdata->Caption == NULL || tmpdata->Caption [0] == '\0')
|
if (tmpdata->Caption [0] == '\0')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
GetTextExtent (hdc, tmpdata->Caption, -1, &size);
|
GetTextExtent (hdc, tmpdata->Caption, -1, &size);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ static void update_viewport (gvGridViewData *view, int from, int to, int is_row)
|
|||||||
r.left = from;
|
r.left = from;
|
||||||
ScrollWindow(view->hCtrl, to, 0, &r, NULL);
|
ScrollWindow(view->hCtrl, to, 0, &r, NULL);
|
||||||
}
|
}
|
||||||
UpdateWindow(view->hCtrl, FALSE);
|
UpdateInvalidClient(view->hCtrl, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// scroll function {{{
|
// scroll function {{{
|
||||||
|
|||||||
@@ -157,6 +157,8 @@ static int isInItem (MgList *mglst, int mouseX, int mouseY,
|
|||||||
|
|
||||||
index = row * pivlist->nCol + col;
|
index = row * pivlist->nCol + col;
|
||||||
pci = (IconviewItem *)mglist_getitem_byindex (mglst, index);
|
pci = (IconviewItem *)mglist_getitem_byindex (mglst, index);
|
||||||
|
if (pci == NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (pRet)
|
if (pRet)
|
||||||
*pRet = (MgItem*)pci;
|
*pRet = (MgItem*)pci;
|
||||||
|
|||||||
+9
-16
@@ -93,14 +93,15 @@ BOOL RegisterTreeViewControl (void)
|
|||||||
const WINDOW_ELEMENT_RENDERER * rdr =
|
const WINDOW_ELEMENT_RENDERER * rdr =
|
||||||
GetDefaultWindowElementRenderer();
|
GetDefaultWindowElementRenderer();
|
||||||
|
|
||||||
|
if (!(icon_fold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name,
|
||||||
if (!(icon_fold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name, SYSICON_FOLD, szValue)))) {
|
SYSICON_FOLD, szValue)))) {
|
||||||
if (!(icon_fold = LoadSystemIcon (SYSICON_FOLD, 0))) {
|
if (!(icon_fold = LoadSystemIcon (SYSICON_FOLD, 0))) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(icon_unfold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name, SYSICON_UNFOLD, szValue)))) {
|
if (!(icon_unfold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name,
|
||||||
|
SYSICON_UNFOLD, szValue)))) {
|
||||||
if (!(icon_unfold = LoadSystemIcon (SYSICON_UNFOLD, 0))) {
|
if (!(icon_unfold = LoadSystemIcon (SYSICON_UNFOLD, 0))) {
|
||||||
DestroyIcon (icon_fold);
|
DestroyIcon (icon_fold);
|
||||||
icon_fold = 0;
|
icon_fold = 0;
|
||||||
@@ -180,6 +181,7 @@ static BOOL tvInitTVData (HWND hwnd, PTVDATA pData, DWORD dwStyle, PTVITEMINFO r
|
|||||||
tvRoot->hIconFold = root_ii->hIconFold;
|
tvRoot->hIconFold = root_ii->hIconFold;
|
||||||
else
|
else
|
||||||
tvRoot->hIconFold = ICON_FOLD;
|
tvRoot->hIconFold = ICON_FOLD;
|
||||||
|
|
||||||
if (root_ii && root_ii->hIconUnfold)
|
if (root_ii && root_ii->hIconUnfold)
|
||||||
tvRoot->hIconUnfold = root_ii->hIconUnfold;
|
tvRoot->hIconUnfold = root_ii->hIconUnfold;
|
||||||
else
|
else
|
||||||
@@ -632,21 +634,12 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX, int cent
|
|||||||
centerX += (h>>1) + TV_BOXGAP;
|
centerX += (h>>1) + TV_BOXGAP;
|
||||||
|
|
||||||
if (pData->dwStyle & TVS_WITHICON) {
|
if (pData->dwStyle & TVS_WITHICON) {
|
||||||
if (!(pData->dwStyle & TVS_ICONFORSELECT)
|
if (p->child != NULL && (p->dwFlags & TVIF_FOLD)) {
|
||||||
&& (!p->child || (p->dwFlags & TVIF_FOLD))) {
|
|
||||||
if ((p->hIconFold)) {
|
if ((p->hIconFold)) {
|
||||||
DrawIcon (hdc, centerX, centerY - (h>>1),
|
DrawIcon (hdc, centerX, centerY - (h>>1), h, h, p->hIconFold);
|
||||||
h, h, p->hIconFold);
|
|
||||||
}
|
}
|
||||||
} else if ((pData->dwStyle & TVS_ICONFORSELECT) && p->dwFlags & TVIF_SELECTED) {
|
} else if ((p->hIconUnfold)) {
|
||||||
if ((p->hIconFold)) {
|
DrawIcon (hdc, centerX, centerY - (h>>1), h, h, p->hIconUnfold);
|
||||||
DrawIcon (hdc, centerX, centerY - (h>>1),
|
|
||||||
h, h, p->hIconFold);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
if ((p->hIconUnfold)) {
|
|
||||||
DrawIcon (hdc, centerX, centerY - (h>>1),
|
|
||||||
h, h, p->hIconUnfold);
|
|
||||||
}
|
}
|
||||||
centerX += h + TV_ICONGAP;
|
centerX += h + TV_ICONGAP;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,6 +202,17 @@ static void destroy (GLYPHTREENODE *root)
|
|||||||
|
|
||||||
/*** device font ops ***/
|
/*** device font ops ***/
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
return DEVFONTGLYPHTYPE_PRERDRBMP;
|
return DEVFONTGLYPHTYPE_PRERDRBMP;
|
||||||
@@ -380,6 +391,7 @@ static int get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont,
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_bitmap_font_ops = {
|
FONTOPS __mg_bitmap_font_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
+19
-16
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -226,7 +226,7 @@ static int iso8859_6_conv_from_uc32 (Uchar32 wc, unsigned char* mchar)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* must attetion the para s is arabic chv value.*/
|
#if 0
|
||||||
static int is_arabic_char_vowel(Uint8 c)
|
static int is_arabic_char_vowel(Uint8 c)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -240,6 +240,7 @@ static int is_arabic_char_vowel(Uint8 c)
|
|||||||
*/
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ISO8859-6 charset vowel relative define and judge */
|
/* ISO8859-6 charset vowel relative define and judge */
|
||||||
#define ISARABIC_VOWEL(s) ((s >= FATHATAN) && (s <= SUKUN))
|
#define ISARABIC_VOWEL(s) ((s >= FATHATAN) && (s <= SUKUN))
|
||||||
@@ -461,15 +462,18 @@ static int iso8859_6_len_first_char (const unsigned char* mstr, int len)
|
|||||||
return 2;
|
return 2;
|
||||||
else if (ignore == 2)
|
else if (ignore == 2)
|
||||||
return 3;
|
return 3;
|
||||||
else
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ISARABIC_LIG_HALF(s) ((s == 0xa5) || (s == 0xa6))
|
#define ISARABIC_LIG_HALF(s) ((s == 0xa5) || (s == 0xa6))
|
||||||
|
|
||||||
static unsigned int iso8859_6_char_type (Achar32 chv)
|
static unsigned int iso8859_6_char_type (Achar32 chv)
|
||||||
{
|
{
|
||||||
|
chv = REAL_ACHAR(chv);
|
||||||
|
#if 1
|
||||||
|
return sb_char_type(chv);
|
||||||
|
#else
|
||||||
unsigned int ch_type = ACHAR_BASIC_UNKNOWN;
|
unsigned int ch_type = ACHAR_BASIC_UNKNOWN;
|
||||||
|
|
||||||
if (is_arabic_char_vowel (chv)) { /* is vowel */
|
if (is_arabic_char_vowel (chv)) { /* is vowel */
|
||||||
@@ -480,10 +484,10 @@ static unsigned int iso8859_6_char_type (Achar32 chv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ch_type;
|
return ch_type;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
||||||
#if 0
|
|
||||||
/*0x00~0x0f*/
|
/*0x00~0x0f*/
|
||||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||||
@@ -531,7 +535,6 @@ static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
|||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
||||||
#endif
|
|
||||||
|
|
||||||
/*0x80~0x8f*/
|
/*0x80~0x8f*/
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
|
BIDI_TYPE_ON, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
|
||||||
@@ -606,10 +609,9 @@ static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
|||||||
static BidiType iso8859_6_bidi_char_type (Achar32 chv)
|
static BidiType iso8859_6_bidi_char_type (Achar32 chv)
|
||||||
{
|
{
|
||||||
chv = REAL_ACHAR(chv);
|
chv = REAL_ACHAR(chv);
|
||||||
if (chv > 0x7F)
|
assert(chv < TABLESIZE(__mg_iso8859_6_bidi_char_type_map));
|
||||||
return (BidiType)__mg_iso8859_6_bidi_char_type_map[chv - 0x80];
|
|
||||||
else
|
return (BidiType)__mg_iso8859_6_bidi_char_type_map[chv];
|
||||||
return (BidiType)__mg_iso8859_1_bidi_char_type_map[chv];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_table_index(Uint8 c)
|
static int get_table_index(Uint8 c)
|
||||||
@@ -796,7 +798,7 @@ static const unsigned char* iso8859_6_get_next_word (const unsigned char* mstr,
|
|||||||
static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
||||||
int cur_len, int shape_type)
|
int cur_len, int shape_type)
|
||||||
{
|
{
|
||||||
Achar32 chv = -1;
|
Achar32 chv = INV_ACHAR_VALUE;
|
||||||
int ignore;
|
int ignore;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
@@ -811,15 +813,14 @@ static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chv == -1 || chv == 0) {
|
if (chv == INV_ACHAR_VALUE || chv == 0) {
|
||||||
if (ISARABIC_VOWEL(*cur_mchar)){
|
if (ISARABIC_VOWEL(*cur_mchar)){
|
||||||
chv = fontset_68x_get_vowel_char(*cur_mchar);
|
chv = fontset_68x_get_vowel_char(*cur_mchar);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chv == 0 || chv == -1) {
|
if (chv == 0 || chv == INV_ACHAR_VALUE) {
|
||||||
index = get_table_index(*cur_mchar);
|
index = get_table_index(*cur_mchar);
|
||||||
if (index >=0)
|
if (index >=0 ) {
|
||||||
{
|
|
||||||
switch (shape_type) {
|
switch (shape_type) {
|
||||||
case ACHAR_ISOLATED:
|
case ACHAR_ISOLATED:
|
||||||
chv = shape_info[index].isolated;
|
chv = shape_info[index].isolated;
|
||||||
@@ -841,7 +842,7 @@ static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chv == 0)
|
if (chv == 0)
|
||||||
chv =-1;
|
chv = INV_ACHAR_VALUE;
|
||||||
|
|
||||||
return chv;
|
return chv;
|
||||||
}
|
}
|
||||||
@@ -862,6 +863,7 @@ static const BIDICHAR_MIRROR_MAP __mg_iso8859_68x_mirror_table [] =
|
|||||||
|
|
||||||
static BOOL iso8859_6_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
|
static BOOL iso8859_6_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
|
||||||
{
|
{
|
||||||
|
chv = REAL_ACHAR(chv);
|
||||||
return get_mirror_char (__mg_iso8859_68x_mirror_table,
|
return get_mirror_char (__mg_iso8859_68x_mirror_table,
|
||||||
TABLESIZE (__mg_iso8859_68x_mirror_table), chv, mirrored);
|
TABLESIZE (__mg_iso8859_68x_mirror_table), chv, mirrored);
|
||||||
}
|
}
|
||||||
@@ -871,6 +873,7 @@ static CHARSETOPS CharsetOps_iso8859_6 = {
|
|||||||
3,
|
3,
|
||||||
FONT_CHARSET_ISO8859_6,
|
FONT_CHARSET_ISO8859_6,
|
||||||
0,
|
0,
|
||||||
|
1,
|
||||||
iso8859_6_len_first_char,
|
iso8859_6_len_first_char,
|
||||||
iso8859_6_get_char_value,
|
iso8859_6_get_char_value,
|
||||||
iso8859_6_get_shaped_char_value,
|
iso8859_6_get_shaped_char_value,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -210,6 +210,8 @@ static unsigned int unicode_char_type (Achar32 chv)
|
|||||||
mchar_type = ACHAR_BASIC_LF;
|
mchar_type = ACHAR_BASIC_LF;
|
||||||
else if (break_type == UCHAR_BREAK_SPACE)
|
else if (break_type == UCHAR_BREAK_SPACE)
|
||||||
mchar_type = ACHAR_BASIC_SPACE;
|
mchar_type = ACHAR_BASIC_SPACE;
|
||||||
|
else if (basic_type == UCHAR_CATEGORY_NON_SPACING_MARK)
|
||||||
|
mchar_type = ACHAR_BASIC_VOWEL;
|
||||||
else if (chv != 0x00AD && ISZEROWIDTHTYPE (basic_type))
|
else if (chv != 0x00AD && ISZEROWIDTHTYPE (basic_type))
|
||||||
mchar_type = ACHAR_BASIC_ZEROWIDTH;
|
mchar_type = ACHAR_BASIC_ZEROWIDTH;
|
||||||
else if ((chv >= 0x1160 && chv < 0x1200)
|
else if ((chv >= 0x1160 && chv < 0x1200)
|
||||||
@@ -239,10 +241,36 @@ static const BidiType linear_enum_to_bidi_type[] = {
|
|||||||
#undef _UNIBIDI_ADD_TYPE
|
#undef _UNIBIDI_ADD_TYPE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Since 5.0.13: this function only returns BidiType which
|
||||||
|
is recognizable by the legacy BIDI algorithm. */
|
||||||
static BidiType unicode_bidi_char_type(Achar32 ch)
|
static BidiType unicode_bidi_char_type(Achar32 ch)
|
||||||
{
|
{
|
||||||
ch = REAL_ACHAR(ch);
|
ch = REAL_ACHAR(ch);
|
||||||
return linear_enum_to_bidi_type[UNIBIDI_GET_BIDI_TYPE(ch)];
|
BidiType bt = linear_enum_to_bidi_type[UNIBIDI_GET_BIDI_TYPE(ch)];
|
||||||
|
|
||||||
|
switch (bt) {
|
||||||
|
case BIDI_TYPE_LTR:
|
||||||
|
case BIDI_TYPE_RTL:
|
||||||
|
case BIDI_TYPE_AL:
|
||||||
|
case BIDI_TYPE_EN:
|
||||||
|
case BIDI_TYPE_AN:
|
||||||
|
case BIDI_TYPE_ET:
|
||||||
|
case BIDI_TYPE_CS:
|
||||||
|
case BIDI_TYPE_NSM:
|
||||||
|
case BIDI_TYPE_BN:
|
||||||
|
case BIDI_TYPE_BS:
|
||||||
|
case BIDI_TYPE_SS:
|
||||||
|
case BIDI_TYPE_WS:
|
||||||
|
case BIDI_TYPE_ON:
|
||||||
|
case BIDI_TYPE_SOT:
|
||||||
|
case BIDI_TYPE_EOT:
|
||||||
|
return bt;
|
||||||
|
default:
|
||||||
|
_DBG_PRINTF("Not recognizable for char (0x%04x): %u\n", ch, bt);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return BIDI_TYPE_WS;
|
||||||
}
|
}
|
||||||
|
|
||||||
BidiType GUIAPI UCharGetBidiType(Uchar32 uc)
|
BidiType GUIAPI UCharGetBidiType(Uchar32 uc)
|
||||||
@@ -628,6 +656,7 @@ CHARSETOPS __mg_CharsetOps_utf8 = {
|
|||||||
6,
|
6,
|
||||||
FONT_CHARSET_UTF8,
|
FONT_CHARSET_UTF8,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
utf8_len_first_char,
|
utf8_len_first_char,
|
||||||
utf8_get_char_value,
|
utf8_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -854,6 +883,7 @@ CHARSETOPS __mg_CharsetOps_utf16le = {
|
|||||||
4,
|
4,
|
||||||
FONT_CHARSET_UTF16LE,
|
FONT_CHARSET_UTF16LE,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
utf16le_len_first_char,
|
utf16le_len_first_char,
|
||||||
utf16le_get_char_value,
|
utf16le_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1080,6 +1110,7 @@ CHARSETOPS __mg_CharsetOps_utf16be = {
|
|||||||
4,
|
4,
|
||||||
FONT_CHARSET_UTF16BE,
|
FONT_CHARSET_UTF16BE,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
utf16be_len_first_char,
|
utf16be_len_first_char,
|
||||||
utf16be_get_char_value,
|
utf16be_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
+30
-7
File diff suppressed because it is too large
Load Diff
+9
-11
@@ -1012,8 +1012,9 @@ void GUIAPI DestroyDynamicDevFont (DEVFONT** devfont)
|
|||||||
{
|
{
|
||||||
char font_name [LEN_UNIDEVFONT_NAME + 1];
|
char font_name [LEN_UNIDEVFONT_NAME + 1];
|
||||||
|
|
||||||
memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
//memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
||||||
strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME);
|
//strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME);
|
||||||
|
strcpy(font_name, (*devfont)->name);
|
||||||
|
|
||||||
font_DelDevFont (font_name);
|
font_DelDevFont (font_name);
|
||||||
*devfont = NULL;
|
*devfont = NULL;
|
||||||
@@ -1069,26 +1070,23 @@ static BOOL init_or_term_specifical_fonts (char* etc_section, BOOL is_unload)
|
|||||||
added_num ++;
|
added_num ++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* [DK] Fix Bug #4801, which introduce a absolute path check error in Windows,
|
/* [DK] Fix Bug #4801, which introduce an absolute path check error in Windows,
|
||||||
* first to load from sytem res path, else load it directly (relative or absolute path).*/
|
* first to load from sytem res path, else load it directly (relative or absolute path).*/
|
||||||
if ((add_dev_font (font_name, font_file, TRUE)) == TRUE)
|
if (add_dev_font (font_name, font_file, TRUE))
|
||||||
added_num++;
|
added_num++;
|
||||||
else if ((0 == __mg_path_joint(font_path, MAX_PATH + 1,
|
else if ((0 == __mg_path_joint(font_path, MAX_PATH + 1,
|
||||||
__sysres_get_system_res_path(), font_file))
|
__sysres_get_system_res_path(), font_file)) &&
|
||||||
&& ((add_dev_font (font_name, font_path, TRUE)) == TRUE))
|
add_dev_font (font_name, font_path, TRUE))
|
||||||
added_num++;
|
added_num++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_unload || added_num > 0 || added_num == font_num)
|
if (is_unload || added_num > 0 || added_num == font_num) {
|
||||||
{
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
BOOL font_InitSpecificalFonts (char* etc_section)
|
BOOL font_InitSpecificalFonts (char* etc_section)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -255,6 +255,17 @@ compute_kernval (TTFINSTANCEINFO* ttf_inst_info)
|
|||||||
return kernval;
|
return kernval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
if (logfont->style & FS_WEIGHT_BOOK)
|
if (logfont->style & FS_WEIGHT_BOOK)
|
||||||
@@ -792,6 +803,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
}
|
}
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_ttf_ops = {
|
FONTOPS __mg_ttf_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
+13
-1
@@ -197,6 +197,17 @@ print_bitmap_grey (const BYTE* buffer, int width, int rows, int pitch)
|
|||||||
printf("*******************************************\n");
|
printf("*******************************************\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
switch (logfont->style & FS_RENDER_MASK) {
|
switch (logfont->style & FS_RENDER_MASK) {
|
||||||
@@ -735,9 +746,9 @@ get_glyph_advance (LOGFONT* logfont, DEVFONT* devfont,
|
|||||||
pcache->valid_advance = 1;
|
pcache->valid_advance = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
done:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
done:
|
|
||||||
FT_UNLOCK(&ft_lock);
|
FT_UNLOCK(&ft_lock);
|
||||||
|
|
||||||
if (px) {
|
if (px) {
|
||||||
@@ -1265,6 +1276,7 @@ void font_TermFreetypeLibrary (void)
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_ttf_ops = {
|
FONTOPS __mg_ttf_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ typedef int (* MakeHashKeyFunc)(Glyph32 gv);
|
|||||||
typedef struct tagFTFACEINFO {
|
typedef struct tagFTFACEINFO {
|
||||||
char* filepathname;
|
char* filepathname;
|
||||||
FT_Face face;
|
FT_Face face;
|
||||||
BOOL valid;
|
|
||||||
#ifdef _MGFONT_TTF_CACHE
|
#ifdef _MGFONT_TTF_CACHE
|
||||||
int face_index;
|
int face_index;
|
||||||
int cmap_index;
|
int cmap_index;
|
||||||
@@ -163,13 +162,13 @@ extern void __mg_ttc_sys_deinit(void);
|
|||||||
extern TTFCACHEINFO *__mg_ttc_search(HCACHE hCache, Glyph32 gv, int *size);
|
extern TTFCACHEINFO *__mg_ttc_search(HCACHE hCache, Glyph32 gv, int *size);
|
||||||
extern void __mg_ttc_refer(HCACHE hCache);
|
extern void __mg_ttc_refer(HCACHE hCache);
|
||||||
|
|
||||||
|
#endif /* _MGFONT_TTF_CACHE */
|
||||||
|
|
||||||
#ifdef _MGCOMPLEX_SCRIPTS
|
#ifdef _MGCOMPLEX_SCRIPTS
|
||||||
extern void __mg_init_harzbuff_funcs(void);
|
extern void __mg_init_harzbuff_funcs(void);
|
||||||
extern void __mg_term_harzbuff_funcs(void);
|
extern void __mg_term_harzbuff_funcs(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
@@ -120,47 +120,42 @@ hb_minigui_unicode_decompose (hb_unicode_funcs_t *ufuncs,
|
|||||||
return UCharDecompose(ab, a, b);
|
return UCharDecompose(ab, a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static hb_unicode_funcs_t *_funcs;
|
/* extern hb_unicode_funcs_t *__mg_hb_unifuncs */
|
||||||
static hb_unicode_funcs_t *get_unicode_funcs(void)
|
hb_unicode_funcs_t *__mg_hb_unifuncs;
|
||||||
{
|
|
||||||
if (_funcs)
|
|
||||||
return _funcs;
|
|
||||||
|
|
||||||
_funcs = hb_unicode_funcs_create (NULL);
|
|
||||||
|
|
||||||
hb_unicode_funcs_set_combining_class_func (_funcs,
|
|
||||||
hb_minigui_unicode_combining_class, NULL, NULL);
|
|
||||||
hb_unicode_funcs_set_general_category_func (_funcs,
|
|
||||||
hb_minigui_unicode_general_category, NULL, NULL);
|
|
||||||
hb_unicode_funcs_set_mirroring_func (_funcs,
|
|
||||||
hb_minigui_unicode_mirroring, NULL, NULL);
|
|
||||||
hb_unicode_funcs_set_script_func (_funcs,
|
|
||||||
hb_minigui_unicode_script, NULL, NULL);
|
|
||||||
hb_unicode_funcs_set_compose_func (_funcs,
|
|
||||||
hb_minigui_unicode_compose, NULL, NULL);
|
|
||||||
hb_unicode_funcs_set_decompose_func (_funcs,
|
|
||||||
hb_minigui_unicode_decompose, NULL, NULL);
|
|
||||||
|
|
||||||
hb_unicode_funcs_make_immutable (_funcs);
|
|
||||||
|
|
||||||
return _funcs;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef hb_unicode_funcs_t *(*hb_get_unicode_funcs) (void);
|
|
||||||
extern hb_get_unicode_funcs __hb_extern_get_unicode_funcs;
|
|
||||||
|
|
||||||
void __mg_init_harzbuff_funcs(void)
|
void __mg_init_harzbuff_funcs(void)
|
||||||
{
|
{
|
||||||
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
||||||
__hb_extern_get_unicode_funcs = get_unicode_funcs;
|
|
||||||
|
if (__mg_hb_unifuncs)
|
||||||
|
return;
|
||||||
|
|
||||||
|
__mg_hb_unifuncs = hb_unicode_funcs_create (NULL);
|
||||||
|
|
||||||
|
hb_unicode_funcs_set_combining_class_func (__mg_hb_unifuncs,
|
||||||
|
hb_minigui_unicode_combining_class, NULL, NULL);
|
||||||
|
hb_unicode_funcs_set_general_category_func (__mg_hb_unifuncs,
|
||||||
|
hb_minigui_unicode_general_category, NULL, NULL);
|
||||||
|
hb_unicode_funcs_set_mirroring_func (__mg_hb_unifuncs,
|
||||||
|
hb_minigui_unicode_mirroring, NULL, NULL);
|
||||||
|
hb_unicode_funcs_set_script_func (__mg_hb_unifuncs,
|
||||||
|
hb_minigui_unicode_script, NULL, NULL);
|
||||||
|
hb_unicode_funcs_set_compose_func (__mg_hb_unifuncs,
|
||||||
|
hb_minigui_unicode_compose, NULL, NULL);
|
||||||
|
hb_unicode_funcs_set_decompose_func (__mg_hb_unifuncs,
|
||||||
|
hb_minigui_unicode_decompose, NULL, NULL);
|
||||||
|
|
||||||
|
hb_unicode_funcs_make_immutable (__mg_hb_unifuncs);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __mg_term_harzbuff_funcs(void)
|
void __mg_term_harzbuff_funcs(void)
|
||||||
{
|
{
|
||||||
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
||||||
|
|
||||||
if (_funcs) {
|
if (__mg_hb_unifuncs) {
|
||||||
hb_unicode_funcs_destroy(_funcs);
|
hb_unicode_funcs_destroy(__mg_hb_unifuncs);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_ERR_PRINTF("%s: hb_unicode_funcs_t object is NULL\n",
|
_ERR_PRINTF("%s: hb_unicode_funcs_t object is NULL\n",
|
||||||
|
|||||||
+15
-9
@@ -703,21 +703,20 @@ void __mg_legacy_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
|
|||||||
print_hexstr(achars, len, TRUE);
|
print_hexstr(achars, len, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void bidi_map_reverse (void* context, int len, int pos)
|
static void bidi_map_reverse (void* context, int len, int pos)
|
||||||
{
|
{
|
||||||
GLYPHMAPINFO* str = (GLYPHMAPINFO*)context + pos;
|
ACHARMAPINFO* str = (ACHARMAPINFO*)context + pos;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len / 2; i++)
|
for (i = 0; i < len / 2; i++)
|
||||||
{
|
{
|
||||||
GLYPHMAPINFO tmp = str[i];
|
ACHARMAPINFO tmp = str[i];
|
||||||
str[i] = str[len - 1 - i];
|
str[i] = str[len - 1 - i];
|
||||||
str[len - 1 - i] = tmp;
|
str[len - 1 - i] = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
||||||
Achar32* achars, int len, GLYPHMAPINFO* map, int pel)
|
Achar32* achars, int len, int pel, ACHARMAPINFO* map)
|
||||||
{
|
{
|
||||||
BYTE max_level = 1;
|
BYTE max_level = 1;
|
||||||
TYPERUN *type_rl_list = NULL;
|
TYPERUN *type_rl_list = NULL;
|
||||||
@@ -725,6 +724,7 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
|||||||
int i;
|
int i;
|
||||||
int run_pos;
|
int run_pos;
|
||||||
int run_len;
|
int run_len;
|
||||||
|
REORDER_CONTEXT rc;
|
||||||
|
|
||||||
print_hexstr(achars, len, FALSE);
|
print_hexstr(achars, len, FALSE);
|
||||||
|
|
||||||
@@ -735,14 +735,15 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
|||||||
run_pos = node_p->pos;
|
run_pos = node_p->pos;
|
||||||
run_len = node_p->len;
|
run_len = node_p->len;
|
||||||
|
|
||||||
for (i=0; i<run_len; i++)
|
for (i=0; i<run_len; i++) {
|
||||||
{
|
|
||||||
(map+run_pos+i)->is_rtol = (node_p)->level & 1;
|
(map+run_pos+i)->is_rtol = (node_p)->level & 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bidi_reorder_cb(map, len, &type_rl_list, max_level,
|
rc.achars = NULL;
|
||||||
bidi_map_reverse);
|
rc.extra = map;
|
||||||
|
rc.cb = bidi_map_reverse;
|
||||||
|
bidi_reorder(&rc, len, &type_rl_list, max_level);
|
||||||
|
|
||||||
/* free typerun list.*/
|
/* free typerun list.*/
|
||||||
free_typerun_list(type_rl_list);
|
free_typerun_list(type_rl_list);
|
||||||
@@ -752,18 +753,23 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
|||||||
return achars;
|
return achars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
|
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
|
||||||
Achar32* achars, int len, int* index_map, int pel)
|
Achar32* achars, int len, int* index_map, int pel)
|
||||||
{
|
{
|
||||||
BYTE max_level = 1;
|
BYTE max_level = 1;
|
||||||
TYPERUN *type_rl_list = NULL;
|
TYPERUN *type_rl_list = NULL;
|
||||||
|
REORDER_CONTEXT rc;
|
||||||
|
|
||||||
print_hexstr(achars, len, FALSE);
|
print_hexstr(achars, len, FALSE);
|
||||||
|
|
||||||
/* W1~W7, N1~N2, I1~I2, Get the Embedding Level. */
|
/* W1~W7, N1~N2, I1~I2, Get the Embedding Level. */
|
||||||
bidi_resolve_string (charset_ops, achars, len, pel, &type_rl_list, &max_level);
|
bidi_resolve_string (charset_ops, achars, len, pel, &type_rl_list, &max_level);
|
||||||
|
|
||||||
bidi_reorder_cb(index_map, len, &type_rl_list, max_level,
|
rc.achars = achars;
|
||||||
|
rc.extra = extra;
|
||||||
|
rc.cb = cb_reverse_extra;
|
||||||
|
bidi_reorder(index_map, len, &type_rl_list, max_level,
|
||||||
bidi_string_reverse);
|
bidi_string_reverse);
|
||||||
|
|
||||||
/* free typerun list.*/
|
/* free typerun list.*/
|
||||||
|
|||||||
@@ -66,6 +66,17 @@
|
|||||||
#define NUF_WIDTH 8
|
#define NUF_WIDTH 8
|
||||||
#define NUF_HEIGHT 1
|
#define NUF_HEIGHT 1
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
return DEVFONTGLYPHTYPE_MONOBMP;
|
return DEVFONTGLYPHTYPE_MONOBMP;
|
||||||
@@ -171,6 +182,7 @@ static void unload_font_data (DEVFONT* devfont, void* data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FONTOPS __mg_null_font_ops = {
|
FONTOPS __mg_null_font_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -287,6 +287,17 @@ static unsigned char def_smooth_bitmap [] =
|
|||||||
static QPF_GLYPH def_glyph = {&def_metrics, def_bitmap};
|
static QPF_GLYPH def_glyph = {&def_metrics, def_bitmap};
|
||||||
static QPF_GLYPH def_smooth_glyph = {&def_smooth_metrics, def_smooth_bitmap};
|
static QPF_GLYPH def_smooth_glyph = {&def_smooth_metrics, def_smooth_bitmap};
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
if (QPFONT_INFO_P (devfont)->fm->flags & FLAG_MODE_SMOOTH)
|
if (QPFONT_INFO_P (devfont)->fm->flags & FLAG_MODE_SMOOTH)
|
||||||
@@ -541,6 +552,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_qpf_ops = {
|
FONTOPS __mg_qpf_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -151,6 +151,17 @@ static void unload_font_data (DEVFONT* devfont, void* data)
|
|||||||
|
|
||||||
/*************** Raw bitmap font operations *********************************/
|
/*************** Raw bitmap font operations *********************************/
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
return DEVFONTGLYPHTYPE_MONOBMP;
|
return DEVFONTGLYPHTYPE_MONOBMP;
|
||||||
@@ -280,6 +291,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_rbf_ops = {
|
FONTOPS __mg_rbf_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_ave_width, // max_width same as ave_width
|
get_ave_width, // max_width same as ave_width
|
||||||
|
|||||||
@@ -377,6 +377,17 @@ static int get_max_width (LOGFONT* logfont, DEVFONT* devfont)
|
|||||||
return logfont->size;
|
return logfont->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
if (logfont->style & FS_WEIGHT_BOOK)
|
if (logfont->style & FS_WEIGHT_BOOK)
|
||||||
@@ -598,6 +609,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
static FONTOPS scripteasy_font_ops = {
|
static FONTOPS scripteasy_font_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
+4
-1
@@ -155,7 +155,10 @@ BOOL mg_InitSysFont (void)
|
|||||||
goto error_load;
|
goto error_load;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sys_fonts[i] = CreateLogFont (type, family, charset,
|
/* VW 20221003: use CreateLogFontEx instead of CreateLogFont to
|
||||||
|
follow the new style convention of font name,
|
||||||
|
but the orientation is ignored for the system logfont. */
|
||||||
|
if ((sys_fonts[i] = CreateLogFontEx (type, family, charset,
|
||||||
style [0], style [1], style [2],
|
style [0], style [1], style [2],
|
||||||
style [3], style [4], style [5],
|
style [3], style [4], style [5],
|
||||||
height, 0)) == NULL) {
|
height, 0)) == NULL) {
|
||||||
|
|||||||
@@ -377,8 +377,8 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
|||||||
uc == 0x8E2 || uc == 0xD4E || uc == 0x110BD ||
|
uc == 0x8E2 || uc == 0xD4E || uc == 0x110BD ||
|
||||||
(uc >= 0x111C2 && uc <= 0x111C3)) {
|
(uc >= 0x111C2 && uc <= 0x111C3)) {
|
||||||
gbt = GB_Prepend;
|
gbt = GB_Prepend;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case UCHAR_CATEGORY_CONTROL:
|
case UCHAR_CATEGORY_CONTROL:
|
||||||
case UCHAR_CATEGORY_LINE_SEPARATOR:
|
case UCHAR_CATEGORY_LINE_SEPARATOR:
|
||||||
@@ -393,8 +393,8 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
|||||||
if ((uc >= 0xFFF0 && uc <= 0xFFF8) ||
|
if ((uc >= 0xFFF0 && uc <= 0xFFF8) ||
|
||||||
(uc >= 0xE0000 && uc <= 0xE0FFF)) {
|
(uc >= 0xE0000 && uc <= 0xE0FFF)) {
|
||||||
gbt = GB_ControlCRLF;
|
gbt = GB_ControlCRLF;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case UCHAR_CATEGORY_OTHER_LETTER:
|
case UCHAR_CATEGORY_OTHER_LETTER:
|
||||||
if (ctxt->makes_hangul_syllable)
|
if (ctxt->makes_hangul_syllable)
|
||||||
@@ -434,7 +434,6 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
|||||||
gbt = GB_RI_Odd;
|
gbt = GB_RI_Odd;
|
||||||
else
|
else
|
||||||
gbt = GB_RI_Odd;
|
gbt = GB_RI_Odd;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,17 @@ static void unload_font_data (DEVFONT* devfont, void* data)
|
|||||||
free (((UPFINFO*) data));
|
free (((UPFINFO*) data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
Uint8* p_upf = (Uint8 *)UPFONT_INFO_P (devfont)->root_dir;
|
Uint8* p_upf = (Uint8 *)UPFONT_INFO_P (devfont)->root_dir;
|
||||||
@@ -525,6 +536,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FONTOPS __mg_upf_ops = {
|
FONTOPS __mg_upf_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -109,6 +109,17 @@ typedef struct _FONT_PROPT {
|
|||||||
int def_glyph;
|
int def_glyph;
|
||||||
} FONT_PROPT;
|
} FONT_PROPT;
|
||||||
|
|
||||||
|
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature)
|
||||||
|
{
|
||||||
|
switch (feature) {
|
||||||
|
case DEVFONT_FEATURE_MARK_BBOX:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
return DEVFONTGLYPHTYPE_MONOBMP;
|
return DEVFONTGLYPHTYPE_MONOBMP;
|
||||||
@@ -477,6 +488,7 @@ static void unload_font_data (DEVFONT* devfont, void* data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FONTOPS __mg_vbf_ops = {
|
FONTOPS __mg_vbf_ops = {
|
||||||
|
get_feature,
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -59,7 +59,6 @@
|
|||||||
#include "cliprect.h"
|
#include "cliprect.h"
|
||||||
#include "gal.h"
|
#include "gal.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "blockheap.h"
|
|
||||||
#include "accelkey.h"
|
#include "accelkey.h"
|
||||||
|
|
||||||
static BLOCKHEAP ACHeap;
|
static BLOCKHEAP ACHeap;
|
||||||
|
|||||||
+57
-16
@@ -59,17 +59,22 @@
|
|||||||
#include "cliprect.h"
|
#include "cliprect.h"
|
||||||
#include "gal.h"
|
#include "gal.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
#include "dc.h"
|
||||||
|
|
||||||
BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
|
BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
|
||||||
{
|
{
|
||||||
PMAINWIN pWin;
|
PMAINWIN pWin;
|
||||||
|
|
||||||
pWin = (PMAINWIN)hWnd;
|
pWin = (PMAINWIN)hWnd;
|
||||||
|
|
||||||
if (!pWin->pCaretInfo) {
|
if (!pWin->pCaretInfo) {
|
||||||
|
HDC hdc;
|
||||||
|
|
||||||
if (!(pWin->pCaretInfo = malloc (sizeof (CARETINFO))))
|
if (!(pWin->pCaretInfo = malloc (sizeof (CARETINFO))))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* Since 5.0.11: use client DC of the window instead of screen DC */
|
||||||
|
hdc = GetClientDC(hWnd);
|
||||||
|
|
||||||
pWin->pCaretInfo->pBitmap = pBitmap;
|
pWin->pCaretInfo->pBitmap = pBitmap;
|
||||||
if (pBitmap) {
|
if (pBitmap) {
|
||||||
nWidth = pBitmap->bmWidth;
|
nWidth = pBitmap->bmWidth;
|
||||||
@@ -78,18 +83,22 @@ BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
|
|||||||
pWin->pCaretInfo->nWidth = nWidth;
|
pWin->pCaretInfo->nWidth = nWidth;
|
||||||
pWin->pCaretInfo->nHeight = nHeight;
|
pWin->pCaretInfo->nHeight = nHeight;
|
||||||
pWin->pCaretInfo->caret_bmp.bmType = BMP_TYPE_NORMAL;
|
pWin->pCaretInfo->caret_bmp.bmType = BMP_TYPE_NORMAL;
|
||||||
pWin->pCaretInfo->caret_bmp.bmBitsPerPixel = BITSPERPHYPIXEL;
|
pWin->pCaretInfo->caret_bmp.bmBitsPerPixel =
|
||||||
pWin->pCaretInfo->caret_bmp.bmBytesPerPixel = BYTESPERPHYPIXEL;
|
GetGDCapability(hdc, GDCAP_BITSPP);
|
||||||
|
pWin->pCaretInfo->caret_bmp.bmBytesPerPixel =
|
||||||
|
GetGDCapability(hdc, GDCAP_BPP);
|
||||||
pWin->pCaretInfo->caret_bmp.bmWidth = nWidth;
|
pWin->pCaretInfo->caret_bmp.bmWidth = nWidth;
|
||||||
pWin->pCaretInfo->caret_bmp.bmHeight = nHeight;
|
pWin->pCaretInfo->caret_bmp.bmHeight = nHeight;
|
||||||
pWin->pCaretInfo->caret_bmp.bmAlphaMask = NULL;
|
pWin->pCaretInfo->caret_bmp.bmAlphaMask = NULL;
|
||||||
pWin->pCaretInfo->caret_bmp.bmAlphaPitch = 0;
|
pWin->pCaretInfo->caret_bmp.bmAlphaPitch = 0;
|
||||||
|
|
||||||
pWin->pCaretInfo->nBytesNr = GAL_GetBoxSize (__gal_screen,
|
pWin->pCaretInfo->nBytesNr = GAL_GetBoxSize (dc_HDC2PDC(hdc)->surface,
|
||||||
nWidth, nHeight, &pWin->pCaretInfo->caret_bmp.bmPitch);
|
nWidth, nHeight, &pWin->pCaretInfo->caret_bmp.bmPitch);
|
||||||
pWin->pCaretInfo->pNormal = malloc (pWin->pCaretInfo->nBytesNr);
|
pWin->pCaretInfo->pNormal = malloc (pWin->pCaretInfo->nBytesNr);
|
||||||
pWin->pCaretInfo->pXored = malloc (pWin->pCaretInfo->nBytesNr);
|
pWin->pCaretInfo->pXored = malloc (pWin->pCaretInfo->nBytesNr);
|
||||||
|
|
||||||
|
ReleaseDC(hdc);
|
||||||
|
|
||||||
if (pWin->pCaretInfo->pNormal == NULL ||
|
if (pWin->pCaretInfo->pNormal == NULL ||
|
||||||
pWin->pCaretInfo->pXored == NULL) {
|
pWin->pCaretInfo->pXored == NULL) {
|
||||||
free (pWin->pCaretInfo);
|
free (pWin->pCaretInfo);
|
||||||
@@ -219,8 +228,8 @@ void GetCaretBitmaps (PCARETINFO pCaretInfo)
|
|||||||
int i;
|
int i;
|
||||||
int sx, sy;
|
int sx, sy;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
Uint32 amask;
|
||||||
|
|
||||||
// convert to screen coordinates
|
|
||||||
sx = pCaretInfo->x;
|
sx = pCaretInfo->x;
|
||||||
sy = pCaretInfo->y;
|
sy = pCaretInfo->y;
|
||||||
|
|
||||||
@@ -231,36 +240,68 @@ void GetCaretBitmaps (PCARETINFO pCaretInfo)
|
|||||||
pCaretInfo->caret_bmp.bmWidth,
|
pCaretInfo->caret_bmp.bmWidth,
|
||||||
pCaretInfo->caret_bmp.bmHeight,
|
pCaretInfo->caret_bmp.bmHeight,
|
||||||
&pCaretInfo->caret_bmp);
|
&pCaretInfo->caret_bmp);
|
||||||
|
amask = GetGDCapability(hdc, GDCAP_AMASK);
|
||||||
ReleaseDC (hdc);
|
ReleaseDC (hdc);
|
||||||
|
|
||||||
// generate XOR bitmap.
|
// generate XOR bitmap.
|
||||||
if (pCaretInfo->pBitmap) {
|
if (amask == 0) {
|
||||||
BYTE* normal;
|
BYTE* normal;
|
||||||
BYTE* bitmap;
|
BYTE* bitmap;
|
||||||
BYTE* xored;
|
BYTE* xored;
|
||||||
|
|
||||||
normal = pCaretInfo->pNormal;
|
normal = pCaretInfo->pNormal;
|
||||||
bitmap = pCaretInfo->pBitmap->bmBits;
|
|
||||||
xored = pCaretInfo->pXored;
|
xored = pCaretInfo->pXored;
|
||||||
|
|
||||||
|
if (pCaretInfo->pBitmap) {
|
||||||
|
bitmap = pCaretInfo->pBitmap->bmBits;
|
||||||
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
||||||
xored[i] = normal[i] ^ bitmap[i];
|
xored[i] = normal[i] ^ bitmap[i];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
||||||
|
xored[i] = normal[i] ^ 0xFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Since 5.0.11: restore the alpha component if having alpha component.
|
||||||
|
int x, y;
|
||||||
BYTE* normal;
|
BYTE* normal;
|
||||||
BYTE* xored;
|
BYTE* xored;
|
||||||
BYTE xor_byte;
|
BYTE* bitmap = NULL;
|
||||||
|
gal_pixel pix_normal, pix_bitmap, pix_xored, bits_alpha;
|
||||||
|
|
||||||
if (BITSPERPHYPIXEL < 8)
|
for (y = 0; y < pCaretInfo->caret_bmp.bmHeight; y++) {
|
||||||
xor_byte = 0x0F;
|
normal = pCaretInfo->pNormal + pCaretInfo->caret_bmp.bmPitch * y;
|
||||||
else
|
xored = pCaretInfo->pXored + pCaretInfo->caret_bmp.bmPitch * y;
|
||||||
xor_byte = 0xFF;
|
if (pCaretInfo->pBitmap)
|
||||||
|
bitmap = pCaretInfo->pBitmap->bmBits +
|
||||||
|
pCaretInfo->caret_bmp.bmPitch * y;
|
||||||
|
|
||||||
normal = pCaretInfo->pNormal;
|
for (x = 0; x < pCaretInfo->caret_bmp.bmWidth; x++) {
|
||||||
xored = pCaretInfo->pXored;
|
|
||||||
|
|
||||||
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
pix_normal = _mem_get_pixel(normal,
|
||||||
xored[i] = normal[i] ^ xor_byte;
|
pCaretInfo->caret_bmp.bmBytesPerPixel);
|
||||||
|
if (pCaretInfo->pBitmap) {
|
||||||
|
pix_bitmap = _mem_get_pixel(bitmap,
|
||||||
|
pCaretInfo->caret_bmp.bmBytesPerPixel);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pix_bitmap = 0xFFFFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
bits_alpha = pix_normal & amask;
|
||||||
|
pix_xored = pix_normal ^ pix_bitmap;
|
||||||
|
pix_xored &= ~amask;
|
||||||
|
pix_xored |= bits_alpha;
|
||||||
|
_mem_set_pixel(xored,
|
||||||
|
pCaretInfo->caret_bmp.bmBytesPerPixel, pix_xored);
|
||||||
|
|
||||||
|
normal += pCaretInfo->caret_bmp.bmBytesPerPixel;
|
||||||
|
xored += pCaretInfo->caret_bmp.bmBytesPerPixel;
|
||||||
|
if (pCaretInfo->pBitmap)
|
||||||
|
bitmap += pCaretInfo->caret_bmp.bmBytesPerPixel;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2022, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -803,7 +803,7 @@ BOOL GUIAPI InitWindowElementAttrs (PWERENDERER rdr)
|
|||||||
char buff [20];
|
char buff [20];
|
||||||
DWORD rgba;
|
DWORD rgba;
|
||||||
|
|
||||||
if (!rdr || !rdr->name || rdr->name[0] == '\0')
|
if (!rdr || rdr->name[0] == '\0')
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
_DBG_PRINTF ("GUI>InitWEA: Initialize %s renderer window element attributes.\n",
|
_DBG_PRINTF ("GUI>InitWEA: Initialize %s renderer window element attributes.\n",
|
||||||
|
|||||||
+5
-5
@@ -71,7 +71,6 @@
|
|||||||
#include "cliprect.h"
|
#include "cliprect.h"
|
||||||
#include "gal.h"
|
#include "gal.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "blockheap.h"
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
|
||||||
#define SHORTEN 0
|
#define SHORTEN 0
|
||||||
@@ -2203,14 +2202,15 @@ static int create_memdc_for_menu (TRACKMENUINFO* ptmi)
|
|||||||
static void delete_memdc_for_menu (TRACKMENUINFO* ptmi)
|
static void delete_memdc_for_menu (TRACKMENUINFO* ptmi)
|
||||||
{
|
{
|
||||||
if (ptmi->dc != HDC_INVALID) {
|
if (ptmi->dc != HDC_INVALID) {
|
||||||
GAL_Surface *surf = GetSurfaceFromDC (ptmi->dc);
|
|
||||||
|
|
||||||
DeleteMemDC (ptmi->dc);
|
|
||||||
ptmi->dc = HDC_INVALID;
|
|
||||||
|
|
||||||
|
#if 0 /* deprecated code: we always do refcount++ for any memdc */
|
||||||
/* we must free the surface here, or it can not be freed actually
|
/* we must free the surface here, or it can not be freed actually
|
||||||
due to the referenced count. */
|
due to the referenced count. */
|
||||||
|
GAL_Surface *surf = GetSurfaceFromDC (ptmi->dc);
|
||||||
GAL_FreeSurface (surf);
|
GAL_FreeSurface (surf);
|
||||||
|
#endif /* deprecated code */
|
||||||
|
DeleteMemDC (ptmi->dc);
|
||||||
|
ptmi->dc = HDC_INVALID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+118
-54
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -50,6 +50,7 @@ DFB_SRCS = dfb.h dfb.c
|
|||||||
|
|
||||||
USVFB_SRCS = usvfbinput.c usvfbinput.h
|
USVFB_SRCS = usvfbinput.c usvfbinput.h
|
||||||
LIBINPUT_SRCS = linux-libinput.c linux-libinput.h
|
LIBINPUT_SRCS = linux-libinput.c linux-libinput.h
|
||||||
|
SINGLETOUCHKEY_SRCS = singletouchkey.c singletouchkey.h
|
||||||
|
|
||||||
if MGIAL_CONSOLE
|
if MGIAL_CONSOLE
|
||||||
native_libial_la_LIBADD = native/libnative.la
|
native_libial_la_LIBADD = native/libnative.la
|
||||||
@@ -76,4 +77,5 @@ libial_la_SOURCES = $(COMMON_SRCS) $(DUMMY_SRCS) $(JZ4740_SRCS) \
|
|||||||
$(COMMINPUT_SRCS) $(QVFB_SRCS) $(WVFB_SRCS) \
|
$(COMMINPUT_SRCS) $(QVFB_SRCS) $(WVFB_SRCS) \
|
||||||
$(QEMU_SRCS) $(IPAQ_H3600_SRCS) $(IPAQ_H5400_SRCS) \
|
$(QEMU_SRCS) $(IPAQ_H3600_SRCS) $(IPAQ_H5400_SRCS) \
|
||||||
$(TSLIB_SRCS) $(SHANDONG_LIDE_SRCS) $(CISCO_TOUCHPAD_SRCS) \
|
$(TSLIB_SRCS) $(SHANDONG_LIDE_SRCS) $(CISCO_TOUCHPAD_SRCS) \
|
||||||
$(MSTAR_SRCS) $(DFB_SRCS) $(USVFB_SRCS) $(LIBINPUT_SRCS)
|
$(MSTAR_SRCS) $(DFB_SRCS) $(USVFB_SRCS) $(LIBINPUT_SRCS) \
|
||||||
|
$(SINGLETOUCHKEY_SRCS)
|
||||||
|
|||||||
+7
-1
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2020, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -133,6 +133,9 @@
|
|||||||
#ifdef _MGIAL_LIBINPUT
|
#ifdef _MGIAL_LIBINPUT
|
||||||
#include "linux-libinput.h"
|
#include "linux-libinput.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _MGIAL_SINGLETOUCHKEY
|
||||||
|
#include "singletouchkey.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static INPUT inputs [] =
|
static INPUT inputs [] =
|
||||||
{
|
{
|
||||||
@@ -212,6 +215,9 @@ static INPUT inputs [] =
|
|||||||
#ifdef _MGIAL_LIBINPUT
|
#ifdef _MGIAL_LIBINPUT
|
||||||
{"libinput", ial_InitLibInput, TermLibInput},
|
{"libinput", ial_InitLibInput, TermLibInput},
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _MGIAL_SINGLETOUCHKEY
|
||||||
|
{"singletouchkey", ial_InitSingleTouchKey, TermSingleTouchKey},
|
||||||
|
#endif
|
||||||
/* ... end of general IAL engines */
|
/* ... end of general IAL engines */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1243,11 +1243,9 @@ static int wait_event_ex (int maxfd, fd_set *in, fd_set *out, fd_set *except,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
default:
|
default:
|
||||||
_DBG_PRINTF("IAL>LIBINPUT: got a UNKNOWN event type: %d\n", type);
|
_WRN_PRINTF("IAL>LIBINPUT: got a UNKNOWN event type: %d\n", type);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
libinput_event_destroy(event);
|
libinput_event_destroy(event);
|
||||||
|
|||||||
@@ -65,7 +65,6 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <linux/vt.h>
|
#include <linux/vt.h>
|
||||||
#include <linux/kd.h>
|
#include <linux/kd.h>
|
||||||
#include <linux/keyboard.h>
|
|
||||||
|
|
||||||
#include "gdi.h"
|
#include "gdi.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|||||||
@@ -67,8 +67,6 @@
|
|||||||
#include "gal.h"
|
#include "gal.h"
|
||||||
#include "native.h"
|
#include "native.h"
|
||||||
|
|
||||||
static const char* event_dev;
|
|
||||||
|
|
||||||
static int EVENT_Open(const char *);
|
static int EVENT_Open(const char *);
|
||||||
static void EVENT_Close(void);
|
static void EVENT_Close(void);
|
||||||
static void EVENT_GetModifierInfo(int *modifiers);
|
static void EVENT_GetModifierInfo(int *modifiers);
|
||||||
@@ -85,6 +83,7 @@ KBDDEVICE kbddev_event = {
|
|||||||
EVENT_Resume
|
EVENT_Resume
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static char* kbd_dev;
|
||||||
static int kbd_fd; /* file descriptor for keyboard */
|
static int kbd_fd; /* file descriptor for keyboard */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -144,6 +143,7 @@ static int EVENT_Open (const char *device)
|
|||||||
if (kbd_fd < 0)
|
if (kbd_fd < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
kbd_dev = strdup (device);
|
||||||
return kbd_fd;
|
return kbd_fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,6 +155,9 @@ static void EVENT_Close(void)
|
|||||||
{
|
{
|
||||||
close (kbd_fd);
|
close (kbd_fd);
|
||||||
kbd_fd = -1;
|
kbd_fd = -1;
|
||||||
|
|
||||||
|
free (kbd_dev);
|
||||||
|
kbd_dev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -203,7 +206,8 @@ static int EVENT_Read(unsigned char *buf, int *modifiers)
|
|||||||
*/
|
*/
|
||||||
static void EVENT_Suspend(void)
|
static void EVENT_Suspend(void)
|
||||||
{
|
{
|
||||||
EVENT_Close();
|
close (kbd_fd);
|
||||||
|
kbd_fd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* deactivate_keyboard:
|
/* deactivate_keyboard:
|
||||||
@@ -211,10 +215,12 @@ static void EVENT_Suspend(void)
|
|||||||
*/
|
*/
|
||||||
static int EVENT_Resume(void)
|
static int EVENT_Resume(void)
|
||||||
{
|
{
|
||||||
kbd_fd = open (event_dev, O_NONBLOCK);
|
kbd_fd = open (kbd_dev, O_NONBLOCK);
|
||||||
if (kbd_fd < 0) {
|
if (kbd_fd < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}else{
|
}
|
||||||
|
else {
|
||||||
return kbd_fd;
|
return kbd_fd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <linux/kd.h>
|
#include <linux/kd.h>
|
||||||
#include <linux/keyboard.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|||||||
+13
-4
@@ -64,6 +64,9 @@ extern "C" {
|
|||||||
#define SHOW_HIDE_TYPE 5
|
#define SHOW_HIDE_TYPE 5
|
||||||
#define XVFB_CLOSE_TYPE 6
|
#define XVFB_CLOSE_TYPE 6
|
||||||
|
|
||||||
|
/* Since 5.0.0: command */
|
||||||
|
#define CMD_TYPE 7
|
||||||
|
|
||||||
struct PCXVFbKeyData
|
struct PCXVFbKeyData
|
||||||
{
|
{
|
||||||
unsigned int unicode;
|
unsigned int unicode;
|
||||||
@@ -88,8 +91,7 @@ typedef struct _XVFBMOUSEDATA
|
|||||||
typedef struct _XVFBEVENTDATA
|
typedef struct _XVFBEVENTDATA
|
||||||
{
|
{
|
||||||
int event_type;
|
int event_type;
|
||||||
union
|
union {
|
||||||
{
|
|
||||||
XVFBKEYDATA key;
|
XVFBKEYDATA key;
|
||||||
XVFBMOUSEDATA mouse;
|
XVFBMOUSEDATA mouse;
|
||||||
} data;
|
} data;
|
||||||
@@ -117,6 +119,13 @@ typedef struct _XVFBShowHideEventData{
|
|||||||
int show; /* 0 to hide, 1 to show */
|
int show; /* 0 to hide, 1 to show */
|
||||||
}XVFBShowHideEventData;
|
}XVFBShowHideEventData;
|
||||||
|
|
||||||
|
/* Since 5.0.0: command */
|
||||||
|
#define XVFB_CMD_QUIT 0
|
||||||
|
typedef struct _XVFBCmdEventData {
|
||||||
|
int event_type;
|
||||||
|
int cmd;
|
||||||
|
} XVFBCmdEventData;
|
||||||
|
|
||||||
extern int __mg_pcxvfb_server_sockfd;
|
extern int __mg_pcxvfb_server_sockfd;
|
||||||
extern int __mg_pcxvfb_client_sockfd;
|
extern int __mg_pcxvfb_client_sockfd;
|
||||||
|
|
||||||
@@ -124,8 +133,8 @@ BOOL ial_InitPCXVFBInput (INPUT* input, const char* mdev, const char* mtype);
|
|||||||
void TermPCXVFBInput (void);
|
void TermPCXVFBInput (void);
|
||||||
|
|
||||||
MG_EXPORT void GUIAPI VFBOpenIME(int bOpen);
|
MG_EXPORT void GUIAPI VFBOpenIME(int bOpen);
|
||||||
MG_EXPORT void GUIAPI VFBSetIMETextCallback(void (*setIMEText)(void *, const char* text),
|
MG_EXPORT void GUIAPI VFBSetIMETextCallback(void (*setIMEText)(void *,
|
||||||
void *user_data);
|
const char* text), void *user_data);
|
||||||
|
|
||||||
MG_EXPORT void GUIAPI VFBSetCaption(const char* caption);
|
MG_EXPORT void GUIAPI VFBSetCaption(const char* caption);
|
||||||
MG_EXPORT void GUIAPI VFBShowWindow(int show);
|
MG_EXPORT void GUIAPI VFBShowWindow(int show);
|
||||||
|
|||||||
+24
-4
@@ -319,6 +319,19 @@ static void flush_rec (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void close_rec (void)
|
||||||
|
{
|
||||||
|
#ifdef WIN32
|
||||||
|
/* TODO: */
|
||||||
|
#else
|
||||||
|
if (record_fd >= 0) {
|
||||||
|
close(record_fd);
|
||||||
|
record_fd = -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void do_record(AUTO_IAL_INPUT_EVENT *event)
|
static void do_record(AUTO_IAL_INPUT_EVENT *event)
|
||||||
{
|
{
|
||||||
@@ -689,8 +702,7 @@ BOOL ial_InitPCXVFBInput (INPUT* input, const char* mdev, const char* mtype)
|
|||||||
{
|
{
|
||||||
char path[PATH_MAX], *template;
|
char path[PATH_MAX], *template;
|
||||||
template = getenv("MG_ENV_RECORD_IAL");
|
template = getenv("MG_ENV_RECORD_IAL");
|
||||||
if (template)
|
if (template) {
|
||||||
{
|
|
||||||
#if 0
|
#if 0
|
||||||
snprintf(path, sizeof(path), "%s%ld", template, time(NULL));
|
snprintf(path, sizeof(path), "%s%ld", template, time(NULL));
|
||||||
#else
|
#else
|
||||||
@@ -703,7 +715,6 @@ BOOL ial_InitPCXVFBInput (INPUT* input, const char* mdev, const char* mtype)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -725,6 +736,14 @@ void TermPCXVFBInput (void)
|
|||||||
socket_file[49] = '\0';
|
socket_file[49] = '\0';
|
||||||
|
|
||||||
if (__mg_pcxvfb_client_sockfd >= 0) {
|
if (__mg_pcxvfb_client_sockfd >= 0) {
|
||||||
|
/* Since 5.0.0: send a quit command to XVFB */
|
||||||
|
XVFBCmdEventData cmd = { CMD_TYPE, XVFB_CMD_QUIT };
|
||||||
|
|
||||||
|
if (mg_writesocket (__mg_pcxvfb_client_sockfd, &cmd, sizeof (cmd)) <
|
||||||
|
sizeof (cmd)) {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
close(__mg_pcxvfb_client_sockfd);
|
close(__mg_pcxvfb_client_sockfd);
|
||||||
__mg_pcxvfb_client_sockfd = -1;
|
__mg_pcxvfb_client_sockfd = -1;
|
||||||
}
|
}
|
||||||
@@ -733,11 +752,12 @@ void TermPCXVFBInput (void)
|
|||||||
__mg_pcxvfb_server_sockfd = -1;
|
__mg_pcxvfb_server_sockfd = -1;
|
||||||
}
|
}
|
||||||
unlink(socket_file);
|
unlink(socket_file);
|
||||||
#if defined(_MGRM_PROCESSES) && !defined(_MGRM_STANDALONE)
|
#if defined(_MGRM_PROCESSES)
|
||||||
if (mgIsServer) {
|
if (mgIsServer) {
|
||||||
remove("/tmp/.pcxvfb_tmp");
|
remove("/tmp/.pcxvfb_tmp");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
close_rec();
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// IMPORTANT NOTICE
|
||||||
|
//
|
||||||
|
// The following open source license statement does not apply to any
|
||||||
|
// entity in the Exception List published by FMSoft.
|
||||||
|
//
|
||||||
|
// For more information, please visit:
|
||||||
|
//
|
||||||
|
// https://www.fmsoft.cn/exception-list
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||||
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
|
* and smart IoT devices.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002~2020, Beijing FMSoft Technologies Co., Ltd.
|
||||||
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
|
*
|
||||||
|
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Or,
|
||||||
|
*
|
||||||
|
* As this program is a library, any link to this program must follow
|
||||||
|
* GNU General Public License version 3 (GPLv3). If you cannot accept
|
||||||
|
* GPLv3, you need to be licensed from FMSoft.
|
||||||
|
*
|
||||||
|
* If you have got a commercial license of this program, please use it
|
||||||
|
* under the terms and conditions of the commercial license.
|
||||||
|
*
|
||||||
|
* For more information about the commercial license, please refer to
|
||||||
|
* <http://www.minigui.com/blog/minigui-licensing-policy/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
** linux-libinput.h: the head file of the IAL engine based on libinput.
|
||||||
|
**
|
||||||
|
** Created by Wei YongMing, 2019/06/10
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GUI_IAL_SINGLETOUCHKEY_H
|
||||||
|
#define GUI_IAL_SINGLETOUCHKEY_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
BOOL ial_InitSingleTouchKey (INPUT* input, const char* mdev, const char* mtype);
|
||||||
|
void TermSingleTouchKey (void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* GUI_IAL_SINGLETOUCHKEY_H */
|
||||||
|
|
||||||
|
|
||||||
@@ -3,8 +3,8 @@ noinst_HEADERS = \
|
|||||||
cursor.h dc.h event.h list.h element.h \
|
cursor.h dc.h event.h list.h element.h \
|
||||||
ial.h inline.h internals.h zorder.h menu.h misc.h \
|
ial.h inline.h internals.h zorder.h menu.h misc.h \
|
||||||
msgstr.h sysfont.h timer.h devfont.h fontname.h \
|
msgstr.h sysfont.h timer.h devfont.h fontname.h \
|
||||||
readbmp.h icon.h blockheap.h rbtree.h \
|
readbmp.h icon.h rbtree.h \
|
||||||
ourhdr.h client.h server.h sharedres.h sockio.h drawsemop.h \
|
ourhdr.h client.h server.h sharedres.h sockio.h drawsemop.h \
|
||||||
gal.h newgal.h memops.h incoreres.h sysres.h clipboard.h \
|
gal.h newgal.h memops.h incoreres.h sysres.h clipboard.h \
|
||||||
glyph.h license.h mgsock.h unicode-ops.h \
|
glyph.h license.h mgsock.h unicode-ops.h \
|
||||||
linux-tty.h debug.h
|
linux-tty.h debug.h map.h
|
||||||
|
|||||||
+3
-3
@@ -112,11 +112,11 @@ void __mg_legacy_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
|
|||||||
Uint32 __mg_legacy_bidi_str_base_dir (const CHARSETOPS* charset_ops,
|
Uint32 __mg_legacy_bidi_str_base_dir (const CHARSETOPS* charset_ops,
|
||||||
Achar32* achars, int len);
|
Achar32* achars, int len);
|
||||||
|
|
||||||
|
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
||||||
|
Achar32* achars, int len, int pel, ACHARMAPINFO* map);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Deprecated
|
// Deprecated
|
||||||
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
|
||||||
Achar32* achars, int len, GLYPHMAPINFO* map, int pel);
|
|
||||||
|
|
||||||
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
|
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
|
||||||
Achar32* achars, int len, int* index_map, int pel);
|
Achar32* achars, int len, int* index_map, int pel);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ struct _SCALER_INFO_FILLBMP
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
struct _SCALER_INFO_FILLBMP scaler_info;
|
struct _SCALER_INFO_FILLBMP scaler_info;
|
||||||
GAL_Rect dst_rect;
|
GAL_Rect dst_rect;
|
||||||
int old_bkmode;
|
|
||||||
|
|
||||||
BYTE* decoded_buff;
|
BYTE* decoded_buff;
|
||||||
BYTE* decoded_alpha_buff;
|
BYTE* decoded_alpha_buff;
|
||||||
|
|||||||
@@ -47,26 +47,35 @@
|
|||||||
** blockheap.h: the head file of heap for block data.
|
** blockheap.h: the head file of heap for block data.
|
||||||
**
|
**
|
||||||
** Create date: 2001/01/10
|
** Create date: 2001/01/10
|
||||||
|
**
|
||||||
|
** DEPRECATED, USE window.h INSTEAD.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GUI_BLOCKHEAP_H
|
#ifndef GUI_BLOCKHEAP_H
|
||||||
#define GUI_BLOCKHEAP_H
|
#define GUI_BLOCKHEAP_H
|
||||||
|
|
||||||
#define BDS_FREE 0x0000
|
|
||||||
#define BDS_SPECIAL 0x0001
|
|
||||||
#define BDS_USED 0x0002
|
|
||||||
|
|
||||||
#ifndef _MGUI_GDI_H /* included in include/gdi.h */
|
#ifndef _MGUI_GDI_H /* included in include/gdi.h */
|
||||||
|
|
||||||
typedef struct tagBLOCKHEAP {
|
struct _BLOCKHEAP {
|
||||||
#ifdef _MGRM_THREADS
|
#ifdef _MGHAVE_VIRTUAL_WINDOW
|
||||||
pthread_mutex_t lock;
|
pthread_mutex_t lock;
|
||||||
#endif
|
#endif
|
||||||
size_t bd_size;
|
/* Size of one block element. */
|
||||||
size_t heap_size;
|
size_t sz_block;
|
||||||
int free;
|
/* Size of the heap in blocks. */
|
||||||
void* heap;
|
size_t sz_heap;
|
||||||
} BLOCKHEAP;
|
/* The first free element in the heap. */
|
||||||
|
size_t sz_usage_bmp;
|
||||||
|
/* The number of blocks extra allocated. */
|
||||||
|
size_t nr_alloc;
|
||||||
|
|
||||||
|
/* Pointer to the pre-allocated heap. */
|
||||||
|
unsigned char* heap;
|
||||||
|
/* Pointer to the usage bitmap. */
|
||||||
|
unsigned char* usage_bmp;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct _BLOCKHEAP BLOCKHEAP;
|
||||||
typedef BLOCKHEAP* PBLOCKHEAP;
|
typedef BLOCKHEAP* PBLOCKHEAP;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
+42
-6
@@ -101,8 +101,18 @@
|
|||||||
#define REQID_COPYCURSOR 0x001B
|
#define REQID_COPYCURSOR 0x001B
|
||||||
|
|
||||||
/* Since 5.0.0 */
|
/* Since 5.0.0 */
|
||||||
// Get global wallpaper pattern surface
|
// Get shared surface
|
||||||
#define REQID_GETWPSURFACE 0x001C
|
#define REQID_GETSHAREDSURFACE 0x001C
|
||||||
|
// for compositing schema
|
||||||
|
#define SYSSF_WALLPAPER_PATTER "syssf-wallpaper-pattern"
|
||||||
|
#define APPSF_NAME_PREFIX "appsf-name-"
|
||||||
|
#define APPSF_NAME_PATTER "appsf-name-%s"
|
||||||
|
#define APPSF_HWND_PREFIX "appsf-hwnd-"
|
||||||
|
#define APPSF_HWND_PATTER "appsf-hwnd-%d-%p"
|
||||||
|
// for sharedfb schema
|
||||||
|
#define SYSSF_REAL_SCREEN "syssf-real-screen"
|
||||||
|
#define SYSSF_SHADOW_SCREEN "syssf-shadow-screen"
|
||||||
|
|
||||||
// Load cursor from PNG file
|
// Load cursor from PNG file
|
||||||
#define REQID_LOADCURSOR_PNG 0x001D
|
#define REQID_LOADCURSOR_PNG 0x001D
|
||||||
// Load cursor from in-memory PNG
|
// Load cursor from in-memory PNG
|
||||||
@@ -117,7 +127,17 @@
|
|||||||
// Calculate the position a main window with WS_EX_AUTOPOSITION
|
// Calculate the position a main window with WS_EX_AUTOPOSITION
|
||||||
#define REQID_CALCPOSITION 0x0022
|
#define REQID_CALCPOSITION 0x0022
|
||||||
|
|
||||||
#define REQID_SYS_LAST REQID_CALCPOSITION
|
// Authenticate client
|
||||||
|
#define REQID_AUTHCLIENT 0x0023
|
||||||
|
|
||||||
|
/* Since 5.2.0 */
|
||||||
|
// Operate a shared surface to register/revoke the name and set the fd
|
||||||
|
#define REQID_OPERATENAMEDSSURF 0x0024
|
||||||
|
#define ID_NAMEDSSURFOP_REGISTER 1
|
||||||
|
#define ID_NAMEDSSURFOP_SET 2
|
||||||
|
#define ID_NAMEDSSURFOP_REVOKE 3
|
||||||
|
|
||||||
|
#define REQID_SYS_LAST REQID_OPERATENAMEDSSURF
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX: To fellows who need to add a new REQID,
|
* XXX: To fellows who need to add a new REQID,
|
||||||
@@ -133,10 +153,23 @@ MGUI_COMPILE_TIME_ASSERT(sys_request_id, MAX_SYS_REQID >= REQID_SYS_LAST);
|
|||||||
|
|
||||||
#undef MGUI_COMPILE_TIME_ASSERT
|
#undef MGUI_COMPILE_TIME_ASSERT
|
||||||
|
|
||||||
|
/* Since 5.2.0 */
|
||||||
|
typedef struct OperateNSSurfInfo
|
||||||
|
{
|
||||||
|
int id_op;
|
||||||
|
char name[NAME_MAX + 1];
|
||||||
|
size_t map_size;
|
||||||
|
} OPERATENSSURFINFO;
|
||||||
|
|
||||||
/* Since 5.0.0 */
|
/* Since 5.0.0 */
|
||||||
typedef struct _SharedSurfInfo {
|
typedef struct _SharedSurfInfo {
|
||||||
Uint32 flags;
|
uint32_t flags; // the flags of the surface
|
||||||
size_t map_size;
|
uint32_t width, height;
|
||||||
|
uint32_t pitch;
|
||||||
|
uint32_t name; // when use flink name
|
||||||
|
uint32_t drm_format; // DRM pixel format
|
||||||
|
size_t size; // whole size of the surface
|
||||||
|
off_t offset; // offset of pixel data
|
||||||
} SHAREDSURFINFO;
|
} SHAREDSURFINFO;
|
||||||
|
|
||||||
typedef struct JoinLayerInfo {
|
typedef struct JoinLayerInfo {
|
||||||
@@ -150,7 +183,8 @@ typedef struct JoinLayerInfo {
|
|||||||
typedef struct JoinedClientInfo {
|
typedef struct JoinedClientInfo {
|
||||||
GHANDLE layer;
|
GHANDLE layer;
|
||||||
int cli_id;
|
int cli_id;
|
||||||
int zo_shmid;
|
int def_zi_shmid;
|
||||||
|
int zi_shmid;
|
||||||
} JOINEDCLIENTINFO;
|
} JOINEDCLIENTINFO;
|
||||||
|
|
||||||
typedef struct LayerInfo {
|
typedef struct LayerInfo {
|
||||||
@@ -208,6 +242,8 @@ typedef struct _MovedClientInfo {
|
|||||||
#define ID_ZOOP_MASKRECT_SET 17
|
#define ID_ZOOP_MASKRECT_SET 17
|
||||||
#define ID_ZOOP_MASKRECT_FREE 18
|
#define ID_ZOOP_MASKRECT_FREE 18
|
||||||
|
|
||||||
|
#define ID_ZOOP_SETGESTUREFLAGS 19 /* since 5.0.6 */
|
||||||
|
|
||||||
#ifndef MAX_CAPTION_LEN
|
#ifndef MAX_CAPTION_LEN
|
||||||
#define MAX_CAPTION_LEN 39 //40
|
#define MAX_CAPTION_LEN 39 //40
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+14
-21
@@ -62,28 +62,33 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MGRM_PROCESSES) && defined(_MGSCHEMA_SHAREDFB)
|
#if defined(_MGRM_PROCESSES) && defined(_MGSCHEMA_SHAREDFB)
|
||||||
# define IS_SHAREDFB_SCHEMA 1
|
# define IS_SHAREDFB_SCHEMA_PROCS 1
|
||||||
#else
|
#else
|
||||||
# define IS_SHAREDFB_SCHEMA 0
|
# define IS_SHAREDFB_SCHEMA_PROCS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* the maximal number of the dirty rects */
|
/* the maximal number of the dirty rects */
|
||||||
#define NR_DIRTY_RECTS 16
|
#define NR_DIRTY_RECTS 16
|
||||||
|
|
||||||
/* constants for layers and z-order nodes */
|
/* constants for layers and z-order nodes */
|
||||||
#define MAX_NR_LAYERS 8
|
#define MAX_NR_LAYERS 16
|
||||||
|
|
||||||
/* Since 5.0.0: the number of the fixed znodes - DONOT adjust */
|
/* Since 5.0.0: the number of the fixed znodes - DONOT adjust */
|
||||||
#define NR_FIXED_ZNODES 1
|
#define NR_FIXED_ZNODES 1
|
||||||
|
|
||||||
/* the numbers of znodes in different levels - should be mulitples of 8 */
|
/* the numbers of znodes in different levels - should be mulitples of 8 */
|
||||||
#define DEF_NR_POPUPMENUS 16
|
#define DEF_NR_POPUPMENUS 16
|
||||||
#define DEF_NR_TOOLTIPS 8
|
#define DEF_NR_TOOLTIPS 16
|
||||||
#define DEF_NR_GLOBALS 15 // reserve slots for fixed znodes
|
#define DEF_NR_GLOBALS 15 // reserve one slot for fixed znode
|
||||||
#define DEF_NR_SCREENLOCKS 8
|
#define DEF_NR_SCREENLOCKS 8
|
||||||
#define DEF_NR_DOCKERS 8
|
#define DEF_NR_DOCKERS 8
|
||||||
|
#ifdef _MGRM_PROCESSES // per layer basis
|
||||||
|
# define DEF_NR_TOPMOSTS 8
|
||||||
|
# define DEF_NR_NORMALS 32
|
||||||
|
#else
|
||||||
# define DEF_NR_TOPMOSTS 16
|
# define DEF_NR_TOPMOSTS 16
|
||||||
# define DEF_NR_NORMALS 128
|
# define DEF_NR_NORMALS 128
|
||||||
|
#endif
|
||||||
#define DEF_NR_LAUNCHERS 8
|
#define DEF_NR_LAUNCHERS 8
|
||||||
|
|
||||||
/* Since 5.0.0: the number of the zorder levels - DONOT adjust */
|
/* Since 5.0.0: the number of the zorder levels - DONOT adjust */
|
||||||
@@ -102,10 +107,10 @@ enum {
|
|||||||
#define ZNIDX_DESKTOP 0
|
#define ZNIDX_DESKTOP 0
|
||||||
|
|
||||||
/* The heap size for mask rectangles */
|
/* The heap size for mask rectangles */
|
||||||
#define DEF_NR_MASKRECT 1024
|
#define DEF_NR_MASKRECTS 1024
|
||||||
|
|
||||||
#if IS_COMPOSITING_SCHEMA
|
#if IS_COMPOSITING_SCHEMA
|
||||||
/* max number of shared surfaces */
|
/* max number of shared surfaces (512) */
|
||||||
# define MAX_NR_SHARED_SURF (DEF_NR_NORMALS * (MAX_NR_LAYERS >> 1))
|
# define MAX_NR_SHARED_SURF (DEF_NR_NORMALS * (MAX_NR_LAYERS >> 1))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -150,30 +155,18 @@ enum {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* constants for fix string module */
|
/* constants for fix string module */
|
||||||
#if defined (__NOUNIX__) || defined (__uClinux__)
|
|
||||||
#define MAX_LEN_FIXSTR 64
|
#define MAX_LEN_FIXSTR 64
|
||||||
#define NR_HEAP 5
|
#define NR_HEAP 5
|
||||||
#define LEN_BITMAP (1+2+4+8+16)
|
#define LEN_BITMAP (1+2+4+8+16)
|
||||||
#else
|
|
||||||
#ifdef _MGRM_THREADS
|
|
||||||
#define MAX_LEN_FIXSTR 2048
|
|
||||||
#define NR_HEAP 10
|
|
||||||
#define LEN_BITMAP (1+2+4+8+16+32+64+128+256+512)
|
|
||||||
#else
|
|
||||||
#define MAX_LEN_FIXSTR 1024
|
|
||||||
#define NR_HEAP 9
|
|
||||||
#define LEN_BITMAP (1+2+4+8+16+32+64+128+256)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* constants for engine name and video mode */
|
/* constants for engine name and video mode */
|
||||||
|
#define LEN_SO_NAME 127 // name length of a shared object (library)
|
||||||
#define LEN_DEVICE_NAME 127
|
#define LEN_DEVICE_NAME 127
|
||||||
#define LEN_EXDRIVER_NAME 127
|
#define LEN_EXDRIVER_NAME LEN_SO_NAME
|
||||||
#define LEN_ENGINE_NAME 23
|
#define LEN_ENGINE_NAME 23
|
||||||
#define LEN_VIDEO_MODE 31
|
#define LEN_VIDEO_MODE 31
|
||||||
#define LEN_MTYPE_NAME 23
|
#define LEN_MTYPE_NAME 23
|
||||||
#define LEN_FOURCC_FORMAT 7
|
#define LEN_FOURCC_FORMAT 7
|
||||||
#define LEN_SO_NAME 255 // name length of a shared object (library)
|
|
||||||
|
|
||||||
/* misc constants and utilities */
|
/* misc constants and utilities */
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -93,7 +93,7 @@ typedef struct tagDC* PDC;
|
|||||||
# else /* not defined _MGSCHEMA_COMPOSITING */
|
# else /* not defined _MGSCHEMA_COMPOSITING */
|
||||||
void __mg_lock_recalc_gcrinfo (PDC pdc);
|
void __mg_lock_recalc_gcrinfo (PDC pdc);
|
||||||
void __mg_unlock_gcrinfo (PDC pdc);
|
void __mg_unlock_gcrinfo (PDC pdc);
|
||||||
#define LOCK_GCRINFO(pdc) __mg_lock_recalc_gcrinfo (pdc)
|
#define LOCK_GCRINFO(pdc) if (dc_IsGeneralDC(pdc)) __mg_lock_recalc_gcrinfo (pdc)
|
||||||
#define UNLOCK_GCRINFO(pdc) if (dc_IsGeneralDC(pdc)) __mg_unlock_gcrinfo (pdc)
|
#define UNLOCK_GCRINFO(pdc) if (dc_IsGeneralDC(pdc)) __mg_unlock_gcrinfo (pdc)
|
||||||
# endif /* not defined _MGSCHEMA_COMPOSITING */
|
# endif /* not defined _MGSCHEMA_COMPOSITING */
|
||||||
|
|
||||||
@@ -167,6 +167,8 @@ struct tagDC
|
|||||||
/* surface of this DC */
|
/* surface of this DC */
|
||||||
GAL_Surface* surface;
|
GAL_Surface* surface;
|
||||||
|
|
||||||
|
char __first_attr[0]; // just a zero-length field for the first attribute
|
||||||
|
|
||||||
/* background color */
|
/* background color */
|
||||||
gal_pixel bkcolor;
|
gal_pixel bkcolor;
|
||||||
|
|
||||||
@@ -179,7 +181,7 @@ struct tagDC
|
|||||||
/* text color */
|
/* text color */
|
||||||
gal_pixel textcolor;
|
gal_pixel textcolor;
|
||||||
|
|
||||||
int bkmode;
|
int bkmode_set; /* the background mode set by user (5.0.12, Issue #107) */
|
||||||
|
|
||||||
int tabstop;
|
int tabstop;
|
||||||
int cExtra; /* Character extra */
|
int cExtra; /* Character extra */
|
||||||
@@ -213,6 +215,8 @@ struct tagDC
|
|||||||
size_t dash_list_len;
|
size_t dash_list_len;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
char __last_attr[0]; // just a zero-length field for the last attribute
|
||||||
|
|
||||||
PLOGFONT pLogFont;
|
PLOGFONT pLogFont;
|
||||||
|
|
||||||
POINT CurPenPos;
|
POINT CurPenPos;
|
||||||
@@ -247,6 +251,7 @@ struct tagDC
|
|||||||
gal_pixel skip_pixel;
|
gal_pixel skip_pixel;
|
||||||
gal_pixel cur_pixel;
|
gal_pixel cur_pixel;
|
||||||
int step;
|
int step;
|
||||||
|
int bkmode; /* the effective background mode */
|
||||||
/* ====================================================================== */
|
/* ====================================================================== */
|
||||||
|
|
||||||
CLIPRECT* cur_ban;
|
CLIPRECT* cur_ban;
|
||||||
@@ -713,6 +718,8 @@ void __mg_update_secondary_dc (PMAINWIN pWin, HDC secondary_dc,
|
|||||||
HDC __mg_get_common_rgba8888_dc (void);
|
HDC __mg_get_common_rgba8888_dc (void);
|
||||||
BOOL __mg_reset_common_rgba8888_dc (int width, int height, int pitch,
|
BOOL __mg_reset_common_rgba8888_dc (int width, int height, int pitch,
|
||||||
void* pixels);
|
void* pixels);
|
||||||
|
/* Since 5.0.6 */
|
||||||
|
void __mg_destroy_common_rgba8888_dc (void);
|
||||||
|
|
||||||
/* Since 5.0.0.
|
/* Since 5.0.0.
|
||||||
helpers to update the private client DC of window and it's descendants */
|
helpers to update the private client DC of window and it's descendants */
|
||||||
|
|||||||
+1
-1
@@ -162,7 +162,7 @@ dump_message (const MSG* msg, const char* name)
|
|||||||
name, msg->message, Message2Str (msg->message),
|
name, msg->message, Message2Str (msg->message),
|
||||||
msg->hwnd, (PVOID)msg->wParam, (PVOID)msg->lParam);
|
msg->hwnd, (PVOID)msg->wParam, (PVOID)msg->lParam);
|
||||||
#else
|
#else
|
||||||
_MG_PRINTF ("Message(%s): %u, Wnd: %p, wP: %p, lP: %p.\n",
|
_MG_PRINTF ("Message(%s) for %s: %u, Wnd: %p, wP: %p, lP: %p.\n",
|
||||||
#ifdef _MGHAVE_VIRTUAL_WINDOW
|
#ifdef _MGHAVE_VIRTUAL_WINDOW
|
||||||
msg->pSyncMsg?"SYNC":"NORM",
|
msg->pSyncMsg?"SYNC":"NORM",
|
||||||
#else
|
#else
|
||||||
|
|||||||
+12
-1
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -209,6 +209,9 @@ struct _CHARSETOPS
|
|||||||
/** Default character. */
|
/** Default character. */
|
||||||
Achar32 def_char_value;
|
Achar32 def_char_value;
|
||||||
|
|
||||||
|
/** Whether using legacy BIDI algorithm (Since 5.0.13). */
|
||||||
|
unsigned legacy_bidi:1;
|
||||||
|
|
||||||
/** The method to get the length of the first character. */
|
/** The method to get the length of the first character. */
|
||||||
int (*len_first_char) (const unsigned char* mstr, int mstrlen);
|
int (*len_first_char) (const unsigned char* mstr, int mstrlen);
|
||||||
|
|
||||||
@@ -263,9 +266,17 @@ struct _CHARSETOPS
|
|||||||
|
|
||||||
#define DEVFONTGLYPHTYPE_MASK_BMPTYPE 0x0F
|
#define DEVFONTGLYPHTYPE_MASK_BMPTYPE 0x0F
|
||||||
|
|
||||||
|
enum devfont_feature {
|
||||||
|
DEVFONT_FEATURE_MARK_BBOX = 0,
|
||||||
|
};
|
||||||
|
|
||||||
/** The font operation structure. */
|
/** The font operation structure. */
|
||||||
struct _FONTOPS
|
struct _FONTOPS
|
||||||
{
|
{
|
||||||
|
/** The method to get the feature value of the font (Since 5.0.13). */
|
||||||
|
DWORD (*get_feature) (LOGFONT* logfont, DEVFONT* devfont,
|
||||||
|
enum devfont_feature feature);
|
||||||
|
|
||||||
/** The method to get the glyph bitmap type . */
|
/** The method to get the glyph bitmap type . */
|
||||||
DWORD (*get_glyph_bmptype) (LOGFONT* logfont, DEVFONT* devfont);
|
DWORD (*get_glyph_bmptype) (LOGFONT* logfont, DEVFONT* devfont);
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,9 @@ typedef LWEVENT* PLWEVENT;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
extern DWORD __mg_timeout_usec;
|
||||||
|
extern DWORD __mg_repeat_usec;
|
||||||
|
|
||||||
// The entrance of low level event handling thread
|
// The entrance of low level event handling thread
|
||||||
BOOL mg_InitLWEvent (void);
|
BOOL mg_InitLWEvent (void);
|
||||||
void mg_TerminateLWEvent (void);
|
void mg_TerminateLWEvent (void);
|
||||||
|
|||||||
+16
-6
@@ -84,15 +84,18 @@
|
|||||||
#define WS_EX_MODALDISABLED 0x10000000L
|
#define WS_EX_MODALDISABLED 0x10000000L
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \def WS_EX_CTRLASMAINWIN
|
* Internal extended style:
|
||||||
* \brief The control can be displayed out of the main window
|
* The control can be displayed out of the main window
|
||||||
* which contains the control.
|
* which contains the control.
|
||||||
*/
|
*/
|
||||||
#define WS_EX_CTRLASMAINWIN 0x20000000L
|
#define WS_EX_CTRLASMAINWIN 0x20000000L
|
||||||
|
|
||||||
/* Internal extended style. */
|
/* Internal extended style: dialog box. */
|
||||||
#define WS_EX_DIALOGBOX 0x40000000L
|
#define WS_EX_DIALOGBOX 0x40000000L
|
||||||
|
|
||||||
|
/* Internal extended style: activated. */
|
||||||
|
#define WS_EX_ACTIVATED 0x80000000L
|
||||||
|
|
||||||
/* Make sure the internal window extended styles above are ok */
|
/* Make sure the internal window extended styles above are ok */
|
||||||
#define MGUI_COMPILE_TIME_ASSERT(name, x) \
|
#define MGUI_COMPILE_TIME_ASSERT(name, x) \
|
||||||
typedef int MGUI_dummy_ ## name[((x)?1:0) * 2 - 1]
|
typedef int MGUI_dummy_ ## name[((x)?1:0) * 2 - 1]
|
||||||
@@ -101,6 +104,10 @@ MGUI_COMPILE_TIME_ASSERT(ws_ex_int_1,
|
|||||||
WS_EX_INTERNAL_MASK & WS_EX_MODALDISABLED);
|
WS_EX_INTERNAL_MASK & WS_EX_MODALDISABLED);
|
||||||
MGUI_COMPILE_TIME_ASSERT(ws_ex_int_2,
|
MGUI_COMPILE_TIME_ASSERT(ws_ex_int_2,
|
||||||
WS_EX_INTERNAL_MASK & WS_EX_CTRLASMAINWIN);
|
WS_EX_INTERNAL_MASK & WS_EX_CTRLASMAINWIN);
|
||||||
|
MGUI_COMPILE_TIME_ASSERT(ws_ex_int_3,
|
||||||
|
WS_EX_INTERNAL_MASK & WS_EX_DIALOGBOX);
|
||||||
|
MGUI_COMPILE_TIME_ASSERT(ws_ex_int_4,
|
||||||
|
WS_EX_INTERNAL_MASK & WS_EX_ACTIVATED);
|
||||||
|
|
||||||
#undef MGUI_COMPILE_TIME_ASSERT
|
#undef MGUI_COMPILE_TIME_ASSERT
|
||||||
|
|
||||||
@@ -527,7 +534,10 @@ int __mg_free_hook_wins (int cli);
|
|||||||
/************************* Initialization/Termination ************************/
|
/************************* Initialization/Termination ************************/
|
||||||
void __mg_init_local_sys_text (void);
|
void __mg_init_local_sys_text (void);
|
||||||
|
|
||||||
/* the zorder information of the server */
|
/* the zorder information for the default layer */
|
||||||
|
extern ZORDERINFO* __mg_def_zorder_info;
|
||||||
|
|
||||||
|
/* the zorder information for the current layer */
|
||||||
extern ZORDERINFO* __mg_zorder_info;
|
extern ZORDERINFO* __mg_zorder_info;
|
||||||
|
|
||||||
#ifdef _MGRM_STANDALONE
|
#ifdef _MGRM_STANDALONE
|
||||||
@@ -769,8 +779,8 @@ static inline PMSGQUEUE getMsgQueue (HWND hWnd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MSGQUEUE* mg_AllocMsgQueueForThisThread (void);
|
MSGQUEUE* mg_AllocMsgQueueForThisThread (BOOL sign_in);
|
||||||
void mg_FreeMsgQueueForThisThread (void);
|
void mg_FreeMsgQueueForThisThread (BOOL sign_off);
|
||||||
|
|
||||||
/* Since 5.0.0 */
|
/* Since 5.0.0 */
|
||||||
int __mg_throw_away_messages (PMSGQUEUE pMsgQueue, HWND hWnd);
|
int __mg_throw_away_messages (PMSGQUEUE pMsgQueue, HWND hWnd);
|
||||||
|
|||||||
+3
-105
@@ -54,26 +54,12 @@
|
|||||||
# define MG_LOCAL /* NULL */
|
# define MG_LOCAL /* NULL */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Common
|
|
||||||
*/
|
|
||||||
#if defined(_MG_ENABLE_SPLASH) || \
|
|
||||||
defined(_MG_ENABLE_SCREENSAVER) || \
|
|
||||||
defined(_MG_ENABLE_WATERMARK)
|
|
||||||
|
|
||||||
#define _MG_ENABLE_LICENSE 1
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SPLASH_MINIGUI,
|
SPLASH_MINIGUI,
|
||||||
SPLASH_FMSOFT,
|
SPLASH_FMSOFT,
|
||||||
SPLASH_FEIMAN,
|
SPLASH_FEIMAN,
|
||||||
SPLASH_PROGRESSBAR,
|
SPLASH_PROGRESSBAR,
|
||||||
SPLASH_PROGRESSBAR_BK,
|
SPLASH_PROGRESSBAR_BK,
|
||||||
#if 0
|
|
||||||
WATERMARK_1,
|
|
||||||
WATERMARK_2,
|
|
||||||
WATERMARK_3,
|
|
||||||
#endif /* _MG_ENABLE_WATERMARK */
|
|
||||||
LICENSE_BITMAP_NR
|
LICENSE_BITMAP_NR
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -85,14 +71,14 @@ extern MG_LOCAL BITMAP g_license_bitmaps[];
|
|||||||
#define g_bitmap_progressbar g_license_bitmaps[SPLASH_PROGRESSBAR]
|
#define g_bitmap_progressbar g_license_bitmaps[SPLASH_PROGRESSBAR]
|
||||||
#define g_bitmap_progressbar_bk g_license_bitmaps[SPLASH_PROGRESSBAR_BK]
|
#define g_bitmap_progressbar_bk g_license_bitmaps[SPLASH_PROGRESSBAR_BK]
|
||||||
|
|
||||||
|
#if defined(_MG_ENABLE_SPLASH) || defined(_MG_ENABLE_SCREENSAVER)
|
||||||
|
# define _MG_ENABLE_LICENSE 1
|
||||||
MG_LOCAL void __mg_license_create(void);
|
MG_LOCAL void __mg_license_create(void);
|
||||||
MG_LOCAL void __mg_license_destroy(void);
|
MG_LOCAL void __mg_license_destroy(void);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# define __mg_license_create() /* NULL */
|
# define __mg_license_create() /* NULL */
|
||||||
# define __mg_license_destroy() /* NULL */
|
# define __mg_license_destroy() /* NULL */
|
||||||
#endif /* endif _MG_ENABLE_SPLASH or _MG_ENABLE_SCREENSAVER or _MG_ENABLE_WATERMARK*/
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MG_ENABLE_SCREENSAVER
|
#ifdef _MG_ENABLE_SCREENSAVER
|
||||||
MG_LOCAL void __mg_screensaver_create(void);
|
MG_LOCAL void __mg_screensaver_create(void);
|
||||||
@@ -102,9 +88,6 @@ MG_LOCAL void __mg_screensaver_destroy(void);
|
|||||||
# define __mg_screensaver_destroy() /* NULL */
|
# define __mg_screensaver_destroy() /* NULL */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Splash
|
|
||||||
*/
|
|
||||||
#ifdef _MG_ENABLE_SPLASH
|
#ifdef _MG_ENABLE_SPLASH
|
||||||
MG_LOCAL void __mg_splash_draw_framework(void);
|
MG_LOCAL void __mg_splash_draw_framework(void);
|
||||||
MG_LOCAL void __mg_splash_progress(void);
|
MG_LOCAL void __mg_splash_progress(void);
|
||||||
@@ -115,96 +98,11 @@ MG_LOCAL void __mg_splash_delay(void);
|
|||||||
# define __mg_splash_delay() /* NULL */
|
# define __mg_splash_delay() /* NULL */
|
||||||
#endif /* endif _MG_ENABLE_SPLASH */
|
#endif /* endif _MG_ENABLE_SPLASH */
|
||||||
|
|
||||||
/*
|
|
||||||
* ScreenSaver & Watermark
|
|
||||||
*/
|
|
||||||
#if defined(_MG_ENABLE_SCREENSAVER) || defined(_MG_ENABLE_WATERMARK)
|
|
||||||
MG_LOCAL void __mg_license_on_input(void);
|
|
||||||
MG_LOCAL void __mg_license_on_timeout(void);
|
|
||||||
#else
|
|
||||||
#define __mg_license_on_input() /* NULL */
|
#define __mg_license_on_input() /* NULL */
|
||||||
#define __mg_license_on_timeout() /* NULL */
|
#define __mg_license_on_timeout() /* NULL */
|
||||||
#endif /* _MG_ENABLE_SCREENSAVER || _MG_ENABLE_WATERMARK */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Product ID
|
|
||||||
*/
|
|
||||||
#ifdef _MG_PRODUCTID
|
|
||||||
typedef struct _product_id {
|
|
||||||
/* Fixed 8-byte code, help us to locate the struct in .so file */
|
|
||||||
unsigned char prefix[8];
|
|
||||||
/* the ID of the customer */
|
|
||||||
int customer_id;
|
|
||||||
/* svn version */
|
|
||||||
int version;
|
|
||||||
/* When does we compile the .so, in seconds */
|
|
||||||
int compile_date;
|
|
||||||
/* The size of the .so file */
|
|
||||||
int file_size;
|
|
||||||
/* The check sum of the .so file */
|
|
||||||
unsigned char checksum[16];
|
|
||||||
} product_id_t;
|
|
||||||
|
|
||||||
#define PRODUCT_ID_PREFIX 0xca, 0x3f, 0x2b, 0x43, 0x00, 0x33, 0xb0, 0xc3
|
|
||||||
|
|
||||||
MG_LOCAL int license_get_customer_id(void);
|
|
||||||
|
|
||||||
#endif /* _MG_PRODUCTID */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Tools to encrypt const variables
|
|
||||||
*/
|
|
||||||
MG_LOCAL unsigned int LICENSE_ENCRYPTED_CONST_INT(unsigned int);
|
|
||||||
MG_LOCAL char *LICENSE_ENCRYPTED_CONST_STRING(unsigned char *, int);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Processor ID
|
|
||||||
*/
|
|
||||||
#ifdef _MG_PRODUCTID
|
|
||||||
# define LICENSE_CHECK_CUSTIMER_ID() \
|
|
||||||
do { \
|
|
||||||
if (! license_get_customer_id()) { \
|
|
||||||
return ERR_INVALID_ARGS; \
|
|
||||||
} \
|
|
||||||
} while(0)
|
|
||||||
#else
|
|
||||||
#define LICENSE_CHECK_CUSTIMER_ID() /* NULL */
|
#define LICENSE_CHECK_CUSTIMER_ID() /* NULL */
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __TARGET_UNKNOWN__
|
|
||||||
|
|
||||||
#define license_get_processor_id() /* NULL */
|
#define license_get_processor_id() /* NULL */
|
||||||
#define LICENSE_SET_MESSAGE_OFFSET() /* NULL */
|
#define LICENSE_SET_MESSAGE_OFFSET() /* NULL */
|
||||||
#define LICENSE_MODIFY_MESSAGE(x) /* NULL */
|
#define LICENSE_MODIFY_MESSAGE(x) /* NULL */
|
||||||
|
|
||||||
#else /* not __TARGET_UNKNOWN__ */
|
|
||||||
|
|
||||||
extern MG_LOCAL unsigned int g_license_processor_id; /* window.c */
|
|
||||||
MG_LOCAL void license_get_processor_id (void);
|
|
||||||
#define LICENSE_PROCESSOR_ID_NONE (0xFC1D8B2A)
|
|
||||||
|
|
||||||
extern MG_LOCAL unsigned int g_license_message_offset; /* zorder.c */
|
|
||||||
|
|
||||||
#if defined (_WITH_TARGET_S3C6410)
|
|
||||||
# define REAL_PROCESSOR_ID LICENSE_ENCRYPTED_CONST_INT(0x1AE2FDFD /* 0x36410101 */)
|
|
||||||
#elif defined (_WITH_TARGET_S3C2440)
|
|
||||||
# define REAL_PROCESSOR_ID LICENSE_ENCRYPTED_CONST_INT(0x3AA4FDFD /* 0x32440101 */)
|
|
||||||
#elif defined (_WITH_TARGET_S3C2410)
|
|
||||||
# define REAL_PROCESSOR_ID LICENSE_ENCRYPTED_CONST_INT(0x3AE2FDFD /* 0x32410101 */)
|
|
||||||
#elif defined (_WITH_TARGET_HI3560A)
|
|
||||||
# define REAL_PROCESSOR_ID LICENSE_ENCRYPTED_CONST_INT(0xFC38C9AD /* 0x35600200 */)
|
|
||||||
#else
|
|
||||||
# define REAL_PROCESSOR_ID LICENSE_PROCESSOR_ID_NONE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LICENSE_SET_MESSAGE_OFFSET() do {g_license_message_offset=g_license_processor_id-(REAL_PROCESSOR_ID);}while (0)
|
|
||||||
|
|
||||||
#define LICENSE_MODIFY_MESSAGE(pMsg) \
|
|
||||||
do { \
|
|
||||||
pMsg->message += g_license_message_offset; \
|
|
||||||
pMsg->hwnd -= g_license_message_offset / 2; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#endif /* __TARGET_UNKNOWN__ */
|
|
||||||
|
|
||||||
#endif /* LICENSE_H */
|
#endif /* LICENSE_H */
|
||||||
|
|||||||
@@ -83,6 +83,11 @@ static inline int comp_key_string (const void *key1, const void *key2)
|
|||||||
return strcmp (key1, key2);
|
return strcmp (key1, key2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void free_val_alloc (void *val)
|
||||||
|
{
|
||||||
|
free (val);
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct _map_t map_t;
|
typedef struct _map_t map_t;
|
||||||
typedef struct _map_entry_t {
|
typedef struct _map_entry_t {
|
||||||
struct rb_node node;
|
struct rb_node node;
|
||||||
|
|||||||
+32
-9
@@ -120,37 +120,60 @@ int __mg_alloc_sem_for_shared_surf (void);
|
|||||||
int __mg_free_sem_for_shared_surf (int sem_num);
|
int __mg_free_sem_for_shared_surf (int sem_num);
|
||||||
#endif /* _MGSCHEMA_COMPOSITING */
|
#endif /* _MGSCHEMA_COMPOSITING */
|
||||||
|
|
||||||
int __mg_lookfor_unused_slot (unsigned char* bitmap, int len_bmp, int set);
|
size_t __mg_lookfor_unused_slot (unsigned char* bitmap, size_t len_bmp, int set);
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
void __mg_slot_set_use (unsigned char* bitmap, int index) {
|
void __mg_slot_set_use (unsigned char* bitmap, size_t index) {
|
||||||
bitmap += index >> 3;
|
bitmap += index >> 3;
|
||||||
*bitmap &= (~(0x80 >> (index % 8)));
|
*bitmap &= (~(0x80 >> (index % 8)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
int __mg_slot_clear_use (unsigned char* bitmap, int index) {
|
int __mg_slot_clear_use (unsigned char* bitmap, size_t index) {
|
||||||
|
bitmap += index >> 3;
|
||||||
|
*bitmap |= (0x80 >> (index % 8));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
int __mg_slot_is_used (unsigned char* bitmap, size_t index) {
|
||||||
bitmap += index >> 3;
|
bitmap += index >> 3;
|
||||||
if (*bitmap & (0x80 >> (index % 8)))
|
if (*bitmap & (0x80 >> (index % 8)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
*bitmap |= (0x80 >> (index % 8));
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the number of idle mask rectangles */
|
/* get the number of idle mask rectangles */
|
||||||
static inline
|
static inline
|
||||||
int __mg_get_nr_idle_slots (unsigned char* bitmap, int len_bmp)
|
size_t __mg_get_nr_idle_slots (unsigned char* bitmap, size_t len_bmp)
|
||||||
{
|
{
|
||||||
int idle = 0;
|
size_t idle = 0;
|
||||||
int i, j;
|
size_t i, j;
|
||||||
|
|
||||||
for (i = 0; i < len_bmp; i++) {
|
for (i = 0; i < len_bmp; i++) {
|
||||||
for (j = 0; j < 8; j++) {
|
if (*bitmap) {
|
||||||
|
if (*bitmap == 0xFF) {
|
||||||
|
idle += 8;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (*bitmap & 0xF0) {
|
||||||
|
for (j = 0; j < 4; j++) {
|
||||||
if (*bitmap & (0x80 >> j))
|
if (*bitmap & (0x80 >> j))
|
||||||
idle++;
|
idle++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (*bitmap & 0x0F) {
|
||||||
|
for (j = 0; j < 4; j++) {
|
||||||
|
if (*bitmap & (0x08 >> j))
|
||||||
|
idle++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bitmap++;
|
bitmap++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return idle;
|
return idle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+161
-45
File diff suppressed because it is too large
Load Diff
@@ -73,6 +73,8 @@
|
|||||||
|
|
||||||
#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
|
#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
|
||||||
/* union semun is defined by including <sys/sem.h> */
|
/* union semun is defined by including <sys/sem.h> */
|
||||||
|
#elif defined(__DARWIN__)
|
||||||
|
/* union semun is defined by including <sys/sem.h> */
|
||||||
#else
|
#else
|
||||||
/* according to X/OPEN we have to define it ourselves */
|
/* according to X/OPEN we have to define it ourselves */
|
||||||
union semun {
|
union semun {
|
||||||
|
|||||||
@@ -138,6 +138,14 @@ int __mg_save_png (MG_RWops* fp, MYBITMAP* bmp, RGB* pal);
|
|||||||
BOOL __mg_check_png (MG_RWops* fp);
|
BOOL __mg_check_png (MG_RWops* fp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MGIMAGE_WEBP
|
||||||
|
void* __mg_init_webp (MG_RWops* fp, MYBITMAP *png, RGB *pal);
|
||||||
|
int __mg_load_webp (MG_RWops* fp, void* init_info, MYBITMAP *png, CB_ONE_SCANLINE cb, void* context);
|
||||||
|
void __mg_cleanup_webp (void* init_info);
|
||||||
|
int __mg_save_webp (MG_RWops* fp, MYBITMAP* bmp, RGB* pal);
|
||||||
|
BOOL __mg_check_webp (MG_RWops* fp);
|
||||||
|
#endif
|
||||||
|
|
||||||
int __mg_bmp_compute_pitch (int bpp, Uint32 width, Uint32 *pitch, BOOL does_round);
|
int __mg_bmp_compute_pitch (int bpp, Uint32 width, Uint32 *pitch, BOOL does_round);
|
||||||
|
|
||||||
#define fp_getc(fp) MGUI_RWgetc(fp)
|
#define fp_getc(fp) MGUI_RWgetc(fp)
|
||||||
|
|||||||
+11
-1
@@ -132,6 +132,10 @@ void __mg_client_del (int cli);
|
|||||||
|
|
||||||
void __mg_release_global_res (int cli);
|
void __mg_release_global_res (int cli);
|
||||||
|
|
||||||
|
/* Since 5.2.0 */
|
||||||
|
int __mg_nssurf_map_new(void);
|
||||||
|
void __mg_nssurf_map_delete(void);
|
||||||
|
|
||||||
void __mg_remove_client (int cli, int clifd);
|
void __mg_remove_client (int cli, int clifd);
|
||||||
|
|
||||||
int __mg_handle_request (int clifd, int req_id, int cli);
|
int __mg_handle_request (int clifd, int req_id, int cli);
|
||||||
@@ -150,11 +154,17 @@ int __mg_remove_all_znodes_of_client (int cli);
|
|||||||
|
|
||||||
int __mg_handle_normal_mouse_move (const ZORDERINFO* zi, int x, int y);
|
int __mg_handle_normal_mouse_move (const ZORDERINFO* zi, int x, int y);
|
||||||
int __mg_get_znode_at_point (const ZORDERINFO* zi, int x, int y, HWND* hwnd);
|
int __mg_get_znode_at_point (const ZORDERINFO* zi, int x, int y, HWND* hwnd);
|
||||||
|
ZORDERNODE *__mg_find_znode_by_client_hwnd (int cli, HWND hwnd);
|
||||||
|
|
||||||
int __mg_do_reghook_operation (int cli, const REGHOOKINFO* info);
|
int __mg_do_reghook_operation (int cli, const REGHOOKINFO* info);
|
||||||
int __mg_handle_mouse_hook (int message, WPARAM wParam, LPARAM lParam);
|
int __mg_handle_mouse_hook (int message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
int __mg_do_change_topmost_layer (void);
|
#ifdef _MGSCHEMA_COMPOSITING
|
||||||
|
int __mg_prepare_layer_for_compositing (MG_Layer* layer);
|
||||||
|
int __mg_end_up_layer_for_compositing (MG_Layer* layer);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int __mg_do_change_topmost_layer (MG_Layer* new_topmost);
|
||||||
|
|
||||||
MG_Layer* __mg_find_layer_by_name (const char* name);
|
MG_Layer* __mg_find_layer_by_name (const char* name);
|
||||||
|
|
||||||
|
|||||||
+11
-4
@@ -102,10 +102,13 @@ typedef struct tagG_RES {
|
|||||||
char video_engine [LEN_ENGINE_NAME + 1];
|
char video_engine [LEN_ENGINE_NAME + 1];
|
||||||
char video_mode [LEN_VIDEO_MODE + 1];
|
char video_mode [LEN_VIDEO_MODE + 1];
|
||||||
char video_device [LEN_DEVICE_NAME + 1];
|
char video_device [LEN_DEVICE_NAME + 1];
|
||||||
char video_exdriver [LEN_EXDRIVER_NAME + 1];
|
|
||||||
char video_fourcc [LEN_FOURCC_FORMAT + 1];
|
|
||||||
int video_dpi, video_hres, video_vres, video_depth;
|
int video_dpi, video_hres, video_vres, video_depth;
|
||||||
Uint32 video_rmask, video_gmask, video_bmask, video_amask;
|
Uint32 video_rmask, video_gmask, video_bmask, video_amask;
|
||||||
|
#ifdef _MGGAL_DRM
|
||||||
|
char video_exdriver [LEN_EXDRIVER_NAME + 1];
|
||||||
|
Uint32 video_drm_format;
|
||||||
|
Uint32 video_dbl_buff:1;
|
||||||
|
#endif
|
||||||
|
|
||||||
int nr_layers;
|
int nr_layers;
|
||||||
int semid_layer;
|
int semid_layer;
|
||||||
@@ -168,8 +171,6 @@ typedef G_RES* PG_RES;
|
|||||||
#define SHAREDRES_VIDEO_ENGINE (((PG_RES)mgSharedRes)->video_engine)
|
#define SHAREDRES_VIDEO_ENGINE (((PG_RES)mgSharedRes)->video_engine)
|
||||||
#define SHAREDRES_VIDEO_MODE (((PG_RES)mgSharedRes)->video_mode)
|
#define SHAREDRES_VIDEO_MODE (((PG_RES)mgSharedRes)->video_mode)
|
||||||
#define SHAREDRES_VIDEO_DEVICE (((PG_RES)mgSharedRes)->video_device)
|
#define SHAREDRES_VIDEO_DEVICE (((PG_RES)mgSharedRes)->video_device)
|
||||||
#define SHAREDRES_VIDEO_FOURCC (((PG_RES)mgSharedRes)->video_fourcc)
|
|
||||||
#define SHAREDRES_VIDEO_EXDRIVER (((PG_RES)mgSharedRes)->video_exdriver)
|
|
||||||
#define SHAREDRES_VIDEO_DPI (((PG_RES)mgSharedRes)->video_dpi)
|
#define SHAREDRES_VIDEO_DPI (((PG_RES)mgSharedRes)->video_dpi)
|
||||||
#define SHAREDRES_VIDEO_HRES (((PG_RES)mgSharedRes)->video_hres)
|
#define SHAREDRES_VIDEO_HRES (((PG_RES)mgSharedRes)->video_hres)
|
||||||
#define SHAREDRES_VIDEO_VRES (((PG_RES)mgSharedRes)->video_vres)
|
#define SHAREDRES_VIDEO_VRES (((PG_RES)mgSharedRes)->video_vres)
|
||||||
@@ -179,6 +180,12 @@ typedef G_RES* PG_RES;
|
|||||||
#define SHAREDRES_VIDEO_BMASK (((PG_RES)mgSharedRes)->video_bmask)
|
#define SHAREDRES_VIDEO_BMASK (((PG_RES)mgSharedRes)->video_bmask)
|
||||||
#define SHAREDRES_VIDEO_AMASK (((PG_RES)mgSharedRes)->video_amask)
|
#define SHAREDRES_VIDEO_AMASK (((PG_RES)mgSharedRes)->video_amask)
|
||||||
|
|
||||||
|
#ifdef _MGGAL_DRM
|
||||||
|
#define SHAREDRES_VIDEO_EXDRIVER (((PG_RES)mgSharedRes)->video_exdriver)
|
||||||
|
#define SHAREDRES_VIDEO_DRM_FORMAT (((PG_RES)mgSharedRes)->video_drm_format)
|
||||||
|
#define SHAREDRES_VIDEO_DBL_BUFF (((PG_RES)mgSharedRes)->video_dbl_buff)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SHAREDRES_TIMER_COUNTER (((PG_RES)mgSharedRes)->timer_counter)
|
#define SHAREDRES_TIMER_COUNTER (((PG_RES)mgSharedRes)->timer_counter)
|
||||||
#define SHAREDRES_TICK_ON_LOCKSEM (((PG_RES)mgSharedRes)->tick_on_locksem)
|
#define SHAREDRES_TICK_ON_LOCKSEM (((PG_RES)mgSharedRes)->tick_on_locksem)
|
||||||
#define SHAREDRES_TIMEOUT (((PG_RES)mgSharedRes)->timeout)
|
#define SHAREDRES_TIMEOUT (((PG_RES)mgSharedRes)->timeout)
|
||||||
|
|||||||
+30
-19
@@ -87,7 +87,7 @@ typedef struct _ZORDERNODE {
|
|||||||
int nr_dirty_rcs; /* the number of dirty rects */
|
int nr_dirty_rcs; /* the number of dirty rects */
|
||||||
const RECT* dirty_rcs; /* the pointer to the dirty rectangles */
|
const RECT* dirty_rcs; /* the pointer to the dirty rectangles */
|
||||||
#else /* defined _MGSCHEMA_COMPOSITING */
|
#else /* defined _MGSCHEMA_COMPOSITING */
|
||||||
unsigned int age; /* znode age */
|
DWORD age; /* znode age */
|
||||||
RECT dirty_rc; /* dirty rectangle */
|
RECT dirty_rc; /* dirty rectangle */
|
||||||
#endif /* not defined _MGSCHEMA_COMPOSITING */
|
#endif /* not defined _MGSCHEMA_COMPOSITING */
|
||||||
|
|
||||||
@@ -133,17 +133,25 @@ typedef struct _ZORDERINFO {
|
|||||||
int first_launcher;
|
int first_launcher;
|
||||||
|
|
||||||
int active_win;
|
int active_win;
|
||||||
|
int old_active;
|
||||||
|
int next_active;
|
||||||
|
|
||||||
int cli_trackmenu;
|
int cli_trackmenu;
|
||||||
|
|
||||||
/* The size of usage bitmap for mask rect. */
|
/* The size of usage bitmap for mask rect. */
|
||||||
int size_maskrect_usage_bmp;
|
int size_maskrect_usage_bmp;
|
||||||
|
|
||||||
#ifdef _MGRM_THREADS
|
/* use read/write lock for Unix-like OS */
|
||||||
#ifndef __NOUNIX__
|
#ifndef __NOUNIX__
|
||||||
|
#define __ZI_USE_RWLOCK 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MGRM_THREADS
|
||||||
|
# ifdef __ZI_USE_RWLOCK
|
||||||
pthread_rwlock_t rwlock;
|
pthread_rwlock_t rwlock;
|
||||||
|
pthread_t rwlock_owner;
|
||||||
# else
|
# else
|
||||||
pthread_mutex_t rwlock;
|
pthread_mutex_t mutex;
|
||||||
# endif
|
# endif
|
||||||
#elif defined(_MGRM_PROCESSES)
|
#elif defined(_MGRM_PROCESSES)
|
||||||
int zi_semid;
|
int zi_semid;
|
||||||
@@ -156,12 +164,13 @@ typedef struct _ZORDERINFO {
|
|||||||
typedef ZORDERINFO* PZORDERINFO;
|
typedef ZORDERINFO* PZORDERINFO;
|
||||||
|
|
||||||
#define MAX_NR_SPECIAL_ZNODES(zi) \
|
#define MAX_NR_SPECIAL_ZNODES(zi) \
|
||||||
(zi->max_nr_tooltips + zi->max_nr_globals + \
|
(zi->max_nr_globals + \
|
||||||
zi->max_nr_screenlocks + zi->max_nr_dockers + \
|
zi->max_nr_screenlocks + zi->max_nr_dockers + \
|
||||||
zi->max_nr_launchers + NR_FIXED_ZNODES)
|
zi->max_nr_launchers + NR_FIXED_ZNODES)
|
||||||
|
|
||||||
#define MAX_NR_GENERAL_ZNODES(zi) \
|
#define MAX_NR_GENERAL_ZNODES(zi) \
|
||||||
(zi->max_nr_topmosts + zi->max_nr_normals)
|
(zi->max_nr_tooltips + zi->max_nr_topmosts + \
|
||||||
|
zi->max_nr_normals)
|
||||||
|
|
||||||
#define MAX_NR_ZNODES(zi) \
|
#define MAX_NR_ZNODES(zi) \
|
||||||
MAX_NR_SPECIAL_ZNODES(zi) + MAX_NR_GENERAL_ZNODES(zi)
|
MAX_NR_SPECIAL_ZNODES(zi) + MAX_NR_GENERAL_ZNODES(zi)
|
||||||
@@ -178,7 +187,7 @@ typedef ZORDERINFO* PZORDERINFO;
|
|||||||
(ZORDERNODE*)((char*)((zi)+1)+ (zi)->size_usage_bmp)
|
(ZORDERNODE*)((char*)((zi)+1)+ (zi)->size_usage_bmp)
|
||||||
|
|
||||||
#define GET_MASKRECT_USAGEBMP(zi) \
|
#define GET_MASKRECT_USAGEBMP(zi) \
|
||||||
((char *)((zi) + 1) + (zi)->size_usage_bmp + \
|
((unsigned char *)((zi) + 1) + (zi)->size_usage_bmp + \
|
||||||
sizeof (ZORDERNODE) * (MAX_NR_ZNODES_WITH_PPP(zi)))
|
sizeof (ZORDERNODE) * (MAX_NR_ZNODES_WITH_PPP(zi)))
|
||||||
|
|
||||||
#define GET_MASKRECT(zi) \
|
#define GET_MASKRECT(zi) \
|
||||||
@@ -187,25 +196,25 @@ typedef ZORDERINFO* PZORDERINFO;
|
|||||||
|
|
||||||
/* round to multiple of 8 to aoivd alignment issue */
|
/* round to multiple of 8 to aoivd alignment issue */
|
||||||
#define SIZE_MASKRECT_USAGE_BMP \
|
#define SIZE_MASKRECT_USAGE_BMP \
|
||||||
ROUND_TO_MULTIPLE((DEF_NR_MASKRECT >> 3), 8)
|
ROUND_TO_MULTIPLE((DEF_NR_MASKRECTS >> 3), 8)
|
||||||
|
|
||||||
#define NR_SPECIAL_ZNODES(zi) \
|
#define NR_SPECIAL_ZNODES(zi) \
|
||||||
(zi->nr_tooltips + zi->nr_globals + \
|
(zi->nr_globals + \
|
||||||
zi->nr_screenlocks + zi->nr_dockers + \
|
zi->nr_screenlocks + zi->nr_dockers + \
|
||||||
zi->nr_launchers + NR_FIXED_ZNODES)
|
zi->nr_launchers + NR_FIXED_ZNODES)
|
||||||
|
|
||||||
#define NR_GENERAL_ZNODES(zi) \
|
#define NR_GENERAL_ZNODES(zi) \
|
||||||
(zi->nr_topmosts + zi->nr_normals)
|
(zi->nr_tooltips + zi->nr_topmosts + zi->nr_normals)
|
||||||
|
|
||||||
#define NR_ZNODES(zi) \
|
#define NR_ZNODES(zi) \
|
||||||
NR_SPECIAL_ZNODES(zi) + NR_GENERAL_ZNODES(zi)
|
NR_SPECIAL_ZNODES(zi) + NR_GENERAL_ZNODES(zi)
|
||||||
|
|
||||||
/* Since 5.0.0: more levels */
|
/* Since 5.0.0: more levels */
|
||||||
#define SIZE_USAGE_BMP_GENERAL(max_nr_t, max_nr_n) \
|
#define SIZE_USAGE_BMP_GENERAL(max_nr_t, max_nr_n) \
|
||||||
((7 + (max_nr_t) + (max_nr_n)) >> 3)
|
((7 + DEF_NR_TOOLTIPS + (max_nr_t) + (max_nr_n)) >> 3)
|
||||||
|
|
||||||
#define SIZE_USAGE_BMP_SPECIAL(max_nr_g) \
|
#define SIZE_USAGE_BMP_SPECIAL(max_nr_g) \
|
||||||
((7 + DEF_NR_TOOLTIPS + max_nr_g + \
|
((7 + max_nr_g + \
|
||||||
DEF_NR_SCREENLOCKS + DEF_NR_DOCKERS + \
|
DEF_NR_SCREENLOCKS + DEF_NR_DOCKERS + \
|
||||||
DEF_NR_LAUNCHERS + NR_FIXED_ZNODES) >> 3)
|
DEF_NR_LAUNCHERS + NR_FIXED_ZNODES) >> 3)
|
||||||
|
|
||||||
@@ -234,15 +243,15 @@ typedef ZORDERINFO* PZORDERINFO;
|
|||||||
MG_UNLIKELY ((idx) > MAX_NR_ZNODES(zi))
|
MG_UNLIKELY ((idx) > MAX_NR_ZNODES(zi))
|
||||||
|
|
||||||
#define IS_TYPE_GENERAL(type) \
|
#define IS_TYPE_GENERAL(type) \
|
||||||
(type == ZOF_TYPE_HIGHER || \
|
((type) == ZOF_TYPE_TOOLTIP || \
|
||||||
type == ZOF_TYPE_NORMAL)
|
(type) == ZOF_TYPE_HIGHER || \
|
||||||
|
(type) == ZOF_TYPE_NORMAL)
|
||||||
|
|
||||||
#define IS_TYPE_SPECIAL(type) \
|
#define IS_TYPE_SPECIAL(type) \
|
||||||
(type == ZOF_TYPE_TOOLTIP || \
|
((type) == ZOF_TYPE_GLOBAL || \
|
||||||
type == ZOF_TYPE_GLOBAL || \
|
(type) == ZOF_TYPE_SCREENLOCK || \
|
||||||
type == ZOF_TYPE_SCREENLOCK || \
|
(type) == ZOF_TYPE_DOCKER || \
|
||||||
type == ZOF_TYPE_DOCKER || \
|
(type) == ZOF_TYPE_LAUNCHER)
|
||||||
type == ZOF_TYPE_LAUNCHER)
|
|
||||||
|
|
||||||
#define ZOF_TYPE_TO_LEVEL_IDX(type) ((int)(8 - ((type) >> 28)))
|
#define ZOF_TYPE_TO_LEVEL_IDX(type) ((int)(8 - ((type) >> 28)))
|
||||||
|
|
||||||
@@ -250,12 +259,14 @@ typedef ZORDERINFO* PZORDERINFO;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
int __kernel_alloc_z_order_info (int nr_topmosts, int nr_normals);
|
int __kernel_alloc_z_order_info (int nr_topmosts, int nr_normals, BOOL with_maskrc_heap);
|
||||||
void __kernel_free_z_order_info (ZORDERINFO* zi);
|
void __kernel_free_z_order_info (ZORDERINFO* zi);
|
||||||
int __kernel_get_window_region (HWND pWin, CLIPRGN* region);
|
int __kernel_get_window_region (HWND pWin, CLIPRGN* region);
|
||||||
int __kernel_get_next_znode (const ZORDERINFO* zi, int from);
|
int __kernel_get_next_znode (const ZORDERINFO* zi, int from);
|
||||||
int __kernel_get_prev_znode (const ZORDERINFO* zi, int from);
|
int __kernel_get_prev_znode (const ZORDERINFO* zi, int from);
|
||||||
|
|
||||||
|
void __mg_sync_special_nodes (ZORDERINFO* from, ZORDERINFO* to);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
# also for makefile.ng and makefile.msvc
|
# also for makefile.ng and makefile.msvc
|
||||||
AM_CPPFLAGS = -I$(abs_top_srcdir)/src/include -I$(abs_top_srcdir)/include
|
AM_CPPFLAGS = -I$(abs_top_srcdir)/src/include -I$(abs_top_srcdir)/include
|
||||||
|
AM_CFLAGS = -Wno-zero-length-bounds
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libkernel.la
|
noinst_LTLIBRARIES = libkernel.la
|
||||||
|
|
||||||
if MG_MINIMALGDI
|
|
||||||
libkernel_la_SOURCES = init-lite.c fixstr.c \
|
|
||||||
blockheap.c
|
|
||||||
else
|
|
||||||
libkernel_la_SOURCES = timer.c init.c init-lite.c \
|
libkernel_la_SOURCES = timer.c init.c init-lite.c \
|
||||||
desktop-ths.c desktop-sa.c desktop-procs.c \
|
desktop-ths.c desktop-sa.c desktop-procs.c \
|
||||||
cursor.c cursor-procs.c cursor-sa.c \
|
cursor.c cursor-procs.c cursor-sa.c \
|
||||||
sharedres.c message.c event.c listenfd.c \
|
sharedres.c message.c event.c listenfd.c \
|
||||||
blockheap.c fixstr.c slotset.c zorder.c sem-manager.c \
|
blockheap.c fixstr.c slotset.c zorder.c sem-manager.c \
|
||||||
compsor-manager.c compsor-fallback.c
|
compsor-manager.c compsor-fallback.c
|
||||||
endif
|
|
||||||
|
|
||||||
EXTRA_DIST= desktop.c desktop-comm.c cursor-comm.c makefile.ng makefile.msvc
|
EXTRA_DIST= desktop.c desktop-comm.c cursor-comm.c makefile.ng makefile.msvc
|
||||||
|
|
||||||
|
|||||||
+94
-71
File diff suppressed because it is too large
Load Diff
+1208
-707
File diff suppressed because it is too large
Load Diff
+195
-10
File diff suppressed because it is too large
Load Diff
@@ -48,7 +48,7 @@ static HCURSOR load_cursor_from_file (const char* filename)
|
|||||||
{
|
{
|
||||||
FILE* fp;
|
FILE* fp;
|
||||||
WORD16 wTemp;
|
WORD16 wTemp;
|
||||||
int w, h, xhot, yhot, colornum;
|
int w=0, h=0, xhot=0, yhot=0, colornum=0;
|
||||||
#if 0
|
#if 0
|
||||||
DWORD32 size;
|
DWORD32 size;
|
||||||
#endif
|
#endif
|
||||||
@@ -152,7 +152,7 @@ static HCURSOR load_cursor_from_mem (const void* area)
|
|||||||
const Uint8* p = (Uint8*)area;
|
const Uint8* p = (Uint8*)area;
|
||||||
WORD16 wTemp;
|
WORD16 wTemp;
|
||||||
|
|
||||||
int w, h, xhot, yhot, colornum;
|
int w=0, h=0, xhot=0, yhot=0, colornum=0;
|
||||||
#if 0
|
#if 0
|
||||||
DWORD32 size;
|
DWORD32 size;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+73
-60
File diff suppressed because it is too large
Load Diff
+20
-2
@@ -448,6 +448,11 @@ void kernel_ShowCursorForGDI (BOOL fShow, void* pdc)
|
|||||||
|
|
||||||
prc = &cur_pdc->rc_output;
|
prc = &cur_pdc->rc_output;
|
||||||
|
|
||||||
|
/* Since 5.0.13 */
|
||||||
|
if (!fShow) {
|
||||||
|
GAL_LockSurface(cur_pdc->surface);
|
||||||
|
}
|
||||||
|
|
||||||
if (cur_pdc->surface != __gal_screen) {
|
if (cur_pdc->surface != __gal_screen) {
|
||||||
if (fShow) {
|
if (fShow) {
|
||||||
GAL_UpdateRect (cur_pdc->surface,
|
GAL_UpdateRect (cur_pdc->surface,
|
||||||
@@ -472,7 +477,7 @@ void kernel_ShowCursorForGDI (BOOL fShow, void* pdc)
|
|||||||
prc->left, prc->top, RECTWP(prc), RECTHP(prc));
|
prc->left, prc->top, RECTWP(prc), RECTHP(prc));
|
||||||
//GAL_SyncUpdate (cur_pdc->surface);
|
//GAL_SyncUpdate (cur_pdc->surface);
|
||||||
}
|
}
|
||||||
return;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fShow && nShowCount >= 0 && pCurCsr) {
|
if (fShow && nShowCount >= 0 && pCurCsr) {
|
||||||
@@ -488,6 +493,12 @@ void kernel_ShowCursorForGDI (BOOL fShow, void* pdc)
|
|||||||
//GAL_SyncUpdate (cur_pdc->surface);
|
//GAL_SyncUpdate (cur_pdc->surface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
|
/* Since 5.0.13 */
|
||||||
|
if (fShow) {
|
||||||
|
GAL_UnlockSurface(cur_pdc->surface);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int GUIAPI ShowCursor (BOOL fShow)
|
int GUIAPI ShowCursor (BOOL fShow)
|
||||||
@@ -516,9 +527,16 @@ void kernel_ShowCursorForGDI(BOOL fShow, void* pdc)
|
|||||||
|
|
||||||
prc = &cur_pdc->rc_output;
|
prc = &cur_pdc->rc_output;
|
||||||
|
|
||||||
if (fShow)
|
/* Since 5.0.13 */
|
||||||
|
if (!fShow) {
|
||||||
|
GAL_LockSurface(cur_pdc->surface);
|
||||||
|
}
|
||||||
|
else {
|
||||||
GAL_UpdateRect (cur_pdc->surface,
|
GAL_UpdateRect (cur_pdc->surface,
|
||||||
prc->left, prc->top, RECTWP(prc), RECTHP(prc));
|
prc->left, prc->top, RECTWP(prc), RECTHP(prc));
|
||||||
|
/* Since 5.0.13 */
|
||||||
|
GAL_UnlockSurface(cur_pdc->surface);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _MGHAVE_CURSOR */
|
#endif /* _MGHAVE_CURSOR */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user