mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 09:14:09 +08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d97e922e12 | ||
|
|
6ffdd98903 | ||
|
|
044c82e2f3 |
@@ -29,4 +29,3 @@ Makefile.in
|
||||
/src/font/utils/ucd/
|
||||
/src/sysres/font_list
|
||||
/src/sysres/license/dat_files/
|
||||
/configure~
|
||||
|
||||
+78
-174
File diff suppressed because it is too large
Load Diff
+78
-174
File diff suppressed because it is too large
Load Diff
+78
-174
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,14 @@
|
||||
# MiniGUI
|
||||
|
||||
A modern and proven cross-platform window system for embedded systems or smart IoT devices.
|
||||
A mature and proven cross-platform windowing system for embedded system and smart IoT devices.
|
||||
|
||||
|
||||
_TABLE OF CONTENTS_
|
||||
## TABLE OF CONTENTS
|
||||
|
||||
- [TABLE OF CONTENTS](#table-of-contents)
|
||||
- [INTRODUCTION](#introduction)
|
||||
+ [What's MiniGUI](#whats-minigui)
|
||||
+ [HVML App Framework on MiniGUI](#hvml-app-framework-on-minigui)
|
||||
+ [MiniGUI Components](#minigui-components)
|
||||
+ [Open Source Apps Based-on MiniGUI](#open-source-apps-based-on-minigui)
|
||||
+ [MiniGUI and HybridOS](#minigui-and-hybridos)
|
||||
+ [Source Code Repositories](#source-code-repositories)
|
||||
- [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x)
|
||||
@@ -23,9 +23,6 @@ _TABLE OF CONTENTS_
|
||||
+ [Building Whole MiniGUI](#building-whole-minigui)
|
||||
+ [Building MiniGUI Core](#building-minigui-core)
|
||||
+ [Unit Tests](#unit-tests)
|
||||
- [Othere Resources](#othere-resources)
|
||||
+ [MiniGUI Components](#minigui-components)
|
||||
+ [Open Source Apps Based-on MiniGUI](#open-source-apps-based-on-minigui)
|
||||
- [HISTORY](#history)
|
||||
- [AUTHORS AND COPYING](#authors-and-copying)
|
||||
+ [Special Statement](#special-statement)
|
||||
@@ -37,45 +34,86 @@ _TABLE OF CONTENTS_
|
||||
|
||||
### What's MiniGUI
|
||||
|
||||
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform windowing and GUI support system,
|
||||
which is especially fit for embedded systems or smart IoT devices based-on Linux/uClinux, eCos,
|
||||
and other traditional RTOSes, such as RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II, OSE, and others.
|
||||
MiniGUI is a mature cross-platform windowing system and a GUI (Graphics
|
||||
User Interface) support system for embedded systems and smart IoT devices.
|
||||
This is the version 5.0.x of MiniGUI maintained by WEI Yongming.
|
||||
|
||||
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 use.
|
||||
In December 1998, the initiator of FMSoft, [Vincent Wei], began to develop MiniGUI under the GNU General Public License (GPL).
|
||||
In September 2002, the core developers of MiniGUI founded [FMSoft] and started the commercial marketing with the free software.
|
||||
By now, FMSoft still continues to release MiniGUI as a free software project.
|
||||
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform
|
||||
windowing and GUI support system, which is especially fit for
|
||||
embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other
|
||||
traditional RTOSes, such as RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX,
|
||||
Nucleus, pSOS, uC/OS-II, OSE, and others.
|
||||
|
||||
For the live demos, source tarballs, and cases of MiniGUI, you can refer to the following website:
|
||||
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 Components
|
||||
|
||||
Besides MiniGUI Core, FMSoft also provides some components
|
||||
for the developers to develop app much easier:
|
||||
|
||||
* mGUtils: A MiniGUI component which contains miscellaneous utilities
|
||||
like `ColorSelectionDialogBox`, `FileOpenDialogBox`, and so on.
|
||||
* mGPlus: A MiniGUI component which provides support for advanced graphics
|
||||
functions like path, gradient, anti-aliased stretch, and color combination.
|
||||
* mGEff: mGEff provides an animation framework for MiniGUI app.
|
||||
It also provides some popular UI/UE special effects.
|
||||
* mGNCS: This component provides a new control set for MiniGUI app.
|
||||
* mGNCS4Touch: This component provides some new controls, which are
|
||||
compliant to the new control API spec of mGNCS, for devices with
|
||||
touch screens.
|
||||
|
||||
There are also some legacy MiniGUI components. But we will not maintain these
|
||||
components since MiniGUI v3.2.0:
|
||||
|
||||
* mGi: An input method component for MiniGUI. This component provides
|
||||
some typical input methods (such as soft keyboard, hand-writing, and predict
|
||||
text input for mobile phone) for MiniGUI apps.
|
||||
* mGp: A printing component for MiniGUI. By using mGp, you can print
|
||||
out the graphics created by MiniGUI app to general-purpose printers.
|
||||
* mG3d: A simple three-dimension component for MiniGUI. This component
|
||||
provides a simple 3D API for app. You can use mG3d to create simple
|
||||
3D UI.
|
||||
|
||||
MiniGUI is a free software project. In December 1998, the initiator of
|
||||
FMSoft, Wei Yongming, began to develop MiniGUI under the GNU General Public
|
||||
License (GPL). In September 2002, the core developers of
|
||||
MiniGUI founded FMSoft and started the commercial marketing with
|
||||
the free software. By now, FMSoft still continues to release MiniGUI
|
||||
as a free software project.
|
||||
|
||||
You can download the source code tarball of MiniGUI and the dependent libraries
|
||||
from the download zone of the site:
|
||||
|
||||
<http://www.minigui.com>
|
||||
|
||||
### HVML App Framework on MiniGUI
|
||||
### Open Source Apps Based-on MiniGUI
|
||||
|
||||
MiniGUI and its components provide a lot of controls/widgets to help your develop GUI apps in C/C++ programming language.
|
||||
However, alternatively, you can use the following software to develop your apps in an easy-to-use programming language [HVML].
|
||||
FMSoft also releases some open source apps for MiniGUI on the site above,
|
||||
for examples:
|
||||
|
||||
* [HVML] is a descriptive programming language proposed and designed by [Vincent Wei].
|
||||
* [PurC] is the prime interpreter of HVML written in C lauguage.
|
||||
* [xGUI Pro] is a full-featured HVML renderer based on the tailored WebKit engine.
|
||||
|
||||
In short, the above software suite provides an Electron-like solution that can help people develop cross-platform applications using web front-end technology.
|
||||
The difference is that the solution replaces JavaScript with HVML and Node.JS with PurC.
|
||||
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.
|
||||
* `mDolphin`, licensed under Apache 2.0, is a full-featured
|
||||
WEB/WAP browser, which is developed based on the open source browser
|
||||
core WebKit and uses MiniGUI as its underlying graphics support system.
|
||||
* `mGallery`, licensed under Apache 2.0, intends to
|
||||
provide a total solution for PMP (Portable Multimedia Player),
|
||||
which uses MiniGUI as the graphics platform.
|
||||
* `mSpider`, licensed under GPL 3.0, intends to provide a
|
||||
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
|
||||
* `mEagle`, licensed under GPL 3.0, is an embedded GIS development platform
|
||||
which addresses the needs of map browse, query, analysis, etc
|
||||
|
||||
### MiniGUI and HybridOS
|
||||
|
||||
[HybridOS] is another large open source project initiated by FMSoft.
|
||||
It is an open source operating system designed for embedded/AIoT devices and cloud computing environment.
|
||||
[HybridOS](https://github.com/FMSoftCN/hybridos) is another large open source project
|
||||
initiated by FMSoft. It is a totally new open source operating system designed for
|
||||
embedded and smart IoT devices and cloud computing environment.
|
||||
|
||||
HybridOS provides the complete software stack and the app framework based on HVML for embedded systems.
|
||||
You can easily develop your products which has rich functions and excellent expressiveness by using HybridOS.
|
||||
|
||||
In practice, MiniGUI and the software which are used to integrated with GPU 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 project are now maintaining the whole graphics stack.
|
||||
@@ -83,7 +121,7 @@ The following chart shows the graphics stack of HybridOS:
|
||||
|
||||
```
|
||||
-----------------------------------------------
|
||||
| MiniGUI/HVML Apps |
|
||||
| MiniGUI/HybridOS Apps |
|
||||
|-----------------------------------------------|
|
||||
| | (Graphics Stack) |
|
||||
| | ---------------------|
|
||||
@@ -99,7 +137,8 @@ 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.
|
||||
- `hiDRMDrivers` contains the drivers (user land drivers, not kernel drivers) for
|
||||
@@ -128,18 +167,17 @@ them on:
|
||||
|
||||
<https://github.com/VincentWei>
|
||||
|
||||
and
|
||||
|
||||
<https://github.com/FMSoftCN>
|
||||
|
||||
We now maintain all documents about MiniGUI on the following public repo:
|
||||
|
||||
<https://github.com/VincentWei/minigui-docs>
|
||||
|
||||
You can download the source code tarballs of MiniGUI Core, MiniGUI
|
||||
components, and the dependent libraries from the download zone of the site:
|
||||
|
||||
<http://www.minigui.com/download>
|
||||
|
||||
## NEW FEATURES IN VERSION 5.0.x
|
||||
|
||||
In version 5.0.0, we introduced some exciting new features, and refactored
|
||||
In version 5.0.0, we introduced some new and exciting features, and refactored
|
||||
a lot basic modules of MiniGUI Core.
|
||||
|
||||
### Compositing Schema
|
||||
@@ -354,16 +392,15 @@ and MiniGUI components, please fetch one of the following repositories
|
||||
from GitHub and follow the instructions to build MiniGUI Core,
|
||||
MiniGUI components, the samples, and the demonstration programs:
|
||||
|
||||
[Build MiniGUI 5.0](https://github.com/VincentWei/build-minigui-5.0)
|
||||
<https://github.com/VincentWei/build-minigui-5.0>
|
||||
|
||||
or
|
||||
|
||||
[Build MiniGUI 4.0](https://github.com/VincentWei/build-minigui-4.0)
|
||||
<https://github.com/VincentWei/build-minigui-4.0>
|
||||
|
||||
or
|
||||
|
||||
[Build MiniGUI 3.2](https://github.com/VincentWei/build-minigui-3.2)
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-3.2>
|
||||
|
||||
### Building MiniGUI Core
|
||||
|
||||
@@ -408,52 +445,6 @@ following repository:
|
||||
If you are interested in hacking the MiniGUI code, please visit this repository.
|
||||
|
||||
|
||||
## Othere Resources
|
||||
|
||||
### MiniGUI Components
|
||||
|
||||
Besides MiniGUI Core, FMSoft also provides some components
|
||||
for the developers to develop app much easier:
|
||||
|
||||
* mGUtils: A MiniGUI component which contains miscellaneous utilities
|
||||
like `ColorSelectionDialogBox`, `FileOpenDialogBox`, and so on.
|
||||
* mGPlus: A MiniGUI component which provides support for advanced graphics
|
||||
functions like path, gradient, anti-aliased stretch, and color combination.
|
||||
* mGEff: mGEff provides an animation framework for MiniGUI app.
|
||||
It also provides some popular UI/UE special effects.
|
||||
* mGNCS: This component provides a new control set for MiniGUI app.
|
||||
* mGNCS4Touch: This component provides some new controls, which are
|
||||
compliant to the new control API spec of mGNCS, for devices with
|
||||
touch screens.
|
||||
|
||||
There are also some legacy MiniGUI components. But we will not maintain these
|
||||
components since MiniGUI v3.2.0:
|
||||
|
||||
* mGi: An input method component for MiniGUI. This component provides
|
||||
some typical input methods (such as soft keyboard, hand-writing, and predict
|
||||
text input for mobile phone) for MiniGUI apps.
|
||||
* mGp: A printing component for MiniGUI. By using mGp, you can print
|
||||
out the graphics created by MiniGUI app to general-purpose printers.
|
||||
* mG3d: A simple three-dimension component for MiniGUI. This component
|
||||
provides a simple 3D API for app. You can use mG3d to create simple
|
||||
3D UI.
|
||||
|
||||
### Open Source Apps Based-on MiniGUI
|
||||
|
||||
FMSoft also releases some open source apps for MiniGUI on the site above,
|
||||
for examples:
|
||||
|
||||
* `mDolphin`, licensed under Apache 2.0, is a full-featured
|
||||
WEB/WAP browser, which is developed based on the open source browser
|
||||
core WebKit and uses MiniGUI as its underlying graphics support system.
|
||||
* `mGallery`, licensed under Apache 2.0, intends to
|
||||
provide a total solution for PMP (Portable Multimedia Player),
|
||||
which uses MiniGUI as the graphics platform.
|
||||
* `mSpider`, licensed under GPL 3.0, intends to provide a
|
||||
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
|
||||
* `mEagle`, licensed under GPL 3.0, is an embedded GIS development platform
|
||||
which addresses the needs of map browse, query, analysis, etc
|
||||
|
||||
## HISTORY
|
||||
|
||||
21 years have pasted since MiniGUI was initially created at
|
||||
@@ -558,17 +549,15 @@ A brief history description of the development progress is listed as follow:
|
||||
1. Apr., 2019: FMSoft released MiniGUI version 3.2.2.
|
||||
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
|
||||
1. Mar., 2020: FMSoft released MiniGUI version 5.0.0.
|
||||
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.
|
||||
|
||||
## AUTHORS AND COPYING
|
||||
|
||||
The original author of MiniGUI is Vincent Wei, and now MiniGUI is maintained by FMSoft.
|
||||
For more information, please refer to <http://www.fmsoft.cn>.
|
||||
The original author of MiniGUI is WEI Yongming, and now MiniGUI is
|
||||
maintained by FMSoft. For more information, please refer to
|
||||
<http://www.fmsoft.cn>.
|
||||
|
||||
Copyright (C) 2002 ~ 2022, Beijing FMSoft Technologies Co., Ltd.
|
||||
Copyright (C) 1998 ~ 2002, Vincent Wei
|
||||
Copyright (C) 2002 ~ 2020, Beijing FMSoft Technologies Co., Ltd.
|
||||
Copyright (C) 1998 ~ 2002, WEI Yongming
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -640,20 +629,3 @@ Q: Can I get the tech support from MiniGUI team?
|
||||
A: Yes, FMSoft can provide you with guaranteed commercial technical
|
||||
support services. Please send messages to <sales@minigui.com>.
|
||||
|
||||
|
||||
[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://hvml.fmsoft.cn
|
||||
[HVML Official Site]: https://hvml.fmsoft.cn
|
||||
[Vincent Wei]: https://github.com/VincentWei
|
||||
|
||||
[MiniGUI]: https://github.com/VincentWei/MiniGUI
|
||||
[HybridOS]: https://github.com/FMSoftCN/HybridOS
|
||||
|
||||
[HVML]: https://github.com/HVML
|
||||
[PurC]: https://github.com/HVML/PurC
|
||||
[xGUI Pro]: https://github.com/HVML/xGUI-Pro
|
||||
[WebKit]: https://webkit.org
|
||||
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
# Release Notes
|
||||
|
||||
- [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)
|
||||
+ [What's new in version 5.0.6](#whats-new-in-version-506)
|
||||
- [Version 5.0.5](#version-505)
|
||||
+ [What's new in version 5.0.5](#whats-new-in-version-505)
|
||||
- [Version 5.0.4](#version-504)
|
||||
@@ -28,125 +18,6 @@
|
||||
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
||||
+ [Deprecated APIs](#deprecated-apis)
|
||||
|
||||
## 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
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.6,
|
||||
which is the bug fixing release of MiniGUI 5.0.x.
|
||||
|
||||
### What's new in version 5.0.6
|
||||
|
||||
In this version, we fixed some bugs and made some optimizations and enhancements:
|
||||
|
||||
* BUGFIXING:
|
||||
- Fix bugs of switching layers under MiniGUI-Processes.
|
||||
- Fix bugs of `FBCon` and `PC_XVFB` engines: the dirty rectangles are
|
||||
not set empty after calling `SyncUpdate`.
|
||||
- Fix memory leaks when using block heap.
|
||||
- Fix a bug in ServerGetWinZNodeRegion.
|
||||
* ENHANCEMENTS:
|
||||
- Enhance `GetGlyphInfo` to return the FreeType face, font file path, and glyph
|
||||
index.
|
||||
- NEW API `StretchBltEx` to support different scaling filters and rotation.
|
||||
- Use Pixman to support color blending methods for `BitBlt` and `StretchBlt`.
|
||||
- Enhance fallback compositor to support animation when switching among layers.
|
||||
- New API `SetMainWindowGestureFlags` and `MSG_GESTURETEST` message for
|
||||
gesture test and setting the gesture flags of a specific main window.
|
||||
- Tune implementation of Tooltip window.
|
||||
* OPTIMIZATIONS:
|
||||
- Optimize the fallback compositor for lucent windows.
|
||||
- Use Pixman to optimize `FillBox`, `BitBlt`, and `StretchBlt`.
|
||||
- Optimize the management of BLOCKHEAP.
|
||||
- Optimize the `__mg_lookfor_unused_slot`.
|
||||
|
||||
Note that the binary backward-compatibility was broken, two operations added to
|
||||
`CompositorOps`. You should rebuild all MiniGUI applications.
|
||||
|
||||
Also note that the compositing schema is now enabled by default.
|
||||
|
||||
## Version 5.0.5
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.5,
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
Version 5.0.11 (2022/12/31)
|
||||
Version 5.0.5 (2021/01/31)
|
||||
|
||||
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:
|
||||
|
||||
- GVFB: `gvfb-1.2.5.tar.gz`
|
||||
- The resource package: `minigui-res-5.0.6.tar.gz`
|
||||
- The resource package: `minigui-res-5.0.0.tar.gz`
|
||||
- mGUtils component: `libmgutils-1.5.0.tar.gz`
|
||||
- mGPlus component: `libmgplus-1.5.0.tar.gz`
|
||||
- mGEff component: `libmgeff-1.5.0.tar.gz`
|
||||
|
||||
+162
-165
File diff suppressed because it is too large
Load Diff
+1
-7
@@ -105,12 +105,6 @@ seat=seat0
|
||||
[fbcon]
|
||||
defaultmode=1024x768-16bpp
|
||||
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
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGGAL_PCXVFB
|
||||
@@ -127,7 +121,7 @@ defaultmode=800x600-16bpp
|
||||
[shadow]
|
||||
real_engine=pc_xvfb
|
||||
defaultmode=800x600-16bpp
|
||||
rotate_screen=ccw
|
||||
rotate_screen=normal
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGGAL_MLSHADOW
|
||||
|
||||
@@ -311,7 +311,6 @@ MGUI_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
||||
defined(__amd64) || \
|
||||
(defined(__alpha__) || defined(__alpha)) || \
|
||||
defined(__arm__) || defined(__aarch64__) || \
|
||||
defined(__loongarch__) || \
|
||||
defined(__riscv) || \
|
||||
(defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \
|
||||
(defined(__mips__) && defined(__MIPSEL__)) || \
|
||||
|
||||
@@ -237,6 +237,7 @@ MG_EXPORT void GUIAPI NotifyParentEx (HWND hwnd, LINT id, int code,
|
||||
NotifyParentEx(hwnd, id, code, 0)
|
||||
|
||||
/**
|
||||
* \var typedef int (*STRCMP) (const char* s1, const char* s2, size_t n)
|
||||
* \brief Type of general strncmp function.
|
||||
*
|
||||
* The function compares the two strings \a s1 and \a s2. It returns
|
||||
|
||||
@@ -698,6 +698,7 @@ extern "C" {
|
||||
#define EM_SETREADONLY 0xF0CF
|
||||
|
||||
/**
|
||||
* \var typedef int (*ED_DRAWSEL_FUNC) (HWND hWnd, HDC hdc, int startx, int starty, const char* content, int len, int selout)
|
||||
* \brief Type of the edit control callback function on drawing selected strings.
|
||||
*
|
||||
* \param hWnd Handle of the edit control.
|
||||
|
||||
+25
-24
@@ -131,31 +131,7 @@
|
||||
#define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084
|
||||
#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
|
||||
#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_OUT 1
|
||||
#define TABLET_TOOL_PROXIMITY_STATE_IN 2
|
||||
@@ -173,6 +149,31 @@
|
||||
|
||||
#define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
|
||||
#define TABLET_PAD_STRIP_SOURCE_FINGER 1
|
||||
|
||||
#define TABLET_TOOL_CHANGED_X (1 << 0)
|
||||
#define TABLET_TOOL_CHANGED_Y (1 << 1)
|
||||
#define TABLET_TOOL_CHANGED_PRESSURE (1 << 2)
|
||||
#define TABLET_TOOL_CHANGED_DISTANCE (1 << 3)
|
||||
#define TABLET_TOOL_CHANGED_TILT_X (1 << 4)
|
||||
#define TABLET_TOOL_CHANGED_TILT_Y (1 << 5)
|
||||
#define TABLET_TOOL_CHANGED_ROTATION (1 << 6)
|
||||
#define TABLET_TOOL_CHANGED_SLIDER (1 << 7)
|
||||
#define TABLET_TOOL_CHANGED_SIZE_MAJOR (1 << 8)
|
||||
#define TABLET_TOOL_CHANGED_SIZE_MINOR (1 << 9)
|
||||
#define TABLET_TOOL_CHANGED_WHEEL (1 << 10)
|
||||
|
||||
#define TABLET_TOOL_X 0
|
||||
#define TABLET_TOOL_Y 1
|
||||
#define TABLET_TOOL_PRESSURE 2
|
||||
#define TABLET_TOOL_DISTANCE 3
|
||||
#define TABLET_TOOL_TILT_X 4
|
||||
#define TABLET_TOOL_TILT_Y 5
|
||||
#define TABLET_TOOL_ROTATION 6
|
||||
#define TABLET_TOOL_SLIDER 7
|
||||
#define TABLET_TOOL_SIZE_MAJOR 8
|
||||
#define TABLET_TOOL_SIZE_MINOR 9
|
||||
#define TABLET_TOOL_WHEEL 10
|
||||
|
||||
#endif
|
||||
|
||||
#define IAL_EVENT_TABLET_TOOL_AXIS 0x0090
|
||||
|
||||
+86
-197
@@ -586,23 +586,27 @@ enum {
|
||||
*
|
||||
* \sa InitBlockDataHeap, DestroyBlockDataHeap
|
||||
*/
|
||||
typedef struct _BLOCKHEAP {
|
||||
#ifdef _MGHAVE_VIRTUAL_WINDOW
|
||||
typedef struct _BLOCKHEAP
|
||||
{
|
||||
#ifdef _MGRM_THREADS
|
||||
pthread_mutex_t lock;
|
||||
#endif
|
||||
/** Size of one block element in bytes. */
|
||||
size_t sz_block;
|
||||
/** Size of the heap in blocks. */
|
||||
size_t sz_heap;
|
||||
/** The number of blocks extra allocated. */
|
||||
size_t nr_alloc;
|
||||
/** The size of usage bitmap in bytes. */
|
||||
size_t sz_usage_bmp;
|
||||
|
||||
/** The pointer to the pre-allocated heap. */
|
||||
unsigned char* heap;
|
||||
/** The pointer to the usage bitmap. */
|
||||
unsigned char* usage_bmp;
|
||||
/**
|
||||
* Size of one block element.
|
||||
*/
|
||||
size_t bd_size;
|
||||
/**
|
||||
* Size of the heap in blocks.
|
||||
*/
|
||||
size_t heap_size;
|
||||
/**
|
||||
* The first free element in the heap.
|
||||
*/
|
||||
int free;
|
||||
/**
|
||||
* Pointer to the pre-allocated heap.
|
||||
*/
|
||||
void* heap;
|
||||
} BLOCKHEAP;
|
||||
|
||||
/**
|
||||
@@ -614,7 +618,7 @@ typedef struct _BLOCKHEAP {
|
||||
typedef BLOCKHEAP* PBLOCKHEAP;
|
||||
|
||||
/**
|
||||
* \fn BOOL InitBlockDataHeap (PBLOCKHEAP heap,
|
||||
* \fn void InitBlockDataHeap (PBLOCKHEAP heap, \
|
||||
size_t bd_size, size_t heap_size)
|
||||
* \brief Initializes a private block data heap.
|
||||
*
|
||||
@@ -627,11 +631,15 @@ typedef BLOCKHEAP* PBLOCKHEAP;
|
||||
* \param bd_size The size of one block in bytes.
|
||||
* \param heap_size The size of the heap in blocks.
|
||||
*
|
||||
* \return TRUE on success, FALSE on error.
|
||||
* \return \a heap->heap will contains a valid pointer on success,
|
||||
* NULL on error.
|
||||
*
|
||||
* \note This function does not return anything. You should check the \a heap
|
||||
* field of the \a heap structure.
|
||||
*
|
||||
* \sa BLOCKHEAP
|
||||
*/
|
||||
MG_EXPORT BOOL InitBlockDataHeap (PBLOCKHEAP heap,
|
||||
MG_EXPORT extern void InitBlockDataHeap (PBLOCKHEAP heap,
|
||||
size_t bd_size, size_t heap_size);
|
||||
|
||||
/**
|
||||
@@ -649,7 +657,7 @@ MG_EXPORT BOOL InitBlockDataHeap (PBLOCKHEAP heap,
|
||||
* \sa InitBlockDataHeap, BlockDataFree
|
||||
*/
|
||||
|
||||
MG_EXPORT void* BlockDataAlloc (PBLOCKHEAP heap);
|
||||
MG_EXPORT extern void* BlockDataAlloc (PBLOCKHEAP heap);
|
||||
|
||||
/**
|
||||
* \fn void BlockDataFree (PBLOCKHEAP heap, void* data)
|
||||
@@ -664,7 +672,7 @@ MG_EXPORT void* BlockDataAlloc (PBLOCKHEAP heap);
|
||||
*
|
||||
* \sa InitBlockDataHeap, BlockDataAlloc
|
||||
*/
|
||||
MG_EXPORT void BlockDataFree (PBLOCKHEAP heap, void* data);
|
||||
MG_EXPORT extern void BlockDataFree (PBLOCKHEAP heap, void* data);
|
||||
|
||||
/**
|
||||
* \fn void DestroyBlockDataHeap (PBLOCKHEAP heap)
|
||||
@@ -674,7 +682,7 @@ MG_EXPORT void BlockDataFree (PBLOCKHEAP heap, void* data);
|
||||
*
|
||||
* \sa InitBlockDataHeap, BLOCKHEAP
|
||||
*/
|
||||
MG_EXPORT void DestroyBlockDataHeap (PBLOCKHEAP heap);
|
||||
MG_EXPORT extern void DestroyBlockDataHeap (PBLOCKHEAP heap);
|
||||
|
||||
/** @} end of block_heap_fns */
|
||||
|
||||
@@ -3713,8 +3721,7 @@ MG_EXPORT BOOL GUIAPI FloodFillGenerator (void* context,
|
||||
* \brief Set bitmap scaler algorithm callback of DC according by scaler_type.
|
||||
*
|
||||
* This function sets the bitmap scaler with DDA or bilinear interpolation
|
||||
* algorithm. MiniGUI implements \a StretchBlt functions by using this scaler
|
||||
* (when not using Pixman).
|
||||
* algorithm. MiniGUI implements StretchBlt functions by using this scaler.
|
||||
*
|
||||
* \param hdc The device context.
|
||||
* \param scaler_type The type of scaler algorithm, use BITMAP_SCALER_DDA
|
||||
@@ -5166,142 +5173,131 @@ MG_EXPORT BOOL GUIAPI FillBitmapPartInBox (HDC hdc, int box_x, int box_y,
|
||||
* The color blend mothed.
|
||||
*
|
||||
* See [Compositing and Blending Level 1](https://www.w3.org/TR/compositing-1/)
|
||||
* Note: we define the same values with Pixman.
|
||||
*/
|
||||
typedef enum {
|
||||
COLOR_BLEND_LEGACY = 0,
|
||||
COLOR_BLEND_FLAGS_MASK = 0x00FF,
|
||||
|
||||
/** Porter Duff rule: clear */
|
||||
COLOR_BLEND_PD_CLEAR = 0x0100, // PIXMAN_OP_CLEAR = 0x00
|
||||
/** Porter Duff rule: source */
|
||||
COLOR_BLEND_PD_SRC = 0x0101, // PIXMAN_OP_SRC = 0x01
|
||||
/** Porter Duff rule: destination */
|
||||
COLOR_BLEND_PD_DST = 0x0102, // PIXMAN_OP_DST = 0x02
|
||||
/** Porter Duff rule: source over destination */
|
||||
COLOR_BLEND_PD_SRC_OVER = 0x0103, // PIXMAN_OP_OVER = 0x03
|
||||
COLOR_BLEND_PD_SRC_OVER = 0,
|
||||
/** Porter Duff rule: destination over source */
|
||||
COLOR_BLEND_PD_DST_OVER = 0x0104, // PIXMAN_OP_OVER_REVERSE = 0x04
|
||||
COLOR_BLEND_PD_DST_OVER,
|
||||
/** Porter Duff rule: clear */
|
||||
COLOR_BLEND_PD_CLEAR,
|
||||
/** Porter Duff rule: source */
|
||||
COLOR_BLEND_PD_SRC,
|
||||
/** Porter Duff rule: destination */
|
||||
COLOR_BLEND_PD_DST,
|
||||
/** Porter Duff rule: souorce in destination */
|
||||
COLOR_BLEND_PD_SRC_IN = 0x0105, // PIXMAN_OP_IN = 0x05
|
||||
COLOR_BLEND_PD_SRC_IN,
|
||||
/** Porter Duff rule: destination in souorce */
|
||||
COLOR_BLEND_PD_DST_IN = 0x0106, // PIXMAN_OP_IN_REVERSE = 0x06
|
||||
COLOR_BLEND_PD_DST_IN,
|
||||
/** Porter Duff rule: source held out by destination */
|
||||
COLOR_BLEND_PD_SRC_OUT = 0x0107, // PIXMAN_OP_OUT = 0x07
|
||||
COLOR_BLEND_PD_SRC_OUT,
|
||||
/** Porter Duff rule: destination held out by source */
|
||||
COLOR_BLEND_PD_DST_OUT = 0x0108, // PIXMAN_OP_OUT_REVERSE = 0x08
|
||||
COLOR_BLEND_PD_DST_OUT,
|
||||
/** Porter Duff rule: source atop destination */
|
||||
COLOR_BLEND_PD_SRC_ATOP = 0x0109, // PIXMAN_OP_ATOP = 0x09
|
||||
COLOR_BLEND_PD_SRC_ATOP,
|
||||
/** Porter Duff rule: destination atop source */
|
||||
COLOR_BLEND_PD_DST_ATOP = 0x010a, // PIXMAN_OP_ATOP_REVERSE = 0x0a
|
||||
COLOR_BLEND_PD_DST_ATOP,
|
||||
/** Porter Duff rule: source xor destination */
|
||||
COLOR_BLEND_PD_XOR = 0x010b, // PIXMAN_OP_XOR = 0x0b
|
||||
COLOR_BLEND_PD_XOR,
|
||||
/** Porter Duff rule: plus */
|
||||
COLOR_BLEND_PD_PLUS = 0x010c, // PIXMAN_OP_ADD = 0x0c
|
||||
COLOR_BLEND_PD_PLUS,
|
||||
/** Porter Duff rule: modulate */
|
||||
COLOR_BLEND_PD_MODULATE = 0x010d, // PIXMAN_OP_SATURATE = 0x0d
|
||||
COLOR_BLEND_PD_MODULATE,
|
||||
|
||||
COLOR_BLEND_PD_FLAG = 0x0100,
|
||||
COLOR_BLEND_PD_FIRST = COLOR_BLEND_PD_CLEAR,
|
||||
COLOR_BLEND_PD_LAST = COLOR_BLEND_PD_MODULATE,
|
||||
COLOR_BLEND_PD_FIRST = COLOR_BLEND_PD_SRC_OVER,
|
||||
COLOR_BLEND_PD_LAST = COLOR_BLEND_PD_MODULATE,
|
||||
|
||||
/**
|
||||
* Separable blend mode: normal
|
||||
* The blending formula simply selects the source color.
|
||||
*/
|
||||
COLOR_BLEND_SP_NORMAL = 0x0801,
|
||||
COLOR_BLEND_SP_NORMAL,
|
||||
/**
|
||||
* Separable blend mode: multiply
|
||||
* Darkens by multiplying colors: Sc·Dc.
|
||||
*/
|
||||
COLOR_BLEND_SP_MULTIPLY = 0x0830, // PIXMAN_OP_MULTIPLY = 0x30
|
||||
COLOR_BLEND_SP_MULTIPLY,
|
||||
/**
|
||||
* Separable blend mode: screen
|
||||
* Complements product of complements: Sc + Dc - Sc·Dc.
|
||||
*/
|
||||
COLOR_BLEND_SP_SCREEN = 0x0831, // PIXMAN_OP_SCREEN = 0x31
|
||||
COLOR_BLEND_SP_SCREEN,
|
||||
/**
|
||||
* Separable blend mode: overlay
|
||||
* Inverse of hard-light.
|
||||
*/
|
||||
COLOR_BLEND_SP_OVERLAY = 0x0832, // PIXMAN_OP_OVERLAY = 0x32
|
||||
COLOR_BLEND_SP_OVERLAY,
|
||||
/**
|
||||
* Separable blend mode: darken
|
||||
* Minimum of colors: min(Sc, Dc).
|
||||
*/
|
||||
COLOR_BLEND_SP_DARKEN = 0x0833, // PIXMAN_OP_DARKEN = 0x33
|
||||
COLOR_BLEND_SP_DARKEN,
|
||||
/**
|
||||
* Separable blend mode: lighten
|
||||
* Maximum of colors: max(Sc, Dc).
|
||||
*/
|
||||
COLOR_BLEND_SP_LIGHTEN = 0x0834, // PIXMAN_OP_LIGHTEN = 0x34
|
||||
COLOR_BLEND_SP_LIGHTEN,
|
||||
/**
|
||||
* Separable blend mode: color-dodge
|
||||
* Brightens destination based on source.
|
||||
*/
|
||||
COLOR_BLEND_SP_COLOR_DODGE = 0x0835, // PIXMAN_OP_COLOR_DODGE = 0x35,
|
||||
COLOR_BLEND_SP_COLOR_DODGE,
|
||||
/**
|
||||
* Separable blend mode: color-burn
|
||||
* Darkens destination based on source.
|
||||
*/
|
||||
COLOR_BLEND_SP_COLOR_BURN = 0x0836, // PIXMAN_OP_COLOR_BURN = 0x36,
|
||||
COLOR_BLEND_SP_COLOR_BURN,
|
||||
/**
|
||||
* Separable blend mode: hard-light
|
||||
* Similar to effect of harsh spotlight.
|
||||
*/
|
||||
COLOR_BLEND_SP_HARD_LIGHT = 0x0837, // PIXMAN_OP_HARD_LIGHT = 0x37,
|
||||
COLOR_BLEND_SP_HARD_LIGHT,
|
||||
/**
|
||||
* Separable blend mode: soft-light
|
||||
* Similar to effect of soft spotlight.
|
||||
*/
|
||||
COLOR_BLEND_SP_SOFT_LIGHT = 0x0838, // PIXMAN_OP_SOFT_LIGHT = 0x38
|
||||
COLOR_BLEND_SP_SOFT_LIGHT,
|
||||
/**
|
||||
* Separable blend mode: difference
|
||||
* Subtracts the darker from the lighter: Abs(Dc - Sc).
|
||||
*/
|
||||
COLOR_BLEND_SP_DIFFERENCE = 0x0839, // PIXMAN_OP_DIFFERENCE = 0x39
|
||||
COLOR_BLEND_SP_DIFFERENCE,
|
||||
/**
|
||||
* Separable blend mode: exclusion
|
||||
* Similar to Difference but lower contrast.
|
||||
*/
|
||||
COLOR_BLEND_SP_EXCLUSION = 0x083a, // PIXMAN_OP_EXCLUSION = 0x3a
|
||||
COLOR_BLEND_SP_EXCLUSION,
|
||||
|
||||
COLOR_BLEND_SP_FLAG = 0x0800,
|
||||
COLOR_BLEND_SP_FIRST = COLOR_BLEND_SP_NORMAL,
|
||||
COLOR_BLEND_SP_LAST = COLOR_BLEND_SP_EXCLUSION,
|
||||
COLOR_BLEND_SP_FIRST = COLOR_BLEND_SP_NORMAL,
|
||||
COLOR_BLEND_SP_LAST = COLOR_BLEND_SP_EXCLUSION,
|
||||
|
||||
/**
|
||||
* Non-Separable blend mode: hue
|
||||
* Creates a color with the hue of the source color and
|
||||
* the saturation and luminosity of the backdrop color.
|
||||
*/
|
||||
COLOR_BLEND_NS_HUE = 0x103b, // PIXMAN_OP_HSL_HUE = 0x3b
|
||||
COLOR_BLEND_NS_HUE,
|
||||
/**
|
||||
* Non-Separable blend mode: saturation
|
||||
* Creates a color with the saturation of the source color and
|
||||
* the hue and luminosity of the backdrop color.
|
||||
*/
|
||||
COLOR_BLEND_NS_SATURATION = 0x103c, // PIXMAN_OP_HSL_SATURATION = 0x3c
|
||||
COLOR_BLEND_NS_SATURATION,
|
||||
/**
|
||||
* Non-Separable blend mode: color
|
||||
* Creates a color with the hue and saturation of the source color
|
||||
* and the luminosity of the backdrop color.
|
||||
*/
|
||||
COLOR_BLEND_NS_COLOR = 0x103d, // PIXMAN_OP_HSL_COLOR = 0x3d
|
||||
|
||||
COLOR_BLEND_NS_COLOR,
|
||||
/**
|
||||
* Non-Separable blend mode: luminosity
|
||||
* Creates a color with the luminosity of the source color and
|
||||
* the hue and saturation of the backdrop color.
|
||||
*/
|
||||
COLOR_BLEND_NS_LUMINOSITY = 0x103e, // PIXMAN_OP_HSL_LUMINOSITY = 0x3e
|
||||
COLOR_BLEND_NS_LUMINOSITY,
|
||||
|
||||
COLOR_BLEND_NS_FLAG = 0x1000,
|
||||
COLOR_BLEND_NS_FIRST = COLOR_BLEND_NS_HUE,
|
||||
COLOR_BLEND_NS_LAST = COLOR_BLEND_NS_LUMINOSITY,
|
||||
|
||||
COLOR_BLEND_FIRST = COLOR_BLEND_PD_CLEAR,
|
||||
COLOR_BLEND_LAST = COLOR_BLEND_NS_LAST,
|
||||
COLOR_BLEND_NS_FIRST = COLOR_BLEND_NS_HUE,
|
||||
COLOR_BLEND_NS_LAST = COLOR_BLEND_NS_LUMINOSITY,
|
||||
} ColorBlendMethod;
|
||||
|
||||
/**
|
||||
@@ -5353,107 +5349,16 @@ typedef enum {
|
||||
* in the destination DC.
|
||||
* \param dy The y coordinate of the upper-left corner of the rectangle
|
||||
* in the destination DC.
|
||||
* \param dwRop The color blending method, see \a ColorBlendMethod.
|
||||
* This argument is only valid when Pixman is used.
|
||||
* \param dwRop The raster logical operation, see \a ColorLogicalOp.
|
||||
* this argument is reserved for future use, currently ignored.
|
||||
*
|
||||
* \note When the source color key is specified for the blitting operation,
|
||||
* or the formats of the device contexts are not supported by Pixman,
|
||||
* this function will use the legacy implementation. In this situation,
|
||||
* the color blending method will be ignored.
|
||||
* \note The alpha and color key settings of the source DC will come into play.
|
||||
*
|
||||
* \sa StretchBlt, SetMemDCAlpha, SetMemDCColorKey, ColorBlendMethod
|
||||
* \sa StretchBlt, SetMemDCAlpha, SetMemDCColorKey, ColorLogicalOp
|
||||
*/
|
||||
MG_EXPORT void GUIAPI BitBlt (HDC hsdc, int sx, int sy, int sw, int sh,
|
||||
HDC hddc, int dx, int dy, DWORD dwRop);
|
||||
|
||||
/**
|
||||
* The scaling filter for StretchBlt.
|
||||
*/
|
||||
typedef enum {
|
||||
/** The fast filter (DDA scaler) */
|
||||
SCALING_FILTER_FAST = 0x00000000,
|
||||
/** The good filter */
|
||||
SCALING_FILTER_GOOD = 0x00010000,
|
||||
/** The best filter */
|
||||
SCALING_FILTER_BEST = 0x00020000,
|
||||
/** The filter using nearest algorithm */
|
||||
SCALING_FILTER_NEAREST = 0x00020000,
|
||||
/** The filter using bi-linear algorithm */
|
||||
SCALING_FILTER_BILINEAR = 0x00040000,
|
||||
/** The filter using convolution algorithm */
|
||||
SCALING_FILTER_CONVOLUTION = 0x00050000,
|
||||
SCALING_FILTER_SHIFT = 16,
|
||||
} ScalingFilter;
|
||||
|
||||
/**
|
||||
* The stretch extra information for \a StretchBltEx.
|
||||
*
|
||||
* \sa StretchBltEx
|
||||
*/
|
||||
typedef struct _STRETCH_EXTRA_INFO {
|
||||
/** The version code; reserved for future, must set zero */
|
||||
int version;
|
||||
|
||||
/** The rotation of the source bitmap in 1/64ths of a degree. */
|
||||
int rotation;
|
||||
|
||||
/** The x-coordinate of the rotation center in the destination rectangle,
|
||||
* relative to the uppper-left corner of the rectangle. */
|
||||
|
||||
int cx;
|
||||
/** The y-coordinate of the rotation center in the destination rectangle,
|
||||
* relative to the uppper-left corner of the rectangle. */
|
||||
int cy;
|
||||
} STRETCH_EXTRA_INFO;
|
||||
|
||||
/**
|
||||
* \fn BOOL GUIAPI StretchBltEx (HDC hsdc, int sx, int sy, int sw, int sh,
|
||||
* HDC hddc, int dx, int dy, int dw, int dh, int rotation, DWORD dwRop)
|
||||
* \brief Copies a bitmap from a source rectangle into a destination
|
||||
* rectangle, streches and rotates the bitmap if necessary.
|
||||
*
|
||||
* This function copies a bitmap from a source rectangle into a destination
|
||||
* rectangle, streching or compressing the bitmap to fit the dimension of
|
||||
* the destination rectangle, if necessary. This function is similar with
|
||||
* \sa BitBlt function except the former scaling the bitmap. \a (dw,dh)
|
||||
* specifies the size of the destination rectangle.
|
||||
*
|
||||
* \param hsdc The source device context.
|
||||
* \param sx The x coordinate of the upper-left corner of the rectangle
|
||||
* in the source DC.
|
||||
* \param sy The y coordinate of the upper-left corner of the rectangle
|
||||
* in the source DC.
|
||||
* \param sw The width of the source rectangle.
|
||||
* \param sh The height of the source rectangle.
|
||||
* \param hddc The destination device context \a hddc.
|
||||
* \param dx The x coordinate of the upper-left corner of the rectangle
|
||||
* in the destination DC.
|
||||
* \param dy The y coordinate of the upper-left corner of the rectangle
|
||||
* in the destination DC.
|
||||
* \param dw The width of the destination rectangle.
|
||||
* \param dh The height of the destination rectangle.
|
||||
* \param sei The pointer to a stretch extra information strucure;
|
||||
* can be NULL. Note this only works when Pixman is used.
|
||||
* \param dwRop The color blending method, see \a ColorBlendMethod, OR'd
|
||||
* with a fiter of the scaling, see \a ScalingFilter.
|
||||
* This argument only works when Pixman is used.
|
||||
*
|
||||
* \return TRUE for success, FALSE for bad arguments and there is no any
|
||||
* drawing occurred.
|
||||
*
|
||||
* \note When the source color key is specified for the blitting operation,
|
||||
* or the formats of the device contexts are not supported by Pixman,
|
||||
* this function will use the legacy implementation. In this situation,
|
||||
* the color blending method, the scaling filter, and the rotation
|
||||
* will be ignored.
|
||||
*
|
||||
* \sa BitBlt, SetMemDCAlpha, SetMemDCColorKey, STRETCH_EXTRA_INFO,
|
||||
* ColorBlendMethod, ScalingFilter
|
||||
*/
|
||||
MG_EXPORT BOOL GUIAPI StretchBltEx (HDC hsdc, int sx, int sy, int sw, int sh,
|
||||
HDC hddc, int dx, int dy, int dw, int dh,
|
||||
const STRETCH_EXTRA_INFO *sei, DWORD dwRop);
|
||||
|
||||
/**
|
||||
* \fn void GUIAPI StretchBlt (HDC hsdc, int sx, int sy, int sw, int sh, \
|
||||
HDC hddc, int dx, int dy, int dw, int dh, DWORD dwRop)
|
||||
@@ -5463,7 +5368,7 @@ MG_EXPORT BOOL GUIAPI StretchBltEx (HDC hsdc, int sx, int sy, int sw, int sh,
|
||||
* This function copies a bitmap from a source rectangle into a destination
|
||||
* rectangle, streching or compressing the bitmap to fit the dimension of
|
||||
* the destination rectangle, if necessary. This function is similar with
|
||||
* \sa BitBlt function except the former scaling the bitmap. \a (dw,dh)
|
||||
* \sa BitBlt function except the former scaling the bitmap. \a (dw,dh)
|
||||
* specifies the size of the destination rectangle.
|
||||
*
|
||||
* \param hsdc The source device context.
|
||||
@@ -5480,25 +5385,21 @@ MG_EXPORT BOOL GUIAPI StretchBltEx (HDC hsdc, int sx, int sy, int sw, int sh,
|
||||
* in the destination DC.
|
||||
* \param dw The width of the destination rectangle.
|
||||
* \param dh The height of the destination rectangle.
|
||||
* \param dwRop The color blending method, see \a ColorBlendMethod.
|
||||
* This argument is only valid when Pixman is used.
|
||||
* \param dwRop The raster logical operation, see \a ColorLogicalOp.
|
||||
* this argument is reserved for future use, currently ignored.
|
||||
*
|
||||
* \note When color key is specified for the blitting operation, or the
|
||||
* formats of the device contexts are not supported by Pixman,
|
||||
* this function will use the legacy implementation. In this situation,
|
||||
* the color blending method and the scaling filter will be ignored.
|
||||
* \note The source rect should be contained in the device space entirely,
|
||||
* and all coordinates should be in the device space.
|
||||
*
|
||||
* \sa BitBlt, SetMemDCAlpha, SetMemDCColorKey, ColorBlendMethod
|
||||
* \note The source DC and dest DC must compatible, else will do nothing.
|
||||
*
|
||||
* \note The alpha and color key settings of the source DC will not come
|
||||
* into play.
|
||||
*
|
||||
* \sa BitBlt, SetMemDCAlpha, SetMemDCColorKey
|
||||
*/
|
||||
static inline void GUIAPI StretchBlt (HDC hsdc, int sx, int sy, int sw, int sh,
|
||||
HDC hddc, int dx, int dy, int dw, int dh, DWORD dwRop)
|
||||
{
|
||||
StretchBltEx (hsdc, sx, sy, sw, sh, hddc, dx, dy, dw, dh, NULL, dwRop);
|
||||
}
|
||||
|
||||
/* Use this if you want to have the legacy manner of StretchBlt */
|
||||
MG_EXPORT void GUIAPI StretchBltLegacy (HDC hsdc, int sx, int sy, int sw, int sh,
|
||||
HDC hddc, int dx, int dy, int dw, int dh, DWORD dwRop);
|
||||
MG_EXPORT void GUIAPI StretchBlt (HDC hsdc, int sx, int sy, int sw, int sh,
|
||||
HDC hddc, int dx, int dy, int dw, int dh, DWORD dwRop);
|
||||
|
||||
/**
|
||||
* \fn BOOL GUIAPI ScaleBitmapEx (BITMAP* dst, const BITMAP* src, \
|
||||
@@ -12951,7 +12852,6 @@ MG_EXPORT int GUIAPI GetGlyphsExtentPoint (HDC hdc, Glyph32* glyphs,
|
||||
|
||||
#define GLYPH_INFO_METRICS 0x01
|
||||
#define GLYPH_INFO_BMP 0x02
|
||||
#define GLYPH_INFO_FACE 0x04
|
||||
|
||||
/** The type of glyph bitmap: monochrome */
|
||||
#define GLYPHBMP_TYPE_MONO 0x00
|
||||
@@ -12974,7 +12874,6 @@ typedef struct _GLYPHINFO {
|
||||
* or bitmap infomation. Or'ed with the following values:
|
||||
* - GLYPH_INFO_METRICS
|
||||
* - GLYPH_INFO_BMP
|
||||
* - GLYPH_INFO_FACE
|
||||
*/
|
||||
Uint32 mask;
|
||||
|
||||
@@ -13007,16 +12906,6 @@ typedef struct _GLYPHINFO {
|
||||
* It is only valid if bmp_type is GLYPHBMP_TYPE_PRERENDER
|
||||
*/
|
||||
BITMAP prbitmap;
|
||||
|
||||
/**
|
||||
* The FreeType face, font file path, and the glyph index
|
||||
* (when mask has GLYPH_INFO_FACE set).
|
||||
* You can use these information to render the glyph by yourself.
|
||||
* Only available if the device font is a TrueType/OpenType font.
|
||||
*/
|
||||
void* ft_face;
|
||||
const char* file_path;
|
||||
Uint32 index;
|
||||
} GLYPHINFO;
|
||||
|
||||
/**
|
||||
|
||||
+10
-87
@@ -82,16 +82,10 @@ extern "C" {
|
||||
#define ZOF_MAXIMIZED 0x00000004 // Since 5.0.0
|
||||
#define ZOF_MINIMIZED 0x00000008 // Since 5.0.0
|
||||
|
||||
/* Since 5.0.6 */
|
||||
#define ZOF_GESTURE_FLAGS_MASK 0X000000F0
|
||||
#define ZOF_GF_SWIPE_HORZ 0x00000010
|
||||
#define ZOF_GF_SWIPE_VERT 0x00000020
|
||||
|
||||
/* Since 5.0.0 */
|
||||
#define ZOF_INTERNAL_FLAGS_MASK 0X000F0000
|
||||
#define ZOF_IF_REFERENCE 0x00010000
|
||||
#define ZOF_IF_ALWAYSTOP 0x00020000
|
||||
#define ZOF_IF_SPECIAL 0x00040000 // Since 5.0.6
|
||||
|
||||
#define ZOF_TW_FLAG_MASK 0x00F00000
|
||||
#define ZOF_TW_TROUNDCNS 0x00100000
|
||||
@@ -357,17 +351,9 @@ extern MG_EXPORT MG_Client* mgClients;
|
||||
*/
|
||||
extern MG_EXPORT MG_Layer* mgTopmostLayer;
|
||||
|
||||
/**
|
||||
* \var MG_Layer* mgDefaultLayer
|
||||
* \brief The pointer to the default layer.
|
||||
*
|
||||
* \sa MG_Layer
|
||||
*/
|
||||
extern MG_EXPORT MG_Layer* mgDefaultLayer;
|
||||
|
||||
/**
|
||||
* \var MG_Layer* mgLayers
|
||||
* \brief The pointer to the layer list.
|
||||
* \brief The pointer to the array of layers.
|
||||
*
|
||||
* \sa MG_Layer
|
||||
*/
|
||||
@@ -576,8 +562,6 @@ MG_EXPORT BOOL GUIAPI DeleteLayer (BOOL handle_name,
|
||||
*
|
||||
* \return TRUE on success, otherwise FALSE.
|
||||
*
|
||||
* \note Only one client which has no any window can be moved.
|
||||
*
|
||||
* \note The client which created a fixed main window
|
||||
* (a main window acts as the screen lock, the docker, or the launcher) will
|
||||
* be moved to the topmost layer automatically.
|
||||
@@ -1507,9 +1491,7 @@ MG_EXPORT BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer, int idx_znode,
|
||||
*
|
||||
* \return TRUE on success, otherwise FALSE.
|
||||
*
|
||||
* \note Server-only function. Only one client which has no any window can be moved.
|
||||
*
|
||||
* \note The client which created a fixed main window
|
||||
* \note Server-only function. The client which created a fixed main window
|
||||
* (a main window acts as the screen lock, the docker, or the launcher) will
|
||||
* be moved to the topmost layer automatically.
|
||||
*
|
||||
@@ -1618,7 +1600,7 @@ typedef struct _CompositorOps {
|
||||
* a main window with the extended style WS_EX_AUTOPOSITION.
|
||||
*/
|
||||
void (*calc_mainwin_pos) (CompositorCtxt* ctxt, MG_Layer* layer,
|
||||
DWORD zt_type, int first_for_type, int cli, CALCPOSINFO* info);
|
||||
DWORD zt_type, int first_for_type, CALCPOSINFO* info, int cli);
|
||||
|
||||
/**
|
||||
* This operation will be called when there was a layer operation.
|
||||
@@ -1747,20 +1729,6 @@ typedef struct _CompositorOps {
|
||||
void (*on_moved_win) (CompositorCtxt* ctxt, MG_Layer* layer,
|
||||
int zidx, const RECT* rc_org);
|
||||
|
||||
/**
|
||||
* This operation will composite multiple layers on the screen at the same
|
||||
* time by using the combining paramemters.
|
||||
*/
|
||||
unsigned int (*composite_layers) (CompositorCtxt* ctxt, MG_Layer* layers[],
|
||||
int nr_layers, void* combine_param);
|
||||
|
||||
/**
|
||||
* This operation will be called when transiting to a new topmost layer.
|
||||
* The compositor can play an animation to transit from the current
|
||||
* topmost layer to the new topmost layer.
|
||||
*/
|
||||
void (*transit_to_layer) (CompositorCtxt* ctxt, MG_Layer* to_layer);
|
||||
|
||||
/**
|
||||
* This operation will be called when the system is maximizing a window.
|
||||
* The compositor can play an animation in this operation.
|
||||
@@ -1775,35 +1743,12 @@ typedef struct _CompositorOps {
|
||||
|
||||
} CompositorOps;
|
||||
|
||||
#define FCM_HORIZONTAL 0x0000
|
||||
#define FCM_VERTICAL 0x0001
|
||||
#define FCM_METHOD_MASK 0x00FF
|
||||
#define FCM_SCALE 0x0100
|
||||
|
||||
/** The combining parameters for the callback compositor. */
|
||||
typedef struct _CombParamsFallback {
|
||||
/**
|
||||
* The combining method, can be one of the following values:
|
||||
* - FCM_HORIZONTAL
|
||||
* - FCM_VERTICAL
|
||||
* and/or OR'd with the following value:
|
||||
* - FCM_SCALE
|
||||
*/
|
||||
unsigned int method;
|
||||
|
||||
/** The percentage of the screen occupied by the first layer. */
|
||||
float percent;
|
||||
|
||||
/** The scale factor of non-global z-nodes. */
|
||||
float scale;
|
||||
} COMBPARAMS_FALLBACK;
|
||||
|
||||
/**
|
||||
* \brief Get the operations of a specific compositor.
|
||||
*
|
||||
* This function gets the operations of a specific compositor.
|
||||
*
|
||||
* \param name The name of the compositor. MiniGUI reserved `fallback`
|
||||
* \param name The name of the compositor. MiniGUI reserved `default`
|
||||
* as the default compositor which is implemented in MiniGUI Core.
|
||||
* You can use some operations of the default compositor as the
|
||||
* corresponding operations for your own compositor.
|
||||
@@ -1863,7 +1808,7 @@ MG_EXPORT BOOL GUIAPI ServerUnregisterCompositor (const char* name);
|
||||
* \brief Select a compositor as the current compositor.
|
||||
*
|
||||
* This function selects a compositor as the current compositor
|
||||
* and returns the compositor operations.
|
||||
* and returns the compositor object.
|
||||
* It also destroies the old compositor object if there is old one.
|
||||
*
|
||||
* \param name The name of the compositor. If the argument is NULL,
|
||||
@@ -1881,25 +1826,7 @@ MG_EXPORT BOOL GUIAPI ServerUnregisterCompositor (const char* name);
|
||||
MG_EXPORT const CompositorOps* GUIAPI ServerSelectCompositor (
|
||||
const char* name, CompositorCtxt** ctxt);
|
||||
|
||||
/**
|
||||
* \brief Get the name and the context of the current compositor.
|
||||
*
|
||||
* This function gets the name and the context of the current
|
||||
* compositor.
|
||||
*
|
||||
* \param ops The buffer used to return the compositor operations.
|
||||
* \param ctxt The buffer used to return the compositor context.
|
||||
*
|
||||
* \return The name of the current compositor; NULL for error.
|
||||
*
|
||||
* \note Only called by the server.
|
||||
*
|
||||
* Since 5.0.6.
|
||||
*/
|
||||
MG_EXPORT const char* GUIAPI ServerGetCurrentCompositor (
|
||||
const CompositorOps** ops, CompositorCtxt** ctxt);
|
||||
|
||||
#define COMPSOR_OPS_VERSION 2
|
||||
#define COMPSOR_OPS_VERSION 1
|
||||
|
||||
/**
|
||||
* Implement this stub to return the compositor operations
|
||||
@@ -4097,7 +4024,7 @@ static inline int GUIAPI ShowCursor (BOOL fShow) {
|
||||
#endif /* !_MGHAVE_CURSOR */
|
||||
|
||||
/**
|
||||
* \fn HCURSOR SetCursor(HCURSOR hcsr)
|
||||
* \def SetCursor(hcsr)
|
||||
* \brief Changes the current cursor.
|
||||
*
|
||||
* This function changes the current cursor to be \a hcsr.
|
||||
@@ -4110,12 +4037,10 @@ static inline int GUIAPI ShowCursor (BOOL fShow) {
|
||||
*
|
||||
* \sa SetCursorEx, SetDefaultCursor
|
||||
*/
|
||||
static inline HCURSOR SetCursor(HCURSOR hcsr) {
|
||||
return SetCursorEx (hcsr, FALSE);
|
||||
}
|
||||
#define SetCursor(hcsr) SetCursorEx (hcsr, FALSE)
|
||||
|
||||
/**
|
||||
* \fn HCURSOR SetDefaultCursor(HCURSOR hcsr)
|
||||
* \def SetDefaultCursor(hcsr)
|
||||
* \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
|
||||
@@ -4129,9 +4054,7 @@ static inline HCURSOR SetCursor(HCURSOR hcsr) {
|
||||
*
|
||||
* \sa SetCursorEx, SetCursor
|
||||
*/
|
||||
static inline HCURSOR SetDefaultCursor(HCURSOR hcsr) {
|
||||
return SetCursorEx (hcsr, TRUE);
|
||||
}
|
||||
#define SetDefaultCursor(hcsr) SetCursorEx (hcsr, TRUE)
|
||||
|
||||
/** @} end of cursor_fns */
|
||||
|
||||
|
||||
+31
-100
@@ -1448,17 +1448,6 @@ extern DWORD __mg_interval_time;
|
||||
*/
|
||||
#define MSG_HELP 0x006A
|
||||
|
||||
/**
|
||||
* \def MSG_GESTURETEST
|
||||
* \brief This message will be sent to a main window for gesture test.
|
||||
*
|
||||
* The client should call \a SetMainWindowGestureFlags to set the gesture flags
|
||||
* for a main window after got this message.
|
||||
*
|
||||
* Since 5.0.6.
|
||||
*/
|
||||
#define MSG_GESTURETEST 0x006B
|
||||
|
||||
#define MSG_LASTCREATEMSG 0x006F
|
||||
|
||||
/** @} end of creation_msgs */
|
||||
@@ -2474,9 +2463,6 @@ typedef struct _COMPOSITINGINFO {
|
||||
/* Since 5.0.0 */
|
||||
#define MSG_SETAUTOREPEAT 0x0107
|
||||
|
||||
/* Since 5.0.6 */
|
||||
#define MSG_SETGESTUREFLAGS 0x0108
|
||||
|
||||
#define MSG_SHOWGLOBALCTRL 0x010A
|
||||
#define MSG_HIDEGLOBALCTRL 0x010B
|
||||
|
||||
@@ -2905,9 +2891,6 @@ typedef struct _WINMASKINFO {
|
||||
*
|
||||
* This message is sent to the all main windows when the system
|
||||
* 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
|
||||
|
||||
@@ -3000,9 +2983,6 @@ typedef struct _WINMASKINFO {
|
||||
/* Since 5.0.0: for calculating the default position */
|
||||
#define MSG_CALC_POSITION 0x014B
|
||||
|
||||
/* Since 5.0.6: for waking up the client */
|
||||
#define MSG_WAKEUP_CLIENT 0x014C
|
||||
|
||||
/**
|
||||
* \def MSG_DOESNEEDIME
|
||||
* \brief Send to a window to query whether the window needs to open
|
||||
@@ -4453,12 +4433,16 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
||||
|
||||
/**
|
||||
* \def WS_EX_WINTYPE_TOOLTIP
|
||||
* \brief The type for a tooltip main window.
|
||||
* \brief The type for a system/global main window.
|
||||
*
|
||||
* Use this style when you want to create a tooltip main window.
|
||||
* A tooltip main window will be shown above other types of main windows.
|
||||
*
|
||||
* \note The maximal number of all main windows in the tooltip level is 16.
|
||||
* \note Under MiniGUI-Processes runtime mode, only the client which creates
|
||||
* the first main window in the tooltip level can create other main
|
||||
* windows in this level. For other clients, a main window in the higher
|
||||
* level will be created.
|
||||
* \note The maximal number of all main windows in the tooltip level is 8.
|
||||
* MiniGUI will create a main windows in higher level if there is no room
|
||||
* in the tooltip level.
|
||||
*
|
||||
@@ -4474,12 +4458,8 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
||||
* A system/global main window will be shown above other types of main windows.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, only the server (`mginit`) can
|
||||
* create main windows in the system level, and any main windows created
|
||||
* by the server is a system main window.
|
||||
*
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
|
||||
* visible on all layers.
|
||||
* create main windows in the system level, and any main windows created
|
||||
* by the server is a system main window.
|
||||
*
|
||||
* Since 5.0.0.
|
||||
*/
|
||||
@@ -4493,18 +4473,13 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
||||
* screen lock level. A main window in the screen lock level will
|
||||
* be shown below the system main windows and above the other main windows.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
|
||||
* layer can create a main window in this level, and only the client which creates
|
||||
* the first main window in the screen lock level can create other
|
||||
* main windows in the this level. For other clients, a main window in
|
||||
* the higher level will be created.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
|
||||
* visible on all layers.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, only the client which creates
|
||||
* the first main window in the screen lock level can create other
|
||||
* main windows in the this level. For other clients, a main window in
|
||||
* the higher level will be created.
|
||||
* \note The maximal number of all main windows in the screen lock level is 8.
|
||||
* MiniGUI will create a main windows in higher level if there is no room
|
||||
* in the screen lock level.
|
||||
* MiniGUI will create a main windows in higher level if there is no room
|
||||
* in the screen lock level.
|
||||
*
|
||||
* Since 5.0.0.
|
||||
*/
|
||||
@@ -4519,18 +4494,13 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
||||
* be shown below the main windows in the screen lock level and
|
||||
* above the main windows in the higher level.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
|
||||
* layer can create a main window in this levele, and only the client which creates
|
||||
* the first main window in the docker level can create other main windows
|
||||
* in the docker level. For other clients, a main window in the higher
|
||||
* level will be created.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
|
||||
* visible on all layers.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, only the client which creates
|
||||
* the first main window in the docker level can create other main windows
|
||||
* in the docker level. For other clients, a main window in the higher
|
||||
* level will be created.
|
||||
* \note The maximal number of all main windows in the docker level is 8.
|
||||
* MiniGUI will create a main windows in higher level if there is no room
|
||||
* in the docker level.
|
||||
* MiniGUI will create a main windows in higher level if there is no room
|
||||
* in the docker level.
|
||||
*
|
||||
* Since 5.0.0.
|
||||
*/
|
||||
@@ -4579,18 +4549,13 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
|
||||
* be shown below the main windows in the normal level and
|
||||
* above the wallpaper.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
|
||||
* layer can create a main window in this levele, and only the client which creates
|
||||
* the first main window in the launcher level can create other
|
||||
* main windows in the launcher level. For other clients, a main window
|
||||
* in the normal level will be created.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
|
||||
* visible on all layers.
|
||||
*
|
||||
* \note Under MiniGUI-Processes runtime mode, only the client which creates
|
||||
* the first main window in the launcher level can create other
|
||||
* main windows in the launcher level. For other clients, a main window
|
||||
* in the normal level will be created.
|
||||
* \note The maximal number of all main windows in the launcher level is 8.
|
||||
* MiniGUI will create a main windows in normal level if there is no room
|
||||
* in the launcher level.
|
||||
* MiniGUI will create a main windows in normal level if there is no room
|
||||
* in the launcher level.
|
||||
*
|
||||
* Since 5.0.0.
|
||||
*/
|
||||
@@ -6919,14 +6884,13 @@ static inline BOOL MainWindowThreadCleanup (HWND hMainWnd)
|
||||
#define ST_PIXEL_ARGB4444 0x0001
|
||||
#define ST_PIXEL_ARGB1555 0x0002
|
||||
#define ST_PIXEL_ARGB8888 0x0003
|
||||
#define ST_PIXEL_XRGB565 0x0004
|
||||
|
||||
/* other flags for future use */
|
||||
|
||||
/* for default surface flags */
|
||||
#define ST_DEFAULT (ST_PIXEL_DEFAULT)
|
||||
|
||||
#define CT_SYSTEM_MASK 0x0000FF
|
||||
#define CT_SYSTEM_MASK 0X0000FF
|
||||
#define CT_OPAQUE 0x000000
|
||||
#define CT_COLORKEY 0x000001
|
||||
#define CT_ALPHACHANNEL 0x000002
|
||||
@@ -7194,7 +7158,7 @@ MG_EXPORT BOOL GUIAPI SetWindowMaskEx (HWND hWnd, HDC hdc, const BITMAP* mask);
|
||||
* \param hWnd The handle to the window.
|
||||
* \param fSet Set or cancel the always top style; TRUE to set, FALSE to cancel.
|
||||
*
|
||||
* \return TRUE on success, otherwise FALSE.
|
||||
* \return return TRUE on success, otherwise FALSE.
|
||||
*
|
||||
* \sa GetWindowStyle, WS_ALWAYSTOP
|
||||
*
|
||||
@@ -7202,39 +7166,6 @@ MG_EXPORT BOOL GUIAPI SetWindowMaskEx (HWND hWnd, HDC hdc, const BITMAP* mask);
|
||||
*/
|
||||
MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop (HWND hWnd, BOOL fSet);
|
||||
|
||||
#define GF_SWIPE_HORZ ZOF_GF_SWIPE_HORZ
|
||||
#define GF_SWIPE_VERT ZOF_GF_SWIPE_VERT
|
||||
|
||||
/**
|
||||
* \fn BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags)
|
||||
* \brief Set the gesture flags of a main window.
|
||||
*
|
||||
* This function sets the gesture flags of a specific main window.
|
||||
*
|
||||
* Generally, a main window which needs a specific gesture should handle
|
||||
* \a MSG_GESTURETEST and call this function to set the correct gesture flags for
|
||||
* the main window.
|
||||
*
|
||||
* The MiniGUI Core will send the MSG_GESTURETEST message as a notification
|
||||
* to a main window when it tries to handle a gesture globally. If the main window
|
||||
* sets the flag of the gesture in a specific time, e.g. 100ms, MiniGUI Core will
|
||||
* pass the gesture events to the main window other than handle the gesture by itself.
|
||||
*
|
||||
* \param hWnd The handle to the main window.
|
||||
* \param dwFlags The new gesture flags, can be OR'd with the following values:
|
||||
* - GF_SWIPE_HORZ\n
|
||||
* The main window handles horizontal swipe gesture.
|
||||
* - GF_SWIPE_VERT\n
|
||||
* The main window handles vertical swipe gesture.
|
||||
*
|
||||
* \return TRUE on success, otherwise FALSE.
|
||||
*
|
||||
* \sa MSG_GESTURETEST
|
||||
*
|
||||
* Since 5.0.6
|
||||
*/
|
||||
MG_EXPORT BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags);
|
||||
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
|
||||
/**
|
||||
@@ -7258,14 +7189,14 @@ MG_EXPORT BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags);
|
||||
* the alpha channel value (0~255) along with the parameter \a arg.
|
||||
* - CT_LOGICALPIXEL\n
|
||||
* Do the given color logical operation. You should specify the color
|
||||
* logical raster operation along with the pararmeter \a arg. See \a ColorLogicalOp.
|
||||
* logical raster operation along with the pararmeter \a arg. See \a BitBlt.
|
||||
* - CT_ALPHAPIXEL\n
|
||||
* The alpha component value of the source and/or the destination pixel go
|
||||
* into effect. You can specify the color blend method along
|
||||
* with the pararmeter \a arg. See \a ColorBlendMethod. Note that a specific
|
||||
* compositor may not support this compositing type. The built-in `fallback`
|
||||
* compositor uses the blend mode argument when using Pixman, otherwise,
|
||||
* uses the Porter Duff blend mode: source over destination (COLOR_BLEND_PD_SRC_OVER).
|
||||
* compositor ignores the blend mode argument and only always uses the
|
||||
* Porter Duff blend mode: source over destination (COLOR_BLEND_PD_SRC_OVER).
|
||||
* - CT_BLURRED\n
|
||||
* Apply a Gaussian blur to the background of the main window. You should
|
||||
* also specify the radius of the blur (0 ~ 255) in pixles along with the
|
||||
|
||||
+44
-19
@@ -1,31 +1,56 @@
|
||||
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 = \
|
||||
libc/liblibc.la \
|
||||
misc/libmisc.la \
|
||||
control/libcontrol.la \
|
||||
ex_ctrl/libexctrl.la \
|
||||
font/libfont.la \
|
||||
COMMON_LADD = \
|
||||
kernel/libkernel.la \
|
||||
sysres/libsysres.la \
|
||||
misc/libmisc.la
|
||||
else
|
||||
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 \
|
||||
ial/libial.la \
|
||||
gui/libgui.la \
|
||||
main/libmain.la \
|
||||
mybmp/libmybmp.la \
|
||||
kernel/libkernel.la \
|
||||
ial/libial.la \
|
||||
gui/libgui.la \
|
||||
main/libmain.la \
|
||||
mybmp/libmybmp.la \
|
||||
kernel/libkernel.la \
|
||||
sysres/libsysres.la \
|
||||
textedit/libtextedit.la \
|
||||
newgal/libnewgal.la \
|
||||
newgdi/libnewgdi.la
|
||||
textedit/libtextedit.la
|
||||
endif
|
||||
|
||||
DIST_SUBDIRS = $(COMMON_SUBDIRS) newgal newgdi server client standalone
|
||||
SUBDIRS = $(COMMON_SUBDIRS) @RUNMODE_SUBDIRS@
|
||||
if MGRM_STANDALONE
|
||||
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
|
||||
MGLIBADD = $(COMMON_LADD) @RUNMODE_LADD@
|
||||
MGLIBADD = $(COMMON_LADD) \
|
||||
$(LITE_LADD) \
|
||||
$(NEWGAL_LADD)
|
||||
MGLDFLAGS = -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
||||
lib_LTLIBRARIES=libminigui_@MGLIB_SUFFIX@.la
|
||||
libminigui_@MGLIB_SUFFIX@_la_LIBADD=$(MGLIBADD) @DEP_LIBS@
|
||||
libminigui_@MGLIB_SUFFIX@_la_LIBADD=$(MGLIBADD)
|
||||
libminigui_@MGLIB_SUFFIX@_la_SOURCES=$(MGSOURCES)
|
||||
libminigui_@MGLIB_SUFFIX@_la_LDFLAGS=$(MGLDFLAGS)
|
||||
|
||||
|
||||
+27
-72
@@ -154,31 +154,9 @@ int GUIAPI GetSockFD2Server (void)
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
static void check_live (BOOL woken)
|
||||
{
|
||||
static DWORD last_ticks;
|
||||
REQUEST req;
|
||||
|
||||
__mg_update_tick_count (NULL);
|
||||
|
||||
// Since 5.0.6, only send IAMLIVE if the current ticks > (last_ticks + 100)
|
||||
if (woken || __mg_tick_counter > last_ticks + 100) {
|
||||
last_ticks = __mg_tick_counter;
|
||||
|
||||
/* Tell server that I am live */
|
||||
req.id = REQID_IAMLIVE;
|
||||
req.data = &__mg_tick_counter;
|
||||
req.len_data = sizeof (unsigned int);
|
||||
ClientRequest (&req, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void process_socket_message (MSG *msg)
|
||||
{
|
||||
if (msg->message == MSG_WAKEUP_CLIENT) {
|
||||
check_live (TRUE);
|
||||
}
|
||||
else if (msg->message == MSG_UPDATECLIWIN &&
|
||||
if (msg->message == MSG_UPDATECLIWIN &&
|
||||
__mg_client_check_hwnd (msg->hwnd, __mg_client_id)) {
|
||||
__mg_update_window (msg->hwnd,
|
||||
LOSWORD(msg->wParam), HISWORD(msg->wParam),
|
||||
@@ -388,6 +366,27 @@ sock_error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void check_live (void)
|
||||
{
|
||||
REQUEST req;
|
||||
|
||||
#if 0 /* deprecated code */
|
||||
/* Since 5.0.0, call __mg_update_tick_count instead */
|
||||
if (__mg_tick_counter != SHAREDRES_TIMER_COUNTER) {
|
||||
AlertDesktopTimerEvent ();
|
||||
__mg_tick_counter = SHAREDRES_TIMER_COUNTER;
|
||||
}
|
||||
#endif /* deprecated code */
|
||||
|
||||
__mg_update_tick_count (NULL);
|
||||
|
||||
/* Tell server that I am live */
|
||||
req.id = REQID_IAMLIVE;
|
||||
req.data = &__mg_tick_counter;
|
||||
req.len_data = sizeof (unsigned int);
|
||||
ClientRequest (&req, NULL, 0);
|
||||
}
|
||||
|
||||
BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
||||
{
|
||||
static DWORD old_timer;
|
||||
@@ -399,7 +398,7 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
||||
struct timeval sel_timeout;
|
||||
MSG Msg;
|
||||
|
||||
check_live (FALSE);
|
||||
check_live ();
|
||||
|
||||
/* rset gets modified each time around */
|
||||
rset = msg_queue->rfdset;
|
||||
@@ -434,14 +433,14 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
||||
static unsigned int old_mouse_move_serial = 0xdeadbeef;
|
||||
int flag = 0, mouse_x = -1, mouse_y = -1, buttons = -1;
|
||||
|
||||
check_live (FALSE);
|
||||
check_live ();
|
||||
if (wait && (__mg_tick_counter - old_timer) >= repeat_timeout) {
|
||||
Msg.hwnd = HWND_DESKTOP;
|
||||
Msg.message = MSG_TIMEOUT;
|
||||
Msg.wParam = (WPARAM)__mg_tick_counter;
|
||||
Msg.lParam = 0;
|
||||
Msg.time = __mg_tick_counter;
|
||||
// Since 5.0.0, we do not genenrate MSG_TIMEOUT message here.
|
||||
// Since 5.0.0, we do not genenrate MSG_TIMEOUT message any more.
|
||||
// kernel_QueueMessage (msg_queue, &Msg);
|
||||
|
||||
old_timer = __mg_tick_counter;
|
||||
@@ -508,7 +507,7 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
|
||||
/* go through registered listen fds */
|
||||
n += __mg_kernel_check_listen_fds (msg_queue, &rset, wsetptr, esetptr);
|
||||
|
||||
check_live (FALSE);
|
||||
check_live ();
|
||||
|
||||
if (n > 0) {
|
||||
old_timer = __mg_tick_counter;
|
||||
@@ -570,23 +569,12 @@ GHANDLE GUIAPI JoinLayer (const char* layer_name, const char* client_name,
|
||||
|
||||
__mg_layer = layer_handle;
|
||||
|
||||
zi = (ZORDERINFO*) shmat (joined_info.zi_shmid, 0, SHM_RDONLY);
|
||||
zi = (ZORDERINFO*) shmat (joined_info.zo_shmid, 0, SHM_RDONLY);
|
||||
if (zi == (void*)-1) {
|
||||
return INV_LAYER_HANDLE;
|
||||
}
|
||||
|
||||
__mg_zorder_info = zi;
|
||||
if (joined_info.zi_shmid == joined_info.def_zi_shmid) {
|
||||
__mg_def_zorder_info = zi;
|
||||
}
|
||||
else {
|
||||
zi = (ZORDERINFO*) shmat (joined_info.def_zi_shmid, 0, SHM_RDONLY);
|
||||
if (zi == (void*)-1) {
|
||||
return INV_LAYER_HANDLE;
|
||||
}
|
||||
|
||||
__mg_def_zorder_info = zi;
|
||||
}
|
||||
}
|
||||
|
||||
__mg_tick_counter = SHAREDRES_TIMER_COUNTER;
|
||||
@@ -723,39 +711,6 @@ BOOL __mg_client_on_layer_changed (GHANDLE layer_handle, int zi_shmid)
|
||||
|
||||
__mg_layer = layer_handle;
|
||||
__mg_zorder_info = zi;
|
||||
|
||||
#if 0 /* obsolete */
|
||||
ZORDERNODE* nodes;
|
||||
int slot;
|
||||
|
||||
nodes = GET_ZORDERNODE(zi);
|
||||
slot = zi->first_tooltip;
|
||||
for (; slot > 0; slot = nodes[slot].next) {
|
||||
if (nodes [slot].cli == __mg_client_id) {
|
||||
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
|
||||
assert (win);
|
||||
win->idx_znode = slot;
|
||||
}
|
||||
}
|
||||
|
||||
slot = zi->first_topmost;
|
||||
for (; slot > 0; slot = nodes[slot].next) {
|
||||
if (nodes [slot].cli == __mg_client_id) {
|
||||
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
|
||||
assert (win);
|
||||
win->idx_znode = slot;
|
||||
}
|
||||
}
|
||||
|
||||
slot = zi->first_normal;
|
||||
for (; slot > 0; slot = nodes[slot].next) {
|
||||
if (nodes [slot].cli == __mg_client_id) {
|
||||
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
|
||||
assert (win);
|
||||
win->idx_znode = slot;
|
||||
}
|
||||
}
|
||||
#endif /* obsolete */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
+46
-56
@@ -210,7 +210,6 @@ static void setup_dc (HWND hWnd, BIDISLEDITDATA *sled, HDC hdc, BOOL bSel)
|
||||
DWORD dwStyle = GetWindowStyle (hWnd);
|
||||
|
||||
if (!bSel) {
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
|
||||
if (dwStyle & WS_DISABLED)
|
||||
SetTextColor (hdc,
|
||||
@@ -584,7 +583,7 @@ static void slePaint (HWND hWnd, HDC hdc, PBIDISLEDITDATA sled)
|
||||
|
||||
/* draw selected chars */
|
||||
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;
|
||||
|
||||
@@ -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_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
|
||||
|
||||
/*0x60~0x6f*/
|
||||
BIDI_TYPE_ON, 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)
|
||||
{
|
||||
DEVFONT* devfont;
|
||||
int bidi_type = BIDI_TYPE_LTR;
|
||||
|
||||
if (IS_MBCHV(chv)) {
|
||||
devfont = logfont->devfonts[1];
|
||||
|
||||
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 {
|
||||
assert(chv < 0x80);
|
||||
bidi_type = ascii_bidi_type[chv];
|
||||
return 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,
|
||||
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;
|
||||
chv = GetACharValue (logfont, newtext, strlen(newtext), NULL, 0);
|
||||
|
||||
int type = CHAR_TYPE_UNKKOWN;
|
||||
|
||||
if (chv == INV_ACHAR_VALUE) {
|
||||
goto done;
|
||||
}
|
||||
if (chv == INV_ACHAR_VALUE)
|
||||
return -1;
|
||||
|
||||
bidi_type = get_char_bidi_type (logfont, chv);
|
||||
|
||||
if (BIDI_IS_STRONG(bidi_type)) {
|
||||
if (BIDI_IS_RTL(bidi_type)) {
|
||||
type = CHAR_TYPE_RTL;
|
||||
goto done;
|
||||
if (BIDI_IS_STRONG(bidi_type))
|
||||
{
|
||||
if (BIDI_IS_RTL(bidi_type))
|
||||
{
|
||||
return CHAR_TYPE_RTL;
|
||||
}
|
||||
else {
|
||||
type = CHAR_TYPE_LTR;
|
||||
goto done;
|
||||
else
|
||||
{
|
||||
return CHAR_TYPE_LTR;
|
||||
}
|
||||
}
|
||||
|
||||
if (BIDI_IS_NUMBER(bidi_type)) {
|
||||
type = CHAR_TYPE_LTR;
|
||||
goto done;
|
||||
if (BIDI_IS_NUMBER(bidi_type))
|
||||
{
|
||||
return CHAR_TYPE_LTR;
|
||||
}
|
||||
|
||||
if (l_char_type == r_char_type) {
|
||||
type = l_char_type;
|
||||
goto done;
|
||||
if (l_char_type == r_char_type)
|
||||
{
|
||||
return l_char_type;
|
||||
}
|
||||
/* no left char */
|
||||
else if (l_char_type == CHAR_TYPE_UNKKOWN) {
|
||||
else if (l_char_type == -1)
|
||||
{
|
||||
if (BIDI_IS_WEAK (bidi_type))
|
||||
type = r_char_type;
|
||||
return r_char_type;
|
||||
else
|
||||
type = line_type;
|
||||
goto done;
|
||||
return line_type;
|
||||
}
|
||||
/* no right char */
|
||||
else if (r_char_type == CHAR_TYPE_UNKKOWN) {
|
||||
else if (r_char_type == -1)
|
||||
{
|
||||
if (BIDI_IS_WEAK (bidi_type))
|
||||
type = l_char_type;
|
||||
return l_char_type;
|
||||
else
|
||||
type = line_type;
|
||||
goto done;
|
||||
return line_type;
|
||||
}
|
||||
else {
|
||||
type = line_type;
|
||||
else
|
||||
{
|
||||
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)
|
||||
@@ -2144,7 +2133,7 @@ esright_input_char_refresh (HWND hWnd,
|
||||
scroll_rc.right = cur_caret_x;
|
||||
|
||||
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
||||
UpdateInvalidClient(hWnd, TRUE);
|
||||
UpdateWindow(hWnd, FALSE);
|
||||
edtSetCaretPos (hWnd, sled);
|
||||
|
||||
sled->changed = TRUE;
|
||||
@@ -2515,6 +2504,8 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
unsigned char charBuffer [4];
|
||||
int chars;
|
||||
|
||||
_DBG_PRINTF("get char-----------------char----%p\n", (PVOID)wParam);
|
||||
|
||||
if (dwStyle & ES_READONLY)
|
||||
return 0;
|
||||
|
||||
@@ -2535,6 +2526,9 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
else {
|
||||
chars = 1;
|
||||
|
||||
if (charBuffer [0] == 127) // BS
|
||||
charBuffer [0] = '\b';
|
||||
|
||||
if (dwStyle & ES_UPPERCASE) {
|
||||
charBuffer [0] = toupper (charBuffer[0]);
|
||||
}
|
||||
@@ -2543,12 +2537,12 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
|
||||
if (chars > 1) {
|
||||
_WRN_PRINTF("BIDISLEDIT only support ISO8859-6 charset\n");
|
||||
return 0;
|
||||
if (chars == 1) {
|
||||
if (charBuffer [0] < 0x20 && charBuffer[0] != '\b') //FIXME
|
||||
return 0;
|
||||
}
|
||||
else if (charBuffer [0] == '\b' || charBuffer [0] == 0x7F) {
|
||||
// BS or DEL
|
||||
|
||||
if (wParam == '\b') { // backspace
|
||||
int del = 1;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
else if (charBuffer [0] < 0x20) {
|
||||
// ignore all other control characters.
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
else{
|
||||
if (dwStyle & ES_LEFT) {
|
||||
//if ((dwStyle&0xffff) == ES_LEFT) {
|
||||
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
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,
|
||||
* 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
|
||||
/*complete a click if the click if valid
|
||||
* (mouse lbutton up in button )*/
|
||||
if (old_pose == BST_PUSHED && new_pose != BST_DISABLE
|
||||
&& change_valid)
|
||||
@@ -320,6 +312,14 @@ static void change_status_from_pose (PCONTROL pctrl, int new_pose,
|
||||
|
||||
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:
|
||||
@@ -423,8 +423,8 @@ static void draw_bitmap_button (PCONTROL pctrl, HDC hdc, DWORD dwStyle,
|
||||
|
||||
GetClientRect ((HWND)pctrl, &prcClient);
|
||||
if (dwStyle & BS_REALSIZEIMAGE) {
|
||||
x += (int)(w - bmp->bmWidth) >> 1;
|
||||
y += (int)(h - bmp->bmHeight) >> 1;
|
||||
x += (w - bmp->bmWidth) >> 1;
|
||||
y += (h - bmp->bmHeight) >> 1;
|
||||
w = h = 0;
|
||||
|
||||
if (bmp->bmWidth > RECTW(prcClient)){
|
||||
@@ -847,6 +847,8 @@ static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
case BM_SETSTYLE:
|
||||
pctrl->dwStyle &= 0xFFFF0000;
|
||||
pctrl->dwStyle |= (DWORD)(wParam & 0x0000FFFF);
|
||||
@@ -1052,7 +1054,7 @@ static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
return DefaultControlProc (hWnd, uMsg, wParam, lParam);
|
||||
|
||||
@@ -63,17 +63,21 @@
|
||||
#include "ctrlmisc.h"
|
||||
|
||||
#define _ID_TIMER 100
|
||||
#define _MARGIN 10
|
||||
|
||||
static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static int iBorder;
|
||||
switch (message) {
|
||||
case MSG_CREATE:
|
||||
{
|
||||
const WINDOWINFO *info;
|
||||
int timeout = (int)GetWindowAdditionalData (hWnd);
|
||||
if (timeout >= 10)
|
||||
SetTimer (hWnd, _ID_TIMER, timeout / 10);
|
||||
|
||||
info = GetWindowInfo (hWnd);
|
||||
iBorder =
|
||||
info->we_rdr->calc_we_area (hWnd, LFRDR_METRICS_BORDER, NULL);
|
||||
SetWindowFont (hWnd,
|
||||
(PLOGFONT)GetWindowElementAttr(hWnd, WE_FONT_TOOLTIP));
|
||||
break;
|
||||
@@ -98,7 +102,7 @@ static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
|
||||
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixelEx(hWnd, hdc, WE_FGC_TOOLTIP));
|
||||
TabbedTextOut (hdc, _MARGIN, _MARGIN, text);
|
||||
TabbedTextOut (hdc, iBorder, iBorder, text);
|
||||
|
||||
EndPaint (hWnd, hdc);
|
||||
return 0;
|
||||
@@ -160,7 +164,6 @@ HWND CreateToolTipWin (HWND hParentWnd, int x, int y, int timeout_ms,
|
||||
|
||||
CreateInfo.dwStyle = WS_VISIBLE;
|
||||
CreateInfo.dwExStyle = WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_USEPARENTRDR;
|
||||
CreateInfo.dwExStyle |= WS_EX_WINTYPE_TOOLTIP | WS_EX_TROUNDCNS | WS_EX_BROUNDCNS;
|
||||
CreateInfo.spCaption = buf ? buf : text;
|
||||
CreateInfo.hMenu = 0;
|
||||
CreateInfo.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
@@ -168,8 +171,8 @@ HWND CreateToolTipWin (HWND hParentWnd, int x, int y, int timeout_ms,
|
||||
CreateInfo.MainWindowProc = ToolTipWinProc;
|
||||
CreateInfo.lx = x;
|
||||
CreateInfo.ty = y;
|
||||
CreateInfo.rx = CreateInfo.lx + text_size.cx + _MARGIN * 2;
|
||||
CreateInfo.by = CreateInfo.ty + text_size.cy + _MARGIN * 2;
|
||||
CreateInfo.rx = CreateInfo.lx + text_size.cx;
|
||||
CreateInfo.by = CreateInfo.ty + text_size.cy;
|
||||
CreateInfo.iBkColor =
|
||||
GetWindowElementPixelEx (hParentWnd, HDC_SCREEN, WE_BGC_TOOLTIP);
|
||||
CreateInfo.dwAddData = (DWORD) timeout_ms;
|
||||
@@ -215,8 +218,7 @@ void ResetToolTipWin (HWND hwnd, int x, int y, const char* text, ...)
|
||||
if (y + text_size.cy > g_rcScr.bottom)
|
||||
y = g_rcScr.bottom - text_size.cy;
|
||||
|
||||
MoveWindow (hwnd, x, y,
|
||||
text_size.cx + _MARGIN * 2, text_size.cy + _MARGIN * 2, TRUE);
|
||||
MoveWindow (hwnd, x, y, text_size.cx, text_size.cy, TRUE);
|
||||
ShowWindow (hwnd, SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
|
||||
+11
-8
@@ -1678,7 +1678,7 @@ esright_input_char_refresh (HWND hWnd,
|
||||
scroll_rc.right = cur_caret_x;
|
||||
|
||||
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
|
||||
UpdateInvalidClient(hWnd, TRUE);
|
||||
UpdateWindow(hWnd, FALSE);
|
||||
edtSetCaretPos (hWnd, sled);
|
||||
|
||||
sled->changed = TRUE;
|
||||
@@ -2143,6 +2143,9 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
else {
|
||||
chars = 1;
|
||||
|
||||
if (charBuffer [0] == 127) // BS
|
||||
charBuffer [0] = '\b';
|
||||
|
||||
if (dwStyle & ES_UPPERCASE) {
|
||||
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)) {
|
||||
// ASCII BS or DEL
|
||||
if (chars == 1) {
|
||||
if (charBuffer [0] < 0x20 && charBuffer[0] != '\b') //FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (charBuffer[0] == '\b') { //backspace
|
||||
int del;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
else if (chars == 1 && charBuffer [0] < 0x20) {
|
||||
// ignore all other ASCII control characters.
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
else{
|
||||
if (dwStyle & ES_LEFT) {
|
||||
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
|
||||
set_edit_caret_pos(hWnd, sled);
|
||||
|
||||
@@ -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);
|
||||
bChange = TRUE;
|
||||
}
|
||||
|
||||
if (bChange)
|
||||
UpdateInvalidClient(hWnd, FALSE);
|
||||
|
||||
return bChange;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* and Graphics User Interface (GUI) support system for embedded systems
|
||||
* 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
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
case MSG_DESTROY: {
|
||||
/* suppress a warning about calling free() before using the pointer */
|
||||
PSVDATA svdata = (PSVDATA) GetWindowAdditionalData2 (hWnd);
|
||||
if (svdata) {
|
||||
scrollview_destroy(svdata);
|
||||
free (svdata);
|
||||
}
|
||||
case MSG_DESTROY:
|
||||
scrollview_destroy (psvdata);
|
||||
free (psvdata);
|
||||
break;
|
||||
}
|
||||
|
||||
case MSG_GETDLGCODE:
|
||||
return DLGC_WANTARROWS;
|
||||
|
||||
@@ -2096,6 +2096,7 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
|
||||
rcInv.right = ptedata->svdata.scrdata.nContWidth;
|
||||
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
||||
REFRESH_NODE_EX(node, &rcInv);
|
||||
// UpdateWindow(hWnd, FALSE);
|
||||
|
||||
newlinenr = NODE_LINENR(node);
|
||||
rcInv.left = 0;
|
||||
@@ -2103,10 +2104,12 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
|
||||
rcInv.top += ptedata->nLineHeight;
|
||||
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
|
||||
REFRESH_NODE_EX(node, &rcInv);
|
||||
// UpdateWindow(hWnd, FALSE);
|
||||
}
|
||||
/* houhh 20090814, UpdataWindow will invalidate all edit area, but
|
||||
* erase area is not same with msg_paint area.*/
|
||||
UpdateInvalidClient(hWnd, TRUE);
|
||||
UpdateWindow(hWnd, FALSE);
|
||||
//SendMessage(hWnd, MSG_PAINT, 0, 0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* and Graphics User Interface (GUI) support system for embedded systems
|
||||
* 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
|
||||
*
|
||||
* 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;
|
||||
RECT rc;
|
||||
|
||||
if (tmpdata->Caption [0] == '\0')
|
||||
if (tmpdata->Caption == NULL || tmpdata->Caption [0] == '\0')
|
||||
break;
|
||||
|
||||
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;
|
||||
|
||||
GetClientRect(view->hCtrl, &r);
|
||||
GetClientRect (view->hCtrl, &r);
|
||||
|
||||
if (is_row) {
|
||||
r.top = from;
|
||||
ScrollWindow(view->hCtrl, 0, to, &r, NULL);
|
||||
ScrollWindow (view->hCtrl, 0, to, &r, NULL);
|
||||
}
|
||||
else {
|
||||
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 {{{
|
||||
|
||||
@@ -157,8 +157,6 @@ static int isInItem (MgList *mglst, int mouseX, int mouseY,
|
||||
|
||||
index = row * pivlist->nCol + col;
|
||||
pci = (IconviewItem *)mglist_getitem_byindex (mglst, index);
|
||||
if (pci == NULL)
|
||||
return -1;
|
||||
|
||||
if (pRet)
|
||||
*pRet = (MgItem*)pci;
|
||||
|
||||
+17
-10
@@ -93,15 +93,14 @@ BOOL RegisterTreeViewControl (void)
|
||||
const WINDOW_ELEMENT_RENDERER * rdr =
|
||||
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))) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(icon_unfold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name,
|
||||
SYSICON_UNFOLD, szValue)))) {
|
||||
if (!(icon_unfold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name, SYSICON_UNFOLD, szValue)))) {
|
||||
if (!(icon_unfold = LoadSystemIcon (SYSICON_UNFOLD, 0))) {
|
||||
DestroyIcon (icon_fold);
|
||||
icon_fold = 0;
|
||||
@@ -181,7 +180,6 @@ static BOOL tvInitTVData (HWND hwnd, PTVDATA pData, DWORD dwStyle, PTVITEMINFO r
|
||||
tvRoot->hIconFold = root_ii->hIconFold;
|
||||
else
|
||||
tvRoot->hIconFold = ICON_FOLD;
|
||||
|
||||
if (root_ii && root_ii->hIconUnfold)
|
||||
tvRoot->hIconUnfold = root_ii->hIconUnfold;
|
||||
else
|
||||
@@ -634,13 +632,22 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX, int cent
|
||||
centerX += (h>>1) + TV_BOXGAP;
|
||||
|
||||
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)) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
+14
-11
@@ -461,8 +461,9 @@ static int iso8859_6_len_first_char (const unsigned char* mstr, int len)
|
||||
return 2;
|
||||
else if (ignore == 2)
|
||||
return 3;
|
||||
else
|
||||
return 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define ISARABIC_LIG_HALF(s) ((s == 0xa5) || (s == 0xa6))
|
||||
@@ -471,7 +472,6 @@ static unsigned int iso8859_6_char_type (Achar32 chv)
|
||||
{
|
||||
unsigned int ch_type = ACHAR_BASIC_UNKNOWN;
|
||||
|
||||
chv = REAL_ACHAR(chv);
|
||||
if (is_arabic_char_vowel (chv)) { /* is vowel */
|
||||
ch_type = ACHAR_BASIC_VOWEL;
|
||||
}
|
||||
@@ -483,6 +483,7 @@ static unsigned int iso8859_6_char_type (Achar32 chv)
|
||||
}
|
||||
|
||||
static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
||||
#if 0
|
||||
/*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,
|
||||
@@ -530,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_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
||||
#endif
|
||||
|
||||
/*0x80~0x8f*/
|
||||
BIDI_TYPE_ON, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
|
||||
@@ -604,9 +606,10 @@ static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
|
||||
static BidiType iso8859_6_bidi_char_type (Achar32 chv)
|
||||
{
|
||||
chv = REAL_ACHAR(chv);
|
||||
assert(chv < TABLESIZE(__mg_iso8859_6_bidi_char_type_map));
|
||||
|
||||
return (BidiType)__mg_iso8859_6_bidi_char_type_map[chv];
|
||||
if (chv > 0x7F)
|
||||
return (BidiType)__mg_iso8859_6_bidi_char_type_map[chv - 0x80];
|
||||
else
|
||||
return (BidiType)__mg_iso8859_1_bidi_char_type_map[chv];
|
||||
}
|
||||
|
||||
static int get_table_index(Uint8 c)
|
||||
@@ -793,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,
|
||||
int cur_len, int shape_type)
|
||||
{
|
||||
Achar32 chv = INV_ACHAR_VALUE;
|
||||
Achar32 chv = -1;
|
||||
int ignore;
|
||||
int index;
|
||||
|
||||
@@ -808,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)){
|
||||
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);
|
||||
if (index >=0 ) {
|
||||
if (index >=0)
|
||||
{
|
||||
switch (shape_type) {
|
||||
case ACHAR_ISOLATED:
|
||||
chv = shape_info[index].isolated;
|
||||
@@ -837,7 +841,7 @@ static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
|
||||
}
|
||||
|
||||
if (chv == 0)
|
||||
chv = INV_ACHAR_VALUE;
|
||||
chv =-1;
|
||||
|
||||
return chv;
|
||||
}
|
||||
@@ -858,7 +862,6 @@ static const BIDICHAR_MIRROR_MAP __mg_iso8859_68x_mirror_table [] =
|
||||
|
||||
static BOOL iso8859_6_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
|
||||
{
|
||||
chv = REAL_ACHAR(chv);
|
||||
return get_mirror_char (__mg_iso8859_68x_mirror_table,
|
||||
TABLESIZE (__mg_iso8859_68x_mirror_table), chv, mirrored);
|
||||
}
|
||||
|
||||
+6
-5
@@ -49,8 +49,6 @@
|
||||
** Create date: 2000/06/13
|
||||
*/
|
||||
|
||||
#undef NDEBUG
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -971,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[] = {
|
||||
#if 0
|
||||
/*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,
|
||||
@@ -1018,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_ON,
|
||||
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
|
||||
#endif
|
||||
|
||||
/*0x80~0x8f*/
|
||||
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
|
||||
@@ -1072,9 +1072,10 @@ static BidiType __mg_iso8859_8_bidi_char_type_map[] = {
|
||||
static BidiType iso8859_8_bidi_char_type (Achar32 chv)
|
||||
{
|
||||
chv = REAL_ACHAR(chv);
|
||||
assert(chv < TABLESIZE(__mg_iso8859_8_bidi_char_type_map));
|
||||
|
||||
return (BidiType)__mg_iso8859_8_bidi_char_type_map[chv];
|
||||
if (chv > 0x7F)
|
||||
return (BidiType)__mg_iso8859_8_bidi_char_type_map[chv - 0x80];
|
||||
else
|
||||
return (BidiType)__mg_iso8859_1_bidi_char_type_map[chv];
|
||||
}
|
||||
|
||||
static const BIDICHAR_MIRROR_MAP __mg_iso8859_8_mirror_table [] =
|
||||
|
||||
@@ -735,9 +735,9 @@ get_glyph_advance (LOGFONT* logfont, DEVFONT* devfont,
|
||||
pcache->valid_advance = 1;
|
||||
}
|
||||
}
|
||||
done:
|
||||
#endif
|
||||
|
||||
done:
|
||||
FT_UNLOCK(&ft_lock);
|
||||
|
||||
if (px) {
|
||||
|
||||
@@ -88,6 +88,7 @@ typedef int (* MakeHashKeyFunc)(Glyph32 gv);
|
||||
typedef struct tagFTFACEINFO {
|
||||
char* filepathname;
|
||||
FT_Face face;
|
||||
BOOL valid;
|
||||
#ifdef _MGFONT_TTF_CACHE
|
||||
int face_index;
|
||||
int cmap_index;
|
||||
@@ -162,13 +163,13 @@ extern void __mg_ttc_sys_deinit(void);
|
||||
extern TTFCACHEINFO *__mg_ttc_search(HCACHE hCache, Glyph32 gv, int *size);
|
||||
extern void __mg_ttc_refer(HCACHE hCache);
|
||||
|
||||
#endif /* _MGFONT_TTF_CACHE */
|
||||
|
||||
#ifdef _MGCOMPLEX_SCRIPTS
|
||||
extern void __mg_init_harzbuff_funcs(void);
|
||||
extern void __mg_term_harzbuff_funcs(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
+7
-14
@@ -703,20 +703,21 @@ void __mg_legacy_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
|
||||
print_hexstr(achars, len, TRUE);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void bidi_map_reverse (void* context, int len, int pos)
|
||||
{
|
||||
ACHARMAPINFO* str = (ACHARMAPINFO*)context + pos;
|
||||
GLYPHMAPINFO* str = (GLYPHMAPINFO*)context + pos;
|
||||
int i;
|
||||
for (i = 0; i < len / 2; i++)
|
||||
{
|
||||
ACHARMAPINFO tmp = str[i];
|
||||
GLYPHMAPINFO tmp = str[i];
|
||||
str[i] = str[len - 1 - i];
|
||||
str[len - 1 - i] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
TYPERUN *type_rl_list = NULL;
|
||||
@@ -724,7 +725,6 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
||||
int i;
|
||||
int run_pos;
|
||||
int run_len;
|
||||
REORDER_CONTEXT rc;
|
||||
|
||||
print_hexstr(achars, len, FALSE);
|
||||
|
||||
@@ -741,10 +741,8 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
||||
}
|
||||
}
|
||||
|
||||
rc.achars = NULL;
|
||||
rc.extra = map;
|
||||
rc.cb = bidi_map_reverse;
|
||||
bidi_reorder(&rc, len, &type_rl_list, max_level);
|
||||
bidi_reorder_cb(map, len, &type_rl_list, max_level,
|
||||
bidi_map_reverse);
|
||||
|
||||
/* free typerun list.*/
|
||||
free_typerun_list(type_rl_list);
|
||||
@@ -754,23 +752,18 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
||||
return achars;
|
||||
}
|
||||
|
||||
#if 0
|
||||
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
|
||||
Achar32* achars, int len, int* index_map, int pel)
|
||||
{
|
||||
BYTE max_level = 1;
|
||||
TYPERUN *type_rl_list = NULL;
|
||||
REORDER_CONTEXT rc;
|
||||
|
||||
print_hexstr(achars, len, FALSE);
|
||||
|
||||
/* W1~W7, N1~N2, I1~I2, Get the Embedding Level. */
|
||||
bidi_resolve_string (charset_ops, achars, len, pel, &type_rl_list, &max_level);
|
||||
|
||||
rc.achars = achars;
|
||||
rc.extra = extra;
|
||||
rc.cb = cb_reverse_extra;
|
||||
bidi_reorder(index_map, len, &type_rl_list, max_level,
|
||||
bidi_reorder_cb(index_map, len, &type_rl_list, max_level,
|
||||
bidi_string_reverse);
|
||||
|
||||
/* free typerun list.*/
|
||||
|
||||
+1
-4
@@ -155,10 +155,7 @@ BOOL mg_InitSysFont (void)
|
||||
goto error_load;
|
||||
}
|
||||
|
||||
/* VW 20221003: use CreateLogFontEx instead of CreateLogFont to
|
||||
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,
|
||||
if ((sys_fonts[i] = CreateLogFont (type, family, charset,
|
||||
style [0], style [1], style [2],
|
||||
style [3], style [4], style [5],
|
||||
height, 0)) == NULL) {
|
||||
|
||||
@@ -377,8 +377,8 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
||||
uc == 0x8E2 || uc == 0xD4E || uc == 0x110BD ||
|
||||
(uc >= 0x111C2 && uc <= 0x111C3)) {
|
||||
gbt = GB_Prepend;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case UCHAR_CATEGORY_CONTROL:
|
||||
case UCHAR_CATEGORY_LINE_SEPARATOR:
|
||||
@@ -393,8 +393,8 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
||||
if ((uc >= 0xFFF0 && uc <= 0xFFF8) ||
|
||||
(uc >= 0xE0000 && uc <= 0xE0FFF)) {
|
||||
gbt = GB_ControlCRLF;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case UCHAR_CATEGORY_OTHER_LETTER:
|
||||
if (ctxt->makes_hangul_syllable)
|
||||
@@ -434,6 +434,7 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
|
||||
gbt = GB_RI_Odd;
|
||||
else
|
||||
gbt = GB_RI_Odd;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#include "cliprect.h"
|
||||
#include "gal.h"
|
||||
#include "internals.h"
|
||||
#include "blockheap.h"
|
||||
#include "accelkey.h"
|
||||
|
||||
static BLOCKHEAP ACHeap;
|
||||
|
||||
+18
-59
@@ -59,22 +59,17 @@
|
||||
#include "cliprect.h"
|
||||
#include "gal.h"
|
||||
#include "internals.h"
|
||||
#include "dc.h"
|
||||
|
||||
BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
|
||||
{
|
||||
PMAINWIN pWin;
|
||||
|
||||
pWin = (PMAINWIN)hWnd;
|
||||
|
||||
if (!pWin->pCaretInfo) {
|
||||
HDC hdc;
|
||||
|
||||
if (!(pWin->pCaretInfo = malloc (sizeof (CARETINFO))))
|
||||
return FALSE;
|
||||
|
||||
/* Since 5.0.11: use client DC of the window instead of screen DC */
|
||||
hdc = GetClientDC(hWnd);
|
||||
|
||||
pWin->pCaretInfo->pBitmap = pBitmap;
|
||||
if (pBitmap) {
|
||||
nWidth = pBitmap->bmWidth;
|
||||
@@ -83,22 +78,18 @@ BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
|
||||
pWin->pCaretInfo->nWidth = nWidth;
|
||||
pWin->pCaretInfo->nHeight = nHeight;
|
||||
pWin->pCaretInfo->caret_bmp.bmType = BMP_TYPE_NORMAL;
|
||||
pWin->pCaretInfo->caret_bmp.bmBitsPerPixel =
|
||||
GetGDCapability(hdc, GDCAP_BITSPP);
|
||||
pWin->pCaretInfo->caret_bmp.bmBytesPerPixel =
|
||||
GetGDCapability(hdc, GDCAP_BPP);
|
||||
pWin->pCaretInfo->caret_bmp.bmBitsPerPixel = BITSPERPHYPIXEL;
|
||||
pWin->pCaretInfo->caret_bmp.bmBytesPerPixel = BYTESPERPHYPIXEL;
|
||||
pWin->pCaretInfo->caret_bmp.bmWidth = nWidth;
|
||||
pWin->pCaretInfo->caret_bmp.bmHeight = nHeight;
|
||||
pWin->pCaretInfo->caret_bmp.bmAlphaMask = NULL;
|
||||
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);
|
||||
pWin->pCaretInfo->pNormal = malloc (pWin->pCaretInfo->nBytesNr);
|
||||
pWin->pCaretInfo->pXored = malloc (pWin->pCaretInfo->nBytesNr);
|
||||
|
||||
ReleaseDC(hdc);
|
||||
|
||||
if (pWin->pCaretInfo->pNormal == NULL ||
|
||||
pWin->pCaretInfo->pXored == NULL) {
|
||||
free (pWin->pCaretInfo);
|
||||
@@ -228,8 +219,8 @@ void GetCaretBitmaps (PCARETINFO pCaretInfo)
|
||||
int i;
|
||||
int sx, sy;
|
||||
HDC hdc;
|
||||
Uint32 amask;
|
||||
|
||||
// convert to screen coordinates
|
||||
sx = pCaretInfo->x;
|
||||
sy = pCaretInfo->y;
|
||||
|
||||
@@ -240,68 +231,36 @@ void GetCaretBitmaps (PCARETINFO pCaretInfo)
|
||||
pCaretInfo->caret_bmp.bmWidth,
|
||||
pCaretInfo->caret_bmp.bmHeight,
|
||||
&pCaretInfo->caret_bmp);
|
||||
amask = GetGDCapability(hdc, GDCAP_AMASK);
|
||||
ReleaseDC (hdc);
|
||||
|
||||
// generate XOR bitmap.
|
||||
if (amask == 0) {
|
||||
if (pCaretInfo->pBitmap) {
|
||||
BYTE* normal;
|
||||
BYTE* bitmap;
|
||||
BYTE* xored;
|
||||
|
||||
normal = pCaretInfo->pNormal;
|
||||
bitmap = pCaretInfo->pBitmap->bmBits;
|
||||
xored = pCaretInfo->pXored;
|
||||
|
||||
if (pCaretInfo->pBitmap) {
|
||||
bitmap = pCaretInfo->pBitmap->bmBits;
|
||||
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;
|
||||
}
|
||||
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
||||
xored[i] = normal[i] ^ bitmap[i];
|
||||
}
|
||||
else {
|
||||
// Since 5.0.11: restore the alpha component if having alpha component.
|
||||
int x, y;
|
||||
BYTE* normal;
|
||||
BYTE* xored;
|
||||
BYTE* bitmap = NULL;
|
||||
gal_pixel pix_normal, pix_bitmap, pix_xored, bits_alpha;
|
||||
BYTE xor_byte;
|
||||
|
||||
for (y = 0; y < pCaretInfo->caret_bmp.bmHeight; y++) {
|
||||
normal = pCaretInfo->pNormal + pCaretInfo->caret_bmp.bmPitch * y;
|
||||
xored = pCaretInfo->pXored + pCaretInfo->caret_bmp.bmPitch * y;
|
||||
if (pCaretInfo->pBitmap)
|
||||
bitmap = pCaretInfo->pBitmap->bmBits +
|
||||
pCaretInfo->caret_bmp.bmPitch * y;
|
||||
if (BITSPERPHYPIXEL < 8)
|
||||
xor_byte = 0x0F;
|
||||
else
|
||||
xor_byte = 0xFF;
|
||||
|
||||
for (x = 0; x < pCaretInfo->caret_bmp.bmWidth; x++) {
|
||||
normal = pCaretInfo->pNormal;
|
||||
xored = pCaretInfo->pXored;
|
||||
|
||||
pix_normal = _mem_get_pixel(normal,
|
||||
pCaretInfo->caret_bmp.bmBytesPerPixel);
|
||||
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;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < pCaretInfo->nBytesNr; i++)
|
||||
xored[i] = normal[i] ^ xor_byte;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* and Graphics User Interface (GUI) support system for embedded systems
|
||||
* 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
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -803,7 +803,7 @@ BOOL GUIAPI InitWindowElementAttrs (PWERENDERER rdr)
|
||||
char buff [20];
|
||||
DWORD rgba;
|
||||
|
||||
if (!rdr || rdr->name[0] == '\0')
|
||||
if (!rdr || !rdr->name || rdr->name[0] == '\0')
|
||||
return FALSE;
|
||||
|
||||
_DBG_PRINTF ("GUI>InitWEA: Initialize %s renderer window element attributes.\n",
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
#include "cliprect.h"
|
||||
#include "gal.h"
|
||||
#include "internals.h"
|
||||
#include "blockheap.h"
|
||||
#include "menu.h"
|
||||
|
||||
#define SHORTEN 0
|
||||
|
||||
+56
-107
@@ -75,6 +75,9 @@
|
||||
#ifdef _MG_ENABLE_LICENSE
|
||||
# include "../sysres/license/c_files/04_progressbar-bk.dat.c"
|
||||
#endif
|
||||
#ifndef __TARGET_UNKNOWN__
|
||||
unsigned int g_license_processor_id;
|
||||
#endif
|
||||
|
||||
#ifdef _MGHAVE_MENU
|
||||
/* function defined in menu module. */
|
||||
@@ -93,8 +96,9 @@ void GUIAPI SetAutoRepeatMessage (HWND hWnd, UINT uMsg,
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
if (hWnd && !MG_IS_NORMAL_WINDOW(hWnd)) {
|
||||
return;
|
||||
if (hWnd) {
|
||||
if (!MG_IS_NORMAL_WINDOW(hWnd))
|
||||
return;
|
||||
}
|
||||
|
||||
msg.hwnd = hWnd;
|
||||
@@ -137,7 +141,7 @@ static void RecalcClientArea (HWND hWnd)
|
||||
|
||||
if (pWin->secondaryDC == HDC_INVALID) {
|
||||
/* remove the flag of WS_EX_AUTOSECONDARYDC */
|
||||
pWin->dwExStyle &= ~WS_EX_AUTOSECONDARYDC;
|
||||
pWin->dwExStyle = pWin->dwExStyle | WS_EX_AUTOSECONDARYDC;
|
||||
pWin->secondaryDC = 0;
|
||||
}
|
||||
|
||||
@@ -364,6 +368,11 @@ HWND GUIAPI ChildWindowFromPointEx (HWND hParent, POINT pt, UINT uFlags)
|
||||
return pRet;
|
||||
}
|
||||
|
||||
/* NOTE:
|
||||
** this function is CONTROL mouse messages handler,
|
||||
** can automaticly capture mouse depend on HITTEST code.
|
||||
*/
|
||||
|
||||
static PCONTROL __mgs_captured_ctrl = NULL;
|
||||
|
||||
void __mg_reset_mainwin_capture_info (PCONTROL ctrl)
|
||||
@@ -382,11 +391,6 @@ void __mg_reset_mainwin_capture_info (PCONTROL ctrl)
|
||||
}
|
||||
}
|
||||
|
||||
/* NOTE:
|
||||
** this function is CONTROL mouse messages handler,
|
||||
** can automaticly capture mouse depend on HITTEST code.
|
||||
*/
|
||||
|
||||
static LRESULT DefaultDTMouseMsgHandler (PMAINWIN pWin, UINT message,
|
||||
WPARAM flags, int x, int y)
|
||||
{
|
||||
@@ -2224,13 +2228,6 @@ static LRESULT DefaultPostMsgHandler(PMAINWIN pWin, UINT message,
|
||||
OnQueryClientArea(pWin, (PRECT)lParam);
|
||||
break;
|
||||
|
||||
case MSG_ACTIVE:
|
||||
if (wParam)
|
||||
pWin->dwExStyle |= WS_EX_ACTIVATED;
|
||||
else
|
||||
pWin->dwExStyle &= ~WS_EX_ACTIVATED;
|
||||
break;
|
||||
|
||||
case MSG_SETFOCUS:
|
||||
case MSG_KILLFOCUS:
|
||||
if (pWin->hActiveChild && !lParam)
|
||||
@@ -2404,9 +2401,8 @@ static void wndDrawNCFrame(MAINWIN* pWin, HDC hdc, const RECT* prcInvalid)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (fGetDC) {
|
||||
if (fGetDC)
|
||||
release_effective_dc (pWin, hdc);
|
||||
}
|
||||
}
|
||||
|
||||
/* this function is CONTROL safe. */
|
||||
@@ -2603,44 +2599,23 @@ static LRESULT DefaultSessionMsgHandler(PMAINWIN pWin, UINT message,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static HWND get_active_descendant(PMAINWIN pWin)
|
||||
{
|
||||
HWND hwnd = (HWND)pWin;
|
||||
HWND active;
|
||||
|
||||
while ((active = )) {
|
||||
hwnd = active;
|
||||
}
|
||||
|
||||
if (hwnd == (HWND)pWin)
|
||||
return HWND_NULL;
|
||||
|
||||
return hwnd;
|
||||
}
|
||||
#endif
|
||||
|
||||
static LRESULT DefaultSystemMsgHandler(PMAINWIN pWin, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
/*
|
||||
** Should handle following messages:
|
||||
**
|
||||
** MSG_IDLE, MSG_CARETBLINK:
|
||||
*/
|
||||
if (message == MSG_IDLE) {
|
||||
/* Since 5.0.10, MSG_IDLE will also be relayed to
|
||||
the active child control if the main window is active currently */
|
||||
if (pWin->dwExStyle & WS_EX_ACTIVATED) {
|
||||
HWND active = GetFocusChild((HWND)pWin);
|
||||
if (active) {
|
||||
static DWORD last_tick_count;
|
||||
if (wParam >= last_tick_count + 50) { /* 0.5s */
|
||||
PostMessage(active, MSG_IDLE, wParam, lParam);
|
||||
last_tick_count = wParam;
|
||||
}
|
||||
}
|
||||
#if 0 /* deprecated code */
|
||||
if (pWin == checkAndGetMainWinIfWindow (sg_repeat_msg.hwnd)) {
|
||||
SendNotifyMessage (sg_repeat_msg.hwnd,
|
||||
sg_repeat_msg.message,
|
||||
sg_repeat_msg.wParam, sg_repeat_msg.lParam);
|
||||
}
|
||||
#endif /* deprecated code */
|
||||
}
|
||||
else if (message == MSG_CARETBLINK && pWin->dwStyle & WS_VISIBLE) {
|
||||
BlinkCaret ((HWND)pWin);
|
||||
@@ -2700,32 +2675,18 @@ LRESULT PreDefMainWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
|
||||
|
||||
LRESULT PreDefControlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
case MSG_SETTEXT:
|
||||
if (message == MSG_SETTEXT)
|
||||
return 0;
|
||||
|
||||
case MSG_IDLE:
|
||||
{
|
||||
HWND active = GetFocusChild(hWnd);
|
||||
if (active) {
|
||||
PostMessage(active, MSG_IDLE, wParam, lParam);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
case MSG_SETCURSOR:
|
||||
else if (message == MSG_SETCURSOR) {
|
||||
if (GetWindowExStyle (hWnd) & WS_EX_USEPARENTCURSOR)
|
||||
return 0;
|
||||
|
||||
SetCursor (GetWindowCursor (hWnd));
|
||||
return 0;
|
||||
|
||||
case MSG_NCSETCURSOR:
|
||||
}
|
||||
else if (message == MSG_NCSETCURSOR) {
|
||||
SetCursor (GetSystemCursor (IDC_ARROW));
|
||||
return 0;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return DefaultMainWinProc (hWnd, message, wParam, lParam);
|
||||
@@ -3033,7 +2994,6 @@ HWND GUIAPI GetFirstHosted (HWND hWnd)
|
||||
PMAINWIN pMainWin;
|
||||
|
||||
if ((pMainWin = getMainWinIfWindowInThisThread (hWnd)) == NULL) {
|
||||
_WRN_PRINTF("hWnd (%p) is not in the current thread\n", hWnd);
|
||||
return HWND_INVALID;
|
||||
}
|
||||
|
||||
@@ -3047,7 +3007,6 @@ HWND GUIAPI GetNextHosted (HWND hHosting, HWND hHosted)
|
||||
PMAINWIN pHosted;
|
||||
|
||||
if ((pHosting = getMainWinIfWindowInThisThread (hHosting)) == NULL) {
|
||||
_WRN_PRINTF("hHosing (%p) is not in the current thread\n", hHosting);
|
||||
return HWND_INVALID;
|
||||
}
|
||||
|
||||
@@ -3056,13 +3015,10 @@ HWND GUIAPI GetNextHosted (HWND hHosting, HWND hHosted)
|
||||
}
|
||||
|
||||
if ((pHosted = getMainWinIfWindowInThisThread (hHosted)) == NULL) {
|
||||
_WRN_PRINTF("hHosted (%p) is not in the current thread\n", hHosted);
|
||||
return HWND_INVALID;
|
||||
}
|
||||
|
||||
if (MG_UNLIKELY (pHosted->pHosting != pHosting)) {
|
||||
_ERR_PRINTF("Bad hosting relationship between hosting(%p) and hosted(%p)\n",
|
||||
pHosting, pHosted);
|
||||
return HWND_INVALID;
|
||||
}
|
||||
|
||||
@@ -3083,6 +3039,11 @@ static PMAINWIN search_win_tree_dfs (struct _search_context *ctxt)
|
||||
while (hosted) {
|
||||
PMAINWIN found;
|
||||
|
||||
ctxt->hosting = hosted;
|
||||
if ((found = search_win_tree_dfs (ctxt))) {
|
||||
return found;
|
||||
}
|
||||
|
||||
if (hosted->id == ctxt->id &&
|
||||
(((ctxt->flags & WIN_SEARCH_FILTER_MAIN) &&
|
||||
hosted->WinType == TYPE_MAINWIN) ||
|
||||
@@ -3091,11 +3052,6 @@ static PMAINWIN search_win_tree_dfs (struct _search_context *ctxt)
|
||||
return hosted;
|
||||
}
|
||||
|
||||
ctxt->hosting = hosted;
|
||||
if ((found = search_win_tree_dfs (ctxt))) {
|
||||
return found;
|
||||
}
|
||||
|
||||
hosted = GetNextHosted (hosting, hosted);
|
||||
}
|
||||
|
||||
@@ -3118,14 +3074,12 @@ static PMAINWIN search_win_tree_bfs (struct _search_context *ctxt)
|
||||
return hosted;
|
||||
}
|
||||
|
||||
if ((ctxt->hosting = GetNextHosted (hosting, hosted))) {
|
||||
if ((found = search_win_tree_bfs (ctxt))) {
|
||||
return found;
|
||||
}
|
||||
ctxt->hosting = hosted;
|
||||
if ((found = search_win_tree_bfs (ctxt))) {
|
||||
return found;
|
||||
}
|
||||
|
||||
hosting = hosted;
|
||||
hosted = GetFirstHosted (hosted);
|
||||
hosted = GetNextHosted (hosting, hosted);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -3211,8 +3165,8 @@ HWND GUIAPI GetNextChild (HWND hWnd, HWND hChild)
|
||||
|
||||
HWND GUIAPI GetNextMainWindow (HWND hMainWnd)
|
||||
{
|
||||
MG_CHECK_RET (hMainWnd == HWND_NULL ||
|
||||
MG_IS_NORMAL_MAIN_WINDOW (hMainWnd), HWND_INVALID);
|
||||
MG_CHECK_RET (hMainWnd != HWND_NULL &&
|
||||
!MG_IS_NORMAL_MAIN_WINDOW (hMainWnd), HWND_INVALID);
|
||||
|
||||
return (HWND)SendMessage (HWND_DESKTOP,
|
||||
MSG_GETNEXTMAINWIN, (WPARAM)hMainWnd, 0L);
|
||||
@@ -3244,7 +3198,7 @@ int GUIAPI ScrollWindowEx (HWND hWnd, int dx, int dy,
|
||||
rcScroll = rcClient;
|
||||
|
||||
/*
|
||||
* BUGFIX: if we scrolled all area, the whole area must
|
||||
* BUGFIX: if we scrolled all area, the all area must
|
||||
* be set as invalidate (dongjunjie 2010/7/28)
|
||||
*/
|
||||
if ((dx != 0 && abs(dx) >= RECTW(rcScroll)) ||
|
||||
@@ -3751,8 +3705,6 @@ BOOL GUIAPI ShowScrollBar (HWND hWnd, int iSBar, BOOL bShow)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
/* moved here from desktop.c; can be used on virtual window */
|
||||
static void guiAddNewHostedMainWindow (PMAINWIN pHosting, PMAINWIN pHosted)
|
||||
{
|
||||
@@ -3804,7 +3756,6 @@ static void guiRemoveHostedMainWindow (PMAINWIN pHosting, PMAINWIN pHosted)
|
||||
}
|
||||
#endif /* debug code */
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/************************* Support for virtual window ************************/
|
||||
#ifdef _MGHAVE_VIRTUAL_WINDOW
|
||||
@@ -3825,32 +3776,29 @@ static void* _message_thread_entry (void* arg)
|
||||
goto failed;
|
||||
|
||||
/* create message queue for this thread */
|
||||
if (!(entry_args.msg_queue = mg_AllocMsgQueueForThisThread (FALSE)))
|
||||
if (!(entry_args.msg_queue = mg_AllocMsgQueueForThisThread ()))
|
||||
goto failed;
|
||||
|
||||
orig_args->msg_queue = entry_args.msg_queue;
|
||||
sem_post (entry_args.wait);
|
||||
|
||||
/* register the message queue */
|
||||
SendMessage (HWND_DESKTOP, MSG_MANAGE_MSGTHREAD,
|
||||
MSGTHREAD_SIGNIN, (LPARAM)&entry_args.msg_queue);
|
||||
|
||||
if (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL))
|
||||
goto cancelled;
|
||||
goto failed;
|
||||
|
||||
/* call start routine of app */
|
||||
entry_args.start_routine (entry_args.arg);
|
||||
|
||||
/* unregister the message queue */
|
||||
SendMessage (HWND_DESKTOP, MSG_MANAGE_MSGTHREAD,
|
||||
MSGTHREAD_SIGNOUT, (LPARAM)&entry_args.msg_queue);
|
||||
mg_FreeMsgQueueForThisThread (FALSE);
|
||||
mg_FreeMsgQueueForThisThread ();
|
||||
|
||||
return NULL;
|
||||
|
||||
failed:
|
||||
sem_post (entry_args.wait);
|
||||
cancelled:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -3955,7 +3903,9 @@ HWND GUIAPI CreateVirtualWindow (HWND hHosting, WNDPROC WndProc,
|
||||
if (pMsgQueue != getMsgQueueIfWindowInThisThread (hHosting)) {
|
||||
goto err;
|
||||
}
|
||||
pVirtWin->pHosting = (PVIRTWIN)hHosting;
|
||||
else {
|
||||
pVirtWin->pHosting = (PVIRTWIN)hHosting;
|
||||
}
|
||||
}
|
||||
|
||||
if (SendMessage ((HWND)pVirtWin, MSG_CREATE,
|
||||
@@ -4258,9 +4208,11 @@ HWND GUIAPI CreateMainWindowEx2 (PMAINWINCREATE pCreateInfo, LINT id,
|
||||
if (pWin->pMsgQueue != getMsgQueue (pCreateInfo->hHosting)) {
|
||||
goto err;
|
||||
}
|
||||
pWin->pHosting = getMainWindowPtr (pCreateInfo->hHosting);
|
||||
}
|
||||
|
||||
if (pWin->pHosting == NULL)
|
||||
pWin->pHosting = getMainWindowPtr (pCreateInfo->hHosting);
|
||||
|
||||
#else /* defined _MGRM_THREADS */
|
||||
|
||||
/* You must create main window in the main thread for non-threads modes */
|
||||
@@ -4543,7 +4495,7 @@ BOOL GUIAPI DestroyMainWindow (HWND hWnd)
|
||||
}
|
||||
else
|
||||
#endif /* defined _MGHAVE_VIRTUAL_WINDOW */
|
||||
if (hosted->dwExStyle & WS_EX_DIALOGBOX) {
|
||||
if (pWin->dwExStyle & WS_EX_DIALOGBOX) {
|
||||
if (!EndDialog ((HWND)hosted, IDCANCEL))
|
||||
return FALSE;
|
||||
}
|
||||
@@ -4578,6 +4530,11 @@ BOOL GUIAPI DestroyMainWindow (HWND hWnd)
|
||||
|
||||
SendMessage (HWND_DESKTOP, MSG_REMOVEMAINWIN, (WPARAM)hWnd, 0);
|
||||
|
||||
#if 0 /* deprecated code */
|
||||
if (sg_repeat_msg.hwnd == hWnd)
|
||||
sg_repeat_msg.hwnd = 0;
|
||||
#endif /* deprecated code */
|
||||
|
||||
/* make the window to be invalid for PeekMessageEx, PostMessage etc */
|
||||
pWin->DataType = TYPE_WINTODEL;
|
||||
|
||||
@@ -6129,6 +6086,11 @@ BOOL GUIAPI DestroyWindow (HWND hWnd)
|
||||
pCtrl->privCDC = 0;
|
||||
}
|
||||
|
||||
#if 0 /* deprecated code */
|
||||
if (sg_repeat_msg.hwnd == hWnd)
|
||||
sg_repeat_msg.hwnd = 0;
|
||||
#endif /* deprecated code */
|
||||
|
||||
ThrowAwayMessages (hWnd);
|
||||
|
||||
if (pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN) {
|
||||
@@ -7064,19 +7026,6 @@ BOOL GUIAPI SetMainWindowAlwaysTop (HWND hMainWnd, BOOL fSet)
|
||||
MSG_SETALWAYSTOP, (WPARAM)pMainWin, (LPARAM)fSet);
|
||||
}
|
||||
|
||||
/* Since 5.0.6 */
|
||||
BOOL GUIAPI SetMainWindowGestureFlags (HWND hMainWnd, DWORD dwFlags)
|
||||
{
|
||||
PMAINWIN pMainWin;
|
||||
|
||||
if (!(pMainWin = checkAndGetMainWinIfMainWin (hMainWnd))) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return (BOOL)SendMessage (HWND_DESKTOP,
|
||||
MSG_SETGESTUREFLAGS, (WPARAM)pMainWin, (LPARAM)dwFlags);
|
||||
}
|
||||
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
BOOL GUIAPI SetMainWindowCompositing (HWND hMainWnd, int type, DWORD arg)
|
||||
{
|
||||
|
||||
@@ -319,19 +319,6 @@ static void flush_rec (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void close_rec (void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
/* TODO: */
|
||||
#else
|
||||
if (record_fd >= 0) {
|
||||
close(record_fd);
|
||||
record_fd = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void do_record(AUTO_IAL_INPUT_EVENT *event)
|
||||
{
|
||||
@@ -757,7 +744,6 @@ void TermPCXVFBInput (void)
|
||||
remove("/tmp/.pcxvfb_tmp");
|
||||
}
|
||||
#endif
|
||||
close_rec();
|
||||
#endif /* WIN32 */
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ noinst_HEADERS = \
|
||||
cursor.h dc.h event.h list.h element.h \
|
||||
ial.h inline.h internals.h zorder.h menu.h misc.h \
|
||||
msgstr.h sysfont.h timer.h devfont.h fontname.h \
|
||||
readbmp.h icon.h rbtree.h \
|
||||
readbmp.h icon.h blockheap.h rbtree.h \
|
||||
ourhdr.h client.h server.h sharedres.h sockio.h drawsemop.h \
|
||||
gal.h newgal.h memops.h incoreres.h sysres.h clipboard.h \
|
||||
glyph.h license.h mgsock.h unicode-ops.h \
|
||||
|
||||
+3
-3
@@ -112,11 +112,11 @@ void __mg_legacy_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
|
||||
Uint32 __mg_legacy_bidi_str_base_dir (const CHARSETOPS* charset_ops,
|
||||
Achar32* achars, int len);
|
||||
|
||||
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
||||
Achar32* achars, int len, int pel, ACHARMAPINFO* map);
|
||||
|
||||
#if 0
|
||||
// Deprecated
|
||||
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
|
||||
Achar32* achars, int len, GLYPHMAPINFO* map, int pel);
|
||||
|
||||
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
|
||||
Achar32* achars, int len, int* index_map, int pel);
|
||||
#endif
|
||||
|
||||
@@ -70,6 +70,7 @@ struct _SCALER_INFO_FILLBMP
|
||||
typedef struct {
|
||||
struct _SCALER_INFO_FILLBMP scaler_info;
|
||||
GAL_Rect dst_rect;
|
||||
int old_bkmode;
|
||||
|
||||
BYTE* decoded_buff;
|
||||
BYTE* decoded_alpha_buff;
|
||||
|
||||
@@ -47,35 +47,26 @@
|
||||
** blockheap.h: the head file of heap for block data.
|
||||
**
|
||||
** Create date: 2001/01/10
|
||||
**
|
||||
** DEPRECATED, USE window.h INSTEAD.
|
||||
*/
|
||||
|
||||
#ifndef GUI_BLOCKHEAP_H
|
||||
#define GUI_BLOCKHEAP_H
|
||||
|
||||
#define BDS_FREE 0x0000
|
||||
#define BDS_SPECIAL 0x0001
|
||||
#define BDS_USED 0x0002
|
||||
|
||||
#ifndef _MGUI_GDI_H /* included in include/gdi.h */
|
||||
|
||||
struct _BLOCKHEAP {
|
||||
#ifdef _MGHAVE_VIRTUAL_WINDOW
|
||||
typedef struct tagBLOCKHEAP {
|
||||
#ifdef _MGRM_THREADS
|
||||
pthread_mutex_t lock;
|
||||
#endif
|
||||
/* Size of one block element. */
|
||||
size_t sz_block;
|
||||
/* Size of the heap in blocks. */
|
||||
size_t sz_heap;
|
||||
/* The first free element in the heap. */
|
||||
size_t sz_usage_bmp;
|
||||
/* The number of blocks extra allocated. */
|
||||
size_t nr_alloc;
|
||||
|
||||
/* Pointer to the pre-allocated heap. */
|
||||
unsigned char* heap;
|
||||
/* Pointer to the usage bitmap. */
|
||||
unsigned char* usage_bmp;
|
||||
};
|
||||
|
||||
typedef struct _BLOCKHEAP BLOCKHEAP;
|
||||
size_t bd_size;
|
||||
size_t heap_size;
|
||||
int free;
|
||||
void* heap;
|
||||
} BLOCKHEAP;
|
||||
typedef BLOCKHEAP* PBLOCKHEAP;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -164,8 +164,7 @@ typedef struct JoinLayerInfo {
|
||||
typedef struct JoinedClientInfo {
|
||||
GHANDLE layer;
|
||||
int cli_id;
|
||||
int def_zi_shmid;
|
||||
int zi_shmid;
|
||||
int zo_shmid;
|
||||
} JOINEDCLIENTINFO;
|
||||
|
||||
typedef struct LayerInfo {
|
||||
@@ -223,8 +222,6 @@ typedef struct _MovedClientInfo {
|
||||
#define ID_ZOOP_MASKRECT_SET 17
|
||||
#define ID_ZOOP_MASKRECT_FREE 18
|
||||
|
||||
#define ID_ZOOP_SETGESTUREFLAGS 19 /* since 5.0.6 */
|
||||
|
||||
#ifndef MAX_CAPTION_LEN
|
||||
#define MAX_CAPTION_LEN 39 //40
|
||||
#endif
|
||||
|
||||
+22
-15
@@ -71,24 +71,19 @@
|
||||
#define NR_DIRTY_RECTS 16
|
||||
|
||||
/* constants for layers and z-order nodes */
|
||||
#define MAX_NR_LAYERS 16
|
||||
#define MAX_NR_LAYERS 8
|
||||
|
||||
/* Since 5.0.0: the number of the fixed znodes - DONOT adjust */
|
||||
#define NR_FIXED_ZNODES 1
|
||||
|
||||
/* the numbers of znodes in different levels - should be mulitples of 8 */
|
||||
#define DEF_NR_POPUPMENUS 16
|
||||
#define DEF_NR_TOOLTIPS 16
|
||||
#define DEF_NR_GLOBALS 15 // reserve one slot for fixed znode
|
||||
#define DEF_NR_TOOLTIPS 8
|
||||
#define DEF_NR_GLOBALS 15 // reserve slots for fixed znodes
|
||||
#define DEF_NR_SCREENLOCKS 8
|
||||
#define DEF_NR_DOCKERS 8
|
||||
#ifdef _MGRM_PROCESSES // per layer basis
|
||||
# define DEF_NR_TOPMOSTS 8
|
||||
# define DEF_NR_NORMALS 32
|
||||
#else
|
||||
# define DEF_NR_TOPMOSTS 16
|
||||
# define DEF_NR_NORMALS 128
|
||||
#endif
|
||||
#define DEF_NR_TOPMOSTS 16
|
||||
#define DEF_NR_NORMALS 128
|
||||
#define DEF_NR_LAUNCHERS 8
|
||||
|
||||
/* Since 5.0.0: the number of the zorder levels - DONOT adjust */
|
||||
@@ -107,10 +102,10 @@ enum {
|
||||
#define ZNIDX_DESKTOP 0
|
||||
|
||||
/* The heap size for mask rectangles */
|
||||
#define DEF_NR_MASKRECTS 1024
|
||||
#define DEF_NR_MASKRECT 1024
|
||||
|
||||
#if IS_COMPOSITING_SCHEMA
|
||||
/* max number of shared surfaces (512) */
|
||||
/* max number of shared surfaces */
|
||||
# define MAX_NR_SHARED_SURF (DEF_NR_NORMALS * (MAX_NR_LAYERS >> 1))
|
||||
#endif
|
||||
|
||||
@@ -155,9 +150,21 @@ enum {
|
||||
#endif
|
||||
|
||||
/* constants for fix string module */
|
||||
#define MAX_LEN_FIXSTR 64
|
||||
#define NR_HEAP 5
|
||||
#define LEN_BITMAP (1+2+4+8+16)
|
||||
#if defined (__NOUNIX__) || defined (__uClinux__)
|
||||
#define MAX_LEN_FIXSTR 64
|
||||
#define NR_HEAP 5
|
||||
#define LEN_BITMAP (1+2+4+8+16)
|
||||
#else
|
||||
#ifdef _MGRM_THREADS
|
||||
#define MAX_LEN_FIXSTR 2048
|
||||
#define NR_HEAP 10
|
||||
#define LEN_BITMAP (1+2+4+8+16+32+64+128+256+512)
|
||||
#else
|
||||
#define MAX_LEN_FIXSTR 1024
|
||||
#define NR_HEAP 9
|
||||
#define LEN_BITMAP (1+2+4+8+16+32+64+128+256)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* constants for engine name and video mode */
|
||||
#define LEN_SO_NAME 127 // name length of a shared object (library)
|
||||
|
||||
+2
-9
@@ -93,7 +93,7 @@ typedef struct tagDC* PDC;
|
||||
# else /* not defined _MGSCHEMA_COMPOSITING */
|
||||
void __mg_lock_recalc_gcrinfo (PDC pdc);
|
||||
void __mg_unlock_gcrinfo (PDC pdc);
|
||||
#define LOCK_GCRINFO(pdc) if (dc_IsGeneralDC(pdc)) __mg_lock_recalc_gcrinfo (pdc)
|
||||
#define LOCK_GCRINFO(pdc) __mg_lock_recalc_gcrinfo (pdc)
|
||||
#define UNLOCK_GCRINFO(pdc) if (dc_IsGeneralDC(pdc)) __mg_unlock_gcrinfo (pdc)
|
||||
# endif /* not defined _MGSCHEMA_COMPOSITING */
|
||||
|
||||
@@ -167,8 +167,6 @@ struct tagDC
|
||||
/* surface of this DC */
|
||||
GAL_Surface* surface;
|
||||
|
||||
char __first_attr[0]; // just a zero-length field for the first attribute
|
||||
|
||||
/* background color */
|
||||
gal_pixel bkcolor;
|
||||
|
||||
@@ -181,7 +179,7 @@ struct tagDC
|
||||
/* text color */
|
||||
gal_pixel textcolor;
|
||||
|
||||
int bkmode_set; /* the background mode set by user (5.0.12, Issue #107) */
|
||||
int bkmode;
|
||||
|
||||
int tabstop;
|
||||
int cExtra; /* Character extra */
|
||||
@@ -215,8 +213,6 @@ struct tagDC
|
||||
size_t dash_list_len;
|
||||
#endif
|
||||
|
||||
char __last_attr[0]; // just a zero-length field for the last attribute
|
||||
|
||||
PLOGFONT pLogFont;
|
||||
|
||||
POINT CurPenPos;
|
||||
@@ -251,7 +247,6 @@ struct tagDC
|
||||
gal_pixel skip_pixel;
|
||||
gal_pixel cur_pixel;
|
||||
int step;
|
||||
int bkmode; /* the effective background mode */
|
||||
/* ====================================================================== */
|
||||
|
||||
CLIPRECT* cur_ban;
|
||||
@@ -718,8 +713,6 @@ void __mg_update_secondary_dc (PMAINWIN pWin, HDC secondary_dc,
|
||||
HDC __mg_get_common_rgba8888_dc (void);
|
||||
BOOL __mg_reset_common_rgba8888_dc (int width, int height, int pitch,
|
||||
void* pixels);
|
||||
/* Since 5.0.6 */
|
||||
void __mg_destroy_common_rgba8888_dc (void);
|
||||
|
||||
/* Since 5.0.0.
|
||||
helpers to update the private client DC of window and it's descendants */
|
||||
|
||||
@@ -127,9 +127,6 @@ typedef LWEVENT* PLWEVENT;
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern DWORD __mg_timeout_usec;
|
||||
extern DWORD __mg_repeat_usec;
|
||||
|
||||
// The entrance of low level event handling thread
|
||||
BOOL mg_InitLWEvent (void);
|
||||
void mg_TerminateLWEvent (void);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user