Compare commits

...
18 changed files with 454 additions and 370 deletions
+4
View File
@@ -24,3 +24,7 @@ Makefile.in
/*config.h.in
/*config.h.in~
/src/font/utils/emoji/
/src/font/utils/ucd/
/src/sysres/font_list
/src/sysres/license/dat_files/
+2 -2
View File
@@ -1,6 +1,6 @@
MAJOR_VERSION = 3
MAJOR_VERSION = 4
MINOR_VERSION = 0
MICRO_VERSION = 13
MICRO_VERSION = 4
EXTRAVERSION =
MINIGUI_RELEASE=$(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)$(EXTRAVERSION)
+2 -2
View File
@@ -2,8 +2,8 @@ SUBDIRS = src 3rd-party include rtos etc m4 cmake build
EXTRA_DIST = minigui.pc.in \
GNUmakefile makefile.ng makefile.msvc rules.make \
Version INSTALL LICENSE \
README.md RELEASE-NOTES.md \
INSTALL LICENSE \
Version.md README.md RELEASE-NOTES.md \
LICENSE-POLICY-en.md LICENSE-POLICY-zh.md
# The directory where the include files will be installed
+3 -3
View File
@@ -147,11 +147,11 @@ and MiniGUI components, please fetch one of the following repositories
from GitHub and follow the instructions to build the samples and
the demonstration programs:
https://github.com/VincentWei/build-minigui-4.0
<https://github.com/VincentWei/build-minigui-4.0>
or
https://github.com/VincentWei/build-minigui-3.2
<https://github.com/VincentWei/build-minigui-3.2>
### Unit Tests
@@ -159,7 +159,7 @@ https://github.com/VincentWei/build-minigui-3.2
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
following repository:
https://github.com/VincentWei/mg-tests
<https://github.com/VincentWei/mg-tests>
If you are interested in hacking the MiniGUI code, please visit this repository.
+24 -1
View File
@@ -1,5 +1,28 @@
# Release Notes
## Version 4.0.5
The MiniGUI development team announces the availability of MiniGUI 4.0.5.
We strongly recommend that you use this version for any new MiniGUI
apps, especially if the new features of MiniGUI 4.0 are must for your
new apps.
Please report any bugs and incompatibilities in
<https://github.com/VincentWei/minigui>
### What's new in this version
In this version, we mainly fixed some bugs found.
* BUGFIXING:
- Always initialize BITMAP fields with explicit assignments.
This bug makes the cursor messy.
- Fix some conditional compilation of mg-tests.
* ENHANCEMENTS:
- The server of MiniGUI-Processes now can delete global System V IPC
objects left by a previous failed run.
## Version 4.0.4
The MiniGUI development team announces the availability of MiniGUI 4.0.4.
@@ -13,7 +36,7 @@ Please report any bugs and incompatibilities in
### What's new in this version
In this version, we mainly enhance the DRM engine of MiniGUI in order
In this version, we mainly enhanced the DRM engine of MiniGUI in order
to integrate MiniGUI with Mesa and Cairo, for example, to implement EGL
for MiniGUI platform.
+2 -2
View File
@@ -1,8 +1,8 @@
Version 4.0.4 (2019/12/24)
Version 4.0.5 (2020/01/10)
This release needs the following packages:
- The resource package: `minigui-res-4.0.0.tar.gz`
- The sample package: `mg-samples-4.0.1.tar.gz`
- The test package: `mg-test-4.0.4.tar.gz`
- The test cases package: `mg-tests-4.0.4.tar.gz`
+4 -4
View File
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_INIT(libminigui, 4.0.4)
AC_INIT(libminigui, 4.0.5)
AC_CONFIG_SRCDIR(src/main/main.c)
dnl Set various version strings - taken gratefully from the SDL sources
@@ -16,9 +16,9 @@ dnl Set various version strings - taken gratefully from the SDL sources
#
MINIGUI_MAJOR_VERSION=4
MINIGUI_MINOR_VERSION=0
MINIGUI_MICRO_VERSION=4
MINIGUI_INTERFACE_AGE=0
MINIGUI_BINARY_AGE=0
MINIGUI_MICRO_VERSION=5
MINIGUI_INTERFACE_AGE=1
MINIGUI_BINARY_AGE=1
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
AC_SUBST(MINIGUI_MAJOR_VERSION)
+3 -2
View File
@@ -13755,9 +13755,10 @@ typedef struct _DrmSurfaceInfo {
} DrmSurfaceInfo;
/**
* This function gets the DRM surface information from the handle of the surface.
* This function gets the DRM surface information from specified device context.
*
* \param surface The handle to the surface.
* \param video The handle to the video.
* \param hdc The handle to the device context.
* \param info The pointer to a DrmSurfaceInfo structure to hold
* the surface information.
*
+28 -10
View File
@@ -11,35 +11,35 @@
//
//////////////////////////////////////////////////////////////////////////////
/*
* This file is part of MiniGUI, a mature cross-platform windowing
* This file is part of MiniGUI, a mature cross-platform windowing
* and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices.
*
*
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* Or,
*
*
* As this program is a library, any link to this program must follow
* GNU General Public License version 3 (GPLv3). If you cannot accept
* GPLv3, you need to be licensed from FMSoft.
*
*
* If you have got a commercial license of this program, please use it
* under the terms and conditions of the commercial license.
*
*
* For more information about the commercial license, please refer to
* <http://www.minigui.com/blog/minigui-licensing-policy/>.
*/
@@ -70,6 +70,24 @@ enum {
_NR_SEM
};
// key base for System V IPC
#define IPC_KEY_BASE 0x464D4700
inline static key_t get_shm_key_for_system (void)
{
return (key_t)(IPC_KEY_BASE + 0x01);
}
inline static key_t get_sem_key_for_system (void)
{
return (key_t)(IPC_KEY_BASE + 0x02);
}
inline static key_t get_sem_key_for_layers (void)
{
return (key_t)(IPC_KEY_BASE + 0x03);
}
typedef struct tagG_RES {
int semid;
int shmid;
@@ -95,7 +113,7 @@ typedef struct tagG_RES {
int mousebutton;
int shiftstatus;
Uint8 kbd_state [MGUI_NR_KEYS + 1];
#ifdef _MGHAVE_CURSOR
int cursorx, cursory;
int oldboxleft, oldboxtop;
+6 -4
View File
@@ -370,9 +370,7 @@ HCURSOR GUIAPI GetDefaultCursor (void)
return def_cursor;
}
static BITMAP csr_bmp = {
BMP_TYPE_NORMAL, 0, 0, 0, 0, CURSORWIDTH, CURSORHEIGHT
};
static BITMAP csr_bmp;
BOOL mg_InitCursor (void)
{
@@ -392,10 +390,14 @@ BOOL mg_InitCursor (void)
CSR_OLDBOXTOP = -100;
}
/* always initialize fields by explicitly assignments */
csr_bmp.bmType = BMP_TYPE_NORMAL;
csr_bmp.bmBitsPerPixel = __gal_screen->format->BitsPerPixel;
csr_bmp.bmBytesPerPixel = __gal_screen->format->BytesPerPixel;
csr_bmp.bmWidth = CURSORWIDTH;
csr_bmp.bmHeight = CURSORHEIGHT;
csr_bmp.bmPitch = __gal_screen->format->BytesPerPixel * CURSORWIDTH;
return TRUE;
}
+5 -3
View File
@@ -108,9 +108,7 @@ HCURSOR GUIAPI LoadCursorFromMem (const void* area)
return load_cursor_from_mem (area);
}
static BITMAP csr_bmp = {
BMP_TYPE_NORMAL, 0, 0, 0, 0, CURSORWIDTH, CURSORHEIGHT
};
static BITMAP csr_bmp;
/* Only called from InitCursor and client code. */
HCURSOR GUIAPI CreateCursor(int xhotspot, int yhotspot, int w, int h,
@@ -242,6 +240,10 @@ BOOL mg_InitCursor(void)
csrimgsize = GAL_GetBoxSize (__gal_screen, CURSORWIDTH, CURSORHEIGHT, &csrimgpitch);
/* always initialize fields by explicitly assignments */
csr_bmp.bmType = BMP_TYPE_NORMAL;
csr_bmp.bmWidth = CURSORWIDTH;
csr_bmp.bmHeight = CURSORHEIGHT;
csr_bmp.bmBitsPerPixel = __gal_screen->format->BitsPerPixel;
csr_bmp.bmBytesPerPixel = __gal_screen->format->BytesPerPixel;
csr_bmp.bmPitch = csrimgpitch;
+3 -6
View File
@@ -139,9 +139,7 @@ HCURSOR GUIAPI LoadCursorFromMem (const void* area)
return load_cursor_from_mem (area);
}
static BITMAP csr_bmp = {
BMP_TYPE_NORMAL, 0, 0, 0, 0, CURSORWIDTH, CURSORHEIGHT
};
static BITMAP csr_bmp;
/* Only called from InitCursor and client code. */
HCURSOR GUIAPI CreateCursor(int xhotspot, int yhotspot, int w, int h,
@@ -279,11 +277,10 @@ BOOL realInitCursor(void)
&csrimgpitch);
csr_bmp.bmType = BMP_TYPE_NORMAL;
csr_bmp.bmWidth = CURSORWIDTH;
csr_bmp.bmHeight = CURSORHEIGHT;
csr_bmp.bmBitsPerPixel = __gal_screen->format->BitsPerPixel;
csr_bmp.bmBytesPerPixel = __gal_screen->format->BytesPerPixel;
csr_bmp.bmWidth = CURSORWIDTH;
csr_bmp.bmHeight = CURSORHEIGHT;
csr_bmp.bmPitch = csrimgpitch;
if( !(savedbits = malloc(csrimgsize)) )
+5 -5
View File
@@ -97,7 +97,7 @@ GHANDLE __mg_layer;
/* always be zero for clients. */
BOOL __mg_switch_away;
void lock_zi_for_read (const ZORDERINFO* zi)
static void lock_zi_for_read (const ZORDERINFO* zi)
{
struct sembuf sb;
@@ -116,7 +116,7 @@ again:
}
void unlock_zi_for_read (const ZORDERINFO* zi)
static void unlock_zi_for_read (const ZORDERINFO* zi)
{
struct sembuf sb;
@@ -134,7 +134,7 @@ again:
}
}
void lock_zi_for_change (const ZORDERINFO* zi)
static void lock_zi_for_change (const ZORDERINFO* zi)
{
int clients = 0;
struct sembuf sb;
@@ -157,7 +157,7 @@ again:
}
}
void unlock_zi_for_change (const ZORDERINFO* zi)
static void unlock_zi_for_change (const ZORDERINFO* zi)
{
int clients = 0;
struct sembuf sb;
@@ -176,7 +176,7 @@ again:
}
}
inline void* get_zi_from_client(int cli)
static inline void* get_zi_from_client(int cli)
{
return (((cli>0)?mgClients[cli].layer:mgTopmostLayer)->zorder_info);
}
+236 -236
View File
File diff suppressed because it is too large Load Diff
+16 -6
View File
@@ -55,6 +55,8 @@
#include <stdlib.h>
#include <string.h>
#define _DEBUG
#include "common.h"
#ifndef __NOUNIX__
@@ -252,7 +254,7 @@ static void treat_longpress (PKEYEVENT ke, DWORD interval)
ke->event = KE_KEYLONGPRESS;
}
else
ke->event = 0;
ke->event = KE_KEYDOWN;
}
else if (interval >= __mg_key_alwayspress_time) {
if (flag2) {
@@ -261,7 +263,7 @@ static void treat_longpress (PKEYEVENT ke, DWORD interval)
ke->event = KE_KEYALWAYSPRESS;
}
else if (__mg_timer_counter - starttime < __mg_interval_time) {
ke->event = 0;
ke->event = KE_KEYDOWN;
}
else {
starttime = __mg_timer_counter;
@@ -278,7 +280,7 @@ static void treat_longpress (PKEYEVENT ke, DWORD interval)
ke->event = KE_KEYALWAYSPRESS;
}
else if (__mg_timer_counter - starttime < __mg_interval_time) {
ke->event = 0;
ke->event = KE_KEYDOWN;
}
else {
starttime = __mg_timer_counter;
@@ -291,7 +293,7 @@ static void treat_longpress (PKEYEVENT ke, DWORD interval)
ke->event = KE_KEYLONGPRESS;
}
else
ke->event = 0;
ke->event = KE_KEYDOWN;
}
}
}
@@ -465,8 +467,12 @@ BOOL kernel_GetLWEvent (int event, PLWEVENT lwe)
ke->scancode = olddownkey;
interval = __mg_timer_counter - ke_time;
treat_longpress (ke, interval);
if (ke->event == 0)
if (ke->event == 0) {
return 0;
}
else if (ke->event == KE_KEYDOWN) {
status |= KS_REPEATED;
}
}
make = (ke->event == KE_KEYDOWN)?1:0;
@@ -765,8 +771,12 @@ BOOL kernel_GetLWEvent (int event, PLWEVENT lwe)
ke->scancode = olddownkey;
interval = __mg_timer_counter - ke_time;
treat_longpress (ke, interval);
if (ke->event == 0)
if (ke->event == 0) {
return 0;
}
else if (ke->event == KE_KEYDOWN) {
status |= KS_REPEATED;
}
}
make = (ke->event == KE_KEYDOWN) ? 1 : 0;
+76 -50
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -160,6 +160,12 @@ GAL_Surface * GAL_CreateRGBSurface (Uint32 flags,
surface->flags &= ~GAL_HWSURFACE;
}
}
else {
/* set a static buff to pixels for empty surface */
static char buff[8];
surface->flags |= GAL_PREALLOC;
surface->pixels = buff;
}
/* Allocate an empty mapping */
surface->map = GAL_AllocBlitMap();
+29 -34
View File
File diff suppressed because it is too large Load Diff