mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 17:44:19 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
358c940763 | ||
|
|
b3d6c70a45 | ||
|
|
5fc1c1101e | ||
|
|
f336b8401b | ||
|
|
78a0a8addf | ||
|
|
be5f46f92d | ||
|
|
07592ad802 | ||
|
|
1764c47131 | ||
|
|
f83c92d91b | ||
|
|
bf85472935 | ||
|
|
ff6856ec1f | ||
|
|
a4d532f85e | ||
|
|
18f51a113d | ||
|
|
12313a2646 | ||
|
|
3ce8e5e8af | ||
|
|
a8b54bc301 | ||
|
|
7f711b383a | ||
|
|
bbda500121 | ||
|
|
deb248c96e | ||
|
|
c8e9b72663 | ||
|
|
0ff551a2da | ||
|
|
aef1e366f4 | ||
|
|
41d8a80c8e | ||
|
|
cbd2cea0e9 | ||
|
|
0c5f5115e6 | ||
|
|
86da42231c | ||
|
|
20974f305a | ||
|
|
5a22e67680 | ||
|
|
bae24f0964 | ||
|
|
2871657b65 | ||
|
|
767a8b088e | ||
|
|
2f77a0a8c8 | ||
|
|
2900f37c23 | ||
|
|
57bdcd4754 | ||
|
|
b95538a415 | ||
|
|
fa7c84b2b5 | ||
|
|
bc77048488 | ||
|
|
2f21b22a49 | ||
|
|
ec91986854 | ||
|
|
e7b03037be | ||
|
|
9ff822c7fd | ||
|
|
239924c63e | ||
|
|
2f85645e9d |
+2
-1
@@ -4,6 +4,8 @@
|
||||
*.al
|
||||
*.a
|
||||
*.so
|
||||
\#
|
||||
am--include-marker
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps/
|
||||
@@ -23,7 +25,6 @@ Makefile.in
|
||||
/*config.h
|
||||
/*config.h.in
|
||||
/*config.h.in~
|
||||
|
||||
/src/font/utils/emoji/
|
||||
/src/font/utils/ucd/
|
||||
/src/sysres/font_list
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
MAJOR_VERSION = 4
|
||||
MINOR_VERSION = 1
|
||||
MAJOR_VERSION = 5
|
||||
MINOR_VERSION = 0
|
||||
MICRO_VERSION = 0
|
||||
EXTRAVERSION =
|
||||
|
||||
|
||||
@@ -6,18 +6,22 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
||||
## TABLE OF CONTENTS
|
||||
|
||||
- [INTRODUCTION](#introduction)
|
||||
+ [What's MiniGUI](#whats-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)
|
||||
+ [Compositing schema](#compositing-schema)
|
||||
+ [New main window types](#new-main-window-types)
|
||||
+ [Virtual window](#virtual-window)
|
||||
+ [Other enhancements](#other-enhancements)
|
||||
+ [Compositing Schema](#compositing-schema)
|
||||
+ [New Main Window Types](#new-main-window-types)
|
||||
+ [Virtual Window](#virtual-window)
|
||||
+ [Other Enhancements](#other-enhancements)
|
||||
- [NEW FEATURES IN VERSION 4.0.x](#new-features-in-version-40x)
|
||||
- [NEW FEATURES IN VERSION 3.2.x](#new-features-in-version-32x)
|
||||
- [THE RUNTIME MODES OF MINIGUI](#the-runtime-modes-of-minigui)
|
||||
- [A BRIEF BUILDING INSTRUCTION](#a-brief-building-instruction)
|
||||
+ [Prerequisites](#prerequisites)
|
||||
+ [Building Whole MiniGUI](#building-whole-minigui)
|
||||
+ [Building MiniGUI Core](#building-minigui-core)
|
||||
+ [Building whole MiniGUI](#building-whole-minigui)
|
||||
+ [Unit Tests](#unit-tests)
|
||||
- [HISTORY](#history)
|
||||
- [AUTHORS AND COPYING](#authors-and-copying)
|
||||
@@ -28,6 +32,8 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
||||
|
||||
## INTRODUCTION
|
||||
|
||||
### What's MiniGUI
|
||||
|
||||
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.
|
||||
@@ -44,6 +50,8 @@ Nucleus, pSOS, uC/OS-II, and OSE.
|
||||
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:
|
||||
|
||||
@@ -82,22 +90,80 @@ from the download zone of the site:
|
||||
|
||||
<http://www.minigui.com>
|
||||
|
||||
### 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
|
||||
* `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
|
||||
* `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
|
||||
* `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
|
||||
* `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
|
||||
a totally new open source operating system designed for smart IoT devices
|
||||
and cloud computing environment.
|
||||
|
||||
In practice, MiniGUI and the software which are used to integrated with GPU
|
||||
constitute the graphics stack of HybridOS.
|
||||
|
||||
HybridOS uses MiniGUI as the underlying windowing system, and the members of
|
||||
HybridOS project are now maintaining the whole graphics stack.
|
||||
The following chart shows the graphics stack of HybridOS:
|
||||
|
||||
```
|
||||
-----------------------------------------------
|
||||
| MiniGUI/HybridOS Apps |
|
||||
|-----------------------------------------------|
|
||||
| | (Graphics Stack) |
|
||||
| | ---------------------|
|
||||
| | | hiMesa |
|
||||
| | hiCairo | ------------------|
|
||||
| | MiniGUI | | EGL for MiniGUI |
|
||||
| C++ libs | hiDRMDrivers | | GL, GLES, VG |
|
||||
| C libs | libDRM | | GPU drivers |
|
||||
|-----------------------------------------------|
|
||||
| Linux Kernel |
|
||||
| -----------------------------------|
|
||||
| | DRI and DRI Drivers |
|
||||
-----------------------------------------------
|
||||
```
|
||||
|
||||
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
|
||||
MiniGUI DRM engine. The drivers implement the basic hardware accelerated
|
||||
2D graphics operations of various GPUs for MiniGUI.
|
||||
- `hiMesa` is the Mesa derivative for HybridOS, while Mesa is the open source
|
||||
implementation of OpenGL and other graphics APIs, including OpenGL ES
|
||||
(versions 1, 2, 3), OpenCL, OpenMAX, and Vulkan. It contains the following
|
||||
components:
|
||||
+ The implementation of OpenGL, OpenGL ES (v1, 2, 3), and other
|
||||
graphics APIs.
|
||||
+ The EGL implementation for MiniGUI platform.
|
||||
+ The graphics drivers for various GPUs and a software driver called `swrast`.
|
||||
- `hiCairo` is the Cairo derivative for HybridOS. Cairo is a 2D vector graphics
|
||||
library for Gtk. We provide support for MiniGUI backend in `hiCairo`.
|
||||
|
||||
For more information about HybridOS, please refer to:
|
||||
|
||||
<https://hybridos.fmsoft.cn/>
|
||||
|
||||
### Source Code Repositories
|
||||
|
||||
FMSoft had created the public repositories for MiniGUI Core, MiniGUI
|
||||
components, and other open source apps on GitHub. You can visit them on:
|
||||
components, HybridOS, and other open source apps on GitHub. You can visit
|
||||
them on:
|
||||
|
||||
<https://github.com/VincentWei>
|
||||
|
||||
@@ -114,7 +180,7 @@ We now maintain all documents about MiniGUI on the following public repo:
|
||||
In version 5.0.0, we introduced some new and exciting features, and refactored
|
||||
a lot basic modules of MiniGUI Core.
|
||||
|
||||
### Compositing schema
|
||||
### Compositing Schema
|
||||
|
||||
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
||||
the compositing schema. Under compositing schema, regardless a main window
|
||||
@@ -136,7 +202,7 @@ implementation for multi-process environment:
|
||||
- Better security. One client created by different user cannot
|
||||
read/write contents in/to another windows owned by other clients.
|
||||
|
||||
### New main window types
|
||||
### New Main Window Types
|
||||
|
||||
In this version, we also enhanced the window manager of MiniGUI Core
|
||||
to support some special main window types.
|
||||
@@ -162,7 +228,7 @@ There are eight levels in MiniGUI from top to bottom:
|
||||
This enhancement allows us to create a special app which acts as
|
||||
screen lock, docker, or launcher.
|
||||
|
||||
### Virtual window
|
||||
### Virtual Window
|
||||
|
||||
You know that we can post or send a message to other windows which
|
||||
may run in another thread under MiniGUI-Threads. The MiniGUI
|
||||
@@ -193,7 +259,7 @@ and the new thread.
|
||||
This enhancement provides a very useful facility to you in order to
|
||||
develop a well-designed multithreaded application.
|
||||
|
||||
### Other enhancements
|
||||
### Other Enhancements
|
||||
|
||||
We also tune or enhance the following modules of MiniGUI Core:
|
||||
|
||||
@@ -226,7 +292,7 @@ so that the old applications can smoothly migrate to the new
|
||||
version. However, there are still some slight changes you need to take care.
|
||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||
|
||||
<https://github.com/VincentWei/minigui/blob/master/RELEASE-NOTES.md>
|
||||
<https://github.com/VincentWei/minigui/blob/rel-5-0/RELEASE-NOTES.md>
|
||||
|
||||
## NEW FEATURES IN VERSION 4.0.x
|
||||
|
||||
@@ -257,7 +323,7 @@ in order to support [HybridOS Foundation Class Library].
|
||||
|
||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||
|
||||
<https://github.com/VincentWei/minigui/blob/tree/rel-4-0/RELEASE-NOTES.md>
|
||||
<https://github.com/VincentWei/minigui/blob/rel-4-0/RELEASE-NOTES.md>
|
||||
|
||||
Because of the changes of some APIs, we recommended strongly that you
|
||||
use this version for new projects.
|
||||
@@ -319,12 +385,30 @@ clients and the server.
|
||||
|
||||
## A BRIEF BUILDING INSTRUCTION
|
||||
|
||||
This instruction assumes that you are using Ubuntu Linux.
|
||||
### Building Whole MiniGUI
|
||||
|
||||
### Prerequisites
|
||||
If you are anxious to see the comprehensive demo of MiniGUI Core
|
||||
and MiniGUI components, please fetch one of the following repositories
|
||||
from GitHub and follow the instructions to build MiniGUI Core,
|
||||
MiniGUI components, the samples, and the demonstration programs:
|
||||
|
||||
You should run `apt install <package_name>` to install the following packages
|
||||
on your Ubuntu Linux.
|
||||
<https://github.com/VincentWei/build-minigui-5.0>
|
||||
|
||||
or
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-4.0>
|
||||
|
||||
or
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-3.2>
|
||||
|
||||
### Building MiniGUI Core
|
||||
|
||||
We recommend that you use a latest Linux distribution with long term support,
|
||||
for example, Ubuntu Linux LTS 16.04 or 18.04.
|
||||
|
||||
On Ubuntu Linux LTS 16.04 or 18.04, you should run `apt install <package_name>`
|
||||
to install the following packages:
|
||||
|
||||
* Building tools:
|
||||
* autoconf
|
||||
@@ -333,8 +417,6 @@ on your Ubuntu Linux.
|
||||
* libpng12-dev (use libpng-dev on Ubuntu Linux 18.04 LTS)
|
||||
* libfreetype6-dev
|
||||
|
||||
### Building MiniGUI Core
|
||||
|
||||
MiniGUI Core uses GNU autoconf/automake scripts to configure and build the project.
|
||||
|
||||
Run
|
||||
@@ -353,23 +435,6 @@ For more information, please run
|
||||
|
||||
$ ./configure --help
|
||||
|
||||
### Building whole MiniGUI
|
||||
|
||||
If you are anxious to see the comprehensive demo of MiniGUI Core
|
||||
and MiniGUI components, please fetch one of the following repositories
|
||||
from GitHub and follow the instructions to build MiniGUI Core,
|
||||
MiniGUI components, the samples, and the demonstration programs:
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-5.0>
|
||||
|
||||
or
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-4.0>
|
||||
|
||||
or
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-3.2>
|
||||
|
||||
### Unit Tests
|
||||
|
||||
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
|
||||
@@ -483,7 +548,7 @@ A brief history description of the development progress is listed as follow:
|
||||
1. Feb., 2018: FMSoft released MiniGUI version 3.2.0.
|
||||
1. Apr., 2019: FMSoft released MiniGUI version 3.2.2.
|
||||
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
|
||||
1. Apr., 2020: FMSoft released MiniGUI version 5.0.0.
|
||||
1. Mar., 2020: FMSoft released MiniGUI version 5.0.0.
|
||||
|
||||
## AUTHORS AND COPYING
|
||||
|
||||
|
||||
+33
-20
@@ -1,7 +1,10 @@
|
||||
# Release Notes
|
||||
|
||||
- [Version 4.9.2](#version-492)
|
||||
+ [What's new in this version](#whats-new-in-this-version)
|
||||
- [Version 5.0.2](#version-502)
|
||||
+ [What's new in version 5.0.2](#whats-new-in-version-502)
|
||||
|
||||
- [Version 5.0.0](#version-500)
|
||||
+ [What's new in version 5.0.0](#whats-new-in-version-500)
|
||||
+ [Compositing schema](#compositing-schema)
|
||||
+ [New main window styles](#new-main-window-styles)
|
||||
+ [Virtual window](#virtual-window)
|
||||
@@ -10,25 +13,40 @@
|
||||
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
||||
+ [Deprecated APIs](#deprecated-apis)
|
||||
|
||||
## Version 4.9.2
|
||||
## Version 5.0.2
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 4.9.2,
|
||||
which is the third preview release of MiniGUI 5.0.0.
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.2,
|
||||
which is the bug fixing release of MiniGUI 5.0.x.
|
||||
|
||||
This is an unstable release to show you some new and exciting features.
|
||||
Here `unstable` means that the new APIs we introduced in this version
|
||||
may change in the official release.
|
||||
### What's new in version 5.0.2
|
||||
|
||||
Nevertheless, we did our best to ensure backward compatibility of the
|
||||
existed APIs so that the old applications can smoothly migrate to the new
|
||||
version. We recommend that you test this version and report any bugs and
|
||||
In this version, we tuned some code for GCC 9 and fixed some bugs:
|
||||
|
||||
* BUGFIXING:
|
||||
- Initialize `cfg_res_path` in function `__sysres_get_system_res_path()`.
|
||||
- Always return TRUE in `subtract_rgn_by_node()`.
|
||||
* ADJUSTMENTS:
|
||||
- Use upstream Harfbuzz for glyph shaping of complex scripts instead
|
||||
of the modified version.
|
||||
* TUNING:
|
||||
- Tune some code to depress compilation warnings.
|
||||
|
||||
## Version 5.0.0
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.0,
|
||||
which is the first official release of MiniGUI 5.0.x.
|
||||
|
||||
This version brings us some new and exciting features, and we did our best
|
||||
to ensure backward compatibility of the existed APIs so that the old
|
||||
applications can smoothly migrate to the new version.
|
||||
We recommend that you use this version and report any bugs and
|
||||
incompatibilities in
|
||||
|
||||
<https://github.com/VincentWei/minigui/tree/dev-4-1>
|
||||
<https://github.com/VincentWei/minigui/tree/rel-5-0>
|
||||
|
||||
### What's new in this version
|
||||
### What's new in version 5.0.0
|
||||
|
||||
In the development of version 4.9.x, we introduced the following new and
|
||||
In the development of version 5.0.x, we introduced the following new and
|
||||
exciting features for MiniGUI:
|
||||
|
||||
* ENHANCEMENTS:
|
||||
@@ -66,7 +84,7 @@ exciting features for MiniGUI:
|
||||
* ADJUSTMENTS:
|
||||
- `g_rcScr` now is defined a macro calling function `GetScreenRect()`.
|
||||
- `mgIsServer` now is define a macro calling function `IsServer()`.
|
||||
* TUNNING
|
||||
* TUNING
|
||||
- Tune the `drm` (DRM) engine to support MiniGUI-Processes runtime mode
|
||||
and compositing schema.
|
||||
- Tune the `fbcon` (Linux Frame Buffer) engine to support compositing schema.
|
||||
@@ -82,11 +100,6 @@ exciting features for MiniGUI:
|
||||
message queue, event/message handling, and part of graphics abstract
|
||||
layer.
|
||||
|
||||
The following new features will be developed in the successive versions of
|
||||
4.9.x:
|
||||
|
||||
- Enhance other frequently used GAL engines to support compositing schema.
|
||||
|
||||
### Compositing schema
|
||||
|
||||
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
Version 5.0.0 (2019/03/31)
|
||||
Version 5.0.0 (2019/03/30)
|
||||
|
||||
This is the second preview version of MiniGUI 5.0.0, an unstable 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.4.tar.gz`
|
||||
- The resource package: `minigui-res-4.0.0.tar.gz`
|
||||
- GVFB: `gvfb-1.2.5.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`
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT(libminigui, 4.9.2)
|
||||
AC_INIT(libminigui, 5.0.2)
|
||||
AC_CONFIG_SRCDIR(src/main/main.c)
|
||||
|
||||
dnl Set various version strings - taken gratefully from the SDL sources
|
||||
@@ -14,11 +14,11 @@ dnl Set various version strings - taken gratefully from the SDL sources
|
||||
# if backwards compatibility has been broken,
|
||||
# set MINIGUI_BINARY_AGE and MINIGUI_INTERFACE_AGE to 0.
|
||||
#
|
||||
MINIGUI_MAJOR_VERSION=4
|
||||
MINIGUI_MINOR_VERSION=9
|
||||
MINIGUI_MAJOR_VERSION=5
|
||||
MINIGUI_MINOR_VERSION=0
|
||||
MINIGUI_MICRO_VERSION=2
|
||||
MINIGUI_INTERFACE_AGE=0
|
||||
MINIGUI_BINARY_AGE=0
|
||||
MINIGUI_INTERFACE_AGE=2
|
||||
MINIGUI_BINARY_AGE=2
|
||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||
|
||||
AC_SUBST(MINIGUI_MAJOR_VERSION)
|
||||
@@ -94,7 +94,7 @@ osname="unspecified"
|
||||
runtime_mode="procs"
|
||||
compositing_schema="no"
|
||||
virtual_window="no"
|
||||
use_shmopen="no"
|
||||
use_shmopen="yes"
|
||||
mgslice_use_fallback="no"
|
||||
|
||||
incore_res="no"
|
||||
@@ -2143,7 +2143,7 @@ if test "x$build_ttf_support" = "xyes"; then
|
||||
if test "x$build_complex_scripts" = "xyes"; then
|
||||
dnl Check for HarfBuzz library
|
||||
AC_CHECK_LIB(harfbuzz, hb_version,
|
||||
DEP_LIBS="$DEP_LIBS -lharfbuzzex -lfreetype",
|
||||
DEP_LIBS="$DEP_LIBS -lharfbuzz -lfreetype",
|
||||
build_complex_scripts="no; support for complex scripts requires libharfbuzz")
|
||||
else
|
||||
DEP_LIBS="$DEP_LIBS -lfreetype",
|
||||
@@ -2223,7 +2223,7 @@ if test "x$build_complex_scripts" = "xyes"; then
|
||||
[ --with-hb-includes=DIR where the HarfBuzz includes are])
|
||||
|
||||
if test "x$with_hb_includes" = "x"; then
|
||||
HB_INC_DIR="-I/usr/local/include/harfbuzz"
|
||||
HB_INC_DIR="-I/usr/include/harfbuzz"
|
||||
else
|
||||
HB_INC_DIR="-I$with_hb_includes"
|
||||
fi
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ double_buffering=true
|
||||
|
||||
# The filename of the shared library for the external driver.
|
||||
# The equivalent environment variable: MG_GAL_DRM_DRIVER
|
||||
exdriver=libhidrmdrivers.so.0
|
||||
exdriver=libhidrmdrivers-0.2.so.0
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGIAL_LIBINPUT
|
||||
|
||||
+7
-7
@@ -298,7 +298,7 @@ typedef struct _DrmDriverOps {
|
||||
ColorLogicalOp logic_op);
|
||||
|
||||
/**
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* value specified to a destination buffer.
|
||||
*
|
||||
* \note If this operation is set as NULL, the driver does not support
|
||||
@@ -310,7 +310,7 @@ typedef struct _DrmDriverOps {
|
||||
uint8_t alpha);
|
||||
|
||||
/**
|
||||
* This operation blits pixles from a source buffer to a destination buffer,
|
||||
* This operation blits pixels from a source buffer to a destination buffer,
|
||||
* but skipping the pixel value specified by \a color_key.
|
||||
*
|
||||
* \note If this operation is set as NULL, the driver does not support
|
||||
@@ -322,7 +322,7 @@ typedef struct _DrmDriverOps {
|
||||
uint32_t color_key);
|
||||
|
||||
/**
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* value specified to a destination buffer, but skipping the pixel value
|
||||
* specified.
|
||||
*
|
||||
@@ -335,7 +335,7 @@ typedef struct _DrmDriverOps {
|
||||
uint8_t alpha, uint32_t color_key);
|
||||
|
||||
/**
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* value of pixels to the destination buffer, and with the specified color
|
||||
* compositing/blending method (\a ColorBlendMethod).
|
||||
*
|
||||
@@ -372,12 +372,12 @@ typedef struct _DrmDriverOps {
|
||||
* For example, for Intel i915/i965 GPUs, the driver name will be `i915`.
|
||||
* \param device_fd This argument gives the file descriptor of the
|
||||
* opened DRI device.
|
||||
* \param version A pointer to an integer which will contain the
|
||||
* versionc of the DRM engine driver.
|
||||
* \param version A pointer to an integer which will be used to return
|
||||
* the interface version of the DRM engine driver.
|
||||
*
|
||||
* \return NULL or a valid pointer to DrmDriverOps.
|
||||
*
|
||||
* \note We use the version control since 4.0.7. It will be intialized
|
||||
* \note We use the version control since 4.0.7. It will be initialized
|
||||
* to zero by MiniGUI before calling this function. Because an old
|
||||
* driver for MiniGUI 4.0.6 or earlier will not change the value,
|
||||
* MiniGUI will deny to load the old driver.
|
||||
|
||||
@@ -1433,10 +1433,12 @@ static LRESULT NewToolbarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARA
|
||||
item_info->add_data = item->add_data;
|
||||
|
||||
if (item_info->which & MTB_WHICH_TEXT)
|
||||
strncpy (item_info->text, item->text, NTB_TEXT_LEN);
|
||||
//strncpy (item_info->text, item->text, NTB_TEXT_LEN);
|
||||
strcpy (item_info->text, item->text);
|
||||
|
||||
if (item_info->which & MTB_WHICH_TIP)
|
||||
strncpy (item_info->tip, item->tip, NTB_TIP_LEN);
|
||||
//strncpy (item_info->tip, item->tip, NTB_TIP_LEN);
|
||||
strcpy (item_info->tip, item->tip);
|
||||
|
||||
return NTB_OKAY;
|
||||
}
|
||||
|
||||
+11
-13
@@ -1012,8 +1012,9 @@ void GUIAPI DestroyDynamicDevFont (DEVFONT** devfont)
|
||||
{
|
||||
char font_name [LEN_UNIDEVFONT_NAME + 1];
|
||||
|
||||
memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
||||
strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME);
|
||||
//memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
||||
//strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME);
|
||||
strcpy(font_name, (*devfont)->name);
|
||||
|
||||
font_DelDevFont (font_name);
|
||||
*devfont = NULL;
|
||||
@@ -1069,25 +1070,22 @@ static BOOL init_or_term_specifical_fonts (char* etc_section, BOOL is_unload)
|
||||
added_num ++;
|
||||
}
|
||||
else {
|
||||
/* [DK] Fix Bug #4801, which introduce a absolute path check error in Windows,
|
||||
* first to load from sytem res path, else load it directly(relative or absolute path).*/
|
||||
if ((add_dev_font (font_name, font_file, TRUE)) == TRUE)
|
||||
/* [DK] Fix Bug #4801, which introduce an absolute path check error in Windows,
|
||||
* first to load from sytem res path, else load it directly (relative or absolute path).*/
|
||||
if (add_dev_font (font_name, font_file, TRUE))
|
||||
added_num++;
|
||||
else if ((0 == __mg_path_joint(font_path, MAX_PATH + 1,
|
||||
__sysres_get_system_res_path(), font_file))
|
||||
&& ((add_dev_font (font_name, font_path, TRUE)) == TRUE))
|
||||
__sysres_get_system_res_path(), font_file)) &&
|
||||
add_dev_font (font_name, font_path, TRUE))
|
||||
added_num++;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_unload || added_num > 0 || added_num == font_num)
|
||||
{
|
||||
if (is_unload || added_num > 0 || added_num == font_num) {
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL font_InitSpecificalFonts (char* etc_section)
|
||||
|
||||
@@ -120,47 +120,42 @@ hb_minigui_unicode_decompose (hb_unicode_funcs_t *ufuncs,
|
||||
return UCharDecompose(ab, a, b);
|
||||
}
|
||||
|
||||
static hb_unicode_funcs_t *_funcs;
|
||||
static hb_unicode_funcs_t *get_unicode_funcs(void)
|
||||
{
|
||||
if (_funcs)
|
||||
return _funcs;
|
||||
|
||||
_funcs = hb_unicode_funcs_create (NULL);
|
||||
|
||||
hb_unicode_funcs_set_combining_class_func (_funcs,
|
||||
hb_minigui_unicode_combining_class, NULL, NULL);
|
||||
hb_unicode_funcs_set_general_category_func (_funcs,
|
||||
hb_minigui_unicode_general_category, NULL, NULL);
|
||||
hb_unicode_funcs_set_mirroring_func (_funcs,
|
||||
hb_minigui_unicode_mirroring, NULL, NULL);
|
||||
hb_unicode_funcs_set_script_func (_funcs,
|
||||
hb_minigui_unicode_script, NULL, NULL);
|
||||
hb_unicode_funcs_set_compose_func (_funcs,
|
||||
hb_minigui_unicode_compose, NULL, NULL);
|
||||
hb_unicode_funcs_set_decompose_func (_funcs,
|
||||
hb_minigui_unicode_decompose, NULL, NULL);
|
||||
|
||||
hb_unicode_funcs_make_immutable (_funcs);
|
||||
|
||||
return _funcs;
|
||||
}
|
||||
|
||||
typedef hb_unicode_funcs_t *(*hb_get_unicode_funcs) (void);
|
||||
extern hb_get_unicode_funcs __hb_extern_get_unicode_funcs;
|
||||
/* extern hb_unicode_funcs_t *__mg_hb_unifuncs */
|
||||
hb_unicode_funcs_t *__mg_hb_unifuncs;
|
||||
|
||||
void __mg_init_harzbuff_funcs(void)
|
||||
{
|
||||
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
||||
__hb_extern_get_unicode_funcs = get_unicode_funcs;
|
||||
|
||||
if (__mg_hb_unifuncs)
|
||||
return;
|
||||
|
||||
__mg_hb_unifuncs = hb_unicode_funcs_create (NULL);
|
||||
|
||||
hb_unicode_funcs_set_combining_class_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_combining_class, NULL, NULL);
|
||||
hb_unicode_funcs_set_general_category_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_general_category, NULL, NULL);
|
||||
hb_unicode_funcs_set_mirroring_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_mirroring, NULL, NULL);
|
||||
hb_unicode_funcs_set_script_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_script, NULL, NULL);
|
||||
hb_unicode_funcs_set_compose_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_compose, NULL, NULL);
|
||||
hb_unicode_funcs_set_decompose_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_decompose, NULL, NULL);
|
||||
|
||||
hb_unicode_funcs_make_immutable (__mg_hb_unifuncs);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void __mg_term_harzbuff_funcs(void)
|
||||
{
|
||||
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
||||
|
||||
if (_funcs) {
|
||||
hb_unicode_funcs_destroy(_funcs);
|
||||
if (__mg_hb_unifuncs) {
|
||||
hb_unicode_funcs_destroy(__mg_hb_unifuncs);
|
||||
}
|
||||
else {
|
||||
_ERR_PRINTF("%s: hb_unicode_funcs_t object is NULL\n",
|
||||
|
||||
+1
-1
@@ -5393,6 +5393,7 @@ static BOOL _wndInvalidateRect(HWND hWnd, const RECT* prc, BOOL bEraseBkgnd, int
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
_WRN_PRINTF ("The invalid region is forzen\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -5573,7 +5574,6 @@ HDC GUIAPI BeginPaint (HWND hWnd)
|
||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), HDC_INVALID);
|
||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||
|
||||
|
||||
if (pWin->pCaretInfo && pWin->pCaretInfo->fBlink) {
|
||||
HideCaretEx (hWnd, FALSE);
|
||||
pWin->pCaretInfo->fBlink = TRUE;
|
||||
|
||||
@@ -1243,11 +1243,9 @@ static int wait_event_ex (int maxfd, fd_set *in, fd_set *out, fd_set *except,
|
||||
break;
|
||||
}
|
||||
|
||||
#if 0
|
||||
default:
|
||||
_DBG_PRINTF("IAL>LIBINPUT: got a UNKNOWN event type: %d\n", type);
|
||||
_WRN_PRINTF("IAL>LIBINPUT: got a UNKNOWN event type: %d\n", type);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
libinput_event_destroy(event);
|
||||
|
||||
@@ -7,4 +7,4 @@ noinst_HEADERS = \
|
||||
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 \
|
||||
linux-tty.h debug.h
|
||||
linux-tty.h debug.h map.h
|
||||
|
||||
@@ -77,7 +77,7 @@ struct _CompositorCtxt {
|
||||
CLIPRGN wins_rgn; // visible region for all windows (subtract popup menus)
|
||||
CLIPRGN dirty_rgn; // the dirty region
|
||||
CLIPRGN inv_rgn; // the invalid region for a specific znode
|
||||
//Uint32 dirty_types;// the dirty znode types.
|
||||
Uint32 dirty_types;// the dirty znode types.
|
||||
};
|
||||
|
||||
static CompositorCtxt* initialize (const char* name)
|
||||
@@ -334,9 +334,11 @@ static void composite_ppp_znodes (CompositorCtxt* ctxt)
|
||||
ClipRgnIntersect (&ctxt->inv_rgn, &ctxt->dirty_rgn, rgn);
|
||||
if (IsEmptyClipRgn (&ctxt->inv_rgn)) {
|
||||
ServerReleasePopupMenuZNodeHeader (zidx);
|
||||
break;
|
||||
_DBG_PRINTF ("ppp %d skipped\n", zidx);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
_DBG_PRINTF ("ppp %d composited\n", zidx);
|
||||
// blit this popup menu to screen
|
||||
SelectClipRegion (HDC_SCREEN_SYS, &ctxt->inv_rgn);
|
||||
BitBlt (znode_hdr->mem_dc, 0, 0,
|
||||
@@ -612,14 +614,15 @@ static BOOL reset_dirty_region (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
if (layer != mgTopmostLayer)
|
||||
return FALSE;
|
||||
|
||||
//ctxt->dirty_types = 0;
|
||||
ctxt->dirty_types = 0;
|
||||
EmptyClipRgn (&ctxt->dirty_rgn);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL generate_dirty_region (CompositorCtxt* ctxt,
|
||||
static BOOL merge_dirty_region (CompositorCtxt* ctxt,
|
||||
const ZNODEHEADER* znode_hdr, const CLIPRGN* znode_rgn)
|
||||
{
|
||||
EmptyClipRgn (&ctxt->inv_rgn);
|
||||
if (znode_hdr && znode_hdr->dirty_rcs) {
|
||||
int i;
|
||||
for (i = 0; i < znode_hdr->nr_dirty_rcs; i++) {
|
||||
@@ -628,16 +631,23 @@ static BOOL generate_dirty_region (CompositorCtxt* ctxt,
|
||||
// device coordinates to screen coordinates
|
||||
rc = znode_hdr->dirty_rcs [i];
|
||||
OffsetRect (&rc, znode_hdr->rc.left, znode_hdr->rc.top);
|
||||
AddClipRect (&ctxt->dirty_rgn, &rc);
|
||||
AddClipRect (&ctxt->inv_rgn, &rc);
|
||||
}
|
||||
|
||||
if (znode_rgn)
|
||||
IntersectRegion (&ctxt->dirty_rgn, &ctxt->dirty_rgn, znode_rgn);
|
||||
IntersectRegion (&ctxt->inv_rgn, &ctxt->inv_rgn, znode_rgn);
|
||||
else
|
||||
IntersectClipRect (&ctxt->dirty_rgn, &ctxt->rc_screen);
|
||||
IntersectClipRect (&ctxt->inv_rgn, &ctxt->rc_screen);
|
||||
|
||||
}
|
||||
|
||||
return !IsEmptyClipRgn (&ctxt->dirty_rgn);
|
||||
if (IsEmptyClipRgn (&ctxt->inv_rgn)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UnionRegion (&ctxt->dirty_rgn, &ctxt->dirty_rgn, &ctxt->inv_rgn);
|
||||
EmptyClipRgn (&ctxt->inv_rgn);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL merge_dirty_ppp (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
@@ -649,15 +659,16 @@ static BOOL merge_dirty_ppp (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
_DBG_PRINTF("called: %d\n", zidx);
|
||||
|
||||
/* the fallback compositor only manages znodes on the topmost layer. */
|
||||
if (layer != mgTopmostLayer || zidx <= 0)
|
||||
if (layer != mgTopmostLayer)
|
||||
return rc;
|
||||
|
||||
znode_hdr = ServerGetPopupMenuZNodeHeader (zidx, (void**)&rgn, TRUE);
|
||||
if (generate_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
//ctxt->dirty_types |= DIRTY_ZT_PPP;
|
||||
if (merge_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
ctxt->dirty_types |= DIRTY_ZT_PPP;
|
||||
rc = TRUE;
|
||||
}
|
||||
ServerReleasePopupMenuZNodeHeader (zidx);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -668,15 +679,15 @@ static BOOL merge_dirty_win (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
CLIPRGN *rgn;
|
||||
|
||||
/* the fallback compositor only manages znodes on the topmost layer. */
|
||||
if (layer != mgTopmostLayer || zidx <= 0)
|
||||
if (layer != mgTopmostLayer)
|
||||
return rc;
|
||||
|
||||
_DBG_PRINTF("called: %d\n", zidx);
|
||||
|
||||
/* merge the dirty region */
|
||||
znode_hdr = ServerGetWinZNodeHeader (NULL, zidx, (void**)&rgn, TRUE);
|
||||
if (generate_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
//ctxt->dirty_types |= DIRTY_ZT_WIN;
|
||||
if (merge_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
ctxt->dirty_types |= DIRTY_ZT_WIN;
|
||||
rc = TRUE;
|
||||
}
|
||||
ServerReleaseWinZNodeHeader (NULL, zidx);
|
||||
@@ -689,10 +700,10 @@ static BOOL merge_dirty_wpp (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
const ZNODEHEADER* znode_hdr;
|
||||
|
||||
znode_hdr = ServerGetWinZNodeHeader (NULL, 0, NULL, TRUE);
|
||||
if (generate_dirty_region (ctxt, znode_hdr, NULL)) {
|
||||
if (merge_dirty_region (ctxt, znode_hdr, NULL)) {
|
||||
tile_dirty_region_for_wallpaper (ctxt);
|
||||
//subtract_opaque_win_znodes_above (ctxt, 0);
|
||||
//ctxt->dirty_types |= DIRTY_ZT_WPP;
|
||||
ctxt->dirty_types |= DIRTY_ZT_WPP;
|
||||
rc = TRUE;
|
||||
}
|
||||
|
||||
@@ -706,10 +717,13 @@ BOOL refresh_dirty_region (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
if (layer != mgTopmostLayer || IsEmptyClipRgn (&ctxt->dirty_rgn))
|
||||
return FALSE;
|
||||
|
||||
composite_ppp_znodes (ctxt);
|
||||
if (ctxt->dirty_types & DIRTY_ZT_PPP)
|
||||
composite_ppp_znodes (ctxt);
|
||||
composite_on_dirty_region (ctxt, 0);
|
||||
|
||||
EmptyClipRgn (&ctxt->dirty_rgn);
|
||||
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -270,8 +270,9 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
if (!ops->reset_dirty_region (ctxt, layer))
|
||||
return;
|
||||
|
||||
/* travel menu znodes on the layer */
|
||||
if (zi->nr_popupmenus > 0) {
|
||||
/* travel menu znodes on the layer;
|
||||
this will only work for topmost layer */
|
||||
if (layer == mgTopmostLayer && zi->nr_popupmenus > 0) {
|
||||
nodes = GET_MENUNODE(zi);
|
||||
for (i = 0; i < zi->nr_popupmenus; i++) {
|
||||
pdc = dc_HDC2PDC (nodes[i].mem_dc);
|
||||
@@ -301,21 +302,23 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
}
|
||||
}
|
||||
|
||||
/* check wallpaper pattern */
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
assert (pdc->surface->dirty_info);
|
||||
lock_znode_surface (pdc, nodes);
|
||||
changes_in_dc = pdc->surface->dirty_info->dirty_age;
|
||||
if (changes_in_dc != nodes[0].changes) {
|
||||
ops->merge_dirty_wpp (ctxt, layer);
|
||||
/* check wallpaper pattern; only call for topmost layer */
|
||||
if (layer == mgTopmostLayer) {
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
assert (pdc->surface->dirty_info);
|
||||
lock_znode_surface (pdc, nodes);
|
||||
changes_in_dc = pdc->surface->dirty_info->dirty_age;
|
||||
if (changes_in_dc != nodes[0].changes) {
|
||||
ops->merge_dirty_wpp (ctxt, layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ops->refresh_dirty_region (ctxt, layer);
|
||||
|
||||
/* unlock the znode surfaces for popup menus */
|
||||
if (zi->nr_popupmenus > 0) {
|
||||
if (layer == mgTopmostLayer && zi->nr_popupmenus > 0) {
|
||||
nodes = GET_MENUNODE(zi);
|
||||
for (i = 0; i < zi->nr_popupmenus; i++) {
|
||||
pdc = dc_HDC2PDC (nodes[i].mem_dc);
|
||||
@@ -338,12 +341,15 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
}
|
||||
}
|
||||
|
||||
/* unlock the znode surfaces for wallpaper patter */
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
nodes[0].changes = pdc->surface->dirty_info->dirty_age;
|
||||
pdc->surface->dirty_info->nr_dirty_rcs = 0;
|
||||
unlock_znode_surface (pdc, nodes);
|
||||
/* unlock the znode surfaces for wallpaper pattern;
|
||||
only for topmost layer */
|
||||
if (layer == mgTopmostLayer) {
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
nodes[0].changes = pdc->surface->dirty_info->dirty_age;
|
||||
pdc->surface->dirty_info->nr_dirty_rcs = 0;
|
||||
unlock_znode_surface (pdc, nodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ static HCURSOR load_cursor_from_mem (const void* area)
|
||||
const Uint8* p = (Uint8*)area;
|
||||
WORD16 wTemp;
|
||||
|
||||
int w = 0, h = 0, xhot = 0, yhot = 0, colornum = 0;
|
||||
int w, h, xhot, yhot, colornum;
|
||||
#if 0
|
||||
DWORD32 size;
|
||||
#endif
|
||||
|
||||
@@ -298,8 +298,10 @@ static int update_client_window_rgn (int cli, HWND hwnd)
|
||||
msg.lParam = MAKELONG (crc->rc.right, crc->rc.bottom);
|
||||
|
||||
ret = __mg_send2client (&msg, mgClients + cli);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
_WRN_PRINTF ("__mg_send2client failed\n");
|
||||
break;
|
||||
}
|
||||
|
||||
crc = crc->next;
|
||||
}
|
||||
@@ -830,7 +832,6 @@ static int srvAllocZOrderNode (int cli, HWND hwnd, HWND main_win,
|
||||
|
||||
if (surf) {
|
||||
memdc = CreateMemDCFromSurface (surf);
|
||||
_WRN_PRINTF ("surface (%p) refcount: %d\n", surf, surf->refcount);
|
||||
if (memdc == HDC_INVALID) {
|
||||
if (cli > 0) {
|
||||
GAL_FreeSurface (surf);
|
||||
@@ -867,16 +868,25 @@ static BOOL _cb_update_cli_znode (void* context,
|
||||
if (znode->cli == cli && znode->flags & ZOF_VISIBLE && znode->hwnd) {
|
||||
MSG msg = {znode->hwnd, MSG_UPDATECLIWIN, 0, 0, __mg_tick_counter};
|
||||
|
||||
if (!IsRectEmpty(&(znode->dirty_rc))) {
|
||||
if (!IsRectEmpty(&znode->dirty_rc)) {
|
||||
|
||||
IntersectRect(&rcInv, &znode->dirty_rc, &rcScr);
|
||||
if (IntersectRect(&rcScr, &znode->rc, &rcScr) &&
|
||||
IntersectRect(&rcInv, &znode->dirty_rc, &rcScr)) {
|
||||
rcInv = znode->dirty_rc;
|
||||
msg.wParam = MAKELONG (rcInv.left, rcInv.top);
|
||||
msg.lParam = MAKELONG (rcInv.right, rcInv.bottom);
|
||||
|
||||
msg.wParam = MAKELONG (rcInv.left, rcInv.top);
|
||||
msg.lParam = MAKELONG (rcInv.right, rcInv.bottom);
|
||||
_DBG_PRINTF ("Send MSG_UPDATECLIWIN to client window (%s): "
|
||||
"%d, %d, %d x %d\n",
|
||||
znode->caption,
|
||||
rcInv.left, rcInv.top,
|
||||
rcInv.right - rcInv.left,
|
||||
rcInv.bottom - rcInv.top);
|
||||
|
||||
SetRectEmpty (&(znode->dirty_rc));
|
||||
__mg_send2client (&msg, mgClients + znode->cli);
|
||||
}
|
||||
|
||||
__mg_send2client (&msg, mgClients + znode->cli);
|
||||
SetRectEmpty (&znode->dirty_rc);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1201,6 +1211,7 @@ static int do_drag_drop_window (int msg, int x, int y)
|
||||
#ifndef _MGSCHEMA_COMPOSITING
|
||||
FocusRect (HDC_SCREEN_SYS, _dd_info.rc.left, _dd_info.rc.top,
|
||||
_dd_info.rc.right, _dd_info.rc.bottom);
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
#else /* not defined _MGSCHEMA_COMPOSITING */
|
||||
|
||||
msg.wParam = MAKELONG (_dd_info.rc.left, _dd_info.rc.top);
|
||||
@@ -1228,6 +1239,7 @@ static int do_drag_drop_window (int msg, int x, int y)
|
||||
SetPenColor (HDC_SCREEN_SYS, PIXEL_lightwhite);
|
||||
FocusRect (HDC_SCREEN_SYS, _dd_info.rc.left, _dd_info.rc.top,
|
||||
_dd_info.rc.right, _dd_info.rc.bottom);
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
#endif /* not defined _MGSCHEMA_COMPOSITING */
|
||||
|
||||
/* post MSG_WINDOWDROPPED to the target window */
|
||||
|
||||
+49
-30
@@ -188,7 +188,7 @@ static BOOL subtract_rgn_by_node (PCLIPRGN region, const ZORDERINFO* zi,
|
||||
else
|
||||
SubtractClipRect(region, &(node->rc));
|
||||
|
||||
return TRUE;
|
||||
return TRUE; // !IsEmptyClipRgn(region); We must return TRUE for this callback.
|
||||
}
|
||||
|
||||
#else /* not defined _MGSCHEMA_COMPOSITING */
|
||||
@@ -427,15 +427,18 @@ void __mg_update_window (HWND hwnd,
|
||||
((pWin->WinType == TYPE_CONTROL &&
|
||||
(pWin->dwExStyle & WS_EX_CTRLASMAINWIN)) ||
|
||||
pWin->WinType != TYPE_CONTROL) && pWin->dwStyle & WS_VISIBLE) {
|
||||
RECT invrc;
|
||||
SetRect(&invrc, left, top, right, bottom);
|
||||
RECT rcInv;
|
||||
SetRect(&rcInv, left, top, right, bottom);
|
||||
|
||||
if (IsRectEmpty (&invrc)) {
|
||||
_DBG_PRINTF ("Update window (%s): %d, %d, %d, %d\n",
|
||||
pWin->spCaption, left, top, right, bottom);
|
||||
|
||||
if (IsRectEmpty (&rcInv)) {
|
||||
SendAsyncMessage ((HWND)pWin, MSG_NCPAINT, 0, 0);
|
||||
InvalidateRect ((HWND)pWin, NULL, TRUE);
|
||||
}
|
||||
else {
|
||||
RECT rcTemp, rcInv, rcWin;
|
||||
RECT rcTemp, rcWin;
|
||||
|
||||
if (pWin->WinType == TYPE_CONTROL &&
|
||||
(pWin->dwExStyle & WS_EX_CTRLASMAINWIN)){
|
||||
@@ -444,13 +447,18 @@ void __mg_update_window (HWND hwnd,
|
||||
else
|
||||
GetWindowRect(hwnd, &rcWin);
|
||||
|
||||
if (IntersectRect (&rcTemp,
|
||||
&rcWin, &invrc)) {
|
||||
/* XXX: when we move a window fast, there are some dirty rectangles
|
||||
were not updated. We update whole area of the window for a work
|
||||
around. */
|
||||
if (IntersectRect (&rcTemp, &rcWin, &rcInv)) {
|
||||
dskScreenToWindow (pWin, &rcTemp, &rcInv);
|
||||
SendAsyncMessage ((HWND)pWin,
|
||||
MSG_NCPAINT, 0, (LPARAM)(&rcInv));
|
||||
MSG_NCPAINT, 0, 0); // (LPARAM)(&rcInv));
|
||||
dskScreenToClient (pWin, &rcTemp, &rcInv);
|
||||
InvalidateRect ((HWND)pWin, &rcInv, TRUE);
|
||||
InvalidateRect ((HWND)pWin, NULL/*&rcInv*/, TRUE);
|
||||
}
|
||||
else {
|
||||
_DBG_PRINTF ("IGNORED update\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -465,6 +473,9 @@ static int update_client_window (ZORDERNODE* znode, const RECT* rc)
|
||||
|
||||
if (znode->cli != 0) {
|
||||
if (rc) {
|
||||
_DBG_PRINTF ("Update window (%s): %d, %d, %d x %d\n",
|
||||
znode->caption, rc->left, rc->top,
|
||||
RECTWP(rc), RECTHP(rc));
|
||||
|
||||
if (IsRectEmpty (&znode->dirty_rc)) {
|
||||
SetRect (&znode->dirty_rc,
|
||||
@@ -473,8 +484,8 @@ static int update_client_window (ZORDERNODE* znode, const RECT* rc)
|
||||
else {
|
||||
GetBoundRect (&znode->dirty_rc, &znode->dirty_rc, rc);
|
||||
}
|
||||
mgClients [znode->cli].has_dirty = TRUE;
|
||||
}
|
||||
mgClients [znode->cli].has_dirty = TRUE;
|
||||
}
|
||||
else
|
||||
#endif /* defined _MGRM_PROCESSES */
|
||||
@@ -494,7 +505,13 @@ static BOOL _cb_update_znode (void* context,
|
||||
{
|
||||
const RECT* rc = (RECT*)context;
|
||||
|
||||
if (znode->flags & ZOF_VISIBLE && znode->flags & ZOF_IF_REFERENCE) {
|
||||
_DBG_PRINTF ("Checking window (%s), visibility: %s, referred: %s\n", znode->caption,
|
||||
(znode->flags & ZOF_VISIBLE)? "TRUE" : "FALSE",
|
||||
(znode->flags & ZOF_IF_REFERENCE)? "TRUE" : "FALSE");
|
||||
|
||||
if (znode->flags & ZOF_VISIBLE &&
|
||||
znode->flags & ZOF_IF_REFERENCE) {
|
||||
_DBG_PRINTF ("Widnow (%s) will be updated\n", znode->caption);
|
||||
update_client_window (znode, rc);
|
||||
znode->flags &= ~ZOF_IF_REFERENCE;
|
||||
return TRUE;
|
||||
@@ -3235,7 +3252,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
slot = nodes [idx_znode].next;
|
||||
for (; slot != 0; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
DoesIntersect (rcWin, &nodes [slot].rc)) {
|
||||
DoesIntersect (rcWin, &nodes [slot].rc)) {
|
||||
nodes [slot].age++;
|
||||
}
|
||||
}
|
||||
@@ -3248,6 +3265,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
//SetClipRgn (&sg_UpdateRgn, rcInv + i);
|
||||
SetClipRgn (&sg_UpdateRgn, &(nodes [idx_znode].rc));
|
||||
|
||||
/* znodes below current znode in the same level */
|
||||
slot = nodes [idx_znode].next;
|
||||
for (; slot > 0; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
@@ -3258,6 +3276,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
}
|
||||
|
||||
/* znodes below current level */
|
||||
for (level = 0; level < NR_ZORDER_LEVELS; level++) {
|
||||
if (type > _zof_types_for_level[level]) {
|
||||
slot = zi->first_in_levels[level];
|
||||
@@ -3372,12 +3391,10 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
do_for_all_znodes (NULL, zi, _cb_exclude_rc, ZT_ALL);
|
||||
}
|
||||
|
||||
while (slot && slot != idx_znode) {
|
||||
#if 0
|
||||
if (nodes [slot].flags & ZOF_VISIBLE) {
|
||||
ExcludeClipRect (HDC_SCREEN_SYS, &nodes [slot].rc);
|
||||
}
|
||||
#endif
|
||||
while (slot) {
|
||||
if (slot == idx_znode)
|
||||
break;
|
||||
|
||||
/* houhh 20090730, if slot window is no regular.*/
|
||||
if (nodes [slot].flags & ZOF_VISIBLE) {
|
||||
if (nodes[slot].idx_mask_rect == 0) {
|
||||
@@ -3404,6 +3421,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
slot = nodes [slot].next;
|
||||
}
|
||||
|
||||
BitBlt (HDC_SCREEN_SYS, rcOld.left, rcOld.top,
|
||||
MIN (RECTWP (rcWin), RECTW (rcOld)),
|
||||
MIN (RECTHP (rcWin), RECTH (rcOld)),
|
||||
@@ -3417,17 +3435,22 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* unlock zi for change ... */
|
||||
unlock_zi_for_change (zi);
|
||||
do_for_all_znodes (&rcOld, zi, _cb_update_znode, ZT_ALL);
|
||||
|
||||
/* check the invalid rect of the window */
|
||||
if (nodes [0].flags & ZOF_IF_REFERENCE) {
|
||||
SendMessage (HWND_DESKTOP,
|
||||
MSG_ERASEDESKTOP, 0, (LPARAM)&rcOld);
|
||||
nodes [0].flags &= ~ZOF_IF_REFERENCE;
|
||||
}
|
||||
|
||||
/* check the invalid rectangles of the being moved window */
|
||||
EmptyClipRgn (&sg_UpdateRgn);
|
||||
nInvCount = SubtractRect (rcInv, &rcOld, &rcScr);
|
||||
for (i = 0; i < nInvCount; i++) {
|
||||
AddClipRect (&sg_UpdateRgn, rcInv + i);
|
||||
}
|
||||
|
||||
/* Since 5.0.0: handle levels */
|
||||
/* Since 5.0.0: handle levels above the current level */
|
||||
for (level = 0; level < NR_ZORDER_LEVELS; level++) {
|
||||
if (type < _zof_types_for_level[level]) {
|
||||
slot = zi->first_in_levels[level];
|
||||
@@ -3439,6 +3462,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
}
|
||||
|
||||
/* handle znodes above the current znode */
|
||||
slot = *first;
|
||||
for (; slot != idx_znode; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
@@ -3446,20 +3470,15 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
AddClipRect(&sg_UpdateRgn, &rcInter);
|
||||
}
|
||||
|
||||
do_for_all_znodes (&rcOld, zi, _cb_update_znode, ZT_ALL);
|
||||
|
||||
if (nodes [0].flags & ZOF_IF_REFERENCE) {
|
||||
SendMessage (HWND_DESKTOP,
|
||||
MSG_ERASEDESKTOP, 0, (LPARAM)&rcOld);
|
||||
nodes [0].flags &= ~ZOF_IF_REFERENCE;
|
||||
}
|
||||
|
||||
OffsetRegion (&sg_UpdateRgn,
|
||||
rcWin->left - rcOld.left,
|
||||
rcWin->top - rcOld.top);
|
||||
|
||||
update_client_window_rgn (nodes [idx_znode].cli,
|
||||
nodes [idx_znode].hwnd);
|
||||
|
||||
/* unlock zi for change ... */
|
||||
unlock_zi_for_change (zi);
|
||||
}
|
||||
else {
|
||||
lock_zi_for_change (zi);
|
||||
|
||||
@@ -478,8 +478,10 @@ int InitGUI (int argc, const char* agr[])
|
||||
/* Since 5.0.0
|
||||
* Copy the video engine information to the shared resource segement
|
||||
*/
|
||||
strncpy (SHAREDRES_VIDEO_ENGINE, engine, LEN_ENGINE_NAME);
|
||||
strncpy (SHAREDRES_VIDEO_MODE, mode, LEN_VIDEO_MODE);
|
||||
//strncpy (SHAREDRES_VIDEO_ENGINE, engine, LEN_ENGINE_NAME);
|
||||
strcpy (SHAREDRES_VIDEO_ENGINE, engine);
|
||||
//strncpy (SHAREDRES_VIDEO_MODE, mode, LEN_VIDEO_MODE);
|
||||
strcpy (SHAREDRES_VIDEO_MODE, mode);
|
||||
#if 0 /* deprecated code */
|
||||
// these fileds will be initialized by DRM engine.
|
||||
if (GetMgEtcValue (engine, "device",
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef _MGUSE_SHMOPEN
|
||||
#include <sys/mman.h>
|
||||
|
||||
+11
-2
@@ -1433,7 +1433,9 @@ char * strtrimall( char *src)
|
||||
return src;
|
||||
}
|
||||
|
||||
strcpy (src, src + nIndex1);
|
||||
// VW: use memmove instead of strcpy to avoid overlapping
|
||||
// strcpy (src, src + nIndex1);
|
||||
memmove (src, src + nIndex1, nLen - nIndex1 + 1);
|
||||
|
||||
nLen = strlen (src);
|
||||
nIndex1 = nLen - 1;
|
||||
@@ -1468,11 +1470,18 @@ int __mg_path_joint (char* dst, int dst_size,
|
||||
if (__mg_is_abs_path(abs_path) && (!__mg_is_abs_path(sub_path))) {
|
||||
if (dst_size >= strlen(abs_path) + strlen(sub_path)
|
||||
+ 2/* size of split '/' and terminator '\0' */) {
|
||||
sprintf(dst, "%s/%s", abs_path, sub_path);
|
||||
strcpy (dst, abs_path);
|
||||
strcat (dst, "/");
|
||||
strcat (dst, sub_path);
|
||||
//sprintf(dst, "%s/%s", abs_path, sub_path);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
_WRN_PRINTF ("The buffer space for the full path is too short: %d\n", dst_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define _DEBUG
|
||||
#include "common.h"
|
||||
|
||||
#ifdef _MGGAL_DRM
|
||||
@@ -2005,7 +2004,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer(DrmVideoData* vdata,
|
||||
surface_buffer->handle,
|
||||
surface_buffer->width, surface_buffer->height,
|
||||
surface_buffer->pitch,
|
||||
(long unsigned int)surface_buffer->size, (long unsigned int)surface_buffer->offset);
|
||||
surface_buffer->size, surface_buffer->offset);
|
||||
|
||||
/* prepare buffer for memory mapping */
|
||||
memset(&mreq, 0, sizeof(mreq));
|
||||
@@ -2134,7 +2133,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer_from_prime_fd(DrmVideoData* vdat
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_DBG_PRINTF("size got by calling lseek: %lu\n", (long unsigned int)size);
|
||||
_DBG_PRINTF("size got by calling lseek: %lu\n", size);
|
||||
}
|
||||
|
||||
ret = drmPrimeFDToHandle (vdata->dev_fd, prime_fd, &handle);
|
||||
@@ -3493,7 +3492,7 @@ GAL_Surface* __drm_create_surface_from_name (GHANDLE video,
|
||||
|
||||
/* called by drmCreateDCFromHandle */
|
||||
GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, uint32_t handle,
|
||||
size_t size, uint32_t drm_format, uint32_t pixels_off,
|
||||
unsigned long size, uint32_t drm_format, uint32_t pixels_off,
|
||||
uint32_t width, uint32_t height, uint32_t pitch)
|
||||
{
|
||||
GAL_VideoDevice *this = (GAL_VideoDevice *)video;
|
||||
|
||||
@@ -257,9 +257,11 @@ static int FB_EnterGraphicsMode (_THIS)
|
||||
_WRN_PRINTF ("Can't open %s: %m\n", tty_dev);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (ioctl (ttyfd, KDSETMODE, KD_GRAPHICS) == -1) {
|
||||
_WRN_PRINTF ("Error when setting the terminal to graphics mode: %m\n");
|
||||
_WRN_PRINTF ("Maybe is not a console.\n");
|
||||
_WRN_PRINTF ("Error when setting the terminal (%s) "
|
||||
"to graphics mode: %m\n", tty_dev);
|
||||
_WRN_PRINTF ("It might is not a console.\n");
|
||||
goto fail;
|
||||
}
|
||||
#ifdef _MGRM_PROCESSES
|
||||
@@ -864,7 +866,8 @@ static void FB_FreeHWSurfaces(_THIS)
|
||||
surfaces.next = NULL;
|
||||
}
|
||||
|
||||
static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request, REP_HWSURFACE* reply)
|
||||
static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request,
|
||||
REP_HWSURFACE* reply)
|
||||
{
|
||||
if (request->bucket == NULL) { /* alloc hw surface */
|
||||
vidmem_bucket *bucket;
|
||||
@@ -954,9 +957,9 @@ static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request, REP_HWSURF
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bucket && bucket->used) {
|
||||
/* Add the memory back to the total */
|
||||
_DBG_PRINTF ("Freeing bucket of %d bytes\n", bucket->size);
|
||||
surfaces_memleft += bucket->size;
|
||||
|
||||
/* Can we merge the space with surrounding buckets? */
|
||||
@@ -1015,12 +1018,14 @@ static int FB_AllocHWSurface (_THIS, GAL_Surface *surface)
|
||||
surface->pitch = reply.pitch;
|
||||
surface->pixels = mapped_mem + reply.offset;
|
||||
surface->hwdata = (struct private_hwdata *)reply.bucket;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void FB_FreeHWSurface(_THIS, GAL_Surface *surface)
|
||||
{
|
||||
REQ_HWSURFACE request = {surface->w, surface->h, surface->pitch, 0, surface->hwdata};
|
||||
REQ_HWSURFACE request = {surface->w, surface->h, surface->pitch, 0,
|
||||
surface->hwdata};
|
||||
REP_HWSURFACE reply = {0, 0};
|
||||
|
||||
request.offset = (char*)surface->pixels - (char*)mapped_mem;
|
||||
|
||||
+2
-2
@@ -219,7 +219,7 @@ static GAL_Surface* create_wp_surface(GAL_Surface* screen)
|
||||
screen->format->BitsPerPixel,
|
||||
screen->format->Rmask, screen->format->Gmask,
|
||||
screen->format->Bmask, screen->format->Amask);
|
||||
_WRN_PRINTF ("GAL_CreateSharedRGBSurface: map size: %lu, fd: %d, RGBAmasks: %x, %x, %x, %x\n",
|
||||
_DBG_PRINTF ("GAL_CreateSharedRGBSurface: map size: %lu, fd: %d, RGBAmasks: %x, %x, %x, %x\n",
|
||||
wp_surf->shared_header->map_size, wp_surf->shared_header->fd,
|
||||
wp_surf->format->Rmask, wp_surf->format->Gmask,
|
||||
wp_surf->format->Bmask, wp_surf->format->Amask);
|
||||
@@ -243,7 +243,7 @@ static GAL_Surface* create_wp_surface(GAL_Surface* screen)
|
||||
&info, sizeof (SHAREDSURFINFO), &fd) < 0) || (fd < 0))
|
||||
goto empty;
|
||||
|
||||
_WRN_PRINTF ("REQID_GETSHAREDSURFACE: size (%lu), flags (0x%x), fd: %d\n",
|
||||
_DBG_PRINTF ("REQID_GETSHAREDSURFACE: size (%lu), flags (0x%x), fd: %d\n",
|
||||
info.size, info.flags, fd);
|
||||
wp_surf = GAL_AttachSharedRGBSurface (fd, info.size,
|
||||
info.flags, TRUE);
|
||||
|
||||
@@ -269,6 +269,8 @@ static void PCXVFB_UpdateRects (_THIS, int numrects, GAL_Rect *rects)
|
||||
|
||||
static BOOL PCXVFB_SyncUpdate (_THIS)
|
||||
{
|
||||
RECT dirty_rc;
|
||||
|
||||
if (IsRectEmpty (&this->hidden->dirty_rc))
|
||||
return FALSE;
|
||||
|
||||
@@ -278,6 +280,16 @@ static BOOL PCXVFB_SyncUpdate (_THIS)
|
||||
shm_lock(semid);
|
||||
#endif
|
||||
|
||||
dirty_rc.left = this->hidden->hdr->dirty_rc_l;
|
||||
dirty_rc.top = this->hidden->hdr->dirty_rc_t;
|
||||
dirty_rc.right = this->hidden->hdr->dirty_rc_r;
|
||||
dirty_rc.bottom = this->hidden->hdr->dirty_rc_b;
|
||||
if (dirty_rc.right == -1) dirty_rc.right = 0;
|
||||
if (dirty_rc.bottom == -1) dirty_rc.bottom = 0;
|
||||
|
||||
GetBoundRect (&this->hidden->dirty_rc, &dirty_rc,
|
||||
&this->hidden->dirty_rc);
|
||||
|
||||
shadowScreen_BlitToReal (this);
|
||||
|
||||
this->hidden->hdr->dirty_rc_l = this->hidden->dirty_rc.left;
|
||||
|
||||
+8
-2
@@ -628,6 +628,13 @@ void GAL_SetVideoModeInfo(GAL_Surface* screen)
|
||||
{
|
||||
assert(screen);
|
||||
|
||||
if (GAL_VideoSurface) {
|
||||
GAL_Surface *ready_to_go;
|
||||
ready_to_go = GAL_VideoSurface;
|
||||
GAL_VideoSurface = NULL;
|
||||
GAL_FreeSurface (ready_to_go);
|
||||
}
|
||||
|
||||
GAL_VideoSurface = screen;
|
||||
__mg_current_video->info.vfmt = __gal_screen->format;
|
||||
__mg_current_video->offset_x = 0;
|
||||
@@ -817,6 +824,7 @@ static inline void add_rects_to_update_region (CLIPRGN* region,
|
||||
rc.bottom = rects[i].y + rects[i].h;
|
||||
AddClipRect (region, &rc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GAL_UpdateRects (GAL_Surface *surface, int numrects, GAL_Rect *rects)
|
||||
@@ -922,8 +930,6 @@ BOOL GAL_SyncUpdate (GAL_Surface *surface)
|
||||
if (this->SyncUpdate) {
|
||||
rc = this->SyncUpdate (this);
|
||||
}
|
||||
|
||||
_DBG_PRINTF ("%d rects updated\n", numrects);
|
||||
}
|
||||
|
||||
EmptyClipRgn (&surface->update_region);
|
||||
|
||||
@@ -75,6 +75,9 @@
|
||||
#include <hb.h>
|
||||
#include <hb-ft.h>
|
||||
|
||||
/* __mg_hb_unifuncs is implemented in src/font/harzbuff-minigui-funcs.c */
|
||||
extern hb_unicode_funcs_t *__mg_hb_unifuncs;
|
||||
|
||||
// define _CACHED_HB_FONT if you want use the cached HB fonts
|
||||
#define _CACHED_HB_FONT 1
|
||||
|
||||
@@ -216,6 +219,14 @@ static BOOL shape_layout_run(SEInstance* inst,
|
||||
if (hb_buf == NULL)
|
||||
goto error;
|
||||
|
||||
/* use our own unicode functions */
|
||||
if (__mg_hb_unifuncs) {
|
||||
hb_buffer_set_unicode_funcs(hb_buf, __mg_hb_unifuncs);
|
||||
}
|
||||
else {
|
||||
_DBG_PRINTF("Unicode functions for HarfBuzz does not initialized\n");
|
||||
}
|
||||
|
||||
hb_buffer_set_content_type(hb_buf, HB_BUFFER_CONTENT_TYPE_UNICODE);
|
||||
for (i = 0; i < run->len; i++) {
|
||||
hb_buffer_add(hb_buf, run->ucs[i], i);
|
||||
|
||||
+2
-1
@@ -409,7 +409,7 @@ int __mg_init_layers ()
|
||||
return -1;
|
||||
|
||||
/* mark the first semphore is used; it is reserved for wallpaper pattern */
|
||||
assert (__mg_alloc_mutual_sem (_ssm_shared_surf, NULL) == 0);
|
||||
__mg_alloc_mutual_sem (_ssm_shared_surf, NULL);
|
||||
|
||||
on_exit (__mg_delete_sem_set_manager, _ssm_shared_surf);
|
||||
#endif
|
||||
@@ -870,6 +870,7 @@ const ZNODEHEADER* GUIAPI ServerGetWinZNodeHeader (MG_Layer* layer,
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
if (lock && (pdc = dc_HDC2PDC (hdr->mem_dc))) {
|
||||
assert (pdc->surface->dirty_info);
|
||||
|
||||
if (hdr->lock_count == 0) {
|
||||
if (pdc->surface->shared_header) {
|
||||
// XXX: consider timeout.
|
||||
|
||||
@@ -812,10 +812,10 @@ static int get_shared_surface (int cli, int clifd, void* buff, size_t len)
|
||||
|
||||
static int authenticate_client (int cli, int clifd, void* buff, size_t len)
|
||||
{
|
||||
uint32_t magic;
|
||||
int auth_result = 1;
|
||||
|
||||
#ifdef _MGGAL_DRM
|
||||
uint32_t magic;
|
||||
extern int __drm_auth_client(int, uint32_t);
|
||||
magic = *(uint32_t*)buff;
|
||||
auth_result = __drm_auth_client (cli, magic);
|
||||
|
||||
+32
-27
@@ -397,29 +397,10 @@ static void free_val_bitmap (void *val)
|
||||
map_t* __mg_sys_bmp_map;
|
||||
BOOL mg_InitResManager(int hash_table_size)
|
||||
{
|
||||
char szpath[MAX_PATH+1];
|
||||
char* p = NULL;
|
||||
pwd_res_path = strdup("./");
|
||||
|
||||
//initialize paths
|
||||
#if !defined(__NOUNIX__) || defined(WIN32)
|
||||
if ((p = getenv ("MG_RES_PATH"))) {
|
||||
int len = strlen(p);
|
||||
if (p[len-1] == '/')
|
||||
sprintf(szpath, "%s", p);
|
||||
else
|
||||
sprintf(szpath, "%s/", p);
|
||||
cfg_res_path = strdup(szpath);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
//step 2: get from MiniGUI.cfg
|
||||
if (GetMgEtcValue("resinfo", "respath",
|
||||
szpath, sizeof(szpath)-1) == ETC_OK) {
|
||||
cfg_res_path = strdup(szpath);
|
||||
}
|
||||
}
|
||||
// initialize paths
|
||||
if (pwd_res_path == NULL)
|
||||
pwd_res_path = strdup ("./");
|
||||
__sysres_get_system_res_path();
|
||||
|
||||
//initialize hash table
|
||||
init_hash_table (&hash_table, hash_table_size);
|
||||
@@ -475,6 +456,31 @@ void TerminateResManager()
|
||||
|
||||
const char* __sysres_get_system_res_path()
|
||||
{
|
||||
char szpath [MAX_PATH+1];
|
||||
char* p = NULL;
|
||||
|
||||
if (cfg_res_path)
|
||||
return cfg_res_path;
|
||||
|
||||
#if !defined(__NOUNIX__) || defined(WIN32)
|
||||
if ((p = getenv ("MG_RES_PATH"))) {
|
||||
int len = strlen (p);
|
||||
if (p[len-1] == '/')
|
||||
sprintf (szpath, "%s", p);
|
||||
else
|
||||
sprintf (szpath, "%s/", p);
|
||||
cfg_res_path = strdup (szpath);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// get from MiniGUI.cfg
|
||||
if (GetMgEtcValue ("resinfo", "respath",
|
||||
szpath, sizeof (szpath)-1) == ETC_OK) {
|
||||
cfg_res_path = strdup (szpath);
|
||||
}
|
||||
}
|
||||
|
||||
return cfg_res_path;
|
||||
}
|
||||
|
||||
@@ -496,7 +502,7 @@ int SetResPath(const char* path)
|
||||
//test path is valid directory
|
||||
#if !defined(__NOUNIX__) && !defined(WIN32)
|
||||
struct stat buf;
|
||||
if(stat(path, &buf) != 0 || !S_ISDIR(buf.st_mode)) {
|
||||
if (stat(path, &buf) != 0 || !S_ISDIR(buf.st_mode)) {
|
||||
# ifdef _DEBUG
|
||||
ERR_RETV (RES_RET_INVALID_PARAM, RES_RET_INVALID_PARAM, "param path (%s) is not a valid directory", path);
|
||||
# else
|
||||
@@ -505,7 +511,7 @@ int SetResPath(const char* path)
|
||||
}
|
||||
#endif
|
||||
|
||||
if(usr_res_path != NULL)
|
||||
if (usr_res_path != NULL)
|
||||
DELETE(usr_res_path);
|
||||
|
||||
usr_res_path = STR_DUP(path);
|
||||
@@ -632,8 +638,7 @@ static char* get_res_file(const char* res_name, char* filename)
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0; res_paths[i]; i++)
|
||||
{
|
||||
for (i=0; res_paths[i]; i++) {
|
||||
#ifndef __NOUNIX__
|
||||
struct stat buf;
|
||||
sprintf(filename,"%s/%s", res_paths[i], res_name);
|
||||
|
||||
Reference in New Issue
Block a user