mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 17:44:19 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b01f35cac | ||
|
|
e0b6a64402 | ||
|
|
084d7e58a2 | ||
|
|
88753a5fd0 | ||
|
|
b739daadba | ||
|
|
5529ab1e10 | ||
|
|
032fdcc3bb | ||
|
|
1cb9922dad | ||
|
|
8ac0d539d0 | ||
|
|
e3ae994212 | ||
|
|
b0145a15d2 | ||
|
|
9dab380f3e | ||
|
|
d1facd5468 | ||
|
|
5996ede23b | ||
|
|
837cd49045 | ||
|
|
dc4f54ffe4 | ||
|
|
f611fe3859 | ||
|
|
4ff5097dfb | ||
|
|
49421e1f88 | ||
|
|
6e33602e7d | ||
|
|
d13c31a08a | ||
|
|
704b6287ff | ||
|
|
1df726dd10 | ||
|
|
b2afe815b5 | ||
|
|
f648c1a8c7 | ||
|
|
4d2fe61e52 | ||
|
|
9644964e9c | ||
|
|
61b799af88 | ||
|
|
2f52006cde | ||
|
|
cf063aad32 | ||
|
|
0855e8b972 | ||
|
|
a501557532 | ||
|
|
820d6aeac4 | ||
|
|
215242e3e8 | ||
|
|
c79f09fe87 | ||
|
|
f68c26860a | ||
|
|
53f1a05526 | ||
|
|
6a5cfd1052 | ||
|
|
1c79cf510f | ||
|
|
86965a0e9c | ||
|
|
9cca87878c | ||
|
|
2cffa1154c | ||
|
|
9adea7df64 | ||
|
|
8f70dfcf69 | ||
|
|
ccf1e6f7a5 | ||
|
|
913ea4db23 | ||
|
|
55baa8c741 | ||
|
|
db63d8cad3 | ||
|
|
338fb0276e | ||
|
|
8dd64e7f2d | ||
|
|
c1cbb8423e | ||
|
|
a95ee5b181 | ||
|
|
9d9bf95c21 | ||
|
|
ed6ceaa49c | ||
|
|
f5e1144cbe | ||
|
|
c890e4296a | ||
|
|
d09313407e | ||
|
|
7dfe5954f5 | ||
|
|
390c5de6ef | ||
|
|
274fdaaa31 | ||
|
|
04725fc892 | ||
|
|
4da29f635d | ||
|
|
3e5ff0af91 | ||
|
|
1820e74b77 | ||
|
|
2278c4975c | ||
|
|
af8a04570d | ||
|
|
452edfa831 | ||
|
|
4fba705082 | ||
|
|
a049e387e0 | ||
|
|
c67a18536d | ||
|
|
d9e09ac34f | ||
|
|
65972861a0 | ||
|
|
96b06544b3 | ||
|
|
838530d6b1 | ||
|
|
c276122f60 | ||
|
|
46a8b1768a | ||
|
|
d5b57e8200 | ||
|
|
ee179e6995 | ||
|
|
3571d88f3d | ||
|
|
8ba346eec5 | ||
|
|
e110cb61f4 | ||
|
|
d29aa1d881 | ||
|
|
6337f5d6fa | ||
|
|
14bfe263a3 | ||
|
|
cbd54e0766 | ||
|
|
ceaec7e3d3 | ||
|
|
aab8d6e2c6 | ||
|
|
8a856e5b99 | ||
|
|
46f48a0d6c | ||
|
|
40fc11f324 | ||
|
|
d63fe9849b | ||
|
|
349f310148 | ||
|
|
ac60980bc2 | ||
|
|
e7002ad870 | ||
|
|
6838a67e7d | ||
|
|
9a8d997f63 | ||
|
|
f8b0a89d90 | ||
|
|
72f61f17be | ||
|
|
676dd0e6da | ||
|
|
02c7a6e07c | ||
|
|
8f841a0bc0 | ||
|
|
f218b7b892 | ||
|
|
1e1dd76fb1 | ||
|
|
4ba0bcd0fe | ||
|
|
cc9d9f6d42 | ||
|
|
4c9e8138b1 | ||
|
|
f79a1bd86a | ||
|
|
211135fbc5 | ||
|
|
537b659fc7 | ||
|
|
6b45b74e32 | ||
|
|
0ceb5616bf | ||
|
|
62f9cf9e48 | ||
|
|
6842cd3933 | ||
|
|
2c5ddd93cb | ||
|
|
64ddca1e2f | ||
|
|
9dea317925 | ||
|
|
a4e8a42707 | ||
|
|
005519e7cc | ||
|
|
da7c2175dd | ||
|
|
c7e6a867f4 | ||
|
|
30c6033e8c | ||
|
|
5a5d5d3bbb | ||
|
|
bdd75353d2 | ||
|
|
ce7b9eccca | ||
|
|
c66f1a5fa3 | ||
|
|
ba240cd53b | ||
|
|
ca9d0200f3 | ||
|
|
5dd2a21919 | ||
|
|
11124ef8a0 | ||
|
|
e8714be5ef | ||
|
|
13341e864c | ||
|
|
e1a464b32f | ||
|
|
a7601d8cfe | ||
|
|
98ae3a6b35 | ||
|
|
f82e15ed5e | ||
|
|
690f5487ab | ||
|
|
4e0a9a8d37 | ||
|
|
c6f1004ba6 | ||
|
|
a4e9f56c08 | ||
|
|
d84a7ffbbe | ||
|
|
11865764da | ||
|
|
fdc449335d | ||
|
|
27e508848d | ||
|
|
cc01ce0bbc | ||
|
|
0093ac3edc | ||
|
|
45db7410c0 | ||
|
|
e6df345736 | ||
|
|
e7b05090cd | ||
|
|
b82128091e | ||
|
|
adab30261c | ||
|
|
7e0b378475 | ||
|
|
d1ef9e2598 | ||
|
|
5887668b17 | ||
|
|
e6cb8f272b | ||
|
|
90e4ee91fe | ||
|
|
83207ca329 | ||
|
|
dcd31bed7c | ||
|
|
76cf8a02af | ||
|
|
10d8b43c61 | ||
|
|
554b709890 | ||
|
|
d877e86adc | ||
|
|
c5e5bd01e8 | ||
|
|
e3760457c4 | ||
|
|
c6ed1626f9 | ||
|
|
b4b18828b2 | ||
|
|
36167be7e6 | ||
|
|
4b633c801d | ||
|
|
33fd8a8668 | ||
|
|
94f44890a5 | ||
|
|
cc7441c4dd | ||
|
|
6fdc0281ba | ||
|
|
136a51d9b8 | ||
|
|
5e871c486b | ||
|
|
fdd69bf470 | ||
|
|
10e55b0d4f | ||
|
|
682c81d636 | ||
|
|
9eb4e54b75 | ||
|
|
e43bc07a63 | ||
|
|
508130afdc | ||
|
|
d60c057dc4 | ||
|
|
8f5a741af6 | ||
|
|
bee1bc87c4 | ||
|
|
3a9274e9a0 | ||
|
|
44ee735cd6 | ||
|
|
2c010cdbeb | ||
|
|
a04ae43bdb | ||
|
|
5c333445c5 | ||
|
|
dd93e67a3d | ||
|
|
d886268eee | ||
|
|
090824cb91 | ||
|
|
00eb4e363f | ||
|
|
f73f0786ee | ||
|
|
dacc81cf2a | ||
|
|
97c6249af5 | ||
|
|
7ce1fe47ff | ||
|
|
8e66bb366e | ||
|
|
ce7fd6e776 | ||
|
|
957f9cbb47 | ||
|
|
2a7e3003bd | ||
|
|
19cd208a6e | ||
|
|
6a44111a35 | ||
|
|
fd5d55942b | ||
|
|
d4e7f048f0 | ||
|
|
d90c4d5842 | ||
|
|
0f562cd39f | ||
|
|
fb01003c45 | ||
|
|
9bcea02975 | ||
|
|
c51ae8d1c1 | ||
|
|
b8a5ad2d73 | ||
|
|
39b8c88d1b | ||
|
|
1e73f6713a | ||
|
|
97babaa4e2 | ||
|
|
c6c486f306 | ||
|
|
338f10b896 | ||
|
|
2353a873a8 | ||
|
|
52c539e870 | ||
|
|
64d63a84c5 | ||
|
|
3d80d73450 | ||
|
|
2e04898fbe | ||
|
|
f390e1a091 | ||
|
|
848c1d7ce1 | ||
|
|
0c0becc780 | ||
|
|
0e918da2a4 | ||
|
|
7f36c339b7 | ||
|
|
871486daab | ||
|
|
0cffc8798f | ||
|
|
4d4a3901eb | ||
|
|
50e95cb461 | ||
|
|
d223edf0ba | ||
|
|
8e88082f07 | ||
|
|
5b1762b637 | ||
|
|
6c83ea4ceb | ||
|
|
5aa5e75813 | ||
|
|
1ba35dcbf6 | ||
|
|
8828824b23 | ||
|
|
e3f2cc22ec | ||
|
|
93aae6782e | ||
|
|
b746d2927e | ||
|
|
79e3be705c | ||
|
|
a052b7bf55 | ||
|
|
74a84362ca | ||
|
|
d673008f5a | ||
|
|
09c9438de8 | ||
|
|
0734180d70 | ||
|
|
8ca8deb02d | ||
|
|
9aa719aeb3 | ||
|
|
447eebbafc | ||
|
|
19f8689a20 | ||
|
|
60902f83d5 | ||
|
|
a725acfd5e | ||
|
|
0191772111 | ||
|
|
a11cef5f2e | ||
|
|
cf4c75bcbc | ||
|
|
f85801dcbe | ||
|
|
4e67f8c56b | ||
|
|
1cfd2fe324 | ||
|
|
5ef2e0fa42 | ||
|
|
57b71e985c | ||
|
|
d9d76ec59b | ||
|
|
7935883267 | ||
|
|
0385def7b2 | ||
|
|
565f4b34e5 | ||
|
|
70ba8a0420 | ||
|
|
4bdbe4a002 | ||
|
|
2c98ef96da | ||
|
|
6663c98787 | ||
|
|
bbf2376f7a | ||
|
|
21ac9f2def | ||
|
|
a10d28dd11 | ||
|
|
856126c72e | ||
|
|
547fc0059c | ||
|
|
195363dc82 | ||
|
|
54288e5687 | ||
|
|
9d46406a95 | ||
|
|
d365feca5d | ||
|
|
f34ac9d0fe | ||
|
|
3a02b056ca | ||
|
|
1a1e8cf652 | ||
|
|
94feb0ae44 | ||
|
|
1e1a5edd13 | ||
|
|
ae9b14201b | ||
|
|
742150d4f1 | ||
|
|
03eac03c8c | ||
|
|
8cd6b037ec | ||
|
|
b35e38bdff | ||
|
|
58275c88e9 | ||
|
|
31b43521d0 | ||
|
|
e68ee00b85 | ||
|
|
6e54d4a7d7 | ||
|
|
69b1d63569 | ||
|
|
817f4063a1 | ||
|
|
c9ec23dc70 | ||
|
|
972085fa56 | ||
|
|
c2e24b61e3 | ||
|
|
bd1fb67930 | ||
|
|
0fcedfca08 | ||
|
|
c39ce7c0b8 | ||
|
|
97014ccdc8 | ||
|
|
48e7f6e928 | ||
|
|
473f9f98ff | ||
|
|
95d09a7673 | ||
|
|
53253ed101 | ||
|
|
4bd7c0eef4 | ||
|
|
9af71438dd | ||
|
|
747894247b | ||
|
|
82033a44dd | ||
|
|
1c9537fc63 | ||
|
|
612c395c06 | ||
|
|
8dc0ee2ade | ||
|
|
caefd7355a | ||
|
|
9ea0e15dba | ||
|
|
83c8984c74 | ||
|
|
4761333a1a | ||
|
|
8538f29f70 | ||
|
|
b658413961 | ||
|
|
bb187f1ee3 | ||
|
|
ea8ab93bad | ||
|
|
9226fcff26 | ||
|
|
05cf370155 | ||
|
|
0d2352884a |
+16
@@ -0,0 +1,16 @@
|
||||
The current main maintainers and/or developers:
|
||||
|
||||
* WEI Yongming
|
||||
|
||||
As employed engineers of [Beijing FMSoft Technologies Co., Ltd.],
|
||||
the following people have participated in the development of MiniGUI Core:
|
||||
|
||||
* HOU Huihua
|
||||
* WAN Zheng
|
||||
* DONG Kai
|
||||
* DONG Junjie
|
||||
* YAN Xiaowei
|
||||
|
||||
For community contributors, please see RELASENOTES.md documentation.
|
||||
|
||||
[Beijing FMSoft Technologies Co., Ltd.]: http://www.fmsoft.cn
|
||||
@@ -3216,7 +3216,7 @@ alExtra.(xwyan)
|
||||
* src/gui/lf_flat.c
|
||||
* src/gui/lf_skin.c
|
||||
|
||||
08/24: ENHANCEMENT #1: Add a new method for FONTOPS: get_glyph_type to return
|
||||
08/24: ENHANCEMENT #1: Add a new method for FONTOPS: get_char_type to return
|
||||
the glyph type the devfont can give us.
|
||||
* src/include/devfont.h
|
||||
* src/font/*.c
|
||||
@@ -4761,7 +4761,7 @@ create_skin_main_window_ex:
|
||||
* ext/skin/skin.c
|
||||
|
||||
05/16. ENHANCEMENT #8: Support for UTF-16LE and UTF-16BE charsets/encodings.
|
||||
* Change the definition of UChar32 to 'int'.
|
||||
* Change the definition of Uchar32 to 'int'.
|
||||
* include/gdi.h
|
||||
|
||||
05/16. ENHANCEMENT #11: Support for FreeType2.
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Standalone)"
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = v3.2.0
|
||||
PROJECT_NUMBER = v3.4.0
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
||||
@@ -7,6 +7,7 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
||||
|
||||
1. Introduction
|
||||
1. A brief building instruction
|
||||
1. New features in version 3.4.x
|
||||
1. New features in version 3.2.x
|
||||
1. The runtime modes of MiniGUI
|
||||
1. History
|
||||
@@ -18,42 +19,42 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
||||
|
||||
|
||||
## INTRODUCTION
|
||||
|
||||
MiniGUI is a mature cross-platform windowing system and a GUI (Graphics
|
||||
|
||||
MiniGUI is a mature cross-platform windowing system and a GUI (Graphics
|
||||
User Interface) support system for embedded systems and smart IoT devices.
|
||||
This is the version 3.2.x of MiniGUI maintained by WEI Yongming
|
||||
This is the version 3.2.x of MiniGUI maintained by WEI Yongming
|
||||
(Vincent Wei, https://github.com/VincentWei).
|
||||
|
||||
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
|
||||
windowing and GUI support system, which is especially fit for
|
||||
embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other
|
||||
traditional RTOSes, such as VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II,
|
||||
windowing and GUI support system, which is especially fit for
|
||||
embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other
|
||||
traditional RTOSes, such as VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II,
|
||||
and OSE.
|
||||
|
||||
This is the MiniGUI core source tree, which provides windowing
|
||||
and graphics interfaces as well as a lot of standard controls (tookit).
|
||||
This is the MiniGUI core source tree, which provides windowing
|
||||
and graphics interfaces as well as a lot of standard controls (tookit).
|
||||
|
||||
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.
|
||||
* mGUtils: A MiniGUI component which contains miscellaneous utilities
|
||||
like ColorSelectionDialogBox, FileOpenDialogBox, and so on.
|
||||
|
||||
* mGPlus: A MiniGUI component which provides support for advanced graphics
|
||||
* mGPlus: A MiniGUI component which provides support for advanced graphics
|
||||
functions like path, gradient, anti-aliase stretch, and color combination.
|
||||
|
||||
* mGEff: mGEff provides an animation framework for MiniGUI app.
|
||||
* 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.
|
||||
By using mGNCS, you can use miniStudio to develop MiniGUI app in
|
||||
WYSIWYG way.
|
||||
* mGNCS: This component provides a new control set for MiniGUI app.
|
||||
By using mGNCS, you can use miniStudio to develop MiniGUI app in
|
||||
WYSIWYG way.
|
||||
|
||||
* mGNCS4Touch: This component provides some new controls, which are
|
||||
compliant to the new control API spec of mGNCS, for devices with
|
||||
* mGNCS4Touch: This component provides some new controls, which are
|
||||
compliant to the new control API spec of mGNCS, for devices with
|
||||
a touch screen.
|
||||
|
||||
There are also some legacy MiniGUI components. We will not maintain these
|
||||
@@ -61,7 +62,7 @@ components for MiniGUI core v3.2:
|
||||
|
||||
* mGi: An input method component for MiniGUI. This component provides
|
||||
some typical input methods (such as softkey, hand-writing, and predict
|
||||
text input for mobile phone) for MiniGUI apps.
|
||||
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.
|
||||
@@ -70,11 +71,11 @@ components for MiniGUI core v3.2:
|
||||
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
|
||||
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
|
||||
@@ -82,27 +83,27 @@ from the download zone of the site:
|
||||
|
||||
http://www.minigui.com
|
||||
|
||||
FMSoft also releases some open source apps for MiniGUI on the site above,
|
||||
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
|
||||
* 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),
|
||||
* 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
|
||||
* 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
|
||||
* mEagle, licensed under GPL 3.0, is an embedded GIS development platform
|
||||
which addresses the needs of map browse, query, analysis, etc
|
||||
|
||||
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:
|
||||
|
||||
https://github.com/VincentWei
|
||||
https://github.com/VincentWei
|
||||
|
||||
FMSoft also releases miniStudio, which is a WYSIWYG IDE for MiniGUI, as a shareware.
|
||||
You can also download it from the official site of MiniGUI.
|
||||
@@ -146,6 +147,15 @@ For more information, please run
|
||||
$ ./configure --help
|
||||
|
||||
|
||||
## NEW FEATURES IN VERSION 3.4.x
|
||||
|
||||
We introduce some new features in MiniGUI Version 3.4.x:
|
||||
|
||||
* The font and UNICODE related APIs are tuned or enhanced,
|
||||
in order to support HybridOS Foundation C++ Library.
|
||||
|
||||
For more information, please refer to RELEASENOTES.md file.
|
||||
|
||||
## NEW FEATURES IN VERSION 3.2.x
|
||||
|
||||
We introduce some new features in MiniGUI Version 3.2.x:
|
||||
@@ -154,7 +164,7 @@ We introduce some new features in MiniGUI Version 3.2.x:
|
||||
to support 64-bit platform. For more information, please refer to
|
||||
RELEASE-NOTES.md file.
|
||||
|
||||
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.
|
||||
|
||||
## THE RUNTIME MODES OF MINIGUI
|
||||
@@ -164,64 +174,64 @@ You can configure and compile MiniGUI as one of three runtime modes:
|
||||
* 'MiniGUI-Threads': A program running on MiniGUI-Threads can create
|
||||
multiple cascaded windows in different threads, and all the windows
|
||||
belong to a single process. MiniGUI-Threads is fit for some real-time
|
||||
systems on Linux/uClinux, eCos, uC/OS-II, VxWorks, pSOS, ThreadX,
|
||||
systems on Linux/uClinux, eCos, uC/OS-II, VxWorks, pSOS, ThreadX,
|
||||
and OSE.
|
||||
|
||||
* 'MiniGUI-Processes': A program running on MiniGUI-Processes is
|
||||
an independent process, which can also create multiple windows.
|
||||
MiniGUI-Processes is fit for some complex embedded systems, such as
|
||||
PDAs, Thin-Clients or STBs. This mode is only useful for full-featured
|
||||
* 'MiniGUI-Processes': A program running on MiniGUI-Processes is
|
||||
an independent process, which can also create multiple windows.
|
||||
MiniGUI-Processes is fit for some complex embedded systems, such as
|
||||
PDAs, Thin-Clients or STBs. This mode is only useful for full-featured
|
||||
UNIX-like operating systems, like Linux.
|
||||
|
||||
* 'MiniGUI-Standalone': A single process version of MiniGUI. This mode
|
||||
is useful for some small systems, like uClinux or RTOSes.
|
||||
|
||||
The original MiniGUI (version 1.0) run in MiniGUI-Threads mode.
|
||||
It is based on POSIX-compliant thread library. And this thread-based
|
||||
architecture of MiniGUI is very fit for most traditional embedded
|
||||
operating systems, such as eCos, uC/OS-II, and VxWorks. However,
|
||||
if you use embedded Linux, the architecture like X Window will have
|
||||
better stability and scalability, because of the independent memory
|
||||
It is based on POSIX-compliant thread library. And this thread-based
|
||||
architecture of MiniGUI is very fit for most traditional embedded
|
||||
operating systems, such as eCos, uC/OS-II, and VxWorks. However,
|
||||
if you use embedded Linux, the architecture like X Window will have
|
||||
better stability and scalability, because of the independent memory
|
||||
address space of every process.
|
||||
|
||||
Since version 2.0, we provides a new runtime mode called MiniGUI-Processes.
|
||||
You can use MiniGUI-Processes to run more than one MiniGUI-based
|
||||
program in the form of UNIX process at the same time. MiniGUI-Processes
|
||||
is a full-featured multi-process version of original MiniGUI -- You
|
||||
can run a program based on MiniGUI-Processes from a program called
|
||||
'mginit'. Just like X Window, the former process is called a client,
|
||||
and the latter the server.
|
||||
You can use MiniGUI-Processes to run more than one MiniGUI-based
|
||||
program in the form of UNIX process at the same time. MiniGUI-Processes
|
||||
is a full-featured multi-process version of original MiniGUI -- You
|
||||
can run a program based on MiniGUI-Processes from a program called
|
||||
'mginit'. Just like X Window, the former process is called a client,
|
||||
and the latter the server.
|
||||
|
||||
Clients connect to the server via UNIX domain socket, and the server
|
||||
receives and responses requests from clients. The server provides shared
|
||||
resources for clients, manage window objects, and sends mouse
|
||||
(or touch screen) and keyboard events to the active top-most client.
|
||||
If a client exits or dies for some reasons, it will not damage other
|
||||
Clients connect to the server via UNIX domain socket, and the server
|
||||
receives and responses requests from clients. The server provides shared
|
||||
resources for clients, manage window objects, and sends mouse
|
||||
(or touch screen) and keyboard events to the active top-most client.
|
||||
If a client exits or dies for some reasons, it will not damage other
|
||||
clients and the server.
|
||||
|
||||
|
||||
## HISTORY
|
||||
|
||||
About ten years have pasted since MiniGUI was initially created at
|
||||
the end of 1998, and now it becomes much reliable and stable.
|
||||
During the past years, many remarkable changes have taken place in
|
||||
21 years have pasted since MiniGUI was initially created at
|
||||
the end of 1998, and now it becomes much reliable and stable.
|
||||
During the past years, many remarkable changes have taken place in
|
||||
the MiniGUI project.
|
||||
|
||||
At the original, the version 0.2.xx was based on SVGALib and PThread
|
||||
(LinuxThreads). Then the version 0.3.xx had many enhanced features
|
||||
including Graphics Abstract Layer (GAL), Input Abstract Layer (IAL),
|
||||
and the support for multiple charsets and multiple fonts.
|
||||
At the original, the version 0.2.xx was based on SVGALib and PThread
|
||||
(LinuxThreads). Then the version 0.3.xx had many enhanced features
|
||||
including Graphics Abstract Layer (GAL), Input Abstract Layer (IAL),
|
||||
and the support for multiple charsets and multiple fonts.
|
||||
|
||||
In version 1.0.00, we designed MiniGUI-Lite, which was more fit for
|
||||
some complex embedded systems, such as PDAs, Thin-Clients, or STBs.
|
||||
MiniGUI-Lite made the embedded systems more stable and efficient.
|
||||
The version 1.0.00 provided the native fbcon engine based on Linux
|
||||
frame buffer device directly as well.
|
||||
In version 1.0.00, we designed MiniGUI-Lite, which was more fit for
|
||||
some complex embedded systems, such as PDAs, Thin-Clients, or STBs.
|
||||
MiniGUI-Lite made the embedded systems more stable and efficient.
|
||||
The version 1.0.00 provided the native fbcon engine based on Linux
|
||||
frame buffer device directly as well.
|
||||
|
||||
In the development of version 1.1.00, we re-wrote the GAL and GDI
|
||||
interfaces, and provided some advanced video features, such as raster
|
||||
operation, transparent blitting, alpha blending, and video hardware
|
||||
acceleration. We also provided some important GDI functions, such as
|
||||
In the development of version 1.1.00, we re-wrote the GAL and GDI
|
||||
interfaces, and provided some advanced video features, such as raster
|
||||
operation, transparent blitting, alpha blending, and video hardware
|
||||
acceleration. We also provided some important GDI functions, such as
|
||||
Ellipse, Arc, Polygon, and FloodFill.
|
||||
|
||||
In the development of version 1.6.0, we added advanced 2D graphics
|
||||
@@ -238,7 +248,7 @@ A brief history description of the development progress lay below:
|
||||
|
||||
0) 1994 ~ 1996: MiniGUI DOS version.
|
||||
1) Dec, 1998: Began to write.
|
||||
2) Apr, 1999: The skeleton of MiniGUI, windowing sub-system
|
||||
2) Apr, 1999: The skeleton of MiniGUI, windowing sub-system
|
||||
and basic graphics device interfaces.
|
||||
3) May, 1999: Timer, menu, and the skeleton of control sub-system.
|
||||
4) Jun, 1999: Chinese input method (by Kang Xiaoning).
|
||||
@@ -247,29 +257,29 @@ A brief history description of the development progress lay below:
|
||||
7) Sep, 1999: Dialog boxes and message boxes.
|
||||
8) Sep, 1999: Snapshot of screen or window.
|
||||
9) Jan., 2000: VCOnGUI (Virtual Console on MiniGUI) version 0.2.02.
|
||||
10) Mar., 2000: Linux distribution installer based-on MiniGUI for
|
||||
10) Mar., 2000: Linux distribution installer based-on MiniGUI for
|
||||
HappyLinux 1.0.
|
||||
11) Jun., 2000: Began to develop version 1.0.xx.
|
||||
12) Sep., 2000: MiniGUI version 0.3.06 released.
|
||||
13) Oct., 2000: MiniGUI version 0.9.00 released.
|
||||
14) Nov., 2000: MiniGUI version 0.9.96 released.
|
||||
15) Jan., 2001: MiniGUI version 0.9.98 released. You can build
|
||||
13) Oct., 2000: MiniGUI version 0.9.00 released.
|
||||
14) Nov., 2000: MiniGUI version 0.9.96 released.
|
||||
15) Jan., 2001: MiniGUI version 0.9.98 released. You can build
|
||||
MiniGUI-Lite from this version.
|
||||
16) Jan., 2001: MiniGUI version 1.0.00Beta1 released.
|
||||
17) Feb., 2001: MiniGUI version 1.0.00Pre1 released.
|
||||
18) Apr., 2001: MiniGUI version 1.0.00 released (2001/04/16).
|
||||
18) Sep., 2001: MiniGUI version 1.1.0Pre1 released (2001/09/12).
|
||||
19) Sep., 2001: MiniGUI version 1.0.9 released (2001/09/17),
|
||||
this will be the last version of source branch 1.0.x.
|
||||
20) Oct., 2001: MiniGUI version 1.1.0Pre4 released (2001/10/22).
|
||||
19) Sep., 2001: MiniGUI version 1.0.9 released (2001/09/17),
|
||||
this will be the last version of source branch 1.0.x.
|
||||
20) Oct., 2001: MiniGUI version 1.1.0Pre4 released (2001/10/22).
|
||||
This version have new GAL and GDI interfaces.
|
||||
21) Mar., 2002: MiniGUI official version 1.1.0 released (2002/03/08).
|
||||
21) Mar., 2002: MiniGUI official version 1.1.0 released (2002/03/08).
|
||||
MiniGUI API Reference documentation version 0.9 released.
|
||||
22) Mar., 2002: MiniGUI API Reference documentation version 1.0 released.
|
||||
23) Apr., 2002: MiniGUI the new stable version 1.2.0 released (2002/04/11).
|
||||
24) Sep., 2002: The main developers of MiniGUI founded a
|
||||
new software corporation: Beijing FMSoft Technology Co., Ltd..
|
||||
And the development and maintenance of MiniGUI changes from
|
||||
23) Apr., 2002: MiniGUI the new stable version 1.2.0 released (2002/04/11).
|
||||
24) Sep., 2002: The main developers of MiniGUI founded a
|
||||
new software corporation: Beijing FMSoft Technology Co., Ltd..
|
||||
And the development and maintenance of MiniGUI changes from
|
||||
loosely-knit team to business organization.
|
||||
25) Mar., 2003: MiniGUI official version 1.2.5 released (2003/03/23).
|
||||
25) May., 2003: MiniGUI official version 1.2.6 released (2003/05/18).
|
||||
@@ -295,18 +305,19 @@ A brief history description of the development progress lay below:
|
||||
45) Aug., 2017: FMSoft released the latest source code of mDolphin under Apache 2.0.
|
||||
46) Dec., 2017: FMSoft updated MiniGUI and miniStudio for latest Linux distributions.
|
||||
47) Feb., 2018: FMSoft released MiniGUI version 3.2.
|
||||
47) Jun., 2019: FMSoft released MiniGUI version 3.4.
|
||||
|
||||
|
||||
## ABOUT THE AUTHORS
|
||||
|
||||
The original author of MiniGUI is WEI Yongming, and now MiniGUI is
|
||||
maintained by FMSoft. For more information, please browse
|
||||
The original author of MiniGUI is WEI Yongming, and now MiniGUI is
|
||||
maintained by FMSoft. For more information, please browse
|
||||
our home page: http://www.fmsoft.cn.
|
||||
|
||||
|
||||
## IF YOU HAVE A PROBLEM
|
||||
|
||||
If you have any technical problem, advice or comment, please send
|
||||
If you have any technical problem, advice or comment, please send
|
||||
messages to consult@minigui.com.
|
||||
|
||||
|
||||
@@ -314,15 +325,15 @@ messages to consult@minigui.com.
|
||||
|
||||
Q: Is GPL'd MiniGUI free for commercial use?
|
||||
|
||||
A: Simply no. FMSoft releases MiniGUI under GPLv3 license.
|
||||
It is free for those who are 100% GPL and those who never copy, modify
|
||||
and distribute MiniGUI. But if you want to use these GPL'd versions
|
||||
A: Simply no. FMSoft releases MiniGUI under GPLv3 license.
|
||||
It is free for those who are 100% GPL and those who never copy, modify
|
||||
and distribute MiniGUI. But if you want to use these GPL'd versions
|
||||
for commerce, you should get the commercial license from FMSoft first.
|
||||
|
||||
Q: Which operating system does MiniGUI support?
|
||||
|
||||
A: MiniGUI can run on Linux/uClinux, uC/OS-II, eCos, ThreadX, pSOS,
|
||||
VxWorks, ThreadX, OSE, and even Win32. Any other real-time OSes can
|
||||
A: MiniGUI can run on Linux/uClinux, uC/OS-II, eCos, ThreadX, pSOS,
|
||||
VxWorks, ThreadX, OSE, and even Win32. Any other real-time OSes can
|
||||
be supported theoretically.
|
||||
|
||||
Q: Which architecture does MiniGUI support?
|
||||
@@ -332,19 +343,19 @@ A: x86 32/64-bit, ARM 32/64-bit (e.g., ARMv7 and ARM Cortex-A7),
|
||||
|
||||
Q: Does MiniGUI offer the support for grey LCD with 4bpp (bits per pixel)?
|
||||
|
||||
A: Yes, it offers. It even offers the support for 1bpp and 2bpp LCD.
|
||||
A: Yes, it offers. It even offers the support for 1bpp and 2bpp LCD.
|
||||
|
||||
|
||||
## NOT FREE FOR COMMERCIAL USE
|
||||
|
||||
MiniGUI and its components are licensed under the GPL license.
|
||||
So any links about MiniGUI must follow GPL. If you cannot accept GPL,
|
||||
you need to be licensed from FMSoft. If you wonder that if you need
|
||||
MiniGUI and its components are licensed under the GPL license.
|
||||
So any links about MiniGUI must follow GPL. If you cannot accept GPL,
|
||||
you need to be licensed from FMSoft. If you wonder that if you need
|
||||
the commercial license of MiniGUI, please refer to the LICENSE-POLICY file.
|
||||
|
||||
We provide you the commercial license of MiniGUI according to the number
|
||||
of the run-time binary copies of MiniGUI. If you are interested in
|
||||
the commercial license of MiniGUI, please write to sales@minigui.com.
|
||||
We provide you the commercial license of MiniGUI according to the number
|
||||
of the run-time binary copies of MiniGUI. If you are interested in
|
||||
the commercial license of MiniGUI, please write to sales@minigui.com.
|
||||
|
||||
|
||||
## COPYING
|
||||
|
||||
+197
-63
@@ -1,33 +1,167 @@
|
||||
# Release Notes
|
||||
|
||||
## Version 3.2.2
|
||||
## Version 3.4.0
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.2.2.
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.4.0.
|
||||
All users of MiniGUI are recommended strongly to use this version.
|
||||
Please report any bugs and incompatibilities in
|
||||
|
||||
https://github.com/VincentWei/minigui.
|
||||
https://github.com/VincentWei/minigui
|
||||
|
||||
### What's new in this version
|
||||
|
||||
In this version, we mainly enhanced and tuned the APIs of font rendering.
|
||||
|
||||
#### Tunning the logical font APIs
|
||||
|
||||
The styles of LOGFONT changed.
|
||||
|
||||
* Add new rendering style:
|
||||
1. `FS_RENDER_ANY`: Not specified
|
||||
1. `FS_RENDER_MONO`:
|
||||
1. `FS_RENDER_GREY`:
|
||||
1. `FS_RENDER_SUBPIXEL`:
|
||||
* Some old styles are deprecated:
|
||||
1. `FS_WEIGHT_BOOK`; use `FS_RENDER_GREY` instead.
|
||||
1. `FS_WEIGHT_SUBPIXEL`; use `FS_RENDER_SUBPIXEL` instead.
|
||||
* Introduced or redefined the weight styles to follow OpenType specification:
|
||||
1. `FONT_WEIGHT_ANY`: Not specified
|
||||
1. `FONT_WEIGHT_THIN`: Thin.
|
||||
1. `FONT_WEIGHT_EXTRA_LIGHT`: Extra light (Ultra Light).
|
||||
1. `FONT_WEIGHT_LIGHT`: Light.
|
||||
1. `FONT_WEIGHT_REGULAR`: Regular (Normal).
|
||||
1. `FONT_WEIGHT_MEDIUM`: Medium.
|
||||
1. `FONT_WEIGHT_DEMIBOLD`: Demi Bold (Semi Bold)
|
||||
1. `FONT_WEIGHT_BOLD`: Bold.
|
||||
1. `FONT_WEIGHT_EXTRA_BOLD`: Extra Bold (Ultra Bold).
|
||||
1. `FONT_WEIGHT_BLACK`: Black (Heavy).
|
||||
* Introduce the new decoration styles and replace
|
||||
`FONT_UNDERLINE_LINE` and `FONT_STRUCKOUT_LINE` with them:
|
||||
1. `FONT_DECORATE_ANY`: Not specified.
|
||||
1. `FONT_DECORATE_NONE`: None.
|
||||
1. `FONT_DECORATE_UNDERLINE`: glyphs are underscored.
|
||||
1. `FONT_DECORATE_STRUCKOUT`: glyphs are overstruck.
|
||||
1. `FONT_DECORATE_US`: Both `FONT_DECORATE_UNDERLINE` and `FONT_DECORATE_STRUCKOUT`.
|
||||
1. `FONT_DECORATE_OUTLINE`: Outline (hollow) glyphs.
|
||||
1. `FONT_DECORATE_REVERSE`: Reverved for future. Glyphs have their foreground and background reversed.
|
||||
* The following style are deprecated:
|
||||
1. `FONT_OTHER_LCDPORTRAIT`
|
||||
1. `FONT_OTHER_LCDPORTRAITKERN`
|
||||
|
||||
For a new app, you should use the new function `CreateLogFontEx` to
|
||||
create a LOGFONT, and specify the weight and rendering method of the glyph.
|
||||
|
||||
For the back-compatibility, you can still use `CreateLogFont` to create a new
|
||||
LOGFONT. However, `FS_WEIGHT_BOOK` will be treated `FS_WEIGHT_REGULAR` and
|
||||
`FS_RENDER_GREY`, while `FS_WEIGHT_SUBPIXEL` will be treated
|
||||
`FS_WEIGHT_REGULAR` and `FS_RENDER_SUBPIXEL`.
|
||||
|
||||
You can still use `CreateLogFontByName` to create a new LOGFONT.
|
||||
But the style string in the font name changed from
|
||||
|
||||
<weight><slant><flipping><other><underline><struckout>
|
||||
|
||||
to
|
||||
|
||||
<weight><slant><flipping><other><decoration><rendering>
|
||||
|
||||
Note that `<underline>` and `<struckout>` are merged to `<decoration>`
|
||||
in order to keep the style string is still 6-character long.
|
||||
|
||||
Consequently, if you want to use the rendering method SUPIXEL for a TTF font,
|
||||
please define the logical font name in the following way:
|
||||
|
||||
ttf-Courier-rrncns-*-16-UTF-8
|
||||
|
||||
Moreover, the family name of a DEVFONT supports aliases since 3.4.0:
|
||||
|
||||
<fonttype>-<family[,aliase]*>-<styles>-<width>-<height>-<charset[,charset]*>
|
||||
|
||||
for example:
|
||||
|
||||
ttf-Arial,Sans Serif-rrncnn-8-16-ISO8859-1,UTF-8
|
||||
ttf-courier,monospace,serif-rrncnn-8-16-ISO8859-1,UTF-8
|
||||
|
||||
Note that the length of one DEVFONT name can not exceed 255 bytes.
|
||||
|
||||
#### Changed APIs
|
||||
|
||||
* The fields `height` and `descent` have been removed from GLYPHINFO struct.
|
||||
One should get the font metrics information by calling `GetFontMetrics` function
|
||||
if you want to get the height and descent data of one font.
|
||||
|
||||
* More fields added for GLYPHBITMAP struct in order to return the completed
|
||||
rasterized glyph bitmap information.
|
||||
|
||||
* `GetGlyphInfo` now can return the basic glyph type and break type of a
|
||||
UNICODE character. If the glyph is an ASCII character, the old `MCHAR_TYPE`
|
||||
can also be returned.
|
||||
|
||||
* Rename `mg_FT_LcdFilter` to `FT2LCDFilter` in order to follow MiniGUI naming
|
||||
rules.
|
||||
|
||||
* Rename `UChar32` to `Uchar32` and `UChar16` to `Uchar16` in order to
|
||||
avoid the conflict with typedef of UChar32 in 'unicode/umachine.h'.
|
||||
|
||||
* Redefine `Uchar32` and `Glyph32` as `Uint32` instead of `int`.
|
||||
|
||||
#### New APIs
|
||||
|
||||
* `GetGlyphsByRules` function calculates and allocates the glyph string from
|
||||
a multi-byte string under the specified white space rule and transformation
|
||||
rule.
|
||||
|
||||
* `GetGlyphsExtentPointEx` function gets the visual extent information
|
||||
of a glyph string which can fit in a line with the specified maximal extent.
|
||||
|
||||
* `DrawGlyphStringEx` function draws a glyph string to the specific
|
||||
positions of a DC.
|
||||
|
||||
* `CreateLogFontIndirectEx` creates a new LOGFONT by using the value of
|
||||
an existed LOGFONT but with a new rotation value.
|
||||
|
||||
#### Others
|
||||
|
||||
* Support for FreeType1 removed.
|
||||
|
||||
You should always use FreeType2 to support vector fonts, such as TrueType
|
||||
fonts (TTF), TrueType collections (TTC), OpenType fonts (OTF, both TrueType
|
||||
and CFF variants), OpenType collections (OTC), and Type 1 fonts (PFA and PFB).
|
||||
|
||||
### Other Changes
|
||||
|
||||
* A new BITMAP type: `BMP_TYPE_REPLACEKEY`. When `bmType` of a BITMAP object
|
||||
has this bit set, any pixel which is equal to `bmColorKey` will be replaced by
|
||||
`bmColorRep`.
|
||||
|
||||
## Version 3.2.1
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.2.1.
|
||||
All users of MiniGUI are recommended strongly to use this version.
|
||||
Please report any bugs and incompatibilities in
|
||||
|
||||
https://github.com/VincentWei/minigui
|
||||
|
||||
### What's new in this version
|
||||
|
||||
* ENHANCEMENTS:
|
||||
1. Add a new key `dpi` for NEWGAL engine to define the DPI of the screen.
|
||||
1. Add a new key `dpi` for NEWGAL engine to define the DPI of the screen.
|
||||
If it is absent, use 96 as the default DPI.
|
||||
1. Add an item for `GetGDCapability` to return DPI of the DC.
|
||||
1. New API `InitSlaveScreenEx` to specify the DPI of slave screen.
|
||||
1. New API `InitSlaveScreenEx` to specify the DPI of slave screen.
|
||||
Define `InitSlaveScreen` as an inline function calling `InitSlaveScreenEx`.
|
||||
1. New API: `SyncUpdateDC`. You can use this function to synchronize
|
||||
1. New API: `SyncUpdateDC`. You can use this function to synchronize
|
||||
the update rectangles of a surface to screen, if the surface
|
||||
represents the shadow frame buffer of the screen.
|
||||
represents the shadow frame buffer of the screen.
|
||||
* configure option: `--enable-syncupdate`
|
||||
* macro: `_MGUSE_SYNC_UPDATE`
|
||||
1. New API: `UpdateInvalidClient`. You can use this function to update
|
||||
the invalid client region of a window instantly.
|
||||
1. Use different colors for the output of `_DBG_PRINTF` and `_ERR_PRINTF`.
|
||||
1. Add `__mg_save_jpg` function for storing MYBITMAP as JPEG file (10km).
|
||||
1. Modified logic for checking JPEG format (10km).
|
||||
1. Add `__mg_save_jpg` function for storing MYBITMAP as JPEG file (@10km).
|
||||
1. Modified logic for checking JPEG format (@10km).
|
||||
1. Support BIDI for UNICODE charsets and cleanup the implementation.
|
||||
* New API: `GetGlyphBIDIType` to get the glyph type in BIDI.
|
||||
* New API: `GetGlyphBidiType` to get the glyph type in BIDI.
|
||||
* New DC attribute: BIDI flag.
|
||||
1. Enhance commlcd engint to support more pixel type and synchronously update.
|
||||
1. New USVFB IAL engine and NEWGAL engine for web display server.
|
||||
@@ -43,9 +177,9 @@ Please report any bugs and incompatibilities in
|
||||
* BUGFIXING:
|
||||
1. handle `PNG_COLOR_TYPE_GRAY_ALPHA` color type of PNG files.
|
||||
1. Fix a bug to free a null pointer (ReleaseDC).
|
||||
1. No need to make the pitch of FT2 monobitmap is single-byte aligned.
|
||||
1. No need to make the pitch of FT2 monobitmap is single-byte aligned.
|
||||
This bug may generate dirty dots for monobitmap glyph from TTF.
|
||||
1. Skip null pixels for SUBPIXEL glyphs. This bug will always show background
|
||||
1. Skip null pixels for SUBPIXEL glyphs. This bug will always show background
|
||||
pixels of one SUBPIXEL glyph.
|
||||
1. Fix the bug of wrong bounding box handling for SUBPIXEL rendering of glyph.
|
||||
|
||||
@@ -58,12 +192,12 @@ The MiniGUI development team announces the availability of MiniGUI 3.2.0.
|
||||
All users of MiniGUI are recommended strongly to use this version for new
|
||||
MiniGUI apps. Please report any bugs and incompatibilities in
|
||||
|
||||
https://github.com/VincentWei/minigui.
|
||||
https://github.com/VincentWei/minigui
|
||||
|
||||
### What's new in this version
|
||||
|
||||
* Support for 64-bit platform. Note that the definitions of some types
|
||||
and APIs changed.
|
||||
* Support for 64-bit platform. Note that the definitions of some types
|
||||
and APIs changed.
|
||||
* Compliant to the latest GCC, and eliminate all compilation warnings.
|
||||
|
||||
### Type changes
|
||||
@@ -71,37 +205,37 @@ MiniGUI apps. Please report any bugs and incompatibilities in
|
||||
#### Changes of handle types
|
||||
|
||||
All handle types, including `GHANDLE`, `HWND`, `HDC`, etc.,
|
||||
are now defined as aliases of `PVOID` (`typedef void* PVOID`).
|
||||
You may need to check your code to reflect this change.
|
||||
are now defined as aliases of `PVOID` (`typedef void* PVOID`).
|
||||
You may need to check your code to reflect this change.
|
||||
|
||||
#### Changes of integer types.
|
||||
|
||||
The type of `DWORD` now has pointer precision. That is,
|
||||
the size of `DWORD` will be 4 bytes on 32-bit platform, and 8 bytes on
|
||||
64-bit platform.
|
||||
the size of `DWORD` will be 4 bytes on 32-bit platform, and 8 bytes on
|
||||
64-bit platform.
|
||||
|
||||
Similarly, `WPARAM` and `LPARAM` now have pointer precision.
|
||||
|
||||
`WORD` and `SWORD` has a half of pointer precision. The size of these
|
||||
`WORD` and `SWORD` has a half of pointer precision. The size of these
|
||||
two types is 2 bytes on 32-bit platform, and 4 bytes on 64-bit platform.
|
||||
|
||||
`RGBCOLOR` now is defined as an alias of `DWORD32` (see below).
|
||||
|
||||
Note that the type of `BYTE` always has the size of 8-bit on both
|
||||
Note that the type of `BYTE` always has the size of 8-bit on both
|
||||
32-bit and 64-bit platforms.
|
||||
|
||||
#### New integer types:
|
||||
|
||||
We introduce `DWORD32` and `SDWORD32` types,
|
||||
which have the size of 4 bytes on both 32-bit and 64-bit platforms.
|
||||
You should use these types when reading/writing 32-bit integers from
|
||||
a binary files for the portability. Of course, you can also use
|
||||
We introduce `DWORD32` and `SDWORD32` types,
|
||||
which have the size of 4 bytes on both 32-bit and 64-bit platforms.
|
||||
You should use these types when reading/writing 32-bit integers from
|
||||
a binary files for the portability. Of course, you can also use
|
||||
`Uint32` or `Sint32` types.
|
||||
|
||||
Similarly, we introduce `WORD16` and `SWORD16` types,
|
||||
which have the size of 2 bytes on both 32-bit and 64-bit platforms.
|
||||
You should use these types when reading/writing 16-bit integers from
|
||||
a binary file for the portability. Of course, you can also use
|
||||
which have the size of 2 bytes on both 32-bit and 64-bit platforms.
|
||||
You should use these types when reading/writing 16-bit integers from
|
||||
a binary file for the portability. Of course, you can also use
|
||||
`Uint16` or `SUint16` types.
|
||||
|
||||
`LRESULT` is defined for window callback procedure, and it has
|
||||
@@ -114,7 +248,7 @@ pointer precision.
|
||||
#### Integer macros
|
||||
|
||||
`MAKEWPARAM`: this new macro makes a WPARAM value by using four bytes.
|
||||
On the contrary, `FIRSTBYTE`, `SECONDBYTE`, `THIRDBYTE`, and `FOURTH`
|
||||
On the contrary, `FIRSTBYTE`, `SECONDBYTE`, `THIRDBYTE`, and `FOURTH`
|
||||
macros get the four bytes from a `WPARAM` or a `Uint32` value.
|
||||
|
||||
`MAKEWORD16`: this new macro makes a 16-bit word by using two bytes.
|
||||
@@ -124,12 +258,12 @@ word on 64-bit platform.
|
||||
Note that `MAKELONG` macro always makes a `DWORD` integer, which has pointer
|
||||
precision. Meanwhile, `MAKELONG32` macro makes a `Uint32` integer.
|
||||
|
||||
Note that `MakeRGB` and `MakeRGBA` macros always make `DWORD32` integers.
|
||||
In contract, `GetRValue`, `GetRValue`, `GetBValue`, `GetAValue` always
|
||||
get red, green, blue, and alpha components from a `DWORD32` integer
|
||||
Note that `MakeRGB` and `MakeRGBA` macros always make `DWORD32` integers.
|
||||
In contract, `GetRValue`, `GetRValue`, `GetBValue`, `GetAValue` always
|
||||
get red, green, blue, and alpha components from a `DWORD32` integer
|
||||
respectively.
|
||||
|
||||
Note that you should use `(-1)` instead of `0xFFFFFFFF` for the invalid
|
||||
Note that you should use `(-1)` instead of `0xFFFFFFFF` for the invalid
|
||||
integer or pointer type value for good portability.
|
||||
|
||||
#### Structure and functions
|
||||
@@ -143,16 +277,16 @@ The main changes in structure and functions:
|
||||
|
||||
* We now use a `LRESULT` integer for the return value of a window callback
|
||||
procedure. Now it is safe to return a pointer from the callback procedure
|
||||
on 64-bit platform. This is a very important change, and it will break the
|
||||
on 64-bit platform. This is a very important change, and it will break the
|
||||
source compatibilty of your code. You should check the source code (use
|
||||
gcc option `-Wall`) carefully.
|
||||
|
||||
* We now use a `LINT` integer for the identifier of a timer. So you can pass
|
||||
a pointer as the identifier of the timer on 64-bit platform. mGNCS uses
|
||||
a pointer as the identifier of the timer on 64-bit platform. mGNCS uses
|
||||
MiniGUI timer in this manner.
|
||||
|
||||
* We now use a `LINT` integer for the identifier of a control/widget and a
|
||||
menu item. So you can pass a pointer as the identifier of the timer on
|
||||
menu item. So you can pass a pointer as the identifier of the timer on
|
||||
64-bit platform. mGNCS works in this manner.
|
||||
|
||||
##### Message
|
||||
@@ -161,7 +295,7 @@ The strcuture `MSG` and all message-related functions changed.
|
||||
For example, the prototype of `SendMessage` changed from
|
||||
|
||||
int SendMessage (HWND hWnd, int nMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
|
||||
to
|
||||
|
||||
LRESULT SendMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
|
||||
@@ -169,7 +303,7 @@ to
|
||||
_IMPORTANT NOTE_
|
||||
|
||||
For best portability, you should use `FIRSTBYTE` to `FOURTHBYTE` macros
|
||||
to get the bytes of a character when you extract the bytes from `WPARAM`
|
||||
to get the bytes of a character when you extract the bytes from `WPARAM`
|
||||
parameter of a `MSG_CHAR` message:
|
||||
|
||||
MSG_CHAR
|
||||
@@ -179,10 +313,10 @@ parameter of a `MSG_CHAR` message:
|
||||
unsigned char ch_buff [2] = THIRDBYTE(wParam);
|
||||
unsigned char ch_buff [3] = FOURTHBYTE(wParam);
|
||||
|
||||
##### Window callback procedure
|
||||
##### Window callback procedure
|
||||
|
||||
Furthermore, the structure and functions to register window class,
|
||||
create main window, and create dialog box changed. For example, the prototype
|
||||
Furthermore, the structure and functions to register window class,
|
||||
create main window, and create dialog box changed. For example, the prototype
|
||||
of `WNDPROC` changed from
|
||||
|
||||
typedef int (* WNDPROC)(HWND, int, WPARAM, LPARAM)
|
||||
@@ -221,8 +355,8 @@ to
|
||||
_IMPORTANT NOTE_
|
||||
|
||||
If you use `MSG_COMMAND` message to handle the notification sent from children
|
||||
controls, you should make sure the identifier is small enough on 64-bit
|
||||
platform. Because MiniGUI packs the identifier and the notification code
|
||||
controls, you should make sure the identifier is small enough on 64-bit
|
||||
platform. Because MiniGUI packs the identifier and the notification code
|
||||
in the `WPARAM` parameter:
|
||||
|
||||
MSG_COMMAND
|
||||
@@ -233,8 +367,8 @@ in the `WPARAM` parameter:
|
||||
The code above will not work on 64-bit if you use a pointer as the identifier
|
||||
of the control.
|
||||
|
||||
Therefore, we recommend strongly that you use a `NOTIFYPOROC` callback to
|
||||
handle the notification sent from controls. To do this, please call
|
||||
Therefore, we recommend strongly that you use a `NOTIFYPOROC` callback to
|
||||
handle the notification sent from controls. To do this, please call
|
||||
`SetNotificationCallback` function to set the notification callback function.
|
||||
|
||||
##### Time and timer
|
||||
@@ -260,10 +394,10 @@ to
|
||||
In addition, we correct the bad or wrong definitions of some APIs:
|
||||
|
||||
* `DWORD2PIXEL` to `DWORD2Pixel`. The old one has a bad name.
|
||||
* `GetWindowRendererFromName`: The return type changes from
|
||||
* `GetWindowRendererFromName`: The return type changes from
|
||||
`const WINDOW_ELEMENT_RENDERER*` to `WINDOW_ELEMENT_RENDERER*`.
|
||||
So you can overload some methods directly of a renderer.
|
||||
* `GetDefaultWindowElementRenderer`: The return type changes from
|
||||
* `GetDefaultWindowElementRenderer`: The return type changes from
|
||||
`const WINDOW_ELEMENT_RENDERER*` to `WINDOW_ELEMENT_RENDERER*`.
|
||||
So you can overload some methods directly of the default renderer.
|
||||
|
||||
@@ -277,15 +411,15 @@ We add some new options for autoconf script (`configure`):
|
||||
|
||||
* `--enable-develmode`: You should use this option to define `_DEBUG` macro,
|
||||
enable `-Wall -Werror` option, and enable all features of MiniGUI,
|
||||
if you were a MiniGUI developer.
|
||||
if you were a MiniGUI developer.
|
||||
|
||||
## Version 3.0.13
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.0.13.
|
||||
All users of MiniGUI are encouraged to test this version carefully, and
|
||||
All users of MiniGUI are encouraged to test this version carefully, and
|
||||
report any bugs and incompatibilities in
|
||||
|
||||
https://github.com/VincentWei/minigui.
|
||||
https://github.com/VincentWei/minigui.
|
||||
|
||||
### What's new in this version
|
||||
|
||||
@@ -293,7 +427,7 @@ report any bugs and incompatibilities in
|
||||
* The autoconf/automake config scripts are cleaned up.
|
||||
* Remove most of compilation warnings (not used variables).
|
||||
* Remove some inline function definitions, especially GetIMEPos/SetIMEPos.
|
||||
* Fix some bugs.
|
||||
* Fix some bugs.
|
||||
|
||||
### API changes
|
||||
|
||||
@@ -302,12 +436,12 @@ report any bugs and incompatibilities in
|
||||
* [NEW] ToUnicode/ToAscii: Converts the key code between Unicode and ASCII.
|
||||
* [NEW] GetWindowRegion: The function obtains a copy of the window region of a window.
|
||||
* [NEW] InvalidateRegion: Invalidates the client area within the specified region.
|
||||
* [NEW] ValidateRect: Validates the client area within a rectangle by removing the
|
||||
* [NEW] ValidateRect: Validates the client area within a rectangle by removing the
|
||||
rectangle from the update region of the specified window.
|
||||
* [NEW] ValidateRegion: Validates the client area within a region by removing the
|
||||
* [NEW] ValidateRegion: Validates the client area within a region by removing the
|
||||
region from the current update region of the specified window.
|
||||
* [NEW] GetUpdateRegion: Copy the update region of a window to a region.
|
||||
* [NEW] AdjustWindowRectEx: Calculates the required size of the window rectangle
|
||||
* [NEW] AdjustWindowRectEx: Calculates the required size of the window rectangle
|
||||
based on the desired size of the client rectangle.
|
||||
* [NEW] WindowFromPointEx: Retrieves a handle to the window that contains the specified point.
|
||||
* [NEW] ChildWindowFromPointEx: Retrieves a handle to the child window that contains the
|
||||
@@ -317,15 +451,15 @@ report any bugs and incompatibilities in
|
||||
* [ADJUST] WindowFromPoint: normal function -> inline function.
|
||||
* [ADJUST] ChildWindowFromPoint: normal function -> inline function.
|
||||
* [ADJUST] ScrollWindow: normal function -> inline function.
|
||||
|
||||
|
||||
|
||||
|
||||
## Version 3.0.2
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.0.2.
|
||||
All users of MiniGUI are encouraged to test this version carefully, and
|
||||
All users of MiniGUI are encouraged to test this version carefully, and
|
||||
report any bugs and incompatibilities in
|
||||
|
||||
https://github.com/VincentWei/minigui.
|
||||
https://github.com/VincentWei/minigui.
|
||||
|
||||
### What's new in this version
|
||||
|
||||
@@ -334,20 +468,20 @@ report any bugs and incompatibilities in
|
||||
* Support for Look and Feel (LF) concept.
|
||||
* Remove SKIN interfaces of MGExt library, move MGExt library and vcongui into mGUtils component.
|
||||
* Newly added bitmap font.
|
||||
* Developing interfaces of desktop for MiniGUI.
|
||||
* Developing interfaces of desktop for MiniGUI.
|
||||
* Support direct draw to DC for higher efficiency.
|
||||
* Enhancement of resource management
|
||||
* Enhancement of controls: Support of independent scrollbar and transparent control.
|
||||
* Enhancement of font and character set, support bidi text support.
|
||||
* Enhancement of zoom of picture
|
||||
|
||||
|
||||
|
||||
### API changes
|
||||
|
||||
* [NEW] ScaleBitmapEx: a bilinear interpolation algorithm which is better than the original.
|
||||
* [NEW] GetWindowInfo: get New structure WINDOWINFO.
|
||||
* [NEW] CreateMainWindowEx: enhance of CreeateMainWindow, compatiable with CreeateMainWindow.
|
||||
* [NEW] CreateWindowEx2:enhance of CreateWindowEx2, compatiable with CreateWindowEx2.
|
||||
* [NEW] CreateWindowEx2:enhance of CreateWindowEx2, compatiable with CreateWindowEx2.
|
||||
* [NEW] DialogBoxIndirectParamEx: new create dialog.
|
||||
* [NEW] CreateMainWindowIndirectParamEx:new create dialog.
|
||||
* [NEW] GetWindowRendererFromName: get LF renderer by name
|
||||
@@ -361,7 +495,7 @@ report any bugs and incompatibilities in
|
||||
* [NEW] CreateBMPDevFont: create an bitmap device font.
|
||||
* [NEW] AddGlyphsToBMPFont: add an bitmap font glyph.
|
||||
* [NEW] DestroyBMPFont: destroy bitmap device font.
|
||||
* [NEW] SetCustomDesktopOperationSet: set the custom desktop operation set.
|
||||
* [NEW] SetCustomDesktopOperationSet: set the custom desktop operation set.
|
||||
* [NEW] DesktopUpdateAllWindow: refresh all windows on the desktop.
|
||||
* [NEW] PopupDesktopMenu: pop up a menu on the desktop
|
||||
* [NEW] GetTextAlign: get the current text-alignment flags of a DC.
|
||||
@@ -369,5 +503,5 @@ report any bugs and incompatibilities in
|
||||
* [NEW] SetWindowMask: set non-rectangle window mask rect.
|
||||
* [NEW] SetWindowRegion: set non-rectangle window visible region
|
||||
* [NEW] LockDCEx: support for directly read and write the pixels in a DC.
|
||||
* [NEW] CreateSecondaryDC: Creates a secondary window DC of a window.
|
||||
* [NEW] CreateSecondaryDC: Creates a secondary window DC of a window.
|
||||
* [NEW] SetSecondaryDC:set a window's secondary DC and the callback for double buffer window.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Version 3.2.0 (2018/02/10)
|
||||
Version 3.4.0 (2019/06/30)
|
||||
|
||||
This release needs the following resource packages:
|
||||
|
||||
* minigui-res-3.0.13.tar.gz
|
||||
* minigui-res-3.4.0.tar.gz
|
||||
|
||||
The latest samples package is:
|
||||
|
||||
* mg-samples-3.2.0.tar.gz
|
||||
* mg-samples-3.4.0.tar.gz
|
||||
|
||||
+119
-95
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT(libminigui, 3.2.2)
|
||||
AC_INIT(libminigui, 3.4.0)
|
||||
AC_CONFIG_SRCDIR(src/main/main.c)
|
||||
|
||||
dnl Set various version strings - taken gratefully from the SDL sources
|
||||
@@ -15,10 +15,10 @@ dnl Set various version strings - taken gratefully from the SDL sources
|
||||
# set MINIGUI_BINARY_AGE and MINIGUI_INTERFACE_AGE to 0.
|
||||
#
|
||||
MINIGUI_MAJOR_VERSION=3
|
||||
MINIGUI_MINOR_VERSION=2
|
||||
MINIGUI_MICRO_VERSION=2
|
||||
MINIGUI_MINOR_VERSION=4
|
||||
MINIGUI_MICRO_VERSION=0
|
||||
MINIGUI_INTERFACE_AGE=0
|
||||
MINIGUI_BINARY_AGE=1
|
||||
MINIGUI_BINARY_AGE=0
|
||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||
|
||||
AC_SUBST(MINIGUI_MAJOR_VERSION)
|
||||
@@ -76,7 +76,8 @@ AC_FUNC_ALLOCA
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(time mktime localtime strdup strcasecmp strncasecmp strerror setlocale getpt)
|
||||
AC_CHECK_FUNCS(time mktime localtime strdup strcasecmp strncasecmp strerror setlocale)
|
||||
AC_CHECK_FUNCS(posix_memalign memalign valloc)
|
||||
|
||||
dnl ========================================================================
|
||||
dnl User selectable options
|
||||
@@ -164,7 +165,8 @@ build_incorefont_times="yes"
|
||||
|
||||
build_sef_support="no"
|
||||
build_qpf_support="no"
|
||||
use_ttf_lib="ft2"
|
||||
build_ttf_support="yes"
|
||||
build_complex_scripts="yes"
|
||||
build_ttfcache_support="yes"
|
||||
build_bmpf_support="yes"
|
||||
|
||||
@@ -193,6 +195,7 @@ build_eucjp_support="no"
|
||||
build_shiftjis_support="no"
|
||||
|
||||
build_unicode_support="yes"
|
||||
build_full_unicode="yes"
|
||||
|
||||
dnl Keyboard layout specific options
|
||||
use_kbd_hebrewpc="no"
|
||||
@@ -389,7 +392,7 @@ AC_ARG_ENABLE(netial,
|
||||
build_net_ial_engine=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(cisco_touchpad_ial,
|
||||
[ --enable-cisco_touchpad_ial build the IAL engine for Cisco Touchpad <default=no>],
|
||||
[ --enable-cisco_touchpad_ial build the IAL engine for Cisco Touchpad <default=no>],
|
||||
build_cisco_touchpad_ial_engine=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(mstar_ial,
|
||||
@@ -536,14 +539,18 @@ AC_ARG_ENABLE(sefsupport,
|
||||
[ --enable-sefsupport build support for koxomo scripteasy (SEF) <default=no>],
|
||||
build_sef_support=$enableval)
|
||||
|
||||
AC_ARG_WITH(ttfsupport,
|
||||
[ --with-ttfsupport=ft1/ft2/none How to support TrueType font (FreeType 1/FreeType 2/None) <default=none>],
|
||||
use_ttf_lib=$withval)
|
||||
AC_ARG_ENABLE(ttfsupport,
|
||||
[ --enable-ttfsupport build support for TrueType/OpenType (needs FreeType2 library) <default=yes>],
|
||||
build_ttf_support=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(ttfcache,
|
||||
[ --enable-ttfcache include ttf cache support <default=no>],
|
||||
[ --enable-ttfcache build ttf cache support <default=no>],
|
||||
build_ttfcache_support=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(complexscripts,
|
||||
[ --enable-complexscripts build support for complex scripts (needs HarzBuff library) <default=yes>],
|
||||
build_complex_scripts=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(bmpfsupport,
|
||||
[ --enable-bmpfsupport build support for Bitmap Font (bmpf) <default=yes>],
|
||||
build_bmpf_support=$enableval)
|
||||
@@ -636,6 +643,10 @@ AC_ARG_ENABLE(unicodesupport,
|
||||
[ --enable-unicodesupport include UNICODE (ISO-10646-1 and UTF-8 encoding) support <default=yes>],
|
||||
build_unicode_support=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(fullunicode,
|
||||
[ --enable-fullunicode include support for full UNICODE code points <default=yes>],
|
||||
build_full_unicode=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(kbdhebrewpc,
|
||||
[ --enable-kbdhebrewpc include keyboard layout for Hebrew PC keyboard <default=no>],
|
||||
use_kbd_hebrewpc=$enableval)
|
||||
@@ -834,7 +845,7 @@ CheckFBCON()
|
||||
AC_ARG_ENABLE(videofbcon,
|
||||
[ --enable-videofbcon include FrameBuffer console NEWGAL engine <default=yes>],
|
||||
enable_video_fbcon=$enableval)
|
||||
if test x$enable_video_fbcon = xyes; then
|
||||
if test "x$enable_video_fbcon" = "xyes"; then
|
||||
AC_MSG_CHECKING(for FrameBuffer console support)
|
||||
video_fbcon=no
|
||||
AC_TRY_COMPILE([
|
||||
@@ -846,7 +857,7 @@ CheckFBCON()
|
||||
video_fbcon=yes
|
||||
])
|
||||
AC_MSG_RESULT($video_fbcon)
|
||||
if test x$video_fbcon = xyes; then
|
||||
if test "x$video_fbcon" = "xyes"; then
|
||||
AC_DEFINE(_MGGAL_FBCON, 1,
|
||||
[Define if include FrameBuffer console NEWGAL engine])
|
||||
VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
|
||||
@@ -856,7 +867,7 @@ CheckFBCON()
|
||||
AC_CHECK_LIB(pciaccess, pci_system_init,
|
||||
DEP_LIBS="$DEP_LIBS -lpciaccess", have_pciaccess="no")
|
||||
|
||||
if test x$have_pciaccess = xyes; then
|
||||
if test "x$have_pciaccess" = "xyes"; then
|
||||
AC_DEFINE(_MGHAVE_PCIACCESS, 1,
|
||||
[Define if PCIAccess lib is available])
|
||||
LDFLAGS="$LDFLAGS -lpciaccess"
|
||||
@@ -892,21 +903,21 @@ CheckXVFB()
|
||||
[ --enable-videortosxvfb include RTOS Virtual FrameBuffer NEWGAL engine <default=no>. Please disable pcxvfb to enable rtosxvfb],
|
||||
enable_video_rtos_xvfb=$enableval)
|
||||
|
||||
if test "x$enable_video_pc_xvfb" = "xyes"; then
|
||||
dnl CheckPCXVFB
|
||||
if test "x$enable_video_pc_xvfb" = "xyes"; then
|
||||
dnl CheckPCXVFB
|
||||
AC_DEFINE(_MGGAL_PCXVFB, 1,
|
||||
[Define if include PC Virtual FrameBuffer NEWGAL engine])
|
||||
VIDEO_SUBDIRS="$VIDEO_SUBDIRS pcxvfb"
|
||||
VIDEO_DRIVERS="$VIDEO_DRIVERS pcxvfb/libvideo_pcxvfb.la"
|
||||
else
|
||||
if test "x$enable_video_rtos_xvfb" = "xyes"; then
|
||||
dnl CheckRTOSXVFB
|
||||
else
|
||||
if test "x$enable_video_rtos_xvfb" = "xyes"; then
|
||||
dnl CheckRTOSXVFB
|
||||
AC_DEFINE(_MGGAL_RTOSXVFB, 1,
|
||||
[Define if include RTOS Virtual FrameBuffer NEWGAL engine])
|
||||
VIDEO_SUBDIRS="$VIDEO_SUBDIRS rtos_xvfb"
|
||||
VIDEO_DRIVERS="$VIDEO_DRIVERS rtos_xvfb/libvideo_rtos_xvfb.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1099,7 +1110,7 @@ CheckDirectFBVideo()
|
||||
[ --enable-videodfb include NEWGAL engine for DirectFB <default=no>],
|
||||
enable_video_dfb=$enableval)
|
||||
|
||||
if test x$enable_video_dfb = xyes; then
|
||||
if test "x$enable_video_dfb" = "xyes"; then
|
||||
AC_MSG_CHECKING(for DirectFB support)
|
||||
video_dfb=no
|
||||
AC_TRY_COMPILE([
|
||||
@@ -1109,7 +1120,7 @@ CheckDirectFBVideo()
|
||||
video_dfb=yes
|
||||
])
|
||||
AC_MSG_RESULT($video_dfb)
|
||||
if test x$video_dfb = xyes; then
|
||||
if test "x$video_dfb" = "xyes"; then
|
||||
AC_DEFINE(_MGGAL_DFB, 1,
|
||||
[Define if include NEWGAL engine for DirectFB])
|
||||
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dfb"
|
||||
@@ -1121,7 +1132,7 @@ CheckDirectFBVideo()
|
||||
[ --enable-videost7167 include NEWGAL engine for ST7167 on DirectFB <default=no>],
|
||||
enable_video_dfb_st7167=$enableval)
|
||||
|
||||
if test x$enable_video_dfb_st7167 = xyes; then
|
||||
if test "x$enable_video_dfb_st7167" = "xyes"; then
|
||||
AC_DEFINE(_MGGAL_DFB_ST7167, 1,
|
||||
[Define if include ST7167 subdriver for NEWGAL engine of DirectFB])
|
||||
fi
|
||||
@@ -1515,11 +1526,11 @@ AC_ARG_WITH(targetname,
|
||||
case "$with_targetname" in
|
||||
fmsoft)
|
||||
AC_DEFINE(__TARGET_FMSOFT__, 1,
|
||||
[Define for FMSoft internal use])
|
||||
[Define for FMSoft internal use])
|
||||
;;
|
||||
mstudio)
|
||||
AC_DEFINE(__TARGET_MSTUDIO__, 1,
|
||||
[Define for FMSoft miniStudio])
|
||||
[Define for FMSoft miniStudio])
|
||||
;;
|
||||
stb810)
|
||||
AC_DEFINE(__TARGET_STB810__, 1,
|
||||
@@ -1547,11 +1558,11 @@ case "$with_targetname" in
|
||||
;;
|
||||
bfin)
|
||||
AC_DEFINE(__TARGET_BLACKFIN__, 1,
|
||||
[Define for Blackfin run uClinux])
|
||||
[Define for Blackfin run uClinux])
|
||||
;;
|
||||
c33l05)
|
||||
AC_DEFINE(__TARGET_C33L05__, 1,
|
||||
[Define for EPSON C33L05 (axLinux)])
|
||||
[Define for EPSON C33L05 (axLinux)])
|
||||
;;
|
||||
S3C6410)
|
||||
CFLAGS="$CFLAGS -D_WITH_TARGET_S3C6410"
|
||||
@@ -1977,30 +1988,29 @@ if test "x$build_upf_support" = "xyes"; then
|
||||
fi
|
||||
|
||||
dnl Check FreeType lib
|
||||
case "$use_ttf_lib" in
|
||||
ft1)
|
||||
dnl Check for FreeType1 library
|
||||
AC_CHECK_LIB(ttf, TT_FreeType_Version,
|
||||
DEP_LIBS="$DEP_LIBS -lttf",
|
||||
use_ttf_lib="none")
|
||||
;;
|
||||
ft2)
|
||||
dnl Check for FreeType2 library
|
||||
if test "x$build_ttf_support" = "xyes"; then
|
||||
dnl Check for FreeType2 library
|
||||
AC_CHECK_LIB(freetype, FT_Library_Version,
|
||||
DEP_LIBS="$DEP_LIBS -lfreetype",
|
||||
use_ttf_lib="none")
|
||||
;;
|
||||
esac
|
||||
build_ttf_support="no")
|
||||
fi
|
||||
|
||||
dnl Dealing with TTF cache size
|
||||
if test "x$build_ttf_support" = "xyes"; then
|
||||
|
||||
if test "x$build_complex_scripts" = "xyes"; then
|
||||
dnl Check for HarfBuzz library
|
||||
AC_CHECK_LIB(harfbuzz, hb_version,
|
||||
DEP_LIBS="$DEP_LIBS -lharfbuzzex",
|
||||
build_complex_scripts="no")
|
||||
fi
|
||||
|
||||
dnl Dealing with TTF cache size
|
||||
case "$use_ttf_lib" in
|
||||
ft1|ft2)
|
||||
if test "x$build_ttfcache_support" = "xyes"; then
|
||||
AC_DEFINE(_MGFONT_TTF_CACHE, 1,
|
||||
[Define if include ttf cache])
|
||||
|
||||
AC_ARG_WITH(ttfcachesize,
|
||||
[ --with-ttfcachesize=[64/128/256/512/1024]])
|
||||
[ --with-ttfcachesize=[64/128/256/512/1024/2048]])
|
||||
|
||||
case "$with_ttfcachesize" in
|
||||
64)
|
||||
@@ -2023,79 +2033,85 @@ case "$use_ttf_lib" in
|
||||
AC_DEFINE(_MGTTF_CACHE_SIZE, 1024,
|
||||
[Define if compile max ttf cahce size for 1024k])
|
||||
;;
|
||||
2048)
|
||||
AC_DEFINE(_MGTTF_CACHE_SIZE, 2048,
|
||||
[Define if compile max ttf cahce size for 2048k])
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(_MGTTF_CACHE_SIZE, 256,
|
||||
[Define if compile max ttf cahce size for 256k])
|
||||
AC_DEFINE(_MGTTF_CACHE_SIZE, 1024,
|
||||
[Define if compile max ttf cahce size for 1024k (default value)])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_WITH(ttfcachenum,
|
||||
[ --with-mttfcachenum=[10/20/40]])
|
||||
case "$with_mttfcachenum" in
|
||||
10)
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 10,
|
||||
[Define if compile max ttf cahce number for 10])
|
||||
[ --with-ttfcachenum=[16/32/64/128]])
|
||||
case "$with_ttfcachenum" in
|
||||
16)
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 16,
|
||||
[Define if compile max ttf cahce number for 16])
|
||||
;;
|
||||
20)
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 20,
|
||||
[Define if compile max ttf cahce number for 20])
|
||||
32)
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 32,
|
||||
[Define if compile max ttf cahce number for 32])
|
||||
;;
|
||||
40)
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 40,
|
||||
[Define if compile max ttf cahce number for 40])
|
||||
64)
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 64,
|
||||
[Define if compile max ttf cahce number for 64])
|
||||
;;
|
||||
128)
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 128,
|
||||
[Define if compile max ttf cahce number for 128])
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 10,
|
||||
[Define if compile max ttf cahce number for 10 (default value)])
|
||||
AC_DEFINE(_MGMAX_TTF_CACHE, 32,
|
||||
[Define if compile max ttf cahce number for 32 (default value)])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl Dealing with CFLAGS and LDFLAGS
|
||||
case "$use_ttf_lib" in
|
||||
ft1)
|
||||
build_unicode_support="yes"
|
||||
if test "x$build_complex_scripts" = "xyes"; then
|
||||
build_ttf_support="yes"
|
||||
AC_DEFINE(_MGCOMPLEX_SCRIPTS, 1,
|
||||
[Define if support complex scripts based on HarfBuzz])
|
||||
|
||||
AC_DEFINE(_MGFONT_TTF, 1,
|
||||
[Define if support TrueType font])
|
||||
AC_ARG_WITH(hb_includes,
|
||||
[ --with-hb-includes=DIR where the HarfBuzz includes are])
|
||||
|
||||
AC_ARG_WITH(ft1_includes,
|
||||
[ --with-ft1-includes=DIR where the FreeType1 includes are])
|
||||
if test "x$with_hb_includes" = "x"; then
|
||||
HB_INC_DIR="-I/usr/local/include/harfbuzz"
|
||||
else
|
||||
HB_INC_DIR="-I$with_hb_includes"
|
||||
fi
|
||||
|
||||
if test "x$with_ft1_includes" = "x"; then
|
||||
FT1_INC_DIR="-I/usr/include/freetype1"
|
||||
else
|
||||
FT1_INC_DIR="-I$with_ft1_includes"
|
||||
fi
|
||||
AC_SUBST(HB_INC_DIR)
|
||||
fi
|
||||
|
||||
AC_SUBST(FT1_INC_DIR)
|
||||
;;
|
||||
ft2)
|
||||
build_unicode_support="yes"
|
||||
AC_DEFINE(_MGFONT_FT2, 1,
|
||||
[Define if support TrueType font based on FreeType2])
|
||||
if test "x$build_ttf_support" = "xyes"; then
|
||||
build_unicode_support="yes"
|
||||
AC_DEFINE(_MGFONT_FT2, 1,
|
||||
[Define if support TrueType/OpenType fonts based on FreeType2])
|
||||
|
||||
AC_ARG_WITH(ft2_includes,
|
||||
[ --with-ft2-includes=DIR where the FreeType2 includes are])
|
||||
with_ft2_includes=""
|
||||
AC_ARG_WITH(ft2_includes,
|
||||
[ --with-ft2-includes=DIR where the FreeType2 includes are],
|
||||
with_ft2_includes=$withval)
|
||||
|
||||
if test "x$with_ft2_includes" = "x"; then
|
||||
FT2_INC_DIR="-I/usr/include/freetype2"
|
||||
else
|
||||
FT2_INC_DIR="-I$with_ft2_includes"
|
||||
fi
|
||||
if test "x$with_ft2_includes" = "x"; then
|
||||
FT2_INC_DIR="-I/usr/include/freetype2"
|
||||
else
|
||||
FT2_INC_DIR="-I$with_ft2_includes"
|
||||
fi
|
||||
|
||||
AC_SUBST(FT2_INC_DIR)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(FT2_INC_DIR)
|
||||
fi
|
||||
|
||||
if test "x$build_bmpf_support" = "xyes"; then
|
||||
AC_DEFINE(_MGFONT_BMPF, 1,
|
||||
[Define if support Bitmap fonts])
|
||||
fi
|
||||
|
||||
|
||||
if test "x$build_latin2_support" = "xyes"; then
|
||||
AC_DEFINE(_MGCHARSET_LATIN2, 1,
|
||||
[Define if support Latin 2 charset])
|
||||
@@ -2206,6 +2222,11 @@ if test "x$build_unicode_support" = "xyes"; then
|
||||
[Define if support UNICODE])
|
||||
fi
|
||||
|
||||
if test "x$build_full_unicode" = "xyes"; then
|
||||
AC_DEFINE(_MGCHARSET_UNICODE_FULL, 1,
|
||||
[Define if support full UNICODE code points])
|
||||
fi
|
||||
|
||||
if test "x$use_kbd_hebrewpc" = "xyes"; then
|
||||
AC_DEFINE(_MGKBDLAYOUT_HEBREWPC, 1,
|
||||
[Define if use the Hebrew PC keyboard layout])
|
||||
@@ -2430,8 +2451,8 @@ fi
|
||||
if test "x$build_ctrl_textedit_new" = "xyes"; then
|
||||
AC_DEFINE(_MGCTRL_TEXTEDIT, 1,
|
||||
[Define if include TEXTEDIT control])
|
||||
AC_DEFINE(_MGCTRL_TEXTEDIT_USE_NEW_IMPL, 1,
|
||||
[Define if use new implementation of TEXTEDIT control])
|
||||
AC_DEFINE(_MGCTRL_TEXTEDIT_USE_NEW_IMPL, 1,
|
||||
[Define if use new implementation of TEXTEDIT control])
|
||||
fi
|
||||
|
||||
if test "x$build_splash" = "xyes"; then
|
||||
@@ -2459,20 +2480,23 @@ dnl define _GNU_SOURCE for pthread_rwlock_t
|
||||
CFLAGS="$CFLAGS -D_GNU_SOURCE"
|
||||
|
||||
if test "x$devel_mode" = "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -D_DEBUG"
|
||||
CPPFLAGS="$CPPFLAGS -DDEBUG"
|
||||
if test "x$detail_debug" = "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DDEBUG"
|
||||
CPPFLAGS="$CPPFLAGS -D_DEBUG"
|
||||
fi
|
||||
|
||||
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -Wall -Werror"
|
||||
fi
|
||||
|
||||
AC_DEFINE(_MGDEVEL_MODE, 1,
|
||||
[Define if developer mode enabled])
|
||||
else
|
||||
CPPFLAGS="$CPPFLAGS -DNDEBUG"
|
||||
fi
|
||||
|
||||
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||
CFLAGS="$CFLAGS -O2 -Wstrict-prototypes -pipe"
|
||||
CFLAGS="$CFLAGS -O2 -fmax-errors=10 -Wstrict-prototypes -pipe"
|
||||
fi
|
||||
|
||||
if test "x$runtime_mode" = "xths"; then
|
||||
|
||||
@@ -239,9 +239,9 @@ int GUIAPI GetFirstWord (PLOGFONT log_font, const char* mstr, int len,
|
||||
496 static int euckr_is_this_charset (const unsigned char* charset)
|
||||
497 {
|
||||
498 int i;
|
||||
499 char name [LEN_FONT_NAME + 1];
|
||||
499 char name [LEN_LOGFONT_NAME_FIELD + 1];
|
||||
500
|
||||
501 for (i = 0; i < LEN_FONT_NAME + 1; i++) {
|
||||
501 for (i = 0; i < LEN_LOGFONT_NAME_FIELD + 1; i++) {
|
||||
502 if (charset [i] == '\0')
|
||||
503 break;
|
||||
504 name [i] = toupper (charset [i]);
|
||||
@@ -388,9 +388,9 @@ int GUIAPI GetFirstWord (PLOGFONT log_font, const char* mstr, int len,
|
||||
|
||||
<table border="0" cellpadding="0" class="code-sample" width="100%"><tr><td> <pre>
|
||||
228 typedef struct _LOGFONT {
|
||||
229 char type [LEN_FONT_NAME + 1];
|
||||
230 char family [LEN_FONT_NAME + 1];
|
||||
231 char charset [LEN_FONT_NAME + 1];
|
||||
229 char type [LEN_LOGFONT_NAME_FIELD + 1];
|
||||
230 char family [LEN_LOGFONT_NAME_FIELD + 1];
|
||||
231 char charset [LEN_LOGFONT_NAME_FIELD + 1];
|
||||
232 DWORD style;
|
||||
233 int size;
|
||||
234 int rotation;
|
||||
|
||||
+12
-12
@@ -1,14 +1,14 @@
|
||||
static LOGFONT *logfont, *logfontgb12, *logfontbig24;
|
||||
|
||||
logfont = CreateLogFont (NULL, "SansSerif", "ISO8859-1",
|
||||
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_SETWIDTH_NORMAL,
|
||||
FONT_SPACING_CHARCELL, FONT_UNDERLINE_NONE, FONT_STRUCKOUT_LINE,
|
||||
16, 0);
|
||||
logfontgb12 = CreateLogFont (NULL, "song", "GB2312",
|
||||
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_SETWIDTH_NORMAL,
|
||||
FONT_SPACING_CHARCELL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_LINE,
|
||||
12, 0);
|
||||
logfontbig24 = CreateLogFont (NULL, "ming", "BIG5",
|
||||
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_SETWIDTH_NORMAL,
|
||||
FONT_SPACING_CHARCELL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_NONE,
|
||||
24, 0);
|
||||
logfont = CreateLogFont (NULL, "SansSerif", "ISO8859-1",
|
||||
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_FLIP_NONE,
|
||||
FONT_OTHER_NIL, FONT_UNDERLINE_NONE, FONT_STRUCKOUT_LINE,
|
||||
16, 0);
|
||||
logfontgb12 = CreateLogFont (NULL, "song", "GB2312",
|
||||
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
|
||||
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_LINE,
|
||||
12, 0);
|
||||
logfontbig24 = CreateLogFont (NULL, "ming", "BIG5",
|
||||
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
|
||||
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_NONE,
|
||||
24, 0);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
static LOGFONT *logfont, *logfontgb12, *logfontttf;
|
||||
|
||||
logfont = CreateLogFontEx (NULL, "SansSerif", "ISO8859-1",
|
||||
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_FLIP_NONE,
|
||||
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
|
||||
16, 0);
|
||||
logfontgb12 = CreateLogFontEx (NULL, "song", "GB2312",
|
||||
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
|
||||
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
|
||||
12, 0);
|
||||
logfontttf = CreateLogFontEx ("ttf", "Courier", "UTF-8",
|
||||
FONT_WEIGHT_BLACK, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
|
||||
FS_OTHER_LCDPORTRAIT, FONT_DECORATE_NONE, FONT_RENDER_SUBPIXEL,
|
||||
24, 0);
|
||||
+156
-103
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -2,12 +2,12 @@
|
||||
* \file control.h
|
||||
* \author Wei Yongming <vincent@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
*
|
||||
* \brief This file includes interfaces of standard controls of MiniGUI.
|
||||
*
|
||||
\verbatim
|
||||
|
||||
This file is part of MiniGUI, a mature cross-platform windowing
|
||||
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.
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
/*
|
||||
* $Id: control.h 11349 2009-03-02 05:00:43Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
*/
|
||||
|
||||
+66
-66
@@ -2,12 +2,12 @@
|
||||
* \file fixedmath.h
|
||||
* \author Wei Yongming <vincent@minigui.org>
|
||||
* \date 2002/01/12
|
||||
*
|
||||
*
|
||||
* \brief This file includes fixed point and three-dimension math routines.
|
||||
*
|
||||
\verbatim
|
||||
|
||||
This file is part of MiniGUI, a mature cross-platform windowing
|
||||
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.
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
/*
|
||||
* $Id: fixedmath.h 12154 2009-10-15 07:21:34Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Fixed-point math routins come from Allegro (a gift software)
|
||||
@@ -79,21 +79,21 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* \defgroup fixed_math_fns Fixed point math functions
|
||||
*
|
||||
*
|
||||
* You know that the float point mathematics routines are very
|
||||
* expensive. If you do not want precision mathematics result,
|
||||
* expensive. If you do not want precision mathematics result,
|
||||
* you can use fixed point. MiniGUI uses a double word (32-bit)
|
||||
* integer to represent a fixed point ranged from -32767.0 to
|
||||
* 32767.0, and defines some fixed point mathematics routines for
|
||||
* your application. Some GDI functions need fixed point
|
||||
* integer to represent a fixed point ranged from -32767.0 to
|
||||
* 32767.0, and defines some fixed point mathematics routines for
|
||||
* your application. Some GDI functions need fixed point
|
||||
* math routines, like \a Arc.
|
||||
*
|
||||
* Example 1:
|
||||
*
|
||||
*
|
||||
* \include fixed_point.c
|
||||
*
|
||||
* Example 2:
|
||||
*
|
||||
*
|
||||
* \include fixedpoint.c
|
||||
* @{
|
||||
*/
|
||||
@@ -112,9 +112,9 @@ MG_EXPORT fixed fixsqrt (fixed x);
|
||||
/**
|
||||
* \fn fixed fixhypot (fixed x, fixed y)
|
||||
* \brief Returns the Euclidean distance from the origin.
|
||||
*
|
||||
* The function returns the \a sqrt(x*x+y*y). This is the length of
|
||||
* the hypotenuse of a right-angle triangle with sides of length \a x and \a y,
|
||||
*
|
||||
* The function returns the \a sqrt(x*x+y*y). This is the length of
|
||||
* the hypotenuse of a right-angle triangle with sides of length \a x and \a y,
|
||||
* or the distance of the point \a (x,y) from the origin.
|
||||
*
|
||||
* \sa fixsqrt
|
||||
@@ -125,10 +125,10 @@ MG_EXPORT fixed fixhypot (fixed x, fixed y);
|
||||
* \fn fixed fixatan (fixed x)
|
||||
* \brief Calculates the arc tangent of a fixed point value.
|
||||
*
|
||||
* This function calculates the arc tangent of \a x; that is the value
|
||||
* This function calculates the arc tangent of \a x; that is the value
|
||||
* whose tangent is \a x.
|
||||
*
|
||||
* \return Returns the arc tangent in radians and the value is
|
||||
* \return Returns the arc tangent in radians and the value is
|
||||
* mathematically defined to be between -PI/2 and PI/2 (inclusive).
|
||||
*
|
||||
* \sa fixatan2
|
||||
@@ -140,20 +140,20 @@ MG_EXPORT fixed fixatan (fixed x);
|
||||
* \brief Calculates the arc tangent of two fixed point variables.
|
||||
*
|
||||
* This function calculates the arc tangent of the two variables \a x and \a y.
|
||||
* It is similar to calculating the arc tangent of \a y / \a x, except that
|
||||
* the signs of both arguments are used to determine the quadrant of the
|
||||
* It is similar to calculating the arc tangent of \a y / \a x, except that
|
||||
* the signs of both arguments are used to determine the quadrant of the
|
||||
* result.
|
||||
*
|
||||
* \return Returns the result in radians, which is between -PI and PI
|
||||
* \return Returns the result in radians, which is between -PI and PI
|
||||
* (inclusive).
|
||||
*
|
||||
* \sa fixatan
|
||||
*/
|
||||
MG_EXPORT fixed fixatan2 (fixed y, fixed x);
|
||||
|
||||
extern MG_EXPORT fixed _cos_tbl[];
|
||||
extern MG_EXPORT fixed _tan_tbl[];
|
||||
extern MG_EXPORT fixed _acos_tbl[];
|
||||
extern MG_EXPORT const fixed __mg_cos_tbl[];
|
||||
extern MG_EXPORT const fixed __mg_tan_tbl[];
|
||||
extern MG_EXPORT const fixed __mg_acos_tbl[];
|
||||
|
||||
/************************** inline fixed point math functions *****************/
|
||||
/* ftofix and fixtof are used in generic C versions of fixmul and fixdiv */
|
||||
@@ -162,7 +162,7 @@ extern MG_EXPORT fixed _acos_tbl[];
|
||||
* \fn fixed ftofix (double x)
|
||||
* \brief Converts a float point value to a fixed point value.
|
||||
*
|
||||
* This function converts the specified float point value \a x to
|
||||
* This function converts the specified float point value \a x to
|
||||
* a fixed point value.
|
||||
*
|
||||
* \note The float point should be ranged from -32767.0 to 32767.0.
|
||||
@@ -171,7 +171,7 @@ extern MG_EXPORT fixed _acos_tbl[];
|
||||
* \sa fixtof
|
||||
*/
|
||||
static inline fixed ftofix (double x)
|
||||
{
|
||||
{
|
||||
if (x > 32767.0) {
|
||||
errno = ERANGE;
|
||||
return 0x7FFFFFFF;
|
||||
@@ -182,21 +182,21 @@ static inline fixed ftofix (double x)
|
||||
return -0x7FFFFFFF;
|
||||
}
|
||||
|
||||
return (long)(x * 65536.0 + (x < 0 ? -0.5 : 0.5));
|
||||
return (long)(x * 65536.0 + (x < 0 ? -0.5 : 0.5));
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn double fixtof (fixed x)
|
||||
* \brief Converts a fixed point value to a float point value.
|
||||
*
|
||||
* This function converts the specified fixed point value \a x to
|
||||
* This function converts the specified fixed point value \a x to
|
||||
* a float point value.
|
||||
*
|
||||
* \sa ftofix
|
||||
*/
|
||||
static inline double fixtof (fixed x)
|
||||
{
|
||||
return (double)x / 65536.0;
|
||||
{
|
||||
return (double)x / 65536.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ static inline double fixtof (fixed x)
|
||||
*
|
||||
* \param x x,y: Two addends.
|
||||
* \param y x,y: Two addends.
|
||||
* \return The sum. If the result runs out of range of fixed point,
|
||||
* \return The sum. If the result runs out of range of fixed point,
|
||||
* this function sets \a errno to \a ERANGE.
|
||||
*
|
||||
* \sa fixsub
|
||||
@@ -220,19 +220,19 @@ static inline fixed fixadd (fixed x, fixed y)
|
||||
|
||||
if (result >= 0) {
|
||||
if ((x < 0) && (y < 0)) {
|
||||
errno = ERANGE;
|
||||
return -0x7FFFFFFF;
|
||||
errno = ERANGE;
|
||||
return -0x7FFFFFFF;
|
||||
}
|
||||
else
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
if ((x > 0) && (y > 0)) {
|
||||
errno = ERANGE;
|
||||
return 0x7FFFFFFF;
|
||||
errno = ERANGE;
|
||||
return 0x7FFFFFFF;
|
||||
}
|
||||
else
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,13 +240,13 @@ static inline fixed fixadd (fixed x, fixed y)
|
||||
* \fn fixed fixsub (fixed x, fixed y)
|
||||
* \brief Subtract a fixed point value from another.
|
||||
*
|
||||
* This function subtracts the fixed point values \a y from the fixed
|
||||
* This function subtracts the fixed point values \a y from the fixed
|
||||
* point value \a x, and returns the difference.
|
||||
*
|
||||
* \param x The minuend.
|
||||
* \param y The subtrahend.
|
||||
*
|
||||
* \return The difference. If the result runs out of range of fixed point,
|
||||
* \return The difference. If the result runs out of range of fixed point,
|
||||
* this function sets \a errno to \a ERANGE.
|
||||
*
|
||||
* \sa fixadd
|
||||
@@ -257,33 +257,33 @@ static inline fixed fixsub (fixed x, fixed y)
|
||||
|
||||
if (result >= 0) {
|
||||
if ((x < 0) && (y > 0)) {
|
||||
errno = ERANGE;
|
||||
return -0x7FFFFFFF;
|
||||
errno = ERANGE;
|
||||
return -0x7FFFFFFF;
|
||||
}
|
||||
else
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
if ((x > 0) && (y < 0)) {
|
||||
errno = ERANGE;
|
||||
return 0x7FFFFFFF;
|
||||
errno = ERANGE;
|
||||
return 0x7FFFFFFF;
|
||||
}
|
||||
else
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn fixed fixmul (fixed x, fixed y)
|
||||
* \brief Returns the product of two fixed point values.
|
||||
*
|
||||
*
|
||||
* This function returns the product of two fixed point values \a x and \a y.
|
||||
*
|
||||
* \param x The faciend.
|
||||
* \param y The multiplicato.
|
||||
* \return The prodcut. If the result runs out of range of fixed point,
|
||||
* \return The prodcut. If the result runs out of range of fixed point,
|
||||
* this function sets \a errno to \a ERANGE.
|
||||
*
|
||||
*
|
||||
* \sa fixdiv
|
||||
*/
|
||||
MG_EXPORT fixed fixmul (fixed x, fixed y);
|
||||
@@ -291,14 +291,14 @@ MG_EXPORT fixed fixmul (fixed x, fixed y);
|
||||
/**
|
||||
* \fn fixed fixdiv (fixed x, fixed y)
|
||||
* \brief Returns the quotient of two fixed point values.
|
||||
*
|
||||
*
|
||||
* This function returns the quotient of two fixed point values \a x and \a y.
|
||||
*
|
||||
* \param x The dividend.
|
||||
* \param y The divisor.
|
||||
* \return The quotient. If the result runs out of range of fixed point,
|
||||
* \return The quotient. If the result runs out of range of fixed point,
|
||||
* this function sets \a errno to \a ERANGE.
|
||||
*
|
||||
*
|
||||
* \sa fixmul
|
||||
*/
|
||||
MG_EXPORT fixed fixdiv (fixed x, fixed y);
|
||||
@@ -336,7 +336,7 @@ static inline int fixceil (fixed x)
|
||||
* \sa fixtoi
|
||||
*/
|
||||
static inline fixed itofix (int x)
|
||||
{
|
||||
{
|
||||
return x << 16;
|
||||
}
|
||||
|
||||
@@ -349,61 +349,61 @@ static inline fixed itofix (int x)
|
||||
* \sa itofix
|
||||
*/
|
||||
static inline int fixtoi (fixed x)
|
||||
{
|
||||
return (x >> 16) + ((x & 0x8000) >> 15);
|
||||
{
|
||||
return (x >> 16) + ((x & 0x8000) >> 15);
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn fixed fixcos (fixed x)
|
||||
* \brief Returns the cosine of a fixed point.
|
||||
*
|
||||
* This function returns the cosine of the fixed point \a x,
|
||||
* This function returns the cosine of the fixed point \a x,
|
||||
* where \a x is given in radians.
|
||||
*
|
||||
* \sa fixacos
|
||||
*/
|
||||
static inline fixed fixcos (fixed x)
|
||||
{
|
||||
return _cos_tbl[((x + 0x4000) >> 15) & 0x1FF];
|
||||
return __mg_cos_tbl[((x + 0x4000) >> 15) & 0x1FF];
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn fixed fixsin (fixed x)
|
||||
* \brief Returns the sine of a fixed point.
|
||||
*
|
||||
* This function returns the sine of the fixed point \a x,
|
||||
* This function returns the sine of the fixed point \a x,
|
||||
* where \a x is given in radians.
|
||||
*
|
||||
* \sa fixasin
|
||||
*/
|
||||
static inline fixed fixsin (fixed x)
|
||||
{
|
||||
return _cos_tbl[((x - 0x400000 + 0x4000) >> 15) & 0x1FF];
|
||||
{
|
||||
return __mg_cos_tbl[((x - 0x400000 + 0x4000) >> 15) & 0x1FF];
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn fixed fixtan (fixed x)
|
||||
* \brief Returns the tangent of a fixed point.
|
||||
*
|
||||
* This function returns the tangent of the fixed point \a x,
|
||||
* This function returns the tangent of the fixed point \a x,
|
||||
* where \a x is given in radians.
|
||||
*
|
||||
* \sa fixcos, fixsin
|
||||
*/
|
||||
static inline fixed fixtan (fixed x)
|
||||
{
|
||||
return _tan_tbl[((x + 0x4000) >> 15) & 0xFF];
|
||||
{
|
||||
return __mg_tan_tbl[((x + 0x4000) >> 15) & 0xFF];
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn fixed fixacos (fixed x)
|
||||
* \brief Calculates and returns the arc cosine of a fixed point.
|
||||
*
|
||||
* This function calculates the arc cosine of the fixed point \a x;
|
||||
* This function calculates the arc cosine of the fixed point \a x;
|
||||
* that is the value whose cosine is \a x. If \a x falls outside
|
||||
* the range -1 to 1, this function fails and \a errno is set to EDOM.
|
||||
*
|
||||
* \return Returns the arc cosine in radians and the value is mathematically
|
||||
* \return Returns the arc cosine in radians and the value is mathematically
|
||||
* defined to be between 0 and PI (inclusive).
|
||||
*
|
||||
* \sa fixcos
|
||||
@@ -415,30 +415,30 @@ static inline fixed fixacos (fixed x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return _acos_tbl[(x+65536+127)>>8];
|
||||
return __mg_acos_tbl[(x+65536+127)>>8];
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn fixed fixasin (fixed x)
|
||||
* \brief Calculates and returns the arc sine of a fixed point.
|
||||
*
|
||||
* This function calculates the arc sine of the fixed point \a x;
|
||||
* This function calculates the arc sine of the fixed point \a x;
|
||||
* that is the value whose sine is \a x. If \a x falls outside
|
||||
* the range -1 to 1, this function fails and \a errno is set to EDOM.
|
||||
*
|
||||
* \return Returns the arc sine in radians and the value is mathematically
|
||||
* \return Returns the arc sine in radians and the value is mathematically
|
||||
* defined to be between -PI/2 and PI/2 (inclusive).
|
||||
*
|
||||
* \sa fixsin
|
||||
*/
|
||||
static inline fixed fixasin (fixed x)
|
||||
{
|
||||
{
|
||||
if ((x < -65536) || (x > 65536)) {
|
||||
errno = EDOM;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0x00400000 - _acos_tbl[(x+65536+127)>>8];
|
||||
return 0x00400000 - __mg_acos_tbl[(x+65536+127)>>8];
|
||||
}
|
||||
|
||||
/** @} end of fixed_math_fns */
|
||||
|
||||
+5855
-1883
File diff suppressed because it is too large
Load Diff
+660
-339
File diff suppressed because it is too large
Load Diff
+1012
-1012
File diff suppressed because it is too large
Load Diff
+444
-446
File diff suppressed because it is too large
Load Diff
+37
-38
@@ -44,21 +44,20 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _GLYPHBUF
|
||||
{
|
||||
GLYPHMAPINFO* glyph_map; /* glyph info array */
|
||||
int* glyphs; /* glyph array */
|
||||
int glyphs_len; /* glyph array len or buffer used size */
|
||||
|
||||
typedef struct _ACHARBUF
|
||||
{
|
||||
ACHARMAPINFO* achar_map; /* achar info array */
|
||||
Achar32* achars; /* achar array */
|
||||
int achars_len; /* achar array len or buffer used size */
|
||||
int blocksize; /* block size, a block is an allocate unit */
|
||||
int glyphs_buffsize; /* glyph string buffer size */
|
||||
int glyphmap_buffsize; /* glyph map buffer size */
|
||||
} GLYPHBUF;
|
||||
int achars_buffsize; /* achar string buffer size */
|
||||
int acharmap_buffsize; /* achar map buffer size */
|
||||
} ACHARBUF;
|
||||
|
||||
typedef struct tagBIDISLEDITDATA
|
||||
{
|
||||
StrBuffer str_content; // string text buffer
|
||||
GLYPHBUF glyph_content; // glyph string buffer
|
||||
ACHARBUF achar_content; // achar string buffer
|
||||
|
||||
int editPos; // current edit position
|
||||
int selStart; // selection start position
|
||||
@@ -92,48 +91,48 @@ typedef struct tagBIDISLEDITDATA
|
||||
typedef BIDISLEDITDATA* PBIDISLEDITDATA;
|
||||
|
||||
static inline void*
|
||||
glyphbuf_alloc (GLYPHBUF* glyph_buff, int len, int block_size)
|
||||
acharbuf_alloc (ACHARBUF* achar_buff, int len, int block_size)
|
||||
{
|
||||
glyph_buff->glyphs_buffsize = (len + (block_size - len % block_size))
|
||||
* sizeof (int);
|
||||
glyph_buff->glyphs = malloc (glyph_buff->glyphs_buffsize);
|
||||
achar_buff->achars_buffsize = (len + (block_size - len % block_size))
|
||||
* sizeof (Achar32);
|
||||
achar_buff->achars = malloc (achar_buff->achars_buffsize);
|
||||
|
||||
glyph_buff->glyphmap_buffsize = (len + (block_size - len % block_size))
|
||||
* sizeof (GLYPHMAPINFO);
|
||||
glyph_buff->glyph_map = malloc (glyph_buff->glyphmap_buffsize);
|
||||
achar_buff->acharmap_buffsize = (len + (block_size - len % block_size))
|
||||
* sizeof (ACHARMAPINFO);
|
||||
achar_buff->achar_map = malloc (achar_buff->acharmap_buffsize);
|
||||
|
||||
glyph_buff->glyphs_len = len;
|
||||
glyph_buff->blocksize = block_size;
|
||||
achar_buff->achars_len = len;
|
||||
achar_buff->blocksize = block_size;
|
||||
|
||||
return glyph_buff->glyphs;
|
||||
return achar_buff->achars;
|
||||
}
|
||||
|
||||
static inline void glyphbuf_free (GLYPHBUF *glyph_buff)
|
||||
static inline void acharbuf_free (ACHARBUF *achar_buff)
|
||||
{
|
||||
if (glyph_buff) {
|
||||
free (glyph_buff->glyphs);
|
||||
free (glyph_buff->glyph_map);
|
||||
if (achar_buff) {
|
||||
free (achar_buff->achars);
|
||||
free (achar_buff->achar_map);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void* glyphbuf_realloc (GLYPHBUF *glyph_buff, int len)
|
||||
static inline void* acharbuf_realloc (ACHARBUF *achar_buff, int len)
|
||||
{
|
||||
if (len * sizeof(int) > glyph_buff->glyphs_buffsize ||
|
||||
len * sizeof(int) < glyph_buff->glyphs_buffsize - glyph_buff->blocksize) {
|
||||
/* realloc glyph string mem */
|
||||
glyph_buff->glyphs_buffsize = (len + (glyph_buff->blocksize -
|
||||
len % glyph_buff->blocksize))* sizeof(int);
|
||||
glyph_buff->glyphs = realloc (glyph_buff->glyphs,
|
||||
glyph_buff->glyphs_buffsize);
|
||||
if (len * sizeof(int) > achar_buff->achars_buffsize ||
|
||||
len * sizeof(int) < achar_buff->achars_buffsize - achar_buff->blocksize) {
|
||||
/* realloc achar string mem */
|
||||
achar_buff->achars_buffsize = (len + (achar_buff->blocksize -
|
||||
len % achar_buff->blocksize))* sizeof(Achar32);
|
||||
achar_buff->achars = realloc (achar_buff->achars,
|
||||
achar_buff->achars_buffsize);
|
||||
|
||||
/* realloc glyph map mem */
|
||||
glyph_buff->glyphmap_buffsize = (len + (glyph_buff->blocksize -
|
||||
len % glyph_buff->blocksize))* sizeof(GLYPHMAPINFO);
|
||||
glyph_buff->glyph_map = realloc (glyph_buff->glyph_map,
|
||||
glyph_buff->glyphmap_buffsize);
|
||||
/* realloc achar map mem */
|
||||
achar_buff->acharmap_buffsize = (len + (achar_buff->blocksize -
|
||||
len % achar_buff->blocksize))* sizeof(ACHARMAPINFO);
|
||||
achar_buff->achar_map = realloc (achar_buff->achar_map,
|
||||
achar_buff->acharmap_buffsize);
|
||||
}
|
||||
|
||||
return glyph_buff->glyphs;
|
||||
return achar_buff->achars;
|
||||
}
|
||||
|
||||
BOOL RegisterBIDISLEditControl (void);
|
||||
|
||||
+141
-141
File diff suppressed because it is too large
Load Diff
+189
-189
File diff suppressed because it is too large
Load Diff
+32
-32
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* 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~2018, 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/en/about/licensing-policy/>.
|
||||
*/
|
||||
@@ -56,7 +56,7 @@
|
||||
#include "ctrlmisc.h"
|
||||
#include "progressbar_impl.h"
|
||||
|
||||
static void pbarNormalizeParams (const CONTROL* pCtrl,
|
||||
static void pbarNormalizeParams (const CONTROL* pCtrl,
|
||||
PROGRESSDATA* pData, BOOL fNotify)
|
||||
{
|
||||
if (pData->nPos >= pData->nMax) {
|
||||
@@ -72,8 +72,8 @@ static void pbarNormalizeParams (const CONTROL* pCtrl,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pbarOnNewPos (const CONTROL* pCtrl,
|
||||
static void
|
||||
pbarOnNewPos (const CONTROL* pCtrl,
|
||||
PROGRESSDATA* pData, unsigned int new_pos)
|
||||
{
|
||||
unsigned int old_pos;
|
||||
@@ -97,32 +97,32 @@ ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
HDC hdc;
|
||||
PCONTROL pCtrl;
|
||||
PROGRESSDATA* pData;
|
||||
|
||||
pCtrl = gui_Control (hwnd);
|
||||
|
||||
|
||||
pCtrl = gui_Control (hwnd);
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case MSG_CREATE:
|
||||
if (!(pData = malloc (sizeof (PROGRESSDATA)))) {
|
||||
_MG_PRINTF ("CONTROL>ProgressBar: Create control failure!\n");
|
||||
_WRN_PRINTF ("Create control failure!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
pData->nMax = 100;
|
||||
pData->nMin = 0;
|
||||
pData->nPos = 0;
|
||||
pData->nStepInc = 10;
|
||||
|
||||
|
||||
pCtrl->dwAddData2 = (DWORD)pData;
|
||||
break;
|
||||
|
||||
|
||||
case MSG_DESTROY:
|
||||
free ((void *)(pCtrl->dwAddData2));
|
||||
break;
|
||||
|
||||
case MSG_NCPAINT:
|
||||
return 0;
|
||||
|
||||
|
||||
case MSG_GETDLGCODE:
|
||||
return DLGC_STATIC;
|
||||
|
||||
@@ -135,8 +135,8 @@ ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PROGRESSDATA *data = (PROGRESSDATA *)pCtrl->dwAddData2;
|
||||
hdc = BeginPaint (hwnd);
|
||||
GetWindowInfo (hwnd)->we_rdr->draw_progress (hwnd,
|
||||
hdc, data->nMax, data->nMin,
|
||||
GetWindowInfo (hwnd)->we_rdr->draw_progress (hwnd,
|
||||
hdc, data->nMax, data->nMin,
|
||||
data->nPos, pCtrl->dwStyle & PBS_VERTICAL);
|
||||
|
||||
EndPaint (hwnd, hdc);
|
||||
@@ -160,7 +160,7 @@ ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
return PB_OKAY;
|
||||
|
||||
|
||||
case PBM_SETSTEP:
|
||||
pData = (PROGRESSDATA *)pCtrl->dwAddData2;
|
||||
if ((int)wParam > (int)(pData->nMax - pData->nMin))
|
||||
@@ -168,39 +168,39 @@ ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
pData->nStepInc = wParam;
|
||||
return PB_OKAY;
|
||||
|
||||
|
||||
case PBM_SETPOS:
|
||||
pData = (PROGRESSDATA *)pCtrl->dwAddData2;
|
||||
|
||||
|
||||
if (pData->nPos == wParam)
|
||||
return PB_OKAY;
|
||||
|
||||
pbarOnNewPos (pCtrl, pData, wParam);
|
||||
return PB_OKAY;
|
||||
|
||||
|
||||
case PBM_DELTAPOS:
|
||||
pData = (PROGRESSDATA *)pCtrl->dwAddData2;
|
||||
|
||||
if (wParam == 0)
|
||||
return PB_OKAY;
|
||||
|
||||
|
||||
pbarOnNewPos (pCtrl, pData, pData->nPos + wParam);
|
||||
return PB_OKAY;
|
||||
|
||||
|
||||
case PBM_STEPIT:
|
||||
pData = (PROGRESSDATA *)pCtrl->dwAddData2;
|
||||
|
||||
|
||||
if (pData->nStepInc == 0)
|
||||
return PB_OKAY;
|
||||
|
||||
pbarOnNewPos (pCtrl, pData, pData->nPos + pData->nStepInc);
|
||||
return PB_OKAY;
|
||||
|
||||
|
||||
case MSG_FONTCHANGED:
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return DefaultControlProc (hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ BOOL RegisterProgressBarControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
WndClass.iBkColor =
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
WndClass.WinProc = ProgressBarCtrlProc;
|
||||
|
||||
|
||||
+143
-144
File diff suppressed because it is too large
Load Diff
@@ -271,30 +271,30 @@ static void set_keyboard_layout(HWND hDlg)
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (cur_type == GLYPH_TYPE_RTL) {
|
||||
if (l_glyph_type == GLYPH_TYPE_RTL)
|
||||
if (cur_type == CHAR_TYPE_RTL) {
|
||||
if (l_char_type == CHAR_TYPE_RTL)
|
||||
return INSERTPOS_BEFORE (sled, l_glyph_index);
|
||||
else if (r_glyph_type == GLYPH_TYPE_RTL)
|
||||
else if (r_char_type == CHAR_TYPE_RTL)
|
||||
return INSERTPOS_AFTER (sled, r_glyph_index);
|
||||
else
|
||||
{
|
||||
if (l_glyph_type == GLYPH_TYPE_LTR)
|
||||
if (l_char_type == CHAR_TYPE_LTR)
|
||||
return INSERTPOS_AFTER (sled, l_glyph_index);
|
||||
else if (l_glyph_type == GLYPH_TYPE_LTR)
|
||||
else if (l_char_type == CHAR_TYPE_LTR)
|
||||
return INSERTPOS_BEFORE (sled, r_glyph_index);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (l_glyph_type == GLYPH_TYPE_LTR)
|
||||
if (l_char_type == CHAR_TYPE_LTR)
|
||||
return INSERTPOS_AFTER (sled, l_glyph_index);
|
||||
else if (r_glyph_type == GLYPH_TYPE_LTR)
|
||||
else if (r_char_type == CHAR_TYPE_LTR)
|
||||
return INSERTPOS_BEFORE (sled, r_glyph_index);
|
||||
else {
|
||||
if (l_glyph_type == GLYPH_TYPE_RTL)
|
||||
if (l_char_type == CHAR_TYPE_RTL)
|
||||
return INSERTPOS_BEFORE (sled, l_glyph_index);
|
||||
else if (l_glyph_type == GLYPH_TYPE_RTL)
|
||||
else if (l_char_type == CHAR_TYPE_RTL)
|
||||
return INSERTPOS_AFTER (sled, r_glyph_index);
|
||||
else
|
||||
return 0;
|
||||
|
||||
@@ -916,7 +916,7 @@ textdoc_insert_text (TextDoc *txtdoc, const char* newtext, int len)
|
||||
/* insert last strings */
|
||||
/* FIXME */
|
||||
if (!nextnode) {
|
||||
_MG_PRINTF ("CONTROL>TextEdit: (Warning) nextnode is NULL!\n");
|
||||
_WRN_PRINTF ("nextnode is NULL!");
|
||||
/* set_current_node (txtdoc, LASTNODE(txtdoc), FALSE, TRUE); */
|
||||
}
|
||||
else {
|
||||
@@ -1446,7 +1446,7 @@ static int get_line_nr (HWND hWnd, PTEDATA ptedata, TextNode *node, int indent)
|
||||
HDC hdc;
|
||||
|
||||
if (!node) {
|
||||
_MG_PRINTF ("CONTROL>TextEdit: (Warning) pass NULL text node to get_line_nr\n");
|
||||
_WRN_PRINTF ("pass NULL text node to get_line_nr");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1571,7 +1571,7 @@ set_line_width (HWND hWnd, PTEDATA ptedata, TextNode *node, int indent)
|
||||
HDC hdc;
|
||||
|
||||
if (!node) {
|
||||
_MG_PRINTF ("CONTROL>TextEdit: (Warning) pass NULL text node to set_line_width\n");
|
||||
_WRN_PRINTF ("pass NULL text node to set_line_width");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
+64
-64
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* 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~2018, 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/en/about/licensing-policy/>.
|
||||
*/
|
||||
@@ -64,13 +64,13 @@ static void TrackBarOnDraw (HWND hwnd, HDC hdc, TRACKBARDATA* pData, DWORD dwSty
|
||||
|
||||
win_rdr = GetWindowInfo(hwnd)->we_rdr;
|
||||
if (!win_rdr) {
|
||||
_MG_PRINTF ("CONTROL>TrackBar: window renderer is NULL.\n");
|
||||
_WRN_PRINTF ("window renderer is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
GetClientRect (hwnd, &rc_client);
|
||||
|
||||
win_rdr->draw_trackbar (hwnd, hdc, (LFRDR_TRACKBARINFO *)pData);
|
||||
win_rdr->draw_trackbar (hwnd, hdc, (LFRDR_TRACKBARINFO *)pData);
|
||||
|
||||
/* draw the tip of trackbar. */
|
||||
if ((dwStyle & TBS_TIP) && !(dwStyle & TBS_VERTICAL)) {
|
||||
@@ -79,7 +79,7 @@ static void TrackBarOnDraw (HWND hwnd, HDC hdc, TRACKBARDATA* pData, DWORD dwSty
|
||||
RECT rc_bar, rc_border;
|
||||
int sliderh, EndTipLen, x, y, w, h;
|
||||
|
||||
win_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
|
||||
win_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
|
||||
dwStyle, &rc_client, NULL, &rc_bar, &rc_border);
|
||||
sliderh = RECTH (rc_bar);
|
||||
|
||||
@@ -88,23 +88,23 @@ static void TrackBarOnDraw (HWND hwnd, HDC hdc, TRACKBARDATA* pData, DWORD dwSty
|
||||
w = RECTW (rc_border);
|
||||
h = RECTH (rc_border);
|
||||
|
||||
SelectFont (hdc, (PLOGFONT)GetWindowElementAttr
|
||||
SelectFont (hdc, (PLOGFONT)GetWindowElementAttr
|
||||
(hwnd, WE_FONT_TOOLTIP));
|
||||
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
SetBkColor (hdc, GetWindowBkColor (hwnd));
|
||||
SetTextColor (hdc, GetWindowElementPixel (hwnd, WE_FGC_THREED_BODY));
|
||||
|
||||
TextOut (hdc, x + 1, y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER,
|
||||
TextOut (hdc, x + 1, y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER,
|
||||
pData->sStartTip);
|
||||
|
||||
GetTextExtent (hdc, pData->sEndTip, -1, &text_ext);
|
||||
EndTipLen = text_ext.cx + 4;
|
||||
TextOut (hdc, (EndTipLen > (w>>1) - 20 ? x + (w>>1) + 20 : x + w -EndTipLen),
|
||||
y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER, pData->sEndTip);
|
||||
TextOut (hdc, (EndTipLen > (w>>1) - 20 ? x + (w>>1) + 20 : x + w -EndTipLen),
|
||||
y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER, pData->sEndTip);
|
||||
sprintf (sPos, "%d", pData->nPos);
|
||||
GetTextExtent (hdc, sPos, -1, &text_ext);
|
||||
TextOut (hdc, x + ((w - text_ext.cx) >> 1),
|
||||
TextOut (hdc, x + ((w - text_ext.cx) >> 1),
|
||||
y + (h>>1) -(sliderh>>1) - GAP_TIP_SLIDER, sPos);
|
||||
}
|
||||
}
|
||||
@@ -137,23 +137,23 @@ static void SetSliderPos (const CONTROL* pCtrl, int new_pos)
|
||||
RECT rc_client, old_slider, new_slider;
|
||||
|
||||
if (new_pos > pData->nMax)
|
||||
new_pos = pData->nMax;
|
||||
new_pos = pData->nMax;
|
||||
|
||||
if (new_pos < pData->nMin)
|
||||
new_pos = pData->nMin;
|
||||
new_pos = pData->nMin;
|
||||
|
||||
if (pData->nPos == new_pos)
|
||||
if (pData->nPos == new_pos)
|
||||
return;
|
||||
|
||||
GetClientRect ((HWND)pCtrl, &rc_client);
|
||||
|
||||
pCtrl->we_rdr->calc_trackbar_rect ((HWND)pCtrl, (LFRDR_TRACKBARINFO *)pData,
|
||||
pCtrl->we_rdr->calc_trackbar_rect ((HWND)pCtrl, (LFRDR_TRACKBARINFO *)pData,
|
||||
pCtrl->dwStyle, &rc_client, NULL, &old_slider, NULL);
|
||||
|
||||
pData->nPos = new_pos;
|
||||
TrackBarNormalizeParams (pCtrl, pData, pCtrl->dwStyle & TBS_NOTIFY);
|
||||
|
||||
pCtrl->we_rdr->calc_trackbar_rect ((HWND)pCtrl, (LFRDR_TRACKBARINFO *)pData,
|
||||
pCtrl->we_rdr->calc_trackbar_rect ((HWND)pCtrl, (LFRDR_TRACKBARINFO *)pData,
|
||||
pCtrl->dwStyle, &rc_client, NULL, &new_slider, NULL);
|
||||
|
||||
if (pCtrl->dwStyle & TBS_TIP) {
|
||||
@@ -180,7 +180,7 @@ static int NormalizeMousePos (HWND hwnd, TRACKBARDATA* pData, int mousepos)
|
||||
dwStyle = GetWindowStyle (hwnd);
|
||||
win_rdr = GetWindowInfo(hwnd)->we_rdr;
|
||||
|
||||
win_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
|
||||
win_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
|
||||
dwStyle, &rcClient, NULL, &rcBar, NULL);
|
||||
|
||||
if (dwStyle & TBS_VERTICAL) {
|
||||
@@ -212,12 +212,12 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
PCONTROL pCtrl;
|
||||
TRACKBARDATA* pData;
|
||||
pCtrl = gui_Control (hwnd);
|
||||
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case MSG_CREATE:
|
||||
if (!(pData = malloc (sizeof (TRACKBARDATA)))) {
|
||||
_MG_PRINTF ("CONTROL>TrackBar: Create control failure!\n");
|
||||
_WRN_PRINTF ("Create control failure!");
|
||||
return -1;
|
||||
}
|
||||
pData->nMax = 10;
|
||||
@@ -230,14 +230,14 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
pData->nTickFreq = 1;
|
||||
pCtrl->dwAddData2 = (DWORD)pData;
|
||||
break;
|
||||
|
||||
|
||||
case MSG_DESTROY:
|
||||
free((void *)(pCtrl->dwAddData2));
|
||||
break;
|
||||
|
||||
case MSG_NCPAINT:
|
||||
return 0;
|
||||
|
||||
|
||||
case MSG_GETTEXTLENGTH:
|
||||
case MSG_GETTEXT:
|
||||
case MSG_SETTEXT:
|
||||
@@ -272,15 +272,15 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
SendMessage (hwnd, TBM_SETPOS, pData->nPos, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
case TBM_GETMIN:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
return pData->nMin;
|
||||
|
||||
case TBM_GETMAX:
|
||||
|
||||
case TBM_GETMAX:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
return pData->nMax;
|
||||
|
||||
|
||||
case TBM_SETMIN:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
|
||||
@@ -292,7 +292,7 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
pData->nPos = pData->nMin;
|
||||
SendMessage (hwnd, TBM_SETPOS, pData->nPos, 0);
|
||||
return 0;
|
||||
|
||||
|
||||
case TBM_SETMAX:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
|
||||
@@ -304,7 +304,7 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
pData->nPos = pData->nMax;
|
||||
SendMessage (hwnd, TBM_SETPOS, pData->nPos, 0);
|
||||
return 0;
|
||||
|
||||
|
||||
case TBM_SETLINESIZE:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
if (wParam > (pData->nMax - pData->nMin))
|
||||
@@ -315,26 +315,26 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
case TBM_GETLINESIZE:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
return pData->nLineSize;
|
||||
|
||||
|
||||
case TBM_SETPAGESIZE:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
if (wParam > (pData->nMax - pData->nMin))
|
||||
return -1;
|
||||
pData->nPageSize = wParam;
|
||||
return 0;
|
||||
|
||||
|
||||
case TBM_GETPAGESIZE:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
return pData->nPageSize;
|
||||
|
||||
|
||||
case TBM_SETPOS:
|
||||
SetSliderPos (pCtrl, wParam);
|
||||
return 0;
|
||||
|
||||
|
||||
case TBM_GETPOS:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
return pData->nPos;
|
||||
|
||||
|
||||
case TBM_SETTICKFREQ:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
if (wParam > (pData->nMax - pData->nMin))
|
||||
@@ -346,10 +346,10 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
case TBM_GETTICKFREQ:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
return pData->nTickFreq;
|
||||
|
||||
|
||||
case TBM_SETTIP:
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
if (wParam)
|
||||
if (wParam)
|
||||
strncpy(pData->sStartTip, (char *) wParam, TBLEN_TIP);
|
||||
if (lParam)
|
||||
strncpy (pData->sEndTip, (char *) lParam, TBLEN_TIP);
|
||||
@@ -363,19 +363,19 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
if (lParam)
|
||||
strcpy ((char *) lParam, pData->sEndTip);
|
||||
return 0;
|
||||
|
||||
|
||||
case MSG_SETFOCUS:
|
||||
if (pCtrl->dwStyle & TBS_FOCUS)
|
||||
break;
|
||||
pCtrl->dwStyle |= TBS_FOCUS;
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
|
||||
case MSG_KILLFOCUS:
|
||||
pCtrl->dwStyle &= ~TBS_FOCUS;
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
|
||||
case MSG_GETDLGCODE:
|
||||
return DLGC_WANTARROWS;
|
||||
|
||||
@@ -406,21 +406,21 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
case SCANCODE_CURSORBLOCKLEFT:
|
||||
SetSliderPos (pCtrl, pData->nPos - pData->nLineSize);
|
||||
break;
|
||||
|
||||
|
||||
case SCANCODE_PAGEDOWN:
|
||||
SetSliderPos (pCtrl, pData->nPos - pData->nPageSize);
|
||||
break;
|
||||
|
||||
|
||||
case SCANCODE_PAGEUP:
|
||||
SetSliderPos (pCtrl, pData->nPos + pData->nPageSize);
|
||||
break;
|
||||
|
||||
|
||||
case SCANCODE_HOME:
|
||||
pData->nPos = pData->nMin;
|
||||
TrackBarNormalizeParams (pCtrl, pData, pCtrl->dwStyle & TBS_NOTIFY);
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
|
||||
case SCANCODE_END:
|
||||
pData->nPos = pData->nMax;
|
||||
TrackBarNormalizeParams (pCtrl, pData, pCtrl->dwStyle & TBS_NOTIFY);
|
||||
@@ -433,9 +433,9 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
if (GetCapture() != hwnd) {
|
||||
int mouseX = LOSWORD(lParam);
|
||||
int mouseY = HISWORD(lParam);
|
||||
|
||||
/** set state to press slider */
|
||||
pCtrl->dwStyle |= LFRDR_TBS_PRESSED;
|
||||
|
||||
/** set state to press slider */
|
||||
pCtrl->dwStyle |= LFRDR_TBS_PRESSED;
|
||||
|
||||
SetCapture (hwnd);
|
||||
|
||||
@@ -448,7 +448,7 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
(pCtrl->dwStyle & TBS_VERTICAL)?mouseY:mouseX));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MSG_MOUSEMOVE:
|
||||
{
|
||||
/** hilite slider */
|
||||
@@ -461,16 +461,16 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
|
||||
|
||||
GetClientRect (hwnd, &rc_client);
|
||||
pCtrl->we_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
|
||||
pCtrl->we_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
|
||||
pCtrl->dwStyle, &rc_client, NULL, &rc_slider, NULL);
|
||||
|
||||
if (GetCapture() == hwnd)
|
||||
{
|
||||
ScreenToClient (hwnd, &mouseX, &mouseY);
|
||||
if (PtInRect (&rc_slider, mouseX, mouseY))
|
||||
pCtrl->dwStyle |= LFRDR_TBS_HILITE;
|
||||
else
|
||||
pCtrl->dwStyle &= ~LFRDR_TBS_HILITE;
|
||||
pCtrl->dwStyle |= LFRDR_TBS_HILITE;
|
||||
else
|
||||
pCtrl->dwStyle &= ~LFRDR_TBS_HILITE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -479,16 +479,16 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
/** avoid twinkle by valid redraw */
|
||||
if (!(pCtrl->dwStyle & LFRDR_TBS_HILITE))
|
||||
{
|
||||
pCtrl->dwStyle |= LFRDR_TBS_HILITE;
|
||||
pCtrl->dwStyle |= LFRDR_TBS_HILITE;
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/** avoid twinkle by valid redraw */
|
||||
if (pCtrl->dwStyle & LFRDR_TBS_HILITE)
|
||||
{
|
||||
pCtrl->dwStyle &= ~LFRDR_TBS_HILITE;
|
||||
pCtrl->dwStyle &= ~LFRDR_TBS_HILITE;
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
}
|
||||
}
|
||||
@@ -503,8 +503,8 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
case MSG_LBUTTONUP:
|
||||
if (GetCapture() == hwnd) {
|
||||
|
||||
/** set state to press slider */
|
||||
pCtrl->dwStyle &= ~LFRDR_TBS_PRESSED;
|
||||
/** set state to press slider */
|
||||
pCtrl->dwStyle &= ~LFRDR_TBS_PRESSED;
|
||||
ReleaseCapture ();
|
||||
NotifyParent ((HWND)pCtrl, pCtrl->id, TBN_STOPDRAG);
|
||||
|
||||
@@ -512,15 +512,15 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MSG_FONTCHANGED:
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return DefaultControlProc (hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -216,7 +216,7 @@ static int LWZReadByte (MG_RWops *area, int flag, int input_code_size)
|
||||
while (code >= clear_code) {
|
||||
*sp++ = table[1][code];
|
||||
if (code == table[0][code]) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: circular table entry\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: circular table entry\n");
|
||||
return -1;
|
||||
}
|
||||
code = table[0][code];
|
||||
@@ -259,7 +259,7 @@ static int GetCode(MG_RWops *area, int code_size, int flag)
|
||||
if ((curbit + code_size) >= lastbit) {
|
||||
if (done) {
|
||||
if (curbit >= lastbit)
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: bad decode\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: bad decode\n");
|
||||
return -1;
|
||||
}
|
||||
buf[0] = buf[last_byte - 2];
|
||||
@@ -362,7 +362,7 @@ static int ReadGIFGlobal (MG_RWops *area, GIFSCREEN* GifScreen)
|
||||
version [3] = '\0';
|
||||
|
||||
if (strcmp ((const char*)version, "87a") != 0 && strcmp ((const char*)version, "89a") != 0) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: GIF version number not 87a or 89a.\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: GIF version number not 87a or 89a.\n");
|
||||
return -1; /* image loading error*/
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ static int ReadGIFGlobal (MG_RWops *area, GIFSCREEN* GifScreen)
|
||||
GifScreen->disposal = 0;
|
||||
|
||||
if (!ReadOK (area, buf, 7)) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: bad screen descriptor\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: bad screen descriptor\n");
|
||||
return -1; /* image loading error*/
|
||||
}
|
||||
GifScreen->Width = LM_to_uint (buf[0], buf[1]);
|
||||
@@ -384,10 +384,10 @@ static int ReadGIFGlobal (MG_RWops *area, GIFSCREEN* GifScreen)
|
||||
GifScreen->AspectRatio = buf[6];
|
||||
|
||||
if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: have global colormap: %d\n",
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: have global colormap: %d\n",
|
||||
GifScreen->Background);
|
||||
if (ReadColorMap (area, GifScreen->BitPixel, GifScreen->ColorMap)) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: bad global colormap\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: bad global colormap\n");
|
||||
return -1; /* image loading error*/
|
||||
}
|
||||
}
|
||||
@@ -399,7 +399,7 @@ static int ReadImageDesc (MG_RWops *area, IMAGEDESC* ImageDesc, GIFSCREEN* GifSc
|
||||
{
|
||||
unsigned char buf[16];
|
||||
if (!ReadOK (area, buf, 9)) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: bad image size\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: bad image size\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -414,9 +414,9 @@ static int ReadImageDesc (MG_RWops *area, IMAGEDESC* ImageDesc, GIFSCREEN* GifSc
|
||||
ImageDesc->interlace = BitSet(buf[8], INTERLACE);
|
||||
|
||||
if (ImageDesc->haveColorMap) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: have local colormap\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: have local colormap\n");
|
||||
if (ReadColorMap (area, ImageDesc->bitPixel, ImageDesc->ColorMap) < 0) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: bad local colormap\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: bad local colormap\n");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
@@ -437,12 +437,12 @@ static int ReadImage (MG_RWops* area, MYBITMAP* bmp, IMAGEDESC* ImageDesc, GIFSC
|
||||
* initialize the compression routines
|
||||
*/
|
||||
if (!ReadOK (area, &c, 1)) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: eof on image data\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: eof on image data\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (LWZReadByte (area, TRUE, c) < 0) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: error reading image\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: error reading image\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -549,11 +549,11 @@ ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
|
||||
anim->bk.a = 0;
|
||||
}
|
||||
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: Background: %d, %d, %d.\n",
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: Background: %d, %d, %d.\n",
|
||||
anim->bk.r, anim->bk.g, anim->bk.b);
|
||||
|
||||
if ((ok = ReadOK (area, &c, 1)) == 0) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: EOF on image data\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: EOF on image data\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -561,11 +561,11 @@ ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
|
||||
switch (c) {
|
||||
case '!':
|
||||
if ( (ok = ReadOK (area, &c, 1)) == 0) {
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: EOF on image data\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: EOF on image data\n");
|
||||
goto error;
|
||||
}
|
||||
DoExtension (area, c, &GifScreen);
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: Extension info: %d, %d, %d, %d, %d, %d\n",
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: Extension info: %d, %d, %d, %d, %d, %d\n",
|
||||
GifScreen.Width, GifScreen.Height,
|
||||
GifScreen.AspectRatio, GifScreen.delayTime,
|
||||
GifScreen.disposal, GifScreen.transparent);
|
||||
@@ -579,7 +579,7 @@ ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
|
||||
if (ReadImage (area, &mybmp, &ImageDesc, &GifScreen, 0) < 0)
|
||||
goto error;
|
||||
}
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: Image Descriptor: %d, %d, %d, %d, %d\n",
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: Image Descriptor: %d, %d, %d, %d, %d\n",
|
||||
ImageDesc.Top, ImageDesc.Left,
|
||||
ImageDesc.Width, ImageDesc.Height,
|
||||
ImageDesc.haveColorMap);
|
||||
@@ -595,14 +595,14 @@ ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
|
||||
frame->width = mybmp.w;
|
||||
frame->height = mybmp.h;
|
||||
frame->delay_time = (GifScreen.delayTime>10)?GifScreen.delayTime:10;
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: frame info: %d, %d, %d, %d\n",
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: frame info: %d, %d, %d, %d\n",
|
||||
frame->off_x, frame->off_y, frame->delay_time,
|
||||
GifScreen.transparent);
|
||||
|
||||
if ((frame->mem_dc = CreateMemDCFromMyBitmap (&mybmp, ImageDesc.ColorMap)) == 0) {
|
||||
free (mybmp.bits);
|
||||
free (frame);
|
||||
_MG_PRINTF ("EX_CTRL>GIF89a: Error when expand frame bitmap.\n");
|
||||
_WRN_PRINTF ("EX_CTRL>GIF89a: Error when expand frame bitmap.\n");
|
||||
goto error;
|
||||
}
|
||||
frame->bits = mybmp.bits;
|
||||
|
||||
@@ -1108,7 +1108,7 @@ void GridCellTypeNumber_set_text_value(gvGridCellData* cell, int row, int col, c
|
||||
if (INF[0] != 'I' && INF[0] != 'i')
|
||||
cell->data.number.num = number;
|
||||
else
|
||||
_MG_PRINTF ("EX_CTRL>Grid: The inputed number is too big!\n");
|
||||
_WRN_PRINTF ("EX_CTRL>Grid: The inputed number is too big!\n");
|
||||
}
|
||||
|
||||
double GridCellTypeNumber_get_double_value(gvGridCellData* cell, int row, int col)
|
||||
|
||||
+13
-7
@@ -1458,7 +1458,6 @@ static LRESULT TreeViewCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
rctop = rc.top;
|
||||
|
||||
if (mouseX <= right && mouseX >= left && (p != pData->pItemSelected) ) {
|
||||
PLOGFONT logfont;
|
||||
c = getCountFromItem (pData, pData->pItemSelected);
|
||||
c = c - pData->nItemTop - 1;
|
||||
if (c < 0)
|
||||
@@ -1471,12 +1470,15 @@ static LRESULT TreeViewCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
rc.top += TV_BORDER;
|
||||
rc.bottom = rc.top + pData->nItemHeight;
|
||||
|
||||
/*bugfix: 4864, zhaochengzhang*/
|
||||
/* VincentWei: do not depend on logfont style
|
||||
PLOGFONT logfont;
|
||||
//bugfix: 4864, zhaochengzhang
|
||||
logfont = GetWindowFont(hwnd);
|
||||
if (logfont->style & (FS_WEIGHT_BOOK | FS_WEIGHT_LIGHT)) {
|
||||
rc.left--; rc.top--;
|
||||
rc.right++; rc.bottom++;
|
||||
}
|
||||
*/
|
||||
InvalidateRect (hwnd, &rc, TRUE);
|
||||
|
||||
rc.top = rctop + (count - pData->nItemTop - 1) * pData->nItemHeight;
|
||||
@@ -1484,17 +1486,18 @@ static LRESULT TreeViewCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
rc.top += TV_BORDER;
|
||||
rc.bottom = rc.top + pData->nItemHeight;
|
||||
|
||||
/*bugfix: 4864 zhaochengzhang*/
|
||||
/* VincentWei: do not depend on logfont style
|
||||
//bugfix: 4864 zhaochengzhang
|
||||
if (logfont->style & (FS_WEIGHT_BOOK | FS_WEIGHT_LIGHT)) {
|
||||
rc.left--; rc.top--;
|
||||
rc.right++; rc.bottom++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
InvalidateRect (hwnd, &rc, TRUE);
|
||||
NotifyParent (hwnd, pData->id, TVN_CLICKED);
|
||||
}
|
||||
|
||||
if (mouseX <= left + h && mouseX >= left) {
|
||||
PLOGFONT logfont;
|
||||
if (p->child == NULL)
|
||||
break;
|
||||
|
||||
@@ -1518,13 +1521,16 @@ static LRESULT TreeViewCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
tvSetVScrollInfo (hwnd, pData, TRUE);
|
||||
tvSetHScrollInfo (hwnd, pData, TRUE);
|
||||
rc.bottom = rcClient.bottom;
|
||||
|
||||
/*bugfix: 4864 zhaochengzhang*/
|
||||
|
||||
/* VincentWei: do not depend on the logfont style
|
||||
PLOGFONT logfont;
|
||||
//bugfix: 4864 zhaochengzhang
|
||||
logfont = GetWindowFont(hwnd);
|
||||
if (logfont->style & (FS_WEIGHT_BOOK | FS_WEIGHT_LIGHT)) {
|
||||
rc.left--; rc.top--;
|
||||
rc.right++; rc.bottom++;
|
||||
}
|
||||
*/
|
||||
InvalidateRect (hwnd, &rc, TRUE);
|
||||
NotifyParent (hwnd, pData->id, TVN_CLICKED);
|
||||
}
|
||||
|
||||
+32
-8
@@ -2,22 +2,46 @@ SUBDIRS = in-core
|
||||
|
||||
noinst_LTLIBRARIES = libfont.la
|
||||
|
||||
SRC_FILES = charset.c charset-arabic.c charset-bidi.c \
|
||||
SRC_FILES = charset.c charset-arabic.c legacy-bidi.c charset-unicode.c \
|
||||
unicode-comp.c unicode-script.c language-code.c \
|
||||
sysfont.c logfont.c devfont.c fontname.c \
|
||||
rawbitmap.c varbitmap.c qpf.c upf.c \
|
||||
fontcache.c freetype1.c freetype2.c font-engines.c\
|
||||
nullfont.c rawbitmap.c varbitmap.c qpf.c upf.c \
|
||||
fontcache.c freetype2.c font-engines.c\
|
||||
gbunimap.c gbkunimap.c gb18030unimap.c big5unimap.c \
|
||||
ujisunimap.c sjisunimap.c euckrunimap.c \
|
||||
textops.c mapunitogb.c mapunitogbk.c mapunitobig5.c mapunitogb18030.c \
|
||||
bitmapfont.c scripteasy.c
|
||||
textops.c \
|
||||
mapunitogb.c mapunitogbk.c mapunitobig5.c mapunitogb18030.c \
|
||||
bitmapfont.c scripteasy.c \
|
||||
unicode-emoji.c unicode-vop.c \
|
||||
unicode-bidi.c \
|
||||
unicode-break.c unicode-break-arabic.c unicode-break-indic.c unicode-break-thai.c \
|
||||
unicode-joining-types.c unicode-joining.c unicode-shape.c \
|
||||
unicode-shape-arabic.c harzbuff-minigui-funcs.c \
|
||||
unicode-iterators.c
|
||||
|
||||
HDR_FILES = charset.h rawbitmap.h varbitmap.h freetype1.h freetype2.h qpf.h \
|
||||
upf.h bitmapfont.h gunichartables.h se_minigui.h unicode-bidi-tables.h
|
||||
HDR_FILES = charset.h rawbitmap.h varbitmap.h freetype2.h qpf.h se_minigui.h \
|
||||
upf.h bitmapfont.h unicode-bidi-tables.h \
|
||||
unicode-tables.h unicode-break-tables.h unicode-script-table.h \
|
||||
unicode-decomp.h unicode-comp.h \
|
||||
unicode-emoji-tables.h \
|
||||
legacy-bidi-tables.inc \
|
||||
unicode-bidi.h unicode-vop-table.inc \
|
||||
unicode-joining-types-list.inc \
|
||||
unicode-joining-type-table.inc \
|
||||
unicode-arabic-shaping-table.inc \
|
||||
unicode-arabic-misc-table.inc \
|
||||
unicode-bidi-bidi-types-list.inc \
|
||||
unicode-bidi-bidi-type-table.inc \
|
||||
unicode-bidi-brackets-table.inc \
|
||||
unicode-bidi-brackets-type-table.inc \
|
||||
unicode-bidi-mirroring-table.inc \
|
||||
script-language-table.inc \
|
||||
emoji_presentation_scanner.inc
|
||||
|
||||
EXTRA_DIST = convgbmap.c jisunimap.c $(SRC_FILES) $(HDR_FILES) \
|
||||
makefile.ng makefile.msvc
|
||||
|
||||
AM_CPPFLAGS = $(FT1_INC_DIR) $(FT2_INC_DIR)
|
||||
AM_CPPFLAGS = $(FT2_INC_DIR) $(HB_INC_DIR)
|
||||
AM_CPPFLAGS += -I$(abs_top_srcdir)/src/include -I$(abs_top_srcdir)/include
|
||||
|
||||
libfont_la_SOURCES = $(SRC_FILES) $(HDR_FILES)
|
||||
|
||||
+96
-91
File diff suppressed because it is too large
Load Diff
+207
-194
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+391
-1156
File diff suppressed because it is too large
Load Diff
+379
-133
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,284 @@
|
||||
|
||||
#line 1 "emoji_presentation_scanner.rl"
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
||||
#line 9 "emoji_presentation_scanner.c"
|
||||
static const char _emoji_presentation_actions[] = {
|
||||
0, 1, 0, 1, 1, 1, 5, 1,
|
||||
6, 1, 7, 1, 8, 1, 9, 1,
|
||||
10, 1, 11, 2, 2, 3, 2, 2,
|
||||
4
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_key_offsets[] = {
|
||||
0, 5, 7, 14, 18, 20, 21, 24,
|
||||
29, 30, 34, 36
|
||||
};
|
||||
|
||||
static const unsigned char _emoji_presentation_trans_keys[] = {
|
||||
3u, 7u, 13u, 0u, 2u, 14u, 15u, 2u,
|
||||
3u, 6u, 7u, 13u, 0u, 1u, 9u, 10u,
|
||||
11u, 12u, 10u, 12u, 10u, 4u, 10u, 12u,
|
||||
4u, 9u, 10u, 11u, 12u, 6u, 9u, 10u,
|
||||
11u, 12u, 8u, 10u, 9u, 10u, 11u, 12u,
|
||||
14u, 0
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_single_lengths[] = {
|
||||
3, 2, 5, 4, 2, 1, 3, 5,
|
||||
1, 4, 2, 5
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_range_lengths[] = {
|
||||
1, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_index_offsets[] = {
|
||||
0, 5, 8, 15, 20, 23, 25, 29,
|
||||
35, 37, 42, 45
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_indicies[] = {
|
||||
2, 1, 1, 1, 0, 4, 5, 3,
|
||||
7, 8, 10, 11, 12, 6, 9, 5,
|
||||
13, 14, 15, 0, 13, 15, 16, 13,
|
||||
16, 15, 13, 15, 16, 15, 5, 13,
|
||||
14, 15, 16, 5, 17, 5, 13, 14,
|
||||
18, 17, 5, 13, 16, 5, 13, 14,
|
||||
15, 4, 16, 0
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_trans_targs[] = {
|
||||
2, 4, 6, 2, 1, 2, 3, 3,
|
||||
7, 2, 8, 9, 11, 0, 2, 5,
|
||||
2, 2, 10
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_trans_actions[] = {
|
||||
17, 19, 19, 15, 0, 7, 22, 19,
|
||||
19, 9, 0, 22, 19, 0, 5, 19,
|
||||
11, 13, 19
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_to_state_actions[] = {
|
||||
0, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_from_state_actions[] = {
|
||||
0, 0, 3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
static const char _emoji_presentation_eof_trans[] = {
|
||||
1, 4, 0, 1, 17, 17, 17, 17,
|
||||
18, 18, 17, 17
|
||||
};
|
||||
|
||||
static const int emoji_presentation_start = 2;
|
||||
|
||||
static const int emoji_presentation_en_text_and_emoji_run = 2;
|
||||
|
||||
|
||||
#line 9 "emoji_presentation_scanner.rl"
|
||||
|
||||
|
||||
|
||||
#line 78 "emoji_presentation_scanner.rl"
|
||||
|
||||
|
||||
static emoji_text_iter_t
|
||||
scan_emoji_presentation (emoji_text_iter_t p,
|
||||
const emoji_text_iter_t pe,
|
||||
bool* is_emoji)
|
||||
{
|
||||
emoji_text_iter_t ts, te;
|
||||
const emoji_text_iter_t eof = pe;
|
||||
|
||||
unsigned act;
|
||||
int cs;
|
||||
|
||||
|
||||
#line 107 "emoji_presentation_scanner.c"
|
||||
{
|
||||
cs = emoji_presentation_start;
|
||||
ts = 0;
|
||||
te = 0;
|
||||
act = 0;
|
||||
}
|
||||
|
||||
#line 115 "emoji_presentation_scanner.c"
|
||||
{
|
||||
int _klen;
|
||||
unsigned int _trans;
|
||||
const char *_acts;
|
||||
unsigned int _nacts;
|
||||
const unsigned char *_keys;
|
||||
|
||||
if ( p == pe )
|
||||
goto _test_eof;
|
||||
_resume:
|
||||
_acts = _emoji_presentation_actions + _emoji_presentation_from_state_actions[cs];
|
||||
_nacts = (unsigned int) *_acts++;
|
||||
while ( _nacts-- > 0 ) {
|
||||
switch ( *_acts++ ) {
|
||||
case 1:
|
||||
#line 1 "NONE"
|
||||
{ts = p;}
|
||||
break;
|
||||
#line 134 "emoji_presentation_scanner.c"
|
||||
}
|
||||
}
|
||||
|
||||
_keys = _emoji_presentation_trans_keys + _emoji_presentation_key_offsets[cs];
|
||||
_trans = _emoji_presentation_index_offsets[cs];
|
||||
|
||||
_klen = _emoji_presentation_single_lengths[cs];
|
||||
if ( _klen > 0 ) {
|
||||
const unsigned char *_lower = _keys;
|
||||
const unsigned char *_mid;
|
||||
const unsigned char *_upper = _keys + _klen - 1;
|
||||
while (1) {
|
||||
if ( _upper < _lower )
|
||||
break;
|
||||
|
||||
_mid = _lower + ((_upper-_lower) >> 1);
|
||||
if ( (*p) < *_mid )
|
||||
_upper = _mid - 1;
|
||||
else if ( (*p) > *_mid )
|
||||
_lower = _mid + 1;
|
||||
else {
|
||||
_trans += (unsigned int)(_mid - _keys);
|
||||
goto _match;
|
||||
}
|
||||
}
|
||||
_keys += _klen;
|
||||
_trans += _klen;
|
||||
}
|
||||
|
||||
_klen = _emoji_presentation_range_lengths[cs];
|
||||
if ( _klen > 0 ) {
|
||||
const unsigned char *_lower = _keys;
|
||||
const unsigned char *_mid;
|
||||
const unsigned char *_upper = _keys + (_klen<<1) - 2;
|
||||
while (1) {
|
||||
if ( _upper < _lower )
|
||||
break;
|
||||
|
||||
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
||||
if ( (*p) < _mid[0] )
|
||||
_upper = _mid - 2;
|
||||
else if ( (*p) > _mid[1] )
|
||||
_lower = _mid + 2;
|
||||
else {
|
||||
_trans += (unsigned int)((_mid - _keys)>>1);
|
||||
goto _match;
|
||||
}
|
||||
}
|
||||
_trans += _klen;
|
||||
}
|
||||
|
||||
_match:
|
||||
_trans = _emoji_presentation_indicies[_trans];
|
||||
_eof_trans:
|
||||
cs = _emoji_presentation_trans_targs[_trans];
|
||||
|
||||
if ( _emoji_presentation_trans_actions[_trans] == 0 )
|
||||
goto _again;
|
||||
|
||||
_acts = _emoji_presentation_actions + _emoji_presentation_trans_actions[_trans];
|
||||
_nacts = (unsigned int) *_acts++;
|
||||
while ( _nacts-- > 0 )
|
||||
{
|
||||
switch ( *_acts++ )
|
||||
{
|
||||
case 2:
|
||||
#line 1 "NONE"
|
||||
{te = p+1;}
|
||||
break;
|
||||
case 3:
|
||||
#line 74 "emoji_presentation_scanner.rl"
|
||||
{act = 2;}
|
||||
break;
|
||||
case 4:
|
||||
#line 75 "emoji_presentation_scanner.rl"
|
||||
{act = 3;}
|
||||
break;
|
||||
case 5:
|
||||
#line 73 "emoji_presentation_scanner.rl"
|
||||
{te = p+1;{ *is_emoji = false; return te; }}
|
||||
break;
|
||||
case 6:
|
||||
#line 74 "emoji_presentation_scanner.rl"
|
||||
{te = p+1;{ *is_emoji = true; return te; }}
|
||||
break;
|
||||
case 7:
|
||||
#line 75 "emoji_presentation_scanner.rl"
|
||||
{te = p+1;{ *is_emoji = false; return te; }}
|
||||
break;
|
||||
case 8:
|
||||
#line 74 "emoji_presentation_scanner.rl"
|
||||
{te = p;p--;{ *is_emoji = true; return te; }}
|
||||
break;
|
||||
case 9:
|
||||
#line 75 "emoji_presentation_scanner.rl"
|
||||
{te = p;p--;{ *is_emoji = false; return te; }}
|
||||
break;
|
||||
case 10:
|
||||
#line 74 "emoji_presentation_scanner.rl"
|
||||
{{p = ((te))-1;}{ *is_emoji = true; return te; }}
|
||||
break;
|
||||
case 11:
|
||||
#line 1 "NONE"
|
||||
{ switch( act ) {
|
||||
case 2:
|
||||
{{p = ((te))-1;} *is_emoji = true; return te; }
|
||||
break;
|
||||
case 3:
|
||||
{{p = ((te))-1;} *is_emoji = false; return te; }
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#line 248 "emoji_presentation_scanner.c"
|
||||
}
|
||||
}
|
||||
|
||||
_again:
|
||||
_acts = _emoji_presentation_actions + _emoji_presentation_to_state_actions[cs];
|
||||
_nacts = (unsigned int) *_acts++;
|
||||
while ( _nacts-- > 0 ) {
|
||||
switch ( *_acts++ ) {
|
||||
case 0:
|
||||
#line 1 "NONE"
|
||||
{ts = 0;}
|
||||
break;
|
||||
#line 261 "emoji_presentation_scanner.c"
|
||||
}
|
||||
}
|
||||
|
||||
if ( ++p != pe )
|
||||
goto _resume;
|
||||
_test_eof: {}
|
||||
if ( p == eof )
|
||||
{
|
||||
if ( _emoji_presentation_eof_trans[cs] > 0 ) {
|
||||
_trans = _emoji_presentation_eof_trans[cs] - 1;
|
||||
goto _eof_trans;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#line 94 "emoji_presentation_scanner.rl"
|
||||
|
||||
|
||||
/* Should not be reached. */
|
||||
ts = ts + 0; // suppress compilation warning.
|
||||
*is_emoji = false;
|
||||
return pe;
|
||||
}
|
||||
+15
-11
@@ -1,45 +1,48 @@
|
||||
/*
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* 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~2018, 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/en/about/licensing-policy/>.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "minigui.h"
|
||||
#include "gdi.h"
|
||||
|
||||
typedef struct {
|
||||
char* type;
|
||||
FONTOPS* ops;
|
||||
char* type;
|
||||
FONTOPS* ops;
|
||||
}FONTOPS_INFO;
|
||||
|
||||
extern FONTOPS __mg_null_font_ops;
|
||||
|
||||
#ifdef _MGFONT_RBF
|
||||
extern FONTOPS __mg_rbf_ops;
|
||||
#endif
|
||||
@@ -61,6 +64,7 @@ extern FONTOPS __mg_ttf_ops;
|
||||
#endif
|
||||
|
||||
FONTOPS_INFO __mg_fontops_infos[] = {
|
||||
{FONT_TYPE_NAME_BITMAP_NUF, &__mg_null_font_ops},
|
||||
#ifdef _MGFONT_RBF
|
||||
{FONT_TYPE_NAME_BITMAP_RAW, &__mg_rbf_ops},
|
||||
#endif
|
||||
|
||||
+159
-187
File diff suppressed because it is too large
Load Diff
+232
-30
@@ -42,6 +42,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "minigui.h"
|
||||
@@ -70,7 +71,7 @@ int fontConvertFontType (const char* type)
|
||||
if (strcasecmp (type, FONT_TYPE_NAME_SCALE_T1F) == 0)
|
||||
return FONT_TYPE_SCALE_T1F;
|
||||
if (strcasecmp (type, FONT_TYPE_NAME_ALL) == 0)
|
||||
return FONT_TYPE_ALL;
|
||||
return FONT_TYPE_ANY;
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -96,7 +97,7 @@ BOOL fontGetTypeNameFromName (const char* name, char* type)
|
||||
|
||||
int fontGetFontTypeFromName (const char* name)
|
||||
{
|
||||
char type [LEN_FONT_NAME + 1];
|
||||
char type [LEN_LOGFONT_NAME_FIELD + 1];
|
||||
|
||||
if (!fontGetTypeNameFromName (name, type))
|
||||
return -1;
|
||||
@@ -114,8 +115,8 @@ BOOL fontGetFamilyFromName (const char* name, char* family)
|
||||
if (*(++family_part) == '\0')
|
||||
return FALSE;
|
||||
|
||||
while (family_part [i] && i <= LEN_FONT_NAME) {
|
||||
if (family_part [i] == '-') {
|
||||
while (family_part [i] && i <= LEN_LOGFONT_FAMILY_FIELD) {
|
||||
if (family_part [i] == '-'/* || family_part [i] == ',' */) {
|
||||
family [i] = '\0';
|
||||
break;
|
||||
}
|
||||
@@ -127,42 +128,155 @@ BOOL fontGetFamilyFromName (const char* name, char* family)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL get_family_part_lower (const char* name, char* family)
|
||||
{
|
||||
int i = 0;
|
||||
const char* family_part;
|
||||
|
||||
if ((family_part = strchr (name, '-')) == NULL)
|
||||
return FALSE;
|
||||
if (*(++family_part) == '\0')
|
||||
return FALSE;
|
||||
|
||||
while (family_part [i] && i <= LEN_UNIDEVFONT_NAME) {
|
||||
if (family_part [i] == '-') {
|
||||
family [i] = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
family [i] = tolower(family_part [i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static const char *my_strstr(const char *haystack, const char *needle)
|
||||
{
|
||||
int i = 0, j = 0;
|
||||
int tmp = i;
|
||||
int str_len = strlen(haystack);
|
||||
int substr_len = strlen(needle);
|
||||
|
||||
for (i = 0; i < str_len - substr_len; i++) {
|
||||
tmp = i;
|
||||
|
||||
for (j = 0; j < substr_len; j++) {
|
||||
if (haystack[tmp] == needle[j]) {
|
||||
if (j == substr_len - 1)
|
||||
return haystack + i;
|
||||
tmp++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* devfont family specification:
|
||||
* family[,alias]...
|
||||
*/
|
||||
BOOL fontDoesMatchFamily (const char* name, const char* family)
|
||||
{
|
||||
// make sure there is a redundant space for the head and tail characters.
|
||||
char family_part[LEN_LOGFONT_FAMILY_FIELD + 3];
|
||||
char family_request[LEN_LOGFONT_NAME_FIELD + 3];
|
||||
int i;
|
||||
size_t len;
|
||||
|
||||
// add ',' to the head
|
||||
family_part[0] = ',';
|
||||
if (!get_family_part_lower(name, family_part + 1)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// add ',' to the tail
|
||||
len = strlen(family_part);
|
||||
family_part[len] = ',';
|
||||
family_part[len + 1] = '\0';
|
||||
|
||||
// make family (lowercase)
|
||||
family_request[0] = ',';
|
||||
i = 0;
|
||||
while (family[i] && i < LEN_LOGFONT_NAME_FIELD) {
|
||||
family_request[i + 1] = tolower(family[i]);
|
||||
i++;
|
||||
}
|
||||
family_request[i + 1] = '\0';
|
||||
|
||||
// add ',' to the tail
|
||||
len = strlen(family_request);
|
||||
family_request[len] = ',';
|
||||
family_request[len + 1] = '\0';
|
||||
|
||||
// try to match "<family_request>,"
|
||||
if (strstr(family_part, family_request)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD fontConvertStyle (const char* style_part)
|
||||
{
|
||||
DWORD style = 0;
|
||||
|
||||
style &= ~FS_WEIGHT_MASK;
|
||||
switch (style_part [0]) {
|
||||
case FONT_WEIGHT_BLACK:
|
||||
style |= FS_WEIGHT_BLACK;
|
||||
break;
|
||||
case FONT_WEIGHT_EXTRA_BOLD:
|
||||
style |= FS_WEIGHT_EXTRA_BOLD;
|
||||
break;
|
||||
case FONT_WEIGHT_BOLD:
|
||||
style |= FS_WEIGHT_BOLD;
|
||||
break;
|
||||
/* deprecated since v3.4.0
|
||||
case FONT_WEIGHT_BOOK:
|
||||
style |= FS_WEIGHT_BOOK;
|
||||
break;
|
||||
*/
|
||||
case FONT_WEIGHT_DEMIBOLD:
|
||||
style |= FS_WEIGHT_DEMIBOLD;
|
||||
break;
|
||||
case FONT_WEIGHT_LIGHT:
|
||||
style |= FS_WEIGHT_LIGHT;
|
||||
break;
|
||||
case FONT_WEIGHT_MEDIUM:
|
||||
style |= FS_WEIGHT_MEDIUM;
|
||||
break;
|
||||
case FONT_WEIGHT_REGULAR:
|
||||
style |= FS_WEIGHT_REGULAR;
|
||||
break;
|
||||
case FONT_WEIGHT_SUBPIXEL:
|
||||
style |= FS_WEIGHT_SUBPIXEL;
|
||||
break;
|
||||
case FONT_WEIGHT_NORMAL:
|
||||
style |= FS_WEIGHT_NORMAL;
|
||||
break;
|
||||
case FONT_WEIGHT_LIGHT:
|
||||
style |= FS_WEIGHT_LIGHT;
|
||||
break;
|
||||
case FONT_WEIGHT_EXTRA_LIGHT:
|
||||
style |= FS_WEIGHT_EXTRA_LIGHT;
|
||||
break;
|
||||
case FONT_WEIGHT_THIN:
|
||||
style |= FS_WEIGHT_THIN;
|
||||
break;
|
||||
/* deprecated since v3.4.0
|
||||
case FONT_WEIGHT_SUBPIXEL:
|
||||
style |= FS_WEIGHT_SUBPIXEL;
|
||||
break;
|
||||
case FONT_WEIGHT_ALL:
|
||||
style |= FS_WEIGHT_MASK;
|
||||
break;
|
||||
break;
|
||||
*/
|
||||
case FONT_WEIGHT_ANY:
|
||||
default:
|
||||
return 0xFFFFFFFF;
|
||||
style |= FS_WEIGHT_ANY;
|
||||
break;
|
||||
}
|
||||
|
||||
style &= ~FS_SLANT_MASK;
|
||||
switch (style_part [1]) {
|
||||
case FONT_SLANT_ITALIC:
|
||||
style |= FS_SLANT_ITALIC;
|
||||
@@ -173,13 +287,13 @@ DWORD fontConvertStyle (const char* style_part)
|
||||
case FONT_SLANT_ROMAN:
|
||||
style |= FS_SLANT_ROMAN;
|
||||
break;
|
||||
case FONT_SLANT_ALL:
|
||||
style |= FS_SLANT_MASK;
|
||||
break;
|
||||
case FONT_SLANT_ANY:
|
||||
default:
|
||||
return 0xFFFFFFFF;
|
||||
style |= FS_SLANT_ANY;
|
||||
break;
|
||||
}
|
||||
|
||||
style &= ~FS_FLIP_MASK;
|
||||
switch (style_part [2]) {
|
||||
case FONT_FLIP_HORZ:
|
||||
style |= FS_FLIP_HORZ;
|
||||
@@ -191,9 +305,11 @@ DWORD fontConvertStyle (const char* style_part)
|
||||
style |= FS_FLIP_HORZVERT;
|
||||
break;
|
||||
default:
|
||||
//style |= FS_FLIP_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
style &= ~FS_OTHER_MASK;
|
||||
switch (style_part [3]) {
|
||||
case FONT_OTHER_AUTOSCALE:
|
||||
style |= FS_OTHER_AUTOSCALE;
|
||||
@@ -207,16 +323,53 @@ DWORD fontConvertStyle (const char* style_part)
|
||||
case FONT_OTHER_TTFNOCACHEKERN:
|
||||
style |= FS_OTHER_TTFNOCACHEKERN;
|
||||
break;
|
||||
case FONT_OTHER_LCDPORTRAIT:
|
||||
style |= FS_OTHER_LCDPORTRAIT;
|
||||
break;
|
||||
case FONT_OTHER_LCDPORTRAITKERN:
|
||||
style |= FS_OTHER_LCDPORTRAITKERN;
|
||||
break;
|
||||
default:
|
||||
//style |= FS_OTHER_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
style &= ~FS_DECORATE_MASK;
|
||||
switch (style_part [4]) {
|
||||
case FONT_DECORATE_NONE:
|
||||
break;
|
||||
case FONT_DECORATE_UNDERLINE:
|
||||
style |= FS_DECORATE_UNDERLINE;
|
||||
break;
|
||||
case FONT_DECORATE_STRUCKOUT:
|
||||
style |= FS_DECORATE_STRUCKOUT;
|
||||
break;
|
||||
case FONT_DECORATE_REVERSE:
|
||||
style |= FS_DECORATE_REVERSE;
|
||||
break;
|
||||
case FONT_DECORATE_OUTLINE:
|
||||
style |= FS_DECORATE_OUTLINE;
|
||||
break;
|
||||
case FONT_DECORATE_US:
|
||||
style |= FS_DECORATE_UNDERLINE;
|
||||
style |= FS_DECORATE_STRUCKOUT;
|
||||
break;
|
||||
default:
|
||||
//style |= FS_DECORATE_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
style &= ~FS_RENDER_MASK;
|
||||
switch (style_part [5]) {
|
||||
case FONT_RENDER_MONO:
|
||||
style |= FS_RENDER_MONO;
|
||||
break;
|
||||
case FONT_RENDER_GREY:
|
||||
style |= FS_RENDER_GREY;
|
||||
break;
|
||||
case FONT_RENDER_SUBPIXEL:
|
||||
style |= FS_RENDER_SUBPIXEL;
|
||||
break;
|
||||
default:
|
||||
style |= FS_RENDER_MONO;
|
||||
break;
|
||||
}
|
||||
|
||||
/* deprecated since v3.2.1
|
||||
switch (style_part [4]) {
|
||||
case FONT_UNDERLINE_LINE:
|
||||
style |= FS_UNDERLINE_LINE;
|
||||
@@ -244,6 +397,7 @@ DWORD fontConvertStyle (const char* style_part)
|
||||
default:
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
*/
|
||||
|
||||
return style;
|
||||
}
|
||||
@@ -291,7 +445,7 @@ int fontGetWidthFromName (const char* name)
|
||||
{
|
||||
int i;
|
||||
const char* width_part = name;
|
||||
char width [LEN_FONT_NAME + 1];
|
||||
char width [LEN_LOGFONT_NAME_FIELD + 1];
|
||||
|
||||
for (i = 0; i < NR_LOOP_FOR_WIDTH; i++) {
|
||||
if ((width_part = strchr (width_part, '-')) == NULL)
|
||||
@@ -318,11 +472,59 @@ int fontGetWidthFromName (const char* name)
|
||||
return atoi (width);
|
||||
}
|
||||
|
||||
/* Since 3.4.0; only for LOGFONT name */
|
||||
char fontGetOrientFromName (const char* name)
|
||||
{
|
||||
int i;
|
||||
const char* orient_part = name;
|
||||
char orient [LEN_LOGFONT_NAME_FIELD + 1];
|
||||
|
||||
for (i = 0; i < NR_LOOP_FOR_ORIENT; i++) {
|
||||
if ((orient_part = strchr (orient_part, '-')) == NULL)
|
||||
return FONT_ORIENT_UPRIGHT;
|
||||
|
||||
if (*(++orient_part) == '\0')
|
||||
return FONT_ORIENT_UPRIGHT;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while (orient_part [i]) {
|
||||
if (orient_part [i] == '-') {
|
||||
orient [i] = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
orient [i] = orient_part [i];
|
||||
i++;
|
||||
}
|
||||
|
||||
if (orient_part [i] == '\0')
|
||||
return FONT_ORIENT_UPRIGHT;
|
||||
|
||||
return orient[0];
|
||||
}
|
||||
|
||||
int fontGetOrientPosFromName (const char* name)
|
||||
{
|
||||
int i;
|
||||
const char* orient_part = name;
|
||||
|
||||
for (i = 0; i < NR_LOOP_FOR_ORIENT; i++) {
|
||||
if ((orient_part = strchr (orient_part, '-')) == NULL)
|
||||
return -1;
|
||||
|
||||
if (*(++orient_part) == '\0')
|
||||
return -1;
|
||||
}
|
||||
|
||||
return orient_part - name;
|
||||
}
|
||||
|
||||
int fontGetHeightFromName (const char* name)
|
||||
{
|
||||
int i;
|
||||
const char* height_part = name;
|
||||
char height [LEN_FONT_NAME + 1];
|
||||
char height [LEN_LOGFONT_NAME_FIELD + 1];
|
||||
|
||||
for (i = 0; i < NR_LOOP_FOR_HEIGHT; i++) {
|
||||
if ((height_part = strchr (height_part, '-')) == NULL)
|
||||
@@ -369,8 +571,8 @@ BOOL fontGetCharsetFromName (const char* name, char* charset)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
strncpy (charset, charset_part, LEN_FONT_NAME);
|
||||
charset [LEN_FONT_NAME] = '\0';
|
||||
strncpy (charset, charset_part, LEN_LOGFONT_NAME_FIELD);
|
||||
charset [LEN_LOGFONT_NAME_FIELD] = '\0';
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -392,8 +594,8 @@ BOOL fontGetCompatibleCharsetFromName (const char* name, char* charset)
|
||||
if (*(++charset_part) == '\0')
|
||||
return FALSE;
|
||||
|
||||
strncpy (charset, charset_part, LEN_FONT_NAME);
|
||||
charset [LEN_FONT_NAME] = '\0';
|
||||
strncpy (charset, charset_part, LEN_LOGFONT_NAME_FIELD);
|
||||
charset [LEN_LOGFONT_NAME_FIELD] = '\0';
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -451,8 +653,8 @@ BOOL charsetGetSpecificCharset (const char* charsets, int _index, char* charset)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
strncpy (charset, charsets, LEN_FONT_NAME);
|
||||
charset [LEN_FONT_NAME] = '\0';
|
||||
strncpy (charset, charsets, LEN_LOGFONT_NAME_FIELD);
|
||||
charset [LEN_LOGFONT_NAME_FIELD] = '\0';
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
+131
-122
File diff suppressed because it is too large
Load Diff
+592
-420
File diff suppressed because it is too large
Load Diff
+50
-38
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* 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~2018, 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/en/about/licensing-policy/>.
|
||||
*/
|
||||
@@ -40,6 +40,12 @@
|
||||
#ifndef GUI_FREETYP2_H
|
||||
#define GUI_FREETYP2_H
|
||||
|
||||
#ifndef TTF_DBG
|
||||
#define DP(x)
|
||||
#else
|
||||
#define DP(x) do { printf x; } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
@@ -54,6 +60,7 @@ extern "C" {
|
||||
#include FT_CACHE_MANAGER_H
|
||||
#include FT_TRIGONOMETRY_H
|
||||
#include FT_IMAGE_H
|
||||
#include FT_TRUETYPE_TABLES_H
|
||||
|
||||
#if 0
|
||||
#define _MGFONT_TTF_CACHE 1
|
||||
@@ -62,19 +69,17 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MGFONT_TTF_CACHE
|
||||
typedef unsigned long HCACHE;
|
||||
typedef int (* MakeHashKeyFunc)(unsigned short unicode);
|
||||
#endif
|
||||
typedef void* HCACHE;
|
||||
typedef int (* MakeHashKeyFunc)(Glyph32 gv);
|
||||
#endif
|
||||
|
||||
typedef struct tagFTFACEINFO {
|
||||
#ifdef _MGFONT_TTF_CACHE
|
||||
/*should be MAX_PATH*/
|
||||
char filepathname[256];
|
||||
char* filepathname;
|
||||
int face_index;
|
||||
int cmap_index;
|
||||
#else
|
||||
FT_Face face;
|
||||
#endif
|
||||
FT_Face face;
|
||||
BOOL valid;
|
||||
} FTFACEINFO, *PFTFACEINFO;
|
||||
|
||||
@@ -84,9 +89,8 @@ typedef struct tagFTINSTANCEINFO {
|
||||
FTC_ImageTypeRec image_type;
|
||||
FT_Int glyph_done;
|
||||
HCACHE cache;
|
||||
#else
|
||||
FT_Size size;
|
||||
#endif
|
||||
FT_Size size;
|
||||
FT_Matrix matrix;
|
||||
FT_Glyph glyph;
|
||||
int rotation;
|
||||
@@ -100,11 +104,12 @@ typedef struct tagFTINSTANCEINFO {
|
||||
int ascent;
|
||||
int descent;
|
||||
|
||||
FT_Bool use_kerning; /*FT_HAS_KERNING(face)*/
|
||||
FT_Vector delta;
|
||||
int is_index_old;
|
||||
FT_Bool use_kerning;
|
||||
FT_UInt cur_index;
|
||||
#if 0
|
||||
int is_index_old;
|
||||
FT_UInt prev_index;
|
||||
#endif
|
||||
|
||||
FT_LcdFilter ft_lcdfilter;
|
||||
} FTINSTANCEINFO, *PFTINSTANCEINFO;
|
||||
@@ -113,37 +118,44 @@ typedef struct tagFTINSTANCEINFO {
|
||||
|
||||
#define _TTF_HASH_NDIR 37
|
||||
|
||||
#define CACHE_VALID_ADVANCE 0x01
|
||||
#define CACHE_VALID_BBOX 0x02
|
||||
#define CACHE_VALID_BITMAP 0x04
|
||||
|
||||
typedef struct tagTTFCACHEINFO {
|
||||
unsigned short unicode;
|
||||
short glyph_code;
|
||||
FT_UInt glyph_code;
|
||||
Uint32 valid_advance:1;
|
||||
Uint32 valid_bbox:1;
|
||||
Uint32 valid_bitmap:1;
|
||||
Uint32 reserved_flags:28;
|
||||
|
||||
FT_Vector advance;
|
||||
FT_BBox bbox;
|
||||
FT_Vector delta;
|
||||
int flag;
|
||||
|
||||
int pitch;
|
||||
int width;
|
||||
int height;
|
||||
void *bitmap;
|
||||
} TTFCACHEINFO, *PTTFCACHEINFO;
|
||||
|
||||
extern HCACHE __mg_ttc_create(char *family, char *charset, DWORD style, int size,
|
||||
int nblk, int blksize, int ndir, MakeHashKeyFunc makeHashKey);
|
||||
extern HCACHE __mg_ttc_create(const char *df_name,
|
||||
int style, int size, int rotation,
|
||||
int nblk, int blksize, int ndir, MakeHashKeyFunc makeHashKey);
|
||||
extern HCACHE __mg_ttc_is_exist(const char *df_name,
|
||||
int style, int size, int rotation);
|
||||
|
||||
extern int __mg_ttc_write(HCACHE hCache, TTFCACHEINFO *data, int size);
|
||||
extern void __mg_ttc_release(HCACHE hCache);
|
||||
extern int __mg_ttc_sys_init(int maxCache, int cacheSize);
|
||||
extern void __mg_ttc_sys_deinit(void);
|
||||
extern TTFCACHEINFO *__mg_ttc_search(HCACHE hCache,
|
||||
unsigned short unicode, int *size);
|
||||
extern HCACHE __mg_ttc_is_exist(char *family, char *charset,
|
||||
DWORD style, int size);
|
||||
extern TTFCACHEINFO *__mg_ttc_search(HCACHE hCache, Glyph32 gv, int *size);
|
||||
extern void __mg_ttc_refer(HCACHE hCache);
|
||||
|
||||
#endif
|
||||
#ifdef _MGCOMPLEX_SCRIPTS
|
||||
extern void __mg_init_harzbuff_funcs(void);
|
||||
extern void __mg_term_harzbuff_funcs(void);
|
||||
#endif
|
||||
|
||||
#undef TTF_DBG
|
||||
|
||||
#ifndef TTF_DBG
|
||||
#define DP(x)
|
||||
#else
|
||||
#define DP(x) do { printf x; } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,201 +0,0 @@
|
||||
/*
|
||||
* 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~2018, 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/en/about/licensing-policy/>.
|
||||
*/
|
||||
|
||||
#ifndef __G_UNICODE_H__
|
||||
#define __G_UNICODE_H__
|
||||
|
||||
|
||||
/* These are the possible character classifications.
|
||||
* See http://www.unicode.org/Public/UNIDATA/UCD.html#General_Category_Values
|
||||
*/
|
||||
#if 0 /* VincentWei: Moved to gid.h */
|
||||
typedef enum
|
||||
{
|
||||
G_UNICODE_CONTROL,
|
||||
G_UNICODE_FORMAT,
|
||||
G_UNICODE_UNASSIGNED,
|
||||
G_UNICODE_PRIVATE_USE,
|
||||
G_UNICODE_SURROGATE,
|
||||
G_UNICODE_LOWERCASE_LETTER,
|
||||
G_UNICODE_MODIFIER_LETTER,
|
||||
G_UNICODE_OTHER_LETTER,
|
||||
G_UNICODE_TITLECASE_LETTER,
|
||||
G_UNICODE_UPPERCASE_LETTER,
|
||||
G_UNICODE_COMBINING_MARK,
|
||||
G_UNICODE_ENCLOSING_MARK,
|
||||
G_UNICODE_NON_SPACING_MARK,
|
||||
G_UNICODE_DECIMAL_NUMBER,
|
||||
G_UNICODE_LETTER_NUMBER,
|
||||
G_UNICODE_OTHER_NUMBER,
|
||||
G_UNICODE_CONNECT_PUNCTUATION,
|
||||
G_UNICODE_DASH_PUNCTUATION,
|
||||
G_UNICODE_CLOSE_PUNCTUATION,
|
||||
G_UNICODE_FINAL_PUNCTUATION,
|
||||
G_UNICODE_INITIAL_PUNCTUATION,
|
||||
G_UNICODE_OTHER_PUNCTUATION,
|
||||
G_UNICODE_OPEN_PUNCTUATION,
|
||||
G_UNICODE_CURRENCY_SYMBOL,
|
||||
G_UNICODE_MODIFIER_SYMBOL,
|
||||
G_UNICODE_MATH_SYMBOL,
|
||||
G_UNICODE_OTHER_SYMBOL,
|
||||
G_UNICODE_LINE_SEPARATOR,
|
||||
G_UNICODE_PARAGRAPH_SEPARATOR,
|
||||
G_UNICODE_SPACE_SEPARATOR
|
||||
} GUnicodeType;
|
||||
#endif /* VincentWei: Moved to gid.h */
|
||||
|
||||
/* These are the possible line break classifications.
|
||||
* Note that new types may be added in the future.
|
||||
* Implementations may regard unknown values like G_UNICODE_BREAK_UNKNOWN
|
||||
* See http://www.unicode.org/unicode/reports/tr14/
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
G_UNICODE_BREAK_MANDATORY,
|
||||
G_UNICODE_BREAK_CARRIAGE_RETURN,
|
||||
G_UNICODE_BREAK_LINE_FEED,
|
||||
G_UNICODE_BREAK_COMBINING_MARK,
|
||||
G_UNICODE_BREAK_SURROGATE,
|
||||
G_UNICODE_BREAK_ZERO_WIDTH_SPACE,
|
||||
G_UNICODE_BREAK_INSEPARABLE,
|
||||
G_UNICODE_BREAK_NON_BREAKING_GLUE,
|
||||
G_UNICODE_BREAK_CONTINGENT,
|
||||
G_UNICODE_BREAK_SPACE,
|
||||
G_UNICODE_BREAK_AFTER,
|
||||
G_UNICODE_BREAK_BEFORE,
|
||||
G_UNICODE_BREAK_BEFORE_AND_AFTER,
|
||||
G_UNICODE_BREAK_HYPHEN,
|
||||
G_UNICODE_BREAK_NON_STARTER,
|
||||
G_UNICODE_BREAK_OPEN_PUNCTUATION,
|
||||
G_UNICODE_BREAK_CLOSE_PUNCTUATION,
|
||||
G_UNICODE_BREAK_QUOTATION,
|
||||
G_UNICODE_BREAK_EXCLAMATION,
|
||||
G_UNICODE_BREAK_IDEOGRAPHIC,
|
||||
G_UNICODE_BREAK_NUMERIC,
|
||||
G_UNICODE_BREAK_INFIX_SEPARATOR,
|
||||
G_UNICODE_BREAK_SYMBOL,
|
||||
G_UNICODE_BREAK_ALPHABETIC,
|
||||
G_UNICODE_BREAK_PREFIX,
|
||||
G_UNICODE_BREAK_POSTFIX,
|
||||
G_UNICODE_BREAK_COMPLEX_CONTEXT,
|
||||
G_UNICODE_BREAK_AMBIGUOUS,
|
||||
G_UNICODE_BREAK_UNKNOWN,
|
||||
G_UNICODE_BREAK_NEXT_LINE,
|
||||
G_UNICODE_BREAK_WORD_JOINER,
|
||||
G_UNICODE_BREAK_HANGUL_L_JAMO,
|
||||
G_UNICODE_BREAK_HANGUL_V_JAMO,
|
||||
G_UNICODE_BREAK_HANGUL_T_JAMO,
|
||||
G_UNICODE_BREAK_HANGUL_LV_SYLLABLE,
|
||||
G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE
|
||||
} GUnicodeBreakType;
|
||||
|
||||
typedef enum
|
||||
{ /* ISO 15924 code */
|
||||
G_UNICODE_SCRIPT_INVALID_CODE = -1,
|
||||
G_UNICODE_SCRIPT_COMMON = 0, /* Zyyy */
|
||||
G_UNICODE_SCRIPT_INHERITED, /* Qaai */
|
||||
G_UNICODE_SCRIPT_ARABIC, /* Arab */
|
||||
G_UNICODE_SCRIPT_ARMENIAN, /* Armn */
|
||||
G_UNICODE_SCRIPT_BENGALI, /* Beng */
|
||||
G_UNICODE_SCRIPT_BOPOMOFO, /* Bopo */
|
||||
G_UNICODE_SCRIPT_CHEROKEE, /* Cher */
|
||||
G_UNICODE_SCRIPT_COPTIC, /* Qaac */
|
||||
G_UNICODE_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */
|
||||
G_UNICODE_SCRIPT_DESERET, /* Dsrt */
|
||||
G_UNICODE_SCRIPT_DEVANAGARI, /* Deva */
|
||||
G_UNICODE_SCRIPT_ETHIOPIC, /* Ethi */
|
||||
G_UNICODE_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */
|
||||
G_UNICODE_SCRIPT_GOTHIC, /* Goth */
|
||||
G_UNICODE_SCRIPT_GREEK, /* Grek */
|
||||
G_UNICODE_SCRIPT_GUJARATI, /* Gujr */
|
||||
G_UNICODE_SCRIPT_GURMUKHI, /* Guru */
|
||||
G_UNICODE_SCRIPT_HAN, /* Hani */
|
||||
G_UNICODE_SCRIPT_HANGUL, /* Hang */
|
||||
G_UNICODE_SCRIPT_HEBREW, /* Hebr */
|
||||
G_UNICODE_SCRIPT_HIRAGANA, /* Hira */
|
||||
G_UNICODE_SCRIPT_KANNADA, /* Knda */
|
||||
G_UNICODE_SCRIPT_KATAKANA, /* Kana */
|
||||
G_UNICODE_SCRIPT_KHMER, /* Khmr */
|
||||
G_UNICODE_SCRIPT_LAO, /* Laoo */
|
||||
G_UNICODE_SCRIPT_LATIN, /* Latn (Latf, Latg) */
|
||||
G_UNICODE_SCRIPT_MALAYALAM, /* Mlym */
|
||||
G_UNICODE_SCRIPT_MONGOLIAN, /* Mong */
|
||||
G_UNICODE_SCRIPT_MYANMAR, /* Mymr */
|
||||
G_UNICODE_SCRIPT_OGHAM, /* Ogam */
|
||||
G_UNICODE_SCRIPT_OLD_ITALIC, /* Ital */
|
||||
G_UNICODE_SCRIPT_ORIYA, /* Orya */
|
||||
G_UNICODE_SCRIPT_RUNIC, /* Runr */
|
||||
G_UNICODE_SCRIPT_SINHALA, /* Sinh */
|
||||
G_UNICODE_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */
|
||||
G_UNICODE_SCRIPT_TAMIL, /* Taml */
|
||||
G_UNICODE_SCRIPT_TELUGU, /* Telu */
|
||||
G_UNICODE_SCRIPT_THAANA, /* Thaa */
|
||||
G_UNICODE_SCRIPT_THAI, /* Thai */
|
||||
G_UNICODE_SCRIPT_TIBETAN, /* Tibt */
|
||||
G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
|
||||
G_UNICODE_SCRIPT_YI, /* Yiii */
|
||||
G_UNICODE_SCRIPT_TAGALOG, /* Tglg */
|
||||
G_UNICODE_SCRIPT_HANUNOO, /* Hano */
|
||||
G_UNICODE_SCRIPT_BUHID, /* Buhd */
|
||||
G_UNICODE_SCRIPT_TAGBANWA, /* Tagb */
|
||||
|
||||
/* Unicode-4.0 additions */
|
||||
G_UNICODE_SCRIPT_BRAILLE, /* Brai */
|
||||
G_UNICODE_SCRIPT_CYPRIOT, /* Cprt */
|
||||
G_UNICODE_SCRIPT_LIMBU, /* Limb */
|
||||
G_UNICODE_SCRIPT_OSMANYA, /* Osma */
|
||||
G_UNICODE_SCRIPT_SHAVIAN, /* Shaw */
|
||||
G_UNICODE_SCRIPT_LINEAR_B, /* Linb */
|
||||
G_UNICODE_SCRIPT_TAI_LE, /* Tale */
|
||||
G_UNICODE_SCRIPT_UGARITIC, /* Ugar */
|
||||
|
||||
/* Unicode-4.1 additions */
|
||||
G_UNICODE_SCRIPT_NEW_TAI_LUE, /* Talu */
|
||||
G_UNICODE_SCRIPT_BUGINESE, /* Bugi */
|
||||
G_UNICODE_SCRIPT_GLAGOLITIC, /* Glag */
|
||||
G_UNICODE_SCRIPT_TIFINAGH, /* Tfng */
|
||||
G_UNICODE_SCRIPT_SYLOTI_NAGRI, /* Sylo */
|
||||
G_UNICODE_SCRIPT_OLD_PERSIAN, /* Xpeo */
|
||||
G_UNICODE_SCRIPT_KHAROSHTHI, /* Khar */
|
||||
|
||||
/* Unicode-5.0 additions */
|
||||
G_UNICODE_SCRIPT_UNKNOWN, /* Zzzz */
|
||||
G_UNICODE_SCRIPT_BALINESE, /* Bali */
|
||||
G_UNICODE_SCRIPT_CUNEIFORM, /* Xsux */
|
||||
G_UNICODE_SCRIPT_PHOENICIAN, /* Phnx */
|
||||
G_UNICODE_SCRIPT_PHAGS_PA, /* Phag */
|
||||
G_UNICODE_SCRIPT_NKO /* Nkoo */
|
||||
} GUnicodeScript;
|
||||
|
||||
#endif /* __G_UNICODE_H__ */
|
||||
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* 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~2018, 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/en/about/licensing-policy/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
** harzbuff-minigui-funcs.c:
|
||||
**
|
||||
** Functions for using HarfBuzz with the MiniGUI to provide Unicode data.
|
||||
**
|
||||
** Create by WEI Yongming at 2019/03/14
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#if defined(_MGCHARSET_UNICODE) && defined(_MGCOMPLEX_SCRIPTS)
|
||||
|
||||
#include "minigui.h"
|
||||
#include "gdi.h"
|
||||
|
||||
#include <hb.h>
|
||||
|
||||
static hb_unicode_combining_class_t
|
||||
hb_minigui_unicode_combining_class (hb_unicode_funcs_t *ufuncs,
|
||||
hb_codepoint_t unicode,
|
||||
void *user_data)
|
||||
|
||||
{
|
||||
return (hb_unicode_combining_class_t) UCharCombiningClass (unicode);
|
||||
}
|
||||
|
||||
static hb_unicode_general_category_t
|
||||
hb_minigui_unicode_general_category (hb_unicode_funcs_t *ufuncs,
|
||||
hb_codepoint_t unicode,
|
||||
void *user_data)
|
||||
{
|
||||
/* hb_unicode_general_category_t and GUnicodeType are identical */
|
||||
return (hb_unicode_general_category_t) UCharGetCategory (unicode);
|
||||
}
|
||||
|
||||
static hb_codepoint_t
|
||||
hb_minigui_unicode_mirroring (hb_unicode_funcs_t *ufuncs,
|
||||
hb_codepoint_t unicode,
|
||||
void *user_data)
|
||||
{
|
||||
UCharGetMirror (unicode, &unicode);
|
||||
return unicode;
|
||||
}
|
||||
|
||||
static hb_script_t
|
||||
hb_minigui_unicode_script (hb_unicode_funcs_t *ufuncs,
|
||||
hb_codepoint_t unicode,
|
||||
void *user_data)
|
||||
{
|
||||
return ScriptTypeToISO15924 (UCharGetScriptType(unicode));
|
||||
}
|
||||
|
||||
static hb_bool_t
|
||||
hb_minigui_unicode_compose (hb_unicode_funcs_t *ufuncs,
|
||||
hb_codepoint_t a,
|
||||
hb_codepoint_t b,
|
||||
hb_codepoint_t *ab,
|
||||
void *user_data)
|
||||
{
|
||||
return UCharCompose (a, b, ab);
|
||||
}
|
||||
|
||||
static hb_bool_t
|
||||
hb_minigui_unicode_decompose (hb_unicode_funcs_t *ufuncs,
|
||||
hb_codepoint_t ab,
|
||||
hb_codepoint_t *a,
|
||||
hb_codepoint_t *b,
|
||||
void *user_data)
|
||||
{
|
||||
return UCharDecompose(ab, a, b);
|
||||
}
|
||||
|
||||
static hb_unicode_funcs_t *funcs;
|
||||
static hb_unicode_funcs_t *get_unicode_funcs(void)
|
||||
{
|
||||
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)
|
||||
{
|
||||
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
||||
__hb_extern_get_unicode_funcs = get_unicode_funcs;
|
||||
}
|
||||
|
||||
void __mg_term_harzbuff_funcs(void)
|
||||
{
|
||||
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
||||
|
||||
if (funcs) {
|
||||
hb_unicode_funcs_destroy(funcs);
|
||||
}
|
||||
else {
|
||||
_ERR_PRINTF("%s: hb_unicode_funcs_t object is NULL\n",
|
||||
__FUNCTION__);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* defined(_MGCHARSET_UNICODE) && defined(_MGCOMPLEX_SCRIPTS) */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,85 @@
|
||||
/* == Start of generated table == */
|
||||
/*
|
||||
* The following table is generated by running:
|
||||
*
|
||||
* ./gen-ascii-bidi-tables.py
|
||||
*
|
||||
* on ucd/UnicodeData.txt files with these headers:
|
||||
*
|
||||
* UnicodeData.txt does not have a header.
|
||||
*/
|
||||
|
||||
#ifndef _MGFONT_ISO8859_BIDI_TABLES_H
|
||||
#define _MGFONT_ISO8859_BIDI_TABLES_H
|
||||
|
||||
static const BidiType __mg_iso8859_1_bidi_char_type_map[] =
|
||||
{
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_SS, BIDI_TYPE_BS, BIDI_TYPE_SS,
|
||||
BIDI_TYPE_WS, BIDI_TYPE_BS, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BS, BIDI_TYPE_BS, BIDI_TYPE_BS, BIDI_TYPE_SS,
|
||||
BIDI_TYPE_WS, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ET,
|
||||
BIDI_TYPE_ET, BIDI_TYPE_ET, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ES,
|
||||
BIDI_TYPE_CS, BIDI_TYPE_ES, BIDI_TYPE_CS, BIDI_TYPE_CS,
|
||||
BIDI_TYPE_EN, BIDI_TYPE_EN, BIDI_TYPE_EN, BIDI_TYPE_EN,
|
||||
BIDI_TYPE_EN, BIDI_TYPE_EN, BIDI_TYPE_EN, BIDI_TYPE_EN,
|
||||
BIDI_TYPE_EN, BIDI_TYPE_EN, BIDI_TYPE_CS, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BS, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
BIDI_TYPE_CS, BIDI_TYPE_ON, BIDI_TYPE_ET, BIDI_TYPE_ET,
|
||||
BIDI_TYPE_ET, BIDI_TYPE_ET, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_BN, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ET, BIDI_TYPE_ET, BIDI_TYPE_EN, BIDI_TYPE_EN,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_EN, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||
};
|
||||
|
||||
#endif /* !_MGFONT_ISO8859_BIDI_TABLES_H */
|
||||
|
||||
/* == End of generated table == */
|
||||
File diff suppressed because it is too large
Load Diff
+419
-328
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* 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~2018, 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/en/about/licensing-policy/>.
|
||||
*/
|
||||
/*
|
||||
** nullfont.c: The Null Font operation set.
|
||||
**
|
||||
** Created by WEI Yongming at 2019/03/27
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "minigui.h"
|
||||
#include "gdi.h"
|
||||
|
||||
#include "devfont.h"
|
||||
#include "charset.h"
|
||||
#include "fontname.h"
|
||||
|
||||
#define NUF_WIDTH 8
|
||||
#define NUF_HEIGHT 1
|
||||
|
||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||
{
|
||||
return DEVFONTGLYPHTYPE_MONOBMP;
|
||||
}
|
||||
|
||||
static int get_max_width (LOGFONT* logfont, DEVFONT* devfont)
|
||||
{
|
||||
return NUF_WIDTH;
|
||||
}
|
||||
|
||||
static int get_ave_width (LOGFONT* logfont, DEVFONT* devfont)
|
||||
{
|
||||
return NUF_WIDTH;
|
||||
}
|
||||
|
||||
static int get_font_height (LOGFONT* logfont, DEVFONT* devfont)
|
||||
{
|
||||
return GET_DEVFONT_SCALE (logfont, devfont);
|
||||
}
|
||||
|
||||
static int get_font_size (LOGFONT* logfont, DEVFONT* devfont, int expect, int df_slot)
|
||||
{
|
||||
if (df_slot >= 0 && df_slot < MAXNR_DEVFONTS)
|
||||
SET_DEVFONT_SCALE(logfont, df_slot, expect);
|
||||
|
||||
return expect;
|
||||
}
|
||||
|
||||
static int get_font_ascent (LOGFONT* logfont, DEVFONT* devfont)
|
||||
{
|
||||
return GET_DEVFONT_SCALE (logfont, devfont);
|
||||
}
|
||||
|
||||
static int get_font_descent (LOGFONT* logfont, DEVFONT* devfont)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont,
|
||||
Glyph32 glyph_value,
|
||||
int* px, int* py, int* pwidth, int* pheight)
|
||||
{
|
||||
int scale = GET_DEVFONT_SCALE (logfont, devfont);
|
||||
|
||||
if (pwidth)
|
||||
*pwidth = NUF_WIDTH;
|
||||
if (pheight)
|
||||
*pheight = NUF_HEIGHT;
|
||||
if (py)
|
||||
*py -= scale;
|
||||
|
||||
return NUF_WIDTH;
|
||||
}
|
||||
|
||||
static int get_glyph_advance (LOGFONT* logfont, DEVFONT* devfont,
|
||||
Glyph32 glyph_value, int* px, int* py)
|
||||
{
|
||||
if (px)
|
||||
*px += NUF_WIDTH;
|
||||
return NUF_WIDTH;
|
||||
}
|
||||
|
||||
static unsigned char null_bitmap = 0x18;
|
||||
|
||||
static const void* get_glyph_monobitmap (LOGFONT* logfont, DEVFONT* devfont,
|
||||
Glyph32 glyph_value, SIZE* sz, int* pitch, unsigned short* scale)
|
||||
{
|
||||
if (sz) {
|
||||
sz->cx = 8;
|
||||
sz->cy = 1;
|
||||
}
|
||||
|
||||
if (pitch)
|
||||
*pitch = 1;
|
||||
|
||||
if (scale)
|
||||
*scale = GET_DEVFONT_SCALE (logfont, devfont);
|
||||
|
||||
return &null_bitmap;
|
||||
}
|
||||
|
||||
static BOOL is_glyph_existed (LOGFONT* logfont, DEVFONT* devfont, Glyph32 gv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void* load_font_data (DEVFONT* devfont, const char* fontname,
|
||||
const char* filename)
|
||||
{
|
||||
return &null_bitmap;
|
||||
}
|
||||
|
||||
static void unload_font_data (DEVFONT* devfont, void* data)
|
||||
{
|
||||
if (data != &null_bitmap) {
|
||||
_WRN_PRINTF("data is not null_bitmap");
|
||||
}
|
||||
}
|
||||
|
||||
FONTOPS __mg_null_font_ops = {
|
||||
get_glyph_bmptype,
|
||||
get_ave_width,
|
||||
get_max_width,
|
||||
get_font_height,
|
||||
get_font_size,
|
||||
get_font_ascent,
|
||||
get_font_descent,
|
||||
|
||||
is_glyph_existed,
|
||||
get_glyph_advance,
|
||||
get_glyph_bbox,
|
||||
|
||||
get_glyph_monobitmap,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
is_rotatable,
|
||||
load_font_data,
|
||||
unload_font_data
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user