mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-25 19:13:46 +08:00
cleanup and eliminate compilation errors
This commit is contained in:
+1
-1
@@ -5548,7 +5548,7 @@ MG_EXPORT const char* GetResPath (void);
|
||||
MG_EXPORT int SetResPath (const char* path);
|
||||
|
||||
/**
|
||||
* \fn int AddInnerRes (INNER_RES* inner_res, int count, BOOL copy)
|
||||
* \fn int AddInnerRes (const INNER_RES* inner_res, int count, BOOL copy)
|
||||
* \brief Add some incore resource into the resource manager in order to
|
||||
* call LoadResource to get those resource.
|
||||
*
|
||||
|
||||
+1
-1
@@ -2516,7 +2516,7 @@ static const RGB WindowsStdColor [] = {
|
||||
{0xFF, 0xFF, 0xFF}, // light white --15
|
||||
};
|
||||
|
||||
const RGB* __mg_bitmap_get_std_16c (void)
|
||||
const RGB* __mg_bmp_get_std_16c (void)
|
||||
{
|
||||
return WindowsStdColor;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ struct GlobalRes
|
||||
ReleaseProc release_proc;
|
||||
};
|
||||
|
||||
#if defined(_MGHAVE_CURSOR) || defined(_MGGAL_MLSHADOW) || defined(_MGUSE_SHAREDFB)
|
||||
static void add_global_res (int cli, void* key,
|
||||
void* res, ReleaseProc release_proc)
|
||||
{
|
||||
@@ -106,10 +107,13 @@ static void add_global_res (int cli, void* key,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // defined(_MGHAVE_CURSOR) || defined(_MGGAL_MLSHADOW) || defined(_MGUSE_SHAREDFB)
|
||||
|
||||
#ifdef _MGGAL_MLSHADOW
|
||||
extern int MLSHADOW_Server(void* request, void* reply);
|
||||
extern void srvMLSHADOW_DelSurface(void *res);
|
||||
extern int MLSHADOW_Server(void* request, void* reply);
|
||||
extern void srvMLSHADOW_DelSurface(void *res);
|
||||
#endif
|
||||
|
||||
static void del_global_res (int cli, void* key)
|
||||
{
|
||||
MG_Client* client = mgClients + cli;
|
||||
|
||||
@@ -74,7 +74,7 @@ const int __mg_cursors_offset [] = {
|
||||
766*11 + 326*9 + 518*2,
|
||||
};
|
||||
|
||||
const const unsigned char __mg_cursors_data[] = {
|
||||
const unsigned char __mg_cursors_data[] = {
|
||||
#ifdef __TARGET_FMSOFT__
|
||||
0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x20, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02,
|
||||
|
||||
@@ -86,9 +86,9 @@
|
||||
BOOL sysres_init_inner_resource()
|
||||
{
|
||||
#ifdef _MGINCORE_RES
|
||||
AddInnerRes(__mgir_bmp_inner_res, TABLESIZE(__mgir_bmp_inner_res), FALSE);
|
||||
AddInnerRes(__mgir_icon_inner_res, TABLESIZE(__mgir_icon_inner_res),FALSE);
|
||||
AddInnerRes(__mgir_font_inner_res, TABLESIZE(__mgir_font_inner_res),FALSE);
|
||||
AddInnerRes((INNER_RES*)__mgir_bmp_inner_res, TABLESIZE(__mgir_bmp_inner_res), FALSE);
|
||||
AddInnerRes((INNER_RES*)__mgir_icon_inner_res, TABLESIZE(__mgir_icon_inner_res),FALSE);
|
||||
AddInnerRes((INNER_RES*)__mgir_font_inner_res, TABLESIZE(__mgir_font_inner_res),FALSE);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+22
-15
@@ -11,40 +11,40 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
/*
|
||||
** resmgr.h: This head file include some functions for resource manager.
|
||||
** resmgr.h: This head file include some functions for resource manager.
|
||||
**
|
||||
** Create date: 2008/08/05
|
||||
**
|
||||
@@ -58,7 +58,7 @@ typedef struct _RES_TYPE_INFO{
|
||||
short type;
|
||||
unsigned short flag;
|
||||
int ops_ref;
|
||||
int def_source;
|
||||
int def_source;
|
||||
RES_TYPE_OPS *ops;
|
||||
}RES_TYPE_INFO;
|
||||
#define RETIF_AUTO_DELETE 0x01
|
||||
@@ -88,16 +88,23 @@ typedef struct _RES_ENTRY{
|
||||
|
||||
#define DEF_HASH_SIZE 97
|
||||
|
||||
typedef struct _HASH_TABLE{
|
||||
typedef struct _HASH_TABLE {
|
||||
int size; //size of array of entries
|
||||
int count; //count of current RES_ENTRY in table
|
||||
RES_ENTRY** entries;
|
||||
}HASH_TABLE;
|
||||
} HASH_TABLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
BOOL InitializeResManager(int hash_table_size);
|
||||
|
||||
void TerminateResManager(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define NEWEX(type, count) (type*)calloc(count,sizeof(type))
|
||||
#define NEW(type) NEWEX(type,1)
|
||||
|
||||
@@ -115,5 +122,5 @@ void TerminateResManager(void);
|
||||
|
||||
#define MG_RES_PATH "MG_RES_PATH"
|
||||
|
||||
#endif
|
||||
#endif /* RES_MANAGER_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user