mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 12:27:58 +08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e6809618a | ||
|
|
9befaeb68a | ||
|
|
87b9facc84 |
@@ -10,7 +10,6 @@ Makefile
|
|||||||
Makefile.in
|
Makefile.in
|
||||||
.deps/
|
.deps/
|
||||||
.libs/
|
.libs/
|
||||||
m4/*.m4
|
|
||||||
/acinclude.m4
|
/acinclude.m4
|
||||||
/aclocal.m4
|
/aclocal.m4
|
||||||
/autom4te.cache
|
/autom4te.cache
|
||||||
@@ -22,7 +21,6 @@ m4/*.m4
|
|||||||
/depcomp
|
/depcomp
|
||||||
/install-sh
|
/install-sh
|
||||||
/libtool
|
/libtool
|
||||||
/ltmain.sh
|
|
||||||
/*.pc
|
/*.pc
|
||||||
/*config.h
|
/*config.h
|
||||||
/*config.h.in
|
/*config.h.in
|
||||||
@@ -31,6 +29,3 @@ m4/*.m4
|
|||||||
/src/font/utils/ucd/
|
/src/font/utils/ucd/
|
||||||
/src/sysres/font_list
|
/src/sysres/font_list
|
||||||
/src/sysres/license/dat_files/
|
/src/sysres/license/dat_files/
|
||||||
/configure~
|
|
||||||
.cache
|
|
||||||
compile_commands.json
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
ACLOCAL_AMFLAGS = -I m4
|
|
||||||
|
|
||||||
SUBDIRS = src 3rd-party include rtos etc m4 cmake build
|
SUBDIRS = src 3rd-party include rtos etc m4 cmake build
|
||||||
|
|
||||||
EXTRA_DIST = minigui.pc.in \
|
EXTRA_DIST = minigui.pc.in \
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ _TABLE OF CONTENTS_
|
|||||||
- [TABLE OF CONTENTS](#table-of-contents)
|
- [TABLE OF CONTENTS](#table-of-contents)
|
||||||
- [INTRODUCTION](#introduction)
|
- [INTRODUCTION](#introduction)
|
||||||
+ [What's MiniGUI](#whats-minigui)
|
+ [What's MiniGUI](#whats-minigui)
|
||||||
+ [HVML App Framework on MiniGUI](#hvml-app-framework-on-minigui)
|
+ [App Frameworks on MiniGUI](#app-frameworks-on-minigui)
|
||||||
+ [MiniGUI and HybridOS](#minigui-and-hybridos)
|
+ [MiniGUI and HybridOS](#minigui-and-hybridos)
|
||||||
+ [Source Code Repositories](#source-code-repositories)
|
+ [Source Code Repositories](#source-code-repositories)
|
||||||
- [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x)
|
- [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x)
|
||||||
@@ -37,45 +37,51 @@ _TABLE OF CONTENTS_
|
|||||||
|
|
||||||
### What's MiniGUI
|
### What's MiniGUI
|
||||||
|
|
||||||
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform windowing and GUI support system,
|
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform
|
||||||
which is especially fit for embedded systems or smart IoT devices based-on Linux/uClinux, eCos,
|
windowing and GUI support system, which is especially fit for
|
||||||
and other traditional RTOSes, such as RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II, OSE, and others.
|
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, 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).
|
This is the source tree of MiniGUI Core, which provides the windowing
|
||||||
|
and graphics interfaces as well as a lot of standard controls (toolkit).
|
||||||
|
|
||||||
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial use.
|
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial
|
||||||
In December 1998, the initiator of FMSoft, [Vincent Wei], began to develop MiniGUI under the GNU General Public License (GPL).
|
use. In December 1998, the initiator of FMSoft, Wei Yongming, began to develop
|
||||||
In September 2002, the core developers of MiniGUI founded [FMSoft] and started the commercial marketing with the free software.
|
MiniGUI under the GNU General Public License (GPL). In September 2002, the core
|
||||||
By now, FMSoft still continues to release MiniGUI as a free software project.
|
developers of MiniGUI founded [FMSoft](https://www.fmsoft.cn) and started the
|
||||||
|
commercial marketing with the free software. By now, FMSoft still continues to
|
||||||
|
release MiniGUI as a free software project.
|
||||||
|
|
||||||
For the live demos, source tarballs, and cases of MiniGUI, you can refer to the following website:
|
For the live demos, source tarballs, and cases of MiniGUI, you can refer
|
||||||
|
to the following website:
|
||||||
|
|
||||||
<http://www.minigui.com>
|
<http://www.minigui.com>
|
||||||
|
|
||||||
### HVML App Framework on MiniGUI
|
### App Frameworks on MiniGUI
|
||||||
|
|
||||||
MiniGUI and its components provide a lot of controls/widgets to help your develop GUI apps in C/C++ programming language.
|
MiniGUI and its components provides a lot of controls/widgets to
|
||||||
However, alternatively, you can use the following software to develop your apps in an easy-to-use programming language [HVML].
|
help your develop GUI apps in C/C++ programming language. However,
|
||||||
|
alternatively, you can choose one of the following frameworks to
|
||||||
|
develop your apps in a easy-to-use programming language other than C/C++.
|
||||||
|
|
||||||
* [HVML] is a descriptive programming language proposed and designed by [Vincent Wei].
|
* [HybridOS](https://gitlab.fmsoft.cn/HybridOS/hybridos) provides
|
||||||
* [PurC] is the prime interpreter of HVML written in C lauguage.
|
a complete software stack to develop an app which have rich functions
|
||||||
* [xGUI Pro] is a full-featured HVML renderer based on the tailored WebKit engine.
|
and excellent expressive in HTML5, CSS3, and JavaScript.
|
||||||
|
* [hiACEJS](https://gitlab.fmsoft.cn/HybridOS/hiACEJS) provides
|
||||||
|
a light-weight app framework in JavaScript.
|
||||||
|
|
||||||
In short, the above software suite provides an Electron-like solution that can help people develop cross-platform applications using web front-end technology.
|
You can also choose [HybridOS Lite](https://gitlab.fmsoft.cn/HybridOS/hybridos-lite)
|
||||||
The difference is that the solution replaces JavaScript with HVML and Node.JS with PurC.
|
to develop apps with excellent expressive for cost-sensitive devices in C/C++ language.
|
||||||
It provides an entirely new application framework that isolates the interpreter and renderer from running in separate processes, which brings several benefits.
|
|
||||||
It greatly reduces the size and resource consumption of the entire solution, improves the overall performance, promotes the interactive responsiveness,
|
|
||||||
and provides a simpler mechanism to integrate existing C/C++ code modules.
|
|
||||||
|
|
||||||
### MiniGUI and HybridOS
|
### MiniGUI and HybridOS
|
||||||
|
|
||||||
[HybridOS] is another large open source project initiated by FMSoft.
|
[HybridOS](https://gitlab.fmsoft.cn/HybridOS/hybridos) is another large open source project
|
||||||
It is an open source operating system designed for embedded/AIoT devices and cloud computing environment.
|
initiated by FMSoft. It is a totally new open source operating system designed for
|
||||||
|
embedded and smart IoT devices and cloud computing environment.
|
||||||
|
|
||||||
HybridOS provides the complete software stack and the app framework based on [HVML] for embedded systems.
|
In practice, MiniGUI and the software which are used to integrated with GPU
|
||||||
You can easily develop your products which has rich functions and excellent expressiveness by using HybridOS.
|
constitute the graphics stack of HybridOS.
|
||||||
|
|
||||||
In practice, MiniGUI and the software which are used to integrated with GPU constitute the graphics stack of HybridOS.
|
|
||||||
|
|
||||||
HybridOS uses MiniGUI as the underlying windowing system, and the members of
|
HybridOS uses MiniGUI as the underlying windowing system, and the members of
|
||||||
HybridOS project are now maintaining the whole graphics stack.
|
HybridOS project are now maintaining the whole graphics stack.
|
||||||
@@ -83,15 +89,15 @@ The following chart shows the graphics stack of HybridOS:
|
|||||||
|
|
||||||
```
|
```
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
| MiniGUI/HVML Apps |
|
| MiniGUI/HybridOS Apps |
|
||||||
|-----------------------------------------------|
|
|-----------------------------------------------|
|
||||||
| | (Graphics Stack) |
|
| | (Graphics Stack) |
|
||||||
| | --------------------|
|
| | ---------------------|
|
||||||
| | | Mesa-HBD |
|
| | | hiMesa |
|
||||||
| | Cairo-HBD | ------------------|
|
| | hiCairo | ------------------|
|
||||||
| | MiniGUI | | EGL for MiniGUI |
|
| | MiniGUI | | EGL for MiniGUI |
|
||||||
| C++ libs | HBDDRMDrivers | | GL, GLES, VG |
|
| C++ libs | hiDRMDrivers | | GL, GLES, VG |
|
||||||
| C libs | libDRM | | GPU drivers |
|
| C libs | libDRM | | GPU drivers |
|
||||||
|-----------------------------------------------|
|
|-----------------------------------------------|
|
||||||
| Linux Kernel |
|
| Linux Kernel |
|
||||||
| -----------------------------------|
|
| -----------------------------------|
|
||||||
@@ -99,13 +105,14 @@ The following chart shows the graphics stack of HybridOS:
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
```
|
```
|
||||||
|
|
||||||
As shown in the chart above, the HybridOS graphics stack consists of the following software:
|
As shown in the chart above, the HybridOS graphics stack consists of
|
||||||
|
the following software:
|
||||||
|
|
||||||
- `libDRM` provides some user land APIs for Linux Direct Rendering Infrastructure.
|
- `libDRM` provides some user land APIs for Linux Direct Rendering Infrastructure.
|
||||||
- `HBDDRMDrivers` contains the drivers (user land drivers, not kernel drivers) for
|
- `hiDRMDrivers` contains the drivers (user land drivers, not kernel drivers) for
|
||||||
MiniGUI DRM engine. The drivers implement the basic hardware accelerated
|
MiniGUI DRM engine. The drivers implement the basic hardware accelerated
|
||||||
2D graphics operations of various GPUs for MiniGUI.
|
2D graphics operations of various GPUs for MiniGUI.
|
||||||
- `Mesa-HBD` is the Mesa derivative for HybridOS, while Mesa is the open source
|
- `hiMesa` is the Mesa derivative for HybridOS, while Mesa is the open source
|
||||||
implementation of OpenGL and other graphics APIs, including OpenGL ES
|
implementation of OpenGL and other graphics APIs, including OpenGL ES
|
||||||
(versions 1, 2, 3), OpenCL, OpenMAX, and Vulkan. It contains the following
|
(versions 1, 2, 3), OpenCL, OpenMAX, and Vulkan. It contains the following
|
||||||
components:
|
components:
|
||||||
@@ -113,28 +120,24 @@ As shown in the chart above, the HybridOS graphics stack consists of the followi
|
|||||||
graphics APIs.
|
graphics APIs.
|
||||||
+ The EGL implementation for MiniGUI platform.
|
+ The EGL implementation for MiniGUI platform.
|
||||||
+ The graphics drivers for various GPUs and a software driver called `swrast`.
|
+ The graphics drivers for various GPUs and a software driver called `swrast`.
|
||||||
- `Cairo-HBD` is the Cairo derivative for HybridOS. Cairo is a 2D vector graphics
|
- `hiCairo` is the Cairo derivative for HybridOS. Cairo is a 2D vector graphics
|
||||||
library for Gtk. We provide support for MiniGUI backend in `hiCairo`.
|
library for Gtk. We provide support for MiniGUI backend in `hiCairo`.
|
||||||
|
|
||||||
For more information about HybridOS, please refer to:
|
For more information about HybridOS, please refer to:
|
||||||
|
|
||||||
<https://hybridos.fmsoft.cn/>
|
<https://hybridos.fmsoft.cn/>
|
||||||
|
|
||||||
For more information about HVML, please refer to:
|
|
||||||
|
|
||||||
<https://hvml.fmsoft.cn/> or <https://www.hvml.org>
|
|
||||||
|
|
||||||
### Source Code Repositories
|
### Source Code Repositories
|
||||||
|
|
||||||
FMSoft had created the public repositories for MiniGUI Core, MiniGUI
|
FMSoft had created the public repositories for MiniGUI Core, MiniGUI
|
||||||
components, HybridOS, and other open source apps on GitHub. You can visit
|
components, HybridOS, and other open source apps on GitHub. You can visit
|
||||||
them on:
|
them on:
|
||||||
|
|
||||||
<https://github.com/VincentWei>
|
<https://gitlab.fmsoft.cn/VincentWei>
|
||||||
|
|
||||||
We now maintain all documents about MiniGUI on the following public repo:
|
We now maintain all documents about MiniGUI on the following public repo:
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui-docs>
|
<https://gitlab.fmsoft.cn/VincentWei/minigui-docs>
|
||||||
|
|
||||||
You can download the source code tarballs of MiniGUI Core, MiniGUI
|
You can download the source code tarballs of MiniGUI Core, MiniGUI
|
||||||
components, and the dependent libraries from the download zone of the site:
|
components, and the dependent libraries from the download zone of the site:
|
||||||
@@ -258,7 +261,7 @@ so that the old applications can smoothly migrate to the new
|
|||||||
version. However, there are still some slight changes you need to take care.
|
version. However, there are still some slight changes you need to take care.
|
||||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui/blob/rel-5-0/RELEASE-NOTES.md>
|
<https://gitlab.fmsoft.cn/VincentWei/minigui/blob/rel-5-0/RELEASE-NOTES.md>
|
||||||
|
|
||||||
## NEW FEATURES IN VERSION 4.0.x
|
## NEW FEATURES IN VERSION 4.0.x
|
||||||
|
|
||||||
@@ -289,7 +292,7 @@ in order to support [HybridOS Foundation Class Library].
|
|||||||
|
|
||||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui/blob/rel-4-0/RELEASE-NOTES.md>
|
<https://gitlab.fmsoft.cn/VincentWei/minigui/blob/rel-4-0/RELEASE-NOTES.md>
|
||||||
|
|
||||||
Because of the changes of some APIs, we recommended strongly that you
|
Because of the changes of some APIs, we recommended strongly that you
|
||||||
use this version for new projects.
|
use this version for new projects.
|
||||||
@@ -304,7 +307,7 @@ We introduce some new features in MiniGUI Version 3.2.x:
|
|||||||
|
|
||||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||||
|
|
||||||
<https://github.com/VincentWei/minigui/blob/rel-3-2/RELEASE-NOTES.md>
|
<https://gitlab.fmsoft.cn/VincentWei/minigui/blob/rel-3-2/RELEASE-NOTES.md>
|
||||||
|
|
||||||
## THE RUNTIME MODES OF MINIGUI
|
## THE RUNTIME MODES OF MINIGUI
|
||||||
|
|
||||||
@@ -358,15 +361,15 @@ and MiniGUI components, please fetch one of the following repositories
|
|||||||
from GitHub and follow the instructions to build MiniGUI Core,
|
from GitHub and follow the instructions to build MiniGUI Core,
|
||||||
MiniGUI components, the samples, and the demonstration programs:
|
MiniGUI components, the samples, and the demonstration programs:
|
||||||
|
|
||||||
[Build MiniGUI 5.0](https://github.com/VincentWei/build-minigui-5.0)
|
[Build MiniGUI 5.0](https://gitlab.fmsoft.cn/VincentWei/build-minigui-5.0)
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
[Build MiniGUI 4.0](https://github.com/VincentWei/build-minigui-4.0)
|
[Build MiniGUI 4.0](https://gitlab.fmsoft.cn/VincentWei/build-minigui-4.0)
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
[Build MiniGUI 3.2](https://github.com/VincentWei/build-minigui-3.2)
|
[Build MiniGUI 3.2](https://gitlab.fmsoft.cn/VincentWei/build-minigui-3.2)
|
||||||
|
|
||||||
|
|
||||||
### Building MiniGUI Core
|
### Building MiniGUI Core
|
||||||
@@ -407,7 +410,7 @@ For more information, please run
|
|||||||
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
|
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
|
||||||
following repository:
|
following repository:
|
||||||
|
|
||||||
<https://github.com/VincentWei/mg-tests>
|
<https://gitlab.fmsoft.cn/VincentWei/mg-tests>
|
||||||
|
|
||||||
If you are interested in hacking the MiniGUI code, please visit this repository.
|
If you are interested in hacking the MiniGUI code, please visit this repository.
|
||||||
|
|
||||||
@@ -460,7 +463,7 @@ for examples:
|
|||||||
|
|
||||||
## HISTORY
|
## HISTORY
|
||||||
|
|
||||||
27 years have pasted since MiniGUI was initially created at
|
21 years have pasted since MiniGUI was initially created at
|
||||||
the end of 1998, and now it becomes much reliable and stable.
|
the end of 1998, and now it becomes much reliable and stable.
|
||||||
During the past years, many remarkable changes have taken place in
|
During the past years, many remarkable changes have taken place in
|
||||||
the MiniGUI project.
|
the MiniGUI project.
|
||||||
@@ -563,18 +566,15 @@ A brief history description of the development progress is listed as follow:
|
|||||||
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
|
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
|
||||||
1. Mar., 2020: FMSoft released MiniGUI version 5.0.0.
|
1. Mar., 2020: FMSoft released MiniGUI version 5.0.0.
|
||||||
1. May., 2021: FMSoft released MiniGUI version 5.0.6.
|
1. May., 2021: FMSoft released MiniGUI version 5.0.6.
|
||||||
1. Jan., 2022: FMSoft released MiniGUI version 5.0.9.
|
|
||||||
1. Sep., 2022: FMSoft released MiniGUI version 5.0.10.
|
|
||||||
1. Aug., 2023: FMSoft released MiniGUI version 5.0.13.
|
|
||||||
1. May., 2025: FMSoft released MiniGUI version 5.0.16.
|
|
||||||
|
|
||||||
## AUTHORS AND COPYING
|
## AUTHORS AND COPYING
|
||||||
|
|
||||||
The original author of MiniGUI is Vincent Wei, and now MiniGUI is maintained by FMSoft.
|
The original author of MiniGUI is WEI Yongming, and now MiniGUI is
|
||||||
For more information, please refer to <http://www.fmsoft.cn>.
|
maintained by FMSoft. For more information, please refer to
|
||||||
|
<http://www.fmsoft.cn>.
|
||||||
|
|
||||||
Copyright (C) 2002 ~ 2025, Beijing FMSoft Technologies Co., Ltd.
|
Copyright (C) 2002 ~ 2021, Beijing FMSoft Technologies Co., Ltd.
|
||||||
Copyright (C) 1998 ~ 2002, Vincent Wei
|
Copyright (C) 1998 ~ 2002, WEI Yongming
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -646,19 +646,3 @@ Q: Can I get the tech support from MiniGUI team?
|
|||||||
A: Yes, FMSoft can provide you with guaranteed commercial technical
|
A: Yes, FMSoft can provide you with guaranteed commercial technical
|
||||||
support services. Please send messages to <sales@minigui.com>.
|
support services. Please send messages to <sales@minigui.com>.
|
||||||
|
|
||||||
|
|
||||||
[Beijing FMSoft Technologies Co., Ltd.]: https://www.fmsoft.cn
|
|
||||||
[FMSoft Technologies]: https://www.fmsoft.cn
|
|
||||||
[FMSoft]: https://www.fmsoft.cn
|
|
||||||
[HybridOS Official Site]: https://hybridos.fmsoft.cn
|
|
||||||
[MiniGUI Official Site]: https://minigui.fmsoft.cn
|
|
||||||
[HVML Official Site]: https://hvml.fmsoft.cn
|
|
||||||
[Vincent Wei]: https://github.com/VincentWei
|
|
||||||
|
|
||||||
[MiniGUI]: https://github.com/VincentWei
|
|
||||||
[HybridOS]: https://github.com/HybridOS2
|
|
||||||
[HVML]: https://github.com/HVML
|
|
||||||
[PurC]: https://github.com/HVML/PurC
|
|
||||||
[xGUI Pro]: https://github.com/HVML/xGUI-Pro
|
|
||||||
[WebKit]: https://webkit.org
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,5 @@
|
|||||||
# Release Notes
|
# Release Notes
|
||||||
|
|
||||||
- [Version 5.0.16](#version-5016)
|
|
||||||
+ [What's new in version 5.0.16](#whats-new-in-version-5016)
|
|
||||||
- [Version 5.0.15](#version-5015)
|
|
||||||
+ [What's new in version 5.0.15](#whats-new-in-version-5015)
|
|
||||||
- [Version 5.0.13](#version-5013)
|
|
||||||
+ [What's new in version 5.0.13](#whats-new-in-version-5013)
|
|
||||||
- [Version 5.0.12](#version-5012)
|
|
||||||
+ [What's new in version 5.0.12](#whats-new-in-version-5012)
|
|
||||||
- [Version 5.0.11](#version-5011)
|
|
||||||
+ [What's new in version 5.0.11](#whats-new-in-version-5011)
|
|
||||||
- [Version 5.0.10](#version-5010)
|
|
||||||
+ [What's new in version 5.0.10](#whats-new-in-version-5010)
|
|
||||||
- [Version 5.0.9](#version-508)
|
|
||||||
+ [What's new in version 5.0.9](#whats-new-in-version-508)
|
|
||||||
- [Version 5.0.8](#version-508)
|
|
||||||
+ [What's new in version 5.0.8](#whats-new-in-version-508)
|
|
||||||
- [Version 5.0.6](#version-506)
|
- [Version 5.0.6](#version-506)
|
||||||
+ [What's new in version 5.0.6](#whats-new-in-version-506)
|
+ [What's new in version 5.0.6](#whats-new-in-version-506)
|
||||||
- [Version 5.0.5](#version-505)
|
- [Version 5.0.5](#version-505)
|
||||||
@@ -36,153 +20,6 @@
|
|||||||
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
||||||
+ [Deprecated APIs](#deprecated-apis)
|
+ [Deprecated APIs](#deprecated-apis)
|
||||||
|
|
||||||
## Version 5.0.16
|
|
||||||
|
|
||||||
On May 27, 2025, FMSoft announces the availability of MiniGUI 5.0.16,
|
|
||||||
which is a bugfix release with some minor enhancements of MiniGUI 5.0.x.
|
|
||||||
|
|
||||||
* BUGFIXING:
|
|
||||||
- The desktop thread can not handle the request from other threads as soon as possible.
|
|
||||||
- The `MSG_TIMEOUT` message can not be fired correctly under MiniGUI-Threads mode.
|
|
||||||
- Bad subpixel rendering when background color is RGBA0000.
|
|
||||||
* TUNING:
|
|
||||||
- Tune `configure.ac` and `Makefile.am` to use the system libtool scripts.
|
|
||||||
- Do not check `pciaccess` if the target architecture is not `i386`.
|
|
||||||
|
|
||||||
## Version 5.0.15
|
|
||||||
|
|
||||||
On May 09, 2025, FMSoft announces the availability of MiniGUI 5.0.15,
|
|
||||||
which is an enhancement release with some minor enhancements
|
|
||||||
of MiniGUI 5.0.x.
|
|
||||||
|
|
||||||
* ENHANCEMENTS:
|
|
||||||
- Optimize NEWGAL engines: `shadow`, `drm`, and `fbcon` for large resolution.
|
|
||||||
- New APIs: `GetWindowSharedSurfaceFD()` and `CreateMemDCFromSharedSurfaceFD()` for compositing schema.
|
|
||||||
* CHANGES:
|
|
||||||
- The operations for DRM userland driver changed.
|
|
||||||
|
|
||||||
## Version 5.0.13
|
|
||||||
|
|
||||||
On Aug. 31, 2023, FMSoft announces the availability of MiniGUI 5.0.13,
|
|
||||||
which is an enhancement release with some minor enhancements
|
|
||||||
of MiniGUI 5.0.x.
|
|
||||||
|
|
||||||
### What's new in version 5.0.13
|
|
||||||
|
|
||||||
In this version, we made some enhancements:
|
|
||||||
|
|
||||||
* ENHANCEMENTS:
|
|
||||||
- Disable BIDI for text in UTF-8 charset by default.
|
|
||||||
* CHANGES:
|
|
||||||
- Add `BIDI_FLAG_NONE` and `BIDI_FLAG_LEGACY`.
|
|
||||||
* BUGFIXING:
|
|
||||||
- Ignore C0CTRL characters when renerding text.
|
|
||||||
- Support for vowels.
|
|
||||||
|
|
||||||
## Version 5.0.12
|
|
||||||
|
|
||||||
On May 10, 2023, FMSoft announces the availability of MiniGUI 5.0.12,
|
|
||||||
which is an enhancement release with some minor enhancements
|
|
||||||
of MiniGUI 5.0.x.
|
|
||||||
|
|
||||||
### What's new in version 5.0.12
|
|
||||||
|
|
||||||
In this version, we made some enhancements:
|
|
||||||
|
|
||||||
* ENHANCEMENTS:
|
|
||||||
- Add new API `GetACharsExtentPointEx()`.
|
|
||||||
- Add new APIs `GetTabbedACharsExtent()`, `GetTabbedACharsExtentPoint()`,
|
|
||||||
and `GetTabbedACharsExtentPointEx()`.
|
|
||||||
- Enhance two APIs `GetTextExtentPoint()` and `GetTabbedTextExtentPoint()`
|
|
||||||
to support BIDI charsets.
|
|
||||||
- Tune management of tick count.
|
|
||||||
* BUGFIXING:
|
|
||||||
- Fix a typo: `Achar2UChar()` to `AChar2UChar()`.
|
|
||||||
|
|
||||||
## Version 5.0.11
|
|
||||||
|
|
||||||
On Dec. 31, 2022, FMSoft announces the availability of MiniGUI 5.0.11,
|
|
||||||
which is a bug fixing release with bug fixes and some minor enhancements
|
|
||||||
of MiniGUI 5.0.x.
|
|
||||||
|
|
||||||
### What's new in version 5.0.11
|
|
||||||
|
|
||||||
In this version, we made some enhancements
|
|
||||||
|
|
||||||
* ENHANCEMENTS:
|
|
||||||
* BUGFIXING:
|
|
||||||
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/94
|
|
||||||
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/96
|
|
||||||
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/105
|
|
||||||
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/106
|
|
||||||
* OPTIMIZATIONS:
|
|
||||||
- Optimize the refresh of scrolled.
|
|
||||||
* TUNING:
|
|
||||||
- Call `mg_FreeMsgQueueForThisThread` immediately in `TerminateGUI()`.
|
|
||||||
- Use `CreateLogFontEx` instead of `CreateLogFont` to follow the new style convention of font name when creating the system logfonts,
|
|
||||||
but the orientation is ignored for the system logfont.
|
|
||||||
|
|
||||||
## Version 5.0.10
|
|
||||||
|
|
||||||
On Sep. 30, 2022, FMSoft announces the availability of MiniGUI 5.0.10,
|
|
||||||
which is a bug fixing release with bug fixes and some minor enhancements
|
|
||||||
of MiniGUI 5.0.x.
|
|
||||||
|
|
||||||
### What's new in version 5.0.10
|
|
||||||
|
|
||||||
In this version, we made some enhancements
|
|
||||||
|
|
||||||
* ENHANCEMENTS:
|
|
||||||
- Enhance `fbcon` engine to support double buffering for Threads and Standalone mode. (Runtime option: `fbcon.double_buffering`).
|
|
||||||
- Cleanup and enhance `shadow` engine to use `SyncUpdate` method.
|
|
||||||
- Relaying `MSG_IDLE` messages to the active descendant controls in every 0.5s.
|
|
||||||
* BUGFIXING:
|
|
||||||
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/83
|
|
||||||
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/87
|
|
||||||
- Fix bugs reported in https://github.com/VincentWei/minigui/issues/89
|
|
||||||
- Fix some bugs when virtual window enabled under Standalone and Processes runtime modes.
|
|
||||||
* OPTIMIZATIONS:
|
|
||||||
* TUNING:
|
|
||||||
- Fix some warnings reported by GCC 12.
|
|
||||||
- Use inline functions for SetCursor and SetDefaultCursor instead of macros.
|
|
||||||
|
|
||||||
## Version 5.0.9
|
|
||||||
|
|
||||||
On Jan. 14, 2022, FMSoft announces the availability of MiniGUI 5.0.9,
|
|
||||||
which is a bug fixing release with minor enhancements of MiniGUI 5.0.x.
|
|
||||||
|
|
||||||
### What's new in version 5.0.9
|
|
||||||
|
|
||||||
In this version, we fixed some bugs:
|
|
||||||
|
|
||||||
* BUGFIXING:
|
|
||||||
- Fix a crash bug in `InitSubDC()` of `src/newgdi/gdi.c`.
|
|
||||||
* ENHANCEMENTS:
|
|
||||||
* OPTIMIZATIONS:
|
|
||||||
* TUNING:
|
|
||||||
- Change copyright year to 2022.
|
|
||||||
|
|
||||||
## Version 5.0.8
|
|
||||||
|
|
||||||
The MiniGUI development team announces the availability of MiniGUI 5.0.8,
|
|
||||||
which is a bug fixing release with minor enhancements of MiniGUI 5.0.x.
|
|
||||||
|
|
||||||
### What's new in version 5.0.8
|
|
||||||
|
|
||||||
In this version, we fixed some bugs and made some optimizations and enhancements:
|
|
||||||
|
|
||||||
* BUGFIXING:
|
|
||||||
* ENHANCEMENTS:
|
|
||||||
- Support for WebP image format based on `libwebp`.
|
|
||||||
- Support for two ARM64-based hardware platforms: PX30 and R818.
|
|
||||||
- New surface pixel format for main window: `ST_PIXEL_XRGB565` under compositing schema.
|
|
||||||
* OPTIMIZATIONS:
|
|
||||||
- Shrink heap size for fixed string.
|
|
||||||
- Optimize the memory use of blitting context.
|
|
||||||
* TUNING:
|
|
||||||
- Tune code of fbcon video engine for compositing schema.
|
|
||||||
- Fix warnings and errors for conditional compilation.
|
|
||||||
|
|
||||||
## Version 5.0.6
|
## Version 5.0.6
|
||||||
|
|
||||||
The MiniGUI development team announces the availability of MiniGUI 5.0.6,
|
The MiniGUI development team announces the availability of MiniGUI 5.0.6,
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
Version 5.0.16 (2025/05/27)
|
Version 5.0.6 (2021/05/20)
|
||||||
|
|
||||||
This is a minor enhancement and bugfix release of MiniGUI 5.0.x, the stable version.
|
This is the first official release of MiniGUI 5.0.x, the stable version.
|
||||||
|
|
||||||
Other packages for MiniGUI resource, tools, components, and samples:
|
Other packages for MiniGUI resource, tools, components, and samples:
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
libtoolize
|
cat m4/*.m4 > acinclude.m4
|
||||||
cat m4/*.m4 > aclocal.m4
|
|
||||||
aclocal
|
aclocal
|
||||||
autoheader
|
autoheader
|
||||||
automake --add-missing --foreign --copy
|
automake --add-missing --foreign --copy
|
||||||
|
|||||||
+218
-170
File diff suppressed because it is too large
Load Diff
+8
-59
@@ -55,36 +55,6 @@ wallpaper_pattern_size=full
|
|||||||
# def_compositor_so=
|
# def_compositor_so=
|
||||||
#}}
|
#}}
|
||||||
|
|
||||||
#{{ifdef _MGGAL_SHADOW
|
|
||||||
[shadow]
|
|
||||||
real_engine=pc_xvfb
|
|
||||||
defaultmode=800x600-16bpp
|
|
||||||
|
|
||||||
# `cw`: rotating screen clock-wise.
|
|
||||||
# `ccw`: rotating screen counter clock-wise.
|
|
||||||
# `hflip`: flipping screen horizontally.
|
|
||||||
# `vflip`: flipping screen vertically.
|
|
||||||
rotate_screen=ccw
|
|
||||||
|
|
||||||
# Whether the async. update is enabled.
|
|
||||||
# Use `true` or `yes` for enabled, anything else for disabled.
|
|
||||||
# Since 5.0.13.
|
|
||||||
async_update=yes
|
|
||||||
|
|
||||||
# The synchronization interval for the asyn. updater (milli-seconds).
|
|
||||||
# This setting is only valid when `async_update` is enabled and
|
|
||||||
# the real engine does not provide WaitWBlank method.
|
|
||||||
# Since 5.0.13.
|
|
||||||
update_interval=15
|
|
||||||
|
|
||||||
# The minimal pixels to use the hardware accelerator.
|
|
||||||
# If the number of pixels to copy is less than this value,
|
|
||||||
# MiniGUI will use the software copy routine to update the real screen,
|
|
||||||
# even if the real device provides a hardware accelerator.
|
|
||||||
# Since 5.0.13.
|
|
||||||
min_pixels_using_hwaccl=4096
|
|
||||||
#}}
|
|
||||||
|
|
||||||
#{{ifdef _MGGAL_DRM
|
#{{ifdef _MGGAL_DRM
|
||||||
[drm]
|
[drm]
|
||||||
defaultmode=1024x768-32bpp
|
defaultmode=1024x768-32bpp
|
||||||
@@ -108,21 +78,9 @@ dpi=96
|
|||||||
# Since 5.0.0.
|
# Since 5.0.0.
|
||||||
double_buffering=true
|
double_buffering=true
|
||||||
|
|
||||||
# The update interval for the asyn. updater (milli-seconds).
|
|
||||||
# This setting is only valid when drmWaitVBlank doesn't work correctly.
|
|
||||||
# Since 5.0.13.
|
|
||||||
update_interval=15
|
|
||||||
|
|
||||||
# The minimal pixels to use the hardware accelerator.
|
|
||||||
# If the number of pixels to copy is less than this value,
|
|
||||||
# MiniGUI will use the software copy routine to update the real screen,
|
|
||||||
# even if the device provides a hardware accelerator.
|
|
||||||
# Since 5.0.13.
|
|
||||||
min_pixels_using_hwaccl=4096
|
|
||||||
|
|
||||||
# The filename of the shared library for the external driver.
|
# The filename of the shared library for the external driver.
|
||||||
# The equivalent environment variable: MG_GAL_DRM_DRIVER
|
# The equivalent environment variable: MG_GAL_DRM_DRIVER
|
||||||
exdriver=libdrmdrivers.so
|
exdriver=libhidrmdrivers-0.2.so.0
|
||||||
#}}
|
#}}
|
||||||
|
|
||||||
#{{ifdef _MGIAL_SINGLETOUCHKEY
|
#{{ifdef _MGIAL_SINGLETOUCHKEY
|
||||||
@@ -147,22 +105,6 @@ seat=seat0
|
|||||||
[fbcon]
|
[fbcon]
|
||||||
defaultmode=1024x768-16bpp
|
defaultmode=1024x768-16bpp
|
||||||
dpi=96
|
dpi=96
|
||||||
|
|
||||||
# Whether double buffering is enabled (only for threads and standalone runmodes).
|
|
||||||
# Use `true` or `yes` for enabled, anything else for disabled.
|
|
||||||
# Note that under compositing schema, double buffering is always enabled.
|
|
||||||
# Since 5.0.10.
|
|
||||||
double_buffering=true
|
|
||||||
|
|
||||||
# Whether the async. update is enabled.
|
|
||||||
# Use `true` or `yes` for enabled, anything else for disabled.
|
|
||||||
# Since 5.0.13.
|
|
||||||
async_update=yes
|
|
||||||
|
|
||||||
# The update interval for the asyn. updater (milli-seconds).
|
|
||||||
# This setting is only valid when drmWaitVBlank doesn't work correctly.
|
|
||||||
# Since 5.0.13.
|
|
||||||
update_interval=15
|
|
||||||
#}}
|
#}}
|
||||||
|
|
||||||
#{{ifdef _MGGAL_PCXVFB
|
#{{ifdef _MGGAL_PCXVFB
|
||||||
@@ -175,6 +117,13 @@ exec_file=/usr/local/bin/gvfb
|
|||||||
[rtos_xvfb]
|
[rtos_xvfb]
|
||||||
defaultmode=800x600-16bpp
|
defaultmode=800x600-16bpp
|
||||||
|
|
||||||
|
#{{ifdef _MGGAL_SHADOW
|
||||||
|
[shadow]
|
||||||
|
real_engine=pc_xvfb
|
||||||
|
defaultmode=800x600-16bpp
|
||||||
|
rotate_screen=normal
|
||||||
|
#}}
|
||||||
|
|
||||||
#{{ifdef _MGGAL_MLSHADOW
|
#{{ifdef _MGGAL_MLSHADOW
|
||||||
[mlshadow]
|
[mlshadow]
|
||||||
real_engine=qvfb
|
real_engine=qvfb
|
||||||
|
|||||||
@@ -268,8 +268,6 @@ MGUI_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
|||||||
#define MG_UNLIKELY(expr) (expr)
|
#define MG_UNLIKELY(expr) (expr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAVE(FEATURE) (defined HAVE_##FEATURE && HAVE_##FEATURE)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \defgroup endian_info Endianness information
|
* \defgroup endian_info Endianness information
|
||||||
* @{
|
* @{
|
||||||
@@ -313,7 +311,6 @@ MGUI_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
|||||||
defined(__amd64) || \
|
defined(__amd64) || \
|
||||||
(defined(__alpha__) || defined(__alpha)) || \
|
(defined(__alpha__) || defined(__alpha)) || \
|
||||||
defined(__arm__) || defined(__aarch64__) || \
|
defined(__arm__) || defined(__aarch64__) || \
|
||||||
defined(__loongarch__) || \
|
|
||||||
defined(__riscv) || \
|
defined(__riscv) || \
|
||||||
(defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \
|
(defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \
|
||||||
(defined(__mips__) && defined(__MIPSEL__)) || \
|
(defined(__mips__) && defined(__MIPSEL__)) || \
|
||||||
@@ -2349,7 +2346,6 @@ int init_minigui_printf (int (*output_char) (int ch),
|
|||||||
#define _ERR_PRINTF(fmt, ...) \
|
#define _ERR_PRINTF(fmt, ...) \
|
||||||
do { \
|
do { \
|
||||||
TCS_RED (stderr); \
|
TCS_RED (stderr); \
|
||||||
fprintf (stderr, "%s: ", __FUNCTION__); \
|
|
||||||
fprintf (stderr, fmt, ##__VA_ARGS__); \
|
fprintf (stderr, fmt, ##__VA_ARGS__); \
|
||||||
TCS_NONE (stderr); \
|
TCS_NONE (stderr); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|||||||
+25
-24
@@ -131,31 +131,7 @@
|
|||||||
#define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084
|
#define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084
|
||||||
#define IAL_EVENT_GESTURE_PINCH_END 0x0085
|
#define IAL_EVENT_GESTURE_PINCH_END 0x0085
|
||||||
|
|
||||||
#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)
|
|
||||||
|
|
||||||
#ifndef TABLET_TOOL_X
|
#ifndef TABLET_TOOL_X
|
||||||
#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
|
|
||||||
|
|
||||||
#define TABLET_TOOL_PROXIMITY_STATE_INVALID 0
|
#define TABLET_TOOL_PROXIMITY_STATE_INVALID 0
|
||||||
#define TABLET_TOOL_PROXIMITY_STATE_OUT 1
|
#define TABLET_TOOL_PROXIMITY_STATE_OUT 1
|
||||||
#define TABLET_TOOL_PROXIMITY_STATE_IN 2
|
#define TABLET_TOOL_PROXIMITY_STATE_IN 2
|
||||||
@@ -173,6 +149,31 @@
|
|||||||
|
|
||||||
#define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
|
#define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
|
||||||
#define TABLET_PAD_STRIP_SOURCE_FINGER 1
|
#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
|
#endif
|
||||||
|
|
||||||
#define IAL_EVENT_TABLET_TOOL_AXIS 0x0090
|
#define IAL_EVENT_TABLET_TOOL_AXIS 0x0090
|
||||||
|
|||||||
+82
-62
@@ -84,14 +84,6 @@ extern "C" {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** The current version of DRM driver. */
|
|
||||||
#define DRM_DRIVER_VERSION 2
|
|
||||||
|
|
||||||
#define DRM_SURBUF_TYPE_OFFSCREEN 0x0000
|
|
||||||
#define DRM_SURBUF_TYPE_SHADOW 0x0001
|
|
||||||
#define DRM_SURBUF_TYPE_SCANOUT 0x0002
|
|
||||||
#define DRM_SURBUF_TYPE_MASK 0x000F
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The struct type represents the DRI sub driver.
|
* The struct type represents the DRI sub driver.
|
||||||
* The concrete struct should be defined by the driver.
|
* The concrete struct should be defined by the driver.
|
||||||
@@ -137,8 +129,6 @@ typedef struct _DrmSurfaceBuffer {
|
|||||||
uint32_t dumb:1;
|
uint32_t dumb:1;
|
||||||
/** Is it a scanout buffer. Since 5.0.0. */
|
/** Is it a scanout buffer. Since 5.0.0. */
|
||||||
uint32_t scanout:1;
|
uint32_t scanout:1;
|
||||||
/** The buffer is also a dma-buf. Since 5.0.13. */
|
|
||||||
uint32_t dma_buf:1;
|
|
||||||
|
|
||||||
/** The width of the buffer. */
|
/** The width of the buffer. */
|
||||||
uint32_t width;
|
uint32_t width;
|
||||||
@@ -164,23 +154,11 @@ typedef struct _DrmSurfaceBuffer {
|
|||||||
* The address of the pixel data:
|
* The address of the pixel data:
|
||||||
* uint8_t* pixels = this->buff + this->offset;
|
* uint8_t* pixels = this->buff + this->offset;
|
||||||
*/
|
*/
|
||||||
uint8_t* vaddr;
|
uint8_t* buff;
|
||||||
} DrmSurfaceBuffer;
|
} DrmSurfaceBuffer;
|
||||||
|
|
||||||
typedef struct _DrmBlitOperations {
|
|
||||||
BlitCopyOperation cpy;
|
|
||||||
BlitKeyOperation key;
|
|
||||||
BlitAlphaOperation alf;
|
|
||||||
ColorBlendMethod bld;
|
|
||||||
ColorLogicalOp rop;
|
|
||||||
ScalingFilter scl;
|
|
||||||
|
|
||||||
uint32_t key_min, key_max;
|
|
||||||
uint8_t alpha;
|
|
||||||
} DrmBlitOperations;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The structure type defines the operations for a userland DRM driver.
|
* The structure type defines the operations for a DRM driver.
|
||||||
*/
|
*/
|
||||||
typedef struct _DrmDriverOps {
|
typedef struct _DrmDriverOps {
|
||||||
/**
|
/**
|
||||||
@@ -198,13 +176,12 @@ typedef struct _DrmDriverOps {
|
|||||||
void (*destroy_driver) (DrmDriver *driver);
|
void (*destroy_driver) (DrmDriver *driver);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation flushes the batch buffer of the driver and/or
|
* This operation flushes the batch buffer of the driver or
|
||||||
* the specified buffer.
|
* the hardware cache.
|
||||||
*
|
*
|
||||||
* \note This operation can be NULL.
|
* \note This operation can be NULL.
|
||||||
*/
|
*/
|
||||||
void (* flush) (DrmDriver *driver, DrmSurfaceBuffer* buff,
|
void (* flush_driver) (DrmDriver *driver);
|
||||||
const GAL_Rect *dirty_rect);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation creates a surface buffer with the specified pixel format,
|
* This operation creates a surface buffer with the specified pixel format,
|
||||||
@@ -217,7 +194,7 @@ typedef struct _DrmDriverOps {
|
|||||||
*/
|
*/
|
||||||
DrmSurfaceBuffer* (* create_buffer) (DrmDriver *driver,
|
DrmSurfaceBuffer* (* create_buffer) (DrmDriver *driver,
|
||||||
uint32_t drm_format, uint32_t hdr_size,
|
uint32_t drm_format, uint32_t hdr_size,
|
||||||
uint32_t width, uint32_t height, unsigned flags);
|
uint32_t width, uint32_t height);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation creates a buffer from a given and possibly foreign handle
|
* This operation creates a buffer from a given and possibly foreign handle
|
||||||
@@ -230,9 +207,7 @@ typedef struct _DrmDriverOps {
|
|||||||
* DrmSurfaceBuffer object.
|
* DrmSurfaceBuffer object.
|
||||||
*/
|
*/
|
||||||
DrmSurfaceBuffer* (* create_buffer_from_handle) (DrmDriver *driver,
|
DrmSurfaceBuffer* (* create_buffer_from_handle) (DrmDriver *driver,
|
||||||
uint32_t handle, size_t size,
|
uint32_t handle, size_t size);
|
||||||
uint32_t drm_format, uint32_t hdr_size,
|
|
||||||
uint32_t width, uint32_t height, uint32_t pitch);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation creates a buffer for the given system global name
|
* This operation creates a buffer for the given system global name
|
||||||
@@ -244,9 +219,7 @@ typedef struct _DrmDriverOps {
|
|||||||
* DrmSurfaceBuffer object.
|
* DrmSurfaceBuffer object.
|
||||||
*/
|
*/
|
||||||
DrmSurfaceBuffer* (* create_buffer_from_name) (DrmDriver *driver,
|
DrmSurfaceBuffer* (* create_buffer_from_name) (DrmDriver *driver,
|
||||||
uint32_t name,
|
uint32_t name);
|
||||||
uint32_t drm_format, uint32_t hdr_size,
|
|
||||||
uint32_t width, uint32_t height, uint32_t pitch);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation creates a buffer for the given PRIME file descriptor
|
* This operation creates a buffer for the given PRIME file descriptor
|
||||||
@@ -258,19 +231,21 @@ typedef struct _DrmDriverOps {
|
|||||||
* DrmSurfaceBuffer object.
|
* DrmSurfaceBuffer object.
|
||||||
*/
|
*/
|
||||||
DrmSurfaceBuffer* (* create_buffer_from_prime_fd) (DrmDriver *driver,
|
DrmSurfaceBuffer* (* create_buffer_from_prime_fd) (DrmDriver *driver,
|
||||||
int prime_fd, size_t size,
|
int prime_fd, size_t size);
|
||||||
uint32_t drm_format, uint32_t hdr_size,
|
|
||||||
uint32_t width, uint32_t height, uint32_t pitch);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation maps the buffer into the current process's virtual memory
|
* This operation maps the buffer into the current process's virtual memory
|
||||||
* space, and returns the virtual address. If failed, it returns NULL.
|
* space, and returns the virtual address. If failed, it returns NULL.
|
||||||
*
|
*
|
||||||
|
* When \a for_scanout is not zero, the buffer will be used for scan out
|
||||||
|
* frame buffer.
|
||||||
|
*
|
||||||
* \note The driver must implement this operation. The driver must
|
* \note The driver must implement this operation. The driver must
|
||||||
* set a valid value for buff field of the DrmSurfaceBuffer object
|
* set a valid value for buff field of the DrmSurfaceBuffer object
|
||||||
* on success.
|
* on success.
|
||||||
*/
|
*/
|
||||||
uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
|
uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer,
|
||||||
|
int for_scanout);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation un-maps a buffer.
|
* This operation un-maps a buffer.
|
||||||
@@ -289,51 +264,96 @@ typedef struct _DrmDriverOps {
|
|||||||
void (* destroy_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
|
void (* destroy_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation fills the specific rectangle area of a buffer
|
* This operation clears the specific rectangle area of a buffer
|
||||||
* with the specific pixel value. If succeed, it returns 0.
|
* with the specific pixel value. If succeed, it returns 0.
|
||||||
*
|
*
|
||||||
* \note If this operation is set as NULL, the driver does not support
|
* \note If this operation is set as NULL, the driver does not support
|
||||||
* hardware accelerated filling operation.
|
* hardware accelerated clear operation.
|
||||||
*/
|
*/
|
||||||
int (* fill_rect) (DrmDriver *driver,
|
int (* clear_buffer) (DrmDriver *driver,
|
||||||
DrmSurfaceBuffer* dst_buf, const GAL_Rect* rc, uint32_t pixel_value);
|
DrmSurfaceBuffer* dst_buf, const GAL_Rect* rc, uint32_t pixel_value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation checks whether a specified hardware accelerated blit
|
* This operation checks whether a hardware accelerated blit
|
||||||
* can be done between the source buffer and the destination buffer.
|
* can be done between the source buffer and the destination buffer.
|
||||||
* If succeed, it returns zero, otherwise for failure.
|
* If succeed, it returns 0.
|
||||||
* If succeed, it is safe to call do_blit operation.
|
|
||||||
*
|
*
|
||||||
* \note If this operation is set as NULL, it will be supposed that
|
* \note If this operation is set as NULL, it will be supposed that
|
||||||
* the driver does not support any hardware accelerated blitting operation.
|
* the driver does not support any hardware accelerated blitting operation.
|
||||||
*/
|
*/
|
||||||
int (* check_blit) (DrmDriver *driver,
|
int (* check_blit) (DrmDriver *driver,
|
||||||
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
DrmSurfaceBuffer* src_buf, DrmSurfaceBuffer* dst_buf);
|
||||||
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
|
||||||
const DrmBlitOperations *ops);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operation does the real blit. It should not be NULL if check_blit
|
* This operation copies bits from a source buffer to a destination buffer.
|
||||||
* is not NULL.
|
|
||||||
*/
|
|
||||||
int (* do_blit) (DrmDriver *driver,
|
|
||||||
DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc,
|
|
||||||
DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc,
|
|
||||||
const DrmBlitOperations *blit_ops);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This operation copies the pixels from the source buffer to
|
|
||||||
* the destination buffer, with or without scaling, rotation, and flip.
|
|
||||||
*
|
*
|
||||||
* \note If this operation is set as NULL, the driver does not support
|
* \note If this operation is set as NULL, the driver does not support
|
||||||
* hardware accelerated copy operation between buffers.
|
* hardware accelerated copy blitting.
|
||||||
|
*
|
||||||
|
* \note Currently, the logical operation is ignored.
|
||||||
*/
|
*/
|
||||||
int (* copy_buff) (DrmDriver *driver,
|
int (* copy_blit) (DrmDriver *driver,
|
||||||
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
||||||
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
||||||
BlitCopyOperation op);
|
ColorLogicalOp logic_op);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This operation blits pixels 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 blitting 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 pixels 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 blitting 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 pixels 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 blitting 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);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This operation blits pixels from a source buffer with the source alpha
|
||||||
|
* value of pixels to the destination buffer, and with the specified color
|
||||||
|
* compositing/blending method (\a ColorBlendMethod).
|
||||||
|
*
|
||||||
|
* \note If this operation is set as NULL, the driver does not support
|
||||||
|
* hardware accelerated blitting with alpha on basis per pixel.
|
||||||
|
*
|
||||||
|
* \note Currently, the color compositing/blending method is ignored.
|
||||||
|
*/
|
||||||
|
int (* alpha_pixel_blit) (DrmDriver *driver,
|
||||||
|
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
||||||
|
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
||||||
|
ColorBlendMethod blend_method);
|
||||||
|
|
||||||
} DrmDriverOps;
|
} DrmDriverOps;
|
||||||
|
|
||||||
|
/** The current version of DRM driver. */
|
||||||
|
#define DRM_DRIVER_VERSION 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement this stub to return the DRI driver operations
|
* Implement this stub to return the DRI driver operations
|
||||||
*
|
*
|
||||||
|
|||||||
+34
-487
File diff suppressed because it is too large
Load Diff
+8
-93
@@ -456,45 +456,6 @@ MG_EXPORT void GUIAPI MiniGUIPanic (int exitcode);
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* \fn GHANDLE GUIAPI JoinLayerEx (const char* layer_name,
|
|
||||||
const char* client_name,
|
|
||||||
int max_nr_highers, int max_nr_normals, int *cli_id)
|
|
||||||
* \brief Joins to a layer and returns the client identifier if success.
|
|
||||||
*
|
|
||||||
* This function should be called by clients before calling any other MiniGUI
|
|
||||||
* functions. You can call \a GetLayerInfo to get the layer information.
|
|
||||||
* If the layer to be joined does not exist, the server, i.e. \a mginit, will
|
|
||||||
* try to create a new one. If you passed a NULL pointer or a null string for
|
|
||||||
* \a layer_name, the client will join to the default layer.
|
|
||||||
*
|
|
||||||
* If the client want to create a new layer, you should specify the maximal
|
|
||||||
* number of z-nodes in the higher level (max_nr_highers) and the maximal
|
|
||||||
* number of z-nodes in the normal level (max_nr_normals) of the new layer.
|
|
||||||
* Passing zero to \a max_nr_highers and max_nr_normals will use the default
|
|
||||||
* values, and the default values are specified by ServerStartup.
|
|
||||||
*
|
|
||||||
* Note that the server will create a default layer named "mginit".
|
|
||||||
*
|
|
||||||
* \param layer_name The name of the layer. You can use NAME_TOPMOST_LAYER to
|
|
||||||
* specify the current topmost layer.
|
|
||||||
* \param client_name The name of the client.
|
|
||||||
* \param max_nr_highers The maximal number of z-nodes in the higher level of
|
|
||||||
* the new layer.
|
|
||||||
* \param max_nr_normals The maximal number of z-nodes in the normal level of
|
|
||||||
* the new layer.
|
|
||||||
* \param cli_id The pointer to a buffer of int to return the client identifier.
|
|
||||||
*
|
|
||||||
* \return The handle to the layer on success, INV_LAYER_HANDLE on error.
|
|
||||||
*
|
|
||||||
* \note Only call this function in clients of MiniGUI-Processes.
|
|
||||||
*
|
|
||||||
* \sa GetLayerInfo, ServerStartup, ServerCreateLayer
|
|
||||||
*/
|
|
||||||
MG_EXPORT GHANDLE GUIAPI JoinLayerEx (const char* layer_name,
|
|
||||||
const char* client_name,
|
|
||||||
int max_nr_highers, int max_nr_normals, int *cli_id);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn GHANDLE GUIAPI JoinLayer (const char* layer_name,
|
* \fn GHANDLE GUIAPI JoinLayer (const char* layer_name,
|
||||||
const char* client_name,
|
const char* client_name,
|
||||||
@@ -529,30 +490,9 @@ MG_EXPORT GHANDLE GUIAPI JoinLayerEx (const char* layer_name,
|
|||||||
*
|
*
|
||||||
* \sa GetLayerInfo, ServerStartup, ServerCreateLayer
|
* \sa GetLayerInfo, ServerStartup, ServerCreateLayer
|
||||||
*/
|
*/
|
||||||
static inline GHANDLE GUIAPI JoinLayer (const char* layer_name,
|
MG_EXPORT GHANDLE GUIAPI JoinLayer (const char* layer_name,
|
||||||
const char* client_name,
|
const char* client_name,
|
||||||
int max_nr_highers, int max_nr_normals)
|
int max_nr_highers, int max_nr_normals);
|
||||||
{
|
|
||||||
return JoinLayerEx (layer_name, client_name,
|
|
||||||
max_nr_highers, max_nr_normals, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \fn int GUIAPI GetClientId (void)
|
|
||||||
* \brief Gets the client identifier.
|
|
||||||
*
|
|
||||||
* You can get the information of a layer through this function.
|
|
||||||
* The information will be returned through the pointer arguments
|
|
||||||
* if the specific pointer is not NULL.
|
|
||||||
*
|
|
||||||
* \return Returns the client identifier of the current process.
|
|
||||||
* Note that the server always returns 0.
|
|
||||||
*
|
|
||||||
* \sa JoinLayerEx
|
|
||||||
*
|
|
||||||
* Since 5.2.0
|
|
||||||
*/
|
|
||||||
MG_EXPORT int GUIAPI GetClientId (void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn GHANDLE GUIAPI GetLayerInfo (const char* layer_name,
|
* \fn GHANDLE GUIAPI GetLayerInfo (const char* layer_name,
|
||||||
@@ -2185,7 +2125,7 @@ MG_EXPORT int GUIAPI ServerSendReplyEx (int clifd,
|
|||||||
* \fn int GUIAPI ServerSendReply (int clifd, const void* reply, int len)
|
* \fn int GUIAPI ServerSendReply (int clifd, const void* reply, int len)
|
||||||
* \brief Sends the reply to the client.
|
* \brief Sends the reply to the client.
|
||||||
*
|
*
|
||||||
* This function sends a reply pointed to by \a reply which is
|
* This function sends a replay pointed to by \a reply which is
|
||||||
* \a len bytes long to the client.
|
* \a len bytes long to the client.
|
||||||
*
|
*
|
||||||
* \note Only used by the server to send the reply to the client.
|
* \note Only used by the server to send the reply to the client.
|
||||||
@@ -2733,26 +2673,6 @@ MG_EXPORT void GUIAPI DesktopUpdateAllWindow (void);
|
|||||||
|
|
||||||
#define DUMMY_LAYER_HANDLE (GHANDLE)(-1)
|
#define DUMMY_LAYER_HANDLE (GHANDLE)(-1)
|
||||||
|
|
||||||
/**
|
|
||||||
* \fn GHANDLE GUIAPI JoinLayerEx (const char* layer_name,
|
|
||||||
const char* client_name,
|
|
||||||
int max_nr_highers, int max_nr_normals, int *cli_fd)
|
|
||||||
* \brief The dummy replacement of the same function for MiniGUI-Processes.
|
|
||||||
*
|
|
||||||
* This function is a replacment of the same function for MiniGUI-Processes
|
|
||||||
* runtime mode. We provide this function for MiniGUI-Threads and
|
|
||||||
* MiniGUI-Standalone runtime modes, in order to avoid using the
|
|
||||||
* conditional compilation instructions in your source code.
|
|
||||||
*
|
|
||||||
* \return Always returns DUMMY_LAYER_HANDLE to indicate success.
|
|
||||||
*/
|
|
||||||
static inline GHANDLE GUIAPI JoinLayerEx (const char* layer_name,
|
|
||||||
const char* client_name,
|
|
||||||
int max_nr_highers, int max_nr_normals, int *cli_fd)
|
|
||||||
{
|
|
||||||
return DUMMY_LAYER_HANDLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn GHANDLE GUIAPI JoinLayer (const char* layer_name,
|
* \fn GHANDLE GUIAPI JoinLayer (const char* layer_name,
|
||||||
const char* client_name,
|
const char* client_name,
|
||||||
@@ -2767,8 +2687,7 @@ static inline GHANDLE GUIAPI JoinLayerEx (const char* layer_name,
|
|||||||
* \return Always returns DUMMY_LAYER_HANDLE to indicate success.
|
* \return Always returns DUMMY_LAYER_HANDLE to indicate success.
|
||||||
*/
|
*/
|
||||||
static inline GHANDLE GUIAPI JoinLayer (const char* layer_name,
|
static inline GHANDLE GUIAPI JoinLayer (const char* layer_name,
|
||||||
const char* client_name,
|
const char* client_name, int max_nr_highers, int max_nr_normals)
|
||||||
int max_nr_highers, int max_nr_normals)
|
|
||||||
{
|
{
|
||||||
return DUMMY_LAYER_HANDLE;
|
return DUMMY_LAYER_HANDLE;
|
||||||
}
|
}
|
||||||
@@ -4178,7 +4097,7 @@ static inline int GUIAPI ShowCursor (BOOL fShow) {
|
|||||||
#endif /* !_MGHAVE_CURSOR */
|
#endif /* !_MGHAVE_CURSOR */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn HCURSOR SetCursor(HCURSOR hcsr)
|
* \def SetCursor(hcsr)
|
||||||
* \brief Changes the current cursor.
|
* \brief Changes the current cursor.
|
||||||
*
|
*
|
||||||
* This function changes the current cursor to be \a hcsr.
|
* This function changes the current cursor to be \a hcsr.
|
||||||
@@ -4191,12 +4110,10 @@ static inline int GUIAPI ShowCursor (BOOL fShow) {
|
|||||||
*
|
*
|
||||||
* \sa SetCursorEx, SetDefaultCursor
|
* \sa SetCursorEx, SetDefaultCursor
|
||||||
*/
|
*/
|
||||||
static inline HCURSOR SetCursor(HCURSOR hcsr) {
|
#define SetCursor(hcsr) SetCursorEx (hcsr, FALSE)
|
||||||
return SetCursorEx (hcsr, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn HCURSOR SetDefaultCursor(HCURSOR hcsr)
|
* \def SetDefaultCursor(hcsr)
|
||||||
* \brief Changes the current cursor, and set it as the default cursor.
|
* \brief Changes the current cursor, and set it as the default cursor.
|
||||||
*
|
*
|
||||||
* This function changes the current cursor to be \a hcsr, and set it as
|
* This function changes the current cursor to be \a hcsr, and set it as
|
||||||
@@ -4210,9 +4127,7 @@ static inline HCURSOR SetCursor(HCURSOR hcsr) {
|
|||||||
*
|
*
|
||||||
* \sa SetCursorEx, SetCursor
|
* \sa SetCursorEx, SetCursor
|
||||||
*/
|
*/
|
||||||
static inline HCURSOR SetDefaultCursor(HCURSOR hcsr) {
|
#define SetDefaultCursor(hcsr) SetCursorEx (hcsr, TRUE)
|
||||||
return SetCursorEx (hcsr, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @} end of cursor_fns */
|
/** @} end of cursor_fns */
|
||||||
|
|
||||||
|
|||||||
+4
-36
@@ -2905,9 +2905,6 @@ typedef struct _WINMASKINFO {
|
|||||||
*
|
*
|
||||||
* This message is sent to the all main windows when the system
|
* This message is sent to the all main windows when the system
|
||||||
* enters idle loop.
|
* enters idle loop.
|
||||||
*
|
|
||||||
* Since 5.0.10, this messasge will be relayed to the active child control
|
|
||||||
* if the main window is currently active.
|
|
||||||
*/
|
*/
|
||||||
#define MSG_IDLE 0x0142
|
#define MSG_IDLE 0x0142
|
||||||
|
|
||||||
@@ -2990,22 +2987,18 @@ typedef struct _WINMASKINFO {
|
|||||||
if the client moved to a new layer */
|
if the client moved to a new layer */
|
||||||
#define MSG_LAYERCHANGED 0x0149
|
#define MSG_LAYERCHANGED 0x0149
|
||||||
|
|
||||||
/* Since 5.2.0; the server send this message to the client
|
|
||||||
if a window has been composited to the screen. */
|
|
||||||
#define MSG_WINCOMPOSITED 0x014A
|
|
||||||
|
|
||||||
#endif /* defined _MGRM_PROCESSES */
|
#endif /* defined _MGRM_PROCESSES */
|
||||||
|
|
||||||
/* Since 5.0.0: for managing message thread */
|
/* Since 5.0.0: for managing message thread */
|
||||||
#define MSG_MANAGE_MSGTHREAD 0x014B
|
#define MSG_MANAGE_MSGTHREAD 0x014A
|
||||||
#define MSGTHREAD_SIGNIN 0x00
|
#define MSGTHREAD_SIGNIN 0x00
|
||||||
#define MSGTHREAD_SIGNOUT 0x01
|
#define MSGTHREAD_SIGNOUT 0x01
|
||||||
|
|
||||||
/* Since 5.0.0: for calculating the default position */
|
/* Since 5.0.0: for calculating the default position */
|
||||||
#define MSG_CALC_POSITION 0x014C
|
#define MSG_CALC_POSITION 0x014B
|
||||||
|
|
||||||
/* Since 5.0.6: for waking up the client */
|
/* Since 5.0.6: for waking up the client */
|
||||||
#define MSG_WAKEUP_CLIENT 0x014D
|
#define MSG_WAKEUP_CLIENT 0x014C
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def MSG_DOESNEEDIME
|
* \def MSG_DOESNEEDIME
|
||||||
@@ -6462,7 +6455,7 @@ MG_EXPORT RES_KEY Str2Key (const char* str);
|
|||||||
* \fn int GUIAPI GetWindowZOrder(HWND hWnd);
|
* \fn int GUIAPI GetWindowZOrder(HWND hWnd);
|
||||||
* \brief Get The Control ZOrder in the parent window
|
* \brief Get The Control ZOrder in the parent window
|
||||||
*
|
*
|
||||||
* \param hWnd Handler of a control
|
* \param hWnd Handle of a control
|
||||||
*
|
*
|
||||||
* \return return index of ZOrder or 0 if hWnd is a MainWindow or -1 if error
|
* \return return index of ZOrder or 0 if hWnd is a MainWindow or -1 if error
|
||||||
*
|
*
|
||||||
@@ -7241,31 +7234,6 @@ MG_EXPORT BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags);
|
|||||||
|
|
||||||
#ifdef _MGSCHEMA_COMPOSITING
|
#ifdef _MGSCHEMA_COMPOSITING
|
||||||
|
|
||||||
/**
|
|
||||||
* \fn int GUIAPI GetWindowSharedSurfaceFD (HWND hwnd, size_t *map_size,
|
|
||||||
* DWORD *flags)
|
|
||||||
* \brief Gets the file descriptor of the surface buffer for a window or
|
|
||||||
* the main window it locates.
|
|
||||||
*
|
|
||||||
* This function gets the file descriptor of the surface buffer for
|
|
||||||
* the specified window if it is a main window or the main window it locates.
|
|
||||||
* Note that if the window is a control that has the style `WS_EX_CTRLASMAINWIN`,
|
|
||||||
* the window will have a separate surface buffer.
|
|
||||||
*
|
|
||||||
* \param hwnd The handle to the window.
|
|
||||||
*
|
|
||||||
* \return An integer larger than or equal to 0 for a valid file descriptor,
|
|
||||||
* otherwise a negative value.
|
|
||||||
*
|
|
||||||
* \note This function only available when _MGSCHEMA_COMPOSITING is defined.
|
|
||||||
*
|
|
||||||
* \sa CreateMemDCFromSharedSurfaceFD
|
|
||||||
*
|
|
||||||
* Since 5.0.13
|
|
||||||
*/
|
|
||||||
MG_EXPORT int GUIAPI GetWindowSharedSurfaceFD (HWND hWnd, size_t *map_size,
|
|
||||||
DWORD *flags);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn BOOL GUIAPI SetMainWindowCompositing (HWND hWnd,
|
* \fn BOOL GUIAPI SetMainWindowCompositing (HWND hWnd,
|
||||||
int type, DWORD arg)
|
int type, DWORD arg)
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# This file does not do anything, except making sure these files are included
|
# This file does not do anything, except making sure these files are included
|
||||||
# when you run 'make dist'.
|
# when you run 'make dist'.
|
||||||
|
|
||||||
EXTRA_DIST =
|
EXTRA_DIST = libtool.m4
|
||||||
|
|||||||
Vendored
+3724
File diff suppressed because it is too large
Load Diff
+1
-2
@@ -2,12 +2,11 @@ prefix=@prefix@
|
|||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
includedir=@includedir@
|
includedir=@includedir@
|
||||||
runmode=@MINIGUI_RUNMODE@
|
|
||||||
libsuffix=@MGLIB_SUFFIX@
|
|
||||||
|
|
||||||
Name: MiniGUI
|
Name: MiniGUI
|
||||||
Description: A mature cross-platform windowing and GUI system for embedded systems and IoT smart devices.
|
Description: A mature cross-platform windowing and GUI system for embedded systems and IoT smart devices.
|
||||||
Version: @MINIGUI_VERSION@
|
Version: @MINIGUI_VERSION@
|
||||||
|
Runmode: @MINIGUI_RUNMODE@
|
||||||
Requires:
|
Requires:
|
||||||
Libs: -L${libdir} -lminigui_@MGLIB_SUFFIX@ @DEP_LIBS@
|
Libs: -L${libdir} -lminigui_@MGLIB_SUFFIX@ @DEP_LIBS@
|
||||||
Libs.private:
|
Libs.private:
|
||||||
|
|||||||
+43
-18
@@ -1,27 +1,52 @@
|
|||||||
COMMON_SUBDIRS = libc misc main kernel sysres ial control ex_ctrl font gui mybmp include textedit newgal newgdi
|
if MG_MINIMALGDI
|
||||||
|
COMMON_SUBDIRS = misc kernel sysres include
|
||||||
|
|
||||||
COMMON_LADD = \
|
COMMON_LADD = \
|
||||||
libc/liblibc.la \
|
kernel/libkernel.la \
|
||||||
misc/libmisc.la \
|
sysres/libsysres.la \
|
||||||
control/libcontrol.la \
|
misc/libmisc.la
|
||||||
ex_ctrl/libexctrl.la \
|
else
|
||||||
font/libfont.la \
|
COMMON_SUBDIRS = libc misc main kernel sysres ial control ex_ctrl font gui mybmp include textedit
|
||||||
|
|
||||||
|
COMMON_LADD = \
|
||||||
|
libc/liblibc.la \
|
||||||
|
misc/libmisc.la \
|
||||||
|
control/libcontrol.la \
|
||||||
|
ex_ctrl/libexctrl.la \
|
||||||
|
font/libfont.la \
|
||||||
font/in-core/libincore.la \
|
font/in-core/libincore.la \
|
||||||
ial/libial.la \
|
ial/libial.la \
|
||||||
gui/libgui.la \
|
gui/libgui.la \
|
||||||
main/libmain.la \
|
main/libmain.la \
|
||||||
mybmp/libmybmp.la \
|
mybmp/libmybmp.la \
|
||||||
kernel/libkernel.la \
|
kernel/libkernel.la \
|
||||||
sysres/libsysres.la \
|
sysres/libsysres.la \
|
||||||
textedit/libtextedit.la \
|
textedit/libtextedit.la
|
||||||
newgal/libnewgal.la \
|
endif
|
||||||
newgdi/libnewgdi.la
|
|
||||||
|
|
||||||
DIST_SUBDIRS = $(COMMON_SUBDIRS) newgal newgdi server client standalone
|
if MGRM_STANDALONE
|
||||||
SUBDIRS = $(COMMON_SUBDIRS) @RUNMODE_SUBDIRS@
|
LITE_LADD = standalone/libstandalone.la
|
||||||
|
LITE_SUBDIRS = standalone
|
||||||
|
else
|
||||||
|
if MGRM_PROCESSES
|
||||||
|
LITE_LADD = server/libserver.la client/libclient.la
|
||||||
|
LITE_SUBDIRS = server client
|
||||||
|
else
|
||||||
|
LITE_LADD =
|
||||||
|
LITE_SUBDIRS =
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
NEWGAL_LADD = newgal/libnewgal.la newgdi/libnewgdi.la
|
||||||
|
NEWGAL_SUBDIRS = newgal newgdi
|
||||||
|
|
||||||
|
DIST_SUBDIRS = $(COMMON_SUBDIRS) newgal newgdi server client standalone
|
||||||
|
SUBDIRS = $(COMMON_SUBDIRS) $(NEWGAL_SUBDIRS) $(LITE_SUBDIRS)
|
||||||
|
|
||||||
MGSOURCES = template.c template.h
|
MGSOURCES = template.c template.h
|
||||||
MGLIBADD = $(COMMON_LADD) @RUNMODE_LADD@
|
MGLIBADD = $(COMMON_LADD) \
|
||||||
|
$(LITE_LADD) \
|
||||||
|
$(NEWGAL_LADD)
|
||||||
MGLDFLAGS = -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
MGLDFLAGS = -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||||
|
|
||||||
lib_LTLIBRARIES=libminigui_@MGLIB_SUFFIX@.la
|
lib_LTLIBRARIES=libminigui_@MGLIB_SUFFIX@.la
|
||||||
|
|||||||
+3
-32
@@ -184,23 +184,6 @@ static void process_socket_message (MSG *msg)
|
|||||||
LOSWORD(msg->wParam), HISWORD(msg->wParam),
|
LOSWORD(msg->wParam), HISWORD(msg->wParam),
|
||||||
LOSWORD(msg->lParam), HISWORD(msg->lParam));
|
LOSWORD(msg->lParam), HISWORD(msg->lParam));
|
||||||
}
|
}
|
||||||
#ifdef _MGSCHEMA_COMPOSITING
|
|
||||||
else if (msg->message == MSG_WINCOMPOSITED) {
|
|
||||||
/* Since 5.2.0 */
|
|
||||||
int slot = (int)msg->wParam;
|
|
||||||
HWND hwnd = (HWND)msg->lParam;
|
|
||||||
unsigned dirty_age = (unsigned)msg->time;
|
|
||||||
if (__mg_client_check_znode_hwnd(slot, hwnd, __mg_client_id)) {
|
|
||||||
GAL_Surface *ssurf = ((PMAINWIN)hwnd)->surf;
|
|
||||||
assert(ssurf->shared_header);
|
|
||||||
__mg_lock_file_for_write(ssurf->fd);
|
|
||||||
if (ssurf->dirty_info->dirty_age == dirty_age) {
|
|
||||||
ssurf->dirty_info->nr_dirty_rcs = 0;
|
|
||||||
}
|
|
||||||
__mg_unlock_file_for_write(ssurf->fd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
else {
|
else {
|
||||||
if (msg->hwnd == HWND_NULL) {
|
if (msg->hwnd == HWND_NULL) {
|
||||||
msg->hwnd = HWND_DESKTOP;
|
msg->hwnd = HWND_DESKTOP;
|
||||||
@@ -535,8 +518,8 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
|||||||
return (n > 0);
|
return (n > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GHANDLE GUIAPI JoinLayerEx (const char* layer_name, const char* client_name,
|
GHANDLE GUIAPI JoinLayer (const char* layer_name, const char* client_name,
|
||||||
int max_nr_topmosts, int max_nr_normals, int *cli_id)
|
int max_nr_topmosts, int max_nr_normals)
|
||||||
{
|
{
|
||||||
GHANDLE layer_handle = INV_LAYER_HANDLE;
|
GHANDLE layer_handle = INV_LAYER_HANDLE;
|
||||||
REQUEST req;
|
REQUEST req;
|
||||||
@@ -546,12 +529,8 @@ GHANDLE GUIAPI JoinLayerEx (const char* layer_name, const char* client_name,
|
|||||||
if (mgIsServer)
|
if (mgIsServer)
|
||||||
return layer_handle;
|
return layer_handle;
|
||||||
|
|
||||||
if (__mg_client_id != 0) {
|
if (__mg_client_id != 0) /* Already joined, return the handle */
|
||||||
/* Already joined, return the handle */
|
|
||||||
if (cli_id)
|
|
||||||
*cli_id = __mg_client_id;
|
|
||||||
return GetLayerInfo (NAME_SELF_LAYER, NULL, NULL, NULL);
|
return GetLayerInfo (NAME_SELF_LAYER, NULL, NULL, NULL);
|
||||||
}
|
|
||||||
|
|
||||||
if (layer_name) {
|
if (layer_name) {
|
||||||
strncpy (info.layer_name, layer_name, LEN_LAYER_NAME);
|
strncpy (info.layer_name, layer_name, LEN_LAYER_NAME);
|
||||||
@@ -614,18 +593,10 @@ GHANDLE GUIAPI JoinLayerEx (const char* layer_name, const char* client_name,
|
|||||||
|
|
||||||
__mg_start_client_desktop ();
|
__mg_start_client_desktop ();
|
||||||
|
|
||||||
if (cli_id)
|
|
||||||
*cli_id = __mg_client_id;
|
|
||||||
|
|
||||||
ret:
|
ret:
|
||||||
return layer_handle;
|
return layer_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GUIAPI GetClientId (void)
|
|
||||||
{
|
|
||||||
return __mg_client_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
GHANDLE GUIAPI GetLayerInfo (const char* layer_name,
|
GHANDLE GUIAPI GetLayerInfo (const char* layer_name,
|
||||||
int* nr_clients, BOOL* is_topmost, int* cli_active)
|
int* nr_clients, BOOL* is_topmost, int* cli_active)
|
||||||
{
|
{
|
||||||
|
|||||||
+46
-56
@@ -210,7 +210,6 @@ static void setup_dc (HWND hWnd, BIDISLEDITDATA *sled, HDC hdc, BOOL bSel)
|
|||||||
DWORD dwStyle = GetWindowStyle (hWnd);
|
DWORD dwStyle = GetWindowStyle (hWnd);
|
||||||
|
|
||||||
if (!bSel) {
|
if (!bSel) {
|
||||||
SetBkMode (hdc, BM_TRANSPARENT);
|
|
||||||
|
|
||||||
if (dwStyle & WS_DISABLED)
|
if (dwStyle & WS_DISABLED)
|
||||||
SetTextColor (hdc,
|
SetTextColor (hdc,
|
||||||
@@ -584,7 +583,7 @@ static void slePaint (HWND hWnd, HDC hdc, PBIDISLEDITDATA sled)
|
|||||||
|
|
||||||
/* draw selected chars */
|
/* draw selected chars */
|
||||||
setup_dc (hWnd, sled, hdc, TRUE);
|
setup_dc (hWnd, sled, hdc, TRUE);
|
||||||
outw += DrawACharString (hdc, startx + outw, starty,
|
outw += DrawACharString (hdc, startx + outw, starty,
|
||||||
achar_string, sled->selEnd - sled->selStart, NULL, NULL);
|
achar_string, sled->selEnd - sled->selStart, NULL, NULL);
|
||||||
achar_string += sled->selEnd - sled->selStart;
|
achar_string += sled->selEnd - sled->selStart;
|
||||||
|
|
||||||
@@ -1070,7 +1069,6 @@ static int ascii_bidi_type[] = {
|
|||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||||
|
|
||||||
/*0x60~0x6f*/
|
/*0x60~0x6f*/
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
@@ -1087,23 +1085,21 @@ static int ascii_bidi_type[] = {
|
|||||||
static int inline get_char_bidi_type (LOGFONT* logfont, Achar32 chv)
|
static int inline get_char_bidi_type (LOGFONT* logfont, Achar32 chv)
|
||||||
{
|
{
|
||||||
DEVFONT* devfont;
|
DEVFONT* devfont;
|
||||||
int bidi_type = BIDI_TYPE_LTR;
|
|
||||||
|
|
||||||
if (IS_MBCHV(chv)) {
|
if (IS_MBCHV(chv)) {
|
||||||
devfont = logfont->devfonts[1];
|
devfont = logfont->devfonts[1];
|
||||||
|
|
||||||
if (devfont->charset_ops->bidi_char_type) {
|
if (devfont->charset_ops->bidi_char_type) {
|
||||||
bidi_type = devfont->charset_ops->bidi_char_type (chv);
|
return devfont->charset_ops->bidi_char_type (chv);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return BIDI_TYPE_LTR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
assert(chv < 0x80);
|
return ascii_bidi_type[chv];
|
||||||
bidi_type = ascii_bidi_type[chv];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_DBG_PRINTF("chv: %X: bidi_type: %x\n", chv, bidi_type);
|
|
||||||
return bidi_type;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type,
|
static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type,
|
||||||
int r_char_type, int line_type)
|
int r_char_type, int line_type)
|
||||||
@@ -1112,60 +1108,53 @@ static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type,
|
|||||||
Achar32 chv;
|
Achar32 chv;
|
||||||
chv = GetACharValue (logfont, newtext, strlen(newtext), NULL, 0);
|
chv = GetACharValue (logfont, newtext, strlen(newtext), NULL, 0);
|
||||||
|
|
||||||
int type = CHAR_TYPE_UNKKOWN;
|
if (chv == INV_ACHAR_VALUE)
|
||||||
|
return -1;
|
||||||
if (chv == INV_ACHAR_VALUE) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
bidi_type = get_char_bidi_type (logfont, chv);
|
bidi_type = get_char_bidi_type (logfont, chv);
|
||||||
|
|
||||||
if (BIDI_IS_STRONG(bidi_type)) {
|
if (BIDI_IS_STRONG(bidi_type))
|
||||||
if (BIDI_IS_RTL(bidi_type)) {
|
{
|
||||||
type = CHAR_TYPE_RTL;
|
if (BIDI_IS_RTL(bidi_type))
|
||||||
goto done;
|
{
|
||||||
|
return CHAR_TYPE_RTL;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
type = CHAR_TYPE_LTR;
|
{
|
||||||
goto done;
|
return CHAR_TYPE_LTR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BIDI_IS_NUMBER(bidi_type)) {
|
if (BIDI_IS_NUMBER(bidi_type))
|
||||||
type = CHAR_TYPE_LTR;
|
{
|
||||||
goto done;
|
return CHAR_TYPE_LTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (l_char_type == r_char_type) {
|
if (l_char_type == r_char_type)
|
||||||
type = l_char_type;
|
{
|
||||||
goto done;
|
return l_char_type;
|
||||||
}
|
}
|
||||||
/* no left char */
|
/* no left char */
|
||||||
else if (l_char_type == CHAR_TYPE_UNKKOWN) {
|
else if (l_char_type == -1)
|
||||||
|
{
|
||||||
if (BIDI_IS_WEAK (bidi_type))
|
if (BIDI_IS_WEAK (bidi_type))
|
||||||
type = r_char_type;
|
return r_char_type;
|
||||||
else
|
else
|
||||||
type = line_type;
|
return line_type;
|
||||||
goto done;
|
|
||||||
}
|
}
|
||||||
/* no right char */
|
/* no right char */
|
||||||
else if (r_char_type == CHAR_TYPE_UNKKOWN) {
|
else if (r_char_type == -1)
|
||||||
|
{
|
||||||
if (BIDI_IS_WEAK (bidi_type))
|
if (BIDI_IS_WEAK (bidi_type))
|
||||||
type = l_char_type;
|
return l_char_type;
|
||||||
else
|
else
|
||||||
type = line_type;
|
return line_type;
|
||||||
goto done;
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
type = line_type;
|
{
|
||||||
|
return line_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
_DBG_PRINTF("l_char_type: %d, r_char_type: %d, line_type: %d, "
|
|
||||||
"type for %X: %d\n",
|
|
||||||
l_char_type, r_char_type, line_type, chv, type);
|
|
||||||
|
|
||||||
done:
|
|
||||||
return type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_line_rl_type (ACHARMAPINFO* map, int len)
|
static int get_line_rl_type (ACHARMAPINFO* map, int len)
|
||||||
@@ -2144,7 +2133,7 @@ esright_input_char_refresh (HWND hWnd,
|
|||||||
scroll_rc.right = cur_caret_x;
|
scroll_rc.right = cur_caret_x;
|
||||||
|
|
||||||
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
||||||
UpdateInvalidClient(hWnd, TRUE);
|
UpdateWindow(hWnd, FALSE);
|
||||||
edtSetCaretPos (hWnd, sled);
|
edtSetCaretPos (hWnd, sled);
|
||||||
|
|
||||||
sled->changed = TRUE;
|
sled->changed = TRUE;
|
||||||
@@ -2515,6 +2504,8 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
unsigned char charBuffer [4];
|
unsigned char charBuffer [4];
|
||||||
int chars;
|
int chars;
|
||||||
|
|
||||||
|
_DBG_PRINTF("get char-----------------char----%p\n", (PVOID)wParam);
|
||||||
|
|
||||||
if (dwStyle & ES_READONLY)
|
if (dwStyle & ES_READONLY)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -2535,6 +2526,9 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
else {
|
else {
|
||||||
chars = 1;
|
chars = 1;
|
||||||
|
|
||||||
|
if (charBuffer [0] == 127) // BS
|
||||||
|
charBuffer [0] = '\b';
|
||||||
|
|
||||||
if (dwStyle & ES_UPPERCASE) {
|
if (dwStyle & ES_UPPERCASE) {
|
||||||
charBuffer [0] = toupper (charBuffer[0]);
|
charBuffer [0] = toupper (charBuffer[0]);
|
||||||
}
|
}
|
||||||
@@ -2543,12 +2537,12 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chars > 1) {
|
if (chars == 1) {
|
||||||
_WRN_PRINTF("BIDISLEDIT only support ISO8859-6 charset\n");
|
if (charBuffer [0] < 0x20 && charBuffer[0] != '\b') //FIXME
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (charBuffer [0] == '\b' || charBuffer [0] == 0x7F) {
|
|
||||||
// BS or DEL
|
if (wParam == '\b') { // backspace
|
||||||
int del = 1;
|
int del = 1;
|
||||||
|
|
||||||
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
|
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
|
||||||
@@ -2570,12 +2564,9 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
sleBackspaceText (hWnd, sled, del, FALSE, FALSE);
|
sleBackspaceText (hWnd, sled, del, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (charBuffer [0] < 0x20) {
|
else{
|
||||||
// ignore all other control characters.
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (dwStyle & ES_LEFT) {
|
if (dwStyle & ES_LEFT) {
|
||||||
|
//if ((dwStyle&0xffff) == ES_LEFT) {
|
||||||
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
||||||
set_edit_caret_pos(hWnd, sled);
|
set_edit_caret_pos(hWnd, sled);
|
||||||
|
|
||||||
@@ -2595,7 +2586,6 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
sleInsertText (hWnd, sled, (char* )charBuffer, chars, FALSE);
|
sleInsertText (hWnd, sled, (char* )charBuffer, chars, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-12
@@ -299,15 +299,7 @@ static void change_status_from_pose (PCONTROL pctrl, int new_pose,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DK: When the radio or check button state changes do not erase the background,
|
/*complete a click if the click if valid
|
||||||
* and the prospects for direct rendering */
|
|
||||||
btnGetRects (pctrl, &rcClient, &rcContent, &rcBitmap);
|
|
||||||
if (BUTTON_IS_PUSHBTN(pctrl) || (pctrl->dwStyle & BS_PUSHLIKE))
|
|
||||||
InvalidateRect((HWND)pctrl, NULL, TRUE);
|
|
||||||
else
|
|
||||||
InvalidateRect((HWND)pctrl, &rcBitmap, FALSE);
|
|
||||||
|
|
||||||
/* complete a click if the click if valid
|
|
||||||
* (mouse lbutton up in button )*/
|
* (mouse lbutton up in button )*/
|
||||||
if (old_pose == BST_PUSHED && new_pose != BST_DISABLE
|
if (old_pose == BST_PUSHED && new_pose != BST_DISABLE
|
||||||
&& change_valid)
|
&& change_valid)
|
||||||
@@ -320,6 +312,14 @@ static void change_status_from_pose (PCONTROL pctrl, int new_pose,
|
|||||||
|
|
||||||
NotifyParent ((HWND)pctrl, pctrl->id, BN_CLICKED);
|
NotifyParent ((HWND)pctrl, pctrl->id, BN_CLICKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* DK: When the radio or check button state changes do not erase the background,
|
||||||
|
* and the prospects for direct rendering */
|
||||||
|
btnGetRects (pctrl, &rcClient, &rcContent, &rcBitmap);
|
||||||
|
if (BUTTON_IS_PUSHBTN(pctrl) || (pctrl->dwStyle & BS_PUSHLIKE))
|
||||||
|
InvalidateRect((HWND)pctrl, NULL, TRUE);
|
||||||
|
else
|
||||||
|
InvalidateRect((HWND)pctrl, &rcBitmap, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*btnGetRects:
|
/*btnGetRects:
|
||||||
@@ -423,8 +423,8 @@ static void draw_bitmap_button (PCONTROL pctrl, HDC hdc, DWORD dwStyle,
|
|||||||
|
|
||||||
GetClientRect ((HWND)pctrl, &prcClient);
|
GetClientRect ((HWND)pctrl, &prcClient);
|
||||||
if (dwStyle & BS_REALSIZEIMAGE) {
|
if (dwStyle & BS_REALSIZEIMAGE) {
|
||||||
x += (int)(w - bmp->bmWidth) >> 1;
|
x += (w - bmp->bmWidth) >> 1;
|
||||||
y += (int)(h - bmp->bmHeight) >> 1;
|
y += (h - bmp->bmHeight) >> 1;
|
||||||
w = h = 0;
|
w = h = 0;
|
||||||
|
|
||||||
if (bmp->bmWidth > RECTW(prcClient)){
|
if (bmp->bmWidth > RECTW(prcClient)){
|
||||||
@@ -847,6 +847,8 @@ static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case BM_SETSTYLE:
|
case BM_SETSTYLE:
|
||||||
pctrl->dwStyle &= 0xFFFF0000;
|
pctrl->dwStyle &= 0xFFFF0000;
|
||||||
pctrl->dwStyle |= (DWORD)(wParam & 0x0000FFFF);
|
pctrl->dwStyle |= (DWORD)(wParam & 0x0000FFFF);
|
||||||
@@ -1052,7 +1054,7 @@ static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefaultControlProc (hWnd, uMsg, wParam, lParam);
|
return DefaultControlProc (hWnd, uMsg, wParam, lParam);
|
||||||
|
|||||||
+11
-8
@@ -1678,7 +1678,7 @@ esright_input_char_refresh (HWND hWnd,
|
|||||||
scroll_rc.right = cur_caret_x;
|
scroll_rc.right = cur_caret_x;
|
||||||
|
|
||||||
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
||||||
UpdateInvalidClient(hWnd, TRUE);
|
UpdateWindow(hWnd, FALSE);
|
||||||
edtSetCaretPos (hWnd, sled);
|
edtSetCaretPos (hWnd, sled);
|
||||||
|
|
||||||
sled->changed = TRUE;
|
sled->changed = TRUE;
|
||||||
@@ -2143,6 +2143,9 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
else {
|
else {
|
||||||
chars = 1;
|
chars = 1;
|
||||||
|
|
||||||
|
if (charBuffer [0] == 127) // BS
|
||||||
|
charBuffer [0] = '\b';
|
||||||
|
|
||||||
if (dwStyle & ES_UPPERCASE) {
|
if (dwStyle & ES_UPPERCASE) {
|
||||||
charBuffer [0] = toupper (charBuffer[0]);
|
charBuffer [0] = toupper (charBuffer[0]);
|
||||||
}
|
}
|
||||||
@@ -2151,8 +2154,12 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chars == 1 && (charBuffer[0] == '\b' || charBuffer[0] == 0x7F)) {
|
if (chars == 1) {
|
||||||
// ASCII BS or DEL
|
if (charBuffer [0] < 0x20 && charBuffer[0] != '\b') //FIXME
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (charBuffer[0] == '\b') { //backspace
|
||||||
int del;
|
int del;
|
||||||
|
|
||||||
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
|
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
|
||||||
@@ -2177,11 +2184,7 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
sleInsertText (hWnd, sled, NULL, del);
|
sleInsertText (hWnd, sled, NULL, del);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (chars == 1 && charBuffer [0] < 0x20) {
|
else{
|
||||||
// ignore all other ASCII control characters.
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (dwStyle & ES_LEFT) {
|
if (dwStyle & ES_LEFT) {
|
||||||
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
||||||
set_edit_caret_pos(hWnd, sled);
|
set_edit_caret_pos(hWnd, sled);
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ void mglist_set_itemops (MgList *mglst, PMGITEMOPS iop)
|
|||||||
mglst->iop = *iop;
|
mglst->iop = *iop;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
||||||
PSCRDATA pscrdata, MgList *mglst)
|
PSCRDATA pscrdata, MgList *mglst)
|
||||||
{
|
{
|
||||||
switch (message) {
|
switch (message) {
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ struct _MgList
|
|||||||
|
|
||||||
/* ------------------------- external api -------------------------- */
|
/* ------------------------- external api -------------------------- */
|
||||||
|
|
||||||
MG_EXPORT LRESULT DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
MG_EXPORT int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
||||||
PSCRDATA pscrdata, MgList *mglst);
|
PSCRDATA pscrdata, MgList *mglst);
|
||||||
|
|
||||||
MG_EXPORT SVITEM_DRAWFUNC mglist_set_itemdraw (MgList *mglst, SVITEM_DRAWFUNC draw_func);
|
MG_EXPORT SVITEM_DRAWFUNC mglist_set_itemdraw (MgList *mglst, SVITEM_DRAWFUNC draw_func);
|
||||||
|
|||||||
@@ -172,10 +172,6 @@ BOOL scrolled_set_cont_pos (HWND hWnd, PSCRDATA pscrdata, int cont_x, int cont_y
|
|||||||
SetScrollPos (hWnd, SB_VERT, cont_y);
|
SetScrollPos (hWnd, SB_VERT, cont_y);
|
||||||
bChange = TRUE;
|
bChange = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bChange)
|
|
||||||
UpdateInvalidClient(hWnd, FALSE);
|
|
||||||
|
|
||||||
return bChange;
|
return bChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,7 +585,7 @@ int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
int DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PSCRDATA pscrdata = NULL;
|
PSCRDATA pscrdata = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ typedef struct _scrdata
|
|||||||
typedef SCRDATA *PSCRDATA;
|
typedef SCRDATA *PSCRDATA;
|
||||||
|
|
||||||
|
|
||||||
MG_EXPORT LRESULT DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
MG_EXPORT int DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||||
MG_EXPORT int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h);
|
MG_EXPORT int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h);
|
||||||
MG_EXPORT void scrolled_destroy (PSCRDATA pscrdata);
|
MG_EXPORT void scrolled_destroy (PSCRDATA pscrdata);
|
||||||
MG_EXPORT void scrolled_hscroll (HWND hWnd, PSCRDATA pscrdata, WPARAM wParam, LPARAM lParam);
|
MG_EXPORT void scrolled_hscroll (HWND hWnd, PSCRDATA pscrdata, WPARAM wParam, LPARAM lParam);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2022, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -493,15 +493,10 @@ LRESULT ScrollViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MSG_DESTROY: {
|
case MSG_DESTROY:
|
||||||
/* suppress a warning about calling free() before using the pointer */
|
scrollview_destroy (psvdata);
|
||||||
PSVDATA svdata = (PSVDATA) GetWindowAdditionalData2 (hWnd);
|
free (psvdata);
|
||||||
if (svdata) {
|
|
||||||
scrollview_destroy(svdata);
|
|
||||||
free (svdata);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case MSG_GETDLGCODE:
|
case MSG_GETDLGCODE:
|
||||||
return DLGC_WANTARROWS;
|
return DLGC_WANTARROWS;
|
||||||
|
|||||||
@@ -2096,6 +2096,7 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
|
|||||||
rcInv.right = ptedata->svdata.scrdata.nContWidth;
|
rcInv.right = ptedata->svdata.scrdata.nContWidth;
|
||||||
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
||||||
REFRESH_NODE_EX(node, &rcInv);
|
REFRESH_NODE_EX(node, &rcInv);
|
||||||
|
// UpdateWindow(hWnd, FALSE);
|
||||||
|
|
||||||
newlinenr = NODE_LINENR(node);
|
newlinenr = NODE_LINENR(node);
|
||||||
rcInv.left = 0;
|
rcInv.left = 0;
|
||||||
@@ -2103,10 +2104,12 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
|
|||||||
rcInv.top += ptedata->nLineHeight;
|
rcInv.top += ptedata->nLineHeight;
|
||||||
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
||||||
REFRESH_NODE_EX(node, &rcInv);
|
REFRESH_NODE_EX(node, &rcInv);
|
||||||
|
// UpdateWindow(hWnd, FALSE);
|
||||||
}
|
}
|
||||||
/* houhh 20090814, UpdataWindow will invalidate all edit area, but
|
/* houhh 20090814, UpdataWindow will invalidate all edit area, but
|
||||||
* erase area is not same with msg_paint area.*/
|
* erase area is not same with msg_paint area.*/
|
||||||
UpdateInvalidClient(hWnd, TRUE);
|
UpdateWindow(hWnd, FALSE);
|
||||||
|
//SendMessage(hWnd, MSG_PAINT, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2022, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -283,7 +283,7 @@ static void DrawCoolBox (HWND hWnd, HDC hdc, PCOOLBARCTRL pdata)
|
|||||||
WINDOWINFO *info;
|
WINDOWINFO *info;
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
if (tmpdata->Caption [0] == '\0')
|
if (tmpdata->Caption == NULL || tmpdata->Caption [0] == '\0')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
GetTextExtent (hdc, tmpdata->Caption, -1, &size);
|
GetTextExtent (hdc, tmpdata->Caption, -1, &size);
|
||||||
|
|||||||
@@ -80,17 +80,17 @@ static void update_viewport (gvGridViewData *view, int from, int to, int is_row)
|
|||||||
{
|
{
|
||||||
RECT r;
|
RECT r;
|
||||||
|
|
||||||
GetClientRect(view->hCtrl, &r);
|
GetClientRect (view->hCtrl, &r);
|
||||||
|
|
||||||
if (is_row) {
|
if (is_row) {
|
||||||
r.top = from;
|
r.top = from;
|
||||||
ScrollWindow(view->hCtrl, 0, to, &r, NULL);
|
ScrollWindow (view->hCtrl, 0, to, &r, NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
r.left = from;
|
r.left = from;
|
||||||
ScrollWindow(view->hCtrl, to, 0, &r, NULL);
|
ScrollWindow (view->hCtrl, to, 0, &r, NULL);
|
||||||
}
|
}
|
||||||
UpdateInvalidClient(view->hCtrl, FALSE);
|
UpdateWindow(view->hCtrl, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// scroll function {{{
|
// scroll function {{{
|
||||||
|
|||||||
@@ -157,8 +157,6 @@ static int isInItem (MgList *mglst, int mouseX, int mouseY,
|
|||||||
|
|
||||||
index = row * pivlist->nCol + col;
|
index = row * pivlist->nCol + col;
|
||||||
pci = (IconviewItem *)mglist_getitem_byindex (mglst, index);
|
pci = (IconviewItem *)mglist_getitem_byindex (mglst, index);
|
||||||
if (pci == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (pRet)
|
if (pRet)
|
||||||
*pRet = (MgItem*)pci;
|
*pRet = (MgItem*)pci;
|
||||||
|
|||||||
+17
-10
@@ -93,15 +93,14 @@ BOOL RegisterTreeViewControl (void)
|
|||||||
const WINDOW_ELEMENT_RENDERER * rdr =
|
const WINDOW_ELEMENT_RENDERER * rdr =
|
||||||
GetDefaultWindowElementRenderer();
|
GetDefaultWindowElementRenderer();
|
||||||
|
|
||||||
if (!(icon_fold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name,
|
|
||||||
SYSICON_FOLD, szValue)))) {
|
if (!(icon_fold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name, SYSICON_FOLD, szValue)))) {
|
||||||
if (!(icon_fold = LoadSystemIcon (SYSICON_FOLD, 0))) {
|
if (!(icon_fold = LoadSystemIcon (SYSICON_FOLD, 0))) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(icon_unfold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name,
|
if (!(icon_unfold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name, SYSICON_UNFOLD, szValue)))) {
|
||||||
SYSICON_UNFOLD, szValue)))) {
|
|
||||||
if (!(icon_unfold = LoadSystemIcon (SYSICON_UNFOLD, 0))) {
|
if (!(icon_unfold = LoadSystemIcon (SYSICON_UNFOLD, 0))) {
|
||||||
DestroyIcon (icon_fold);
|
DestroyIcon (icon_fold);
|
||||||
icon_fold = 0;
|
icon_fold = 0;
|
||||||
@@ -181,7 +180,6 @@ static BOOL tvInitTVData (HWND hwnd, PTVDATA pData, DWORD dwStyle, PTVITEMINFO r
|
|||||||
tvRoot->hIconFold = root_ii->hIconFold;
|
tvRoot->hIconFold = root_ii->hIconFold;
|
||||||
else
|
else
|
||||||
tvRoot->hIconFold = ICON_FOLD;
|
tvRoot->hIconFold = ICON_FOLD;
|
||||||
|
|
||||||
if (root_ii && root_ii->hIconUnfold)
|
if (root_ii && root_ii->hIconUnfold)
|
||||||
tvRoot->hIconUnfold = root_ii->hIconUnfold;
|
tvRoot->hIconUnfold = root_ii->hIconUnfold;
|
||||||
else
|
else
|
||||||
@@ -634,13 +632,22 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX, int cent
|
|||||||
centerX += (h>>1) + TV_BOXGAP;
|
centerX += (h>>1) + TV_BOXGAP;
|
||||||
|
|
||||||
if (pData->dwStyle & TVS_WITHICON) {
|
if (pData->dwStyle & TVS_WITHICON) {
|
||||||
if (p->child != NULL && (p->dwFlags & TVIF_FOLD)) {
|
if (!(pData->dwStyle & TVS_ICONFORSELECT)
|
||||||
|
&& (!p->child || (p->dwFlags & TVIF_FOLD))) {
|
||||||
if ((p->hIconFold)) {
|
if ((p->hIconFold)) {
|
||||||
DrawIcon (hdc, centerX, centerY - (h>>1), h, h, p->hIconFold);
|
DrawIcon (hdc, centerX, centerY - (h>>1),
|
||||||
|
h, h, p->hIconFold);
|
||||||
|
}
|
||||||
|
} else if ((pData->dwStyle & TVS_ICONFORSELECT) && p->dwFlags & TVIF_SELECTED) {
|
||||||
|
if ((p->hIconFold)) {
|
||||||
|
DrawIcon (hdc, centerX, centerY - (h>>1),
|
||||||
|
h, h, p->hIconFold);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if ((p->hIconUnfold)) {
|
||||||
|
DrawIcon (hdc, centerX, centerY - (h>>1),
|
||||||
|
h, h, p->hIconUnfold);
|
||||||
}
|
}
|
||||||
} else if ((p->hIconUnfold)) {
|
|
||||||
DrawIcon (hdc, centerX, centerY - (h>>1), h, h, p->hIconUnfold);
|
|
||||||
}
|
|
||||||
centerX += h + TV_ICONGAP;
|
centerX += h + TV_ICONGAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,17 +202,6 @@ static void destroy (GLYPHTREENODE *root)
|
|||||||
|
|
||||||
/*** device font ops ***/
|
/*** device font ops ***/
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
return DEVFONTGLYPHTYPE_PRERDRBMP;
|
return DEVFONTGLYPHTYPE_PRERDRBMP;
|
||||||
@@ -391,7 +380,6 @@ static int get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont,
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_bitmap_font_ops = {
|
FONTOPS __mg_bitmap_font_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
+16
-19
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -226,7 +226,7 @@ static int iso8859_6_conv_from_uc32 (Uchar32 wc, unsigned char* mchar)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
/* must attetion the para s is arabic chv value.*/
|
||||||
static int is_arabic_char_vowel(Uint8 c)
|
static int is_arabic_char_vowel(Uint8 c)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -240,7 +240,6 @@ static int is_arabic_char_vowel(Uint8 c)
|
|||||||
*/
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ISO8859-6 charset vowel relative define and judge */
|
/* ISO8859-6 charset vowel relative define and judge */
|
||||||
#define ISARABIC_VOWEL(s) ((s >= FATHATAN) && (s <= SUKUN))
|
#define ISARABIC_VOWEL(s) ((s >= FATHATAN) && (s <= SUKUN))
|
||||||
@@ -462,18 +461,15 @@ static int iso8859_6_len_first_char (const unsigned char* mstr, int len)
|
|||||||
return 2;
|
return 2;
|
||||||
else if (ignore == 2)
|
else if (ignore == 2)
|
||||||
return 3;
|
return 3;
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ISARABIC_LIG_HALF(s) ((s == 0xa5) || (s == 0xa6))
|
#define ISARABIC_LIG_HALF(s) ((s == 0xa5) || (s == 0xa6))
|
||||||
|
|
||||||
static unsigned int iso8859_6_char_type (Achar32 chv)
|
static unsigned int iso8859_6_char_type (Achar32 chv)
|
||||||
{
|
{
|
||||||
chv = REAL_ACHAR(chv);
|
|
||||||
#if 1
|
|
||||||
return sb_char_type(chv);
|
|
||||||
#else
|
|
||||||
unsigned int ch_type = ACHAR_BASIC_UNKNOWN;
|
unsigned int ch_type = ACHAR_BASIC_UNKNOWN;
|
||||||
|
|
||||||
if (is_arabic_char_vowel (chv)) { /* is vowel */
|
if (is_arabic_char_vowel (chv)) { /* is vowel */
|
||||||
@@ -484,10 +480,10 @@ static unsigned int iso8859_6_char_type (Achar32 chv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ch_type;
|
return ch_type;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
||||||
|
#if 0
|
||||||
/*0x00~0x0f*/
|
/*0x00~0x0f*/
|
||||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||||
@@ -535,6 +531,7 @@ static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
|||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
||||||
|
#endif
|
||||||
|
|
||||||
/*0x80~0x8f*/
|
/*0x80~0x8f*/
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
|
BIDI_TYPE_ON, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
|
||||||
@@ -609,9 +606,10 @@ static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
|||||||
static BidiType iso8859_6_bidi_char_type (Achar32 chv)
|
static BidiType iso8859_6_bidi_char_type (Achar32 chv)
|
||||||
{
|
{
|
||||||
chv = REAL_ACHAR(chv);
|
chv = REAL_ACHAR(chv);
|
||||||
assert(chv < TABLESIZE(__mg_iso8859_6_bidi_char_type_map));
|
if (chv > 0x7F)
|
||||||
|
return (BidiType)__mg_iso8859_6_bidi_char_type_map[chv - 0x80];
|
||||||
return (BidiType)__mg_iso8859_6_bidi_char_type_map[chv];
|
else
|
||||||
|
return (BidiType)__mg_iso8859_1_bidi_char_type_map[chv];
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_table_index(Uint8 c)
|
static int get_table_index(Uint8 c)
|
||||||
@@ -798,7 +796,7 @@ static const unsigned char* iso8859_6_get_next_word (const unsigned char* mstr,
|
|||||||
static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
||||||
int cur_len, int shape_type)
|
int cur_len, int shape_type)
|
||||||
{
|
{
|
||||||
Achar32 chv = INV_ACHAR_VALUE;
|
Achar32 chv = -1;
|
||||||
int ignore;
|
int ignore;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
@@ -813,14 +811,15 @@ static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chv == INV_ACHAR_VALUE || chv == 0) {
|
if (chv == -1 || chv == 0) {
|
||||||
if (ISARABIC_VOWEL(*cur_mchar)){
|
if (ISARABIC_VOWEL(*cur_mchar)){
|
||||||
chv = fontset_68x_get_vowel_char(*cur_mchar);
|
chv = fontset_68x_get_vowel_char(*cur_mchar);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chv == 0 || chv == INV_ACHAR_VALUE) {
|
if (chv == 0 || chv == -1) {
|
||||||
index = get_table_index(*cur_mchar);
|
index = get_table_index(*cur_mchar);
|
||||||
if (index >=0 ) {
|
if (index >=0)
|
||||||
|
{
|
||||||
switch (shape_type) {
|
switch (shape_type) {
|
||||||
case ACHAR_ISOLATED:
|
case ACHAR_ISOLATED:
|
||||||
chv = shape_info[index].isolated;
|
chv = shape_info[index].isolated;
|
||||||
@@ -842,7 +841,7 @@ static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chv == 0)
|
if (chv == 0)
|
||||||
chv = INV_ACHAR_VALUE;
|
chv =-1;
|
||||||
|
|
||||||
return chv;
|
return chv;
|
||||||
}
|
}
|
||||||
@@ -863,7 +862,6 @@ static const BIDICHAR_MIRROR_MAP __mg_iso8859_68x_mirror_table [] =
|
|||||||
|
|
||||||
static BOOL iso8859_6_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
|
static BOOL iso8859_6_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
|
||||||
{
|
{
|
||||||
chv = REAL_ACHAR(chv);
|
|
||||||
return get_mirror_char (__mg_iso8859_68x_mirror_table,
|
return get_mirror_char (__mg_iso8859_68x_mirror_table,
|
||||||
TABLESIZE (__mg_iso8859_68x_mirror_table), chv, mirrored);
|
TABLESIZE (__mg_iso8859_68x_mirror_table), chv, mirrored);
|
||||||
}
|
}
|
||||||
@@ -873,7 +871,6 @@ static CHARSETOPS CharsetOps_iso8859_6 = {
|
|||||||
3,
|
3,
|
||||||
FONT_CHARSET_ISO8859_6,
|
FONT_CHARSET_ISO8859_6,
|
||||||
0,
|
0,
|
||||||
1,
|
|
||||||
iso8859_6_len_first_char,
|
iso8859_6_len_first_char,
|
||||||
iso8859_6_get_char_value,
|
iso8859_6_get_char_value,
|
||||||
iso8859_6_get_shaped_char_value,
|
iso8859_6_get_shaped_char_value,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -210,8 +210,6 @@ static unsigned int unicode_char_type (Achar32 chv)
|
|||||||
mchar_type = ACHAR_BASIC_LF;
|
mchar_type = ACHAR_BASIC_LF;
|
||||||
else if (break_type == UCHAR_BREAK_SPACE)
|
else if (break_type == UCHAR_BREAK_SPACE)
|
||||||
mchar_type = ACHAR_BASIC_SPACE;
|
mchar_type = ACHAR_BASIC_SPACE;
|
||||||
else if (basic_type == UCHAR_CATEGORY_NON_SPACING_MARK)
|
|
||||||
mchar_type = ACHAR_BASIC_VOWEL;
|
|
||||||
else if (chv != 0x00AD && ISZEROWIDTHTYPE (basic_type))
|
else if (chv != 0x00AD && ISZEROWIDTHTYPE (basic_type))
|
||||||
mchar_type = ACHAR_BASIC_ZEROWIDTH;
|
mchar_type = ACHAR_BASIC_ZEROWIDTH;
|
||||||
else if ((chv >= 0x1160 && chv < 0x1200)
|
else if ((chv >= 0x1160 && chv < 0x1200)
|
||||||
@@ -241,36 +239,10 @@ static const BidiType linear_enum_to_bidi_type[] = {
|
|||||||
#undef _UNIBIDI_ADD_TYPE
|
#undef _UNIBIDI_ADD_TYPE
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Since 5.0.13: this function only returns BidiType which
|
|
||||||
is recognizable by the legacy BIDI algorithm. */
|
|
||||||
static BidiType unicode_bidi_char_type(Achar32 ch)
|
static BidiType unicode_bidi_char_type(Achar32 ch)
|
||||||
{
|
{
|
||||||
ch = REAL_ACHAR(ch);
|
ch = REAL_ACHAR(ch);
|
||||||
BidiType bt = linear_enum_to_bidi_type[UNIBIDI_GET_BIDI_TYPE(ch)];
|
return linear_enum_to_bidi_type[UNIBIDI_GET_BIDI_TYPE(ch)];
|
||||||
|
|
||||||
switch (bt) {
|
|
||||||
case BIDI_TYPE_LTR:
|
|
||||||
case BIDI_TYPE_RTL:
|
|
||||||
case BIDI_TYPE_AL:
|
|
||||||
case BIDI_TYPE_EN:
|
|
||||||
case BIDI_TYPE_AN:
|
|
||||||
case BIDI_TYPE_ET:
|
|
||||||
case BIDI_TYPE_CS:
|
|
||||||
case BIDI_TYPE_NSM:
|
|
||||||
case BIDI_TYPE_BN:
|
|
||||||
case BIDI_TYPE_BS:
|
|
||||||
case BIDI_TYPE_SS:
|
|
||||||
case BIDI_TYPE_WS:
|
|
||||||
case BIDI_TYPE_ON:
|
|
||||||
case BIDI_TYPE_SOT:
|
|
||||||
case BIDI_TYPE_EOT:
|
|
||||||
return bt;
|
|
||||||
default:
|
|
||||||
_DBG_PRINTF("Not recognizable for char (0x%04x): %u\n", ch, bt);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return BIDI_TYPE_WS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BidiType GUIAPI UCharGetBidiType(Uchar32 uc)
|
BidiType GUIAPI UCharGetBidiType(Uchar32 uc)
|
||||||
@@ -656,7 +628,6 @@ CHARSETOPS __mg_CharsetOps_utf8 = {
|
|||||||
6,
|
6,
|
||||||
FONT_CHARSET_UTF8,
|
FONT_CHARSET_UTF8,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
utf8_len_first_char,
|
utf8_len_first_char,
|
||||||
utf8_get_char_value,
|
utf8_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -883,7 +854,6 @@ CHARSETOPS __mg_CharsetOps_utf16le = {
|
|||||||
4,
|
4,
|
||||||
FONT_CHARSET_UTF16LE,
|
FONT_CHARSET_UTF16LE,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
utf16le_len_first_char,
|
utf16le_len_first_char,
|
||||||
utf16le_get_char_value,
|
utf16le_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1110,7 +1080,6 @@ CHARSETOPS __mg_CharsetOps_utf16be = {
|
|||||||
4,
|
4,
|
||||||
FONT_CHARSET_UTF16BE,
|
FONT_CHARSET_UTF16BE,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
utf16be_len_first_char,
|
utf16be_len_first_char,
|
||||||
utf16be_get_char_value,
|
utf16be_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
+7
-30
@@ -15,7 +15,7 @@
|
|||||||
* and Graphics User Interface (GUI) support system for embedded systems
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
* and smart IoT devices.
|
* and smart IoT devices.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
|
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||||
* Copyright (C) 1998~2002, WEI Yongming
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@@ -49,8 +49,6 @@
|
|||||||
** Create date: 2000/06/13
|
** Create date: 2000/06/13
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef NDEBUG
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -235,7 +233,6 @@ static CHARSETOPS CharsetOps_ascii = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_US_ASCII,
|
FONT_CHARSET_US_ASCII,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -299,7 +296,6 @@ static CHARSETOPS CharsetOps_iso8859_1 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_1,
|
FONT_CHARSET_ISO8859_1,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -411,7 +407,6 @@ static CHARSETOPS CharsetOps_iso8859_2 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_2,
|
FONT_CHARSET_ISO8859_2,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -524,7 +519,6 @@ static CHARSETOPS CharsetOps_iso8859_3 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_3,
|
FONT_CHARSET_ISO8859_3,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -638,7 +632,6 @@ static CHARSETOPS CharsetOps_iso8859_4 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_4,
|
FONT_CHARSET_ISO8859_4,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -733,7 +726,6 @@ static CHARSETOPS CharsetOps_iso8859_5 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_5,
|
FONT_CHARSET_ISO8859_5,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -892,7 +884,6 @@ static CHARSETOPS CharsetOps_iso8859_7 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_7,
|
FONT_CHARSET_ISO8859_7,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -978,6 +969,7 @@ static const unsigned char* iso8859_8_get_next_word (const unsigned char* mstr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static BidiType __mg_iso8859_8_bidi_char_type_map[] = {
|
static BidiType __mg_iso8859_8_bidi_char_type_map[] = {
|
||||||
|
#if 0
|
||||||
/*0x00~0x0f*/
|
/*0x00~0x0f*/
|
||||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||||
@@ -1025,6 +1017,7 @@ static BidiType __mg_iso8859_8_bidi_char_type_map[] = {
|
|||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
|
||||||
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
|
||||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
||||||
|
#endif
|
||||||
|
|
||||||
/*0x80~0x8f*/
|
/*0x80~0x8f*/
|
||||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||||
@@ -1079,9 +1072,10 @@ static BidiType __mg_iso8859_8_bidi_char_type_map[] = {
|
|||||||
static BidiType iso8859_8_bidi_char_type (Achar32 chv)
|
static BidiType iso8859_8_bidi_char_type (Achar32 chv)
|
||||||
{
|
{
|
||||||
chv = REAL_ACHAR(chv);
|
chv = REAL_ACHAR(chv);
|
||||||
assert(chv < TABLESIZE(__mg_iso8859_8_bidi_char_type_map));
|
if (chv > 0x7F)
|
||||||
|
return (BidiType)__mg_iso8859_8_bidi_char_type_map[chv - 0x80];
|
||||||
return (BidiType)__mg_iso8859_8_bidi_char_type_map[chv];
|
else
|
||||||
|
return (BidiType)__mg_iso8859_1_bidi_char_type_map[chv];
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BIDICHAR_MIRROR_MAP __mg_iso8859_8_mirror_table [] =
|
static const BIDICHAR_MIRROR_MAP __mg_iso8859_8_mirror_table [] =
|
||||||
@@ -1166,7 +1160,6 @@ static CHARSETOPS CharsetOps_iso8859_8 = {
|
|||||||
2, // This is a trick for bidi reorder only implemented for MBC.
|
2, // This is a trick for bidi reorder only implemented for MBC.
|
||||||
FONT_CHARSET_ISO8859_8,
|
FONT_CHARSET_ISO8859_8,
|
||||||
0,
|
0,
|
||||||
1,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1268,7 +1261,6 @@ static CHARSETOPS CharsetOps_iso8859_9 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_9,
|
FONT_CHARSET_ISO8859_9,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1382,7 +1374,6 @@ static CHARSETOPS CharsetOps_iso8859_10 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_10,
|
FONT_CHARSET_ISO8859_10,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1495,7 +1486,6 @@ static CHARSETOPS CharsetOps_iso8859_11 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_11,
|
FONT_CHARSET_ISO8859_11,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1608,7 +1598,6 @@ static CHARSETOPS CharsetOps_iso8859_13 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_13,
|
FONT_CHARSET_ISO8859_13,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1721,7 +1710,6 @@ static CHARSETOPS CharsetOps_iso8859_14 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_14,
|
FONT_CHARSET_ISO8859_14,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1833,7 +1821,6 @@ static CHARSETOPS CharsetOps_iso8859_15 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_15,
|
FONT_CHARSET_ISO8859_15,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1984,7 +1971,6 @@ static CHARSETOPS CharsetOps_iso8859_16 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_ISO8859_16,
|
FONT_CHARSET_ISO8859_16,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -2182,7 +2168,6 @@ static CHARSETOPS CharsetOps_gb2312_0 = {
|
|||||||
2,
|
2,
|
||||||
FONT_CHARSET_GB2312_0,
|
FONT_CHARSET_GB2312_0,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
gb2312_0_len_first_char,
|
gb2312_0_len_first_char,
|
||||||
gb2312_0_get_char_value,
|
gb2312_0_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -2340,7 +2325,6 @@ static CHARSETOPS CharsetOps_gbk = {
|
|||||||
2,
|
2,
|
||||||
FONT_CHARSET_GBK,
|
FONT_CHARSET_GBK,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
gbk_len_first_char,
|
gbk_len_first_char,
|
||||||
gbk_get_char_value,
|
gbk_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -2609,7 +2593,6 @@ static CHARSETOPS CharsetOps_gb18030_0 = {
|
|||||||
4,
|
4,
|
||||||
FONT_CHARSET_GB18030_0,
|
FONT_CHARSET_GB18030_0,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
gb18030_0_len_first_char,
|
gb18030_0_len_first_char,
|
||||||
gb18030_0_get_char_value,
|
gb18030_0_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -2767,7 +2750,6 @@ static CHARSETOPS CharsetOps_big5 = {
|
|||||||
2,
|
2,
|
||||||
FONT_CHARSET_BIG5,
|
FONT_CHARSET_BIG5,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
big5_len_first_char,
|
big5_len_first_char,
|
||||||
big5_get_char_value,
|
big5_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -2914,7 +2896,6 @@ static CHARSETOPS CharsetOps_ksc5601_0 = {
|
|||||||
2,
|
2,
|
||||||
FONT_CHARSET_EUCKR,
|
FONT_CHARSET_EUCKR,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
ksc5601_0_len_first_char,
|
ksc5601_0_len_first_char,
|
||||||
ksc5601_0_get_char_value,
|
ksc5601_0_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -3039,7 +3020,6 @@ static CHARSETOPS CharsetOps_jisx0201_0 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_JISX0201_0,
|
FONT_CHARSET_JISX0201_0,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
jisx0201_0_len_first_char,
|
jisx0201_0_len_first_char,
|
||||||
jisx0201_0_get_char_value,
|
jisx0201_0_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -3183,7 +3163,6 @@ static CHARSETOPS CharsetOps_jisx0208_0 = {
|
|||||||
2,
|
2,
|
||||||
FONT_CHARSET_JISX0208_0,
|
FONT_CHARSET_JISX0208_0,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
jisx0208_0_len_first_char,
|
jisx0208_0_len_first_char,
|
||||||
jisx0208_0_get_char_value,
|
jisx0208_0_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -3269,7 +3248,6 @@ static CHARSETOPS CharsetOps_jisx0201_1 = {
|
|||||||
1,
|
1,
|
||||||
FONT_CHARSET_JISX0201_1,
|
FONT_CHARSET_JISX0201_1,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
sb_len_first_char,
|
sb_len_first_char,
|
||||||
sb_get_char_value,
|
sb_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -3441,7 +3419,6 @@ static CHARSETOPS CharsetOps_jisx0208_1 = {
|
|||||||
2,
|
2,
|
||||||
FONT_CHARSET_JISX0208_1,
|
FONT_CHARSET_JISX0208_1,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
jisx0208_1_len_first_char,
|
jisx0208_1_len_first_char,
|
||||||
jisx0208_1_get_char_value,
|
jisx0208_1_get_char_value,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
@@ -255,17 +255,6 @@ compute_kernval (TTFINSTANCEINFO* ttf_inst_info)
|
|||||||
return kernval;
|
return kernval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
if (logfont->style & FS_WEIGHT_BOOK)
|
if (logfont->style & FS_WEIGHT_BOOK)
|
||||||
@@ -803,7 +792,6 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
}
|
}
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_ttf_ops = {
|
FONTOPS __mg_ttf_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -197,17 +197,6 @@ print_bitmap_grey (const BYTE* buffer, int width, int rows, int pitch)
|
|||||||
printf("*******************************************\n");
|
printf("*******************************************\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
switch (logfont->style & FS_RENDER_MASK) {
|
switch (logfont->style & FS_RENDER_MASK) {
|
||||||
@@ -1276,7 +1265,6 @@ void font_TermFreetypeLibrary (void)
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_ttf_ops = {
|
FONTOPS __mg_ttf_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
+9
-15
@@ -703,20 +703,21 @@ void __mg_legacy_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
|
|||||||
print_hexstr(achars, len, TRUE);
|
print_hexstr(achars, len, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void bidi_map_reverse (void* context, int len, int pos)
|
static void bidi_map_reverse (void* context, int len, int pos)
|
||||||
{
|
{
|
||||||
ACHARMAPINFO* str = (ACHARMAPINFO*)context + pos;
|
GLYPHMAPINFO* str = (GLYPHMAPINFO*)context + pos;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len / 2; i++)
|
for (i = 0; i < len / 2; i++)
|
||||||
{
|
{
|
||||||
ACHARMAPINFO tmp = str[i];
|
GLYPHMAPINFO tmp = str[i];
|
||||||
str[i] = str[len - 1 - i];
|
str[i] = str[len - 1 - i];
|
||||||
str[len - 1 - i] = tmp;
|
str[len - 1 - i] = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
||||||
Achar32* achars, int len, int pel, ACHARMAPINFO* map)
|
Achar32* achars, int len, GLYPHMAPINFO* map, int pel)
|
||||||
{
|
{
|
||||||
BYTE max_level = 1;
|
BYTE max_level = 1;
|
||||||
TYPERUN *type_rl_list = NULL;
|
TYPERUN *type_rl_list = NULL;
|
||||||
@@ -724,7 +725,6 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
|||||||
int i;
|
int i;
|
||||||
int run_pos;
|
int run_pos;
|
||||||
int run_len;
|
int run_len;
|
||||||
REORDER_CONTEXT rc;
|
|
||||||
|
|
||||||
print_hexstr(achars, len, FALSE);
|
print_hexstr(achars, len, FALSE);
|
||||||
|
|
||||||
@@ -735,15 +735,14 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
|||||||
run_pos = node_p->pos;
|
run_pos = node_p->pos;
|
||||||
run_len = node_p->len;
|
run_len = node_p->len;
|
||||||
|
|
||||||
for (i=0; i<run_len; i++) {
|
for (i=0; i<run_len; i++)
|
||||||
|
{
|
||||||
(map+run_pos+i)->is_rtol = (node_p)->level & 1;
|
(map+run_pos+i)->is_rtol = (node_p)->level & 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.achars = NULL;
|
bidi_reorder_cb(map, len, &type_rl_list, max_level,
|
||||||
rc.extra = map;
|
bidi_map_reverse);
|
||||||
rc.cb = bidi_map_reverse;
|
|
||||||
bidi_reorder(&rc, len, &type_rl_list, max_level);
|
|
||||||
|
|
||||||
/* free typerun list.*/
|
/* free typerun list.*/
|
||||||
free_typerun_list(type_rl_list);
|
free_typerun_list(type_rl_list);
|
||||||
@@ -753,23 +752,18 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
|||||||
return achars;
|
return achars;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
|
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
|
||||||
Achar32* achars, int len, int* index_map, int pel)
|
Achar32* achars, int len, int* index_map, int pel)
|
||||||
{
|
{
|
||||||
BYTE max_level = 1;
|
BYTE max_level = 1;
|
||||||
TYPERUN *type_rl_list = NULL;
|
TYPERUN *type_rl_list = NULL;
|
||||||
REORDER_CONTEXT rc;
|
|
||||||
|
|
||||||
print_hexstr(achars, len, FALSE);
|
print_hexstr(achars, len, FALSE);
|
||||||
|
|
||||||
/* W1~W7, N1~N2, I1~I2, Get the Embedding Level. */
|
/* W1~W7, N1~N2, I1~I2, Get the Embedding Level. */
|
||||||
bidi_resolve_string (charset_ops, achars, len, pel, &type_rl_list, &max_level);
|
bidi_resolve_string (charset_ops, achars, len, pel, &type_rl_list, &max_level);
|
||||||
|
|
||||||
rc.achars = achars;
|
bidi_reorder_cb(index_map, len, &type_rl_list, max_level,
|
||||||
rc.extra = extra;
|
|
||||||
rc.cb = cb_reverse_extra;
|
|
||||||
bidi_reorder(index_map, len, &type_rl_list, max_level,
|
|
||||||
bidi_string_reverse);
|
bidi_string_reverse);
|
||||||
|
|
||||||
/* free typerun list.*/
|
/* free typerun list.*/
|
||||||
|
|||||||
@@ -66,17 +66,6 @@
|
|||||||
#define NUF_WIDTH 8
|
#define NUF_WIDTH 8
|
||||||
#define NUF_HEIGHT 1
|
#define NUF_HEIGHT 1
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
return DEVFONTGLYPHTYPE_MONOBMP;
|
return DEVFONTGLYPHTYPE_MONOBMP;
|
||||||
@@ -182,7 +171,6 @@ static void unload_font_data (DEVFONT* devfont, void* data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FONTOPS __mg_null_font_ops = {
|
FONTOPS __mg_null_font_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -287,17 +287,6 @@ static unsigned char def_smooth_bitmap [] =
|
|||||||
static QPF_GLYPH def_glyph = {&def_metrics, def_bitmap};
|
static QPF_GLYPH def_glyph = {&def_metrics, def_bitmap};
|
||||||
static QPF_GLYPH def_smooth_glyph = {&def_smooth_metrics, def_smooth_bitmap};
|
static QPF_GLYPH def_smooth_glyph = {&def_smooth_metrics, def_smooth_bitmap};
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
if (QPFONT_INFO_P (devfont)->fm->flags & FLAG_MODE_SMOOTH)
|
if (QPFONT_INFO_P (devfont)->fm->flags & FLAG_MODE_SMOOTH)
|
||||||
@@ -552,7 +541,6 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_qpf_ops = {
|
FONTOPS __mg_qpf_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -151,17 +151,6 @@ static void unload_font_data (DEVFONT* devfont, void* data)
|
|||||||
|
|
||||||
/*************** Raw bitmap font operations *********************************/
|
/*************** Raw bitmap font operations *********************************/
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
return DEVFONTGLYPHTYPE_MONOBMP;
|
return DEVFONTGLYPHTYPE_MONOBMP;
|
||||||
@@ -291,7 +280,6 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
FONTOPS __mg_rbf_ops = {
|
FONTOPS __mg_rbf_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_ave_width, // max_width same as ave_width
|
get_ave_width, // max_width same as ave_width
|
||||||
|
|||||||
@@ -377,17 +377,6 @@ static int get_max_width (LOGFONT* logfont, DEVFONT* devfont)
|
|||||||
return logfont->size;
|
return logfont->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
if (logfont->style & FS_WEIGHT_BOOK)
|
if (logfont->style & FS_WEIGHT_BOOK)
|
||||||
@@ -609,7 +598,6 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
|
|
||||||
/**************************** Global data ************************************/
|
/**************************** Global data ************************************/
|
||||||
static FONTOPS scripteasy_font_ops = {
|
static FONTOPS scripteasy_font_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
+1
-4
@@ -155,10 +155,7 @@ BOOL mg_InitSysFont (void)
|
|||||||
goto error_load;
|
goto error_load;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VW 20221003: use CreateLogFontEx instead of CreateLogFont to
|
if ((sys_fonts[i] = CreateLogFont (type, family, charset,
|
||||||
follow the new style convention of font name,
|
|
||||||
but the orientation is ignored for the system logfont. */
|
|
||||||
if ((sys_fonts[i] = CreateLogFontEx (type, family, charset,
|
|
||||||
style [0], style [1], style [2],
|
style [0], style [1], style [2],
|
||||||
style [3], style [4], style [5],
|
style [3], style [4], style [5],
|
||||||
height, 0)) == NULL) {
|
height, 0)) == NULL) {
|
||||||
|
|||||||
@@ -377,8 +377,8 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
|||||||
uc == 0x8E2 || uc == 0xD4E || uc == 0x110BD ||
|
uc == 0x8E2 || uc == 0xD4E || uc == 0x110BD ||
|
||||||
(uc >= 0x111C2 && uc <= 0x111C3)) {
|
(uc >= 0x111C2 && uc <= 0x111C3)) {
|
||||||
gbt = GB_Prepend;
|
gbt = GB_Prepend;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
case UCHAR_CATEGORY_CONTROL:
|
case UCHAR_CATEGORY_CONTROL:
|
||||||
case UCHAR_CATEGORY_LINE_SEPARATOR:
|
case UCHAR_CATEGORY_LINE_SEPARATOR:
|
||||||
@@ -393,8 +393,8 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
|||||||
if ((uc >= 0xFFF0 && uc <= 0xFFF8) ||
|
if ((uc >= 0xFFF0 && uc <= 0xFFF8) ||
|
||||||
(uc >= 0xE0000 && uc <= 0xE0FFF)) {
|
(uc >= 0xE0000 && uc <= 0xE0FFF)) {
|
||||||
gbt = GB_ControlCRLF;
|
gbt = GB_ControlCRLF;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
case UCHAR_CATEGORY_OTHER_LETTER:
|
case UCHAR_CATEGORY_OTHER_LETTER:
|
||||||
if (ctxt->makes_hangul_syllable)
|
if (ctxt->makes_hangul_syllable)
|
||||||
@@ -434,6 +434,7 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
|||||||
gbt = GB_RI_Odd;
|
gbt = GB_RI_Odd;
|
||||||
else
|
else
|
||||||
gbt = GB_RI_Odd;
|
gbt = GB_RI_Odd;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -148,17 +148,6 @@ static void unload_font_data (DEVFONT* devfont, void* data)
|
|||||||
free (((UPFINFO*) data));
|
free (((UPFINFO*) data));
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
Uint8* p_upf = (Uint8 *)UPFONT_INFO_P (devfont)->root_dir;
|
Uint8* p_upf = (Uint8 *)UPFONT_INFO_P (devfont)->root_dir;
|
||||||
@@ -536,7 +525,6 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FONTOPS __mg_upf_ops = {
|
FONTOPS __mg_upf_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -109,17 +109,6 @@ typedef struct _FONT_PROPT {
|
|||||||
int def_glyph;
|
int def_glyph;
|
||||||
} FONT_PROPT;
|
} FONT_PROPT;
|
||||||
|
|
||||||
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
|
|
||||||
enum devfont_feature feature)
|
|
||||||
{
|
|
||||||
switch (feature) {
|
|
||||||
case DEVFONT_FEATURE_MARK_BBOX:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
|
||||||
{
|
{
|
||||||
return DEVFONTGLYPHTYPE_MONOBMP;
|
return DEVFONTGLYPHTYPE_MONOBMP;
|
||||||
@@ -488,7 +477,6 @@ static void unload_font_data (DEVFONT* devfont, void* data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FONTOPS __mg_vbf_ops = {
|
FONTOPS __mg_vbf_ops = {
|
||||||
get_feature,
|
|
||||||
get_glyph_bmptype,
|
get_glyph_bmptype,
|
||||||
get_ave_width,
|
get_ave_width,
|
||||||
get_max_width,
|
get_max_width,
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
#include "cliprect.h"
|
#include "cliprect.h"
|
||||||
#include "gal.h"
|
#include "gal.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
#include "blockheap.h"
|
||||||
#include "accelkey.h"
|
#include "accelkey.h"
|
||||||
|
|
||||||
static BLOCKHEAP ACHeap;
|
static BLOCKHEAP ACHeap;
|
||||||
|
|||||||
+18
-59
@@ -59,22 +59,17 @@
|
|||||||
#include "cliprect.h"
|
#include "cliprect.h"
|
||||||
#include "gal.h"
|
#include "gal.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "dc.h"
|
|
||||||
|
|
||||||
BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
|
BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
|
||||||
{
|
{
|
||||||
PMAINWIN pWin;
|
PMAINWIN pWin;
|
||||||
|
|
||||||
pWin = (PMAINWIN)hWnd;
|
pWin = (PMAINWIN)hWnd;
|
||||||
|
|
||||||
if (!pWin->pCaretInfo) {
|
if (!pWin->pCaretInfo) {
|
||||||
HDC hdc;
|
|
||||||
|
|
||||||
if (!(pWin->pCaretInfo = malloc (sizeof (CARETINFO))))
|
if (!(pWin->pCaretInfo = malloc (sizeof (CARETINFO))))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* Since 5.0.11: use client DC of the window instead of screen DC */
|
|
||||||
hdc = GetClientDC(hWnd);
|
|
||||||
|
|
||||||
pWin->pCaretInfo->pBitmap = pBitmap;
|
pWin->pCaretInfo->pBitmap = pBitmap;
|
||||||
if (pBitmap) {
|
if (pBitmap) {
|
||||||
nWidth = pBitmap->bmWidth;
|
nWidth = pBitmap->bmWidth;
|
||||||
@@ -83,22 +78,18 @@ BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
|
|||||||
pWin->pCaretInfo->nWidth = nWidth;
|
pWin->pCaretInfo->nWidth = nWidth;
|
||||||
pWin->pCaretInfo->nHeight = nHeight;
|
pWin->pCaretInfo->nHeight = nHeight;
|
||||||
pWin->pCaretInfo->caret_bmp.bmType = BMP_TYPE_NORMAL;
|
pWin->pCaretInfo->caret_bmp.bmType = BMP_TYPE_NORMAL;
|
||||||
pWin->pCaretInfo->caret_bmp.bmBitsPerPixel =
|
pWin->pCaretInfo->caret_bmp.bmBitsPerPixel = BITSPERPHYPIXEL;
|
||||||
GetGDCapability(hdc, GDCAP_BITSPP);
|
pWin->pCaretInfo->caret_bmp.bmBytesPerPixel = BYTESPERPHYPIXEL;
|
||||||
pWin->pCaretInfo->caret_bmp.bmBytesPerPixel =
|
|
||||||
GetGDCapability(hdc, GDCAP_BPP);
|
|
||||||
pWin->pCaretInfo->caret_bmp.bmWidth = nWidth;
|
pWin->pCaretInfo->caret_bmp.bmWidth = nWidth;
|
||||||
pWin->pCaretInfo->caret_bmp.bmHeight = nHeight;
|
pWin->pCaretInfo->caret_bmp.bmHeight = nHeight;
|
||||||
pWin->pCaretInfo->caret_bmp.bmAlphaMask = NULL;
|
pWin->pCaretInfo->caret_bmp.bmAlphaMask = NULL;
|
||||||
pWin->pCaretInfo->caret_bmp.bmAlphaPitch = 0;
|
pWin->pCaretInfo->caret_bmp.bmAlphaPitch = 0;
|
||||||
|
|
||||||
pWin->pCaretInfo->nBytesNr = GAL_GetBoxSize (dc_HDC2PDC(hdc)->surface,
|
pWin->pCaretInfo->nBytesNr = GAL_GetBoxSize (__gal_screen,
|
||||||
nWidth, nHeight, &pWin->pCaretInfo->caret_bmp.bmPitch);
|
nWidth, nHeight, &pWin->pCaretInfo->caret_bmp.bmPitch);
|
||||||
pWin->pCaretInfo->pNormal = malloc (pWin->pCaretInfo->nBytesNr);
|
pWin->pCaretInfo->pNormal = malloc (pWin->pCaretInfo->nBytesNr);
|
||||||
pWin->pCaretInfo->pXored = malloc (pWin->pCaretInfo->nBytesNr);
|
pWin->pCaretInfo->pXored = malloc (pWin->pCaretInfo->nBytesNr);
|
||||||
|
|
||||||
ReleaseDC(hdc);
|
|
||||||
|
|
||||||
if (pWin->pCaretInfo->pNormal == NULL ||
|
if (pWin->pCaretInfo->pNormal == NULL ||
|
||||||
pWin->pCaretInfo->pXored == NULL) {
|
pWin->pCaretInfo->pXored == NULL) {
|
||||||
free (pWin->pCaretInfo);
|
free (pWin->pCaretInfo);
|
||||||
@@ -228,8 +219,8 @@ void GetCaretBitmaps (PCARETINFO pCaretInfo)
|
|||||||
int i;
|
int i;
|
||||||
int sx, sy;
|
int sx, sy;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
Uint32 amask;
|
|
||||||
|
|
||||||
|
// convert to screen coordinates
|
||||||
sx = pCaretInfo->x;
|
sx = pCaretInfo->x;
|
||||||
sy = pCaretInfo->y;
|
sy = pCaretInfo->y;
|
||||||
|
|
||||||
@@ -240,68 +231,36 @@ void GetCaretBitmaps (PCARETINFO pCaretInfo)
|
|||||||
pCaretInfo->caret_bmp.bmWidth,
|
pCaretInfo->caret_bmp.bmWidth,
|
||||||
pCaretInfo->caret_bmp.bmHeight,
|
pCaretInfo->caret_bmp.bmHeight,
|
||||||
&pCaretInfo->caret_bmp);
|
&pCaretInfo->caret_bmp);
|
||||||
amask = GetGDCapability(hdc, GDCAP_AMASK);
|
|
||||||
ReleaseDC (hdc);
|
ReleaseDC (hdc);
|
||||||
|
|
||||||
// generate XOR bitmap.
|
// generate XOR bitmap.
|
||||||
if (amask == 0) {
|
if (pCaretInfo->pBitmap) {
|
||||||
BYTE* normal;
|
BYTE* normal;
|
||||||
BYTE* bitmap;
|
BYTE* bitmap;
|
||||||
BYTE* xored;
|
BYTE* xored;
|
||||||
|
|
||||||
normal = pCaretInfo->pNormal;
|
normal = pCaretInfo->pNormal;
|
||||||
|
bitmap = pCaretInfo->pBitmap->bmBits;
|
||||||
xored = pCaretInfo->pXored;
|
xored = pCaretInfo->pXored;
|
||||||
|
|
||||||
if (pCaretInfo->pBitmap) {
|
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
||||||
bitmap = pCaretInfo->pBitmap->bmBits;
|
xored[i] = normal[i] ^ bitmap[i];
|
||||||
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
|
||||||
xored[i] = normal[i] ^ bitmap[i];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
|
||||||
xored[i] = normal[i] ^ 0xFF;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Since 5.0.11: restore the alpha component if having alpha component.
|
|
||||||
int x, y;
|
|
||||||
BYTE* normal;
|
BYTE* normal;
|
||||||
BYTE* xored;
|
BYTE* xored;
|
||||||
BYTE* bitmap = NULL;
|
BYTE xor_byte;
|
||||||
gal_pixel pix_normal, pix_bitmap, pix_xored, bits_alpha;
|
|
||||||
|
|
||||||
for (y = 0; y < pCaretInfo->caret_bmp.bmHeight; y++) {
|
if (BITSPERPHYPIXEL < 8)
|
||||||
normal = pCaretInfo->pNormal + pCaretInfo->caret_bmp.bmPitch * y;
|
xor_byte = 0x0F;
|
||||||
xored = pCaretInfo->pXored + pCaretInfo->caret_bmp.bmPitch * y;
|
else
|
||||||
if (pCaretInfo->pBitmap)
|
xor_byte = 0xFF;
|
||||||
bitmap = pCaretInfo->pBitmap->bmBits +
|
|
||||||
pCaretInfo->caret_bmp.bmPitch * y;
|
|
||||||
|
|
||||||
for (x = 0; x < pCaretInfo->caret_bmp.bmWidth; x++) {
|
normal = pCaretInfo->pNormal;
|
||||||
|
xored = pCaretInfo->pXored;
|
||||||
|
|
||||||
pix_normal = _mem_get_pixel(normal,
|
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
||||||
pCaretInfo->caret_bmp.bmBytesPerPixel);
|
xored[i] = normal[i] ^ xor_byte;
|
||||||
if (pCaretInfo->pBitmap) {
|
|
||||||
pix_bitmap = _mem_get_pixel(bitmap,
|
|
||||||
pCaretInfo->caret_bmp.bmBytesPerPixel);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
pix_bitmap = 0xFFFFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
bits_alpha = pix_normal & amask;
|
|
||||||
pix_xored = pix_normal ^ pix_bitmap;
|
|
||||||
pix_xored &= ~amask;
|
|
||||||
pix_xored |= bits_alpha;
|
|
||||||
_mem_set_pixel(xored,
|
|
||||||
pCaretInfo->caret_bmp.bmBytesPerPixel, pix_xored);
|
|
||||||
|
|
||||||
normal += pCaretInfo->caret_bmp.bmBytesPerPixel;
|
|
||||||
xored += pCaretInfo->caret_bmp.bmBytesPerPixel;
|
|
||||||
if (pCaretInfo->pBitmap)
|
|
||||||
bitmap += pCaretInfo->caret_bmp.bmBytesPerPixel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user