mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-23 08:33:55 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d97e922e12 | ||
|
|
6ffdd98903 | ||
|
|
d894080582 | ||
|
|
044c82e2f3 | ||
|
|
8bfc65f88f | ||
|
|
fbf02782a6 | ||
|
|
1e88954b79 | ||
|
|
4e0cd74552 | ||
|
|
7530c4b5bd | ||
|
|
b47d207bd2 | ||
|
|
9ff29ccb94 | ||
|
|
6da322ed49 | ||
|
|
6e21fed525 | ||
|
|
74747f383c | ||
|
|
bde7d74f02 | ||
|
|
cdc818d936 | ||
|
|
8694a342b9 | ||
|
|
dd9e59d82f | ||
|
|
1b2b87d187 | ||
|
|
36c1f15894 | ||
|
|
c3877bad13 | ||
|
|
a118a062ec | ||
|
|
5e34e98b28 | ||
|
|
60ed1c9b3c | ||
|
|
e148806743 | ||
|
|
cd0dd795c8 | ||
|
|
e6468d960c | ||
|
|
219d72074d | ||
|
|
56779b033d | ||
|
|
73dc293c76 | ||
|
|
abaee60a55 | ||
|
|
2b99ac28eb | ||
|
|
f86fa9d483 | ||
|
|
529c78ef90 | ||
|
|
bc20a11744 | ||
|
|
6a2f28543d | ||
|
|
79c9e16ddb | ||
|
|
bb62e1ff45 | ||
|
|
95ac2ecfce | ||
|
|
7baf414d73 | ||
|
|
70255521f8 | ||
|
|
3dce463697 | ||
|
|
43f126635c | ||
|
|
c31c970e88 | ||
|
|
8dcb3349c7 | ||
|
|
b03bc62fef | ||
|
|
a8b46e9e9c | ||
|
|
4541934bd5 | ||
|
|
fa2382c0de | ||
|
|
5944085555 | ||
|
|
97f4215330 | ||
|
|
1d81705437 | ||
|
|
2f48b9df05 | ||
|
|
5541ad971d | ||
|
|
8d4ced06d6 | ||
|
|
07ba1c50b9 | ||
|
|
2f97ddc0a2 | ||
|
|
988d1ca680 | ||
|
|
fec1ccef76 | ||
|
|
884cd66dfa | ||
|
|
f41180d025 | ||
|
|
bebe28b95c |
+2
-2
@@ -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 = v5.0.0
|
||||
PROJECT_NUMBER = v5.0.5
|
||||
|
||||
# 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-5.0.0
|
||||
OUTPUT_DIRECTORY = doc-api-ref-minigui-procs-5.0.5
|
||||
|
||||
# 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
|
||||
|
||||
+2
-2
@@ -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 = v5.0.0
|
||||
PROJECT_NUMBER = v5.0.5
|
||||
|
||||
# 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-5.0.0
|
||||
OUTPUT_DIRECTORY = doc-api-ref-minigui-sa-5.0.5
|
||||
|
||||
# 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
|
||||
|
||||
+2
-2
@@ -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 = v5.0.0
|
||||
PROJECT_NUMBER = v5.0.5
|
||||
|
||||
# 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-5.0.0
|
||||
OUTPUT_DIRECTORY = doc-api-ref-minigui-ths-5.0.5
|
||||
|
||||
# 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# MiniGUI
|
||||
|
||||
A mature and proven cross-platform GUI system for embedded and smart IoT devices.
|
||||
A mature and proven cross-platform windowing system for embedded system and smart IoT devices.
|
||||
|
||||
|
||||
## TABLE OF CONTENTS
|
||||
@@ -45,7 +45,7 @@ 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.
|
||||
Nucleus, pSOS, uC/OS-II, OSE, and others.
|
||||
|
||||
This is the source tree of MiniGUI Core, which provides the windowing
|
||||
and graphics interfaces as well as a lot of standard controls (toolkit).
|
||||
@@ -108,9 +108,9 @@ for examples:
|
||||
|
||||
### MiniGUI and HybridOS
|
||||
|
||||
HybridOS is another large open source project initiated by FMSoft. It is
|
||||
a totally new open source operating system designed for smart IoT devices
|
||||
and cloud computing environment.
|
||||
[HybridOS](https://github.com/FMSoftCN/hybridos) is another large open source project
|
||||
initiated by FMSoft. It is a totally new open source operating system designed for
|
||||
embedded and smart IoT devices and cloud computing environment.
|
||||
|
||||
In practice, MiniGUI and the software which are used to integrated with GPU
|
||||
constitute the graphics stack of HybridOS.
|
||||
|
||||
+61
-1
@@ -1,8 +1,13 @@
|
||||
# Release Notes
|
||||
|
||||
- [Version 5.0.5](#version-505)
|
||||
+ [What's new in version 5.0.5](#whats-new-in-version-505)
|
||||
- [Version 5.0.4](#version-504)
|
||||
+ [What's new in version 5.0.4](#whats-new-in-version-504)
|
||||
- [Version 5.0.3](#version-503)
|
||||
+ [What's new in version 5.0.3](#whats-new-in-version-503)
|
||||
- [Version 5.0.2](#version-502)
|
||||
+ [What's new in version 5.0.2](#whats-new-in-version-502)
|
||||
|
||||
- [Version 5.0.0](#version-500)
|
||||
+ [What's new in version 5.0.0](#whats-new-in-version-500)
|
||||
+ [Compositing schema](#compositing-schema)
|
||||
@@ -13,6 +18,61 @@
|
||||
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
||||
+ [Deprecated APIs](#deprecated-apis)
|
||||
|
||||
## Version 5.0.5
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.5,
|
||||
which is the bug fixing release of MiniGUI 5.0.x.
|
||||
|
||||
### What's new in version 5.0.5
|
||||
|
||||
In this version, we fixed some bugs and made some minor enhancements:
|
||||
|
||||
* BUGFIXING:
|
||||
- Adjust the constants for `WS_XXXX` macros to avoid duplicated values.
|
||||
|
||||
Note that the binary backward-compatibility was broken. You should
|
||||
rebuild all MiniGUI applications.
|
||||
|
||||
## Version 5.0.4
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.4,
|
||||
which is the bug fixing release of MiniGUI 5.0.x.
|
||||
|
||||
### What's new in version 5.0.4
|
||||
|
||||
In this version, we fixed some bugs and made some minor enhancements:
|
||||
|
||||
* BUGFIXING:
|
||||
- Fix bugs in ServerGetWinZNodeRegion: must check for possible empty mask rect
|
||||
and bad assignment of maskrect
|
||||
- Fix a potential bug: only increase `nr_mask_rects` for not empty mask rectangle.
|
||||
- Fix a bug: update surface of controls surface in `travel_children_with_priv_cdc`.
|
||||
* ENHANCEMENTS:
|
||||
- New IAL engine: `--enable-singletouchkeyial` to build the IAL engine for
|
||||
single touch screen and key buttons.
|
||||
|
||||
## Version 5.0.3
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.3,
|
||||
which is the bug fixing release of MiniGUI 5.0.x.
|
||||
|
||||
### What's new in version 5.0.3
|
||||
|
||||
In this version, we fixed some bugs and made some minor enhancements:
|
||||
|
||||
* BUGFIXING:
|
||||
- Always check expired timers even got `EINTR`.
|
||||
- Add static modifier to `refresh_dirty_region` method of the fallback compositor.
|
||||
- Fix a bug in `RegisterListenFD`.
|
||||
- Fix a bug in `allocate_more_fd_slots`.
|
||||
* TUNING:
|
||||
- Rebuild the private data for all visible z-nodes after selected a new compositor.
|
||||
* ENHANCEMENTS:
|
||||
- New configuration option: `--enable-mgslicefallback` to build a fallback
|
||||
implementation of mgslice.
|
||||
- New API: `ServerGetTopmostZNodeOfType`.
|
||||
- Merge some code by @ehello (<https://github.com/ehello>) for FreeRTOS.
|
||||
|
||||
## Version 5.0.2
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.2,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Version 5.0.0 (2019/03/30)
|
||||
Version 5.0.5 (2021/01/31)
|
||||
|
||||
This is the first official release of MiniGUI 5.0.x, the stable version.
|
||||
|
||||
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm config.cache config.status -f
|
||||
|
||||
./configure \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--with-osname=freertos \
|
||||
--with-targetname=external \
|
||||
--with-runmode=sa \
|
||||
--enable-mgslicefallback \
|
||||
--disable-videopcxvfb \
|
||||
--disable-videoqvfb \
|
||||
--disable-videodrm \
|
||||
--disable-videofbcon \
|
||||
--enable-videocommlcd \
|
||||
--enable-dummyial \
|
||||
--disable-consoleial \
|
||||
--disable-libinputial \
|
||||
--enable-commial \
|
||||
--disable-consoleimps2 \
|
||||
--disable-mousecalibrate \
|
||||
--enable-incoreres \
|
||||
--disable-cursor \
|
||||
--disable-clipboard \
|
||||
--disable-adv2dapi \
|
||||
--disable-savebitmap \
|
||||
--disable-savescreen \
|
||||
--disable-dblclk \
|
||||
--disable-splash \
|
||||
--disable-latin9support \
|
||||
--disable-fullunicode \
|
||||
--disable-rbfsupport \
|
||||
--disable-vbfsupport \
|
||||
--disable-upfsupport \
|
||||
--disable-qpfsupport \
|
||||
--disable-ttfsupport \
|
||||
--disable-complexscripts \
|
||||
--disable-ttfcache \
|
||||
--disable-jpgsupport \
|
||||
--disable-pngsupport \
|
||||
--disable-flatlf \
|
||||
--disable-textmode \
|
||||
--disable-shmopen
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm config.cache config.status -f
|
||||
|
||||
./configure \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--with-osname=linux \
|
||||
--with-targetname=external \
|
||||
--with-runmode=sa \
|
||||
--enable-mgslicefallback \
|
||||
--disable-videopcxvfb \
|
||||
--disable-videoqvfb \
|
||||
--disable-videodrm \
|
||||
--disable-videofbcon \
|
||||
--enable-videocommlcd \
|
||||
--enable-dummyial \
|
||||
--disable-consoleial \
|
||||
--disable-libinputial \
|
||||
--enable-commial \
|
||||
--disable-consoleimps2 \
|
||||
--disable-mousecalibrate \
|
||||
--enable-incoreres \
|
||||
--disable-cursor \
|
||||
--disable-savebitmap \
|
||||
--disable-savescreen \
|
||||
--disable-dblclk \
|
||||
--disable-splash \
|
||||
--disable-latin9support \
|
||||
--disable-fullunicode \
|
||||
--disable-rbfsupport \
|
||||
--disable-vbfsupport \
|
||||
--disable-upfsupport \
|
||||
--disable-qpfsupport \
|
||||
--disable-ttfsupport \
|
||||
--disable-complexscripts \
|
||||
--disable-ttfcache \
|
||||
--disable-jpgsupport \
|
||||
--disable-pngsupport \
|
||||
--disable-flatlf \
|
||||
--disable-textmode
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
|
||||
# set your own targaet_os
|
||||
TARGET_OS=freertos
|
||||
|
||||
##################################################
|
||||
# set your compile tool #
|
||||
CC=arm-linux-gnueabihf-gcc
|
||||
CXX=arm-linux-gnueabihf-g++
|
||||
CPP=arm-linux-gnueabihf-g++
|
||||
AR=arm-linux-gnueabihf-ar
|
||||
AS=arm-linux-gnueabihf-as
|
||||
RANLIB=arm-linux-gnueabihf-ranlib
|
||||
MAKE=/usr/bin/make
|
||||
##################################################
|
||||
|
||||
ARFLAGS=-rc
|
||||
COFLAG=-c
|
||||
|
||||
OBJ=o
|
||||
LIBA=a
|
||||
|
||||
##################################################
|
||||
# if you don't want to create dynamic, delete it #
|
||||
LIBSO=so
|
||||
SOFLAGS=-fPIC -shared -o
|
||||
##################################################
|
||||
|
||||
|
||||
##################################################
|
||||
# set your compile flags and install prefix path #
|
||||
PREFIX=/usr/local
|
||||
CFLAGS+=-g -Wall -fPIC
|
||||
LDFLAGS+=
|
||||
##################################################
|
||||
|
||||
+24
-9
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT(libminigui, 5.0.2)
|
||||
AC_INIT(libminigui, 5.0.5)
|
||||
AC_CONFIG_SRCDIR(src/main/main.c)
|
||||
|
||||
dnl Set various version strings - taken gratefully from the SDL sources
|
||||
@@ -16,9 +16,9 @@ dnl Set various version strings - taken gratefully from the SDL sources
|
||||
#
|
||||
MINIGUI_MAJOR_VERSION=5
|
||||
MINIGUI_MINOR_VERSION=0
|
||||
MINIGUI_MICRO_VERSION=2
|
||||
MINIGUI_INTERFACE_AGE=2
|
||||
MINIGUI_BINARY_AGE=2
|
||||
MINIGUI_MICRO_VERSION=5
|
||||
MINIGUI_INTERFACE_AGE=0
|
||||
MINIGUI_BINARY_AGE=0
|
||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||
|
||||
AC_SUBST(MINIGUI_MAJOR_VERSION)
|
||||
@@ -77,7 +77,7 @@ AC_FUNC_MEMCMP
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(time mktime localtime clock_gettime strdup strcasecmp strncasecmp strerror setlocale)
|
||||
AC_CHECK_FUNCS(posix_memalign memalign valloc memfd_create poll select)
|
||||
AC_CHECK_FUNCS(posix_memalign memalign valloc memfd_create access poll select)
|
||||
|
||||
PKG_CHECK_MODULES(UDEV, [libudev >= 200], have_udev="yes", have_udev="no; need libudev 200+")
|
||||
|
||||
@@ -94,7 +94,7 @@ osname="unspecified"
|
||||
runtime_mode="procs"
|
||||
compositing_schema="no"
|
||||
virtual_window="no"
|
||||
use_shmopen="yes"
|
||||
use_shmopen="no"
|
||||
mgslice_use_fallback="no"
|
||||
|
||||
incore_res="no"
|
||||
@@ -132,6 +132,9 @@ build_console_ms3="no"
|
||||
build_console_gpm="no"
|
||||
build_text_mode="yes"
|
||||
|
||||
dnl single touch key engines
|
||||
buid_singletouchkey_ial_engine="yes"
|
||||
|
||||
dnl the customized ial engine
|
||||
build_dlcustom_ial_engine="no"
|
||||
build_custom_ial_engine="no"
|
||||
@@ -477,6 +480,10 @@ AC_ARG_ENABLE(libinputial,
|
||||
[ --enable-libinputial build the IAL engine based on libinput <default=yes>],
|
||||
build_libinput_ial_engine=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(singletouchkey,
|
||||
[ --enable-singletouchkey build the IAL engine based on single touch key <default=yes>],
|
||||
buid_singletouchkey_ial_engine=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(consoleial,
|
||||
[ --enable-consoleial build the console (Linux console) IAL engine <default=yes>],
|
||||
build_console_ial_engine=$enableval)
|
||||
@@ -1621,6 +1628,7 @@ case "$with_osname" in
|
||||
*)
|
||||
with_osname="linux"
|
||||
osname="Linux"
|
||||
use_shmopen="yes"
|
||||
AC_DEFINE(__LINUX__, 1,
|
||||
[Define if compile for Linux])
|
||||
;;
|
||||
@@ -2014,6 +2022,11 @@ if test "x$build_libinput_ial_engine" = "xyes"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$buid_singletouchkey_ial_engine" = "xyes"; then
|
||||
AC_DEFINE(_MGIAL_SINGLETOUCHKEY, 1,
|
||||
[Define if include single touch key IAL engine])
|
||||
fi
|
||||
|
||||
if test "x$build_console_ial_engine" = "xyes"; then
|
||||
AC_DEFINE(_MGIAL_CONSOLE, 1,
|
||||
[Define if include console (Linux console) IAL engine])
|
||||
@@ -2236,10 +2249,8 @@ if test "x$build_ttf_support" = "xyes"; then
|
||||
AC_DEFINE(_MGFONT_FT2, 1,
|
||||
[Define if support TrueType/OpenType fonts based on FreeType2])
|
||||
|
||||
with_ft2_includes=""
|
||||
AC_ARG_WITH(ft2_includes,
|
||||
[ --with-ft2-includes=DIR where the FreeType2 includes are],
|
||||
with_ft2_includes=$withval)
|
||||
[ --with-ft2-includes=DIR where the FreeType2 includes are])
|
||||
|
||||
if test "x$with_ft2_includes" = "x"; then
|
||||
FT2_INC_DIR="-I/usr/include/freetype2"
|
||||
@@ -2662,6 +2673,7 @@ AC_SUBST(MINIGUI_RUNMODE)
|
||||
AM_CONDITIONAL(MGRM_PROCESSES, test "x$runtime_mode" = "xprocs")
|
||||
AM_CONDITIONAL(MGRM_STANDALONE, test "x$runtime_mode" = "xsa")
|
||||
AM_CONDITIONAL(MGIAL_LIBINPUT, test "x$build_libinput_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_SINGLETOUCHKEY, test "x$buid_singletouchkey_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_CONSOLE, test "x$build_console_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_NEXUS, test "x$build_nexus_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_DLCUSTOM, test "x$build_dlcustom_ial_engine" = "xyes")
|
||||
@@ -2778,6 +2790,7 @@ AC_MSG_NOTICE([
|
||||
* pc_xvfb: ${enable_video_pc_xvfb}
|
||||
* usvfb: ${enable_video_usvfb}
|
||||
* libinput: ${build_libinput_ial_engine}
|
||||
* singletouchkey: ${buid_singletouchkey_ial_engine}
|
||||
* console: ${build_console_ial_engine}
|
||||
* comm: ${build_comm_ial_engine}
|
||||
|
||||
@@ -2798,6 +2811,8 @@ AC_MSG_NOTICE([
|
||||
* CPP flags: ${CPPFLAGS}
|
||||
* CC flags: ${CFLAGS}
|
||||
* CXX flags: ${CXXFLAGS}
|
||||
* FreeType2 includes: ${FT2_INC_DIR}
|
||||
* HarfBuzz includes: ${HB_INC_DIR}
|
||||
* Dep. libraries: ${DEP_LIBS}
|
||||
])
|
||||
|
||||
|
||||
@@ -83,6 +83,19 @@ double_buffering=true
|
||||
exdriver=libhidrmdrivers-0.2.so.0
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGIAL_SINGLETOUCHKEY
|
||||
[singletouchkey]
|
||||
# The touch device; use none to disable touch event.
|
||||
touch_dev=/dev/input/event0
|
||||
# The key device; use none to disable key event.
|
||||
key_dev=none
|
||||
# The number of keys; only valid if the key device is not `none` and can be opened.
|
||||
nr_keys=2
|
||||
# The maps from Linux keycode to MiniGUI scancode; only valid if `nr_keys` > 0.
|
||||
keycode2scancode0=20,1
|
||||
keycode2scancode1=50,2
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGIAL_LIBINPUT
|
||||
[libinput]
|
||||
seat=seat0
|
||||
|
||||
+3
-3
@@ -9992,7 +9992,7 @@ typedef Uint16 BreakOppo;
|
||||
* allocated by this function if it allocates the buffer.
|
||||
*
|
||||
* \param lang_code The language code; not used so far, reserved for future.
|
||||
* \param ctr The character transformation rule; see \a char_transform_rule.
|
||||
* \param ctr The character transformation rule; see \a char_transform_rules.
|
||||
* \param wbr The word breaking rule; see \a word_break_rules.
|
||||
* \param lbp The line breaking policy; see \a line_break_policies.
|
||||
* \param ucs The Uchar32 string.
|
||||
@@ -10017,7 +10017,7 @@ typedef Uint16 BreakOppo;
|
||||
*
|
||||
* \note Only available when support for UNICODE is enabled.
|
||||
*
|
||||
* \sa DrawGlyphStringEx, word_break_rules, char_transform_rule,
|
||||
* \sa DrawGlyphStringEx, word_break_rules, char_transform_rules,
|
||||
* line_break_policies
|
||||
*/
|
||||
MG_EXPORT int GUIAPI UStrGetBreaks(LanguageCode lang_code,
|
||||
@@ -13035,7 +13035,7 @@ MG_EXPORT int GUIAPI GetGlyphInfo (LOGFONT* logfont, Glyph32 glyph_value,
|
||||
*
|
||||
* \note Only available when support for UNICODE is enabled.
|
||||
*
|
||||
* \sa DrawGlyphStringEx, white_space_rules, char_transform_rule
|
||||
* \sa DrawGlyphStringEx, white_space_rules, char_transform_rules
|
||||
*
|
||||
* Since 4.0.0
|
||||
*/
|
||||
|
||||
+51
-17
@@ -101,9 +101,9 @@ extern "C" {
|
||||
#define ZOF_TYPE_NORMAL 0x30000000
|
||||
#define ZOF_TYPE_HIGHER 0x40000000
|
||||
#define ZOF_TYPE_DOCKER 0x50000000 // Since 5.0.0
|
||||
#define ZOF_TYPE_SCREENLOCK 0x60000000 // Since 5.0.0;
|
||||
#define ZOF_TYPE_SCREENLOCK 0x60000000 // Since 5.0.0
|
||||
#define ZOF_TYPE_GLOBAL 0x70000000
|
||||
#define ZOF_TYPE_TOOLTIP 0x80000000 // Since 5.0.0; fixed and only one.
|
||||
#define ZOF_TYPE_TOOLTIP 0x80000000 // Since 5.0.0
|
||||
#define ZOF_TYPE_POPUPMENU 0x90000000
|
||||
|
||||
#define ZOF_TYPE_BOTTOMMOST ZOF_TYPE_LAUNCHER
|
||||
@@ -669,21 +669,22 @@ typedef void (* ON_NEW_DEL_CLIENT) (int op, int cli);
|
||||
typedef void (* ON_CHANGE_LAYER) (int op, MG_Layer* layer,
|
||||
MG_Client* client);
|
||||
|
||||
#define ZNOP_ALLOCATE 1
|
||||
#define ZNOP_FREE 2
|
||||
#define ZNOP_MOVE2TOP 3
|
||||
#define ZNOP_SHOW 4
|
||||
#define ZNOP_HIDE 5
|
||||
#define ZNOP_MOVEWIN 6
|
||||
#define ZNOP_SETACTIVE 7
|
||||
#define ZNOP_ALLOCATE 1
|
||||
#define ZNOP_FREE 2
|
||||
#define ZNOP_MOVE2TOP 3
|
||||
#define ZNOP_SHOW 4
|
||||
#define ZNOP_HIDE 5
|
||||
#define ZNOP_MOVEWIN 6
|
||||
#define ZNOP_SETACTIVE 7
|
||||
|
||||
#define ZNOP_ENABLEWINDOW 11
|
||||
#define ZNOP_DISABLEWINDOW 12
|
||||
#define ZNOP_STARTDRAG 13
|
||||
#define ZNOP_CANCELDRAG 14
|
||||
#define ZNOP_CHANGECAPTION 15
|
||||
#define ZNOP_REGIONCHANGED 16
|
||||
#define ZNOP_COMPOSITINGCHANGED 17
|
||||
#define ZNOP_ENABLEWINDOW 11
|
||||
#define ZNOP_DISABLEWINDOW 12
|
||||
#define ZNOP_STARTDRAG 13
|
||||
#define ZNOP_CANCELDRAG 14
|
||||
#define ZNOP_CHANGECAPTION 15
|
||||
#define ZNOP_REGIONCHANGED 16
|
||||
#define ZNOP_COMPOSITINGCHANGED 17
|
||||
#define ZNOP_ICONCHANGED 18 /* reserved for future */
|
||||
|
||||
/**
|
||||
* \var typedef void (* ON_ZNODE_OPERATION) (int op, int cli, int idx_znode)
|
||||
@@ -889,6 +890,39 @@ MG_EXPORT BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer);
|
||||
*/
|
||||
MG_EXPORT BOOL GUIAPI ServerDeleteLayer (MG_Layer* layer);
|
||||
|
||||
/**
|
||||
* \fn int GUIAPI ServerGetTopmostZNodeOfType (MG_Layer* layer, DWORD type,
|
||||
* int* cli)
|
||||
* \brief Get the topmost z-node in the specified layer for the specific
|
||||
* window type from the server.
|
||||
*
|
||||
* This function gets the topmost z-node of the type specified by
|
||||
* \a type in the specified layer \a layer from the server.
|
||||
*
|
||||
* \param layer The pointer to the layer, NULL for the current topmost layer.
|
||||
* \param type The window type, can be one of the following values:
|
||||
* - ZOF_TYPE_TOOLTIP
|
||||
* - ZOF_TYPE_GLOBAL
|
||||
* - ZOF_TYPE_SCREENLOCK
|
||||
* - ZOF_TYPE_DOCKER
|
||||
* - ZOF_TYPE_HIGHER
|
||||
* - ZOF_TYPE_NORMAL
|
||||
* - ZOF_TYPE_LAUNCHER
|
||||
* \param cli The client identifier of the topmost z-node will be returned
|
||||
* through this pointer. NULL is okay.
|
||||
*
|
||||
* \return The index of the topmost z-node of the specified type.
|
||||
* Zero when there is no z-node in the level; < 0 when error.
|
||||
*
|
||||
* \note Server-only function. Note that this function will not return
|
||||
* the z-node of the desktop, and the desktop always has the z-node index
|
||||
* of zero.
|
||||
*
|
||||
* \sa ServerGetZNodeInfo
|
||||
*/
|
||||
MG_EXPORT int GUIAPI ServerGetTopmostZNodeOfType (MG_Layer* layer, DWORD type,
|
||||
int* cli);
|
||||
|
||||
/**
|
||||
* \fn int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode,
|
||||
* int* cli)
|
||||
@@ -1566,7 +1600,7 @@ typedef struct _CompositorOps {
|
||||
* a main window with the extended style WS_EX_AUTOPOSITION.
|
||||
*/
|
||||
void (*calc_mainwin_pos) (CompositorCtxt* ctxt, MG_Layer* layer,
|
||||
DWORD zt_type, int first_for_type, CALCPOSINFO* info);
|
||||
DWORD zt_type, int first_for_type, CALCPOSINFO* info, int cli);
|
||||
|
||||
/**
|
||||
* This operation will be called when there was a layer operation.
|
||||
|
||||
+41
-41
@@ -4280,39 +4280,62 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
||||
*/
|
||||
#define WS_DISABLED 0x04000000L
|
||||
|
||||
/* Main window states -- reserved for future use. */
|
||||
#define WS_MINIMIZE 0x02000000L
|
||||
#define WS_MAXIMIZE 0x01000000L
|
||||
/**
|
||||
* \def WS_VSCROLL
|
||||
* \brief Creates a window with vertical scroll bar.
|
||||
*/
|
||||
#define WS_VSCROLL 0x02000000L
|
||||
|
||||
/* bits in this mask are reuse for main windows and controls;
|
||||
bits have different meanings for main windows and controls.*/
|
||||
#define WS_REUSE_MASK 0x00E00000L
|
||||
/**
|
||||
* \def WS_HSCROLL
|
||||
* \brief Creates a window with horizontal scroll bar.
|
||||
*/
|
||||
#define WS_HSCROLL 0x01000000L
|
||||
|
||||
/* bits in this mask are both for main window and controls */
|
||||
#define WS_BORDER_MASK 0x00F00000L
|
||||
|
||||
/**
|
||||
* \def WS_DLGFRAME
|
||||
* \brief The main window has a fixed frame, i.e. user can not
|
||||
* drag the border of the window.
|
||||
*/
|
||||
#define WS_DLGFRAME 0x00800000L
|
||||
#define WS_DLGFRAME 0x00800000L
|
||||
|
||||
/**
|
||||
* \def WS_THICKFRAME
|
||||
* \brief Creates a main window with thick frame.
|
||||
*/
|
||||
#define WS_THICKFRAME 0x00400000L
|
||||
#define WS_THICKFRAME 0x00400000L
|
||||
|
||||
/**
|
||||
* \def WS_THINFRAME
|
||||
* \brief Creates a main window with thin frame.
|
||||
*/
|
||||
#define WS_THINFRAME 0x00200000L
|
||||
#define WS_THINFRAME 0x00200000L
|
||||
|
||||
/**
|
||||
* \def WS_BORDER
|
||||
* \brief Creates a window with border.
|
||||
*/
|
||||
#define WS_BORDER 0x00100000L
|
||||
|
||||
/* bits in this mask are reuse for main windows and controls;
|
||||
bits have different meanings for main windows and controls.*/
|
||||
#define WS_MISC_MASK 0x000F0000L
|
||||
|
||||
/**
|
||||
* \def WS_CHILD
|
||||
* \brief Indicates the window is a child.
|
||||
*/
|
||||
#define WS_CHILD 0x00080000L
|
||||
|
||||
/**
|
||||
* \def WS_GROUP
|
||||
* \brief Indicates the control is the leader of a group.
|
||||
* \note This style is valid only for controls.
|
||||
*/
|
||||
#define WS_GROUP 0x00800000L
|
||||
#define WS_GROUP 0x00040000L
|
||||
|
||||
/**
|
||||
* \def WS_TABSTOP
|
||||
@@ -4320,7 +4343,11 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
||||
* using Tab key.
|
||||
* \note This style is valid only for controls.
|
||||
*/
|
||||
#define WS_TABSTOP 0x00400000L
|
||||
#define WS_TABSTOP 0x00020000L
|
||||
|
||||
/* Main window states -- reserved for future use. */
|
||||
#define WS_MINIMIZE 0x00040000L
|
||||
#define WS_MAXIMIZE 0x00020000L
|
||||
|
||||
/**
|
||||
* \def WS_ALWAYSTOP
|
||||
@@ -4328,38 +4355,11 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
||||
*
|
||||
* Since 5.0.0.
|
||||
*/
|
||||
#define WS_ALWAYSTOP 0x00100000L
|
||||
|
||||
/* bits in this mask are both for main windows and controls */
|
||||
#define WS_MISC_MASK 0x000F0000L
|
||||
|
||||
/**
|
||||
* \def WS_CHILD
|
||||
* \brief Indicates the window is a child.
|
||||
*/
|
||||
#define WS_CHILD 0x00080000L
|
||||
|
||||
/**
|
||||
* \def WS_VSCROLL
|
||||
* \brief Creates a window with vertical scroll bar.
|
||||
*/
|
||||
#define WS_VSCROLL 0x00040000L
|
||||
|
||||
/**
|
||||
* \def WS_HSCROLL
|
||||
* \brief Creates a window with horizontal scroll bar.
|
||||
*/
|
||||
#define WS_HSCROLL 0x00020000L
|
||||
|
||||
/**
|
||||
* \def WS_BORDER
|
||||
* \brief Creates a window with border.
|
||||
*/
|
||||
#define WS_BORDER 0x00010000L
|
||||
#define WS_ALWAYSTOP 0x00010000L
|
||||
|
||||
/* Obsolete styles, back-compatibility definitions. */
|
||||
#define WS_OVERLAPPED 0x00000000L
|
||||
#define WS_ABSSCRPOS 0x00000000L
|
||||
#define WS_OVERLAPPED 0x00000000L
|
||||
#define WS_ABSSCRPOS 0x00000000L
|
||||
|
||||
#define WS_MAINWIN_ONLY_MASK (WS_CAPTIONBAR_MASK | WS_ALWAYSTOP)
|
||||
#define WS_CONTROL_ONLY_MASK (WS_CTRLMASK)
|
||||
|
||||
+2
-2
@@ -3165,8 +3165,8 @@ HWND GUIAPI GetNextChild (HWND hWnd, HWND hChild)
|
||||
|
||||
HWND GUIAPI GetNextMainWindow (HWND hMainWnd)
|
||||
{
|
||||
MG_CHECK_RET (hMainWnd == HWND_NULL || MG_IS_NORMAL_MAIN_WINDOW (hMainWnd),
|
||||
HWND_INVALID);
|
||||
MG_CHECK_RET (hMainWnd != HWND_NULL &&
|
||||
!MG_IS_NORMAL_MAIN_WINDOW (hMainWnd), HWND_INVALID);
|
||||
|
||||
return (HWND)SendMessage (HWND_DESKTOP,
|
||||
MSG_GETNEXTMAINWIN, (WPARAM)hMainWnd, 0L);
|
||||
|
||||
+3
-1
@@ -50,6 +50,7 @@ DFB_SRCS = dfb.h dfb.c
|
||||
|
||||
USVFB_SRCS = usvfbinput.c usvfbinput.h
|
||||
LIBINPUT_SRCS = linux-libinput.c linux-libinput.h
|
||||
SINGLETOUCHKEY_SRCS = singletouchkey.c singletouchkey.h
|
||||
|
||||
if MGIAL_CONSOLE
|
||||
native_libial_la_LIBADD = native/libnative.la
|
||||
@@ -76,4 +77,5 @@ libial_la_SOURCES = $(COMMON_SRCS) $(DUMMY_SRCS) $(JZ4740_SRCS) \
|
||||
$(COMMINPUT_SRCS) $(QVFB_SRCS) $(WVFB_SRCS) \
|
||||
$(QEMU_SRCS) $(IPAQ_H3600_SRCS) $(IPAQ_H5400_SRCS) \
|
||||
$(TSLIB_SRCS) $(SHANDONG_LIDE_SRCS) $(CISCO_TOUCHPAD_SRCS) \
|
||||
$(MSTAR_SRCS) $(DFB_SRCS) $(USVFB_SRCS) $(LIBINPUT_SRCS)
|
||||
$(MSTAR_SRCS) $(DFB_SRCS) $(USVFB_SRCS) $(LIBINPUT_SRCS) \
|
||||
$(SINGLETOUCHKEY_SRCS)
|
||||
|
||||
+7
-1
@@ -15,7 +15,7 @@
|
||||
* and Graphics User Interface (GUI) support system for embedded systems
|
||||
* and smart IoT devices.
|
||||
*
|
||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||
* Copyright (C) 2002~2020, Beijing FMSoft Technologies Co., Ltd.
|
||||
* Copyright (C) 1998~2002, WEI Yongming
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -133,6 +133,9 @@
|
||||
#ifdef _MGIAL_LIBINPUT
|
||||
#include "linux-libinput.h"
|
||||
#endif
|
||||
#ifdef _MGIAL_SINGLETOUCHKEY
|
||||
#include "singletouchkey.h"
|
||||
#endif
|
||||
|
||||
static INPUT inputs [] =
|
||||
{
|
||||
@@ -212,6 +215,9 @@ static INPUT inputs [] =
|
||||
#ifdef _MGIAL_LIBINPUT
|
||||
{"libinput", ial_InitLibInput, TermLibInput},
|
||||
#endif
|
||||
#ifdef _MGIAL_SINGLETOUCHKEY
|
||||
{"singletouchkey", ial_InitSingleTouchKey, TermSingleTouchKey},
|
||||
#endif
|
||||
/* ... end of general IAL engines */
|
||||
};
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
#include <sys/time.h>
|
||||
#include <linux/vt.h>
|
||||
#include <linux/kd.h>
|
||||
#include <linux/keyboard.h>
|
||||
|
||||
#include "gdi.h"
|
||||
#include "window.h"
|
||||
|
||||
@@ -67,8 +67,6 @@
|
||||
#include "gal.h"
|
||||
#include "native.h"
|
||||
|
||||
static const char* event_dev;
|
||||
|
||||
static int EVENT_Open(const char *);
|
||||
static void EVENT_Close(void);
|
||||
static void EVENT_GetModifierInfo(int *modifiers);
|
||||
@@ -85,6 +83,7 @@ KBDDEVICE kbddev_event = {
|
||||
EVENT_Resume
|
||||
};
|
||||
|
||||
static char* kbd_dev;
|
||||
static int kbd_fd; /* file descriptor for keyboard */
|
||||
|
||||
/*
|
||||
@@ -144,6 +143,7 @@ static int EVENT_Open (const char *device)
|
||||
if (kbd_fd < 0)
|
||||
return -1;
|
||||
|
||||
kbd_dev = strdup (device);
|
||||
return kbd_fd;
|
||||
}
|
||||
|
||||
@@ -153,8 +153,11 @@ static int EVENT_Open (const char *device)
|
||||
*/
|
||||
static void EVENT_Close(void)
|
||||
{
|
||||
close(kbd_fd);
|
||||
close (kbd_fd);
|
||||
kbd_fd = -1;
|
||||
|
||||
free (kbd_dev);
|
||||
kbd_dev = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -203,7 +206,8 @@ static int EVENT_Read(unsigned char *buf, int *modifiers)
|
||||
*/
|
||||
static void EVENT_Suspend(void)
|
||||
{
|
||||
EVENT_Close();
|
||||
close (kbd_fd);
|
||||
kbd_fd = -1;
|
||||
}
|
||||
|
||||
/* deactivate_keyboard:
|
||||
@@ -211,10 +215,12 @@ static void EVENT_Suspend(void)
|
||||
*/
|
||||
static int EVENT_Resume(void)
|
||||
{
|
||||
kbd_fd = open (event_dev, O_NONBLOCK);
|
||||
kbd_fd = open (kbd_dev, O_NONBLOCK);
|
||||
if (kbd_fd < 0) {
|
||||
return -1;
|
||||
}else{
|
||||
}
|
||||
else {
|
||||
return kbd_fd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
#include <linux/kd.h>
|
||||
#include <linux/keyboard.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT NOTICE
|
||||
//
|
||||
// The following open source license statement does not apply to any
|
||||
// entity in the Exception List published by FMSoft.
|
||||
//
|
||||
// For more information, please visit:
|
||||
//
|
||||
// https://www.fmsoft.cn/exception-list
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* and Graphics User Interface (GUI) support system for embedded systems
|
||||
* and smart IoT devices.
|
||||
*
|
||||
* Copyright (C) 2002~2020, Beijing FMSoft Technologies Co., Ltd.
|
||||
* Copyright (C) 1998~2002, WEI Yongming
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Or,
|
||||
*
|
||||
* As this program is a library, any link to this program must follow
|
||||
* GNU General Public License version 3 (GPLv3). If you cannot accept
|
||||
* GPLv3, you need to be licensed from FMSoft.
|
||||
*
|
||||
* If you have got a commercial license of this program, please use it
|
||||
* under the terms and conditions of the commercial license.
|
||||
*
|
||||
* For more information about the commercial license, please refer to
|
||||
* <http://www.minigui.com/blog/minigui-licensing-policy/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef _MGIAL_SINGLETOUCHKEY
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
#include "minigui.h"
|
||||
#include "misc.h"
|
||||
#include "ial.h"
|
||||
|
||||
#include "singletouchkey.h"
|
||||
|
||||
#define LEN_TOUCH_DEV 127
|
||||
|
||||
static int sg_tp_event_fd = -1, sg_key_event_fd = -1;
|
||||
static short MOUSEX = 0, MOUSEY = 0, MOUSEBUTTON = 0;
|
||||
|
||||
static int get_touch_data (short *x, short *y, short *button)
|
||||
{
|
||||
struct input_event data;
|
||||
|
||||
while (read (sg_tp_event_fd, &data, sizeof (data)) == sizeof (data)) {
|
||||
|
||||
/* do nothing for EV_SYN due to non-blocking read.
|
||||
if (data.type == EV_SYN) {
|
||||
if (data.code == SYN_REPORT) {
|
||||
return 0;
|
||||
}
|
||||
else if (data.code == SYN_MT_REPORT) {
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (data.type == EV_KEY) {
|
||||
switch (data.code) {
|
||||
case BTN_TOUCH:
|
||||
if (data.value > 0)
|
||||
*button = IAL_MOUSE_LEFTBUTTON;
|
||||
else
|
||||
*button = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
_WRN_PRINTF ("unknow event code for EV_KEY event: 0x%x, 0x%x\n", data.code, data.value);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (data.type == EV_ABS) {
|
||||
switch (data.code) {
|
||||
case ABS_X:
|
||||
*x = data.value;
|
||||
break;
|
||||
|
||||
case ABS_Y:
|
||||
*y = data.value;
|
||||
break;
|
||||
|
||||
case ABS_MT_POSITION_X:
|
||||
*x = data.value;
|
||||
break;
|
||||
|
||||
case ABS_MT_POSITION_Y:
|
||||
*y = data.value;
|
||||
break;
|
||||
|
||||
case ABS_MT_TOUCH_MAJOR:
|
||||
break;
|
||||
|
||||
case ABS_MT_WIDTH_MAJOR:
|
||||
break;
|
||||
|
||||
case ABS_MT_TRACKING_ID:
|
||||
break;
|
||||
|
||||
default:
|
||||
_WRN_PRINTF ("unknow event code for EV_ABS event: 0x%x, 0x%x.\n", data.code, data.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mouse_update (void)
|
||||
{
|
||||
if (get_touch_data (&MOUSEX, &MOUSEY, &MOUSEBUTTON) == 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mouse_getxy (int *x, int* y)
|
||||
{
|
||||
*x = MOUSEX;
|
||||
*y = MOUSEY;
|
||||
}
|
||||
|
||||
static int mouse_getbutton (void)
|
||||
{
|
||||
if (MOUSEBUTTON == IAL_MOUSE_LEFTBUTTON)
|
||||
return IAL_MOUSE_LEFTBUTTON;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wait_event (int which, int maxfd, fd_set *in, fd_set *out, fd_set *except,
|
||||
struct timeval *timeout)
|
||||
{
|
||||
fd_set rfds;
|
||||
int e;
|
||||
int retvalue = 0;
|
||||
|
||||
if (!in) {
|
||||
in = &rfds;
|
||||
FD_ZERO (in);
|
||||
}
|
||||
|
||||
FD_SET (sg_tp_event_fd, in);
|
||||
if (sg_tp_event_fd > maxfd)
|
||||
maxfd = sg_tp_event_fd;
|
||||
|
||||
if (sg_key_event_fd >= 0) {
|
||||
FD_SET (sg_key_event_fd, in);
|
||||
if (sg_key_event_fd > maxfd)
|
||||
maxfd = sg_key_event_fd;
|
||||
}
|
||||
|
||||
e = select (maxfd + 1, in, out, except, timeout);
|
||||
if (e > 0) {
|
||||
if (FD_ISSET (sg_tp_event_fd, in)) {
|
||||
retvalue |= IAL_MOUSEEVENT;
|
||||
}
|
||||
if (sg_key_event_fd >= 0 && FD_ISSET (sg_key_event_fd, in)) {
|
||||
retvalue |= IAL_KEYEVENT;
|
||||
}
|
||||
}
|
||||
else if (e < 0) {
|
||||
retvalue = -1;
|
||||
}
|
||||
else {
|
||||
retvalue = 0;
|
||||
}
|
||||
|
||||
return retvalue;
|
||||
}
|
||||
|
||||
BOOL ial_InitSingleTouchKey (INPUT* input, const char* mdev, const char* mtype)
|
||||
{
|
||||
char touch_dev[LEN_TOUCH_DEV + 1];
|
||||
if (GetMgEtcValue ("singletouchkey", "touch_dev", touch_dev, LEN_TOUCH_DEV) < 0) {
|
||||
strcpy (touch_dev, "none");
|
||||
}
|
||||
|
||||
if (strcmp (touch_dev, "none") == 0) {
|
||||
_WRN_PRINTF ("no touch_dev defined.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
sg_tp_event_fd = open (touch_dev, O_RDONLY | O_NONBLOCK);
|
||||
if (sg_tp_event_fd < 0) {
|
||||
_WRN_PRINTF ("failed when opening touch event device: %s\n", touch_dev);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
input->update_mouse = mouse_update;
|
||||
input->get_mouse_xy = mouse_getxy;
|
||||
input->set_mouse_xy = NULL;
|
||||
input->get_mouse_button = mouse_getbutton;
|
||||
input->set_mouse_range = NULL;
|
||||
input->suspend_mouse= NULL;
|
||||
input->resume_mouse = NULL;
|
||||
|
||||
input->update_keyboard = NULL;
|
||||
input->get_keyboard_state = NULL;
|
||||
input->suspend_keyboard = NULL;
|
||||
input->resume_keyboard = NULL;
|
||||
input->set_leds = NULL;
|
||||
|
||||
input->wait_event = wait_event;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TermSingleTouchKey (void)
|
||||
{
|
||||
if (sg_tp_event_fd >= 0)
|
||||
close (sg_tp_event_fd);
|
||||
|
||||
if (sg_key_event_fd >= 0)
|
||||
close (sg_key_event_fd);
|
||||
}
|
||||
|
||||
#endif /* _MGIAL_SINGLETOUCHKEY */
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT NOTICE
|
||||
//
|
||||
// The following open source license statement does not apply to any
|
||||
// entity in the Exception List published by FMSoft.
|
||||
//
|
||||
// For more information, please visit:
|
||||
//
|
||||
// https://www.fmsoft.cn/exception-list
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* and Graphics User Interface (GUI) support system for embedded systems
|
||||
* and smart IoT devices.
|
||||
*
|
||||
* Copyright (C) 2002~2020, Beijing FMSoft Technologies Co., Ltd.
|
||||
* Copyright (C) 1998~2002, WEI Yongming
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Or,
|
||||
*
|
||||
* As this program is a library, any link to this program must follow
|
||||
* GNU General Public License version 3 (GPLv3). If you cannot accept
|
||||
* GPLv3, you need to be licensed from FMSoft.
|
||||
*
|
||||
* If you have got a commercial license of this program, please use it
|
||||
* under the terms and conditions of the commercial license.
|
||||
*
|
||||
* For more information about the commercial license, please refer to
|
||||
* <http://www.minigui.com/blog/minigui-licensing-policy/>.
|
||||
*/
|
||||
/*
|
||||
** linux-libinput.h: the head file of the IAL engine based on libinput.
|
||||
**
|
||||
** Created by Wei YongMing, 2019/06/10
|
||||
*/
|
||||
|
||||
#ifndef GUI_IAL_SINGLETOUCHKEY_H
|
||||
#define GUI_IAL_SINGLETOUCHKEY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
BOOL ial_InitSingleTouchKey (INPUT* input, const char* mdev, const char* mtype);
|
||||
void TermSingleTouchKey (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* GUI_IAL_SINGLETOUCHKEY_H */
|
||||
|
||||
|
||||
@@ -532,7 +532,7 @@ static void rebuild_wins_region (CompositorCtxt* ctxt)
|
||||
}
|
||||
|
||||
static void calc_mainwin_pos (CompositorCtxt* ctxt, MG_Layer* layer,
|
||||
DWORD zt_type, int first_for_type, CALCPOSINFO* info)
|
||||
DWORD zt_type, int first_for_type, CALCPOSINFO* info, int cli)
|
||||
{
|
||||
/* give a default size first */
|
||||
if (IsRectEmpty (&info->rc)) {
|
||||
@@ -711,7 +711,7 @@ static BOOL merge_dirty_wpp (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
return rc;
|
||||
}
|
||||
|
||||
BOOL refresh_dirty_region (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
static BOOL refresh_dirty_region (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
{
|
||||
/* the fallback compositor only manages znodes on the topmost layer. */
|
||||
if (layer != mgTopmostLayer || IsEmptyClipRgn (&ctxt->dirty_rgn))
|
||||
@@ -902,6 +902,7 @@ static void on_changed_rgn (CompositorCtxt* ctxt, MG_Layer* layer,
|
||||
assert (znode_hdr);
|
||||
|
||||
if (!(znode_hdr->flags & ZNIF_VISIBLE)) {
|
||||
_DBG_PRINTF("not a visible window\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -377,16 +377,16 @@ void __mg_composite_dirty_znodes (void)
|
||||
|
||||
#endif /* optimized */
|
||||
|
||||
static void purge_znodes_private_data_in_layer (const CompositorOps* ops,
|
||||
CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
static void purge_all_znodes_private_data (const CompositorOps* ops,
|
||||
CompositorCtxt* ctxt)
|
||||
{
|
||||
ZORDERINFO* zi;
|
||||
ZORDERNODE* nodes;
|
||||
int i, next;
|
||||
MG_Layer* layer;
|
||||
|
||||
zi = (ZORDERINFO*)layer->zorder_info;
|
||||
|
||||
// travel popup menu znodes
|
||||
/* travel menu znodes on the topmost layer */
|
||||
zi = (ZORDERINFO*)mgTopmostLayer->zorder_info;
|
||||
if (zi->nr_popupmenus > 0) {
|
||||
nodes = GET_MENUNODE(zi);
|
||||
for (i = 0; i < zi->nr_popupmenus; i++) {
|
||||
@@ -397,25 +397,56 @@ static void purge_znodes_private_data_in_layer (const CompositorOps* ops,
|
||||
}
|
||||
}
|
||||
|
||||
// travel window znodes
|
||||
nodes = GET_ZORDERNODE(zi);
|
||||
next = 0;
|
||||
while ((next = __kernel_get_next_znode (zi, next)) > 0) {
|
||||
if (nodes[next].priv_data && ops->purge_win_data) {
|
||||
ops->purge_win_data (ctxt, layer, next, nodes[next].priv_data);
|
||||
nodes[next].priv_data = NULL;
|
||||
/* travel all window znodes in all layers */
|
||||
layer = mgLayers;
|
||||
while (layer) {
|
||||
zi = (ZORDERINFO*)layer->zorder_info;
|
||||
nodes = GET_ZORDERNODE(zi);
|
||||
|
||||
next = 0;
|
||||
while ((next = __kernel_get_next_znode (zi, next)) > 0) {
|
||||
if (nodes[next].priv_data && ops->purge_win_data) {
|
||||
ops->purge_win_data (ctxt, layer, next, nodes[next].priv_data);
|
||||
nodes[next].priv_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
layer = layer->next;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void purge_all_znodes_private_data (const CompositorOps* ops,
|
||||
static void rebuild_all_znodes_private_data (const CompositorOps* ops,
|
||||
CompositorCtxt* ctxt)
|
||||
{
|
||||
ZORDERINFO* zi;
|
||||
ZORDERNODE* nodes;
|
||||
int i, next;
|
||||
MG_Layer* layer;
|
||||
|
||||
/* travel menu znodes on the topmost layer */
|
||||
zi = (ZORDERINFO*)mgTopmostLayer->zorder_info;
|
||||
if (zi->nr_popupmenus > 0) {
|
||||
nodes = GET_MENUNODE(zi);
|
||||
for (i = 0; i < zi->nr_popupmenus; i++) {
|
||||
if (nodes[i].flags & ZOF_VISIBLE) {
|
||||
ops->on_showing_ppp (ctxt, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* travel all window znodes in all layers */
|
||||
layer = mgLayers;
|
||||
while (layer) {
|
||||
purge_znodes_private_data_in_layer (ops, ctxt, layer);
|
||||
zi = (ZORDERINFO*)layer->zorder_info;
|
||||
nodes = GET_ZORDERNODE(zi);
|
||||
|
||||
next = 0;
|
||||
while ((next = __kernel_get_next_znode (zi, next)) > 0) {
|
||||
if (nodes[next].flags & ZOF_VISIBLE) {
|
||||
ops->on_showing_win (ctxt, layer, next);
|
||||
}
|
||||
}
|
||||
|
||||
layer = layer->next;
|
||||
}
|
||||
}
|
||||
@@ -539,6 +570,9 @@ const CompositorOps* GUIAPI ServerSelectCompositor (const char* name,
|
||||
}
|
||||
curr_ops = ops;
|
||||
curr_ctxt = ctxt;
|
||||
|
||||
/* Since 5.0.3, to rebuild the private data of visible znodes */
|
||||
rebuild_all_znodes_private_data (curr_ops, curr_ctxt);
|
||||
curr_ops->refresh (ctxt);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ static HCURSOR load_cursor_from_file (const char* filename)
|
||||
{
|
||||
FILE* fp;
|
||||
WORD16 wTemp;
|
||||
int w, h, xhot, yhot, colornum;
|
||||
int w=0, h=0, xhot=0, yhot=0, colornum=0;
|
||||
#if 0
|
||||
DWORD32 size;
|
||||
#endif
|
||||
@@ -152,7 +152,7 @@ static HCURSOR load_cursor_from_mem (const void* area)
|
||||
const Uint8* p = (Uint8*)area;
|
||||
WORD16 wTemp;
|
||||
|
||||
int w, h, xhot, yhot, colornum;
|
||||
int w=0, h=0, xhot=0, yhot=0, colornum=0;
|
||||
#if 0
|
||||
DWORD32 size;
|
||||
#endif
|
||||
|
||||
+24
-16
@@ -1356,6 +1356,10 @@ intptr_t __mg_do_zorder_maskrect_operation (int cli,
|
||||
get_layer_from_client (cli), info->idx_znode, &rc_org_bound);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
_ERR_PRINTF("KERNEL: failed in __mg_do_zorder_maskrect_operation\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4536,7 +4540,7 @@ BOOL GUIAPI ServerGetWinZNodeRegion (MG_Layer* layer, int idx_znode,
|
||||
DWORD rgn_ops, CLIPRGN* dst_rgn)
|
||||
{
|
||||
RECT rc;
|
||||
MASKRECT *maskrect;
|
||||
MASKRECT *firstmaskrect = NULL, *maskrect;
|
||||
ZORDERNODE* nodes;
|
||||
ZORDERINFO* zi;
|
||||
int idx, nr_mask_rects;
|
||||
@@ -4568,33 +4572,37 @@ BOOL GUIAPI ServerGetWinZNodeRegion (MG_Layer* layer, int idx_znode,
|
||||
|
||||
nr_mask_rects = 0;
|
||||
nodes = GET_ZORDERNODE(zi);
|
||||
maskrect = GET_MASKRECT(zi);
|
||||
firstmaskrect = GET_MASKRECT(zi);
|
||||
idx = nodes [idx_znode].idx_mask_rect;
|
||||
|
||||
while (idx) {
|
||||
maskrect = firstmaskrect + idx;
|
||||
rc.left = maskrect->left;
|
||||
rc.top = maskrect->top;
|
||||
rc.right = maskrect->left;
|
||||
rc.right = maskrect->right;
|
||||
rc.bottom = maskrect->bottom;
|
||||
|
||||
if (rgn_ops & RGN_OP_FLAG_ABS) {
|
||||
OffsetRect (&rc, nodes[idx_znode].rc.left, nodes[idx_znode].rc.top);
|
||||
}
|
||||
if (!IsRectEmpty (&rc)) {
|
||||
if (rgn_ops & RGN_OP_FLAG_ABS) {
|
||||
OffsetRect (&rc, nodes[idx_znode].rc.left, nodes[idx_znode].rc.top);
|
||||
}
|
||||
|
||||
if ((rgn_ops & RGN_OP_MASK) == RGN_OP_EXCLUDE) {
|
||||
if (!SubtractClipRect (dst_rgn, &rc)) {
|
||||
nr_mask_rects = -1;
|
||||
goto __mg_err_ret;
|
||||
if ((rgn_ops & RGN_OP_MASK) == RGN_OP_EXCLUDE) {
|
||||
if (!SubtractClipRect (dst_rgn, &rc)) {
|
||||
nr_mask_rects = -1;
|
||||
goto __mg_err_ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!AddClipRect (dst_rgn, &rc)) {
|
||||
nr_mask_rects = -1;
|
||||
goto __mg_err_ret;
|
||||
else {
|
||||
if (!AddClipRect (dst_rgn, &rc)) {
|
||||
nr_mask_rects = -1;
|
||||
goto __mg_err_ret;
|
||||
}
|
||||
}
|
||||
nr_mask_rects ++;
|
||||
}
|
||||
|
||||
idx = maskrect->next;
|
||||
nr_mask_rects ++;
|
||||
}
|
||||
|
||||
if (nr_mask_rects == 0) {
|
||||
|
||||
@@ -2578,6 +2578,8 @@ static DWORD get_znode_flags_from_style (PMAINWIN pWin)
|
||||
return zt_type;
|
||||
}
|
||||
|
||||
/* TODO: this function should be optimized to avoid allocating space for
|
||||
invalid (empty) mask rectangles */
|
||||
static int AllocZOrderMaskRect (int cli, int idx_znode,
|
||||
int flags, const RECT4MASK *rc, const int nr_rc)
|
||||
{
|
||||
@@ -2599,24 +2601,24 @@ static int AllocZOrderMaskRect (int cli, int idx_znode,
|
||||
/*get mask rect number*/
|
||||
idx = nodes[idx_znode].idx_mask_rect;
|
||||
|
||||
while(idx) {
|
||||
while (idx) {
|
||||
old_num++;
|
||||
idx = ((MASKRECT *)(firstmaskrect+idx))->next;
|
||||
idx = ((MASKRECT *)(firstmaskrect + idx))->next;
|
||||
}
|
||||
|
||||
if (nr_rc > old_num) {
|
||||
/* check the number of mask rect if enough */
|
||||
int idle =
|
||||
__mg_get_nr_idle_slots((unsigned char*)GET_MASKRECT_USAGEBMP(zi),
|
||||
__mg_get_nr_idle_slots ((unsigned char*)GET_MASKRECT_USAGEBMP(zi),
|
||||
zi->size_maskrect_usage_bmp);
|
||||
if (idle < nr_rc-old_num) {
|
||||
if (idle < nr_rc - old_num) {
|
||||
unlock_zi_for_change (zi);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*add new space to Znode*/
|
||||
idx = nodes[idx_znode].idx_mask_rect;
|
||||
for(i = 0; i < nr_rc-old_num; i++) {
|
||||
for (i = 0; i < nr_rc - old_num; i++) {
|
||||
free_slot = __mg_lookfor_unused_slot (
|
||||
(unsigned char*)GET_MASKRECT_USAGEBMP(zi),
|
||||
zi->size_maskrect_usage_bmp, 1);
|
||||
@@ -4408,7 +4410,7 @@ static int dskCalculateDefaultPosition (int cli, CALCPOSINFO* info)
|
||||
|
||||
#ifdef _MGSCHEMA_COMPOSITING /* not defined _MGSCHEMA_COMPOSITING */
|
||||
DO_COMPSOR_OP_ARGS (calc_mainwin_pos,
|
||||
__mg_get_layer_from_zi(zi), zt_type, first, info);
|
||||
__mg_get_layer_from_zi(zi), zt_type, first, info, cli);
|
||||
#else /* defined _MGSCHEMA_COMPOSITING */
|
||||
/* give a default size first */
|
||||
if (IsRectEmpty (&info->rc)) {
|
||||
|
||||
@@ -140,6 +140,8 @@ static BOOL allocate_more_fd_slots (MSGQUEUE* msg_queue)
|
||||
msg_queue->fd_slots[i] = NULL;
|
||||
}
|
||||
msg_queue->nr_fd_slots += MAX_NR_LISTEN_FD;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -213,8 +215,11 @@ BOOL GUIAPI RegisterListenFD (int fd, int type, HWND hwnd, void* context)
|
||||
}
|
||||
}
|
||||
|
||||
if (ok && msg_queue->maxfd < fd) {
|
||||
msg_queue->maxfd = fd;
|
||||
if (ok) {
|
||||
if (msg_queue->maxfd < fd) {
|
||||
msg_queue->maxfd = fd;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ libkernel_la_SOURCES = timer.c \
|
||||
desktop-ths.c desktop-sa.c desktop-procs.c \
|
||||
cursor.c cursor-procs.c cursor-sa.c \
|
||||
sharedres.c \
|
||||
message.c event.c \
|
||||
message.c event.c listenfd.c \
|
||||
blockheap.c fixstr.c slotset.c zorder.c
|
||||
endif
|
||||
|
||||
|
||||
+1
-1
@@ -362,7 +362,7 @@ static void mg_slice_init_nomessage (void)
|
||||
sys_page_size = system_info.dwPageSize;
|
||||
}
|
||||
#else
|
||||
sys_page_size = sysconf (_SC_PAGESIZE); /* = sysconf (_SC_PAGE_SIZE); = getpagesize(); */
|
||||
sys_page_size = getpagesize(); /* = sysconf (_SC_PAGE_SIZE); = getpagesize(); */
|
||||
#endif
|
||||
mem_assert (sys_page_size >= 2 * LARGEALIGNMENT);
|
||||
mem_assert ((sys_page_size & (sys_page_size - 1)) == 0);
|
||||
|
||||
@@ -13,6 +13,7 @@ MINIGUILIB=libminigui-$(MINIGUI_VER)
|
||||
# specific defines
|
||||
|
||||
COMM_LDADD= \
|
||||
standalone/libstandalone.$(LIBA) \
|
||||
libc/liblibc.$(LIBA) \
|
||||
misc/libmisc.$(LIBA) \
|
||||
control/libcontrol.$(LIBA) \
|
||||
|
||||
@@ -5,15 +5,12 @@ EXTRA_DIST= misc.c systext.c rwops.c endianrw.c nposix.c clipboard.c \
|
||||
math.c about.c error.c sockio.c rc4.c rc4.h \
|
||||
makefile.ng makefile.msvc
|
||||
|
||||
LITE_SRCS=error.c sockio.c
|
||||
|
||||
|
||||
if MG_MINIMALGDI
|
||||
libmisc_la_SOURCES = misc.c math.c rwops.c nposix.c
|
||||
else
|
||||
libmisc_la_SOURCES = misc.c systext.c rwops.c endianrw.c nposix.c clipboard.c \
|
||||
math.c about.c license.c anon_file.c rbtree.c map.c \
|
||||
$(LITE_SRCS)
|
||||
error.c sockio.c
|
||||
endif
|
||||
|
||||
SRC_FILES = $(libmisc_la_SOURCES)
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
#include <linux/memfd.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
@@ -4,18 +4,15 @@ INCLUDES = -I$(abs_top_srcdir)/include -I$(abs_top_srcdir)/src/include
|
||||
noinst_LTLIBRARIES = libmisc.la
|
||||
|
||||
EXTRA_DIST= misc.c systext.c rwops.c endianrw.c nposix.c clipboard.c \
|
||||
math.c about.c error.c sockio.c listenfd.c rc4.c rc4.h \
|
||||
makefile.ng makefile.msvc
|
||||
|
||||
LITE_SRCS=error.c sockio.c listenfd.c
|
||||
|
||||
math.c about.c error.c sockio.c rc4.c rc4.h \
|
||||
makefile.ng makefile.msvc
|
||||
|
||||
ifdef MG_MINIMALGDI
|
||||
libmisc_la_SOURCES = misc.c math.c rwops.c nposix.c
|
||||
else
|
||||
libmisc_la_SOURCES = misc.c systext.c rwops.c endianrw.c nposix.c clipboard.c \
|
||||
math.c about.c license.c \
|
||||
$(LITE_SRCS)
|
||||
math.c about.c license.c anon_file.c rbtree.c map.c \
|
||||
error.c sockio.c
|
||||
endif
|
||||
|
||||
SRC_FILES = $(libmisc_la_SOURCES)
|
||||
|
||||
+3
-1
@@ -414,6 +414,7 @@ unsigned int __mg_os_get_random_seed (void)
|
||||
unsigned int rt_tick_get(void);
|
||||
return rt_tick_get();
|
||||
#elif defined (__FREERTOS__)
|
||||
return 0; // just return zero for now.
|
||||
#else
|
||||
/*other os use time, for example: linux, OSE, etc.*/
|
||||
return time (NULL);
|
||||
@@ -451,7 +452,8 @@ void __mg_os_time_delay (int ms)
|
||||
extern int rt_thread_mdelay(int ms);
|
||||
rt_thread_mdelay(ms);
|
||||
#elif defined (__FREERTOS__)
|
||||
#error "Please implement __mg_os_time_delay for your OS"
|
||||
extern void vTaskDelay(int xTicksToDelay);
|
||||
vTaskDelay(ms);
|
||||
#else
|
||||
#error "Please implement __mg_os_time_delay for your OS"
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
#include <linux/version.h>
|
||||
#include <linux/vt.h>
|
||||
#include <linux/kd.h>
|
||||
#include <linux/keyboard.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "minigui.h"
|
||||
|
||||
@@ -4413,6 +4413,9 @@ static void travel_children_with_priv_cdc (struct _travel_context* ctxt)
|
||||
|
||||
child = (PCONTROL)(ctxt->parent->children);
|
||||
while (child) {
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
child->surf = ctxt->surface;
|
||||
#endif
|
||||
|
||||
if (child->privCDC) {
|
||||
ctxt->cb (ctxt, child);
|
||||
|
||||
@@ -635,6 +635,30 @@ BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer)
|
||||
if (mgTopmostLayer && mgTopmostLayer->cli_head)
|
||||
IsPaint = 1;
|
||||
|
||||
// add by gengyue for swtich layer <<<<<<<<
|
||||
int cur_clientId = 0;
|
||||
int idx_topmost = ServerGetTopmostZNodeOfType(mgTopmostLayer, ZOF_TYPE_NORMAL, &cur_clientId);
|
||||
int znode_index = 0;
|
||||
if(idx_topmost > 0)
|
||||
{
|
||||
// get the number of app in normal level
|
||||
znode_index = ServerGetNextZNode(mgTopmostLayer, 0, &cur_clientId);
|
||||
while(znode_index > 0)
|
||||
{
|
||||
ZNODEINFO znodeinfo;
|
||||
|
||||
if(ServerGetZNodeInfo(NULL, znode_index, &znodeinfo))
|
||||
{
|
||||
if((znodeinfo.type & ZOF_TYPE_MASK) == ZOF_TYPE_NORMAL) // it the main window in normal level
|
||||
{
|
||||
DO_COMPSOR_OP_ARGS (on_hiding_win, mgTopmostLayer, znode_index);
|
||||
}
|
||||
}
|
||||
znode_index = ServerGetNextZNode(mgTopmostLayer, znode_index, &cur_clientId);
|
||||
}
|
||||
}
|
||||
// >>>>>>>>> add by gengyue for swtich layer
|
||||
|
||||
mgTopmostLayer = layer;
|
||||
CHANGE_TOPMOST_LAYER (layer);
|
||||
|
||||
@@ -649,6 +673,30 @@ BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer)
|
||||
client = client->next;
|
||||
}
|
||||
|
||||
// add by gengyue for swtich layer <<<<<<<<
|
||||
cur_clientId = 0;
|
||||
idx_topmost = ServerGetTopmostZNodeOfType(mgTopmostLayer, ZOF_TYPE_NORMAL, &cur_clientId);
|
||||
znode_index = 0;
|
||||
if(idx_topmost > 0)
|
||||
{
|
||||
// get the number of app in normal level
|
||||
znode_index = ServerGetNextZNode(mgTopmostLayer, 0, &cur_clientId);
|
||||
while(znode_index > 0)
|
||||
{
|
||||
ZNODEINFO znodeinfo;
|
||||
|
||||
if(ServerGetZNodeInfo(NULL, znode_index, &znodeinfo))
|
||||
{
|
||||
if((znodeinfo.type & ZOF_TYPE_MASK) == ZOF_TYPE_NORMAL) // it the main window in normal level
|
||||
{
|
||||
DO_COMPSOR_OP_ARGS (on_showing_win, mgTopmostLayer, znode_index);
|
||||
}
|
||||
}
|
||||
znode_index = ServerGetNextZNode(mgTopmostLayer, znode_index, &cur_clientId);
|
||||
}
|
||||
}
|
||||
// >>>>>>>>> add by gengyue for swtich layer
|
||||
|
||||
/* Notify that a new topmost layer have been set. */
|
||||
if (OnChangeLayer)
|
||||
OnChangeLayer (LCO_TOPMOST_CHANGED, mgTopmostLayer, NULL);
|
||||
@@ -742,6 +790,34 @@ void GUIAPI UpdateTopmostLayer (const RECT* dirty_rc)
|
||||
SendMessage (HWND_DESKTOP, MSG_PAINT, 0, 0);
|
||||
}
|
||||
|
||||
int GUIAPI ServerGetTopmostZNodeOfType (MG_Layer* layer, DWORD type, int* cli)
|
||||
{
|
||||
ZORDERINFO* zi;
|
||||
int topmost;
|
||||
|
||||
if (layer == NULL)
|
||||
layer = mgTopmostLayer;
|
||||
else if (!__mg_is_valid_layer (layer))
|
||||
return -1;
|
||||
|
||||
if (type < ZOF_TYPE_LAUNCHER || type > ZOF_TYPE_TOOLTIP)
|
||||
return -1;
|
||||
|
||||
zi = (ZORDERINFO*)layer->zorder_info;
|
||||
topmost = zi->first_in_levels [(ZOF_TYPE_TOOLTIP - type) >> 28];
|
||||
if (topmost <= 0) {
|
||||
return 0;
|
||||
}
|
||||
else if (cli) {
|
||||
ZORDERNODE* nodes;
|
||||
|
||||
nodes = GET_ZORDERNODE(zi);
|
||||
*cli = nodes [topmost].cli;
|
||||
}
|
||||
|
||||
return topmost;
|
||||
}
|
||||
|
||||
int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode, int* cli)
|
||||
{
|
||||
ZORDERINFO* zi;
|
||||
|
||||
@@ -570,9 +570,8 @@ static int sigma8654_client_get_surface(int cli, int clifd, void* buff, size_t l
|
||||
REQ_SIGMA8654_GETSURFACE *request;
|
||||
REP_SIGMA8654_GETSURFACE reply;
|
||||
|
||||
if (Sigma8654_ServerOnGetSurface(request, &reply) < 0)
|
||||
{
|
||||
fprintf(stderr, "Nexus_ServerOnGetSurface() failed\n");
|
||||
if (Sigma8654_ServerOnGetSurface(request, &reply) < 0) {
|
||||
_ERR_PRINTF ("Nexus_ServerOnGetSurface() failed\n");
|
||||
return -1;
|
||||
}
|
||||
return ServerSendReply (clifd, &reply, sizeof (reply));
|
||||
@@ -590,7 +589,7 @@ static int nexus_client_get_surface(int cli, int clifd, void* buff, size_t len)
|
||||
|
||||
if (Nexus_ServerOnGetSurface(request, &reply) < 0)
|
||||
{
|
||||
fprintf(stderr, "Nexus_ServerOnGetSurface() failed\n");
|
||||
_ERR_PRINTF ("Nexus_ServerOnGetSurface() failed\n");
|
||||
return -1;
|
||||
}
|
||||
return ServerSendReply (clifd, &reply, sizeof (reply));
|
||||
|
||||
+9
-1
@@ -403,8 +403,16 @@ BOOL server_IdleHandler4Server (PMSGQUEUE msg_queue, BOOL wait)
|
||||
|
||||
/* It is time to check event again. */
|
||||
if (errno == EINTR) {
|
||||
if (wait)
|
||||
if (wait) {
|
||||
ParseEvent (msg_queue, 0);
|
||||
|
||||
/* Since 5.0.3: Always check timers */
|
||||
nevts += __mg_check_expired_timers (msg_queue,
|
||||
SHAREDRES_TIMER_COUNTER - msg_queue->old_tick_count);
|
||||
msg_queue->old_tick_count = SHAREDRES_TIMER_COUNTER;
|
||||
return (nevts > 0);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
abs_top_srcdir=../..
|
||||
|
||||
INCLUDES = -I$(abs_top_srcdir)/src/include -I$(abs_top_srcdir)/include
|
||||
|
||||
noinst_LTLIBRARIES = libstandalone.la
|
||||
|
||||
|
||||
libstandalone_la_SOURCES = standalone.c
|
||||
|
||||
|
||||
SRC_FILES = $(libstandalone_la_SOURCES)
|
||||
LIB_NAME=libstandalone
|
||||
|
||||
|
||||
|
||||
include ../../rules.make
|
||||
+3
-3
@@ -70,10 +70,10 @@ static char* _system_keys[]={
|
||||
};
|
||||
static char* _system_values[]={
|
||||
// GAL engine and default options
|
||||
"pc_xvfb",
|
||||
"800x600-16bpp",
|
||||
"commlcd",
|
||||
"160x80-16bpp",
|
||||
// IAL engine
|
||||
"pc_xvfb",
|
||||
"comm",
|
||||
"/dev/input/mice",
|
||||
"IMPS2"
|
||||
};
|
||||
|
||||
+24
-14
@@ -617,38 +617,39 @@ int UnregisterResType(int type)
|
||||
return RES_RET_OK;
|
||||
}
|
||||
|
||||
#ifdef HAVE_ACCESS
|
||||
static char* get_res_file(const char* res_name, char* filename)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (res_name == NULL || filename == NULL)
|
||||
return NULL;
|
||||
|
||||
//test it is a full path or not
|
||||
for(i=0; res_name[i] && res_name[i] == '/'; i++);
|
||||
if(i>0) //is full path
|
||||
{
|
||||
for (i = 0; res_name[i] && res_name[i] == '/'; i++);
|
||||
|
||||
if (i > 0) { // full path
|
||||
#ifndef __NOUNIX__
|
||||
struct stat buf;
|
||||
if(stat(res_name, &buf) == 0
|
||||
&& !S_ISDIR(buf.st_mode)
|
||||
&& (buf.st_mode&S_IRUSR))
|
||||
if(stat (res_name, &buf) == 0
|
||||
&& !S_ISDIR(buf.st_mode)
|
||||
&& (buf.st_mode&S_IRUSR))
|
||||
#endif
|
||||
{
|
||||
return (char*)res_name;
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; res_paths[i]; i++) {
|
||||
for (i = 0; res_paths[i]; i++) {
|
||||
#ifndef __NOUNIX__
|
||||
struct stat buf;
|
||||
sprintf(filename,"%s/%s", res_paths[i], res_name);
|
||||
if(stat(filename, &buf) == 0 && !S_ISDIR(buf.st_mode) && (buf.st_mode&S_IRUSR))
|
||||
|
||||
sprintf (filename,"%s/%s", res_paths[i], res_name);
|
||||
if (stat (filename, &buf) == 0 &&
|
||||
!S_ISDIR (buf.st_mode) && (buf.st_mode & S_IRUSR))
|
||||
#else
|
||||
sprintf(filename,"%s/%s", res_paths[i], res_name);
|
||||
#ifndef __VXWORKS__
|
||||
//in vxworks, don't support _access method.
|
||||
if (_access(filename, 04) != -1)
|
||||
#endif
|
||||
sprintf (filename,"%s/%s", res_paths[i], res_name);
|
||||
if (access (filename, 04) != -1)
|
||||
#endif
|
||||
{
|
||||
return filename;
|
||||
@@ -658,6 +659,15 @@ static char* get_res_file(const char* res_name, char* filename)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static char* get_res_file(const char* res_name, char* filename)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* !HAVE_ACCESS */
|
||||
|
||||
static void* get_res_data (RES_ENTRY *entry, RES_TYPE_OPS *ops, DWORD usr_param)
|
||||
{
|
||||
if (entry == NULL && ops == NULL)
|
||||
|
||||
Reference in New Issue
Block a user