mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 12:27:58 +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 | ||
|
|
82033a44dd | ||
|
|
1c9537fc63 | ||
|
|
612c395c06 | ||
|
|
8dc0ee2ade | ||
|
|
caefd7355a | ||
|
|
9ea0e15dba | ||
|
|
83c8984c74 | ||
|
|
4761333a1a | ||
|
|
8538f29f70 | ||
|
|
b658413961 | ||
|
|
bb187f1ee3 | ||
|
|
ea8ab93bad | ||
|
|
9226fcff26 | ||
|
|
05cf370155 | ||
|
|
0d2352884a |
@@ -22,5 +22,4 @@ Makefile.in
|
||||
/*.pc
|
||||
/*config.h
|
||||
/*config.h.in
|
||||
/*config.h.in~
|
||||
|
||||
|
||||
+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
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
A mature and proven cross-platform GUI system for embedded and smart IoT devices.
|
||||
|
||||
|
||||
## TABLE OF CONTENTS
|
||||
|
||||
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
|
||||
@@ -21,7 +23,7 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
||||
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
|
||||
(Vincent Wei, <https://github.com/VincentWei>).
|
||||
(Vincent Wei, https://github.com/VincentWei).
|
||||
|
||||
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial
|
||||
use.
|
||||
@@ -29,39 +31,45 @@ 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 RTEMS, VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II,
|
||||
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 (toolkit).
|
||||
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.
|
||||
* mGPlus: A MiniGUI component which provides support for advanced graphics
|
||||
functions like path, gradient, anti-aliased stretch, and color combination.
|
||||
* mGEff: mGEff provides an animation framework for MiniGUI app.
|
||||
It also provides some popular UI/UE special effects.
|
||||
* mGNCS: This component provides a new control set for MiniGUI app.
|
||||
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
|
||||
a touch screen.
|
||||
* mGUtils: A MiniGUI component which contains miscellaneous utilities
|
||||
like ColorSelectionDialogBox, FileOpenDialogBox, and so on.
|
||||
|
||||
* mGPlus: A MiniGUI component which provides support for advanced graphics
|
||||
functions like path, gradient, anti-aliase stretch, and color combination.
|
||||
|
||||
* mGEff: mGEff provides an animation framework for MiniGUI app.
|
||||
It also provides some popular UI/UE special effects.
|
||||
|
||||
* mGNCS: This component provides a new control set for MiniGUI app.
|
||||
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
|
||||
a touch screen.
|
||||
|
||||
There are also some legacy MiniGUI components. We will not maintain these
|
||||
components for MiniGUI 3.2.x:
|
||||
components for MiniGUI core v3.2:
|
||||
|
||||
* mGi: An input method component for MiniGUI. This component provides
|
||||
some typical input methods (such as soft keyboard, hand-writing, and predict
|
||||
text input for mobile phone) for MiniGUI apps.
|
||||
* mGp: A printing component for MiniGUI. By using mGp, you can print
|
||||
out the graphics created by MiniGUI app to general-purpose printers.
|
||||
* mG3d: A simple three-dimension component for MiniGUI. This component
|
||||
provides a simple 3D API for app. You can use mG3d to create simple
|
||||
3D UI.
|
||||
* 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.
|
||||
|
||||
* mGp: A printing component for MiniGUI. By using mGp, you can print
|
||||
out the graphics created by MiniGUI app to general-purpose printers.
|
||||
|
||||
* mG3d: A simple three-dimension component for MiniGUI. This component
|
||||
provides a simple 3D API for app. You can use mG3d to create simple
|
||||
3D UI.
|
||||
|
||||
MiniGUI is a free software project. In December 1998, the initiator of
|
||||
FMSoft, Wei Yongming, began to develop MiniGUI under the GNU General Public
|
||||
@@ -73,34 +81,34 @@ as a free software project.
|
||||
You can download the source code tarball of MiniGUI and the dependent libraries
|
||||
from the download zone of the site:
|
||||
|
||||
<http://www.minigui.com>
|
||||
http://www.minigui.com
|
||||
|
||||
FMSoft also releases some open source apps for MiniGUI on the site above,
|
||||
for examples:
|
||||
|
||||
* mDolphin, licensed under Apache 2.0, is a full-featured
|
||||
WEB/WAP browser, which is developed based on the open source browser
|
||||
core WebKit and uses MiniGUI as its underlying graphics support system.
|
||||
* mGallery, licensed under Apache 2.0, intends to
|
||||
provide a total solution for PMP (Portable Multimedia Player),
|
||||
which uses MiniGUI as the graphics platform.
|
||||
* mSpider, licensed under GPL 3.0, intends to provide a
|
||||
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
|
||||
* mEagle, licensed under GPL 3.0, is an embedded GIS development platform
|
||||
which addresses the needs of map browse, query, analysis, etc
|
||||
* mDolphin, licensed under Apache 2.0, is a full-featured
|
||||
WEB/WAP browser, which is developed based on the open source browser
|
||||
core WebKit and uses MiniGUI as its underlying graphics support system.
|
||||
|
||||
* mGallery, licensed under Apache 2.0, intends to
|
||||
provide a total solution for PMP (Portable Multimedia Player),
|
||||
which uses MiniGUI as the graphics platform.
|
||||
|
||||
* mSpider, licensed under GPL 3.0, intends to provide a
|
||||
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
|
||||
|
||||
* mEagle, licensed under GPL 3.0, is an embedded GIS development platform
|
||||
which addresses the needs of map browse, query, analysis, etc
|
||||
|
||||
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
|
||||
|
||||
and
|
||||
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.
|
||||
|
||||
<https://github.com/FMSoftCN>
|
||||
|
||||
We now maintain all documents about MiniGUI on the following public repo:
|
||||
|
||||
<https://github.com/VincentWei/minigui-docs>
|
||||
http://www.minigui.com/en/download
|
||||
|
||||
|
||||
## A BRIEF BUILDING INSTRUCTION
|
||||
@@ -139,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:
|
||||
@@ -195,7 +212,7 @@ clients and the server.
|
||||
|
||||
## HISTORY
|
||||
|
||||
About ten years have pasted since MiniGUI was initially created at
|
||||
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.
|
||||
@@ -288,6 +305,7 @@ 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
|
||||
@@ -337,53 +355,36 @@ 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>
|
||||
the commercial license of MiniGUI, please write to sales@minigui.com.
|
||||
|
||||
|
||||
## COPYING
|
||||
|
||||
Copyright (C) 2002 ~ 2019, Beijing FMSoft Technologies Co., Ltd.
|
||||
Copyright (C) 1998 ~ 2002, WEI Yongming
|
||||
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 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.
|
||||
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/>.
|
||||
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,
|
||||
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.
|
||||
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.
|
||||
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/>.
|
||||
|
||||
### Special Statement
|
||||
|
||||
The above open source or free software license does
|
||||
not apply to any entity in the Exception List published by
|
||||
Beijing FMSoft Technologies Co., Ltd.
|
||||
|
||||
If you are or the entity you represent is listed in the Exception List,
|
||||
the above open source or free software license does not apply to you
|
||||
or the entity you represent. Regardless of the purpose, you should not
|
||||
use the software in any way whatsoever, including but not limited to
|
||||
downloading, viewing, copying, distributing, compiling, and running.
|
||||
If you have already downloaded it, you MUST destroy all of its copies.
|
||||
|
||||
The Exception List is published by FMSoft and may be updated
|
||||
from time to time. For more information, please see
|
||||
<https://www.fmsoft.cn/exception-list>.
|
||||
For more information about the commercial license, please refer to
|
||||
<http://www.minigui.com/en/about/licensing-policy/>.
|
||||
|
||||
|
||||
+146
-32
@@ -1,25 +1,142 @@
|
||||
# Release Notes
|
||||
|
||||
## Version 3.2.3
|
||||
## Version 3.4.0
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.2.3.
|
||||
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>
|
||||
|
||||
* ENHANCEMENTS:
|
||||
- Support for RTEMS operating system.
|
||||
* BUGFIXES:
|
||||
- Fixed errors in makefile.ng files.
|
||||
* CLEANUP:
|
||||
- `README.md` for correct markdown tags.
|
||||
https://github.com/VincentWei/minigui
|
||||
|
||||
### What's new in this version
|
||||
|
||||
## Version 3.2.2
|
||||
In this version, we mainly enhanced and tuned the APIs of font rendering.
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.2.2.
|
||||
#### 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
|
||||
|
||||
@@ -28,38 +145,34 @@ Please report any bugs and incompatibilities in
|
||||
### What's new in this version
|
||||
|
||||
* ENHANCEMENTS:
|
||||
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.
|
||||
* 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. New API `LoadDevFontFromIncoreData`. You can use this function to load
|
||||
a device font from incore data.
|
||||
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. Support BIDI for UNICODE charsets and cleanup the implementation.
|
||||
* New API: `GetGlyphBIDIType` to get the glyph type in BIDI.
|
||||
* New DC attribute: BIDI flag.
|
||||
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.
|
||||
Define `InitSlaveScreen` as an inline function calling `InitSlaveScreenEx`.
|
||||
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.
|
||||
* 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. Support BIDI for UNICODE charsets and cleanup the implementation.
|
||||
* 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.
|
||||
1. New type: `QDWORD` for a quauter of DWORD. This type is 16-bit long on
|
||||
64-bit architecture, and 8-bit long on 32-bit.
|
||||
64-bit architecture, and 8-bit long on 32-bit.
|
||||
1. New macros for QDWORD:
|
||||
* `MAKEDWORD`: Make a DWROD from four QDWORDs.
|
||||
* `FIRST_QDWORD`: get the first (LSB) QDWORD from a DWORD.
|
||||
* `SECOND_QDWORD`: get the second (LSB) QDWORD from a DWORD.
|
||||
* `THIRD_QDWORD`: get the third (LSB) QDWORD from a DWORD.
|
||||
* `FOURTH_QDWORD`: get the fourth (LSB) QDWORD from a DWORD.
|
||||
1. New header for CommLCD NEWGAL engine and COMM IAL engine:
|
||||
`<minigui/exstubs.h>`.
|
||||
|
||||
* BUGFIXING:
|
||||
1. handle `PNG_COLOR_TYPE_GRAY_ALPHA` color type of PNG files.
|
||||
@@ -69,8 +182,9 @@ Please report any bugs and incompatibilities in
|
||||
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.
|
||||
1. Tune cache implementation of FreeType2 font engine.
|
||||
* Enable cache for rotated LOGFONT.
|
||||
|
||||
* TUNNING:
|
||||
1. Tune GLYPHINFO structure and GetGlyphInfo to return BIDI glyph type.
|
||||
|
||||
## Version 3.2.0
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Version 3.2.3 (2019/10/31)
|
||||
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.2.tar.gz
|
||||
* mg-samples-3.4.0.tar.gz
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
./configure \
|
||||
--with-runmode=ths \
|
||||
--disable-dblclk \
|
||||
--disable-cursor \
|
||||
--disable-mousecalibrate \
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
RTEMS_DIR=/home/projects/movidius/m8_gui/tools/18.11.4/linux64/sparc-myriad-rtems-6.3.0
|
||||
|
||||
#RTEMS_GLOBAL_CFLAGS="-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -finit-priority"
|
||||
|
||||
rm -f config.cache config.status
|
||||
|
||||
CC=${RTEMS_DIR}/bin/sparc-myriad-rtems-gcc \
|
||||
CFLAGS="-I${RTEMS_DIR}/sparc-myriad-rtems/include -I${RTEMS_DIR}/pnglib/include -I${RTEMS_DIR}/zlib/include" \
|
||||
LDFLAGS="-L${RTEMS_DIR}/lib/gcc/sparc-myriad-rtems/6.3.0 -L${RTEMS_DIR}/pnglib/lib -L${RTEMS_DIR}/zlib/lib" \
|
||||
./configure --prefix=/home/projects/movidius/m8_gui/tools/18.11.4/linux64/sparc-myriad-rtems-6.3.0/minigui \
|
||||
--build=i686-linux \
|
||||
--host=sparc-myriad-rtems \
|
||||
--target=sparc-myriad-rtems \
|
||||
--with-osname=rtems \
|
||||
--with-runmode=ths \
|
||||
--enable-miniguientry \
|
||||
--enable-incoreres \
|
||||
--disable-cursor \
|
||||
--disable-videofbcon \
|
||||
--disable-qvfbial \
|
||||
--disable-vbfsupport \
|
||||
--disable-qpfsupport \
|
||||
--disable-latin9support \
|
||||
--enable-gbksupport \
|
||||
--disable-big5support \
|
||||
--enable-unicodesupport \
|
||||
--disable-savebitmap \
|
||||
--disable-jpgsupport \
|
||||
--disable-pngsupport \
|
||||
--disable-aboutdlg \
|
||||
--enable-adv2dapi \
|
||||
--enable-videodummy \
|
||||
--disable-consoleial \
|
||||
--disable-videopcxvfb \
|
||||
--with-targetname=external \
|
||||
--enable-pngsupport \
|
||||
--disable-develmode \
|
||||
--disable-detaildebug \
|
||||
--disable-tracemsg \
|
||||
--enable-videocommlcd \
|
||||
--enable-commial \
|
||||
--disable-splash
|
||||
@@ -1,36 +0,0 @@
|
||||
# rules for pc-linux
|
||||
|
||||
# set your own targaet_os
|
||||
TARGET_OS=linux
|
||||
|
||||
##################################################
|
||||
# set your compile tool #
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
CPP=g++
|
||||
AR=ar
|
||||
AS=as
|
||||
RANLIB=ranlib
|
||||
MAKE=/usr/bin/make
|
||||
##################################################
|
||||
|
||||
ARFLAGS=-rc
|
||||
COFLAG=-c
|
||||
|
||||
OBJ=o
|
||||
LIBA=a
|
||||
|
||||
##################################################
|
||||
# if you don't want to create dynamic, delete it #
|
||||
LIBSO=so
|
||||
SOFLAGS=-fPIC -shared -o
|
||||
##################################################
|
||||
|
||||
|
||||
##################################################
|
||||
# set your compile flags and install prefix path #
|
||||
PREFIX=/usr/local
|
||||
CFLAGS+=-g -Wall -fPIC `pkg-config --cflags freetype2`
|
||||
LDFLAGS+=
|
||||
##################################################
|
||||
|
||||
+116
-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.3)
|
||||
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=3
|
||||
MINIGUI_MINOR_VERSION=4
|
||||
MINIGUI_MICRO_VERSION=0
|
||||
MINIGUI_INTERFACE_AGE=0
|
||||
MINIGUI_BINARY_AGE=3
|
||||
MINIGUI_BINARY_AGE=0
|
||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||
|
||||
AC_SUBST(MINIGUI_MAJOR_VERSION)
|
||||
@@ -62,7 +62,7 @@ dnl ========================================================================
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_DIRENT
|
||||
AC_CHECK_HEADERS(limits.h math.h locale.h unistd.h termio.h sys/types.h sys/time.h)
|
||||
AC_CHECK_HEADERS(sys/types.h sys/time.h termio.h unistd.h math.h locale.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
@@ -77,6 +77,7 @@ AC_FUNC_MEMCMP
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(time mktime localtime strdup strcasecmp strncasecmp strerror setlocale)
|
||||
AC_CHECK_FUNCS(posix_memalign memalign valloc)
|
||||
|
||||
dnl ========================================================================
|
||||
dnl User selectable options
|
||||
@@ -89,6 +90,8 @@ message_string="no"
|
||||
|
||||
runtime_mode="procs"
|
||||
|
||||
stand_alone="no"
|
||||
|
||||
incore_res="no"
|
||||
use_miniguientry="no"
|
||||
fixed_math="yes"
|
||||
@@ -162,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"
|
||||
|
||||
@@ -191,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"
|
||||
@@ -302,6 +307,10 @@ AC_ARG_WITH(runmode,
|
||||
[ --with-runmode=procs/ths/sa the MiniGUI runtime mode <default=procs>],
|
||||
runtime_mode=$withval)
|
||||
|
||||
AC_ARG_ENABLE(standalone,
|
||||
[ --enable-standalone build MiniGUI-Standalone version <default=no>],
|
||||
stand_alone=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(incoreres,
|
||||
[ --enable-incoreres use incore resource instead file IO to initialize MiniGUI <default=no>],
|
||||
incore_res=$enableval)
|
||||
@@ -530,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)
|
||||
@@ -630,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)
|
||||
@@ -726,8 +743,9 @@ AC_ARG_ENABLE(ctrlbidisledit,
|
||||
[ --enable-ctrlbidisledit include Single-Line BIDI EDIT control <default=no>],
|
||||
build_ctrl_bidisledit=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(ctrlnewtextedit,
|
||||
[ --disable-ctrlnewtextedit include the new implementation of TEXTEDIT control <default=yes>],
|
||||
dnl enable new textedit
|
||||
AC_ARG_ENABLE(newtextedit,
|
||||
[ --enable-ctrlnewtextedit include the new implementation of TEXTEDIT control <default=yes>],
|
||||
build_ctrl_textedit_new=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(ctrllistbox,
|
||||
@@ -827,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([
|
||||
@@ -839,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"
|
||||
@@ -849,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"
|
||||
@@ -891,7 +909,7 @@ dnl CheckPCXVFB
|
||||
[Define if include PC Virtual FrameBuffer NEWGAL engine])
|
||||
VIDEO_SUBDIRS="$VIDEO_SUBDIRS pcxvfb"
|
||||
VIDEO_DRIVERS="$VIDEO_DRIVERS pcxvfb/libvideo_pcxvfb.la"
|
||||
else
|
||||
else
|
||||
if test "x$enable_video_rtos_xvfb" = "xyes"; then
|
||||
dnl CheckRTOSXVFB
|
||||
AC_DEFINE(_MGGAL_RTOSXVFB, 1,
|
||||
@@ -1092,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([
|
||||
@@ -1102,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"
|
||||
@@ -1114,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
|
||||
@@ -1397,18 +1415,12 @@ case "$with_libsuffix" in
|
||||
esac
|
||||
|
||||
AC_ARG_WITH(osname,
|
||||
[ --with-osname=linux/uclinux/ecos/ucos2/swlinux/vxworks/win32/darwin/threadx/cygwin/nucleus/ose/psos/rtems])
|
||||
[ --with-osname=linux/uclinux/ecos/ucos2/swlinux/vxworks/win32/darwin/threadx/cygwin/nucleus/ose/psos])
|
||||
|
||||
dnl configure.in file is used only for the following OSes: linux/uclinux/swlinux/ecos/darwin/cygwin
|
||||
dnl for other OSes, you should use makefile.ng or else.
|
||||
|
||||
case "$with_osname" in
|
||||
rtems)
|
||||
AC_DEFINE(__RTEMS__, 1,
|
||||
[Define if compile for rtems])
|
||||
AC_DEFINE(__NOUNIX__, 1,
|
||||
[Define if compile for non-UNIX like OS])
|
||||
;;
|
||||
uclinux)
|
||||
AC_DEFINE(__uClinux__, 1,
|
||||
[Define if compile for uClinux])
|
||||
@@ -1512,10 +1524,6 @@ AC_ARG_WITH(targetname,
|
||||
S3C6410/S3C2440/S3C2410/hi3560a Define the target board name])
|
||||
|
||||
case "$with_targetname" in
|
||||
external)
|
||||
AC_DEFINE(__TARGET_EXTERNAL__, 1,
|
||||
[Define for targets which use GAL and/or IAL engines and define the interfaces externally])
|
||||
;;
|
||||
fmsoft)
|
||||
AC_DEFINE(__TARGET_FMSOFT__, 1,
|
||||
[Define for FMSoft internal use])
|
||||
@@ -1980,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)
|
||||
@@ -2026,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])
|
||||
@@ -2209,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])
|
||||
@@ -2462,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);
|
||||
+2
-2
@@ -11,8 +11,8 @@ COMM_HDRS = \
|
||||
common.h endianrw.h fixedmath.h \
|
||||
minigui.h gdi.h window.h control.h \
|
||||
own_malloc.h own_stdio.h \
|
||||
xvfb.h customial.h exstubs.h \
|
||||
dti.c
|
||||
xvfb.h customial.h \
|
||||
dti.c
|
||||
|
||||
UCOSII_HDRS=ucos2_pthread.h ucos2_semaphore.h
|
||||
THREADX_HDRS=threadx_pthread.h threadx_semaphore.h
|
||||
|
||||
+157
-104
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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -871,7 +871,7 @@ typedef LVNM_ITEMRUP *PLVNM_ITEMRUP;
|
||||
*/
|
||||
#define LVM_GETITEMSTATE 0xF128
|
||||
|
||||
/*
|
||||
/**
|
||||
* \def LVM_GETSELECTEDCOLUMN
|
||||
* \brief Retrieves the index of the currently selected column of a listview.
|
||||
*
|
||||
|
||||
+14
-14
@@ -51,6 +51,11 @@
|
||||
#ifndef GUI_IAL_CUSTOM_H
|
||||
#define GUI_IAL_CUSTOM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define IAL_MOUSE_LEFTBUTTON 1
|
||||
#define IAL_MOUSE_RIGHTBUTTON 2
|
||||
#define IAL_MOUSE_MIDDLEBUTTON 4
|
||||
@@ -62,12 +67,12 @@
|
||||
#define IAL_MOUSEEVENT 1
|
||||
#define IAL_KEYEVENT 2
|
||||
|
||||
typedef struct tagINPUT {
|
||||
typedef struct tagINPUT
|
||||
{
|
||||
char* id;
|
||||
|
||||
// Initialization and termination
|
||||
BOOL (*init_input) (struct tagINPUT *input, const char* mdev,
|
||||
const char* mtype);
|
||||
BOOL (*init_input) (struct tagINPUT *input, const char* mdev, const char* mtype);
|
||||
void (*term_input) (void);
|
||||
|
||||
// Mouse operations
|
||||
@@ -87,26 +92,21 @@ typedef struct tagINPUT {
|
||||
void (*set_leds) (unsigned int leds);
|
||||
|
||||
// Event
|
||||
int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out,
|
||||
int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out,
|
||||
fd_set *except, struct timeval *timeout);
|
||||
|
||||
char mdev [MAX_PATH + 1];
|
||||
} INPUT;
|
||||
}INPUT;
|
||||
|
||||
#ifdef _MGIAL_CUSTOM
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
|
||||
void TermCustomInput (void);
|
||||
extern BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
|
||||
extern void TermCustomInput (void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGIAL_CUSTOM */
|
||||
|
||||
#endif /* GUI_IAL_CUSTOM_H */
|
||||
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
/**
|
||||
* \file exstubs.h
|
||||
* \author Wei Yongming <vincent@minigui.org>
|
||||
* \date 2019/04/07
|
||||
*
|
||||
* \brief This file is the header for NEWGAL/IAL engines which should be
|
||||
* implemented by an external module.
|
||||
*
|
||||
\verbatim
|
||||
|
||||
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) 2007~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||
|
||||
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/>.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*/
|
||||
|
||||
#ifndef GUI_EXSTUBS_H
|
||||
#define GUI_EXSTUBS_H
|
||||
|
||||
/* The pixel format defined by depth */
|
||||
#define COMMLCD_PSEUDO_RGB332 1
|
||||
#define COMMLCD_TRUE_RGB555 2
|
||||
#define COMMLCD_TRUE_RGB565 3
|
||||
#define COMMLCD_TRUE_RGB888 4
|
||||
#define COMMLCD_TRUE_RGB0888 5
|
||||
#define COMMLCD_TRUE_ARGB1555 6
|
||||
#define COMMLCD_TRUE_ARGB8888 7
|
||||
#define COMMLCD_TRUE_ABRG8888 8
|
||||
|
||||
#define COMMLCD_UPDATE_NONE 0
|
||||
#define COMMLCD_UPDATE_SYNC 1
|
||||
#define COMMLCD_UPDATE_ASYNC 2
|
||||
|
||||
struct commlcd_info {
|
||||
int height; // vertical resolution of the screen
|
||||
int width; // horinzontal resolution of the screen
|
||||
int pitch; // Length of one scan line in bytes
|
||||
int bpp; // Depth (bits-per-pixel)
|
||||
int type; // Pixel type
|
||||
int update_method; // Update method: none, asynchronously, or synchronously.
|
||||
Uint8* fb; // Frame buffer
|
||||
};
|
||||
|
||||
#define COMM_MOUSEINPUT 0x01
|
||||
#define COMM_KBINPUT 0x02
|
||||
|
||||
#define COMM_MOUSELBUTTON 0x01
|
||||
#define COMM_MOUSERBUTTON 0x04
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* external stubs for COMMLCD NEWGAL engine */
|
||||
#ifdef _MGGAL_COMMLCD
|
||||
|
||||
int __commlcd_drv_init (void);
|
||||
int __commlcd_drv_getinfo (struct commlcd_info *li,
|
||||
int width, int height, int depth);
|
||||
int __commlcd_drv_release (void);
|
||||
int __commlcd_drv_setclut (int firstcolor, int ncolors, GAL_Color *colors);
|
||||
int __commlcd_drv_update (const RECT* rc_dirty);
|
||||
|
||||
#endif /* _MGGAL_COMMLCD */
|
||||
|
||||
#ifdef _MGIAL_COMM
|
||||
|
||||
int __comminput_init (void);
|
||||
int __comminput_ts_getdata (short *x, short *y, short *button);
|
||||
int __comminput_kb_getdata (short *key, short *status);
|
||||
int __comminput_wait_for_input (struct timeval *timeout);
|
||||
void __comminput_deinit (void);
|
||||
|
||||
#endif /* _MGIAL_COMM */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* GUI_EXSTUBS_H */
|
||||
|
||||
+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 */
|
||||
|
||||
+5856
-1889
File diff suppressed because it is too large
Load Diff
+713
-415
File diff suppressed because it is too large
Load Diff
+1015
-1014
File diff suppressed because it is too large
Load Diff
+13
-2
@@ -14,6 +14,7 @@ include $(abs_top_srcdir)/$(TARGET_RULES)
|
||||
# Flags that can be set on the nmake command line:
|
||||
# DEBUG=1 for compiling a debugging version
|
||||
# PREFIX=Some/Directory Base directory for installation
|
||||
# CONFIGH=YourConfigHeader for defining the mgconfig.h file to use
|
||||
|
||||
ifndef DEBUG
|
||||
DEBUG=0
|
||||
@@ -36,6 +37,8 @@ docdir = $(datadir)/doc/minigui
|
||||
|
||||
# The directory where the include files will be installed
|
||||
libminiguiincludedir = $(includedir)/minigui
|
||||
libmgextincludedir = $(includedir)/minigui
|
||||
|
||||
|
||||
# Programs used by "make":
|
||||
CP = cp
|
||||
@@ -90,6 +93,14 @@ TIFF_LIBS = $(TIFF_NOLZW_LIBS)
|
||||
ZLIB_CFLAGS = -I $(ZLIB)
|
||||
ZLIB_LIBS = $(ZLIB)/zlib.lib
|
||||
|
||||
ifdef COMPILE_MGEXTLIB
|
||||
MGEXT_CFLAGS = -D__MGEXT_LIB__
|
||||
else
|
||||
MGEXT_CFLAGS =
|
||||
endif
|
||||
|
||||
MG_PRE_DEFINES = -D__MINIGUI_LIB__ $(MGEXT_CFLAGS)
|
||||
|
||||
#################################################################################
|
||||
|
||||
ifdef LOCAL_INC
|
||||
@@ -108,10 +119,10 @@ endif
|
||||
|
||||
DEPLIBINC = -I$(DEPLIBDIR)/include
|
||||
|
||||
CFLAGS += $(OPTIMIZE) $(DEBUGINFO) $(DEPLIBINC) $(DEFINES) $(DEPCFLAGS) -c
|
||||
CFLAGS += $(OPTIMIZE) $(DEBUGINFO) $(DEPLIBINC) $(INCLUDES) $(DEFINES) $(DEPCFLAGS) $(MG_PRE_DEFINES) -c
|
||||
|
||||
DEFS += -D__MINIGUI_LIB__ -D_REENTRANT
|
||||
CFLAGS += -I$(abs_top_srcdir) -I$(abs_top_srcdir)/include -I$(abs_top_srcdir)/src/include $(INCLUDES) $(DEFS) $(INCS)
|
||||
CFLAGS += -I$(abs_top_srcdir) $(INCLUDES) $(DEFS) $(INCS)
|
||||
|
||||
%.$(OBJ): %.c
|
||||
$(CC) $(CFLAGS) $(COFLAG) $<
|
||||
|
||||
+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
+168
-168
File diff suppressed because it is too large
Load Diff
+189
-189
File diff suppressed because it is too large
Load Diff
+217
-217
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)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
abs_top_srcdir=../..
|
||||
LOCAL_INC=-I$(abs_top_srcdir)/src/control/
|
||||
|
||||
include Makefile.am
|
||||
include ../../rules.make
|
||||
|
||||
+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
+291
-92
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
|
||||
|
||||
+36
-56
@@ -43,40 +43,28 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef _MGFONT_TTF_CACHE
|
||||
#if defined(_MGFONT_FT2) && defined(_MGFONT_TTF_CACHE)
|
||||
|
||||
#include "minigui.h"
|
||||
#include "gdi.h"
|
||||
|
||||
#ifdef _MGFONT_TTF
|
||||
#include <freetype/freetype.h>
|
||||
#include <freetype/ftxkern.h>
|
||||
#include <freetype/ftnameid.h>
|
||||
#include <freetype/ftxcmap.h>
|
||||
#include <freetype/ftxwidth.h>
|
||||
#include "freetype.h"
|
||||
#else
|
||||
#include "freetype2.h"
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _MemBlk
|
||||
{
|
||||
typedef struct _MemBlk {
|
||||
void *data;
|
||||
int len;
|
||||
struct _MemBlk *hashPrev;
|
||||
struct _MemBlk *hashNext;
|
||||
struct _MemBlk *lruPrev;
|
||||
struct _MemBlk *lruNext;
|
||||
}MemBlk;
|
||||
} MemBlk;
|
||||
|
||||
typedef MemBlk LruQueueDummyHead;
|
||||
typedef MemBlk HashQueueDummyHead;
|
||||
|
||||
/* hash directory array in every cache */
|
||||
typedef struct _HashDirectory
|
||||
{
|
||||
typedef struct _HashDirectory {
|
||||
HashQueueDummyHead hashHead;
|
||||
}HashDirectory;
|
||||
} HashDirectory;
|
||||
|
||||
/* The structure is description of Cache
|
||||
blkSize : the size of each block in cache(in byte)
|
||||
@@ -88,14 +76,12 @@ typedef struct _HashDirectory
|
||||
*hashDir : the hash directory pointer
|
||||
lruQueueDummyHead : head node of lru queue
|
||||
makeHashKeyFunc : the function which make hash key */
|
||||
typedef struct cache
|
||||
{
|
||||
typedef struct _FontCache {
|
||||
/* Information about font */
|
||||
char df_name[LEN_UNIDEVFONT_NAME + 1];
|
||||
int style;
|
||||
int fontsize;
|
||||
int rotation;
|
||||
|
||||
int refers;
|
||||
int blkSize;
|
||||
int nBlk;
|
||||
@@ -105,7 +91,7 @@ typedef struct cache
|
||||
HashDirectory *hashDir;
|
||||
LruQueueDummyHead lruQueueDummyHead;
|
||||
MakeHashKeyFunc makeHashKeyFunc;
|
||||
}cache_t;
|
||||
} FontCache;
|
||||
|
||||
/* Least-Recently-Used-Order
|
||||
global cache LRU queue */
|
||||
@@ -113,7 +99,7 @@ typedef struct _CacheQueueNode
|
||||
{
|
||||
/* hold global cache queue
|
||||
max cache node maybe 10 */
|
||||
cache_t cache;
|
||||
FontCache cache;
|
||||
struct _CacheQueueNode *prevCache;
|
||||
struct _CacheQueueNode *nextCache;
|
||||
}CacheQueueNode;
|
||||
@@ -126,8 +112,7 @@ typedef struct _CacheQueueNode
|
||||
cacheSize : each cache's size(in BYTE and
|
||||
everyone has the same size!)
|
||||
nCache : how many cache Now!! */
|
||||
struct _CacheSystem
|
||||
{
|
||||
struct _CacheSystem {
|
||||
CacheQueueNode queueDummyHead;
|
||||
|
||||
int maxCache;
|
||||
@@ -152,7 +137,7 @@ AppendCache(CacheQueueNode *new)
|
||||
|
||||
/* create a new LRU-Queue. */
|
||||
static int
|
||||
CreateCacheLruQueue(cache_t *cache, int nblk)
|
||||
CreateCacheLruQueue(FontCache *cache, int nblk)
|
||||
{
|
||||
int i;
|
||||
MemBlk *blk;
|
||||
@@ -224,7 +209,7 @@ InitCache(CacheQueueNode *new, int ndir, int nblock)
|
||||
|
||||
|
||||
static void
|
||||
LruQueueBufferSplit(cache_t *cache, int bufsize)
|
||||
LruQueueBufferSplit(FontCache *cache, int bufsize)
|
||||
{
|
||||
MemBlk *blk;
|
||||
unsigned char *buff;
|
||||
@@ -239,7 +224,7 @@ LruQueueBufferSplit(cache_t *cache, int bufsize)
|
||||
}
|
||||
|
||||
static void
|
||||
DestroyCache(cache_t *cache)
|
||||
DestroyCache(FontCache *cache)
|
||||
{
|
||||
if (cache->hashDir != NULL) {
|
||||
free(cache->hashDir);
|
||||
@@ -328,7 +313,7 @@ GetCache(int nblock, int ndir)
|
||||
lru-queue and also Hash queue(anywhere in hash q).
|
||||
Relink the lru queue and hash queue */
|
||||
static MemBlk *
|
||||
PickOffBlk(cache_t *cache)
|
||||
PickOffBlk(FontCache *cache)
|
||||
{
|
||||
MemBlk *blk;
|
||||
|
||||
@@ -355,7 +340,7 @@ PickOffBlk(cache_t *cache)
|
||||
}
|
||||
|
||||
static void
|
||||
AppendBlk(cache_t *cache, MemBlk *blk, int key)
|
||||
AppendBlk(FontCache *cache, MemBlk *blk, int key)
|
||||
{
|
||||
/* first, append the blcok at the end of the
|
||||
lru-queue. */
|
||||
@@ -384,7 +369,7 @@ AppendBlk(cache_t *cache, MemBlk *blk, int key)
|
||||
*size : if found the data, how long is the data(return val)
|
||||
reutrn = pointer to the data */
|
||||
TTFCACHEINFO *
|
||||
__mg_ttc_search(HCACHE hCache, UChar32 unicode, int *size)
|
||||
__mg_ttc_search(HCACHE hCache, Glyph32 gv, int *size)
|
||||
{
|
||||
int key;
|
||||
CacheQueueNode *ca;
|
||||
@@ -394,7 +379,7 @@ __mg_ttc_search(HCACHE hCache, UChar32 unicode, int *size)
|
||||
return NULL;
|
||||
}
|
||||
ca = (CacheQueueNode *)(hCache);
|
||||
key = ca->cache.makeHashKeyFunc(unicode);
|
||||
key = ca->cache.makeHashKeyFunc(gv);
|
||||
if (key > (ca->cache.nDir - 1)) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -402,8 +387,8 @@ __mg_ttc_search(HCACHE hCache, UChar32 unicode, int *size)
|
||||
|
||||
for ( ; blk != &(ca->cache.hashDir[key].hashHead);
|
||||
blk = blk->hashNext) {
|
||||
TTFCACHEINFO * tci = (TTFCACHEINFO *)blk->data;
|
||||
if (tci->unicode == unicode) {
|
||||
TTFCACHEINFO* tci = (TTFCACHEINFO*)blk->data;
|
||||
if (tci->glyph_code == gv) {
|
||||
/* If found the blk, we should pick off it
|
||||
and link it at the end of LRU-q */
|
||||
*size = blk->len;
|
||||
@@ -416,15 +401,15 @@ __mg_ttc_search(HCACHE hCache, UChar32 unicode, int *size)
|
||||
return tci;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* add data into a speicial cache
|
||||
/* add data into the specific cache
|
||||
hCache : which cache ,
|
||||
*data : your data pointer
|
||||
size : your data's bytes
|
||||
key : hash key of your data */
|
||||
key : hash key of your data
|
||||
*/
|
||||
int
|
||||
__mg_ttc_write(HCACHE hCache, TTFCACHEINFO *data, int size)
|
||||
{
|
||||
@@ -439,7 +424,7 @@ __mg_ttc_write(HCACHE hCache, TTFCACHEINFO *data, int size)
|
||||
if (ca->cache.blkSize < size) {
|
||||
return -1;
|
||||
}
|
||||
key = ca->cache.makeHashKeyFunc(data->unicode);
|
||||
key = ca->cache.makeHashKeyFunc(data->glyph_code);
|
||||
|
||||
/* pick off a block from lru queue */
|
||||
if ((blk = PickOffBlk(&ca->cache)) == NULL) {
|
||||
@@ -462,12 +447,12 @@ __mg_ttc_write(HCACHE hCache, TTFCACHEINFO *data, int size)
|
||||
|
||||
/* create a cache for a font instance.
|
||||
nblk : how many block in the cache.
|
||||
blks ize : each block's size
|
||||
blksize : each block's size
|
||||
ndir : how many hash entries in the cache
|
||||
makeHashKey : the function which make the hash key */
|
||||
HCACHE
|
||||
__mg_ttc_create(const char *df_name, int style, int size, int rotation,
|
||||
int nblk, int blksize, int ndir, MakeHashKeyFunc makeHashKey)
|
||||
int nblk, int blksize, int ndir, MakeHashKeyFunc makeHashKey)
|
||||
{
|
||||
CacheQueueNode *temp;
|
||||
if (df_name == NULL || makeHashKey == NULL) {
|
||||
@@ -486,7 +471,7 @@ __mg_ttc_create(const char *df_name, int style, int size, int rotation,
|
||||
|
||||
memset(temp->cache.df_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
||||
strncpy(temp->cache.df_name, df_name, LEN_UNIDEVFONT_NAME);
|
||||
temp->cache.style = style;
|
||||
temp->cache.style = style & FS_RENDER_MASK;
|
||||
temp->cache.fontsize = size;
|
||||
temp->cache.rotation = rotation;
|
||||
temp->cache.blkSize = blksize;
|
||||
@@ -576,8 +561,6 @@ __mg_ttc_sys_deinit(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
HCACHE
|
||||
__mg_ttc_is_exist(const char *df_name, int style, int size, int rotation)
|
||||
{
|
||||
@@ -587,17 +570,18 @@ __mg_ttc_is_exist(const char *df_name, int style, int size, int rotation)
|
||||
return (HCACHE)0;
|
||||
}
|
||||
|
||||
/* If can not match font name*/
|
||||
p = __mg_globalCache.queueDummyHead.nextCache;
|
||||
while (p != &__mg_globalCache.queueDummyHead) {
|
||||
if (strncmp(p->cache.df_name, df_name, LEN_UNIDEVFONT_NAME) == 0 &&
|
||||
p->cache.style == style &&
|
||||
p->cache.fontsize == size &&
|
||||
p->cache.rotation == rotation) {
|
||||
if (strncmp(p->cache.df_name, df_name, LEN_UNIDEVFONT_NAME) == 0
|
||||
&& p->cache.style == (style & FS_RENDER_MASK)
|
||||
&& p->cache.fontsize == size
|
||||
&& p->cache.rotation == rotation) {
|
||||
return (HCACHE) p;
|
||||
}
|
||||
|
||||
p = p->nextCache;
|
||||
}
|
||||
|
||||
return (HCACHE)0;
|
||||
}
|
||||
|
||||
@@ -650,16 +634,14 @@ void __mg_ttc_dump_all(void)
|
||||
}
|
||||
}
|
||||
|
||||
void __mg_ttc_dump(cache_t *cache)
|
||||
void __mg_ttc_dump(FontCache *cache)
|
||||
{
|
||||
int i, j, k;
|
||||
MemBlk *ptr;
|
||||
#if 0
|
||||
DP(("&cache = %p\n", cache));
|
||||
DP(("cache.df_name = %s\n", cache->df_name));
|
||||
DP(("cache.style = %d\n", cache->style));
|
||||
DP(("cache.fontsize = %d\n", cache->fontsize));
|
||||
DP(("cache.rotation = %d\n", cache->rotation));
|
||||
DP(("cache.blkSize = %d\n", cache->blkSize));
|
||||
DP(("cache.refers = %d\n", cache->refers));
|
||||
DP(("cache.nBlk = %d\n", cache->nBlk));
|
||||
@@ -684,7 +666,7 @@ void __mg_ttc_dump(cache_t *cache)
|
||||
printf("hash[%d]:", i);
|
||||
p = (cache->hashDir)[i].hashHead.hashNext;
|
||||
while(p != &(cache->hashDir[i].hashHead)) {
|
||||
printf("-->%d(%d)", *(UChar32 *)(p->data), p->len);
|
||||
printf("-->%d(%d)", *(unsigned short *)(p->data), p->len);
|
||||
p = p->hashNext;
|
||||
}
|
||||
printf("\n");
|
||||
@@ -695,7 +677,7 @@ void __mg_ttc_dump(cache_t *cache)
|
||||
ptr = cache->lruQueueDummyHead.lruNext;
|
||||
for ( ; ptr != &cache->lruQueueDummyHead; ptr = ptr->lruNext) {
|
||||
DP(("-->%p(len:%d, data:%d)",
|
||||
ptr, ptr->len, *(UCha32 *)(ptr->data)));
|
||||
ptr, ptr->len, *(unsigned short *)(ptr->data)));
|
||||
}
|
||||
//printf("\n");
|
||||
}
|
||||
@@ -704,7 +686,6 @@ void
|
||||
__mg_ttc_dump_cacheinfo(TTFCACHEINFO *ca)
|
||||
{
|
||||
DP(("Dump TTFCACHEINFO %p...\n", ca));
|
||||
DP(("cacheInfo->unicode = %d\n", ca->unicode));
|
||||
DP(("cacheInfo->glyph_code = %d\n", ca->glyph_code));
|
||||
|
||||
DP(("cacheInfo->cur_xmin = %d, cacheInfo->cur_ymin = %d\n",
|
||||
@@ -723,7 +704,6 @@ void
|
||||
__mg_ttc_dump_instance(TTFINSTANCEINFO *in)
|
||||
{
|
||||
DP(("Dump TTFINSTANCEINFO %p...\n", in));
|
||||
DP(("Instance->cur_unicode = %d\n", in->cur_unicode));
|
||||
DP(("Instance->cur_glyph_code = %d\n", in->cur_glyph_code));
|
||||
DP(("Instance->outline(addr) = %p\n", &in->cur_outline));
|
||||
DP(("Instance->cur_xmin = %d, Instance->cur_ymin = %d\n",
|
||||
@@ -740,5 +720,5 @@ __mg_ttc_dump_instance(TTFINSTANCEINFO *in)
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
#endif /* _MGFONT_TTF_CACHE */
|
||||
#endif /* defined(_MGFONT_FT2) && defined(_MGFONT_TTF_CACHE) */
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user