tune code for _MGSCHEMA_COMPOSITING

This commit is contained in:
Vincent Wei
2020-01-13 18:02:56 +08:00
parent eead702d78
commit b45562d171
+35 -27
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/>.
*/
@@ -52,6 +52,8 @@
#ifndef GUI_ZORDER_H
#define GUI_ZORDER_H
#include "constants.h"
typedef struct _RECT4MASK {
unsigned short left, top, right, bottom;
} RECT4MASK;
@@ -89,10 +91,6 @@ typedef MASKRECT* PMASKRECT;
#define ZOF_TW_FLAG_MASK 0x00F00000
#define ZOF_TYPE_FLAG_MASK 0xFFF00000
#ifndef MAX_CAPTION_LEN
#define MAX_CAPTION_LEN 39
#endif
typedef struct _ZORDERNODE
{
DWORD flags;
@@ -111,7 +109,7 @@ typedef struct _ZORDERNODE
int prev;
/*The first position of mask rect.*/
int idx_mask_rect;
int idx_mask_rect;
} ZORDERNODE;
typedef ZORDERNODE* PZORDERNODE;
@@ -138,8 +136,10 @@ typedef struct _ZORDERINFO
int cli_trackmenu;
HWND ptmi_in_cli;
#if IS_SHAREDFB_SCHEMA
int zi_semid;
int zi_semnum;
#endif
/* The usage bitmap for mask rect. */
int size_maskrect_usage_bmp;
@@ -153,15 +153,6 @@ typedef struct _ZORDERINFO
} ZORDERINFO;
typedef ZORDERINFO* PZORDERINFO;
#define DEF_NR_MASKRECT 1024
#define DEF_NR_POPUPMENUS 16
#define DEF_NR_TOPMOSTS 16
#define DEF_NR_NORMALS 128
#if defined(_MGRM_THREADS) || defined(_MGRM_STANDALONE)
#define SHAREDRES_NR_GLOBALS 16//0
#endif
#define GET_ZORDERNODE(zi) (ZORDERNODE*)((char*)((zi)+1)+ \
(zi)->size_usage_bmp + \
sizeof(ZORDERNODE)*(DEF_NR_POPUPMENUS))
@@ -170,10 +161,9 @@ typedef ZORDERINFO* PZORDERINFO;
(ZORDERNODE*)((char*)((zi)+1)+ \
(zi)->size_usage_bmp)
int kernel_alloc_z_order_info (int nr_topmosts, int nr_normals);
void kernel_free_z_order_info (ZORDERINFO* zi);
int kernel_change_z_order_mask_rect (HWND pWin, const RECT4MASK* rc, int nr_rc);
int kernel_get_window_region (HWND pWin, CLIPRGN* region);
#if defined(_MGRM_THREADS) || defined(_MGRM_STANDALONE)
# define SHAREDRES_NR_GLOBALS 0
#endif
#define GET_MASKRECT_USAGEBMP(zi) \
((char *)((zi) + 1) + \
@@ -192,5 +182,23 @@ int kernel_get_window_region (HWND pWin, CLIPRGN* region);
#define SIZE_MASKRECT_USAGE_BMP \
((7 + DEF_NR_MASKRECT) / 8)
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#if IS_SHAREDFB_SCHEMA
int kernel_alloc_z_order_info (int nr_topmosts, int nr_normals);
#else
ZORDERINFO* kernel_alloc_z_order_info (int nr_topmosts, int nr_normals);
#endif
void kernel_free_z_order_info (ZORDERINFO* zi);
int kernel_change_z_order_mask_rect (HWND pWin, const RECT4MASK* rc, int nr_rc);
int kernel_get_window_region (HWND pWin, CLIPRGN* region);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif // GUI_ZORDER_H