Compare commits

..
Author SHA1 Message Date
Vincent Wei 1cfd25b317 fix minor bugs 2020-02-19 22:01:17 +08:00
Vincent Wei 2d5ad370f3 change link to licensing policy 2019-11-13 11:59:45 +08:00
Vincent Wei 684c4248d2 check AARCH64 and RISCV architectures 2019-11-04 08:49:38 +08:00
Vincent Wei 0373c77323 tune 2019-10-31 11:42:47 +08:00
Vincent Wei 56fd0a1050 release version 3.2.3 2019-10-31 11:28:20 +08:00
Vincent Wei fbba2ebd1a cleanup 2019-10-31 10:46:47 +08:00
Vincent Wei 33b3ad0bd3 clean code for 64-bit 2019-10-31 10:44:40 +08:00
Vincent Wei 9bee00cf9f remove targetname movidius 2019-10-31 10:26:14 +08:00
Vincent Wei aedcffacf7 cleanup 2019-10-31 10:23:12 +08:00
Vincent Wei c91eeddd2c cleanup 2019-10-31 10:15:42 +08:00
Vincent Wei 2ac54f9ee6 cleanup for new release 2019-10-31 10:02:18 +08:00
Vincent Wei 20f160074f Change version to 3.2.3 2019-10-31 09:55:06 +08:00
Vincent Wei 437769c1a4 use #ifdef instead of #if for HAVE_LIMITS_H 2019-10-31 09:53:26 +08:00
Vincent Wei 69eebf37e3 use HAVE_LIMITS_H for the system header <limits.h> 2019-10-31 09:50:09 +08:00
Vincent Wei 4ea6912024 clean up new code for supporting RTEMS 2019-10-31 09:38:25 +08:00
gengyue 6b2039c151 for rtems 2019-10-31 08:55:47 +08:00
gengyue d7eed07222 for rtems 2019-10-31 08:55:17 +08:00
gengyue 6f033d8e93 for rtems 2019-10-31 08:46:47 +08:00
gengyue 193f5e58b1 add socklen_t 2019-10-31 08:39:55 +08:00
Vincent Wei 75dabce7af tune for minigui-docs 2019-10-23 19:09:21 +08:00
Vincent Wei 2149a6aa5e restore build/rules-pc.linux and fix errors in makefile.ng files 2019-10-18 15:43:38 +08:00
Vincent Wei bf8a9fee5c remove standalone option 2019-10-17 16:41:47 +08:00
Vincent Wei 8556f15e36 Exception List Statement 2019-07-15 14:42:46 +08:00
Vincent Wei 57215b9e59 add *.in~ 2019-06-06 10:55:59 +08:00
Vincent Wei 6201664035 remove getpt from function checking list 2019-06-06 10:19:19 +08:00
Vincent Wei 7303f40b2e add static for inline function to avoid duplicated definitions when using old GCC 2019-06-06 10:18:35 +08:00
Vincent Wei 42b10aed6a optimize ThrowAwayMessages 2019-05-16 10:22:37 +08:00
Vincent Wei d9dc070698 change binary age to 2 2019-04-29 18:51:57 +08:00
Vincent Wei ee5a1f86a7 fixbug of FT2 subpixel glyph rendering 2019-04-29 17:34:45 +08:00
gengyue d335e008ad modified for rtems 2019-04-24 20:10:36 +08:00
gengyue 268695a94b modified for rtems 2019-04-24 19:56:20 +08:00
Vincent Wei 1d211ed855 cleanup 2019-04-15 16:28:50 +08:00
Vincent Wei a7eaab6d38 use inline functions for --disable-cursor instead of macros 2019-04-15 16:26:22 +08:00
Vincent Wei 7d671c8318 tune release notes for LoadDevFontFromFile 2019-04-15 15:57:58 +08:00
Vincent Wei 76f4bf3661 add const to INNER_RES 2019-04-15 15:54:39 +08:00
Vincent Wei 4f51baac32 tune 2019-04-15 10:12:25 +08:00
Vincent Wei 4fa002216e tune release notes 2019-04-12 15:49:42 +08:00
Vincent Wei 6dc8696c08 Remove char_type and bidi_type from GLYPHINFO 2019-04-12 15:41:23 +08:00
Vincent Wei 06c497d671 tune 2019-04-12 14:39:02 +08:00
Vincent Wei 79267be62c use sys/sysmacros.h for makedev 2019-04-11 17:36:02 +08:00
Vincent Wei 9475ff227f add LoadDevFontFromIncoreData 2019-04-09 10:57:30 +08:00
Vincent Wei f562661146 use 0xff for alpha of RGB2Pixel 2019-04-09 10:47:38 +08:00
Vincent Wei eca15c447d check li.bpp with the requested bpp 2019-04-08 13:48:16 +08:00
Vincent Wei 736a532b1a use standard pixel format for alpha_pixel_format 2019-04-07 17:16:53 +08:00
Vincent Wei 5a0fc2e74f tune 2019-04-07 16:25:43 +08:00
Vincent Wei 12106c036c tune 2019-04-07 16:13:17 +08:00
Vincent Wei debd8a3fdd introduce exstubs.h header file to define the interfaces for commlcd NEWGAL engine, comm IAL engine, and custom IAL engine 2019-04-07 16:09:39 +08:00
Vincent Wei ac6d4019d5 fix typo 2019-04-06 13:58:49 +08:00
Vincent Wei 61dd46f965 handle SIGINT 2019-04-06 13:55:19 +08:00
Vincent Wei 3f53804f62 fix bugs 2019-03-31 15:38:39 +08:00
Vincent Wei f8e9dea491 tune release notes 2019-03-04 17:07:03 +08:00
Vincent Wei 8943cc75ec italic enabled for subpixeled glyph 2019-03-04 17:01:08 +08:00
Vincent Wei ebf765f4ad only override BITMAP size for monobitmap 2019-03-04 16:58:08 +08:00
Vincent Wei 3b61f25bb5 merge some changes from dev-3-4 for fix some bugs about freetype2 font engine and vbf font engine. 2019-03-04 12:55:09 +08:00
Vincent Wei ea20032dae fix a potential bug: reserve key when creating logfont by calling CreateLogFontIndirect 2019-01-19 14:06:18 +08:00
Vincent Wei 9245091b87 tune 2019-01-15 17:17:48 +08:00
1083 changed files with 32564 additions and 160365 deletions
+2
View File
@@ -0,0 +1,2 @@
Beijing FMSoft Technologies Co., Ltd.. (http://www.fmsoft.cn)
-16
View File
@@ -1,16 +0,0 @@
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
+4 -4
View File
@@ -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_char_type to return
08/24: ENHANCEMENT #1: Add a new method for FONTOPS: get_glyph_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.
@@ -4984,11 +4984,11 @@ provide the function whether the file exist or not.(xwyan)
* src/server/request.c
10/24. MODIFICATION: Use 1980/01/01 00:00:00 to return the default local time
for __mg_os_localtime.
for __mg_localtime.
* src/misc/nposix.c
10/24. MODIFICATION: Use HAVE_TIME, HAVE_MKTIME, and HAVE_LOCALTIME to define
__mg_os_time, __mg_os_mktime, and __mg_os_localtime functions.
__mg_time, __mg_mktime, and __mg_localtime functions.
* configure.in
* src/misc/nposix.c
+5 -10
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Processes)"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.0.4
PROJECT_NUMBER = v3.2.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
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-procs-4.0.4
OUTPUT_DIRECTORY = doc
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -782,7 +782,6 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.
INPUT = ./include
INPUT += README.md
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -940,7 +939,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE = README.md
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1289,7 +1288,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_FILE =
CHM_FILE =
# The HHC_LOCATION tag can be used to specify the location (absolute path
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
@@ -2074,7 +2073,6 @@ PREDEFINED = _MGRM_PROCESSES \
_MGMISC_SAVEBITMAP \
_MGHAVE_CURSOR \
_MGCHARSET_UNICODE \
_MGCOMPLEX_SCRIPTS \
_MGCTRL_STATIC \
_MGCTRL_SLEDIT \
_MGCTRL_BIDISLEDIT \
@@ -2101,10 +2099,7 @@ PREDEFINED = _MGRM_PROCESSES \
_MGCTRL_ANIMATION \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
_MGFONT_BMPF
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
+5 -10
View File
@@ -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 = v4.0.4
PROJECT_NUMBER = v3.2.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
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-sa-4.0.4
OUTPUT_DIRECTORY = doc
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -782,7 +782,6 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.
INPUT = ./include
INPUT += README.md
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -940,7 +939,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE = README.md
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1289,7 +1288,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_FILE =
CHM_FILE =
# The HHC_LOCATION tag can be used to specify the location (absolute path
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
@@ -2074,7 +2073,6 @@ PREDEFINED = _MGRM_STANDALONE \
_MGMISC_SAVEBITMAP \
_MGHAVE_CURSOR \
_MGCHARSET_UNICODE \
_MGCOMPLEX_SCRIPTS \
_MGCTRL_STATIC \
_MGCTRL_SLEDIT \
_MGCTRL_BIDISLEDIT \
@@ -2101,10 +2099,7 @@ PREDEFINED = _MGRM_STANDALONE \
_MGCTRL_ANIMATION \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
_MGFONT_BMPF
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
+5 -10
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Threads)"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.0.4
PROJECT_NUMBER = v3.2.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
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-ths-4.0.4
OUTPUT_DIRECTORY = doc
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -782,7 +782,6 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.
INPUT = ./include
INPUT += README.md
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -940,7 +939,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE = README.md
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1289,7 +1288,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_FILE =
CHM_FILE =
# The HHC_LOCATION tag can be used to specify the location (absolute path
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
@@ -2074,7 +2073,6 @@ PREDEFINED = _MGRM_THREADS \
_MGMISC_SAVEBITMAP \
_MGHAVE_CURSOR \
_MGCHARSET_UNICODE \
_MGCOMPLEX_SCRIPTS \
_MGCTRL_STATIC \
_MGCTRL_SLEDIT \
_MGCTRL_BIDISLEDIT \
@@ -2101,10 +2099,7 @@ PREDEFINED = _MGRM_THREADS \
_MGCTRL_ANIMATION \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
_MGFONT_BMPF
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
+12 -13
View File
@@ -1,10 +1,11 @@
SUBDIRS = src 3rd-party include rtos etc m4 cmake build
EXTRA_DIST = minigui.pc.in \
EXTRA_DIST = \
minigui.pc.in \
GNUmakefile makefile.ng makefile.msvc rules.make \
Version INSTALL LICENSE \
README.md RELEASE-NOTES.md \
LICENSE-POLICY-en.md LICENSE-POLICY-zh.md
LICENSE-POLICY-en.md LICENSE-POLICY-zh.md
# The directory where the include files will be installed
libminiguiincludedir = $(includedir)/minigui
@@ -12,17 +13,15 @@ libminiguiincludedir = $(includedir)/minigui
# Which header files to install
libminiguiinclude_HEADERS = mgconfig.h
docs:
doxygen Doxyfile.procs Doxyfile.ths Doxyfile.sa
dist-nolicense: dist
./clean_license.sh $(DIST_ARCHIVES)
dist:
distcheck-nolicense:dist-nolicense distcheck
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = minigui.pc
docs:
doxygen Doxyfile.procs
doxygen Doxyfile.ths
doxygen Doxyfile.sal
#dist-nolicense: dist
# ./clean_license.sh $(DIST_ARCHIVES)
#
#dist:
#distcheck-nolicense:dist-nolicense distcheck
+150 -196
View File
@@ -2,30 +2,26 @@
A mature and proven cross-platform GUI system for embedded and smart IoT devices.
## TABLE OF CONTENTS
- [INTRODUCTION](#introduction)
- [A BRIEF BUILDING INSTRUCTION](#a-brief-building-instruction)
* [Prerequisites](#prerequisites)
* [Building MiniGUI Core](#building-minigui-core)
* [Building the Comprehensive Demo](#building-the-comprehensive-demo)
* [Unit Tests](#unit-tests)
- [NEW FEATURES IN VERSION 4.0.x](#new-features-in-version-40x)
- [NEW FEATURES IN VERSION 3.2.x](#new-features-in-version-32x)
- [THE RUNTIME MODES OF MINIGUI](#the-runtime-modes-of-minigui)
- [HISTORY](#history)
- [AUTHORS AND COPYING](#authors-and-copying)
* [Not Free for Commercial Use](#not-free-for-commercial-use)
* [Special Statement](#special-statement)
- [A LITTLE FAQ](#a-little-faq)
1. Introduction
1. A brief building instruction
1. New features in version 3.2.x
1. The runtime modes of MiniGUI
1. History
1. About the authors
1. If you have a problem
1. A little FAQ
1. Not free for commercial use
1. Copying
## INTRODUCTION
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 4.0.x of MiniGUI maintained by WEI Yongming.
This is the version 3.2.x of MiniGUI maintained by WEI Yongming
(Vincent Wei, <https://github.com/VincentWei>).
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial
use.
@@ -33,8 +29,8 @@ 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 RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX,
Nucleus, pSOS, uC/OS-II, and OSE.
traditional RTOSes, such as RTEMS, 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).
@@ -49,12 +45,14 @@ for the developers to develop app much easier:
* 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
touch screens.
a touch screen.
There are also some legacy MiniGUI components. But we will not maintain these
components since MiniGUI v3.2.0:
There are also some legacy MiniGUI components. We will not maintain these
components for MiniGUI 3.2.x:
* mGi: An input method component for MiniGUI. This component provides
some typical input methods (such as soft keyboard, hand-writing, and predict
@@ -104,23 +102,23 @@ We now maintain all documents about MiniGUI on the following public repo:
<https://github.com/VincentWei/minigui-docs>
## A BRIEF BUILDING INSTRUCTION
This instruction assumes that you are using Ubuntu Linux.
### Prerequisites
You should run `apt install <package_name>` to install the following packages
on your Ubuntu Linux.
You can run `apt install <package_name>` to install the software on Ubuntu Linux.
* Building tools:
* autoconf
* Dependent libraries (all are optional):
* libjpeg64-dev
* libpng12-dev (use libpng-dev on Ubuntu Linux 18.04 LTS)
* libpng12-dev
* libfreetype6-dev
### Building MiniGUI Core
### Building
MiniGUI core uses GNU autoconf/automake scripts to configure and build the project.
@@ -140,94 +138,36 @@ For more information, please run
$ ./configure --help
### Building the Comprehensive Demo
If you are anxious to see the comprehensive demo of MiniGUI core
and MiniGUI components, please fetch one of the following repositories
from GitHub and follow the instructions to build the samples and
the demonstration programs:
https://github.com/VincentWei/build-minigui-4.0
or
https://github.com/VincentWei/build-minigui-3.2
### Unit Tests
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
following repository:
https://github.com/VincentWei/mg-tests
If you are interested in hacking the MiniGUI code, please visit this repository.
## NEW FEATURES IN VERSION 4.0.x
In this version, we enhanced and tuned the APIs related to text rendering,
in order to support [HybridOS Foundation Class Library].
* Since 4.0.2, MiniGUI provides support for RTEMS, RT-Thread, and FreeRTOS.
* MiniGUI now provides complete APIs for Unicode characters processing.
These APIs conform to Unicode 12.0.
* MiniGUI also provides new APIs to lay out, shape, and render glyphs
from complex and mixed scripts, such as Arabic, Thai, and Indic.
* We tuned and optimized MiniGUI's logical and device font interfaces to
support the new features above.
* MiniGUI now is enhanced to support input events which may be generated
by input devices other than standard mouse (or single-touch panel) and
keyboard, such as multi-touch panel (gesture), joystick, tablet tool,
table pad, and switch. In MiniGUI 4.0, we introduce `MSG_EXIN_XXX` messages
to support the input events from devices other than standard mouse
and keyboard. We call these messages as 'extra input messages'.
* The NEWGAL engine of `dri` to support modern DRI/DRM-driven graphics cards
or GPUs on Linux.
* The IAL engine of `libinput` to support all modern input devices including
mouse, keyboard, joystick, switch, multiple touch panel, gesture, tablet tool,
and table pad on Linux.
* We introduced a Slice Memory Allocator for fast concurrent memory chunk
allocation.
* Cleanup and tune code for GCC 7.3.
For more information, please refer to `RELEASE-NOTES.md` file:
<https://github.com/VincentWei/minigui/blob/master/RELEASE-NOTES.md>
Because of the changes of some APIs, we recommended strongly that you
use this version for new projects.
## NEW FEATURES IN VERSION 3.2.x
We introduce some new features in MiniGUI Version 3.2.x:
* The support for 64-bit platform. Note that some APIs have changed
to support 64-bit platform.
* Some enhancements and optimizations.
to support 64-bit platform. For more information, please refer to
RELEASE-NOTES.md file.
For more information, please refer to `RELEASE-NOTES.md` file:
<https://github.com/VincentWei/minigui/blob/rel-3-2/RELEASE-NOTES.md>
Because of the changes of some APIs, we recommended strongly that you
use this version for new projects.
## THE RUNTIME MODES OF MINIGUI
You can configure and compile MiniGUI as one of three runtime modes:
* `MiniGUI-Threads`: A program running on MiniGUI-Threads can create
multiple cascaded windows in different threads, and all the windows
belong to a single process. MiniGUI-Threads is fit for some real-time
systems on Linux/uClinux, eCos, uC/OS-II, VxWorks, pSOS, ThreadX,
and OSE.
* 'MiniGUI-Threads': A program running on MiniGUI-Threads can create
multiple cascaded windows in different threads, and all the windows
belong to a single process. MiniGUI-Threads is fit for some real-time
systems on Linux/uClinux, eCos, uC/OS-II, VxWorks, pSOS, ThreadX,
and OSE.
* `MiniGUI-Processes`: A program running on MiniGUI-Processes is
an independent process, which can also create multiple windows.
MiniGUI-Processes is fit for some complex embedded systems, such as
PDAs, Thin-Clients or STBs. This mode is only useful for full-featured
UNIX-like operating systems, like Linux.
* 'MiniGUI-Processes': A program running on MiniGUI-Processes is
an independent process, which can also create multiple windows.
MiniGUI-Processes is fit for some complex embedded systems, such as
PDAs, Thin-Clients or STBs. This mode is only useful for full-featured
UNIX-like operating systems, like Linux.
* `MiniGUI-Standalone`: A single process version of MiniGUI. This mode
is useful for some small systems, like uClinux or RTOSes.
* 'MiniGUI-Standalone': A single process version of MiniGUI. This mode
is useful for some small systems, like uClinux or RTOSes.
The original MiniGUI (version 1.0) run in MiniGUI-Threads mode.
It is based on POSIX-compliant thread library. And this thread-based
@@ -242,7 +182,7 @@ You can use MiniGUI-Processes to run more than one MiniGUI-based
program in the form of UNIX process at the same time. MiniGUI-Processes
is a full-featured multi-process version of original MiniGUI -- You
can run a program based on MiniGUI-Processes from a program called
`mginit`. Just like X Window, the former process is called a client,
'mginit'. Just like X Window, the former process is called a client,
and the latter the server.
Clients connect to the server via UNIX domain socket, and the server
@@ -255,7 +195,7 @@ clients and the server.
## HISTORY
21 years have pasted since MiniGUI was initially created at
About ten years have pasted since MiniGUI was initially created at
the end of 1998, and now it becomes much reliable and stable.
During the past years, many remarkable changes have taken place in
the MiniGUI project.
@@ -287,78 +227,120 @@ In the development of version 3.0.x, we introduced Look & Feel Renderer,
BIDI text support, Non-rectangular window, double-buffer window, and
other main features.
In the development of version 4.0.x, we introduced the support for
complex writing systems (scripts), such as Arabic, Thai, and Indic.
A brief history description of the development progress lay below:
1. 1994 ~ 1996: MiniGUI DOS version.
1. Dec, 1998: Began to write.
1. Apr, 1999: The skeleton of MiniGUI, windowing sub-system
and basic graphics device interfaces.
1. May, 1999: Timer, menu, and the skeleton of control sub-system.
1. Jun, 1999: Chinese input method (by Kang Xiaoning).
1. July, 1999: GIF and JPG loading support (by LI Zhuo).
1. Aug, 1999: Some standard controls (Portion by Zhao Jianghua).
1. Sep, 1999: Dialog boxes and message boxes.
1. Sep, 1999: Snapshot of screen or window.
1. Jan., 2000: VCOnGUI (Virtual Console on MiniGUI) version 0.2.02.
1. Mar., 2000: Linux distribution installer based-on MiniGUI for
HappyLinux 1.0.
1. Jun., 2000: Began to develop version 1.0.xx.
1. Sep., 2000: MiniGUI version 0.3.06 released.
1. Oct., 2000: MiniGUI version 0.9.00 released.
1. Nov., 2000: MiniGUI version 0.9.96 released.
1. Jan., 2001: MiniGUI version 0.9.98 released. You can build
MiniGUI-Lite from this version.
1. Jan., 2001: MiniGUI version 1.0.00Beta1 released.
1. Feb., 2001: MiniGUI version 1.0.00Pre1 released.
1. Apr., 2001: MiniGUI version 1.0.00 released (2001/04/16).
1. Sep., 2001: MiniGUI version 1.1.0Pre1 released (2001/09/12).
1. Sep., 2001: MiniGUI version 1.0.9 released (2001/09/17),
this will be the last version of source branch 1.0.x.
1. Oct., 2001: MiniGUI version 1.1.0Pre4 released (2001/10/22).
This version have new GAL and GDI interfaces.
1. Mar., 2002: MiniGUI official version 1.1.0 released (2002/03/08).
MiniGUI API Reference documentation version 0.9 released.
1. Mar., 2002: MiniGUI API Reference documentation version 1.0 released.
1. Apr., 2002: MiniGUI the new stable version 1.2.0 released (2002/04/11).
1. Sep., 2002: The main developers of MiniGUI founded a
new software corporation: Beijing FMSoft Technology Co., Ltd..
And the development and maintenance of MiniGUI changes from
loosely-knit team to business organization.
1. Mar., 2003: MiniGUI official version 1.2.5 released (2003/03/23).
1. May., 2003: MiniGUI official version 1.2.6 released (2003/05/18).
1. Sep., 2003: MiniGUI official version 1.3.1 released (2003/09/11).
1. Jan., 2004: MiniGUI official version 1.5.1 released (2004/01/18).
1. Feb., 2004: MiniGUI tested on eCos and uC/OS-II.
1. Jun., 2004: MiniGUI tested on VxWorks.
1. Jan., 2005: MiniGUI tested on ThreadX and pSOS.
1. Feb., 2005: MiniGUI official version 1.6.1 released.
1. Aug., 2005: MiniGUI beta version 2.0.0 released.
1. Sep., 2005: MiniGUI official version 1.6.8 released.
1. Oct., 2005: MiniGUI official version 2.0.2 released.
1. Jun., 2006: MiniGUI provides support for OSE.
1. Jul., 2006: MiniGUI official version 2.0.3/1.6.9 released.
1. Nov., 2007: MiniGUI official version 2.0.4/1.6.10 released.
1. Apr., 2009: MiniGUI official version 3.0.2 released.
1. Oct., 2009: MiniGUI official version 3.0.4 released.
1. Jan., 2010: MiniGUI official version 3.0.6 released.
1. May., 2010: MiniGUI official version 3.0.8 released.
1. Aug., 2010: MiniGUI official version 3.0.10 released.
1. Oct., 2010: MiniGUI official version 3.0.12 released.
1. Aug., 2017: FMSoft released the latest source code of MiniGUI under GPL 3.0.
1. Aug., 2017: FMSoft released the latest source code of mDolphin under Apache 2.0.
1. Dec., 2017: FMSoft updated MiniGUI and miniStudio for latest Linux distributions.
1. Feb., 2018: FMSoft released MiniGUI version 3.2.0.
1. Apr., 2019: FMSoft released MiniGUI version 3.2.2.
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
0) 1994 ~ 1996: MiniGUI DOS version.
1) Dec, 1998: Began to write.
2) Apr, 1999: The skeleton of MiniGUI, windowing sub-system
and basic graphics device interfaces.
3) May, 1999: Timer, menu, and the skeleton of control sub-system.
4) Jun, 1999: Chinese input method (by Kang Xiaoning).
5) July, 1999: GIF and JPG loading support (by LI Zhuo).
6) Aug, 1999: Some standard controls (Portion by Zhao Jianghua).
7) Sep, 1999: Dialog boxes and message boxes.
8) Sep, 1999: Snapshot of screen or window.
9) Jan., 2000: VCOnGUI (Virtual Console on MiniGUI) version 0.2.02.
10) Mar., 2000: Linux distribution installer based-on MiniGUI for
HappyLinux 1.0.
11) Jun., 2000: Began to develop version 1.0.xx.
12) Sep., 2000: MiniGUI version 0.3.06 released.
13) Oct., 2000: MiniGUI version 0.9.00 released.
14) Nov., 2000: MiniGUI version 0.9.96 released.
15) Jan., 2001: MiniGUI version 0.9.98 released. You can build
MiniGUI-Lite from this version.
16) Jan., 2001: MiniGUI version 1.0.00Beta1 released.
17) Feb., 2001: MiniGUI version 1.0.00Pre1 released.
18) Apr., 2001: MiniGUI version 1.0.00 released (2001/04/16).
18) Sep., 2001: MiniGUI version 1.1.0Pre1 released (2001/09/12).
19) Sep., 2001: MiniGUI version 1.0.9 released (2001/09/17),
this will be the last version of source branch 1.0.x.
20) Oct., 2001: MiniGUI version 1.1.0Pre4 released (2001/10/22).
This version have new GAL and GDI interfaces.
21) Mar., 2002: MiniGUI official version 1.1.0 released (2002/03/08).
MiniGUI API Reference documentation version 0.9 released.
22) Mar., 2002: MiniGUI API Reference documentation version 1.0 released.
23) Apr., 2002: MiniGUI the new stable version 1.2.0 released (2002/04/11).
24) Sep., 2002: The main developers of MiniGUI founded a
new software corporation: Beijing FMSoft Technology Co., Ltd..
And the development and maintenance of MiniGUI changes from
loosely-knit team to business organization.
25) Mar., 2003: MiniGUI official version 1.2.5 released (2003/03/23).
25) May., 2003: MiniGUI official version 1.2.6 released (2003/05/18).
26) Sep., 2003: MiniGUI official version 1.3.1 released (2003/09/11).
27) Jan., 2004: MiniGUI official version 1.5.1 released (2004/01/18).
28) Feb., 2004: MiniGUI tested on eCos and uC/OS-II.
29) Jun., 2004: MiniGUI tested on VxWorks.
30) Jan., 2005: MiniGUI tested on ThreadX and pSOS.
31) Feb., 2005: MiniGUI official version 1.6.1 released.
32) Aug., 2005: MiniGUI beta version 2.0.0 released.
33) Sep., 2005: MiniGUI official version 1.6.8 released.
34) Oct., 2005: MiniGUI official version 2.0.2 released.
35) Jun., 2006: MiniGUI provides support for OSE.
36) Jul., 2006: MiniGUI official version 2.0.3/1.6.9 released.
37) Nov., 2007: MiniGUI official version 2.0.4/1.6.10 released.
38) Apr., 2009: MiniGUI official version 3.0.2 released.
39) Oct., 2009: MiniGUI official version 3.0.4 released.
40) Jan., 2010: MiniGUI official version 3.0.6 released.
41) May., 2010: MiniGUI official version 3.0.8 released.
42) Aug., 2010: MiniGUI official version 3.0.10 released.
43) Oct., 2010: MiniGUI official version 3.0.12 released.
44) Aug., 2017: FMSoft released the latest source code of MiniGUI under GPL 3.0.
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.
## AUTHORS AND COPYING
## ABOUT THE AUTHORS
The original author of MiniGUI is WEI Yongming, and now MiniGUI is
maintained by FMSoft. For more information, please refer to
<http://www.fmsoft.cn>.
maintained by FMSoft. For more information, please browse
our home page: http://www.fmsoft.cn.
## IF YOU HAVE A PROBLEM
If you have any technical problem, advice or comment, please send
messages to consult@minigui.com.
## A LITTLE FAQ
Q: Is GPL'd MiniGUI free for commercial use?
A: Simply no. FMSoft releases MiniGUI under GPLv3 license.
It is free for those who are 100% GPL and those who never copy, modify
and distribute MiniGUI. But if you want to use these GPL'd versions
for commerce, you should get the commercial license from FMSoft first.
Q: Which operating system does MiniGUI support?
A: MiniGUI can run on Linux/uClinux, uC/OS-II, eCos, ThreadX, pSOS,
VxWorks, ThreadX, OSE, and even Win32. Any other real-time OSes can
be supported theoretically.
Q: Which architecture does MiniGUI support?
A: x86 32/64-bit, ARM 32/64-bit (e.g., ARMv7 and ARM Cortex-A7),
PowerPC, MIPS, DragonBall, ColdFire, Blackfin, and so on.
Q: Does MiniGUI offer the support for grey LCD with 4bpp (bits per pixel)?
A: Yes, it offers. It even offers the support for 1bpp and 2bpp LCD.
## NOT FREE FOR COMMERCIAL USE
MiniGUI and its components are licensed under the GPL license.
So any links about MiniGUI must follow GPL. If you cannot accept GPL,
you need to be licensed from FMSoft. If you wonder that if you need
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>
## COPYING
Copyright (C) 2002 ~ 2019, Beijing FMSoft Technologies Co., Ltd.
Copyright (C) 1998 ~ 2002, WEI Yongming
@@ -405,31 +387,3 @@ 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>.
### Not Free for Commercial Use
As stated above, MiniGUI and its components are licensed under GPL.
So any links about MiniGUI must follow GPL. If you cannot accept GPL,
you need to be licensed from FMSoft.
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>.
## A LITTLE FAQ
Q: Which operating systems does MiniGUI support?
A: MiniGUI can run on Linux/uClinux, uC/OS-II, eCos, ThreadX, pSOS,
VxWorks, ThreadX, OSE, and even Win32. Any other real-time OSes can
be supported theoretically.
Q: Which architecture does MiniGUI support?
A: x86 32/64-bit, ARM 32/64-bit (e.g., ARMv7 and ARM Cortex-A7),
PowerPC, MIPS, DragonBall, ColdFire, Blackfin, and so on.
Q: Does MiniGUI offer the support for grey LCD with 4bpp (bits per pixel)?
A: Yes, it offers. It even offers the support for 1bpp and 2bpp LCD.
Q: Can I get the tech support from MiniGUI team?
A: Yes, FMSoft can provide you with guaranteed commercial technical
support services. Please send messages to <sales@minigui.com>.
+75 -664
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
Version 3.2.3 (2019/10/31)
This release needs the following resource packages:
* minigui-res-3.0.13.tar.gz
The latest samples package is:
* mg-samples-3.2.2.tar.gz
-8
View File
@@ -1,8 +0,0 @@
Version 4.0.4 (2019/12/24)
This release needs the following packages:
- The resource package: `minigui-res-4.0.0.tar.gz`
- The sample package: `mg-samples-4.0.1.tar.gz`
- The test package: `mg-test-4.0.4.tar.gz`
+1
View File
@@ -1,6 +1,7 @@
#!/bin/sh
./configure \
--with-runmode=ths \
--disable-dblclk \
--disable-cursor \
--disable-mousecalibrate \
+44
View File
@@ -0,0 +1,44 @@
#!/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 -1
View File
@@ -30,7 +30,7 @@ SOFLAGS=-fPIC -shared -o
##################################################
# set your compile flags and install prefix path #
PREFIX=/usr/local
CFLAGS+=-g -Wall -fPIC `pkg-config --cflags freetype2` -I/usr/local/include/harfbuzz
CFLAGS+=-g -Wall -fPIC `pkg-config --cflags freetype2`
LDFLAGS+=
##################################################
+166 -339
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -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_LOGFONT_NAME_FIELD + 1];
499 char name [LEN_FONT_NAME + 1];
500
501 for (i = 0; i &lt; LEN_LOGFONT_NAME_FIELD + 1; i++) {
501 for (i = 0; i &lt; LEN_FONT_NAME + 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_LOGFONT_NAME_FIELD + 1];
230 char family [LEN_LOGFONT_NAME_FIELD + 1];
231 char charset [LEN_LOGFONT_NAME_FIELD + 1];
229 char type [LEN_FONT_NAME + 1];
230 char family [LEN_FONT_NAME + 1];
231 char charset [LEN_FONT_NAME + 1];
232 DWORD style;
233 int size;
234 int rotation;
+11 -63
View File
@@ -1,74 +1,38 @@
# This configuration file is for MiniGUI V4.0.x or later
# This configuration file is for MiniGUI V3.x.x
#
# Copyright (C) 2002~2019 FMSoft
# Copyright (C) 2002~2018 FMSoft
# Copyright (C) 1998~2002 Wei Yongming.
#
# Web: http://www.minigui.com
#
# This configuration file must be installed in /etc,
# /usr/local/etc, your home directory, or the current working direcotry.
# When you install it in your home directory, it should be named
# ".MiniGUI.cfg".
# /usr/local/etc or your home directory. When you install it in your
# home directory, it should be named ".MiniGUI.cfg".
#
# The priority of above configruation files is ~/.MiniGUI.cfg,
# /usr/local/etc/MiniGUI.cfg, and then /etc/MiniGUI.cfg.
#
# The priority of above configruation files is ./MiniGUI.cfg,
# ~/.MiniGUI.cfg, /usr/local/etc/MiniGUI.cfg, and then /etc/MiniGUI.cfg.
#
# NOTE that the one in the current working directory will have
# always have the highest priority.
#
# If you change the install path of MiniGUI resource, you should
# If you change the install path of MiniGUI resource, you should
# modify this file to meet your configuration.
#
[system]
# GAL engine and default options
# The equivalent environment variable: MG_GAL_ENGINE
gal_engine=pc_xvfb
# The equivalent environment variable: MG_DEFAULTMODE
defaultmode=800x600-16bpp
# IAL engine
# The equivalent environment variable: MG_IAL_ENGINE
ial_engine=pc_xvfb
mdev=/dev/input/mice
mtype=IMPS2
# Linux IAL engine based on libinput
# ial_engine=libinut
#{{ifdef _MGGAL_DRM
[drm]
defaultmode=1024x768-32bpp
# We use DRM fourcc code to defined the pixel format of the video surface.
# For more information, please see <drm/drm_fourcc.h> header file.
# Note that only 8/16/24/32 bpp RGB formats are supported.
pixelformat=XR24
# The DRI device
device=/dev/dri/card0
[fbcon]
defaultmode=1024x768-16bpp
# The resolution of the display
# It is defined in dots (physical pixels) per inch
# The default value is 96.
dpi=96
# The filename of the shared library for the external driver.
# The equivalent environment variable: MG_GAL_DRM_DRIVER
exdriver=libhidrmdrivers.so.0
#}}
#{{ifdef _MGIAL_LIBINPUT
[libinput]
seat=seat0
#}}
#{{ifdef _MGGAL_FBCON
[fbcon]
defaultmode=1024x768-16bpp
dpi=96
#}}
#{{ifdef _MGGAL_PCXVFB
[pc_xvfb]
defaultmode=800x600-16bpp
@@ -94,19 +58,7 @@ def_bgcolor=0x00FF00
double_buffer=enable
#}}
#{{ifdef _MGIAL_RANDOM
[random]
logfile=/dev/null
eventtypes=mouse-keyboard-button-gesture
minkeycode=1
maxkeycode=128
minbtncode=0x100
maxbtncode=0x1ff
#}}
# The first system font must be a logical font using RBF device font.
# NOTE that the maxiaml number of system logfonts is 6. You should not
# set `font_number` in this section to be a number larger than 6.
[systemfont]
font_number=5
font0=rbf-FixedSys-rrncnn-8-16-ISO8859-1
@@ -136,10 +88,6 @@ font_number=0
[truetypefonts]
font_number=0
# The devfont now supports multiple font family names since V4.0.0.
name0=ttf-Source Sans Pro,SansSerif-rrncnn-0-0-ISO8859-1,UTF-8
# The path of font file can be relative to the current working directory.
fontfile0=font/SourceSansPro-Regular.ttf
[mouse]
dblclicktime=300
@@ -178,7 +126,7 @@ cursor22=ve_split.cur
[resinfo]
respath=/usr/local/share/minigui/res/
[classic]
# Note that max number defined in source code is 5.
iconnumber=5
+12 -12
View File
@@ -1,14 +1,14 @@
static LOGFONT *logfont, *logfontgb12, *logfontbig24;
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);
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);
-14
View File
@@ -1,14 +0,0 @@
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);
+3 -3
View File
@@ -10,7 +10,7 @@ libminiguiincludedir = $(includedir)/minigui
COMM_HDRS = \
common.h endianrw.h fixedmath.h \
minigui.h gdi.h window.h control.h \
own_malloc.h own_stdio.h \
own_malloc.h own_stdio.h \
xvfb.h customial.h exstubs.h \
dti.c
@@ -23,12 +23,12 @@ OSE_HDRS=ose_semaphore.h
PSOS_HDRS=psos_pthread.h psos_semaphore.h
EXTRA_DIST=$(UCOSII_HDRS) $(THREADX_HDRS) $(NUCLEUS_HDRS) $(VXWORKS_HDRS) \
$(OSE_HDRS) $(PSOS_HDRS) $(WIN32_HDRS) makefile.ng makefile.msvc
$(OSE_HDRS) $(PSOS_HDRS) $(WIN32_HDRS) makefile.ng makefile.msvc
#CLEANFILES=pthread.h semaphore.h
libminiguiinclude_HEADERS=$(COMM_HDRS) $(UCOSII_HDRS) $(THREADX_HDRS) \
$(NUCLEUS_HDRS) $(VXWORKS_HDRS) $(OSE_HDRS) $(PSOS_HDRS) $(WIN32_HDRS)
$(NUCLEUS_HDRS) $(VXWORKS_HDRS) $(OSE_HDRS) $(PSOS_HDRS) $(WIN32_HDRS)
if MGUSE_OWN_PTHREAD
install-data-local:
+129 -398
View File
File diff suppressed because it is too large Load Diff
+3 -15
View File
@@ -1,25 +1,13 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \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.
@@ -57,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.
*
*/
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file animation.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file button.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file combobox.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file coolbar.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file ctrlhelper.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file edit.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file gridview.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file iconview.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file listbox.h
* \author Wei Yongming <vincent@minigui.org>
+1 -13
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file listview.h
* \author Wei Yongming <vincent@minigui.org>
@@ -883,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.
*
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file menubutton.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file monthcal.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file newtoolbar.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file progressbar.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file propsheet.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file scrollbar.h
* \author wangjian
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file scrollview.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file spinbox.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file static.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file textedit.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file trackbar.h
* \author Wei Yongming <vincent@minigui.org>
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file treeview.h
* \author Wei Yongming <vincent@minigui.org>
+22 -164
View File
@@ -1,25 +1,13 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file customial.h
* \author Wei Yongming <vincent@minigui.org>
* \date 2007/06/06
*
*
* \brief This file is the head file for Custom IAL Engine.
*
\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.
@@ -56,159 +44,30 @@
/*
* $Id: customial.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.
*/
#ifndef GUI_IAL_CUSTOM_H
#define GUI_IAL_CUSTOM_H
#define IAL_MOUSE_LEFTBUTTON (1 << 0)
#define IAL_MOUSE_RIGHTBUTTON (1 << 1)
#define IAL_MOUSE_MIDDLEBUTTON (1 << 2)
#define IAL_MOUSE_LEFTBUTTON 1
#define IAL_MOUSE_RIGHTBUTTON 2
#define IAL_MOUSE_MIDDLEBUTTON 4
#define IAL_MOUSE_FOURTHBUTTON 8
#define IAL_MOUSE_FIFTHBUTTON 16
#define IAL_MOUSE_SIXTHBUTTON 32
#define IAL_MOUSE_RESETBUTTON 64
/* deprecated since 4.0.0
#define IAL_MOUSE_FOURTHBUTTON (1 << 3)
#define IAL_MOUSE_FIFTHBUTTON (1 << 4)
#define IAL_MOUSE_SIXTHBUTTON (1 << 5)
#define IAL_MOUSE_SEVENTHBUTTON (1 << 6)
#define IAL_MOUSE_EIGHTHBUTTON (1 << 7)
#define IAL_MOUSE_SIDEBUTTON IAL_MOUSE_FOURTHBUTTON
#define IAL_MOUSE_EXTRABUTTON IAL_MOUSE_FIFTHBUTTON
#define IAL_MOUSE_FORWARDBUTTON IAL_MOUSE_SIXTHBUTTON
#define IAL_MOUSE_BACKBUTTON IAL_MOUSE_SEVENTHBUTTON
#define IAL_MOUSE_TASKBUTTON IAL_MOUSE_EIGHTHBUTTON
#define IAL_MOUSE_RESETBUTTON IAL_MOUSE_EIGHTHBUTTON
*/
#define IAL_EVENT_MOUSE (1 << 0)
#define IAL_MOUSEEVENT IAL_EVENT_MOUSE
#define IAL_EVENT_KEY (1 << 1)
#define IAL_KEYEVENT IAL_EVENT_KEY
#define IAL_EVENT_EXTRA (1 << 2)
/* The event identifiers, should keep sync with MSG_EXIN_XXX */
#ifndef AXIS_SCROLL_INVALID
#define AXIS_SCROLL_INVALID 0
#define AXIS_SCROLL_VERTICAL 1
#define AXIS_SCROLL_HORIZONTAL 2
#define AXIS_SOURCE_INVALID 0
#define AXIS_SOURCE_WHEEL 1
#define AXIS_SOURCE_FINGER 2
#define AXIS_SOURCE_CONTINUOUS 3
#define AXIS_SOURCE_WHEEL_TILT 4
#endif
#define IAL_EVENT_AXIS 0x0070
#define IAL_EVENT_BUTTONDOWN 0x0071
#define IAL_EVENT_BUTTONUP 0x0072
#define IAL_EVENT_TOUCH_DOWN 0x0073
#define IAL_EVENT_TOUCH_UP 0x0074
#define IAL_EVENT_TOUCH_MOTION 0x0075
#define IAL_EVENT_TOUCH_CANCEL 0x0076
#define IAL_EVENT_TOUCH_FRAME 0x0077
#ifndef SWITCH_INVALID
#define SWITCH_INVALID 0
#define SWITCH_LID 1
#define SWITCH_TABLET_MODE 2
#define SWITCH_STATE_INVALID 0
#define SWITCH_STATE_ON 1
#define SWITCH_STATE_OFF 2
#endif
#define IAL_EVENT_SWITCH_TOGGLE 0x007A
#define IAL_EVENT_GESTURE_SWIPE_BEGIN 0x0080
#define IAL_EVENT_GESTURE_SWIPE_UPDATE 0x0081
#define IAL_EVENT_GESTURE_SWIPE_END 0x0082
#define IAL_EVENT_GESTURE_PINCH_BEGIN 0x0083
#define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084
#define IAL_EVENT_GESTURE_PINCH_END 0x0085
#ifndef TABLET_TOOL_X
#define TABLET_TOOL_PROXIMITY_STATE_INVALID 0
#define TABLET_TOOL_PROXIMITY_STATE_OUT 1
#define TABLET_TOOL_PROXIMITY_STATE_IN 2
#define TABLET_TOOL_TIP_INVALID 0
#define TABLET_TOOL_TIP_UP 1
#define TABLET_TOOL_TIP_DOWN 2
#define TABLET_BUTTON_STATE_INVALID 0
#define TABLET_BUTTON_STATE_RELEASED 1
#define TABLET_BUTTON_STATE_PRESSED 2
#define TABLET_PAD_RING_SOURCE_UNKNOWN 0
#define TABLET_PAD_RING_SOURCE_FINGER 1
#define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
#define TABLET_PAD_STRIP_SOURCE_FINGER 1
#define TABLET_TOOL_CHANGED_X (1 << 0)
#define TABLET_TOOL_CHANGED_Y (1 << 1)
#define TABLET_TOOL_CHANGED_PRESSURE (1 << 2)
#define TABLET_TOOL_CHANGED_DISTANCE (1 << 3)
#define TABLET_TOOL_CHANGED_TILT_X (1 << 4)
#define TABLET_TOOL_CHANGED_TILT_Y (1 << 5)
#define TABLET_TOOL_CHANGED_ROTATION (1 << 6)
#define TABLET_TOOL_CHANGED_SLIDER (1 << 7)
#define TABLET_TOOL_CHANGED_SIZE_MAJOR (1 << 8)
#define TABLET_TOOL_CHANGED_SIZE_MINOR (1 << 9)
#define TABLET_TOOL_CHANGED_WHEEL (1 << 10)
#define TABLET_TOOL_X 0
#define TABLET_TOOL_Y 1
#define TABLET_TOOL_PRESSURE 2
#define TABLET_TOOL_DISTANCE 3
#define TABLET_TOOL_TILT_X 4
#define TABLET_TOOL_TILT_Y 5
#define TABLET_TOOL_ROTATION 6
#define TABLET_TOOL_SLIDER 7
#define TABLET_TOOL_SIZE_MAJOR 8
#define TABLET_TOOL_SIZE_MINOR 9
#define TABLET_TOOL_WHEEL 10
#endif
#define IAL_EVENT_TABLET_TOOL_AXIS 0x0090
#define IAL_EVENT_TABLET_TOOL_PROXIMITY 0x0091
#define IAL_EVENT_TABLET_TOOL_TIP 0x0092
#define IAL_EVENT_TABLET_TOOL_BUTTON 0x0093
#define IAL_EVENT_TABLET_PAD_BUTTON 0x0094
#define IAL_EVENT_TABLET_PAD_RING 0x0095
#define IAL_EVENT_TABLET_PAD_STRIP 0x0096
#define IAL_EVENT_USER_BEGIN 0x009A
#define IAL_EVENT_USER_UPDATE 0x009B
#define IAL_EVENT_USER_END 0x009C
#define NR_PACKED_SUB_EVENTS 16
typedef struct _EXTRA_INPUT_EVENT {
int event;
WPARAM wparam;
LPARAM lparam;
// for tablet tool messages
unsigned int params_mask;
WPARAM wparams[NR_PACKED_SUB_EVENTS];
LPARAM lparams[NR_PACKED_SUB_EVENTS];
} EXTRA_INPUT_EVENT;
#define IAL_LEN_MDEV 127
#define IAL_MOUSEEVENT 1
#define IAL_KEYEVENT 2
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
@@ -227,28 +86,27 @@ typedef struct tagINPUT {
int (*resume_keyboard) (void);
void (*set_leds) (unsigned int leds);
// Event loop
// Event
int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out,
fd_set *except, struct timeval *timeout);
// New wait event method for getting extra input events; since 4.0.0
int (*wait_event_ex) (int maxfd, fd_set *in, fd_set *out,
fd_set *except, struct timeval *timeout, EXTRA_INPUT_EVENT* extra);
char mdev [MAX_PATH + 1];
} INPUT;
#ifdef _MGIAL_CUSTOM
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifdef _MGIAL_CUSTOM
extern BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
extern void TermCustomInput (void);
#endif
BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
void TermCustomInput (void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _MGIAL_CUSTOM */
#endif /* GUI_IAL_CUSTOM_H */
+6 -42
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/*
* \file dti.c
* \author Wei Yongming <vincent@minigui.org>
@@ -17,37 +5,13 @@
*
\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) 2002-2018 FMSoft
Copyright (C) 1999-2002 Wei Yongming.
All rights reserved by Feynman Software.
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/blog/minigui-licensing-policy/>.
This file is part of MiniGUI, a compact cross-platform Graphics
User Interface (GUI) support system for real-time embedded systems.
\endverbatim
*/
-12
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file endianrw.h
* \author Wei Yongming <vincent@minigui.org>
+26 -429
View File
@@ -1,15 +1,3 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \file exstubs.h
* \author Wei Yongming <vincent@minigui.org>
@@ -24,7 +12,7 @@
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
Copyright (C) 2007~2019, Beijing FMSoft Technologies Co., Ltd.
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
@@ -62,269 +50,6 @@
#ifndef GUI_EXSTUBS_H
#define GUI_EXSTUBS_H
#include <stdint.h>
/**
* \defgroup external_stubs External Stubs
*
* The stubs (callbacks) you need to implement for external target.
*
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifdef _MGGAL_DRM
/**
* \defgroup external_stubs_dri External Stubs for DRI sub driver
*
* @{
*/
/**
* The struct type represents the DRI sub driver.
* The concrete struct should be defined by the driver.
*/
struct _DrmDriver;
typedef struct _DrmDriver DrmDriver;
/**
* The struct type represents the bufffer can be used by
* MiniGUI NEWGAL engine for hardware surface.
*/
typedef struct _DrmSurfaceBuffer {
/** The prime fd of the buffer */
int prime_fd;
/** The global name of the buffer */
uint32_t name;
/** The local handle of the buffer */
uint32_t handle;
/** The buffer identifier */
uint32_t id;
/** The widht of the buffer */
uint32_t width;
/** The height of the buffer */
uint32_t height;
/** The pitch (row stride in bytes) of the buffer */
uint32_t pitch;
/** The DRM format of the buffer */
uint32_t drm_format;
/** The bits per pixel */
uint32_t bpp:8;
/** The bytes per pixel */
uint32_t cpp:8;
/** Is foreign surface */
uint32_t foreign:1;
/** The whole size in bytes of the buffer */
unsigned long size;
/** The mapped address of the buffer; NULL when the buffer is not mapped yet. */
uint8_t* pixels;
} DrmSurfaceBuffer;
/**
* The color logic operations.
*/
enum DrmColorLogicOp {
COLOR_LOGICOP_CLEAR = 0,
COLOR_LOGICOP_NOR = 1,
COLOR_LOGICOP_AND_INVERTED = 2,
COLOR_LOGICOP_COPY_INVERTED = 3,
COLOR_LOGICOP_AND_REVERSE = 4,
COLOR_LOGICOP_INVERT = 5,
COLOR_LOGICOP_XOR = 6,
COLOR_LOGICOP_NAND = 7,
COLOR_LOGICOP_AND = 8,
COLOR_LOGICOP_EQUIV = 9,
COLOR_LOGICOP_NOOP = 10,
COLOR_LOGICOP_OR_INVERTED = 11,
COLOR_LOGICOP_COPY = 12,
COLOR_LOGICOP_OR_REVERSE = 13,
COLOR_LOGICOP_OR = 14,
COLOR_LOGICOP_SET = 15
};
/**
* The struct type defines the operations for a DRI driver.
*/
typedef struct _DrmDriverOps {
/**
* This operation creates the DrmDriver object.
*
* \note The driver must implement this operation.
*/
DrmDriver* (*create_driver) (int device_fd);
/**
* This operation destroies the DrmDriver object.
*
* \note The driver must implement this operation.
*/
void (*destroy_driver) (DrmDriver *driver);
/**
* This operation flushs the batch buffer of the driver or the hardware cache.
*
* \note This operation can be NULL.
*/
void (* flush_driver) (DrmDriver *driver);
/**
* This operation creates a buffer with the specified pixel format,
* width, and height. If succeed, a valid DrmSurfaceBuffer object will
* be returned; NULL on error. Note that the field of `pixels` of the
* DrmSurfaceBuffer object is NULL until the \a map_buffer was called.
*
* \note The driver must implement this operation.
*/
DrmSurfaceBuffer* (* create_buffer) (DrmDriver *driver,
uint32_t drm_format,
unsigned int width, unsigned int height);
/**
* This operation creates a buffer for the given handle
* with the specified pixel format, width, and height. If succeed,
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
*
* \note This operation can be NULL.
*/
DrmSurfaceBuffer* (* create_buffer_from_handle) (DrmDriver *driver,
uint32_t handle, unsigned long size, uint32_t drm_format,
unsigned int width, unsigned int height, unsigned int pitch);
/**
* This operation creates a buffer for the given system global name
* with the specified pixel format, width, and height. If succeed,
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
*
* \note This operation can be NULL.
*/
DrmSurfaceBuffer* (* create_buffer_from_name) (DrmDriver *driver,
uint32_t name, uint32_t drm_format,
unsigned int width, unsigned int height, unsigned int pitch);
/**
* This operation creates a buffer for the given PRIME file descriptor
* with the specified pixel format, width, height, and pitch. If succeed,
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
*
* \note This operation can be NULL.
*/
DrmSurfaceBuffer* (* create_buffer_from_prime_fd) (DrmDriver *driver,
int prime_fd, unsigned long size, uint32_t drm_format,
unsigned int width, unsigned int height, unsigned int pitch);
/**
* This operation maps the buffer into the current process's virtual memory
* space, and returns the virtual address. If failed, it returns NULL.
*
* \note The driver must implement this operation.
*/
uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
/**
* This operation un-maps a buffer.
*
* \note The driver must implement this operation.
*/
void (* unmap_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
/**
* This operation destroies a buffer.
*
* \note The driver must implement this operation.
*/
void (* destroy_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
/**
* This operation clears the specific rectangle area of a buffer
* with the specific pixel value. If succeed, it returns 0.
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated clear operation.
*/
int (* clear_buffer) (DrmDriver *driver,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* rc, uint32_t pixel_value);
/**
* This operation checks whether a hardware accelerated blit
* can be done between the source buffer and the destination buffer.
* If succeed, it returns 0.
*
* \note If this operation is set as NULL, it will be supposed that
* the driver does not support any hardware accelerated blit operation.
*/
int (* check_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, DrmSurfaceBuffer* dst_buf);
/**
* This operation copies bits from a source buffer to a destination buffer.
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated copy blit.
*/
int (* copy_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
enum DrmColorLogicOp logic_op);
/**
* This operation blits pixles from a source buffer with the source alpha value
* specified to a destination buffer.
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blit with alpha.
*/
int (* alpha_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, uint8_t alpha);
/**
* This operation blits pixles from a source buffer to a destination buffer,
* but skipping the pixel value specified by \a color_key.
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blit with color key.
*/
int (* key_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, uint32_t color_key);
/**
* This operation blits pixles from a source buffer with the source alpha value
* specified to a destination buffer, but skipping the pixel value specified.
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blit with alpha and color key.
*/
int (* alpha_key_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
uint8_t alpha, uint32_t color_key);
} DrmDriverOps;
/** Implement this stub to return the DRI driver operations */
DrmDriverOps* __drm_ex_driver_get (const char* driver_name, int device_fd);
/** @} end of external_stubs_dri */
#endif /* _MGGAL_DRM */
#ifdef _MGGAL_COMMLCD
/**
* \defgroup external_stubs_commlcd External Stubs for CommLCD NEWGAL Engine
*
* The external stubs for COMMLCD NEWGAL engine.
*
* @{
*/
/* The pixel format defined by depth */
#define COMMLCD_PSEUDO_RGB332 1
#define COMMLCD_TRUE_RGB555 2
@@ -339,179 +64,51 @@ DrmDriverOps* __drm_ex_driver_get (const char* driver_name, int device_fd);
#define COMMLCD_UPDATE_SYNC 1
#define COMMLCD_UPDATE_ASYNC 2
/**
* The structue represented the screen information of CommmLCD engine.
*/
struct commlcd_info {
/** The vertical resolution of the screen. */
int height;
/** The horizontal resolution of the screen. */
int width;
/** The length of one scan line in bytes. */
int pitch;
/** The color depth (bits-per-pixel). */
int bpp;
/**
* The pixel type, can be one of the following values:
* - COMMLCD_PSEUDO_RGB332
* - COMMLCD_TRUE_RGB555
* - COMMLCD_TRUE_RGB565
* - COMMLCD_TRUE_RGB888
* - COMMLCD_TRUE_RGB0888
* - COMMLCD_TRUE_ARGB1555
* - COMMLCD_TRUE_ARGB8888
* - COMMLCD_TRUE_ABRG8888
*/
int type;
/**
* The update method, can be one of the following values:
* - COMMLCD_UPDATE_NONE\n
* No update method.
* - COMMLCD_UPDATE_SYNC
* The update method should be called synchronously.
* - COMMLCD_UPDATE_ASYNC
* The update method should be called asynchronously.
*/
int update_method;
/**
* The pointer to the frame buffer of the screen.
*/
Uint8* fb;
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
};
/**
* Implement this stub to initialize the CommLCD engine.
* Return 0 for success.
*/
int __commlcd_drv_init (void);
/**
* Implement this stub to initialize the CommLCD engine.
*
* \param li The pointer to struct commlcd_info. This structure
* will be used to return the LCD surface information.
* \param width The desired horizontal resolution of the screen.
* \param height The desired vertical resolution of the screen.
* \param depth The desired depth of the screen.
*
* Return 0 for success, otherwise for failure.
*/
int __commlcd_drv_getinfo (struct commlcd_info *li,
int width, int height, int depth);
/**
* Implement this stub to release (destroy) the CommLCD engine.
*
* Return 0 for success, otherwise for failure.
*/
int __commlcd_drv_release (void);
/**
* Implement this stub to set the pallete when the pixel type
* is COMMLCD_PSEUDO_RGB332.
*
* \param firstcolor
* The index value of the first entry of the pallete.
* \param ncolors
* The number of entries of the pallete.
* \param colors
* The array of the colors for each entries in the pallete.
*
* Return 0 for success, otherwise for failure.
*/
int __commlcd_drv_setclut (int firstcolor, int ncolors, GAL_Color *colors);
/**
* Implement this stub to update the screen.
*
* \param rc_dirty The rectangle contains the dirty region.
*
* Return 0 for success, otherwise for failure.
*/
int __commlcd_drv_update (const RECT* rc_dirty);
/** @} end of external_stubs_commlcd */
#endif /* _MGGAL_COMMLCD */
#ifdef _MGIAL_COMM
/**
* \defgroup external_stubs_commial External Stubs for COMM IAL Engine
*
* The external stubs for COMM IAL engine
*
* @{
*/
#define COMM_MOUSEINPUT 0x01
#define COMM_KBINPUT 0x02
#define COMM_MOUSELBUTTON 0x01
#define COMM_MOUSERBUTTON 0x04
/**
* Implement this stub to initialize the COMM IAL engine.
* Return 0 for success, otherwise for failure.
*/
#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);
/**
* Implement this stub to return the mouse event data.
* The implementation should return the position of mouse or touch,
* and the button status through the pointers \a x, \a y, and \a button.
* The position should be in absolute coordinates, and the button
* will have \a COMM_MOUSELBUTTON set if left button was pressed,
* and \a COMM_MOUSERBUTTON set if right button was pressed.
*
* Return 0 for success, otherwise for failure.
*/
int __comminput_ts_getdata (short *x, short *y, short *button);
/**
* Implement this stub to return the keyboard event data.
* The implementation should return the key scancode pressed or released
* through the pointer \a key, and the pressed or released status of the
* key through \a status.
*
* Return 0 for success, otherwise for failure.
*/
int __comminput_kb_getdata (short *key, short *status);
/**
* Implement this stub to wait for an event.
*
* \retval 0
* The timeout period expires.
* \retval COMM_MOUSEINPUT
* There is an mouse moved, button pressed, or button released event.
* \retval COMM_KBINPUT
* There is a key pressed or released event.
* \retval others
* Failed.
*/
int __comminput_wait_for_input (struct timeval *timeout);
/**
* Implement this stub to de-initialize the COMM IAL engine.
*/
void __comminput_deinit (void);
/** @} end of external_stubs_commial */
#endif /* _MGIAL_COMM */
#ifdef __cplusplus
}
#endif /* __cplusplus */
/** @} end of external_stubs */
#endif /* GUI_EXSTUBS_H */
+66 -78
View File
@@ -1,25 +1,13 @@
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.cn/exception-list
//
//////////////////////////////////////////////////////////////////////////////
/**
* \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.
@@ -57,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)
@@ -91,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
* @{
*/
@@ -124,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
@@ -137,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
@@ -152,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 const fixed __mg_cos_tbl[];
extern MG_EXPORT const fixed __mg_tan_tbl[];
extern MG_EXPORT const fixed __mg_acos_tbl[];
extern MG_EXPORT fixed _cos_tbl[];
extern MG_EXPORT fixed _tan_tbl[];
extern MG_EXPORT fixed _acos_tbl[];
/************************** inline fixed point math functions *****************/
/* ftofix and fixtof are used in generic C versions of fixmul and fixdiv */
@@ -174,7 +162,7 @@ extern MG_EXPORT const fixed __mg_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.
@@ -183,7 +171,7 @@ extern MG_EXPORT const fixed __mg_acos_tbl[];
* \sa fixtof
*/
static inline fixed ftofix (double x)
{
{
if (x > 32767.0) {
errno = ERANGE;
return 0x7FFFFFFF;
@@ -194,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;
}
@@ -221,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
@@ -232,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;
}
}
@@ -252,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
@@ -269,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);
@@ -303,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);
@@ -348,7 +336,7 @@ static inline int fixceil (fixed x)
* \sa fixtoi
*/
static inline fixed itofix (int x)
{
{
return x << 16;
}
@@ -361,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 __mg_cos_tbl[((x + 0x4000) >> 15) & 0x1FF];
return _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 __mg_cos_tbl[((x - 0x400000 + 0x4000) >> 15) & 0x1FF];
{
return _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 __mg_tan_tbl[((x + 0x4000) >> 15) & 0xFF];
{
return _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
@@ -427,30 +415,30 @@ static inline fixed fixacos (fixed x)
return 0;
}
return __mg_acos_tbl[(x+65536+127)>>8];
return _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 - __mg_acos_tbl[(x+65536+127)>>8];
return 0x00400000 - _acos_tbl[(x+65536+127)>>8];
}
/** @} end of fixed_math_fns */
+1745 -6245
View File
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More