mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 00:54:18 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
+2
-1
@@ -4,6 +4,8 @@
|
|||||||
*.al
|
*.al
|
||||||
*.a
|
*.a
|
||||||
*.so
|
*.so
|
||||||
|
\#
|
||||||
|
am--include-marker
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
.deps/
|
.deps/
|
||||||
@@ -23,7 +25,6 @@ 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
|
||||||
|
|||||||
+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 =
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,31 @@
|
|||||||
# MiniGUI
|
# MiniGUI
|
||||||
|
|
||||||
A mature and proven cross-platform GUI system for embedded and smart IoT devices.
|
A modern and proven cross-platform window system for embedded systems or smart IoT devices.
|
||||||
|
|
||||||
|
|
||||||
## TABLE OF CONTENTS
|
_TABLE OF CONTENTS_
|
||||||
|
|
||||||
|
- [TABLE OF CONTENTS](#table-of-contents)
|
||||||
- [INTRODUCTION](#introduction)
|
- [INTRODUCTION](#introduction)
|
||||||
- [A BRIEF BUILDING INSTRUCTION](#a-brief-building-instruction)
|
+ [What's MiniGUI](#whats-minigui)
|
||||||
+ [Prerequisites](#prerequisites)
|
+ [App Frameworks on MiniGUI](#app-frameworks-on-minigui)
|
||||||
+ [Building MiniGUI Core](#building-minigui-core)
|
+ [MiniGUI and HybridOS](#minigui-and-hybridos)
|
||||||
+ [Building whole MiniGUI](#building-whole-minigui)
|
+ [Source Code Repositories](#source-code-repositories)
|
||||||
+ [Unit Tests](#unit-tests)
|
|
||||||
- [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x)
|
- [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x)
|
||||||
+ [Compositing schema](#compositing-schema)
|
+ [Compositing Schema](#compositing-schema)
|
||||||
+ [New main window types](#new-main-window-types)
|
+ [New Main Window Types](#new-main-window-types)
|
||||||
+ [Virtual window](#virtual-window)
|
+ [Virtual Window](#virtual-window)
|
||||||
+ [Other enhancements](#other-enhancements)
|
+ [Other Enhancements](#other-enhancements)
|
||||||
- [NEW FEATURES IN VERSION 4.0.x](#new-features-in-version-40x)
|
- [NEW FEATURES IN VERSION 4.0.x](#new-features-in-version-40x)
|
||||||
- [NEW FEATURES IN VERSION 3.2.x](#new-features-in-version-32x)
|
- [NEW FEATURES IN VERSION 3.2.x](#new-features-in-version-32x)
|
||||||
- [THE RUNTIME MODES OF MINIGUI](#the-runtime-modes-of-minigui)
|
- [THE RUNTIME MODES OF MINIGUI](#the-runtime-modes-of-minigui)
|
||||||
|
- [A BRIEF BUILDING INSTRUCTION](#a-brief-building-instruction)
|
||||||
|
+ [Building Whole MiniGUI](#building-whole-minigui)
|
||||||
|
+ [Building MiniGUI Core](#building-minigui-core)
|
||||||
|
+ [Unit Tests](#unit-tests)
|
||||||
|
- [Othere Resources](#othere-resources)
|
||||||
|
+ [MiniGUI Components](#minigui-components)
|
||||||
|
+ [Open Source Apps Based-on MiniGUI](#open-source-apps-based-on-minigui)
|
||||||
- [HISTORY](#history)
|
- [HISTORY](#history)
|
||||||
- [AUTHORS AND COPYING](#authors-and-copying)
|
- [AUTHORS AND COPYING](#authors-and-copying)
|
||||||
+ [Special Statement](#special-statement)
|
+ [Special Statement](#special-statement)
|
||||||
@@ -28,156 +35,121 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
|||||||
|
|
||||||
## INTRODUCTION
|
## INTRODUCTION
|
||||||
|
|
||||||
MiniGUI is a mature cross-platform windowing system and a GUI (Graphics
|
### What's MiniGUI
|
||||||
User Interface) support system for embedded systems and smart IoT devices.
|
|
||||||
This is the version 5.0.x of MiniGUI maintained by WEI Yongming.
|
|
||||||
|
|
||||||
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial
|
|
||||||
use.
|
|
||||||
|
|
||||||
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform
|
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform
|
||||||
windowing and GUI support system, which is especially fit for
|
windowing and GUI support system, which is especially fit for
|
||||||
embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other
|
embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other
|
||||||
traditional RTOSes, such as RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX,
|
traditional RTOSes, such as RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX,
|
||||||
Nucleus, pSOS, uC/OS-II, and OSE.
|
Nucleus, pSOS, uC/OS-II, OSE, and others.
|
||||||
|
|
||||||
This is the source tree of MiniGUI Core, which provides windowing
|
This is the source tree of MiniGUI Core, which provides the windowing
|
||||||
and graphics interfaces as well as a lot of standard controls (toolkit).
|
and graphics interfaces as well as a lot of standard controls (toolkit).
|
||||||
|
|
||||||
Besides MiniGUI Core, FMSoft also provides some components
|
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial
|
||||||
for the developers to develop app much easier:
|
use. In December 1998, the initiator of FMSoft, Wei Yongming, began to develop
|
||||||
|
MiniGUI under the GNU General Public License (GPL). In September 2002, the core
|
||||||
|
developers of MiniGUI founded [FMSoft](https://www.fmsoft.cn) and started the
|
||||||
|
commercial marketing with the free software. By now, FMSoft still continues to
|
||||||
|
release MiniGUI as a free software project.
|
||||||
|
|
||||||
* mGUtils: A MiniGUI component which contains miscellaneous utilities
|
For the live demos, source tarballs, and cases of MiniGUI, you can refer
|
||||||
like `ColorSelectionDialogBox`, `FileOpenDialogBox`, and so on.
|
to the following website:
|
||||||
* mGPlus: A MiniGUI component which provides support for advanced graphics
|
|
||||||
functions like path, gradient, anti-aliased stretch, and color combination.
|
|
||||||
* mGEff: mGEff provides an animation framework for MiniGUI app.
|
|
||||||
It also provides some popular UI/UE special effects.
|
|
||||||
* mGNCS: This component provides a new control set for MiniGUI app.
|
|
||||||
* mGNCS4Touch: This component provides some new controls, which are
|
|
||||||
compliant to the new control API spec of mGNCS, for devices with
|
|
||||||
touch screens.
|
|
||||||
|
|
||||||
There are also some legacy MiniGUI components. But we will not maintain these
|
|
||||||
components since MiniGUI v3.2.0:
|
|
||||||
|
|
||||||
* mGi: An input method component for MiniGUI. This component provides
|
|
||||||
some typical input methods (such as soft keyboard, hand-writing, and predict
|
|
||||||
text input for mobile phone) for MiniGUI apps.
|
|
||||||
* mGp: A printing component for MiniGUI. By using mGp, you can print
|
|
||||||
out the graphics created by MiniGUI app to general-purpose printers.
|
|
||||||
* mG3d: A simple three-dimension component for MiniGUI. This component
|
|
||||||
provides a simple 3D API for app. You can use mG3d to create simple
|
|
||||||
3D UI.
|
|
||||||
|
|
||||||
MiniGUI is a free software project. In December 1998, the initiator of
|
|
||||||
FMSoft, Wei Yongming, began to develop MiniGUI under the GNU General Public
|
|
||||||
License (GPL). In September 2002, the core developers of
|
|
||||||
MiniGUI founded FMSoft and started the commercial marketing with
|
|
||||||
the free software. By now, FMSoft still continues to release MiniGUI
|
|
||||||
as a free software project.
|
|
||||||
|
|
||||||
You can download the source code tarball of MiniGUI and the dependent libraries
|
|
||||||
from the download zone of the site:
|
|
||||||
|
|
||||||
<http://www.minigui.com>
|
<http://www.minigui.com>
|
||||||
|
|
||||||
FMSoft also releases some open source apps for MiniGUI on the site above,
|
### App Frameworks on MiniGUI
|
||||||
for examples:
|
|
||||||
|
|
||||||
* mDolphin, licensed under Apache 2.0, is a full-featured
|
MiniGUI and its components provides a lot of controls/widgets to
|
||||||
WEB/WAP browser, which is developed based on the open source browser
|
help your develop GUI apps in C/C++ programming language. However,
|
||||||
core WebKit and uses MiniGUI as its underlying graphics support system.
|
alternatively, you can choose one of the following frameworks to
|
||||||
* mGallery, licensed under Apache 2.0, intends to
|
develop your apps in a easy-to-use programming language other than C/C++.
|
||||||
provide a total solution for PMP (Portable Multimedia Player),
|
|
||||||
which uses MiniGUI as the graphics platform.
|
* [HybridOS](https://gitlab.fmsoft.cn/HybridOS/hybridos) provides
|
||||||
* mSpider, licensed under GPL 3.0, intends to provide a
|
a complete software stack to develop an app which have rich functions
|
||||||
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
|
and excellent expressive in HTML5, CSS3, and JavaScript.
|
||||||
* mEagle, licensed under GPL 3.0, is an embedded GIS development platform
|
* [hiACEJS](https://gitlab.fmsoft.cn/HybridOS/hiACEJS) provides
|
||||||
which addresses the needs of map browse, query, analysis, etc
|
a light-weight app framework in JavaScript.
|
||||||
|
|
||||||
|
You can also choose [HybridOS Lite](https://gitlab.fmsoft.cn/HybridOS/hybridos-lite)
|
||||||
|
to develop apps with excellent expressive for cost-sensitive devices in C/C++ language.
|
||||||
|
|
||||||
|
### MiniGUI and HybridOS
|
||||||
|
|
||||||
|
[HybridOS](https://gitlab.fmsoft.cn/HybridOS/hybridos) is another large open source project
|
||||||
|
initiated by FMSoft. It is a totally new open source operating system designed for
|
||||||
|
embedded and smart IoT devices and cloud computing environment.
|
||||||
|
|
||||||
|
In practice, MiniGUI and the software which are used to integrated with GPU
|
||||||
|
constitute the graphics stack of HybridOS.
|
||||||
|
|
||||||
|
HybridOS uses MiniGUI as the underlying windowing system, and the members of
|
||||||
|
HybridOS project are now maintaining the whole graphics stack.
|
||||||
|
The following chart shows the graphics stack of HybridOS:
|
||||||
|
|
||||||
|
```
|
||||||
|
-----------------------------------------------
|
||||||
|
| MiniGUI/HybridOS Apps |
|
||||||
|
|-----------------------------------------------|
|
||||||
|
| | (Graphics Stack) |
|
||||||
|
| | ---------------------|
|
||||||
|
| | | hiMesa |
|
||||||
|
| | hiCairo | ------------------|
|
||||||
|
| | MiniGUI | | EGL for MiniGUI |
|
||||||
|
| C++ libs | hiDRMDrivers | | GL, GLES, VG |
|
||||||
|
| C libs | libDRM | | GPU drivers |
|
||||||
|
|-----------------------------------------------|
|
||||||
|
| Linux Kernel |
|
||||||
|
| -----------------------------------|
|
||||||
|
| | DRI and DRI Drivers |
|
||||||
|
-----------------------------------------------
|
||||||
|
```
|
||||||
|
|
||||||
|
As shown in the chart above, the HybridOS graphics stack consists of
|
||||||
|
the following software:
|
||||||
|
|
||||||
|
- `libDRM` provides some user land APIs for Linux Direct Rendering Infrastructure.
|
||||||
|
- `hiDRMDrivers` contains the drivers (user land drivers, not kernel drivers) for
|
||||||
|
MiniGUI DRM engine. The drivers implement the basic hardware accelerated
|
||||||
|
2D graphics operations of various GPUs for MiniGUI.
|
||||||
|
- `hiMesa` is the Mesa derivative for HybridOS, while Mesa is the open source
|
||||||
|
implementation of OpenGL and other graphics APIs, including OpenGL ES
|
||||||
|
(versions 1, 2, 3), OpenCL, OpenMAX, and Vulkan. It contains the following
|
||||||
|
components:
|
||||||
|
+ The implementation of OpenGL, OpenGL ES (v1, 2, 3), and other
|
||||||
|
graphics APIs.
|
||||||
|
+ The EGL implementation for MiniGUI platform.
|
||||||
|
+ The graphics drivers for various GPUs and a software driver called `swrast`.
|
||||||
|
- `hiCairo` is the Cairo derivative for HybridOS. Cairo is a 2D vector graphics
|
||||||
|
library for Gtk. We provide support for MiniGUI backend in `hiCairo`.
|
||||||
|
|
||||||
|
For more information about HybridOS, please refer to:
|
||||||
|
|
||||||
|
<https://hybridos.fmsoft.cn/>
|
||||||
|
|
||||||
|
### Source Code Repositories
|
||||||
|
|
||||||
FMSoft had created the public repositories for MiniGUI Core, MiniGUI
|
FMSoft had created the public repositories for MiniGUI Core, MiniGUI
|
||||||
components, and other open source apps on GitHub. You can visit them on:
|
components, HybridOS, and other open source apps on GitHub. You can visit
|
||||||
|
them on:
|
||||||
|
|
||||||
<https://github.com/VincentWei>
|
<https://gitlab.fmsoft.cn/VincentWei>
|
||||||
|
|
||||||
and
|
|
||||||
|
|
||||||
<https://github.com/FMSoftCN>
|
|
||||||
|
|
||||||
We now maintain all documents about MiniGUI on the following public repo:
|
We now maintain all documents about MiniGUI on the following public repo:
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui-docs>
|
<https://gitlab.fmsoft.cn/VincentWei/minigui-docs>
|
||||||
|
|
||||||
## A BRIEF BUILDING INSTRUCTION
|
You can download the source code tarballs of MiniGUI Core, MiniGUI
|
||||||
|
components, and the dependent libraries from the download zone of the site:
|
||||||
This instruction assumes that you are using Ubuntu Linux.
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
|
|
||||||
You should run `apt install <package_name>` to install the following packages
|
|
||||||
on your Ubuntu Linux.
|
|
||||||
|
|
||||||
* Building tools:
|
|
||||||
* autoconf
|
|
||||||
* Dependent libraries (all are optional):
|
|
||||||
* libjpeg64-dev
|
|
||||||
* libpng12-dev (use libpng-dev on Ubuntu Linux 18.04 LTS)
|
|
||||||
* libfreetype6-dev
|
|
||||||
|
|
||||||
### Building MiniGUI Core
|
|
||||||
|
|
||||||
MiniGUI Core uses GNU autoconf/automake scripts to configure and build the project.
|
|
||||||
|
|
||||||
Run
|
|
||||||
|
|
||||||
$ ./configure; make; sudo make install
|
|
||||||
|
|
||||||
to configure, make, and install the headers and the libraries. If there is not
|
|
||||||
`configure` file, please run
|
|
||||||
|
|
||||||
$ ./autogen.sh
|
|
||||||
|
|
||||||
to generate the script.
|
|
||||||
|
|
||||||
MiniGUI Core also provides some configuration options to customize the features.
|
|
||||||
For more information, please run
|
|
||||||
|
|
||||||
$ ./configure --help
|
|
||||||
|
|
||||||
### Building whole MiniGUI
|
|
||||||
|
|
||||||
If you are anxious to see the comprehensive demo of MiniGUI Core
|
|
||||||
and MiniGUI components, please fetch one of the following repositories
|
|
||||||
from GitHub and follow the instructions to build MiniGUI Core,
|
|
||||||
MiniGUI components, the samples, and the demonstration programs:
|
|
||||||
|
|
||||||
<https://github.com/VincentWei/build-minigui-5.0>
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
<https://github.com/VincentWei/build-minigui-4.0>
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
<https://github.com/VincentWei/build-minigui-3.2>
|
|
||||||
|
|
||||||
### Unit Tests
|
|
||||||
|
|
||||||
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
|
|
||||||
following repository:
|
|
||||||
|
|
||||||
<https://github.com/VincentWei/mg-tests>
|
|
||||||
|
|
||||||
If you are interested in hacking the MiniGUI code, please visit this repository.
|
|
||||||
|
|
||||||
|
<http://www.minigui.com/download>
|
||||||
|
|
||||||
## NEW FEATURES IN VERSION 5.0.x
|
## NEW FEATURES IN VERSION 5.0.x
|
||||||
|
|
||||||
In version 5.0.0, we introduced some new and exciting features, and refactored
|
In version 5.0.0, we introduced some exciting new features, and refactored
|
||||||
a lot basic modules of MiniGUI Core.
|
a lot basic modules of MiniGUI Core.
|
||||||
|
|
||||||
### Compositing schema
|
### Compositing Schema
|
||||||
|
|
||||||
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
||||||
the compositing schema. Under compositing schema, regardless a main window
|
the compositing schema. Under compositing schema, regardless a main window
|
||||||
@@ -199,7 +171,7 @@ implementation for multi-process environment:
|
|||||||
- Better security. One client created by different user cannot
|
- Better security. One client created by different user cannot
|
||||||
read/write contents in/to another windows owned by other clients.
|
read/write contents in/to another windows owned by other clients.
|
||||||
|
|
||||||
### New main window types
|
### New Main Window Types
|
||||||
|
|
||||||
In this version, we also enhanced the window manager of MiniGUI Core
|
In this version, we also enhanced the window manager of MiniGUI Core
|
||||||
to support some special main window types.
|
to support some special main window types.
|
||||||
@@ -225,7 +197,7 @@ There are eight levels in MiniGUI from top to bottom:
|
|||||||
This enhancement allows us to create a special app which acts as
|
This enhancement allows us to create a special app which acts as
|
||||||
screen lock, docker, or launcher.
|
screen lock, docker, or launcher.
|
||||||
|
|
||||||
### Virtual window
|
### Virtual Window
|
||||||
|
|
||||||
You know that we can post or send a message to other windows which
|
You know that we can post or send a message to other windows which
|
||||||
may run in another thread under MiniGUI-Threads. The MiniGUI
|
may run in another thread under MiniGUI-Threads. The MiniGUI
|
||||||
@@ -256,7 +228,7 @@ and the new thread.
|
|||||||
This enhancement provides a very useful facility to you in order to
|
This enhancement provides a very useful facility to you in order to
|
||||||
develop a well-designed multithreaded application.
|
develop a well-designed multithreaded application.
|
||||||
|
|
||||||
### Other enhancements
|
### Other Enhancements
|
||||||
|
|
||||||
We also tune or enhance the following modules of MiniGUI Core:
|
We also tune or enhance the following modules of MiniGUI Core:
|
||||||
|
|
||||||
@@ -289,7 +261,7 @@ so that the old applications can smoothly migrate to the new
|
|||||||
version. However, there are still some slight changes you need to take care.
|
version. However, there are still some slight changes you need to take care.
|
||||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui/blob/master/RELEASE-NOTES.md>
|
<https://gitlab.fmsoft.cn/VincentWei/minigui/blob/rel-5-0/RELEASE-NOTES.md>
|
||||||
|
|
||||||
## NEW FEATURES IN VERSION 4.0.x
|
## NEW FEATURES IN VERSION 4.0.x
|
||||||
|
|
||||||
@@ -320,7 +292,7 @@ in order to support [HybridOS Foundation Class Library].
|
|||||||
|
|
||||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui/blob/tree/rel-4-0/RELEASE-NOTES.md>
|
<https://gitlab.fmsoft.cn/VincentWei/minigui/blob/rel-4-0/RELEASE-NOTES.md>
|
||||||
|
|
||||||
Because of the changes of some APIs, we recommended strongly that you
|
Because of the changes of some APIs, we recommended strongly that you
|
||||||
use this version for new projects.
|
use this version for new projects.
|
||||||
@@ -335,7 +307,7 @@ We introduce some new features in MiniGUI Version 3.2.x:
|
|||||||
|
|
||||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui/blob/rel-3-2/RELEASE-NOTES.md>
|
<https://gitlab.fmsoft.cn/VincentWei/minigui/blob/rel-3-2/RELEASE-NOTES.md>
|
||||||
|
|
||||||
## THE RUNTIME MODES OF MINIGUI
|
## THE RUNTIME MODES OF MINIGUI
|
||||||
|
|
||||||
@@ -380,6 +352,115 @@ If a client exits or dies for some reasons, it will not damage other
|
|||||||
clients and the server.
|
clients and the server.
|
||||||
|
|
||||||
|
|
||||||
|
## A BRIEF BUILDING INSTRUCTION
|
||||||
|
|
||||||
|
### Building Whole MiniGUI
|
||||||
|
|
||||||
|
If you are anxious to see the comprehensive demo of MiniGUI Core
|
||||||
|
and MiniGUI components, please fetch one of the following repositories
|
||||||
|
from GitHub and follow the instructions to build MiniGUI Core,
|
||||||
|
MiniGUI components, the samples, and the demonstration programs:
|
||||||
|
|
||||||
|
[Build MiniGUI 5.0](https://gitlab.fmsoft.cn/VincentWei/build-minigui-5.0)
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
[Build MiniGUI 4.0](https://gitlab.fmsoft.cn/VincentWei/build-minigui-4.0)
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
[Build MiniGUI 3.2](https://gitlab.fmsoft.cn/VincentWei/build-minigui-3.2)
|
||||||
|
|
||||||
|
|
||||||
|
### Building MiniGUI Core
|
||||||
|
|
||||||
|
We recommend that you use a latest Linux distribution with long term support,
|
||||||
|
for example, Ubuntu Linux LTS 16.04 or 18.04.
|
||||||
|
|
||||||
|
On Ubuntu Linux LTS 16.04 or 18.04, you should run `apt install <package_name>`
|
||||||
|
to install the following packages:
|
||||||
|
|
||||||
|
* Building tools:
|
||||||
|
* autoconf
|
||||||
|
* Dependent libraries (all are optional):
|
||||||
|
* libjpeg64-dev
|
||||||
|
* libpng12-dev (use libpng-dev on Ubuntu Linux 18.04 LTS)
|
||||||
|
* libfreetype6-dev
|
||||||
|
|
||||||
|
MiniGUI Core uses GNU autoconf/automake scripts to configure and build the project.
|
||||||
|
|
||||||
|
Run
|
||||||
|
|
||||||
|
$ ./configure; make; sudo make install
|
||||||
|
|
||||||
|
to configure, make, and install the headers and the libraries. If there is not
|
||||||
|
`configure` file, please run
|
||||||
|
|
||||||
|
$ ./autogen.sh
|
||||||
|
|
||||||
|
to generate the script.
|
||||||
|
|
||||||
|
MiniGUI Core also provides some configuration options to customize the features.
|
||||||
|
For more information, please run
|
||||||
|
|
||||||
|
$ ./configure --help
|
||||||
|
|
||||||
|
### Unit Tests
|
||||||
|
|
||||||
|
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
|
||||||
|
following repository:
|
||||||
|
|
||||||
|
<https://gitlab.fmsoft.cn/VincentWei/mg-tests>
|
||||||
|
|
||||||
|
If you are interested in hacking the MiniGUI code, please visit this repository.
|
||||||
|
|
||||||
|
|
||||||
|
## Othere Resources
|
||||||
|
|
||||||
|
### MiniGUI Components
|
||||||
|
|
||||||
|
Besides MiniGUI Core, FMSoft also provides some components
|
||||||
|
for the developers to develop app much easier:
|
||||||
|
|
||||||
|
* mGUtils: A MiniGUI component which contains miscellaneous utilities
|
||||||
|
like `ColorSelectionDialogBox`, `FileOpenDialogBox`, and so on.
|
||||||
|
* mGPlus: A MiniGUI component which provides support for advanced graphics
|
||||||
|
functions like path, gradient, anti-aliased stretch, and color combination.
|
||||||
|
* mGEff: mGEff provides an animation framework for MiniGUI app.
|
||||||
|
It also provides some popular UI/UE special effects.
|
||||||
|
* mGNCS: This component provides a new control set for MiniGUI app.
|
||||||
|
* mGNCS4Touch: This component provides some new controls, which are
|
||||||
|
compliant to the new control API spec of mGNCS, for devices with
|
||||||
|
touch screens.
|
||||||
|
|
||||||
|
There are also some legacy MiniGUI components. But we will not maintain these
|
||||||
|
components since MiniGUI v3.2.0:
|
||||||
|
|
||||||
|
* mGi: An input method component for MiniGUI. This component provides
|
||||||
|
some typical input methods (such as soft keyboard, hand-writing, and predict
|
||||||
|
text input for mobile phone) for MiniGUI apps.
|
||||||
|
* mGp: A printing component for MiniGUI. By using mGp, you can print
|
||||||
|
out the graphics created by MiniGUI app to general-purpose printers.
|
||||||
|
* mG3d: A simple three-dimension component for MiniGUI. This component
|
||||||
|
provides a simple 3D API for app. You can use mG3d to create simple
|
||||||
|
3D UI.
|
||||||
|
|
||||||
|
### Open Source Apps Based-on MiniGUI
|
||||||
|
|
||||||
|
FMSoft also releases some open source apps for MiniGUI on the site above,
|
||||||
|
for examples:
|
||||||
|
|
||||||
|
* `mDolphin`, licensed under Apache 2.0, is a full-featured
|
||||||
|
WEB/WAP browser, which is developed based on the open source browser
|
||||||
|
core WebKit and uses MiniGUI as its underlying graphics support system.
|
||||||
|
* `mGallery`, licensed under Apache 2.0, intends to
|
||||||
|
provide a total solution for PMP (Portable Multimedia Player),
|
||||||
|
which uses MiniGUI as the graphics platform.
|
||||||
|
* `mSpider`, licensed under GPL 3.0, intends to provide a
|
||||||
|
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
|
||||||
|
* `mEagle`, licensed under GPL 3.0, is an embedded GIS development platform
|
||||||
|
which addresses the needs of map browse, query, analysis, etc
|
||||||
|
|
||||||
## HISTORY
|
## HISTORY
|
||||||
|
|
||||||
21 years have pasted since MiniGUI was initially created at
|
21 years have pasted since MiniGUI was initially created at
|
||||||
@@ -483,7 +564,9 @@ A brief history description of the development progress is listed as follow:
|
|||||||
1. Feb., 2018: FMSoft released MiniGUI version 3.2.0.
|
1. Feb., 2018: FMSoft released MiniGUI version 3.2.0.
|
||||||
1. Apr., 2019: FMSoft released MiniGUI version 3.2.2.
|
1. Apr., 2019: FMSoft released MiniGUI version 3.2.2.
|
||||||
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
|
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
|
||||||
1. Apr., 2020: FMSoft released MiniGUI version 5.0.0.
|
1. Mar., 2020: FMSoft released MiniGUI version 5.0.0.
|
||||||
|
1. May., 2021: FMSoft released MiniGUI version 5.0.6.
|
||||||
|
1. Jan., 2022: FMSoft released MiniGUI version 5.0.9.
|
||||||
|
|
||||||
## AUTHORS AND COPYING
|
## AUTHORS AND COPYING
|
||||||
|
|
||||||
@@ -491,7 +574,7 @@ The original author of MiniGUI is WEI Yongming, and now MiniGUI is
|
|||||||
maintained by FMSoft. For more information, please refer to
|
maintained by FMSoft. For more information, please refer to
|
||||||
<http://www.fmsoft.cn>.
|
<http://www.fmsoft.cn>.
|
||||||
|
|
||||||
Copyright (C) 2002 ~ 2020, 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
|
||||||
|
|||||||
+179
-46
@@ -1,9 +1,21 @@
|
|||||||
# Release Notes
|
# Release Notes
|
||||||
|
|
||||||
- [Version 4.9.1](#version-491)
|
- [Version 5.0.9](#version-508)
|
||||||
+ [What's new in this version](#whats-new-in-this-version)
|
+ [What's new in version 5.0.9](#whats-new-in-version-508)
|
||||||
- [Version 4.9.0](#version-490)
|
- [Version 5.0.8](#version-508)
|
||||||
+ [What's new in this version](#whats-new-in-this-version)
|
+ [What's new in version 5.0.8](#whats-new-in-version-508)
|
||||||
|
- [Version 5.0.6](#version-506)
|
||||||
|
+ [What's new in version 5.0.6](#whats-new-in-version-506)
|
||||||
|
- [Version 5.0.5](#version-505)
|
||||||
|
+ [What's new in version 5.0.5](#whats-new-in-version-505)
|
||||||
|
- [Version 5.0.4](#version-504)
|
||||||
|
+ [What's new in version 5.0.4](#whats-new-in-version-504)
|
||||||
|
- [Version 5.0.3](#version-503)
|
||||||
|
+ [What's new in version 5.0.3](#whats-new-in-version-503)
|
||||||
|
- [Version 5.0.2](#version-502)
|
||||||
|
+ [What's new in version 5.0.2](#whats-new-in-version-502)
|
||||||
|
- [Version 5.0.0](#version-500)
|
||||||
|
+ [What's new in version 5.0.0](#whats-new-in-version-500)
|
||||||
+ [Compositing schema](#compositing-schema)
|
+ [Compositing schema](#compositing-schema)
|
||||||
+ [New main window styles](#new-main-window-styles)
|
+ [New main window styles](#new-main-window-styles)
|
||||||
+ [Virtual window](#virtual-window)
|
+ [Virtual window](#virtual-window)
|
||||||
@@ -12,46 +24,167 @@
|
|||||||
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
||||||
+ [Deprecated APIs](#deprecated-apis)
|
+ [Deprecated APIs](#deprecated-apis)
|
||||||
|
|
||||||
## Version 4.9.1
|
## Version 5.0.9
|
||||||
|
|
||||||
The MiniGUI development team announces the availability of MiniGUI 4.9.1,
|
On Jan. 14 2022, FMSoft announces the availability of MiniGUI 5.0.9,
|
||||||
which is the second preview release of MiniGUI 5.0.0.
|
which is a bug fixing release with minor enhancements of MiniGUI 5.0.x.
|
||||||
|
|
||||||
This is an unstable release to show you some new and exciting features.
|
### What's new in version 5.0.9
|
||||||
Here `unstable` means that the new APIs we introduced in this version
|
|
||||||
may change in the official release.
|
|
||||||
|
|
||||||
Nevertheless, we did our best to ensure backward compatibility of the
|
In this version, we fixed some bugs:
|
||||||
existed APIs so that the old applications can smoothly migrate to the new
|
|
||||||
version. We recommend that you test this version and report any bugs and
|
* BUGFIXING:
|
||||||
|
- Fix a crash bug in `InitSubDC()` of `src/newgdi/gdi.c`.
|
||||||
|
* ENHANCEMENTS:
|
||||||
|
* OPTIMIZATIONS:
|
||||||
|
* TUNING:
|
||||||
|
- Change copyright year to 2022.
|
||||||
|
|
||||||
|
## Version 5.0.8
|
||||||
|
|
||||||
|
The MiniGUI development team announces the availability of MiniGUI 5.0.8,
|
||||||
|
which is a bug fixing release with minor enhancements of MiniGUI 5.0.x.
|
||||||
|
|
||||||
|
### What's new in version 5.0.8
|
||||||
|
|
||||||
|
In this version, we fixed some bugs and made some optimizations and enhancements:
|
||||||
|
|
||||||
|
* BUGFIXING:
|
||||||
|
* ENHANCEMENTS:
|
||||||
|
- Support for WebP image format based on `libwebp`.
|
||||||
|
- Support for two ARM64-based hardware platforms: PX30 and R818.
|
||||||
|
- New surface pixel format for main window: `ST_PIXEL_XRGB565` under compositing schema.
|
||||||
|
* OPTIMIZATIONS:
|
||||||
|
- Shrink heap size for fixed string.
|
||||||
|
- Optimize the memory use of blitting context.
|
||||||
|
* TUNING:
|
||||||
|
- Tune code of fbcon video engine for compositing schema.
|
||||||
|
- Fix warnings and errors for conditional compilation.
|
||||||
|
|
||||||
|
## Version 5.0.6
|
||||||
|
|
||||||
|
The MiniGUI development team announces the availability of MiniGUI 5.0.6,
|
||||||
|
which is the bug fixing release of MiniGUI 5.0.x.
|
||||||
|
|
||||||
|
### What's new in version 5.0.6
|
||||||
|
|
||||||
|
In this version, we fixed some bugs and made some optimizations and enhancements:
|
||||||
|
|
||||||
|
* BUGFIXING:
|
||||||
|
- Fix bugs of switching layers under MiniGUI-Processes.
|
||||||
|
- Fix bugs of `FBCon` and `PC_XVFB` engines: the dirty rectangles are
|
||||||
|
not set empty after calling `SyncUpdate`.
|
||||||
|
- Fix memory leaks when using block heap.
|
||||||
|
- Fix a bug in ServerGetWinZNodeRegion.
|
||||||
|
* ENHANCEMENTS:
|
||||||
|
- Enhance `GetGlyphInfo` to return the FreeType face, font file path, and glyph
|
||||||
|
index.
|
||||||
|
- NEW API `StretchBltEx` to support different scaling filters and rotation.
|
||||||
|
- Use Pixman to support color blending methods for `BitBlt` and `StretchBlt`.
|
||||||
|
- Enhance fallback compositor to support animation when switching among layers.
|
||||||
|
- New API `SetMainWindowGestureFlags` and `MSG_GESTURETEST` message for
|
||||||
|
gesture test and setting the gesture flags of a specific main window.
|
||||||
|
- Tune implementation of Tooltip window.
|
||||||
|
* OPTIMIZATIONS:
|
||||||
|
- Optimize the fallback compositor for lucent windows.
|
||||||
|
- Use Pixman to optimize `FillBox`, `BitBlt`, and `StretchBlt`.
|
||||||
|
- Optimize the management of BLOCKHEAP.
|
||||||
|
- Optimize the `__mg_lookfor_unused_slot`.
|
||||||
|
|
||||||
|
Note that the binary backward-compatibility was broken, two operations added to
|
||||||
|
`CompositorOps`. You should rebuild all MiniGUI applications.
|
||||||
|
|
||||||
|
Also note that the compositing schema is now enabled by default.
|
||||||
|
|
||||||
|
## Version 5.0.5
|
||||||
|
|
||||||
|
The MiniGUI development team announces the availability of MiniGUI 5.0.5,
|
||||||
|
which is the bug fixing release of MiniGUI 5.0.x.
|
||||||
|
|
||||||
|
### What's new in version 5.0.5
|
||||||
|
|
||||||
|
In this version, we fixed some bugs and made some minor enhancements:
|
||||||
|
|
||||||
|
* BUGFIXING:
|
||||||
|
- Adjust the constants for `WS_XXXX` macros to avoid duplicated values.
|
||||||
|
|
||||||
|
Note that the binary backward-compatibility was broken. You should
|
||||||
|
rebuild all MiniGUI applications.
|
||||||
|
|
||||||
|
## Version 5.0.4
|
||||||
|
|
||||||
|
The MiniGUI development team announces the availability of MiniGUI 5.0.4,
|
||||||
|
which is the bug fixing release of MiniGUI 5.0.x.
|
||||||
|
|
||||||
|
### What's new in version 5.0.4
|
||||||
|
|
||||||
|
In this version, we fixed some bugs and made some minor enhancements:
|
||||||
|
|
||||||
|
* BUGFIXING:
|
||||||
|
- Fix bugs in ServerGetWinZNodeRegion: must check for possible empty mask rect
|
||||||
|
and bad assignment of maskrect
|
||||||
|
- Fix a potential bug: only increase `nr_mask_rects` for not empty mask rectangle.
|
||||||
|
- Fix a bug: update surface of controls surface in `travel_children_with_priv_cdc`.
|
||||||
|
* ENHANCEMENTS:
|
||||||
|
- New IAL engine: `--enable-singletouchkeyial` to build the IAL engine for
|
||||||
|
single touch screen and key buttons.
|
||||||
|
|
||||||
|
## Version 5.0.3
|
||||||
|
|
||||||
|
The MiniGUI development team announces the availability of MiniGUI 5.0.3,
|
||||||
|
which is the bug fixing release of MiniGUI 5.0.x.
|
||||||
|
|
||||||
|
### What's new in version 5.0.3
|
||||||
|
|
||||||
|
In this version, we fixed some bugs and made some minor enhancements:
|
||||||
|
|
||||||
|
* BUGFIXING:
|
||||||
|
- Always check expired timers even got `EINTR`.
|
||||||
|
- Add static modifier to `refresh_dirty_region` method of the fallback compositor.
|
||||||
|
- Fix a bug in `RegisterListenFD`.
|
||||||
|
- Fix a bug in `allocate_more_fd_slots`.
|
||||||
|
* TUNING:
|
||||||
|
- Rebuild the private data for all visible z-nodes after selected a new compositor.
|
||||||
|
* ENHANCEMENTS:
|
||||||
|
- New configuration option: `--enable-mgslicefallback` to build a fallback
|
||||||
|
implementation of mgslice.
|
||||||
|
- New API: `ServerGetTopmostZNodeOfType`.
|
||||||
|
- Merge some code by @ehello (<https://github.com/ehello>) for FreeRTOS.
|
||||||
|
|
||||||
|
## Version 5.0.2
|
||||||
|
|
||||||
|
The MiniGUI development team announces the availability of MiniGUI 5.0.2,
|
||||||
|
which is the bug fixing release of MiniGUI 5.0.x.
|
||||||
|
|
||||||
|
### What's new in version 5.0.2
|
||||||
|
|
||||||
|
In this version, we tuned some code for GCC 9 and fixed some bugs:
|
||||||
|
|
||||||
|
* BUGFIXING:
|
||||||
|
- Initialize `cfg_res_path` in function `__sysres_get_system_res_path()`.
|
||||||
|
- Always return TRUE in `subtract_rgn_by_node()`.
|
||||||
|
* ADJUSTMENTS:
|
||||||
|
- Use upstream Harfbuzz for glyph shaping of complex scripts instead
|
||||||
|
of the modified version.
|
||||||
|
* TUNING:
|
||||||
|
- Tune some code to depress compilation warnings.
|
||||||
|
|
||||||
|
## Version 5.0.0
|
||||||
|
|
||||||
|
The MiniGUI development team announces the availability of MiniGUI 5.0.0,
|
||||||
|
which is the first official release of MiniGUI 5.0.x.
|
||||||
|
|
||||||
|
This version brings us some new and exciting features, and we did our best
|
||||||
|
to ensure backward compatibility of the existed APIs so that the old
|
||||||
|
applications can smoothly migrate to the new version.
|
||||||
|
We recommend that you use this version and report any bugs and
|
||||||
incompatibilities in
|
incompatibilities in
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui/tree/dev-4-1>
|
<https://github.com/VincentWei/minigui/tree/rel-5-0>
|
||||||
|
|
||||||
### What's new in this version
|
### What's new in version 5.0.0
|
||||||
|
|
||||||
- Tune the `fbcon` (Linux Frame Buffer) engine to support compositing schema.
|
In the development of version 5.0.x, we introduced the following new and
|
||||||
- Fix some bugs.
|
|
||||||
|
|
||||||
## Version 4.9.0
|
|
||||||
|
|
||||||
The MiniGUI development team announces the availability of MiniGUI 4.9.0,
|
|
||||||
which is the first preview release of MiniGUI 5.0.0.
|
|
||||||
|
|
||||||
This is an unstable release to show you some new and exciting features.
|
|
||||||
Here `unstable` means that the new APIs we introduced in this version
|
|
||||||
may change in the official release.
|
|
||||||
|
|
||||||
Nevertheless, we did our best to ensure backward compatibility of the
|
|
||||||
existed APIs so that the old applications can smoothly migrate to the new
|
|
||||||
version. We recommend that you test this version and report any bugs and
|
|
||||||
incompatibilities in
|
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui/tree/dev-4-1>
|
|
||||||
|
|
||||||
### What's new in this version
|
|
||||||
|
|
||||||
In the development of version 4.9.x, we introduced the following new and
|
|
||||||
exciting features for MiniGUI:
|
exciting features for MiniGUI:
|
||||||
|
|
||||||
* ENHANCEMENTS:
|
* ENHANCEMENTS:
|
||||||
@@ -89,6 +222,15 @@ exciting features for MiniGUI:
|
|||||||
* ADJUSTMENTS:
|
* ADJUSTMENTS:
|
||||||
- `g_rcScr` now is defined a macro calling function `GetScreenRect()`.
|
- `g_rcScr` now is defined a macro calling function `GetScreenRect()`.
|
||||||
- `mgIsServer` now is define a macro calling function `IsServer()`.
|
- `mgIsServer` now is define a macro calling function `IsServer()`.
|
||||||
|
* TUNING
|
||||||
|
- Tune the `drm` (DRM) engine to support MiniGUI-Processes runtime mode
|
||||||
|
and compositing schema.
|
||||||
|
- Tune the `fbcon` (Linux Frame Buffer) engine to support compositing schema.
|
||||||
|
- Tune the `commlcd` (common LCD) engine to support cumulative updating and
|
||||||
|
compositing schema.
|
||||||
|
- Tune the `dummy` GAL engine to support MiniGUI-Processes runtime mode.
|
||||||
|
compositing schema.
|
||||||
|
- Fix some bugs.
|
||||||
* CLEANUP:
|
* CLEANUP:
|
||||||
- Cleaned up a lot of internal symbols (the external functions and
|
- Cleaned up a lot of internal symbols (the external functions and
|
||||||
global variables) in order to avoid name polution.
|
global variables) in order to avoid name polution.
|
||||||
@@ -96,15 +238,6 @@ exciting features for MiniGUI:
|
|||||||
message queue, event/message handling, and part of graphics abstract
|
message queue, event/message handling, and part of graphics abstract
|
||||||
layer.
|
layer.
|
||||||
|
|
||||||
The following new features will be developed in the successive versions of
|
|
||||||
4.9.x:
|
|
||||||
|
|
||||||
- Enhance DRM engine to support MiniGUI-Processes runtime mode and the
|
|
||||||
compositing schema.
|
|
||||||
- Enhance other frequently used GAL engines to support compositing schema.
|
|
||||||
- Provide a customized compositor which provides window animation effects as
|
|
||||||
an example in `mg-demos`.
|
|
||||||
|
|
||||||
### Compositing schema
|
### Compositing schema
|
||||||
|
|
||||||
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
||||||
|
|||||||
+4
-4
@@ -1,11 +1,11 @@
|
|||||||
Version 4.9.1 (2019/03/11)
|
Version 5.0.9 (2022/01/14)
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
+182
-168
File diff suppressed because it is too large
Load Diff
+20
-1
@@ -72,9 +72,28 @@ 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 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=libhidrmdrivers-0.2.so.0
|
||||||
|
#}}
|
||||||
|
|
||||||
|
#{{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
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
+162
-86
@@ -92,64 +92,73 @@ struct _DrmDriver;
|
|||||||
typedef struct _DrmDriver DrmDriver;
|
typedef struct _DrmDriver DrmDriver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The struct type represents the bufffer can be used by
|
* The structure type represents the buffer can be used by
|
||||||
* MiniGUI NEWGAL engine for hardware surface.
|
* MiniGUI NEWGAL DRM engine for a hardware surface.
|
||||||
*/
|
*/
|
||||||
typedef struct _DrmSurfaceBuffer {
|
typedef struct _DrmSurfaceBuffer {
|
||||||
/** The prime fd of the buffer */
|
|
||||||
int prime_fd;
|
|
||||||
/** The global name of the buffer */
|
|
||||||
uint32_t name;
|
|
||||||
/** The local handle of the buffer */
|
/** The local handle of the buffer */
|
||||||
uint32_t handle;
|
uint32_t handle;
|
||||||
/** The buffer identifier */
|
|
||||||
uint32_t id;
|
|
||||||
/** The widht of the buffer */
|
|
||||||
uint32_t width;
|
|
||||||
/** The height of the buffer */
|
|
||||||
uint32_t height;
|
|
||||||
/** The pitch (row stride in bytes) of the buffer */
|
|
||||||
uint32_t pitch;
|
|
||||||
/** The DRM format of the buffer */
|
|
||||||
uint32_t drm_format;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The prime file descriptor of the buffer.
|
||||||
|
* It has a value >= 0 when this buffer has a prime file descriptor;
|
||||||
|
* otherwise it has the value -1;
|
||||||
|
*/
|
||||||
|
int prime_fd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global name of the buffer.
|
||||||
|
* It has value > 0 when this buffer has a global name;
|
||||||
|
* otherwise it has the value 0;
|
||||||
|
*/
|
||||||
|
uint32_t name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The frame buffer identifier if the buffer has been added as a
|
||||||
|
* frame buffer to the system, otherwise it has the value 0.
|
||||||
|
*/
|
||||||
|
uint32_t fb_id;
|
||||||
|
|
||||||
|
/** The DRM format of the buffer. */
|
||||||
|
uint32_t drm_format;
|
||||||
/** The bits per pixel */
|
/** The bits per pixel */
|
||||||
uint32_t bpp:8;
|
uint32_t bpp:8;
|
||||||
/** The bytes per pixel */
|
/** The bytes per pixel */
|
||||||
uint32_t cpp:8;
|
uint32_t cpp:8;
|
||||||
/** Is foreign surface */
|
/** Is it a dumb buffer. Since 5.0.0. */
|
||||||
uint32_t foreign:1;
|
uint32_t dumb:1;
|
||||||
|
/** Is it a scanout buffer. Since 5.0.0. */
|
||||||
|
uint32_t scanout:1;
|
||||||
|
|
||||||
|
/** The width of the buffer. */
|
||||||
|
uint32_t width;
|
||||||
|
/** The height of the buffer. */
|
||||||
|
uint32_t height;
|
||||||
|
/** The pitch (row stride in bytes) of the buffer. */
|
||||||
|
uint32_t pitch;
|
||||||
|
|
||||||
/** The whole size in bytes of the buffer */
|
/** The whole size in bytes of the buffer */
|
||||||
unsigned long size;
|
size_t size;
|
||||||
/** The mapped address of the buffer; NULL when the buffer is not mapped yet. */
|
|
||||||
uint8_t* pixels;
|
/**
|
||||||
|
* The offset from the buffer start to the real pixel data in bytes.
|
||||||
|
* It must be equal to or larger than the size of the buffer header.
|
||||||
|
* Since 5.0.0.
|
||||||
|
*/
|
||||||
|
off_t offset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mapped address of the buffer;
|
||||||
|
* NULL when the buffer is not mapped yet.
|
||||||
|
*
|
||||||
|
* The address of the pixel data:
|
||||||
|
* uint8_t* pixels = this->buff + this->offset;
|
||||||
|
*/
|
||||||
|
uint8_t* buff;
|
||||||
} DrmSurfaceBuffer;
|
} DrmSurfaceBuffer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The color logic operations.
|
* The structure type defines the operations for a DRM driver.
|
||||||
*/
|
|
||||||
enum DrmColorLogicOp {
|
|
||||||
COLOR_LOGICOP_COPY = 0,
|
|
||||||
COLOR_LOGICOP_COPY_INVERTED,
|
|
||||||
COLOR_LOGICOP_CLEAR,
|
|
||||||
COLOR_LOGICOP_SET,
|
|
||||||
COLOR_LOGICOP_NOR,
|
|
||||||
COLOR_LOGICOP_NAND,
|
|
||||||
COLOR_LOGICOP_EQUIV,
|
|
||||||
COLOR_LOGICOP_INVERT,
|
|
||||||
COLOR_LOGICOP_XOR,
|
|
||||||
COLOR_LOGICOP_AND,
|
|
||||||
COLOR_LOGICOP_AND_INVERTED,
|
|
||||||
COLOR_LOGICOP_AND_REVERSE,
|
|
||||||
COLOR_LOGICOP_OR,
|
|
||||||
COLOR_LOGICOP_OR_INVERTED,
|
|
||||||
COLOR_LOGICOP_OR_REVERSE,
|
|
||||||
COLOR_LOGICOP_NOOP,
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The struct type defines the operations for a DRI driver.
|
|
||||||
*/
|
*/
|
||||||
typedef struct _DrmDriverOps {
|
typedef struct _DrmDriverOps {
|
||||||
/**
|
/**
|
||||||
@@ -160,81 +169,95 @@ typedef struct _DrmDriverOps {
|
|||||||
DrmDriver* (*create_driver) (int device_fd);
|
DrmDriver* (*create_driver) (int device_fd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation destroies the DrmDriver object.
|
* This operation destroys the DrmDriver object.
|
||||||
*
|
*
|
||||||
* \note The driver must implement this operation.
|
* \note The driver must implement this operation.
|
||||||
*/
|
*/
|
||||||
void (*destroy_driver) (DrmDriver *driver);
|
void (*destroy_driver) (DrmDriver *driver);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation flushs the batch buffer of the driver or the hardware cache.
|
* This operation flushes the batch buffer of the driver or
|
||||||
|
* the hardware cache.
|
||||||
*
|
*
|
||||||
* \note This operation can be NULL.
|
* \note This operation can be NULL.
|
||||||
*/
|
*/
|
||||||
void (* flush_driver) (DrmDriver *driver);
|
void (* flush_driver) (DrmDriver *driver);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation creates a buffer with the specified pixel format,
|
* This operation creates a surface buffer with the specified pixel format,
|
||||||
* width, and height. If succeed, a valid DrmSurfaceBuffer object will
|
* header size, width, and height. If succeed, a valid DrmSurfaceBuffer
|
||||||
* be returned; NULL on error. Note that the field of `pixels` of the
|
* object will be returned; NULL on error. Note that the field of `buff`
|
||||||
* DrmSurfaceBuffer object is NULL until the \a map_buffer was called.
|
* of the DrmSurfaceBuffer object is NULL until the \a map_buffer was called.
|
||||||
*
|
*
|
||||||
* \note The driver must implement this operation.
|
* \note The driver must implement this operation and fill all fields of
|
||||||
|
* the new DrmSurfaceBuffer object.
|
||||||
*/
|
*/
|
||||||
DrmSurfaceBuffer* (* create_buffer) (DrmDriver *driver,
|
DrmSurfaceBuffer* (* create_buffer) (DrmDriver *driver,
|
||||||
uint32_t drm_format,
|
uint32_t drm_format, uint32_t hdr_size,
|
||||||
unsigned int width, unsigned int height);
|
uint32_t width, uint32_t height);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation creates a buffer for the given handle
|
* This operation creates a buffer from a given and possibly foreign handle
|
||||||
* with the specified pixel format, width, and height. If succeed,
|
* with the size of the buffer. If succeed, a valid DrmSurfaceBuffer object
|
||||||
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
|
* will be returned; NULL on error.
|
||||||
*
|
*
|
||||||
* \note This operation can be NULL.
|
* \note This operation can be NULL. Note that the handle might was created
|
||||||
|
* by a foreign module. If implemented, the driver must
|
||||||
|
* fill the correct prime_fd, handle, name, and size fields of the new
|
||||||
|
* DrmSurfaceBuffer object.
|
||||||
*/
|
*/
|
||||||
DrmSurfaceBuffer* (* create_buffer_from_handle) (DrmDriver *driver,
|
DrmSurfaceBuffer* (* create_buffer_from_handle) (DrmDriver *driver,
|
||||||
uint32_t handle, unsigned long size, uint32_t drm_format,
|
uint32_t handle, size_t size);
|
||||||
unsigned int width, unsigned int height, unsigned int pitch);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation creates a buffer for the given system global name
|
* This operation creates a buffer for the given system global name
|
||||||
* with the specified pixel format, width, and height. If succeed,
|
* If succeed, a valid DrmSurfaceBuffer object will be returned;
|
||||||
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
|
* NULL on error.
|
||||||
*
|
*
|
||||||
* \note This operation can be NULL.
|
* \note This operation can be NULL. If implemented, the driver must
|
||||||
|
* fill the correct prime_fd, handle, name, and size fields of the new
|
||||||
|
* DrmSurfaceBuffer object.
|
||||||
*/
|
*/
|
||||||
DrmSurfaceBuffer* (* create_buffer_from_name) (DrmDriver *driver,
|
DrmSurfaceBuffer* (* create_buffer_from_name) (DrmDriver *driver,
|
||||||
uint32_t name, uint32_t drm_format,
|
uint32_t name);
|
||||||
unsigned int width, unsigned int height, unsigned int pitch);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation creates a buffer for the given PRIME file descriptor
|
* This operation creates a buffer for the given PRIME file descriptor
|
||||||
* with the specified pixel format, width, height, and pitch. If succeed,
|
* with the specified pixel format, width, height, and pitch. If succeed,
|
||||||
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
|
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
|
||||||
*
|
*
|
||||||
* \note This operation can be NULL.
|
* \note This operation can be NULL. If implemented, the driver must
|
||||||
|
* fill the correct prime_fd, handle, name, and size fields of the new
|
||||||
|
* DrmSurfaceBuffer object.
|
||||||
*/
|
*/
|
||||||
DrmSurfaceBuffer* (* create_buffer_from_prime_fd) (DrmDriver *driver,
|
DrmSurfaceBuffer* (* create_buffer_from_prime_fd) (DrmDriver *driver,
|
||||||
int prime_fd, unsigned long size, uint32_t drm_format,
|
int prime_fd, size_t size);
|
||||||
unsigned int width, unsigned int height, unsigned int pitch);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation maps the buffer into the current process's virtual memory
|
* This operation maps the buffer into the current process's virtual memory
|
||||||
* space, and returns the virtual address. If failed, it returns NULL.
|
* space, and returns the virtual address. If failed, it returns NULL.
|
||||||
*
|
*
|
||||||
* \note The driver must implement this operation.
|
* When \a for_scanout is not zero, the buffer will be used for scan out
|
||||||
|
* frame buffer.
|
||||||
|
*
|
||||||
|
* \note The driver must implement this operation. The driver must
|
||||||
|
* set a valid value for buff field of the DrmSurfaceBuffer object
|
||||||
|
* on success.
|
||||||
*/
|
*/
|
||||||
uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
|
uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer,
|
||||||
|
int for_scanout);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation un-maps a buffer.
|
* This operation un-maps a buffer.
|
||||||
*
|
*
|
||||||
* \note The driver must implement this operation.
|
* \note The driver must implement this operation. The driver must
|
||||||
|
* set NULL for buff field of the DrmSurfaceBuffer object
|
||||||
|
* on success.
|
||||||
*/
|
*/
|
||||||
void (* unmap_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
|
void (* unmap_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation destroies a buffer.
|
* This operation destroys a buffer.
|
||||||
*
|
*
|
||||||
* \note The driver must implement this operation.
|
* \note The driver must implement this operation.
|
||||||
*/
|
*/
|
||||||
@@ -256,7 +279,7 @@ typedef struct _DrmDriverOps {
|
|||||||
* If succeed, it returns 0.
|
* If succeed, it returns 0.
|
||||||
*
|
*
|
||||||
* \note If this operation is set as NULL, it will be supposed that
|
* \note If this operation is set as NULL, it will be supposed that
|
||||||
* the driver does not support any hardware accelerated blit operation.
|
* the driver does not support any hardware accelerated blitting operation.
|
||||||
*/
|
*/
|
||||||
int (* check_blit) (DrmDriver *driver,
|
int (* check_blit) (DrmDriver *driver,
|
||||||
DrmSurfaceBuffer* src_buf, DrmSurfaceBuffer* dst_buf);
|
DrmSurfaceBuffer* src_buf, DrmSurfaceBuffer* dst_buf);
|
||||||
@@ -265,51 +288,104 @@ typedef struct _DrmDriverOps {
|
|||||||
* This operation copies bits from a source buffer to a destination buffer.
|
* This operation copies bits from a source buffer to a destination buffer.
|
||||||
*
|
*
|
||||||
* \note If this operation is set as NULL, the driver does not support
|
* \note If this operation is set as NULL, the driver does not support
|
||||||
* hardware accelerated copy blit.
|
* hardware accelerated copy blitting.
|
||||||
|
*
|
||||||
|
* \note Currently, the logical operation is ignored.
|
||||||
*/
|
*/
|
||||||
int (* copy_blit) (DrmDriver *driver,
|
int (* copy_blit) (DrmDriver *driver,
|
||||||
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
||||||
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
||||||
enum DrmColorLogicOp logic_op);
|
ColorLogicalOp logic_op);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation blits pixles from a source buffer with the source alpha value
|
* This operation blits pixels from a source buffer with the source alpha
|
||||||
* specified to a destination buffer.
|
* value specified to a destination buffer.
|
||||||
*
|
*
|
||||||
* \note If this operation is set as NULL, the driver does not support
|
* \note If this operation is set as NULL, the driver does not support
|
||||||
* hardware accelerated blit with alpha.
|
* hardware accelerated blitting with alpha.
|
||||||
*/
|
*/
|
||||||
int (* alpha_blit) (DrmDriver *driver,
|
int (* alpha_blit) (DrmDriver *driver,
|
||||||
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
||||||
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, uint8_t alpha);
|
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
||||||
|
uint8_t alpha);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation blits pixles from a source buffer to a destination buffer,
|
* This operation blits pixels from a source buffer to a destination buffer,
|
||||||
* but skipping the pixel value specified by \a color_key.
|
* but skipping the pixel value specified by \a color_key.
|
||||||
*
|
*
|
||||||
* \note If this operation is set as NULL, the driver does not support
|
* \note If this operation is set as NULL, the driver does not support
|
||||||
* hardware accelerated blit with color key.
|
* hardware accelerated blitting with color key.
|
||||||
*/
|
*/
|
||||||
int (* key_blit) (DrmDriver *driver,
|
int (* key_blit) (DrmDriver *driver,
|
||||||
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
||||||
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, uint32_t color_key);
|
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
||||||
|
uint32_t color_key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation blits pixles from a source buffer with the source alpha value
|
* This operation blits pixels from a source buffer with the source alpha
|
||||||
* specified to a destination buffer, but skipping the pixel value specified.
|
* value specified to a destination buffer, but skipping the pixel value
|
||||||
|
* specified.
|
||||||
*
|
*
|
||||||
* \note If this operation is set as NULL, the driver does not support
|
* \note If this operation is set as NULL, the driver does not support
|
||||||
* hardware accelerated blit with alpha and color key.
|
* hardware accelerated blitting with alpha and color key.
|
||||||
*/
|
*/
|
||||||
int (* alpha_key_blit) (DrmDriver *driver,
|
int (* alpha_key_blit) (DrmDriver *driver,
|
||||||
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
||||||
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
||||||
uint8_t alpha, uint32_t color_key);
|
uint8_t alpha, uint32_t color_key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This operation blits pixels from a source buffer with the source alpha
|
||||||
|
* value of pixels to the destination buffer, and with the specified color
|
||||||
|
* compositing/blending method (\a ColorBlendMethod).
|
||||||
|
*
|
||||||
|
* \note If this operation is set as NULL, the driver does not support
|
||||||
|
* hardware accelerated blitting with alpha on basis per pixel.
|
||||||
|
*
|
||||||
|
* \note Currently, the color compositing/blending method is ignored.
|
||||||
|
*/
|
||||||
|
int (* alpha_pixel_blit) (DrmDriver *driver,
|
||||||
|
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
||||||
|
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
||||||
|
ColorBlendMethod blend_method);
|
||||||
|
|
||||||
} DrmDriverOps;
|
} DrmDriverOps;
|
||||||
|
|
||||||
/** Implement this stub to return the DRI driver operations */
|
/** The current version of DRM driver. */
|
||||||
DrmDriverOps* __drm_ex_driver_get (const char* driver_name, int device_fd);
|
#define DRM_DRIVER_VERSION 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement this stub to return the DRI driver operations
|
||||||
|
*
|
||||||
|
* This function takes three arguments and returns NULL or
|
||||||
|
* a valid pointer of DrmDriverOps to MiniGUI.
|
||||||
|
*
|
||||||
|
* This function can return different DrmDriverOps to MiniGUI according to
|
||||||
|
* the driver name and device file descriptor. In this way, your DRM engine
|
||||||
|
* driver implementation can support multiple GPUs.
|
||||||
|
*
|
||||||
|
* If the external stub returns NULL, MiniGUI will try to use the dumb
|
||||||
|
* frame buffer instead.
|
||||||
|
*
|
||||||
|
* \param driver_name This argument gives the driver name determined
|
||||||
|
* by MiniGUI. Generally, it is the kernel driver name for your GPU.
|
||||||
|
* For example, for Intel i915/i965 GPUs, the driver name will be `i915`.
|
||||||
|
* \param device_fd This argument gives the file descriptor of the
|
||||||
|
* opened DRI device.
|
||||||
|
* \param version A pointer to an integer which will be used to return
|
||||||
|
* the interface version of the DRM engine driver.
|
||||||
|
*
|
||||||
|
* \return NULL or a valid pointer to DrmDriverOps.
|
||||||
|
*
|
||||||
|
* \note We use the version control since 4.0.7. It will be initialized
|
||||||
|
* to zero by MiniGUI before calling this function. Because an old
|
||||||
|
* driver for MiniGUI 4.0.6 or earlier will not change the value,
|
||||||
|
* MiniGUI will deny to load the old driver.
|
||||||
|
*
|
||||||
|
* The constant \a DRM_DRIVER_VERSION defines the current version code.
|
||||||
|
*/
|
||||||
|
DrmDriverOps* __drm_ex_driver_get (const char* driver_name, int device_fd,
|
||||||
|
int* version);
|
||||||
|
|
||||||
/** @} end of external_stubs_dri */
|
/** @} end of external_stubs_dri */
|
||||||
|
|
||||||
|
|||||||
+277
-133
File diff suppressed because it is too large
Load Diff
+163
-27
@@ -82,10 +82,16 @@ extern "C" {
|
|||||||
#define ZOF_MAXIMIZED 0x00000004 // Since 5.0.0
|
#define ZOF_MAXIMIZED 0x00000004 // Since 5.0.0
|
||||||
#define ZOF_MINIMIZED 0x00000008 // Since 5.0.0
|
#define ZOF_MINIMIZED 0x00000008 // Since 5.0.0
|
||||||
|
|
||||||
|
/* Since 5.0.6 */
|
||||||
|
#define ZOF_GESTURE_FLAGS_MASK 0X000000F0
|
||||||
|
#define ZOF_GF_SWIPE_HORZ 0x00000010
|
||||||
|
#define ZOF_GF_SWIPE_VERT 0x00000020
|
||||||
|
|
||||||
/* Since 5.0.0 */
|
/* Since 5.0.0 */
|
||||||
#define ZOF_INTERNAL_FLAGS_MASK 0X000F0000
|
#define ZOF_INTERNAL_FLAGS_MASK 0X000F0000
|
||||||
#define ZOF_IF_REFERENCE 0x00010000
|
#define ZOF_IF_REFERENCE 0x00010000
|
||||||
#define ZOF_IF_ALWAYSTOP 0x00020000
|
#define ZOF_IF_ALWAYSTOP 0x00020000
|
||||||
|
#define ZOF_IF_SPECIAL 0x00040000 // Since 5.0.6
|
||||||
|
|
||||||
#define ZOF_TW_FLAG_MASK 0x00F00000
|
#define ZOF_TW_FLAG_MASK 0x00F00000
|
||||||
#define ZOF_TW_TROUNDCNS 0x00100000
|
#define ZOF_TW_TROUNDCNS 0x00100000
|
||||||
@@ -101,9 +107,9 @@ extern "C" {
|
|||||||
#define ZOF_TYPE_NORMAL 0x30000000
|
#define ZOF_TYPE_NORMAL 0x30000000
|
||||||
#define ZOF_TYPE_HIGHER 0x40000000
|
#define ZOF_TYPE_HIGHER 0x40000000
|
||||||
#define ZOF_TYPE_DOCKER 0x50000000 // Since 5.0.0
|
#define ZOF_TYPE_DOCKER 0x50000000 // Since 5.0.0
|
||||||
#define ZOF_TYPE_SCREENLOCK 0x60000000 // Since 5.0.0;
|
#define ZOF_TYPE_SCREENLOCK 0x60000000 // Since 5.0.0
|
||||||
#define ZOF_TYPE_GLOBAL 0x70000000
|
#define ZOF_TYPE_GLOBAL 0x70000000
|
||||||
#define ZOF_TYPE_TOOLTIP 0x80000000 // Since 5.0.0; fixed and only one.
|
#define ZOF_TYPE_TOOLTIP 0x80000000 // Since 5.0.0
|
||||||
#define ZOF_TYPE_POPUPMENU 0x90000000
|
#define ZOF_TYPE_POPUPMENU 0x90000000
|
||||||
|
|
||||||
#define ZOF_TYPE_BOTTOMMOST ZOF_TYPE_LAUNCHER
|
#define ZOF_TYPE_BOTTOMMOST ZOF_TYPE_LAUNCHER
|
||||||
@@ -351,9 +357,17 @@ extern MG_EXPORT MG_Client* mgClients;
|
|||||||
*/
|
*/
|
||||||
extern MG_EXPORT MG_Layer* mgTopmostLayer;
|
extern MG_EXPORT MG_Layer* mgTopmostLayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \var MG_Layer* mgDefaultLayer
|
||||||
|
* \brief The pointer to the default layer.
|
||||||
|
*
|
||||||
|
* \sa MG_Layer
|
||||||
|
*/
|
||||||
|
extern MG_EXPORT MG_Layer* mgDefaultLayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \var MG_Layer* mgLayers
|
* \var MG_Layer* mgLayers
|
||||||
* \brief The pointer to the array of layers.
|
* \brief The pointer to the layer list.
|
||||||
*
|
*
|
||||||
* \sa MG_Layer
|
* \sa MG_Layer
|
||||||
*/
|
*/
|
||||||
@@ -562,6 +576,8 @@ MG_EXPORT BOOL GUIAPI DeleteLayer (BOOL handle_name,
|
|||||||
*
|
*
|
||||||
* \return TRUE on success, otherwise FALSE.
|
* \return TRUE on success, otherwise FALSE.
|
||||||
*
|
*
|
||||||
|
* \note Only one client which has no any window can be moved.
|
||||||
|
*
|
||||||
* \note The client which created a fixed main window
|
* \note The client which created a fixed main window
|
||||||
* (a main window acts as the screen lock, the docker, or the launcher) will
|
* (a main window acts as the screen lock, the docker, or the launcher) will
|
||||||
* be moved to the topmost layer automatically.
|
* be moved to the topmost layer automatically.
|
||||||
@@ -669,21 +685,22 @@ typedef void (* ON_NEW_DEL_CLIENT) (int op, int cli);
|
|||||||
typedef void (* ON_CHANGE_LAYER) (int op, MG_Layer* layer,
|
typedef void (* ON_CHANGE_LAYER) (int op, MG_Layer* layer,
|
||||||
MG_Client* client);
|
MG_Client* client);
|
||||||
|
|
||||||
#define ZNOP_ALLOCATE 1
|
#define ZNOP_ALLOCATE 1
|
||||||
#define ZNOP_FREE 2
|
#define ZNOP_FREE 2
|
||||||
#define ZNOP_MOVE2TOP 3
|
#define ZNOP_MOVE2TOP 3
|
||||||
#define ZNOP_SHOW 4
|
#define ZNOP_SHOW 4
|
||||||
#define ZNOP_HIDE 5
|
#define ZNOP_HIDE 5
|
||||||
#define ZNOP_MOVEWIN 6
|
#define ZNOP_MOVEWIN 6
|
||||||
#define ZNOP_SETACTIVE 7
|
#define ZNOP_SETACTIVE 7
|
||||||
|
|
||||||
#define ZNOP_ENABLEWINDOW 11
|
#define ZNOP_ENABLEWINDOW 11
|
||||||
#define ZNOP_DISABLEWINDOW 12
|
#define ZNOP_DISABLEWINDOW 12
|
||||||
#define ZNOP_STARTDRAG 13
|
#define ZNOP_STARTDRAG 13
|
||||||
#define ZNOP_CANCELDRAG 14
|
#define ZNOP_CANCELDRAG 14
|
||||||
#define ZNOP_CHANGECAPTION 15
|
#define ZNOP_CHANGECAPTION 15
|
||||||
#define ZNOP_REGIONCHANGED 16
|
#define ZNOP_REGIONCHANGED 16
|
||||||
#define ZNOP_COMPOSITINGCHANGED 17
|
#define ZNOP_COMPOSITINGCHANGED 17
|
||||||
|
#define ZNOP_ICONCHANGED 18 /* reserved for future */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \var typedef void (* ON_ZNODE_OPERATION) (int op, int cli, int idx_znode)
|
* \var typedef void (* ON_ZNODE_OPERATION) (int op, int cli, int idx_znode)
|
||||||
@@ -889,6 +906,39 @@ MG_EXPORT BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer);
|
|||||||
*/
|
*/
|
||||||
MG_EXPORT BOOL GUIAPI ServerDeleteLayer (MG_Layer* layer);
|
MG_EXPORT BOOL GUIAPI ServerDeleteLayer (MG_Layer* layer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \fn int GUIAPI ServerGetTopmostZNodeOfType (MG_Layer* layer, DWORD type,
|
||||||
|
* int* cli)
|
||||||
|
* \brief Get the topmost z-node in the specified layer for the specific
|
||||||
|
* window type from the server.
|
||||||
|
*
|
||||||
|
* This function gets the topmost z-node of the type specified by
|
||||||
|
* \a type in the specified layer \a layer from the server.
|
||||||
|
*
|
||||||
|
* \param layer The pointer to the layer, NULL for the current topmost layer.
|
||||||
|
* \param type The window type, can be one of the following values:
|
||||||
|
* - ZOF_TYPE_TOOLTIP
|
||||||
|
* - ZOF_TYPE_GLOBAL
|
||||||
|
* - ZOF_TYPE_SCREENLOCK
|
||||||
|
* - ZOF_TYPE_DOCKER
|
||||||
|
* - ZOF_TYPE_HIGHER
|
||||||
|
* - ZOF_TYPE_NORMAL
|
||||||
|
* - ZOF_TYPE_LAUNCHER
|
||||||
|
* \param cli The client identifier of the topmost z-node will be returned
|
||||||
|
* through this pointer. NULL is okay.
|
||||||
|
*
|
||||||
|
* \return The index of the topmost z-node of the specified type.
|
||||||
|
* Zero when there is no z-node in the level; < 0 when error.
|
||||||
|
*
|
||||||
|
* \note Server-only function. Note that this function will not return
|
||||||
|
* the z-node of the desktop, and the desktop always has the z-node index
|
||||||
|
* of zero.
|
||||||
|
*
|
||||||
|
* \sa ServerGetZNodeInfo
|
||||||
|
*/
|
||||||
|
MG_EXPORT int GUIAPI ServerGetTopmostZNodeOfType (MG_Layer* layer, DWORD type,
|
||||||
|
int* cli);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode,
|
* \fn int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode,
|
||||||
* int* cli)
|
* int* cli)
|
||||||
@@ -1457,7 +1507,9 @@ MG_EXPORT BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer, int idx_znode,
|
|||||||
*
|
*
|
||||||
* \return TRUE on success, otherwise FALSE.
|
* \return TRUE on success, otherwise FALSE.
|
||||||
*
|
*
|
||||||
* \note Server-only function. The client which created a fixed main window
|
* \note Server-only function. Only one client which has no any window can be moved.
|
||||||
|
*
|
||||||
|
* \note The client which created a fixed main window
|
||||||
* (a main window acts as the screen lock, the docker, or the launcher) will
|
* (a main window acts as the screen lock, the docker, or the launcher) will
|
||||||
* be moved to the topmost layer automatically.
|
* be moved to the topmost layer automatically.
|
||||||
*
|
*
|
||||||
@@ -1566,7 +1618,7 @@ typedef struct _CompositorOps {
|
|||||||
* a main window with the extended style WS_EX_AUTOPOSITION.
|
* a main window with the extended style WS_EX_AUTOPOSITION.
|
||||||
*/
|
*/
|
||||||
void (*calc_mainwin_pos) (CompositorCtxt* ctxt, MG_Layer* layer,
|
void (*calc_mainwin_pos) (CompositorCtxt* ctxt, MG_Layer* layer,
|
||||||
DWORD zt_type, int first_for_type, CALCPOSINFO* info);
|
DWORD zt_type, int first_for_type, int cli, CALCPOSINFO* info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation will be called when there was a layer operation.
|
* This operation will be called when there was a layer operation.
|
||||||
@@ -1574,23 +1626,44 @@ typedef struct _CompositorOps {
|
|||||||
*/
|
*/
|
||||||
void (*on_layer_op) (CompositorCtxt* ctxt, int layer_op,
|
void (*on_layer_op) (CompositorCtxt* ctxt, int layer_op,
|
||||||
MG_Layer* layer, MG_Client* client);
|
MG_Layer* layer, MG_Client* client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This operation will be called when the server intends to composite
|
||||||
|
* the whole screen for the particular layer.
|
||||||
|
* The compositor can reset the dirty region for the layer.
|
||||||
|
* If it returns FALSE, the compositor will not handle the layer.
|
||||||
|
*/
|
||||||
|
BOOL (*reset_dirty_region) (CompositorCtxt* ctxt, MG_Layer* layer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation will be called when there are some dirty
|
* This operation will be called when there are some dirty
|
||||||
* rectangles in the specific popup menu z-node.
|
* rectangles in the specific popup menu z-node.
|
||||||
|
* The compositor should merge the dirty rectangles to the
|
||||||
|
* dirty region maintained for the current layer.
|
||||||
*/
|
*/
|
||||||
void (*on_dirty_ppp) (CompositorCtxt* ctxt, int zidx);
|
BOOL (*merge_dirty_ppp) (CompositorCtxt* ctxt, MG_Layer* layer, int zidx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation will be called when there are some dirty rectangles
|
* This operation will be called when there are some dirty rectangles
|
||||||
* in the specific window z-node on the specific layer.
|
* in the specific window z-node on the specific layer.
|
||||||
|
* The compositor should merge the dirty rectangles to the
|
||||||
|
* dirty region maintained for the current layer.
|
||||||
*/
|
*/
|
||||||
void (*on_dirty_win) (CompositorCtxt* ctxt, MG_Layer* layer, int zidx);
|
BOOL (*merge_dirty_win) (CompositorCtxt* ctxt, MG_Layer* layer, int zidx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation will be called when there are some dirty rectangles
|
* This operation will be called when there are some dirty rectangles
|
||||||
* in the wallpaper pattern.
|
* in the wallpaper pattern.
|
||||||
|
* The compositor should merge the dirty rectangles of the wallpaper
|
||||||
|
* pattern to the dirty region maintained for the current layer.
|
||||||
*/
|
*/
|
||||||
void (*on_dirty_wpp) (CompositorCtxt* ctxt);
|
BOOL (*merge_dirty_wpp) (CompositorCtxt* ctxt, MG_Layer* layer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This operation will be called to composite the dirty region
|
||||||
|
* for the particular layer.
|
||||||
|
*/
|
||||||
|
BOOL (*refresh_dirty_region) (CompositorCtxt* ctxt, MG_Layer* layer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation will be called when a z-node was out of action, e.g.,
|
* This operation will be called when a z-node was out of action, e.g.,
|
||||||
@@ -1674,6 +1747,20 @@ typedef struct _CompositorOps {
|
|||||||
void (*on_moved_win) (CompositorCtxt* ctxt, MG_Layer* layer,
|
void (*on_moved_win) (CompositorCtxt* ctxt, MG_Layer* layer,
|
||||||
int zidx, const RECT* rc_org);
|
int zidx, const RECT* rc_org);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This operation will composite multiple layers on the screen at the same
|
||||||
|
* time by using the combining paramemters.
|
||||||
|
*/
|
||||||
|
unsigned int (*composite_layers) (CompositorCtxt* ctxt, MG_Layer* layers[],
|
||||||
|
int nr_layers, void* combine_param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This operation will be called when transiting to a new topmost layer.
|
||||||
|
* The compositor can play an animation to transit from the current
|
||||||
|
* topmost layer to the new topmost layer.
|
||||||
|
*/
|
||||||
|
void (*transit_to_layer) (CompositorCtxt* ctxt, MG_Layer* to_layer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation will be called when the system is maximizing a window.
|
* This operation will be called when the system is maximizing a window.
|
||||||
* The compositor can play an animation in this operation.
|
* The compositor can play an animation in this operation.
|
||||||
@@ -1688,12 +1775,35 @@ typedef struct _CompositorOps {
|
|||||||
|
|
||||||
} CompositorOps;
|
} CompositorOps;
|
||||||
|
|
||||||
|
#define FCM_HORIZONTAL 0x0000
|
||||||
|
#define FCM_VERTICAL 0x0001
|
||||||
|
#define FCM_METHOD_MASK 0x00FF
|
||||||
|
#define FCM_SCALE 0x0100
|
||||||
|
|
||||||
|
/** The combining parameters for the callback compositor. */
|
||||||
|
typedef struct _CombParamsFallback {
|
||||||
|
/**
|
||||||
|
* The combining method, can be one of the following values:
|
||||||
|
* - FCM_HORIZONTAL
|
||||||
|
* - FCM_VERTICAL
|
||||||
|
* and/or OR'd with the following value:
|
||||||
|
* - FCM_SCALE
|
||||||
|
*/
|
||||||
|
unsigned int method;
|
||||||
|
|
||||||
|
/** The percentage of the screen occupied by the first layer. */
|
||||||
|
float percent;
|
||||||
|
|
||||||
|
/** The scale factor of non-global z-nodes. */
|
||||||
|
float scale;
|
||||||
|
} COMBPARAMS_FALLBACK;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the operations of a specific compositor.
|
* \brief Get the operations of a specific compositor.
|
||||||
*
|
*
|
||||||
* This function gets the operations of a specific compositor.
|
* This function gets the operations of a specific compositor.
|
||||||
*
|
*
|
||||||
* \param name The name of the compositor. MiniGUI reserved `default`
|
* \param name The name of the compositor. MiniGUI reserved `fallback`
|
||||||
* as the default compositor which is implemented in MiniGUI Core.
|
* as the default compositor which is implemented in MiniGUI Core.
|
||||||
* You can use some operations of the default compositor as the
|
* You can use some operations of the default compositor as the
|
||||||
* corresponding operations for your own compositor.
|
* corresponding operations for your own compositor.
|
||||||
@@ -1753,7 +1863,7 @@ MG_EXPORT BOOL GUIAPI ServerUnregisterCompositor (const char* name);
|
|||||||
* \brief Select a compositor as the current compositor.
|
* \brief Select a compositor as the current compositor.
|
||||||
*
|
*
|
||||||
* This function selects a compositor as the current compositor
|
* This function selects a compositor as the current compositor
|
||||||
* and returns the compositor object.
|
* and returns the compositor operations.
|
||||||
* It also destroies the old compositor object if there is old one.
|
* It also destroies the old compositor object if there is old one.
|
||||||
*
|
*
|
||||||
* \param name The name of the compositor. If the argument is NULL,
|
* \param name The name of the compositor. If the argument is NULL,
|
||||||
@@ -1771,18 +1881,44 @@ MG_EXPORT BOOL GUIAPI ServerUnregisterCompositor (const char* name);
|
|||||||
MG_EXPORT const CompositorOps* GUIAPI ServerSelectCompositor (
|
MG_EXPORT const CompositorOps* GUIAPI ServerSelectCompositor (
|
||||||
const char* name, CompositorCtxt** ctxt);
|
const char* name, CompositorCtxt** ctxt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the name and the context of the current compositor.
|
||||||
|
*
|
||||||
|
* This function gets the name and the context of the current
|
||||||
|
* compositor.
|
||||||
|
*
|
||||||
|
* \param ops The buffer used to return the compositor operations.
|
||||||
|
* \param ctxt The buffer used to return the compositor context.
|
||||||
|
*
|
||||||
|
* \return The name of the current compositor; NULL for error.
|
||||||
|
*
|
||||||
|
* \note Only called by the server.
|
||||||
|
*
|
||||||
|
* Since 5.0.6.
|
||||||
|
*/
|
||||||
|
MG_EXPORT const char* GUIAPI ServerGetCurrentCompositor (
|
||||||
|
const CompositorOps** ops, CompositorCtxt** ctxt);
|
||||||
|
|
||||||
|
#define COMPSOR_OPS_VERSION 2
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement this stub to return the compositor operations
|
* Implement this stub to return the compositor operations
|
||||||
* for a specific compositor name if you implement the compositor
|
* for a specific compositor name if you implement the compositor
|
||||||
* in a shared library.
|
* in a shared library.
|
||||||
*
|
*
|
||||||
* \param name The name of the compositor desired.
|
* \param name The name of the compositor desired.
|
||||||
* \param fallback The fallback operations for this compositor.
|
* \param fallback_ops The fallback operations.
|
||||||
|
* \param version The version code for the operations of the compositor.
|
||||||
|
*
|
||||||
|
* \note The compositor should return the version code it follows through
|
||||||
|
* \a version argument. If the version code is not matched, MiniGUI
|
||||||
|
* will refuse to load the compositor. The current version code
|
||||||
|
* is defined by \a COMPSOR_OPS_VERSION.
|
||||||
*
|
*
|
||||||
* \return The compositor operations for specific name, NULL for error.
|
* \return The compositor operations for specific name, NULL for error.
|
||||||
*/
|
*/
|
||||||
const CompositorOps* __ex_compositor_get (const char* name,
|
const CompositorOps* __ex_compositor_get (const char* name,
|
||||||
const CompositorOps* fallback);
|
const CompositorOps* fallback_ops, int* version);
|
||||||
|
|
||||||
#endif /* defined _MGSCHEMA_COMPOSITING */
|
#endif /* defined _MGSCHEMA_COMPOSITING */
|
||||||
|
|
||||||
@@ -1822,7 +1958,7 @@ const CompositorOps* __ex_compositor_get (const char* name,
|
|||||||
*
|
*
|
||||||
* \sa RegisterRequestHandler
|
* \sa RegisterRequestHandler
|
||||||
*/
|
*/
|
||||||
#define MAX_SYS_REQID 0x0022
|
#define MAX_SYS_REQID 0x0023
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def MAX_REQID
|
* \def MAX_REQID
|
||||||
|
|||||||
+138
-72
@@ -1448,6 +1448,17 @@ extern DWORD __mg_interval_time;
|
|||||||
*/
|
*/
|
||||||
#define MSG_HELP 0x006A
|
#define MSG_HELP 0x006A
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def MSG_GESTURETEST
|
||||||
|
* \brief This message will be sent to a main window for gesture test.
|
||||||
|
*
|
||||||
|
* The client should call \a SetMainWindowGestureFlags to set the gesture flags
|
||||||
|
* for a main window after got this message.
|
||||||
|
*
|
||||||
|
* Since 5.0.6.
|
||||||
|
*/
|
||||||
|
#define MSG_GESTURETEST 0x006B
|
||||||
|
|
||||||
#define MSG_LASTCREATEMSG 0x006F
|
#define MSG_LASTCREATEMSG 0x006F
|
||||||
|
|
||||||
/** @} end of creation_msgs */
|
/** @} end of creation_msgs */
|
||||||
@@ -2463,6 +2474,9 @@ typedef struct _COMPOSITINGINFO {
|
|||||||
/* Since 5.0.0 */
|
/* Since 5.0.0 */
|
||||||
#define MSG_SETAUTOREPEAT 0x0107
|
#define MSG_SETAUTOREPEAT 0x0107
|
||||||
|
|
||||||
|
/* Since 5.0.6 */
|
||||||
|
#define MSG_SETGESTUREFLAGS 0x0108
|
||||||
|
|
||||||
#define MSG_SHOWGLOBALCTRL 0x010A
|
#define MSG_SHOWGLOBALCTRL 0x010A
|
||||||
#define MSG_HIDEGLOBALCTRL 0x010B
|
#define MSG_HIDEGLOBALCTRL 0x010B
|
||||||
|
|
||||||
@@ -2983,6 +2997,9 @@ typedef struct _WINMASKINFO {
|
|||||||
/* Since 5.0.0: for calculating the default position */
|
/* Since 5.0.0: for calculating the default position */
|
||||||
#define MSG_CALC_POSITION 0x014B
|
#define MSG_CALC_POSITION 0x014B
|
||||||
|
|
||||||
|
/* Since 5.0.6: for waking up the client */
|
||||||
|
#define MSG_WAKEUP_CLIENT 0x014C
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def MSG_DOESNEEDIME
|
* \def MSG_DOESNEEDIME
|
||||||
* \brief Send to a window to query whether the window needs to open
|
* \brief Send to a window to query whether the window needs to open
|
||||||
@@ -4280,39 +4297,62 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
|||||||
*/
|
*/
|
||||||
#define WS_DISABLED 0x04000000L
|
#define WS_DISABLED 0x04000000L
|
||||||
|
|
||||||
/* Main window states -- reserved for future use. */
|
/**
|
||||||
#define WS_MINIMIZE 0x02000000L
|
* \def WS_VSCROLL
|
||||||
#define WS_MAXIMIZE 0x01000000L
|
* \brief Creates a window with vertical scroll bar.
|
||||||
|
*/
|
||||||
|
#define WS_VSCROLL 0x02000000L
|
||||||
|
|
||||||
/* bits in this mask are reuse for main windows and controls;
|
/**
|
||||||
bits have different meanings for main windows and controls.*/
|
* \def WS_HSCROLL
|
||||||
#define WS_REUSE_MASK 0x00E00000L
|
* \brief Creates a window with horizontal scroll bar.
|
||||||
|
*/
|
||||||
|
#define WS_HSCROLL 0x01000000L
|
||||||
|
|
||||||
|
/* bits in this mask are both for main window and controls */
|
||||||
|
#define WS_BORDER_MASK 0x00F00000L
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def WS_DLGFRAME
|
* \def WS_DLGFRAME
|
||||||
* \brief The main window has a fixed frame, i.e. user can not
|
* \brief The main window has a fixed frame, i.e. user can not
|
||||||
* drag the border of the window.
|
* drag the border of the window.
|
||||||
*/
|
*/
|
||||||
#define WS_DLGFRAME 0x00800000L
|
#define WS_DLGFRAME 0x00800000L
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def WS_THICKFRAME
|
* \def WS_THICKFRAME
|
||||||
* \brief Creates a main window with thick frame.
|
* \brief Creates a main window with thick frame.
|
||||||
*/
|
*/
|
||||||
#define WS_THICKFRAME 0x00400000L
|
#define WS_THICKFRAME 0x00400000L
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def WS_THINFRAME
|
* \def WS_THINFRAME
|
||||||
* \brief Creates a main window with thin frame.
|
* \brief Creates a main window with thin frame.
|
||||||
*/
|
*/
|
||||||
#define WS_THINFRAME 0x00200000L
|
#define WS_THINFRAME 0x00200000L
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def WS_BORDER
|
||||||
|
* \brief Creates a window with border.
|
||||||
|
*/
|
||||||
|
#define WS_BORDER 0x00100000L
|
||||||
|
|
||||||
|
/* bits in this mask are reuse for main windows and controls;
|
||||||
|
bits have different meanings for main windows and controls.*/
|
||||||
|
#define WS_MISC_MASK 0x000F0000L
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def WS_CHILD
|
||||||
|
* \brief Indicates the window is a child.
|
||||||
|
*/
|
||||||
|
#define WS_CHILD 0x00080000L
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def WS_GROUP
|
* \def WS_GROUP
|
||||||
* \brief Indicates the control is the leader of a group.
|
* \brief Indicates the control is the leader of a group.
|
||||||
* \note This style is valid only for controls.
|
* \note This style is valid only for controls.
|
||||||
*/
|
*/
|
||||||
#define WS_GROUP 0x00800000L
|
#define WS_GROUP 0x00040000L
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def WS_TABSTOP
|
* \def WS_TABSTOP
|
||||||
@@ -4320,7 +4360,11 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
|||||||
* using Tab key.
|
* using Tab key.
|
||||||
* \note This style is valid only for controls.
|
* \note This style is valid only for controls.
|
||||||
*/
|
*/
|
||||||
#define WS_TABSTOP 0x00400000L
|
#define WS_TABSTOP 0x00020000L
|
||||||
|
|
||||||
|
/* Main window states -- reserved for future use. */
|
||||||
|
#define WS_MINIMIZE 0x00040000L
|
||||||
|
#define WS_MAXIMIZE 0x00020000L
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def WS_ALWAYSTOP
|
* \def WS_ALWAYSTOP
|
||||||
@@ -4328,38 +4372,11 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
|||||||
*
|
*
|
||||||
* Since 5.0.0.
|
* Since 5.0.0.
|
||||||
*/
|
*/
|
||||||
#define WS_ALWAYSTOP 0x00100000L
|
#define WS_ALWAYSTOP 0x00010000L
|
||||||
|
|
||||||
/* bits in this mask are both for main windows and controls */
|
|
||||||
#define WS_MISC_MASK 0x000F0000L
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \def WS_CHILD
|
|
||||||
* \brief Indicates the window is a child.
|
|
||||||
*/
|
|
||||||
#define WS_CHILD 0x00080000L
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \def WS_VSCROLL
|
|
||||||
* \brief Creates a window with vertical scroll bar.
|
|
||||||
*/
|
|
||||||
#define WS_VSCROLL 0x00040000L
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \def WS_HSCROLL
|
|
||||||
* \brief Creates a window with horizontal scroll bar.
|
|
||||||
*/
|
|
||||||
#define WS_HSCROLL 0x00020000L
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \def WS_BORDER
|
|
||||||
* \brief Creates a window with border.
|
|
||||||
*/
|
|
||||||
#define WS_BORDER 0x00010000L
|
|
||||||
|
|
||||||
/* Obsolete styles, back-compatibility definitions. */
|
/* Obsolete styles, back-compatibility definitions. */
|
||||||
#define WS_OVERLAPPED 0x00000000L
|
#define WS_OVERLAPPED 0x00000000L
|
||||||
#define WS_ABSSCRPOS 0x00000000L
|
#define WS_ABSSCRPOS 0x00000000L
|
||||||
|
|
||||||
#define WS_MAINWIN_ONLY_MASK (WS_CAPTIONBAR_MASK | WS_ALWAYSTOP)
|
#define WS_MAINWIN_ONLY_MASK (WS_CAPTIONBAR_MASK | WS_ALWAYSTOP)
|
||||||
#define WS_CONTROL_ONLY_MASK (WS_CTRLMASK)
|
#define WS_CONTROL_ONLY_MASK (WS_CTRLMASK)
|
||||||
@@ -4433,16 +4450,12 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \def WS_EX_WINTYPE_TOOLTIP
|
* \def WS_EX_WINTYPE_TOOLTIP
|
||||||
* \brief The type for a system/global main window.
|
* \brief The type for a tooltip main window.
|
||||||
*
|
*
|
||||||
* Use this style when you want to create a tooltip main window.
|
* Use this style when you want to create a tooltip main window.
|
||||||
* A tooltip main window will be shown above other types of main windows.
|
* A tooltip main window will be shown above other types of main windows.
|
||||||
*
|
*
|
||||||
* \note Under MiniGUI-Processes runtime mode, only the client which creates
|
* \note The maximal number of all main windows in the tooltip level is 16.
|
||||||
* the first main window in the tooltip level can create other main
|
|
||||||
* windows in this level. For other clients, a main window in the higher
|
|
||||||
* level will be created.
|
|
||||||
* \note The maximal number of all main windows in the tooltip level is 8.
|
|
||||||
* MiniGUI will create a main windows in higher level if there is no room
|
* MiniGUI will create a main windows in higher level if there is no room
|
||||||
* in the tooltip level.
|
* in the tooltip level.
|
||||||
*
|
*
|
||||||
@@ -4458,8 +4471,12 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
|||||||
* A system/global main window will be shown above other types of main windows.
|
* A system/global main window will be shown above other types of main windows.
|
||||||
*
|
*
|
||||||
* \note Under MiniGUI-Processes runtime mode, only the server (`mginit`) can
|
* \note Under MiniGUI-Processes runtime mode, only the server (`mginit`) can
|
||||||
* create main windows in the system level, and any main windows created
|
* create main windows in the system level, and any main windows created
|
||||||
* by the server is a system main window.
|
* by the server is a system main window.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
|
||||||
|
* visible on all layers.
|
||||||
*
|
*
|
||||||
* Since 5.0.0.
|
* Since 5.0.0.
|
||||||
*/
|
*/
|
||||||
@@ -4473,13 +4490,18 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
|||||||
* screen lock level. A main window in the screen lock level will
|
* screen lock level. A main window in the screen lock level will
|
||||||
* be shown below the system main windows and above the other main windows.
|
* be shown below the system main windows and above the other main windows.
|
||||||
*
|
*
|
||||||
* \note Under MiniGUI-Processes runtime mode, only the client which creates
|
* \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
|
||||||
* the first main window in the screen lock level can create other
|
* layer can create a main window in this level, and only the client which creates
|
||||||
* main windows in the this level. For other clients, a main window in
|
* the first main window in the screen lock level can create other
|
||||||
* the higher level will be created.
|
* main windows in the this level. For other clients, a main window in
|
||||||
|
* the higher level will be created.
|
||||||
|
*
|
||||||
|
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
|
||||||
|
* visible on all layers.
|
||||||
|
*
|
||||||
* \note The maximal number of all main windows in the screen lock level is 8.
|
* \note The maximal number of all main windows in the screen lock level is 8.
|
||||||
* MiniGUI will create a main windows in higher level if there is no room
|
* MiniGUI will create a main windows in higher level if there is no room
|
||||||
* in the screen lock level.
|
* in the screen lock level.
|
||||||
*
|
*
|
||||||
* Since 5.0.0.
|
* Since 5.0.0.
|
||||||
*/
|
*/
|
||||||
@@ -4494,13 +4516,18 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
|||||||
* be shown below the main windows in the screen lock level and
|
* be shown below the main windows in the screen lock level and
|
||||||
* above the main windows in the higher level.
|
* above the main windows in the higher level.
|
||||||
*
|
*
|
||||||
* \note Under MiniGUI-Processes runtime mode, only the client which creates
|
* \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
|
||||||
* the first main window in the docker level can create other main windows
|
* layer can create a main window in this levele, and only the client which creates
|
||||||
* in the docker level. For other clients, a main window in the higher
|
* the first main window in the docker level can create other main windows
|
||||||
* level will be created.
|
* in the docker level. For other clients, a main window in the higher
|
||||||
|
* level will be created.
|
||||||
|
*
|
||||||
|
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
|
||||||
|
* visible on all layers.
|
||||||
|
*
|
||||||
* \note The maximal number of all main windows in the docker level is 8.
|
* \note The maximal number of all main windows in the docker level is 8.
|
||||||
* MiniGUI will create a main windows in higher level if there is no room
|
* MiniGUI will create a main windows in higher level if there is no room
|
||||||
* in the docker level.
|
* in the docker level.
|
||||||
*
|
*
|
||||||
* Since 5.0.0.
|
* Since 5.0.0.
|
||||||
*/
|
*/
|
||||||
@@ -4549,13 +4576,18 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
|||||||
* be shown below the main windows in the normal level and
|
* be shown below the main windows in the normal level and
|
||||||
* above the wallpaper.
|
* above the wallpaper.
|
||||||
*
|
*
|
||||||
* \note Under MiniGUI-Processes runtime mode, only the client which creates
|
* \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
|
||||||
* the first main window in the launcher level can create other
|
* layer can create a main window in this levele, and only the client which creates
|
||||||
* main windows in the launcher level. For other clients, a main window
|
* the first main window in the launcher level can create other
|
||||||
* in the normal level will be created.
|
* main windows in the launcher level. For other clients, a main window
|
||||||
|
* in the normal level will be created.
|
||||||
|
*
|
||||||
|
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
|
||||||
|
* visible on all layers.
|
||||||
|
*
|
||||||
* \note The maximal number of all main windows in the launcher level is 8.
|
* \note The maximal number of all main windows in the launcher level is 8.
|
||||||
* MiniGUI will create a main windows in normal level if there is no room
|
* MiniGUI will create a main windows in normal level if there is no room
|
||||||
* in the launcher level.
|
* in the launcher level.
|
||||||
*
|
*
|
||||||
* Since 5.0.0.
|
* Since 5.0.0.
|
||||||
*/
|
*/
|
||||||
@@ -6884,13 +6916,14 @@ static inline BOOL MainWindowThreadCleanup (HWND hMainWnd)
|
|||||||
#define ST_PIXEL_ARGB4444 0x0001
|
#define ST_PIXEL_ARGB4444 0x0001
|
||||||
#define ST_PIXEL_ARGB1555 0x0002
|
#define ST_PIXEL_ARGB1555 0x0002
|
||||||
#define ST_PIXEL_ARGB8888 0x0003
|
#define ST_PIXEL_ARGB8888 0x0003
|
||||||
|
#define ST_PIXEL_XRGB565 0x0004
|
||||||
|
|
||||||
/* other flags for future use */
|
/* other flags for future use */
|
||||||
|
|
||||||
/* for default surface flags */
|
/* for default surface flags */
|
||||||
#define ST_DEFAULT (ST_PIXEL_DEFAULT)
|
#define ST_DEFAULT (ST_PIXEL_DEFAULT)
|
||||||
|
|
||||||
#define CT_SYSTEM_MASK 0X0000FF
|
#define CT_SYSTEM_MASK 0x0000FF
|
||||||
#define CT_OPAQUE 0x000000
|
#define CT_OPAQUE 0x000000
|
||||||
#define CT_COLORKEY 0x000001
|
#define CT_COLORKEY 0x000001
|
||||||
#define CT_ALPHACHANNEL 0x000002
|
#define CT_ALPHACHANNEL 0x000002
|
||||||
@@ -7158,7 +7191,7 @@ MG_EXPORT BOOL GUIAPI SetWindowMaskEx (HWND hWnd, HDC hdc, const BITMAP* mask);
|
|||||||
* \param hWnd The handle to the window.
|
* \param hWnd The handle to the window.
|
||||||
* \param fSet Set or cancel the always top style; TRUE to set, FALSE to cancel.
|
* \param fSet Set or cancel the always top style; TRUE to set, FALSE to cancel.
|
||||||
*
|
*
|
||||||
* \return return TRUE on success, otherwise FALSE.
|
* \return TRUE on success, otherwise FALSE.
|
||||||
*
|
*
|
||||||
* \sa GetWindowStyle, WS_ALWAYSTOP
|
* \sa GetWindowStyle, WS_ALWAYSTOP
|
||||||
*
|
*
|
||||||
@@ -7166,6 +7199,39 @@ MG_EXPORT BOOL GUIAPI SetWindowMaskEx (HWND hWnd, HDC hdc, const BITMAP* mask);
|
|||||||
*/
|
*/
|
||||||
MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop (HWND hWnd, BOOL fSet);
|
MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop (HWND hWnd, BOOL fSet);
|
||||||
|
|
||||||
|
#define GF_SWIPE_HORZ ZOF_GF_SWIPE_HORZ
|
||||||
|
#define GF_SWIPE_VERT ZOF_GF_SWIPE_VERT
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \fn BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags)
|
||||||
|
* \brief Set the gesture flags of a main window.
|
||||||
|
*
|
||||||
|
* This function sets the gesture flags of a specific main window.
|
||||||
|
*
|
||||||
|
* Generally, a main window which needs a specific gesture should handle
|
||||||
|
* \a MSG_GESTURETEST and call this function to set the correct gesture flags for
|
||||||
|
* the main window.
|
||||||
|
*
|
||||||
|
* The MiniGUI Core will send the MSG_GESTURETEST message as a notification
|
||||||
|
* to a main window when it tries to handle a gesture globally. If the main window
|
||||||
|
* sets the flag of the gesture in a specific time, e.g. 100ms, MiniGUI Core will
|
||||||
|
* pass the gesture events to the main window other than handle the gesture by itself.
|
||||||
|
*
|
||||||
|
* \param hWnd The handle to the main window.
|
||||||
|
* \param dwFlags The new gesture flags, can be OR'd with the following values:
|
||||||
|
* - GF_SWIPE_HORZ\n
|
||||||
|
* The main window handles horizontal swipe gesture.
|
||||||
|
* - GF_SWIPE_VERT\n
|
||||||
|
* The main window handles vertical swipe gesture.
|
||||||
|
*
|
||||||
|
* \return TRUE on success, otherwise FALSE.
|
||||||
|
*
|
||||||
|
* \sa MSG_GESTURETEST
|
||||||
|
*
|
||||||
|
* Since 5.0.6
|
||||||
|
*/
|
||||||
|
MG_EXPORT BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags);
|
||||||
|
|
||||||
#ifdef _MGSCHEMA_COMPOSITING
|
#ifdef _MGSCHEMA_COMPOSITING
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7189,14 +7255,14 @@ MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop (HWND hWnd, BOOL fSet);
|
|||||||
* the alpha channel value (0~255) along with the parameter \a arg.
|
* the alpha channel value (0~255) along with the parameter \a arg.
|
||||||
* - CT_LOGICALPIXEL\n
|
* - CT_LOGICALPIXEL\n
|
||||||
* Do the given color logical operation. You should specify the color
|
* Do the given color logical operation. You should specify the color
|
||||||
* logical raster operation along with the pararmeter \a arg. See \a BitBlt.
|
* logical raster operation along with the pararmeter \a arg. See \a ColorLogicalOp.
|
||||||
* - CT_ALPHAPIXEL\n
|
* - CT_ALPHAPIXEL\n
|
||||||
* The alpha component value of the source and/or the destination pixel go
|
* The alpha component value of the source and/or the destination pixel go
|
||||||
* into effect. You can specify the color blend method along
|
* into effect. You can specify the color blend method along
|
||||||
* with the pararmeter \a arg. See \a ColorBlendMethod. Note that a specific
|
* with the pararmeter \a arg. See \a ColorBlendMethod. Note that a specific
|
||||||
* compositor may not support this compositing type. The built-in `fallback`
|
* compositor may not support this compositing type. The built-in `fallback`
|
||||||
* compositor ignores the blend mode argument and only always uses the
|
* compositor uses the blend mode argument when using Pixman, otherwise,
|
||||||
* Porter Duff blend mode: source over destination (COLOR_BLEND_PD_SRC_OVER).
|
* uses the Porter Duff blend mode: source over destination (COLOR_BLEND_PD_SRC_OVER).
|
||||||
* - CT_BLURRED\n
|
* - CT_BLURRED\n
|
||||||
* Apply a Gaussian blur to the background of the main window. You should
|
* Apply a Gaussian blur to the background of the main window. You should
|
||||||
* also specify the radius of the blur (0 ~ 255) in pixles along with the
|
* also specify the radius of the blur (0 ~ 255) in pixles along with the
|
||||||
|
|||||||
+15
-24
@@ -1,28 +1,19 @@
|
|||||||
if MG_MINIMALGDI
|
|
||||||
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_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 \
|
||||||
misc/libmisc.la \
|
misc/libmisc.la \
|
||||||
control/libcontrol.la \
|
control/libcontrol.la \
|
||||||
ex_ctrl/libexctrl.la \
|
ex_ctrl/libexctrl.la \
|
||||||
font/libfont.la \
|
font/libfont.la \
|
||||||
font/in-core/libincore.la \
|
font/in-core/libincore.la \
|
||||||
ial/libial.la \
|
ial/libial.la \
|
||||||
gui/libgui.la \
|
gui/libgui.la \
|
||||||
main/libmain.la \
|
main/libmain.la \
|
||||||
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
|
|
||||||
|
|
||||||
if MGRM_STANDALONE
|
if MGRM_STANDALONE
|
||||||
LITE_LADD = standalone/libstandalone.la
|
LITE_LADD = standalone/libstandalone.la
|
||||||
@@ -45,12 +36,12 @@ SUBDIRS = $(COMMON_SUBDIRS) $(NEWGAL_SUBDIRS) $(LITE_SUBDIRS)
|
|||||||
|
|
||||||
MGSOURCES = template.c template.h
|
MGSOURCES = template.c template.h
|
||||||
MGLIBADD = $(COMMON_LADD) \
|
MGLIBADD = $(COMMON_LADD) \
|
||||||
$(LITE_LADD) \
|
$(LITE_LADD) \
|
||||||
$(NEWGAL_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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-13
@@ -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,25 +1070,22 @@ 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)
|
||||||
|
|||||||
@@ -735,9 +735,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) {
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
+5
-4
@@ -2203,14 +2203,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+29
-17
@@ -75,9 +75,6 @@
|
|||||||
#ifdef _MG_ENABLE_LICENSE
|
#ifdef _MG_ENABLE_LICENSE
|
||||||
# include "../sysres/license/c_files/04_progressbar-bk.dat.c"
|
# include "../sysres/license/c_files/04_progressbar-bk.dat.c"
|
||||||
#endif
|
#endif
|
||||||
#ifndef __TARGET_UNKNOWN__
|
|
||||||
unsigned int g_license_processor_id;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MGHAVE_MENU
|
#ifdef _MGHAVE_MENU
|
||||||
/* function defined in menu module. */
|
/* function defined in menu module. */
|
||||||
@@ -2401,8 +2398,9 @@ static void wndDrawNCFrame(MAINWIN* pWin, HDC hdc, const RECT* prcInvalid)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fGetDC)
|
if (fGetDC) {
|
||||||
release_effective_dc (pWin, hdc);
|
release_effective_dc (pWin, hdc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this function is CONTROL safe. */
|
/* this function is CONTROL safe. */
|
||||||
@@ -3039,11 +3037,6 @@ static PMAINWIN search_win_tree_dfs (struct _search_context *ctxt)
|
|||||||
while (hosted) {
|
while (hosted) {
|
||||||
PMAINWIN found;
|
PMAINWIN found;
|
||||||
|
|
||||||
ctxt->hosting = hosted;
|
|
||||||
if ((found = search_win_tree_dfs (ctxt))) {
|
|
||||||
return found;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hosted->id == ctxt->id &&
|
if (hosted->id == ctxt->id &&
|
||||||
(((ctxt->flags & WIN_SEARCH_FILTER_MAIN) &&
|
(((ctxt->flags & WIN_SEARCH_FILTER_MAIN) &&
|
||||||
hosted->WinType == TYPE_MAINWIN) ||
|
hosted->WinType == TYPE_MAINWIN) ||
|
||||||
@@ -3052,6 +3045,11 @@ static PMAINWIN search_win_tree_dfs (struct _search_context *ctxt)
|
|||||||
return hosted;
|
return hosted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctxt->hosting = hosted;
|
||||||
|
if ((found = search_win_tree_dfs (ctxt))) {
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
hosted = GetNextHosted (hosting, hosted);
|
hosted = GetNextHosted (hosting, hosted);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3074,12 +3072,13 @@ static PMAINWIN search_win_tree_bfs (struct _search_context *ctxt)
|
|||||||
return hosted;
|
return hosted;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctxt->hosting = hosted;
|
if ((ctxt->hosting = GetNextHosted (hosting, hosted))) {
|
||||||
if ((found = search_win_tree_bfs (ctxt))) {
|
if ((found = search_win_tree_bfs (ctxt))) {
|
||||||
return found;
|
return found;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hosted = GetNextHosted (hosting, hosted);
|
hosted = GetFirstHosted (hosted);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3165,8 +3164,8 @@ HWND GUIAPI GetNextChild (HWND hWnd, HWND hChild)
|
|||||||
|
|
||||||
HWND GUIAPI GetNextMainWindow (HWND hMainWnd)
|
HWND GUIAPI GetNextMainWindow (HWND hMainWnd)
|
||||||
{
|
{
|
||||||
MG_CHECK_RET (hMainWnd == HWND_NULL || MG_IS_NORMAL_MAIN_WINDOW (hMainWnd),
|
MG_CHECK_RET (hMainWnd != HWND_NULL &&
|
||||||
HWND_INVALID);
|
!MG_IS_NORMAL_MAIN_WINDOW (hMainWnd), HWND_INVALID);
|
||||||
|
|
||||||
return (HWND)SendMessage (HWND_DESKTOP,
|
return (HWND)SendMessage (HWND_DESKTOP,
|
||||||
MSG_GETNEXTMAINWIN, (WPARAM)hMainWnd, 0L);
|
MSG_GETNEXTMAINWIN, (WPARAM)hMainWnd, 0L);
|
||||||
@@ -4261,7 +4260,7 @@ HWND GUIAPI CreateMainWindowEx2 (PMAINWINCREATE pCreateInfo, LINT id,
|
|||||||
{pCreateInfo->lx, pCreateInfo->ty,
|
{pCreateInfo->lx, pCreateInfo->ty,
|
||||||
pCreateInfo->rx, pCreateInfo->by} };
|
pCreateInfo->rx, pCreateInfo->by} };
|
||||||
|
|
||||||
// we ignore the retval. may fail for client of procs runmode
|
// we ignore the retval. may fail for client under procs runmode
|
||||||
SendMessage (HWND_DESKTOP, MSG_CALC_POSITION, 0, (LPARAM)&info);
|
SendMessage (HWND_DESKTOP, MSG_CALC_POSITION, 0, (LPARAM)&info);
|
||||||
|
|
||||||
pCreateInfo->lx = info.rc.left;
|
pCreateInfo->lx = info.rc.left;
|
||||||
@@ -5393,6 +5392,7 @@ static BOOL _wndInvalidateRect(HWND hWnd, const RECT* prc, BOOL bEraseBkgnd, int
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
_WRN_PRINTF ("The invalid region is forzen\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5573,7 +5573,6 @@ HDC GUIAPI BeginPaint (HWND hWnd)
|
|||||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), HDC_INVALID);
|
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), HDC_INVALID);
|
||||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||||
|
|
||||||
|
|
||||||
if (pWin->pCaretInfo && pWin->pCaretInfo->fBlink) {
|
if (pWin->pCaretInfo && pWin->pCaretInfo->fBlink) {
|
||||||
HideCaretEx (hWnd, FALSE);
|
HideCaretEx (hWnd, FALSE);
|
||||||
pWin->pCaretInfo->fBlink = TRUE;
|
pWin->pCaretInfo->fBlink = TRUE;
|
||||||
@@ -7026,6 +7025,19 @@ BOOL GUIAPI SetMainWindowAlwaysTop (HWND hMainWnd, BOOL fSet)
|
|||||||
MSG_SETALWAYSTOP, (WPARAM)pMainWin, (LPARAM)fSet);
|
MSG_SETALWAYSTOP, (WPARAM)pMainWin, (LPARAM)fSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Since 5.0.6 */
|
||||||
|
BOOL GUIAPI SetMainWindowGestureFlags (HWND hMainWnd, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
PMAINWIN pMainWin;
|
||||||
|
|
||||||
|
if (!(pMainWin = checkAndGetMainWinIfMainWin (hMainWnd))) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (BOOL)SendMessage (HWND_DESKTOP,
|
||||||
|
MSG_SETGESTUREFLAGS, (WPARAM)pMainWin, (LPARAM)dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _MGSCHEMA_COMPOSITING
|
#ifdef _MGSCHEMA_COMPOSITING
|
||||||
BOOL GUIAPI SetMainWindowCompositing (HWND hMainWnd, int type, DWORD arg)
|
BOOL GUIAPI SetMainWindowCompositing (HWND hMainWnd, int type, DWORD arg)
|
||||||
{
|
{
|
||||||
|
|||||||
+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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,8 +153,11 @@ static int EVENT_Open (const char *device)
|
|||||||
*/
|
*/
|
||||||
static void EVENT_Close(void)
|
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"
|
||||||
|
|||||||
+27
-18
@@ -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;
|
||||||
@@ -74,36 +77,35 @@ struct PCXVFbKeyData
|
|||||||
|
|
||||||
typedef struct _XVFBKEYDATA
|
typedef struct _XVFBKEYDATA
|
||||||
{
|
{
|
||||||
unsigned short key_code;
|
unsigned short key_code;
|
||||||
unsigned short key_state;
|
unsigned short key_state;
|
||||||
} XVFBKEYDATA;
|
} XVFBKEYDATA;
|
||||||
|
|
||||||
typedef struct _XVFBMOUSEDATA
|
typedef struct _XVFBMOUSEDATA
|
||||||
{
|
{
|
||||||
unsigned short x;
|
unsigned short x;
|
||||||
unsigned short y;
|
unsigned short y;
|
||||||
unsigned int button;
|
unsigned int button;
|
||||||
} XVFBMOUSEDATA;
|
} 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;
|
|
||||||
} XVFBEVENT;
|
} XVFBEVENT;
|
||||||
|
|
||||||
typedef struct _XVFBCaptionEventData{
|
typedef struct _XVFBCaptionEventData{
|
||||||
int event_type;
|
int event_type;
|
||||||
int size;
|
int size;
|
||||||
char buff[0];
|
char buff[0];
|
||||||
}XVFBCaptionEventData;
|
}XVFBCaptionEventData;
|
||||||
|
|
||||||
typedef struct _XVFBIMEEventData{
|
typedef struct _XVFBIMEEventData{
|
||||||
int event_type;
|
int event_type;
|
||||||
int ime_open;
|
int ime_open;
|
||||||
}XVFBIMEEventData;
|
}XVFBIMEEventData;
|
||||||
|
|
||||||
typedef struct _XVFBIMEMSGEventData{
|
typedef struct _XVFBIMEMSGEventData{
|
||||||
@@ -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);
|
||||||
|
|||||||
+17
-11
@@ -689,21 +689,19 @@ 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
|
||||||
snprintf(path, sizeof(path), "%s", template);
|
snprintf(path, sizeof(path), "%s", template);
|
||||||
#endif
|
#endif
|
||||||
path[sizeof(path)/sizeof(path[0])-1] = 0;
|
path[sizeof(path)/sizeof(path[0])-1] = 0;
|
||||||
|
|
||||||
open_rec (path);
|
open_rec (path);
|
||||||
record_time_start = getcurtime();
|
record_time_start = getcurtime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -725,6 +723,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,7 +739,7 @@ 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");
|
||||||
}
|
}
|
||||||
@@ -741,4 +747,4 @@ void TermPCXVFBInput (void)
|
|||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _MGGAL_PCXVFB*/
|
#endif /* _MGGAL_PCXVFB */
|
||||||
|
|||||||
@@ -0,0 +1,252 @@
|
|||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifdef _MGIAL_SINGLETOUCHKEY
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <linux/input.h>
|
||||||
|
|
||||||
|
#include "minigui.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "ial.h"
|
||||||
|
|
||||||
|
#include "singletouchkey.h"
|
||||||
|
|
||||||
|
#define LEN_TOUCH_DEV 127
|
||||||
|
|
||||||
|
static int sg_tp_event_fd = -1, sg_key_event_fd = -1;
|
||||||
|
static short MOUSEX = 0, MOUSEY = 0, MOUSEBUTTON = 0;
|
||||||
|
|
||||||
|
static int get_touch_data (short *x, short *y, short *button)
|
||||||
|
{
|
||||||
|
struct input_event data;
|
||||||
|
|
||||||
|
while (read (sg_tp_event_fd, &data, sizeof (data)) == sizeof (data)) {
|
||||||
|
|
||||||
|
/* do nothing for EV_SYN due to non-blocking read.
|
||||||
|
if (data.type == EV_SYN) {
|
||||||
|
if (data.code == SYN_REPORT) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else if (data.code == SYN_MT_REPORT) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (data.type == EV_KEY) {
|
||||||
|
switch (data.code) {
|
||||||
|
case BTN_TOUCH:
|
||||||
|
if (data.value > 0)
|
||||||
|
*button = IAL_MOUSE_LEFTBUTTON;
|
||||||
|
else
|
||||||
|
*button = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
_WRN_PRINTF ("unknow event code for EV_KEY event: 0x%x, 0x%x\n", data.code, data.value);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (data.type == EV_ABS) {
|
||||||
|
switch (data.code) {
|
||||||
|
case ABS_X:
|
||||||
|
*x = data.value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABS_Y:
|
||||||
|
*y = data.value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABS_MT_POSITION_X:
|
||||||
|
*x = data.value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABS_MT_POSITION_Y:
|
||||||
|
*y = data.value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABS_MT_TOUCH_MAJOR:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABS_MT_WIDTH_MAJOR:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABS_MT_TRACKING_ID:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
_WRN_PRINTF ("unknow event code for EV_ABS event: 0x%x, 0x%x.\n", data.code, data.value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int mouse_update (void)
|
||||||
|
{
|
||||||
|
if (get_touch_data (&MOUSEX, &MOUSEY, &MOUSEBUTTON) == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void mouse_getxy (int *x, int* y)
|
||||||
|
{
|
||||||
|
*x = MOUSEX;
|
||||||
|
*y = MOUSEY;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int mouse_getbutton (void)
|
||||||
|
{
|
||||||
|
if (MOUSEBUTTON == IAL_MOUSE_LEFTBUTTON)
|
||||||
|
return IAL_MOUSE_LEFTBUTTON;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int wait_event (int which, int maxfd, fd_set *in, fd_set *out, fd_set *except,
|
||||||
|
struct timeval *timeout)
|
||||||
|
{
|
||||||
|
fd_set rfds;
|
||||||
|
int e;
|
||||||
|
int retvalue = 0;
|
||||||
|
|
||||||
|
if (!in) {
|
||||||
|
in = &rfds;
|
||||||
|
FD_ZERO (in);
|
||||||
|
}
|
||||||
|
|
||||||
|
FD_SET (sg_tp_event_fd, in);
|
||||||
|
if (sg_tp_event_fd > maxfd)
|
||||||
|
maxfd = sg_tp_event_fd;
|
||||||
|
|
||||||
|
if (sg_key_event_fd >= 0) {
|
||||||
|
FD_SET (sg_key_event_fd, in);
|
||||||
|
if (sg_key_event_fd > maxfd)
|
||||||
|
maxfd = sg_key_event_fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
e = select (maxfd + 1, in, out, except, timeout);
|
||||||
|
if (e > 0) {
|
||||||
|
if (FD_ISSET (sg_tp_event_fd, in)) {
|
||||||
|
retvalue |= IAL_MOUSEEVENT;
|
||||||
|
}
|
||||||
|
if (sg_key_event_fd >= 0 && FD_ISSET (sg_key_event_fd, in)) {
|
||||||
|
retvalue |= IAL_KEYEVENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (e < 0) {
|
||||||
|
retvalue = -1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
retvalue = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return retvalue;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL ial_InitSingleTouchKey (INPUT* input, const char* mdev, const char* mtype)
|
||||||
|
{
|
||||||
|
char touch_dev[LEN_TOUCH_DEV + 1];
|
||||||
|
if (GetMgEtcValue ("singletouchkey", "touch_dev", touch_dev, LEN_TOUCH_DEV) < 0) {
|
||||||
|
strcpy (touch_dev, "none");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp (touch_dev, "none") == 0) {
|
||||||
|
_WRN_PRINTF ("no touch_dev defined.\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
sg_tp_event_fd = open (touch_dev, O_RDONLY | O_NONBLOCK);
|
||||||
|
if (sg_tp_event_fd < 0) {
|
||||||
|
_WRN_PRINTF ("failed when opening touch event device: %s\n", touch_dev);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
input->update_mouse = mouse_update;
|
||||||
|
input->get_mouse_xy = mouse_getxy;
|
||||||
|
input->set_mouse_xy = NULL;
|
||||||
|
input->get_mouse_button = mouse_getbutton;
|
||||||
|
input->set_mouse_range = NULL;
|
||||||
|
input->suspend_mouse= NULL;
|
||||||
|
input->resume_mouse = NULL;
|
||||||
|
|
||||||
|
input->update_keyboard = NULL;
|
||||||
|
input->get_keyboard_state = NULL;
|
||||||
|
input->suspend_keyboard = NULL;
|
||||||
|
input->resume_keyboard = NULL;
|
||||||
|
input->set_leds = NULL;
|
||||||
|
|
||||||
|
input->wait_event = wait_event;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TermSingleTouchKey (void)
|
||||||
|
{
|
||||||
|
if (sg_tp_event_fd >= 0)
|
||||||
|
close (sg_tp_event_fd);
|
||||||
|
|
||||||
|
if (sg_key_event_fd >= 0)
|
||||||
|
close (sg_key_event_fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _MGIAL_SINGLETOUCHKEY */
|
||||||
|
|
||||||
@@ -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 */
|
||||||
|
|
||||||
|
|
||||||
@@ -7,4 +7,4 @@ noinst_HEADERS = \
|
|||||||
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
|
||||||
|
|||||||
+17
-10
@@ -52,21 +52,28 @@
|
|||||||
#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 _MGRM_THREADS
|
||||||
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
|
||||||
|
|||||||
+23
-6
@@ -101,8 +101,14 @@
|
|||||||
#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"
|
||||||
|
// 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 +123,10 @@
|
|||||||
// 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
|
||||||
|
|
||||||
|
#define REQID_SYS_LAST REQID_AUTHCLIENT
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX: To fellows who need to add a new REQID,
|
* XXX: To fellows who need to add a new REQID,
|
||||||
@@ -135,8 +144,13 @@ MGUI_COMPILE_TIME_ASSERT(sys_request_id, MAX_SYS_REQID >= REQID_SYS_LAST);
|
|||||||
|
|
||||||
/* 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 +164,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 +223,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
|
||||||
|
|||||||
+19
-26
@@ -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
|
||||||
#define DEF_NR_TOPMOSTS 16
|
#ifdef _MGRM_PROCESSES // per layer basis
|
||||||
#define DEF_NR_NORMALS 128
|
# define DEF_NR_TOPMOSTS 8
|
||||||
|
# define DEF_NR_NORMALS 32
|
||||||
|
#else
|
||||||
|
# define DEF_NR_TOPMOSTS 16
|
||||||
|
# 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 */
|
||||||
|
|
||||||
|
|||||||
@@ -713,6 +713,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
|
||||||
|
|||||||
@@ -527,7 +527,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
|
||||||
|
|||||||
+9
-111
@@ -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 */
|
||||||
|
|
||||||
/*
|
#define __mg_license_on_input() /* NULL */
|
||||||
* ScreenSaver & Watermark
|
#define __mg_license_on_timeout() /* NULL */
|
||||||
*/
|
#define LICENSE_CHECK_CUSTIMER_ID() /* NULL */
|
||||||
#if defined(_MG_ENABLE_SCREENSAVER) || defined(_MG_ENABLE_WATERMARK)
|
#define license_get_processor_id() /* NULL */
|
||||||
MG_LOCAL void __mg_license_on_input(void);
|
#define LICENSE_SET_MESSAGE_OFFSET() /* NULL */
|
||||||
MG_LOCAL void __mg_license_on_timeout(void);
|
#define LICENSE_MODIFY_MESSAGE(x) /* NULL */
|
||||||
#else
|
|
||||||
# define __mg_license_on_input() /* 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 */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __TARGET_UNKNOWN__
|
|
||||||
|
|
||||||
# define license_get_processor_id() /* NULL */
|
|
||||||
# define LICENSE_SET_MESSAGE_OFFSET() /* 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 */
|
||||||
|
|||||||
+34
-11
@@ -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 & (0x80 >> j))
|
if (*bitmap == 0xFF) {
|
||||||
idle++;
|
idle += 8;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (*bitmap & 0xF0) {
|
||||||
|
for (j = 0; j < 4; j++) {
|
||||||
|
if (*bitmap & (0x80 >> j))
|
||||||
|
idle++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (*bitmap & 0x0F) {
|
||||||
|
for (j = 0; j < 4; j++) {
|
||||||
|
if (*bitmap & (0x08 >> j))
|
||||||
|
idle++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitmap++;
|
bitmap++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return idle;
|
return idle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+167
-49
@@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
#include "gdi.h"
|
#include "gdi.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
|
#include "blockheap.h"
|
||||||
|
|
||||||
#if IS_COMPOSITING_SCHEMA
|
#if IS_COMPOSITING_SCHEMA
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -64,7 +65,12 @@
|
|||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if IS_SHAREDFB_SCHEMA_PROCS
|
||||||
|
#include <semaphore.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DISABLE_THREADS
|
#define DISABLE_THREADS
|
||||||
|
|
||||||
#define GAL_mutex int
|
#define GAL_mutex int
|
||||||
|
|
||||||
#define GAL_bool BOOL
|
#define GAL_bool BOOL
|
||||||
@@ -131,15 +137,10 @@ typedef struct _DirtyInfo {
|
|||||||
* than the creator.
|
* than the creator.
|
||||||
*/
|
*/
|
||||||
typedef struct _SharedSurfaceHeader {
|
typedef struct _SharedSurfaceHeader {
|
||||||
#if 0
|
|
||||||
/* The semaphore for this shared surface */
|
|
||||||
sem_t sem_lock;
|
|
||||||
#else
|
|
||||||
/* The number of semphore for this surface.
|
/* The number of semphore for this surface.
|
||||||
The SysV semaphore set id for synchronizing this shared surface:
|
The SysV semaphore set id for synchronizing this shared surface:
|
||||||
SHAREDRES_SEMID_SHARED_SURF. */
|
SHAREDRES_SEMID_SHARED_SURF. */
|
||||||
int sem_num;
|
int sem_num;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The pid of the creator */
|
/* The pid of the creator */
|
||||||
pid_t creator;
|
pid_t creator;
|
||||||
@@ -159,27 +160,39 @@ typedef struct _SharedSurfaceHeader {
|
|||||||
/* the RGBA masks */
|
/* the RGBA masks */
|
||||||
Uint32 Rmask, Gmask, Bmask, Amask;
|
Uint32 Rmask, Gmask, Bmask, Amask;
|
||||||
|
|
||||||
/* the size of the buffer */
|
/* the size of the whole buffer */
|
||||||
size_t buf_size;
|
size_t map_size;
|
||||||
/* the pixels */
|
/* the offset of pixels data */
|
||||||
char buf[0];
|
off_t pixels_off;
|
||||||
} GAL_SharedSurfaceHeader;
|
} GAL_SharedSurfaceHeader;
|
||||||
#endif /* IS_COMPOSITING_SCHEMA */
|
#endif /* IS_COMPOSITING_SCHEMA */
|
||||||
|
|
||||||
|
/* The header for shadow screen; used to store the dirty rectangle. */
|
||||||
|
typedef struct _ShadowSurfaceHeader {
|
||||||
|
/* The dirty rectangle */
|
||||||
|
RECT dirty_rc;
|
||||||
|
} GAL_ShadowSurfaceHeader;
|
||||||
|
|
||||||
|
#ifdef _MGUSE_PIXMAN
|
||||||
|
typedef union pixman_image pixman_image_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This structure should be treated as read-only, except for 'pixels',
|
* This structure should be treated as read-only, except for 'pixels',
|
||||||
* which, if not NULL, contains the raw pixel data for the surface.
|
* which, if not NULL, contains the raw pixel data for the surface.
|
||||||
*/
|
*/
|
||||||
typedef struct GAL_Surface {
|
typedef struct GAL_Surface {
|
||||||
Uint32 flags; /* Read-only */
|
void *video; /* Read-only */
|
||||||
GAL_PixelFormat *format; /* Read-only */
|
GAL_PixelFormat *format; /* Read-only */
|
||||||
void *video; /* Read-only */
|
|
||||||
int w, h; /* Read-only */
|
Uint32 flags; /* Read-only */
|
||||||
|
Uint32 pixels_off; /* Read-only; since 5.0.0, replace old offset */
|
||||||
|
int w, h; /* Read-only */
|
||||||
|
|
||||||
/* VW[2018-01-18]: For 64b, use signed int instead of Uint32 for pitch. */
|
/* VW[2018-01-18]: For 64b, use signed int instead of Uint32 for pitch. */
|
||||||
int pitch; /* Read-only */
|
int pitch; /* Read-only */
|
||||||
int dpi; /* Read-only */
|
int dpi; /* Read-only */
|
||||||
void *pixels; /* Read-write */
|
void *pixels; /* Read-write */
|
||||||
int offset; /* Private */
|
|
||||||
|
|
||||||
/* Hardware-specific surface info */
|
/* Hardware-specific surface info */
|
||||||
struct private_hwdata *hwdata;
|
struct private_hwdata *hwdata;
|
||||||
@@ -199,7 +212,15 @@ typedef struct GAL_Surface {
|
|||||||
unsigned int format_version; /* Private */
|
unsigned int format_version; /* Private */
|
||||||
|
|
||||||
/* reference count -- used when freeing surface */
|
/* reference count -- used when freeing surface */
|
||||||
int refcount; /* Read-mostly */
|
unsigned int refcount; /* Read-mostly */
|
||||||
|
|
||||||
|
#ifdef _MGUSE_PIXMAN
|
||||||
|
pixman_image_t *pix_img; /* The pixman image object for this surface */
|
||||||
|
pixman_image_t *msk_img;
|
||||||
|
uint16_t pix_op;
|
||||||
|
uint16_t pix_filter;
|
||||||
|
uint32_t pix_alpha_bits;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if IS_COMPOSITING_SCHEMA
|
#if IS_COMPOSITING_SCHEMA
|
||||||
/* The pointer to GAL_SharedSurfaceHeader if the surface
|
/* The pointer to GAL_SharedSurfaceHeader if the surface
|
||||||
@@ -212,27 +233,46 @@ typedef struct GAL_Surface {
|
|||||||
|
|
||||||
/* These are the currently supported flags for the GAL_surface */
|
/* These are the currently supported flags for the GAL_surface */
|
||||||
/* Available for GAL_CreateRGBSurface() or GAL_SetVideoMode() */
|
/* Available for GAL_CreateRGBSurface() or GAL_SetVideoMode() */
|
||||||
#define GAL_SWSURFACE MEMDC_FLAG_SWSURFACE /* Surface is in system memory */
|
|
||||||
#define GAL_HWSURFACE MEMDC_FLAG_HWSURFACE /* Surface is in video memory */
|
#define GAL_SWSURFACE 0x00000000 /* Surface is in system memory */
|
||||||
#define GAL_ASYNCBLIT 0x00000004 /* Use asynchronous blits if possible */
|
#define GAL_HWSURFACE 0x00000001 /* Surface is in video memory */
|
||||||
/* Available for GAL_SetVideoMode() */
|
#define GAL_ASYNCBLIT 0x00000004 /* Use asynchronous blits if possible */
|
||||||
#define GAL_ANYFORMAT 0x10000000 /* Allow any video depth/pixel-format */
|
|
||||||
#define GAL_HWPALETTE 0x20000000 /* Surface has exclusive palette */
|
#define GAL_SRCCOLORKEY 0x00001000 /* Blit uses a source color key */
|
||||||
#define GAL_DOUBLEBUF 0x40000000 /* Set up double-buffered video mode */
|
#define GAL_RLEACCELOK 0x00002000 /* Private flag */
|
||||||
#define GAL_FULLSCREEN 0x80000000 /* Surface is a full screen display */
|
#define GAL_RLEACCEL 0x00004000 /* Surface is RLE encoded */
|
||||||
|
|
||||||
|
#define GAL_SRCALPHA 0x00010000 /* Blit uses source alpha blending */
|
||||||
|
#define GAL_SRCPIXELALPHA 0x00020000 /* Blit uses source per-pixel alpha blending */
|
||||||
|
|
||||||
/* Used internally (read-only) */
|
/* Used internally (read-only) */
|
||||||
#define GAL_HWACCEL 0x00000100 /* Blit uses hardware acceleration */
|
#define GAL_HWACCEL 0x00000100 /* Blit uses hardware acceleration */
|
||||||
#define GAL_SRCCOLORKEY MEMDC_FLAG_SRCCOLORKEY /* Blit uses a source color key */
|
|
||||||
#define GAL_RLEACCELOK 0x00002000 /* Private flag */
|
#define GAL_PREALLOC 0x01000000 /* Surface uses preallocated memory */
|
||||||
#define GAL_RLEACCEL MEMDC_FLAG_RLEACCEL /* Surface is RLE encoded */
|
#define GAL_FORMAT_CHECKED 0x02000000 /* Pixman format checked */
|
||||||
#define GAL_SRCALPHA MEMDC_FLAG_SRCALPHA /* Blit uses source alpha blending */
|
|
||||||
#define GAL_SRCPIXELALPHA MEMDC_FLAG_SRCPIXELALPHA /* Blit uses source per-pixel alpha blending */
|
/* Available for GAL_SetVideoMode() */
|
||||||
#define GAL_PREALLOC 0x01000000 /* Surface uses preallocated memory */
|
#define GAL_ANYFORMAT 0x10000000 /* Allow any video depth/pixel-format */
|
||||||
|
#define GAL_HWPALETTE 0x20000000 /* Surface has exclusive palette */
|
||||||
|
#define GAL_DOUBLEBUF 0x40000000 /* Set up double-buffered video mode */
|
||||||
|
#define GAL_FULLSCREEN 0x80000000 /* Surface is a full screen display */
|
||||||
|
|
||||||
|
/* Make sure the macros are ok */
|
||||||
|
#define MGUI_COMPILE_TIME_ASSERT(name, x) \
|
||||||
|
typedef int MGUI_dummy_ ## name[((x)?1:0) * 2 - 1]
|
||||||
|
|
||||||
|
MGUI_COMPILE_TIME_ASSERT(swsurface, GAL_SWSURFACE == MEMDC_FLAG_SWSURFACE);
|
||||||
|
MGUI_COMPILE_TIME_ASSERT(hwsurface, GAL_HWSURFACE == MEMDC_FLAG_HWSURFACE);
|
||||||
|
MGUI_COMPILE_TIME_ASSERT(colorkey, GAL_SRCCOLORKEY == MEMDC_FLAG_SRCCOLORKEY);
|
||||||
|
MGUI_COMPILE_TIME_ASSERT(rleaccel, GAL_RLEACCEL == MEMDC_FLAG_RLEACCEL);
|
||||||
|
MGUI_COMPILE_TIME_ASSERT(srcalpha, GAL_SRCALPHA == MEMDC_FLAG_SRCALPHA);
|
||||||
|
MGUI_COMPILE_TIME_ASSERT(srcpixelapha, GAL_SRCPIXELALPHA == MEMDC_FLAG_SRCPIXELALPHA);
|
||||||
|
|
||||||
|
#undef MGUI_COMPILE_TIME_ASSERT
|
||||||
|
|
||||||
/* Evaluates to true if the surface needs to be locked before access */
|
/* Evaluates to true if the surface needs to be locked before access */
|
||||||
#define GAL_MUSTLOCK(surface) \
|
#define GAL_MUSTLOCK(surface) \
|
||||||
(surface->offset || \
|
((surface->flags & (GAL_HWSURFACE|GAL_ASYNCBLIT|GAL_RLEACCEL)) != 0)
|
||||||
((surface->flags & (GAL_HWSURFACE|GAL_ASYNCBLIT|GAL_RLEACCEL)) != 0))
|
|
||||||
|
|
||||||
/* Useful for determining the video hardware capabilities */
|
/* Useful for determining the video hardware capabilities */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -401,7 +441,7 @@ void GAL_UpdateRect
|
|||||||
(GAL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h);
|
(GAL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h);
|
||||||
|
|
||||||
#ifdef _MGUSE_UPDATE_REGION
|
#ifdef _MGUSE_UPDATE_REGION
|
||||||
BLOCKHEAP __mg_free_update_region_list;
|
extern BLOCKHEAP __mg_free_update_region_list;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BOOL GAL_SyncUpdate (GAL_Surface *screen);
|
BOOL GAL_SyncUpdate (GAL_Surface *screen);
|
||||||
@@ -594,6 +634,7 @@ GAL_Surface *GAL_CreateSharedRGBSurface (GAL_VideoDevice* video,
|
|||||||
#define ST_PIXEL_ARGB4444 0x0001
|
#define ST_PIXEL_ARGB4444 0x0001
|
||||||
#define ST_PIXEL_ARGB1555 0x0002
|
#define ST_PIXEL_ARGB1555 0x0002
|
||||||
#define ST_PIXEL_ARGB8888 0x0003
|
#define ST_PIXEL_ARGB8888 0x0003
|
||||||
|
#define ST_PIXEL_XRGB565 0x0004
|
||||||
#endif /* not define ST_PIXEL_MASK */
|
#endif /* not define ST_PIXEL_MASK */
|
||||||
|
|
||||||
/* Allocate a shared RGB surface from the current video device. */
|
/* Allocate a shared RGB surface from the current video device. */
|
||||||
@@ -767,6 +808,51 @@ void GAL_GetClipRect (GAL_Surface *surface, GAL_Rect *rect);
|
|||||||
GAL_Surface *GAL_ConvertSurface
|
GAL_Surface *GAL_ConvertSurface
|
||||||
(GAL_Surface *src, GAL_PixelFormat *fmt, Uint32 flags);
|
(GAL_Surface *src, GAL_PixelFormat *fmt, Uint32 flags);
|
||||||
|
|
||||||
|
#ifdef _MGUSE_PIXMAN
|
||||||
|
BOOL GAL_CreatePixmanImage (GAL_Surface *surface);
|
||||||
|
static inline BOOL GAL_CheckPixmanFormats (GAL_Surface *src, GAL_Surface *dst)
|
||||||
|
{
|
||||||
|
if (GAL_CreatePixmanImage (src)) {
|
||||||
|
if (dst != NULL && dst != src)
|
||||||
|
return GAL_CreatePixmanImage (dst);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GAL_SetupBlitting (GAL_Surface *src, GAL_Surface *dst, DWORD ops);
|
||||||
|
|
||||||
|
int GAL_CleanupBlitting (GAL_Surface *src, GAL_Surface *dst);
|
||||||
|
|
||||||
|
int GAL_SetupStretchBlit (GAL_Surface *src, GAL_Rect *srcrect,
|
||||||
|
GAL_Surface *dst, GAL_Rect *dstrect,
|
||||||
|
const STRETCH_EXTRA_INFO *sei, DWORD ops);
|
||||||
|
|
||||||
|
int GAL_CleanupStretchBlit (GAL_Surface *src, GAL_Surface *dst);
|
||||||
|
|
||||||
|
#else /* defined _MGUSE_PIXMAN */
|
||||||
|
|
||||||
|
static inline int GAL_SetupBlitting (GAL_Surface *src, GAL_Surface *dst, DWORD ops) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int GAL_CleanupBlitting (GAL_Surface *src, GAL_Surface *dst) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int GAL_SetupStretchBlit (GAL_Surface *src, GAL_Rect *srcrect,
|
||||||
|
GAL_Surface *dst, GAL_Rect *dstrect,
|
||||||
|
const STRETCH_EXTRA_INFO *sei, DWORD ops) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int GAL_CleanupStretchBlit (GAL_Surface *src, GAL_Surface *dst) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* not defined _MGUSE_PIXMAN */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This performs a fast blit from the source surface to the destination
|
* This performs a fast blit from the source surface to the destination
|
||||||
* surface. It assumes that the source and destination rectangles are
|
* surface. It assumes that the source and destination rectangles are
|
||||||
@@ -833,21 +919,26 @@ GAL_Surface *GAL_ConvertSurface
|
|||||||
* fullscreen application. The lock will also fail until you have access
|
* fullscreen application. The lock will also fail until you have access
|
||||||
* to the video memory again.
|
* to the video memory again.
|
||||||
*/
|
*/
|
||||||
/* You should call GAL_BlitSurface() unless you know exactly how GAL
|
|
||||||
blitting works internally and how to use the other blit functions.
|
|
||||||
*/
|
|
||||||
#define GAL_BlitSurface GAL_UpperBlit
|
|
||||||
|
|
||||||
/* This is the public blit function, GAL_BlitSurface(), and it performs
|
/* This is the public blit function, GAL_BlitSurface(), and it performs
|
||||||
rectangle validation and clipping before passing it to GAL_LowerBlit()
|
rectangle validation and clipping before passing it to GAL_LowerBlit()
|
||||||
*/
|
*/
|
||||||
int GAL_UpperBlit (GAL_Surface *src, GAL_Rect *srcrect,
|
int GAL_UpperBlit (GAL_Surface *src, GAL_Rect *srcrect,
|
||||||
GAL_Surface *dst, GAL_Rect *dstrect);
|
GAL_Surface *dst, GAL_Rect *dstrect, DWORD op);
|
||||||
|
|
||||||
/* This is a semi-private blit function and it performs low-level surface
|
/* This is a semi-private blit function and it performs low-level surface
|
||||||
blitting only.
|
blitting only.
|
||||||
*/
|
*/
|
||||||
int GAL_LowerBlit (GAL_Surface *src, GAL_Rect *srcrect,
|
int GAL_LowerBlit (GAL_Surface *src, GAL_Rect *srcrect,
|
||||||
GAL_Surface *dst, GAL_Rect *dstrect);
|
GAL_Surface *dst, GAL_Rect *dstrect, DWORD op);
|
||||||
|
|
||||||
|
/* You should call GAL_BlitSurface() unless you know exactly how GAL
|
||||||
|
blitting works internally and how to use the other blit functions.
|
||||||
|
*/
|
||||||
|
static inline int GAL_BlitSurface (GAL_Surface *src, GAL_Rect *srcrect,
|
||||||
|
GAL_Surface *dst, GAL_Rect *dstrect)
|
||||||
|
{
|
||||||
|
return GAL_UpperBlit (src, srcrect, dst, dstrect, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function performs a fast fill of the given rectangle with 'color'
|
* This function performs a fast fill of the given rectangle with 'color'
|
||||||
@@ -858,14 +949,12 @@ int GAL_LowerBlit (GAL_Surface *src, GAL_Rect *srcrect,
|
|||||||
* can be generated by the GAL_MapRGB() function.
|
* can be generated by the GAL_MapRGB() function.
|
||||||
* This function returns 0 on success, or -1 on error.
|
* This function returns 0 on success, or -1 on error.
|
||||||
*/
|
*/
|
||||||
int GAL_FillRect
|
int GAL_FillRect (GAL_Surface *dst, const GAL_Rect *dstrect, Uint32 color);
|
||||||
(GAL_Surface *dst, const GAL_Rect *dstrect, Uint32 color);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function returns the size of pad-aligned box bitmap.
|
* This function returns the size of pad-aligned box bitmap.
|
||||||
*/
|
*/
|
||||||
Uint32 GAL_GetBoxSize
|
Uint32 GAL_GetBoxSize (GAL_Surface *src, Uint32 w, Uint32 h, Uint32* pitch_p);
|
||||||
(GAL_Surface *src, Uint32 w, Uint32 h, Uint32* pitch_p);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function copies pixels in a rect from the surface to a box.
|
* This function copies pixels in a rect from the surface to a box.
|
||||||
@@ -913,8 +1002,9 @@ GAL_Surface * GAL_DisplayFormat (GAL_Surface *surface);
|
|||||||
*/
|
*/
|
||||||
GAL_Surface * GAL_DisplayFormatAlpha (GAL_Surface *surface);
|
GAL_Surface * GAL_DisplayFormatAlpha (GAL_Surface *surface);
|
||||||
|
|
||||||
int GAL_SoftStretch (GAL_Surface *src, GAL_Rect *srcrect,
|
int GAL_StretchBlt (GAL_Surface *src, GAL_Rect *srcrect,
|
||||||
GAL_Surface *dst, GAL_Rect *dstrect);
|
GAL_Surface *dst, GAL_Rect *dstrect,
|
||||||
|
const STRETCH_EXTRA_INFO *sei, DWORD ops);
|
||||||
|
|
||||||
#ifdef _MGSCHEMA_COMPOSITING
|
#ifdef _MGSCHEMA_COMPOSITING
|
||||||
extern GAL_Surface* __gal_screen;
|
extern GAL_Surface* __gal_screen;
|
||||||
@@ -958,6 +1048,34 @@ BYTE* gal_PutPixelKeyAlpha (GAL_Surface* dst,
|
|||||||
|
|
||||||
#define mg_TerminateGAL GAL_VideoQuit
|
#define mg_TerminateGAL GAL_VideoQuit
|
||||||
|
|
||||||
|
#ifdef _MGRM_PROCESSES
|
||||||
|
/* Since 5.0.0: copy video information to the shared resource */
|
||||||
|
BOOL GAL_CopyVideoInfoToSharedRes (void);
|
||||||
|
|
||||||
|
/* Since 5.0.0: create/attach a surface in/to named shared memory */
|
||||||
|
GAL_Surface * GAL_CreateRGBSurfaceInShm (const char* shm_name, BOOL create,
|
||||||
|
Uint32 rw_modes, Uint32 hdr_size, int width, int height, int depth,
|
||||||
|
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
|
||||||
|
|
||||||
|
#endif /* _MGRM_PROCESSES */
|
||||||
|
|
||||||
|
#ifdef _MGGAL_DRM
|
||||||
|
/* functions implemented in DRM engine. */
|
||||||
|
BOOL __drm_get_surface_info (GAL_Surface *surface, DrmSurfaceInfo* info);
|
||||||
|
|
||||||
|
GAL_Surface* __drm_create_surface_from_name (GHANDLE video,
|
||||||
|
uint32_t name, uint32_t drm_format, uint32_t pixels_off,
|
||||||
|
uint32_t width, uint32_t height, uint32_t pitch);
|
||||||
|
|
||||||
|
GAL_Surface* __drm_create_surface_from_handle (GHANDLE video,
|
||||||
|
uint32_t handle, size_t size, uint32_t drm_format, uint32_t pixels_off,
|
||||||
|
uint32_t width, uint32_t height, uint32_t pitch);
|
||||||
|
|
||||||
|
GAL_Surface* __drm_create_surface_from_prime_fd (GHANDLE video,
|
||||||
|
int prime_fd, size_t size, uint32_t drm_format, uint32_t pixels_off,
|
||||||
|
uint32_t width, uint32_t height, uint32_t pitch);
|
||||||
|
#endif /* defined _MGGAL_DRM */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user