cleanup code, see cleanup-code.sh

This commit is contained in:
Vincent Wei
2020-02-02 10:46:29 +08:00
parent d7c398fd4d
commit 8dbe2c63f1
49 changed files with 241 additions and 240 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
# templates
# sed -i 's/\<AAA\>/__AAA/g' `grep AAA -rl include/ src/`
# sed -i 's/\<AAA\>/__mgAAA/g' `grep AAA -rl include/ src/`
# sed -i 's/\<AAA\>/__mg_AAA/g' `grep AAA -rl include/ src/`
# sed -i 's/\<AAA\>/dbg_AAA/g' `grep AAA -rl include/ src/`
# sed -i 's/\<kernel_alloc_z_order_info\>/__kernel_alloc_z_order_info/g' `grep kernel_alloc_z_order_info -rl include/ src/`
# sed -i 's/\<kernel_free_z_order_info\>/__kernel_free_z_order_info/g' `grep kernel_free_z_order_info -rl include/ src/`
# sed -i 's/\<kernel_change_z_order_mask_rect\>/__kernel_change_z_order_mask_rect/g' `grep kernel_change_z_order_mask_rect -rl include/ src/`
# sed -i 's/\<kernel_get_window_region\>/__kernel_get_window_region/g' `grep kernel_get_window_region -rl include/ src/`
# sed -i 's/\<kernel_get_next_znode\>/__kernel_get_next_znode/g' `grep kernel_get_next_znode -rl include/ src/`
# sed -i 's/\<kernel_get_prev_znode\>/__kernel_get_prev_znode/g' `grep kernel_get_prev_znode -rl include/ src/`
# sed -i 's/\<gui_open_ime_window\>/__gui_open_ime_window/g' `grep gui_open_ime_window -rl include/ src/`
# sed -i 's/\<_begin_fill_bitmap\>/__mg_begin_fill_bitmap/g' `grep _begin_fill_bitmap -rl include/ src/`
# sed -i 's/\<_fill_bitmap_scanline\>/__mg_fill_bitmap_scanline/g' `grep _fill_bitmap_scanline -rl include/ src/`
# sed -i 's/\<_end_fill_bitmap\>/__mg_end_fill_bitmap/g' `grep _end_fill_bitmap -rl include/ src/`
# sed -i 's/\<DumpCtrlClassInfoTable\>/dbg_DumpCtrlClassInfoTable/g' `grep DumpCtrlClassInfoTable -rl include/ src/`
# sed -i 's/\<GetPixelUnderCursor\>/kernel_GetPixelUnderCursor/g' `grep GetPixelUnderCursor -rl include/ src/`
# sed -i 's/\<update_secondary_dc\>/__mg_update_secondary_dc/g' `grep update_secondary_dc -rl include/ src/`
# sed -i 's/\<initialize_scripteasy\>/font_InitializeScripteasy/g' `grep initialize_scripteasy -rl include/ src/`
# sed -i 's/\<uninitialize_scripteasy\>/font_UninitializeScripteasy/g' `grep uninitialize_scripteasy -rl include/ src/`
# sed -i 's/\<free_window_element_data\>/__mg_free_window_element_data/g' `grep free_window_element_data -rl include/ src/`
# sed -i 's/\<append_window_element_data\>/__mg_append_window_element_data/g' `grep append_window_element_data -rl include/ src/`
# sed -i 's/\<set_window_element_data\>/__mg_set_window_element_data/g' `grep set_window_element_data -rl include/ src/`
# sed -i 's/\<__compsor_check_znodes\>/__mg_compsor_check_znodes/g' `grep __compsor_check_znodes -rl include/ src/`
# sed -i 's/\<mg_linux_tty_init\>/__mg_linux_tty_init/g' `grep mg_linux_tty_init -rl include/ src/`
# sed -i 's/\<mg_linux_tty_enable_vt_switch\>/__mg_linux_tty_enable_vt_switch/g' `grep mg_linux_tty_enable_vt_switch -rl include/ src/`
# sed -i 's/\<mg_linux_tty_disable_vt_switch\>/__mg_linux_tty_disable_vt_switch/g' `grep mg_linux_tty_disable_vt_switch -rl include/ src/`
# sed -i 's/\<mg_linux_tty_switch_vt\>/__mg_linux_tty_switch_vt/g' `grep mg_linux_tty_switch_vt -rl include/ src/`
# sed -i 's/\<mg_linux_tty_fini\>/__mg_linux_tty_fini/g' `grep mg_linux_tty_fini -rl include/ src/`
# sed -i 's/\<DumpMenu\>/dbg_DumpMenu/g' `grep DumpMenu -rl include/ src/`
# sed -i 's/\<sysres_init_inner_resource\>/__sysres_init_inner_resource/g' `grep sysres_init_inner_resource -rl include/ src/`
# sed -i 's/\<sysres_get_system_res_path\>/__sysres_get_system_res_path/g' `grep sysres_get_system_res_path -rl include/ src/`
exit 0
+5 -7
View File
@@ -420,7 +420,7 @@ unsigned short font_GetBestScaleFactor (int height, int expect)
}
#ifdef _DEBUG
#ifdef _DEBUG_DEVFONT
#define PRINT_DEVFONTS(head, devfont, count) \
{ \
@@ -447,9 +447,7 @@ void dbg_dumpDevFonts (void)
PRINT_DEVFONTS (mb_dev_font_head, devfont, count);
_DBG_PRINTF ("========== End of MBDevFonts =========\n");
}
#endif
#endif /* _DEBUG_DEVFONT */
/***** Added in MiniGUI V2.2 for bitmap font *****/
@@ -847,7 +845,7 @@ BOOL font_InitIncoreFonts (void)
#endif
#ifdef _MGFONT_SEF
if(!initialize_scripteasy()) {
if(!font_InitializeScripteasy()) {
_WRN_PRINTF ("Can not initialize ScriptEasy fonts!\n");
return FALSE;
}
@@ -880,7 +878,7 @@ BOOL font_TerminateIncoreFonts (void)
#endif
#ifdef _MGFONT_SEF
uninitialize_scripteasy();
font_UninitializeScripteasy();
#endif
return TRUE;
@@ -1072,7 +1070,7 @@ static BOOL init_or_term_specifical_fonts (char* etc_section, BOOL is_unload)
if ((add_dev_font (font_name, font_file, TRUE)) == TRUE)
added_num++;
else if ((0 == __mg_path_joint(font_path, MAX_PATH + 1,
sysres_get_system_res_path(), font_file))
__sysres_get_system_res_path(), font_file))
&& ((add_dev_font (font_name, font_path, TRUE)) == TRUE))
added_num++;
}
+5 -5
View File
@@ -259,10 +259,10 @@ static void initialize_cert(void)
}
#endif
SE_EXPORT BOOL initialize_scripteasy(void)
SE_EXPORT BOOL font_InitializeScripteasy(void)
{
#if SE_MINIGUI_TRACE
printf("in initialize_scripteasy...\n");
printf("in font_InitializeScripteasy...\n");
#endif
if(is_se_initialized)
return TRUE;
@@ -280,7 +280,7 @@ SE_EXPORT BOOL initialize_scripteasy(void)
is_se_initialized = 1;
#if SE_MINIGUI_TRACE
printf("initialize_scripteasy complete...\n");
printf("font_InitializeScripteasy complete...\n");
#endif
#ifdef __NOUNIX__
@@ -290,10 +290,10 @@ SE_EXPORT BOOL initialize_scripteasy(void)
return TRUE;
}
SE_EXPORT void uninitialize_scripteasy(void)
SE_EXPORT void font_UninitializeScripteasy(void)
{
#ifndef SE_OPT_ARM
printf("in uninitialize_scripteasy...\n");
printf("in font_UninitializeScripteasy...\n");
#endif
if(!is_se_initialized)
return;
+2 -2
View File
@@ -206,7 +206,7 @@ BOOL GUIAPI HideCaretEx (HWND hWnd, BOOL ime)
}
if (ime) {
gui_open_ime_window (pWin, FALSE, (HWND)hWnd);
__gui_open_ime_window (pWin, FALSE, (HWND)hWnd);
}
return TRUE;
@@ -310,7 +310,7 @@ BOOL GUIAPI ShowCaretEx (HWND hWnd, BOOL ime)
/* XXX: In order to re-open ime window, we need to open ime window before checking fBlink flag
*/
if (ime) {
gui_open_ime_window (pWin, TRUE, (HWND)hWnd);
__gui_open_ime_window (pWin, TRUE, (HWND)hWnd);
}
if (pWin->pCaretInfo->fBlink)
+5 -5
View File
@@ -548,9 +548,9 @@ BOOL SetWindowExStyle (HWND hWnd, DWORD dwExStyle)
return TRUE;
}
#ifdef _DEBUG
#ifdef _DEBUG_CTRL
void mnuDumpCtrlClassInfo (PCTRLCLASSINFO cci)
static void DumpCtrlClassInfo (PCTRLCLASSINFO cci)
{
printf ("\tClass Name: %s\n", cci->name);
printf ("\tClass Cursor: %p\n", cci->hCursor);
@@ -559,7 +559,7 @@ void mnuDumpCtrlClassInfo (PCTRLCLASSINFO cci)
printf ("\tClass Use Count: %d\n", cci->nUseCount);
}
void DumpCtrlClassInfoTable()
void dbg_DumpCtrlClassInfoTable (void)
{
PCTRLCLASSINFO cci;
int i;
@@ -570,12 +570,12 @@ void DumpCtrlClassInfoTable()
printf ("CCI Table Element: %d\n", i);
while (cci) {
mnuDumpCtrlClassInfo (cci);
DumpCtrlClassInfo (cci);
cci = cci->next;
}
}
}
#endif
#endif /* _DEBUG_CTRL */
+6 -6
View File
@@ -300,7 +300,7 @@ BOOL GUIAPI SetWindowElementRenderer (HWND hWnd, const char* werdr_name,
update = TRUE;
for (i = 0; we_attrs[i].we_attr_id != -1; ++i)
{
append_window_element_data (&pwnd->wed,
__mg_append_window_element_data (&pwnd->wed,
we_attrs[i].we_attr_id, we_attrs[i].we_attr);
}
}
@@ -444,7 +444,7 @@ static int get_window_element_data (HWND hwnd, Uint32 id, DWORD* data)
}
int
set_window_element_data (HWND hwnd, Uint32 id, DWORD new_data, DWORD* old_data)
__mg_set_window_element_data (HWND hwnd, Uint32 id, DWORD new_data, DWORD* old_data)
{
PMAINWIN pwnd = (PMAINWIN)hwnd;
WND_ELEMENT_DATA* new_wed;
@@ -542,7 +542,7 @@ set_window_element_data (HWND hwnd, Uint32 id, DWORD new_data, DWORD* old_data)
return WED_NEW_DATA;
}
int free_window_element_data (HWND hwnd)
int __mg_free_window_element_data (HWND hwnd)
{
PMAINWIN pwnd = (PMAINWIN)hwnd;
WND_ELEMENT_DATA* wed;
@@ -573,8 +573,8 @@ int free_window_element_data (HWND hwnd)
return WED_OK;
}
int append_window_element_data (WND_ELEMENT_DATA** wed, Uint32 id, DWORD data)
//int append_window_element_data (PMAINWIN pwnd, Uint32 id, DWORD data)
int __mg_append_window_element_data (WND_ELEMENT_DATA** wed, Uint32 id, DWORD data)
//int __mg_append_window_element_data (PMAINWIN pwnd, Uint32 id, DWORD data)
{
WND_ELEMENT_DATA* new_wed;
@@ -691,7 +691,7 @@ DWORD GUIAPI SetWindowElementAttr (HWND hwnd, int we_attr_id, DWORD we_attr)
}
}
if (set_window_element_data (hwnd, we_attr_id, we_attr, &old_data) >= 0)
if (__mg_set_window_element_data (hwnd, we_attr_id, we_attr, &old_data) >= 0)
return old_data;
return -1;
+4 -4
View File
@@ -1223,9 +1223,9 @@ int GUIAPI SetMenuItemBitmaps (HMENU hmnu, LINT item, UINT flags,
return 0;
}
#ifdef _DEBUG
#ifdef _DEBUG_MENU
void mnuDumpMenuItem (PMENUITEM pmi)
static void mnuDumpMenuItem (PMENUITEM pmi)
{
PMENUITEM ptmpmi;
@@ -1256,7 +1256,7 @@ void mnuDumpMenuItem (PMENUITEM pmi)
printf ("End of Info of Menu Item: 0x%p\n", pmi);
}
void DumpMenu (HMENU hmnu)
void dbg_DumpMenu (HMENU hmnu)
{
PMENUBAR pmb;
PMENUITEM pmi;
@@ -1287,7 +1287,7 @@ void DumpMenu (HMENU hmnu)
mnuDumpMenuItem (pmi);
}
}
#endif // _DEBUG
#endif // _DEBUG_MENU
/***************************** Menu owner ***********************************/
// Global function defined in Desktop module.
+15 -15
View File
@@ -681,7 +681,7 @@ BOOL wndGetHScrollBarRect (const MAINWIN* pWin,
/* rc: position relative to secondary_dc, so need transform
* it relative to real_dc(screen).*/
void update_secondary_dc (PMAINWIN pWin, HDC secondary_dc,
void __mg_update_secondary_dc (PMAINWIN pWin, HDC secondary_dc,
HDC real_dc, const RECT* rc, DWORD flags)
{
PDC pdc_main;
@@ -794,7 +794,7 @@ static void draw_secondary_nc_area (PMAINWIN pWin,
break;
if (!IsRectEmpty(&rc)){
update_secondary_dc (pWin, hdc, real_dc, &rc, flags);
__mg_update_secondary_dc (pWin, hdc, real_dc, &rc, flags);
}
} while (FALSE);
@@ -2097,7 +2097,7 @@ void gui_WndClientRect(HWND hWnd, PRECT prc)
}
extern HWND __mg_ime_wnd;
void gui_open_ime_window (PMAINWIN pWin, BOOL open_close, HWND rev_hwnd)
void __gui_open_ime_window (PMAINWIN pWin, BOOL open_close, HWND rev_hwnd)
{
#ifndef _MGRM_PROCESSES
if (__mg_ime_wnd && pWin) {
@@ -2318,7 +2318,7 @@ static void wndEraseBackground(const PMAINWIN pWin,
if (pWin->pMainWin->secondaryDC) {
HDC real_dc = HDC_INVALID;
real_dc = GetClientDC ((HWND)pWin->pMainWin);
update_secondary_dc ((PMAINWIN)pWin, hdc, real_dc, &rcTemp, HT_CLIENT);
__mg_update_secondary_dc ((PMAINWIN)pWin, hdc, real_dc, &rcTemp, HT_CLIENT);
ReleaseDC (real_dc);
}
#endif
@@ -2665,7 +2665,7 @@ LRESULT PreDefMainWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
return DefaultSystemMsgHandler(pWin, message, wParam, lParam);
#if (defined(_MG_ENABLE_SCREENSAVER) || defined(_MG_ENABLE_WATERMARK)) && defined(_MGRM_THREADS)
else if (message == MSG_CANCELSCREENSAVER) {
screensaver_hide();
__mg_screensaver_hide();
SendNotifyMessage (HWND_DESKTOP, MSG_PAINT, 0, 0);
}
#endif
@@ -3750,10 +3750,10 @@ HWND GUIAPI CreateMainWindowEx2 (PMAINWINCREATE pCreateInfo,
/** set window element data */
while (we_attrs && we_attrs->we_attr_id != -1) {
// append_window_element_data (pWin,
// __mg_append_window_element_data (pWin,
// we_attrs->we_attr_id, we_attrs->we_attr);
DWORD _old;
set_window_element_data ((HWND)pWin,
__mg_set_window_element_data ((HWND)pWin,
we_attrs->we_attr_id, we_attrs->we_attr, &_old);
++we_attrs;
}
@@ -3936,7 +3936,7 @@ BOOL GUIAPI DestroyMainWindow (HWND hWnd)
#endif
EmptyClipRgn (&pWin->InvRgn.rgn);
free_window_element_data (hWnd);
__mg_free_window_element_data (hWnd);
--pWin->we_rdr->refcount;
#ifdef _MGRM_THREADS
@@ -5129,7 +5129,7 @@ void GUIAPI EndPaint (HWND hWnd, HDC hdc)
HDC real_dc = HDC_INVALID;
real_dc = GetClientDC ((HWND)pWin->pMainWin);
update_secondary_dc (pWin, hdc, real_dc,
__mg_update_secondary_dc (pWin, hdc, real_dc,
&pWin->pMainWin->update_rc, HT_CLIENT);
ReleaseDC (real_dc);
}
@@ -5320,10 +5320,10 @@ HWND GUIAPI CreateWindowEx2 (const char* spClassName,
/** set window element data */
while (we_attrs && we_attrs->we_attr_id != -1)
{
//append_window_element_data (pNewCtrl,
//__mg_append_window_element_data (pNewCtrl,
// we_attrs->we_attr_id, we_attrs->we_attr);
DWORD _old;
set_window_element_data ((HWND)pNewCtrl,
__mg_set_window_element_data ((HWND)pNewCtrl,
we_attrs->we_attr_id, we_attrs->we_attr, &_old);
++we_attrs;
}
@@ -5545,7 +5545,7 @@ BOOL GUIAPI DestroyWindow (HWND hWnd)
if (pCtrl->spCaption)
FreeFixStr (pCtrl->spCaption);
free_window_element_data (hWnd);
__mg_free_window_element_data (hWnd);
--pCtrl->we_rdr->refcount;
free (pCtrl);
@@ -6064,7 +6064,7 @@ static int gui_GenerateMaskRect(HWND hWnd, RECT4MASK* rect, int rect_size)
}
}
retval = kernel_change_z_order_mask_rect (hWnd, rect, rect_size);
retval = __kernel_change_z_order_mask_rect (hWnd, rect, rect_size);
free (rect);
pCtrl = (PCONTROL)hWnd;
@@ -6207,7 +6207,7 @@ BOOL GUIAPI SetWindowRegion (HWND hWnd, const CLIPRGN * region)
cliprc = cliprc->next;
}
retval = kernel_change_z_order_mask_rect (hWnd, rect, rect_size);
retval = __kernel_change_z_order_mask_rect (hWnd, rect, rect_size);
free (rect);
pCtrl = (PCONTROL) hWnd;
@@ -6255,7 +6255,7 @@ BOOL GUIAPI GetWindowRegion (HWND hWnd, CLIPRGN* region)
}
}
else {
return kernel_get_window_region (hWnd, region) > 0;
return __kernel_get_window_region (hWnd, region) > 0;
}
return TRUE;
+3 -3
View File
@@ -161,7 +161,7 @@ static int keyboard_update(void)
(my_ctxt.last_keycode <= SCANCODE_F10) &&
my_ctxt.kbd_state[my_ctxt.last_keycode])) {
if (mg_linux_tty_switch_vt(my_ctxt.last_keycode - SCANCODE_F1 + 1) == 0) {
if (__mg_linux_tty_switch_vt(my_ctxt.last_keycode - SCANCODE_F1 + 1) == 0) {
my_ctxt.kbd_state[my_ctxt.last_keycode] = 0;
my_ctxt.kbd_state[SCANCODE_LEFTCONTROL] = 0;
my_ctxt.kbd_state[SCANCODE_LEFTALT] = 0;
@@ -1383,7 +1383,7 @@ static void set_leds (unsigned int leds)
BOOL InitLibInput (INPUT* input, const char* mdev, const char* mtype)
{
if (mg_linux_tty_enable_vt_switch() == 0) {
if (__mg_linux_tty_enable_vt_switch() == 0) {
_DBG_PRINTF("IAL>LIBINPUT: vt switch enabled\n");
my_ctxt.vt_switch = 1;
}
@@ -1449,7 +1449,7 @@ void TermLibInput (void)
my_ctxt.li = NULL;
my_ctxt.udev = NULL;
mg_linux_tty_disable_vt_switch();
__mg_linux_tty_disable_vt_switch();
}
#endif /* _MGIAL_LIBINPUT */
+7 -7
View File
@@ -134,7 +134,7 @@ static void vt_switch_requested(int signo)
}
/* Init linux tty module, and returns the tty fd */
int mg_linux_tty_init(BOOL graf_mode)
int __mg_linux_tty_init(BOOL graf_mode)
{
const char* tty_dev;
if (geteuid() == 0)
@@ -173,14 +173,14 @@ fail:
return -1;
}
int mg_linux_tty_enable_vt_switch(void)
int __mg_linux_tty_enable_vt_switch(void)
{
struct sigaction sa;
struct vt_mode vtm;
struct vt_stat stat;
if (ttyfd < 0) {
if (mg_linux_tty_init(FALSE) < 0)
if (__mg_linux_tty_init(FALSE) < 0)
goto fail;
}
@@ -227,7 +227,7 @@ fail:
return -1;
}
int mg_linux_tty_disable_vt_switch(void)
int __mg_linux_tty_disable_vt_switch(void)
{
struct sigaction sa;
@@ -247,13 +247,13 @@ int mg_linux_tty_disable_vt_switch(void)
return 0;
}
int mg_linux_tty_fini(void)
int __mg_linux_tty_fini(void)
{
if (ttyfd < 0)
return -1;
if (vtswitch_initialized) {
mg_linux_tty_disable_vt_switch();
__mg_linux_tty_disable_vt_switch();
}
if (old_kd_mode >= 0) {
@@ -265,7 +265,7 @@ int mg_linux_tty_fini(void)
return 0;
}
int mg_linux_tty_switch_vt(int vt)
int __mg_linux_tty_switch_vt(int vt)
{
if (ttyfd < 0 || !vtswitch_initialized || vt == current_vt)
return -1;
+1 -1
View File
@@ -6,5 +6,5 @@ noinst_HEADERS = \
readbmp.h icon.h blockheap.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 \
md5.h glyph.h license.h mgsock.h unicode-ops.h \
glyph.h license.h mgsock.h unicode-ops.h \
linux-tty.h
+4 -3
View File
@@ -84,12 +84,13 @@ extern "C" {
int __mg_bmp_compute_pitch (int bpp, Uint32 width, Uint32 *pitch, BOOL does_round);
PDC _begin_fill_bitmap (HDC hdc, int x, int y, int w, int h,
PDC __mg_begin_fill_bitmap (HDC hdc, int x, int y, int w, int h,
const BITMAP* bmp, FILLINFO *fill_info);
void _fill_bitmap_scanline (PDC pdc, const BITMAP* bmp,
void __mg_fill_bitmap_scanline (PDC pdc, const BITMAP* bmp,
FILLINFO *fill_info, int y);
void _end_fill_bitmap (PDC pdc, const BITMAP* bmp, FILLINFO *fill_info);
void __mg_end_fill_bitmap (PDC pdc, const BITMAP* bmp, FILLINFO *fill_info);
/* Undisclosed API */
MG_EXPORT int GUIAPI EncodeRleBitmap(HDC hdc, PBITMAP bmp);
#ifdef __cplusplus
+3 -3
View File
@@ -57,8 +57,8 @@
#define BDS_USED 0x0002
#ifndef _MGUI_GDI_H /* included in include/gdi.h */
typedef struct tagBLOCKHEAP
{
typedef struct tagBLOCKHEAP {
#ifdef _MGRM_THREADS
pthread_mutex_t lock;
#endif
@@ -84,7 +84,7 @@ void DestroyBlockDataHeap (PBLOCKHEAP heap);
}
#endif /* __cplusplus */
#endif /* GUI_GDI_H */
#endif /* not defined GUI_GDI_H */
#endif /* GUI_BLOCKHEAP_H */
+8 -5
View File
@@ -49,9 +49,11 @@
** Create Date: 2003/12/xx
*/
#ifndef MG_CLIPBOARD
#define MG_CLIPBOARD
#ifndef MG_CLIPBOARD_H
#define MG_CLIPBOARD_H
#ifdef _MGHAVE_CLIPBOARD
#define CLIPBOARD_BUFFLENGTH 1024
#ifdef _cplusplus
@@ -80,10 +82,11 @@ typedef struct _REQ_CLIPBOARD
} REQ_CLIPBOARD;
#ifdef _cplusplus
}
#endif /* _cplusplus */
#endif
#endif
#endif /* defined _MGHAVE_CLIPBOARD */
#endif /* not defined MG_CLIPBOARD_H */
+6 -4
View File
@@ -211,15 +211,17 @@ void mg_TerminateControlClass (void);
PCTRLCLASSINFO gui_GetControlClassInfo (const char* szClassName);
int gui_ControlClassDataOp (int Operation, PWNDCLASS pWndClass);
MG_EXPORT int AddNewControlClass (PWNDCLASS pWndClass);
MG_EXPORT BOOL SetWindowExStyle (HWND hWnd, DWORD dwExStyle);
int gui_DeleteControlClass (const char* szClassName);
void gui_EmptyControlClassInfoTable (void);
PCONTROL gui_Control (HWND hWnd); // check whether hWnd is control
// and return pointer to control hWnd.
#ifdef _DEBUG
void DumpCtrlClassInfoTable (void);
/* Undisclosed APIs */
MG_EXPORT int AddNewControlClass (PWNDCLASS pWndClass);
MG_EXPORT BOOL SetWindowExStyle (HWND hWnd, DWORD dwExStyle);
#ifdef _DEBUG_CTRL
void dbg_DumpCtrlClassInfoTable (void);
#endif
#ifdef __cplusplus
+1 -1
View File
@@ -113,7 +113,7 @@ void kernel_ReShowCursor (void);
#else /* _MGRM_THREADS */
Uint8* GetPixelUnderCursor (int x, int y, gal_pixel* pixel);
Uint8* kernel_GetPixelUnderCursor (int x, int y, gal_pixel* pixel);
#endif /* _MGRM_THREADS */
+1 -2
View File
@@ -573,7 +573,6 @@ do { \
(__mg_switch_away && pdc->surface == __gal_screen)
#endif /* defined _MGRM_THREADS */
int __mg_enter_drawing (PDC pdc);
void __mg_enter_drawing_nocheck (PDC pdc);
void __mg_leave_drawing (PDC pdc);
@@ -702,7 +701,7 @@ static inline void release_valid_dc (PMAINWIN pWin, HDC hdc)
}
}
void update_secondary_dc (PMAINWIN pWin, HDC secondary_dc,
void __mg_update_secondary_dc (PMAINWIN pWin, HDC secondary_dc,
HDC real_dc, const RECT* rc, DWORD flags);
#ifdef __cplusplus
+3 -3
View File
@@ -113,8 +113,8 @@ void font_TermFreetypeLibrary (void);
#endif
#ifdef _MGFONT_SEF
BOOL initialize_scripteasy(void);
void uninitialize_scripteasy(void);
BOOL font_InitializeScripteasy(void);
void font_UninitializeScripteasy(void);
#endif
BOOL font_InitSpecificalFonts (char* etc_section);
@@ -153,7 +153,7 @@ unsigned short font_GetBestScaleFactor (int height, int expect);
void font_DelSBDevFont (DEVFONT* dev_font);
void font_DelMBDevFont (DEVFONT* dev_font);
#ifdef _DEBUG
#ifdef _DEBUG_DEVFONT
void dbg_dumpDevFonts (void);
#endif
+3 -3
View File
@@ -75,9 +75,9 @@ typedef struct _wnd_element_data
#define WED_NOTFOUND -3
#define WED_MEMERR -4
extern int free_window_element_data (HWND hwnd);
extern int append_window_element_data (WND_ELEMENT_DATA** wed, Uint32 id, DWORD data);
extern int set_window_element_data (HWND hwnd, Uint32 id, DWORD new_data, DWORD* old_data);
int __mg_free_window_element_data (HWND hwnd);
int __mg_append_window_element_data (WND_ELEMENT_DATA** wed, Uint32 id, DWORD data);
int __mg_set_window_element_data (HWND hwnd, Uint32 id, DWORD new_data, DWORD* old_data);
#ifdef __cplusplus
}
+11 -11
View File
@@ -111,6 +111,17 @@ typedef LWEVENT* PLWEVENT;
#define LWETYPE_KEY 1
#define LWETYPE_MOUSE 2
// Mouse event parameters.
#define MOUSEPARA "mouse"
#define MOUSEPARA_DBLCLICKTIME "dblclicktime"
#define DEF_MSEC_DBLCLICK 300
#define EVENTPARA "event"
#define EVENTPARA_REPEATUSEC "repeatusec"
#define EVENTPARA_TIMEOUTUSEC "timeoutusec"
#define DEF_USEC_TIMEOUT 300000
#define DEF_REPEAT_TIME 50000
/* Function definitions */
#ifdef __cplusplus
extern "C" {
@@ -123,17 +134,6 @@ void mg_TerminateLWEvent (void);
// Low level event support
BOOL kernel_GetLWEvent (int event, PLWEVENT lwe);
// Mouse event parameters.
#define MOUSEPARA "mouse"
#define MOUSEPARA_DBLCLICKTIME "dblclicktime"
#define DEF_MSEC_DBLCLICK 300
#define EVENTPARA "event"
#define EVENTPARA_REPEATUSEC "repeatusec"
#define EVENTPARA_TIMEOUTUSEC "timeoutusec"
#define DEF_USEC_TIMEOUT 300000
#define DEF_REPEAT_TIME 50000
#ifdef __cplusplus
}
#endif /* __cplusplus */
+3 -2
View File
@@ -43,8 +43,9 @@
* For more information about the commercial license, please refer to
* <http://www.minigui.com/blog/minigui-licensing-policy/>.
*/
// $Id: gif.h 241 2000-01-08 09:10:27Z weiym $
//
/*
** NOTE THAT THIS FILE IS DEPRECATED.
*/
#ifndef _GIF_H_
#define _GIF_H_
+5 -15
View File
@@ -45,17 +45,15 @@
*/
/*
** hash.h: header file of hash operations.
** NOTE THAT THIS FILE IS DEPRECATED.
*/
#ifndef _MG_HASH_H
#define _MG_HASH_H
#ifdef __cplusplus
extern "C"
{
#endif
extern "C" {
#endif /* __cplusplus */
#define HASHTABLE_MIN_SIZE 32 /* default hash table size */
#define HASHTABLE_MAX_SIZE 40960
@@ -63,20 +61,16 @@ extern "C"
#define HASH_THREAD_SAFE 0x00000001 /* thread safe flag */
#define HASH_RESIZABLE 0x00000002 /* resizable flag */
typedef GHANDLE (*HASHFUNC) (GHANDLE key);
typedef BOOL (*EQUALFUNC) (GHANDLE keya, GHANDLE keyb);
typedef struct _HASHNODE
{
typedef struct _HASHNODE {
GHANDLE key;
GHANDLE value;
struct _HASHNODE *next;
} HASHNODE;
typedef struct _HASHTABLE
{
typedef struct _HASHTABLE {
DWORD dwFlags;
HASHNODE **pNodes;
@@ -91,7 +85,6 @@ typedef struct _HASHTABLE
#endif
} HASHTABLE;
HASHTABLE* HashTableCreate (void* memStart, size_t hash_size, BOOL bThreadSafe,
HASHFUNC hash_func, EQUALFUNC equal_func);
void HashTableDestroy (HASHTABLE *hash_table);
@@ -99,12 +92,9 @@ GHANDLE HashTableLookup (HASHTABLE *hash_table, GHANDLE key);
int HashTableInsert (HASHTABLE *hash_table, GHANDLE key, GHANDLE value);
BOOL HashTableRemove (HASHTABLE *hash_table, GHANDLE key);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _MG_HASH_H */
+3 -11
View File
@@ -60,13 +60,6 @@
/* Internal window message. */
#if (defined(_MG_ENABLE_SCREENSAVER) || defined(_MG_ENABLE_WATERMARK)) && defined(_MGRM_THREADS)
#define MSG_CANCELSCREENSAVER 0x0201
#if defined(__GNUC__) && (__GNUC__ >= 4)
__attribute__ ((visibility ("hidden"))) void screensaver_hide(void);
#else
void screensaver_hide(void);
#endif
#endif
/* Internal use extended style. */
@@ -404,7 +397,6 @@ typedef struct _MAINWIN
} MAINWIN;
/************************* Initialization/Termination ************************/
void __mg_init_local_sys_text (void);
/* the zorder information of the server */
@@ -456,7 +448,7 @@ BOOL mg_InitDesktop (void);
void mg_TerminateDesktop (void);
/* send MSG_IME_OPEN/CLOSE message to ime window */
void gui_open_ime_window (PMAINWIN pWin, BOOL open_close, HWND rev_hwnd);
void __gui_open_ime_window (PMAINWIN pWin, BOOL open_close, HWND rev_hwnd);
/* return main window contains hWnd. */
PMAINWIN gui_GetMainWindowPtrOfControl (HWND hWnd);
@@ -629,7 +621,7 @@ BOOL gui_LoadIconRes(HDC hdc, const char* rdr_name, char* file);
void gui_WndRect(HWND hWnd, PRECT prc);
void gui_WndClientRect(HWND hWnd, PRECT prc);
/* Move from dc.h */
/* Undisclosed APIs */
HDC GetSecondarySubDC (HDC secondary_dc, HWND hwnd_child, BOOL client);
void ReleaseSecondarySubDC (HDC secondary_subdc);
HDC CreateMemDCFromSurface (struct GAL_Surface* surface);
@@ -650,7 +642,7 @@ int __mg_free_mutual_sem (SemSetManager* manager, int sem_num);
#ifdef _MGSCHEMA_COMPOSITING
BOOL mg_InitCompositor (void);
void mg_TerminateCompositor (void);
void __compsor_check_znodes (void);
void __mg_compsor_check_znodes (void);
#endif
#ifdef __cplusplus
+3 -2
View File
@@ -43,8 +43,9 @@
* For more information about the commercial license, please refer to
* <http://www.minigui.com/blog/minigui-licensing-policy/>.
*/
// $Id: jpg.h 241 2000-01-08 09:10:27Z weiym $
//
/*
** NOTE THAT THIS FILE IS DEPRECATED.
*/
#ifndef _JPG_H_
#define _JPG_H_
+5 -5
View File
@@ -56,11 +56,11 @@
extern "C" {
#endif /* __cplusplus */
int mg_linux_tty_init(BOOL graf_mode);
int mg_linux_tty_enable_vt_switch(void);
int mg_linux_tty_disable_vt_switch(void);
int mg_linux_tty_switch_vt(int vt);
int mg_linux_tty_fini(void);
int __mg_linux_tty_init(BOOL graf_mode);
int __mg_linux_tty_enable_vt_switch(void);
int __mg_linux_tty_disable_vt_switch(void);
int __mg_linux_tty_switch_vt(int vt);
int __mg_linux_tty_fini(void);
#ifdef __cplusplus
}
+1 -4
View File
@@ -44,14 +44,11 @@
* <http://www.minigui.com/blog/minigui-licensing-policy/>.
*/
/*
** $Id$
**
** md5.h: the head file of md5 algorithm.
**
** Create date: 2004/05/10
*/
#ifndef _MD5_H
#define _MD5_H
@@ -75,7 +72,7 @@ typedef struct {
unsigned char buffer[64]; /* input buffer */
} MD5_CTX;
void get_md5 (const unsigned char *string, unsigned char digest[16]);
void __mg_get_md5 (const unsigned char *string, unsigned char digest[16]);
#ifdef __cplusplus
}
+3 -3
View File
@@ -145,9 +145,9 @@ typedef struct _TRACKMENUINFO
extern "C" {
#endif /* __cplusplus */
#ifdef _DEBUG
void DumpMenu (HMENU hmnu);
#endif /* _DEBUG */
#ifdef _DEBUG_MENU
void dbg_DumpMenu (HMENU hmnu);
#endif /* _DEBUG_MENU */
#ifdef __cplusplus
}
+4
View File
@@ -108,7 +108,11 @@ MG_Layer* __mg_find_layer_by_name (const char* name);
int __mg_do_drag_drop_window (int msg, int x, int y);
#ifdef _MGSCHEMA_SHAREDFB
void __mg_check_dirty_znode (int cli);
#else
static inline void __mg_check_dirty_znode (int cli) {}
#endif
BOOL __mg_move_client_to_layer (MG_Client* client, MG_Layer* layer);
+2 -2
View File
@@ -72,8 +72,8 @@ static inline PCURSOR sysres_load_system_cursor (int i) {
}
#endif /* _MGHAVE_CURSOR */
BOOL sysres_init_inner_resource(void);
const char* sysres_get_system_res_path(void);
BOOL __sysres_init_inner_resource(void);
const char* __sysres_get_system_res_path(void);
#ifdef __cplusplus
}
+9 -8
View File
@@ -86,9 +86,10 @@ typedef struct _ZORDERNODE {
unsigned int dirty_age; /* the dirty age of this znode */
int nr_dirty_rcs; /* the number of dirty rects */
const RECT* dirty_rcs; /* the pointer to the dirty rectangles */
#endif
#else /* defined _MGSCHEMA_COMPOSITING */
RECT dirty_rc; /* dirty rect */
#endif /* not defined _MGSCHEMA_COMPOSITING */
int idx_mask_rect; /* The first position of mask rect. */
int _padding;
@@ -172,12 +173,12 @@ typedef ZORDERINFO* PZORDERINFO;
extern "C" {
#endif /* __cplusplus */
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);
int kernel_get_next_znode (const ZORDERINFO* zi, int from);
int kernel_get_prev_znode (const ZORDERINFO* zi, int from);
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);
int __kernel_get_next_znode (const ZORDERINFO* zi, int from);
int __kernel_get_prev_znode (const ZORDERINFO* zi, int from);
#ifdef __cplusplus
}
+2 -2
View File
@@ -148,7 +148,7 @@ void mg_TerminateCompositor (void)
dlclose (dl_handle);
}
void __compsor_check_znodes (void)
void __mg_compsor_check_znodes (void)
{
ZORDERINFO* zi;
ZORDERNODE* nodes;
@@ -180,7 +180,7 @@ void __compsor_check_znodes (void)
// travel win znodes
nodes = GET_ZORDERNODE(zi);
next = 0;
while ( (next = kernel_get_next_znode (zi, next)) > 0) {
while ( (next = __kernel_get_next_znode (zi, next)) > 0) {
if (nodes [next].flags & ZOF_VISIBLE) {
pdc = dc_HDC2PDC (nodes[next].mem_dc);
assert (pdc->surface->shared_header);
+1 -1
View File
@@ -105,7 +105,7 @@ static int oldboxleft = -100, oldboxtop = -100;
static int nShowCount = 0;
static PCURSOR pCurCsr = NULL;
Uint8* GetPixelUnderCursor (int x, int y, gal_pixel* pixel)
Uint8* kernel_GetPixelUnderCursor (int x, int y, gal_pixel* pixel)
{
Uint8* dst = NULL;
+3 -3
View File
@@ -59,7 +59,7 @@ extern int __mg_enter_terminategui;
#if defined(_MGRM_THREADS) || defined(_MGRM_STANDALONE)
int kernel_change_z_order_mask_rect (HWND pWin, const RECT4MASK* rc, int nr_rc)
int __kernel_change_z_order_mask_rect (HWND pWin, const RECT4MASK* rc, int nr_rc)
{
FreeZOrderMaskRect (0, ((PMAINWIN)pWin)->idx_znode);
return AllocZOrderMaskRect (0, ((PMAINWIN)pWin)->idx_znode,
@@ -113,7 +113,7 @@ void mg_TerminateDesktop (void)
pthread_mutex_destroy(&sg_ScrGCRInfo.lock);
#endif
kernel_free_z_order_info (__mg_zorder_info);
__kernel_free_z_order_info (__mg_zorder_info);
__mg_zorder_info = NULL;
DestroyFreeClipRectList (&sg_FreeClipRectList);
DestroyFreeClipRectList (&sg_FreeInvRectList);
@@ -617,7 +617,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
//the secondaryDC and clientDC are same (dongjunjie 2010/07/08)
if(pWin->pMainWin->secondaryDC){
HDC real_dc = GetClientDC((HWND)pWin->pMainWin);
update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
ReleaseDC (real_dc);
}
release_valid_dc(pWin, hdc);
+8 -5
View File
@@ -796,7 +796,7 @@ static int srvFreeZOrderMaskRect (int cli, int idx_znode)
return FreeZOrderMaskRect (cli, idx_znode);
}
int kernel_change_z_order_mask_rect (HWND pWin, const RECT4MASK* rc, int nr_rc)
int __kernel_change_z_order_mask_rect (HWND pWin, const RECT4MASK* rc, int nr_rc)
{
if (!rc || !nr_rc)
return -1;
@@ -865,6 +865,8 @@ static int srvAllocZOrderNode (int cli, HWND hwnd, HWND main_win,
return free_slot;
}
#ifdef _MGSCHEMA_SHAREDFB
/* only work for _MGSCHEMA_SHAREDFB */
static BOOL _cb_update_cli_znode (void* context,
const ZORDERINFO* zi, ZORDERNODE* znode)
{
@@ -897,10 +899,11 @@ void __mg_check_dirty_znode (int cli)
ZORDERINFO* zi = (ZORDERINFO *)get_zi_from_client (cli);
do_for_all_znodes ((void*)(intptr_t)cli, zi,
_cb_update_cli_znode, ZT_TOPMOST | ZT_NORMAL);
_cb_update_cli_znode, ZT_ALL & ~ZT_GLOBAL);
mgClients [cli].has_dirty = FALSE;
}
#endif /* defined _MGSCHEMA_SHAREDFB */
static intptr_t srvSetActiveWindow (int cli, int idx_znode)
{
@@ -2253,7 +2256,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
//the secondaryDC and clientDC are same (dongjunjie 2010/07/08)
if(pWin->pMainWin->secondaryDC){
HDC real_dc = GetClientDC((HWND)pWin->pMainWin);
update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
ReleaseDC (real_dc);
}
release_valid_dc(pWin, hdc);
@@ -2497,7 +2500,7 @@ BOOL __mg_move_client_to_layer (MG_Client* client, MG_Layer* dst_layer)
/* number of znodes of the client */
do {
if ((next = kernel_get_next_znode (src_zi, from)) <= 0)
if ((next = __kernel_get_next_znode (src_zi, from)) <= 0)
break;
if (src_nodes [next].cli == cli) {
@@ -2524,7 +2527,7 @@ BOOL __mg_move_client_to_layer (MG_Client* client, MG_Layer* dst_layer)
/* nr znodes of the client */
do {
if ((next = kernel_get_next_znode (src_zi, from)) <= 0)
if ((next = __kernel_get_next_znode (src_zi, from)) <= 0)
break;
if (src_nodes [next].cli == cli) {
+1 -1
View File
@@ -106,7 +106,7 @@ BOOL mg_InitDesktop (void)
/*
* Init ZOrderInfo here.
*/
ret = kernel_alloc_z_order_info (DEF_NR_TOPMOSTS, DEF_NR_NORMALS);
ret = __kernel_alloc_z_order_info (DEF_NR_TOPMOSTS, DEF_NR_NORMALS);
if (ret < 0) {
_WRN_PRINTF ("KERNEL>Desktop: Can not initialize ZOrderInfo!\n");
return FALSE;
+1 -1
View File
@@ -115,7 +115,7 @@ BOOL mg_InitDesktop (void)
/*
* Init ZOrderInfo here.
*/
ret = kernel_alloc_z_order_info (DEF_NR_TOPMOSTS, DEF_NR_NORMALS);
ret = __kernel_alloc_z_order_info (DEF_NR_TOPMOSTS, DEF_NR_NORMALS);
if (ret < 0) {
_WRN_PRINTF ("KERNEL>Desktop: Can not initialize ZOrderInfo!\n");
return FALSE;
+15 -14
View File
@@ -464,25 +464,25 @@ void __mg_update_window (HWND hwnd,
static int update_client_window (ZORDERNODE* znode, const RECT* rc)
{
#if defined(_MGRM_PROCESSES)
#if defined(_MGRM_PROCESSES) && defined(_MGSCHEMA_SHAREDFB)
if (!mgIsServer)
return -1;
if (znode->cli != 0) {
if (rc) {
if (IsRectEmpty (&znode->dirty_rc)){
SetRect(&znode->dirty_rc,
if (IsRectEmpty (&znode->dirty_rc)) {
SetRect (&znode->dirty_rc,
rc->left, rc->top, rc->right, rc->bottom);
}
else{
else {
GetBoundRect (&znode->dirty_rc, &znode->dirty_rc, rc);
}
}
mgClients [znode->cli].has_dirty = TRUE;
}
else
#endif
#endif /* defined(_MGRM_PROCESSES) && defined(_MGSCHEMA_SHAREDFB) */
{
if (rc)
__mg_update_window (znode->hwnd, rc->left, rc->top,
@@ -551,7 +551,7 @@ static BOOL _cb_exclude_rc (void* context,
int x, y;
RECT rc;
while(idx != 0) {
while (idx != 0) {
x = node->rc.left + (first+idx)->left;
y = node->rc.top + (first+idx)->top;
SetRect(&rc, x, y,
@@ -739,7 +739,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
//the secondaryDC and clientDC are same (dongjunjie 2010/07/08)
if(pWin->pMainWin->secondaryDC) {
HDC real_dc = GetClientDC((HWND)pWin->pMainWin);
update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
ReleaseDC (real_dc);
}
release_valid_dc(pWin, hdc);
@@ -1025,7 +1025,7 @@ static void dskInitInvRgn (PMAINWIN pWin)
MAKE_REGION_INFINITE(&pWin->InvRgn.rgn);
}
int kernel_get_next_znode (const ZORDERINFO* zi, int from)
int __kernel_get_next_znode (const ZORDERINFO* zi, int from)
{
int next = 0;
ZORDERNODE* nodes = GET_ZORDERNODE(zi);
@@ -1118,7 +1118,7 @@ int kernel_get_next_znode (const ZORDERINFO* zi, int from)
return next;
}
int kernel_get_prev_znode (const ZORDERINFO* zi, int from)
int __kernel_get_prev_znode (const ZORDERINFO* zi, int from)
{
int prev = 0;
ZORDERNODE* nodes = GET_ZORDERNODE(zi);
@@ -1256,7 +1256,7 @@ static int get_next_visible_mainwin (const ZORDERINFO* zi, int from)
ZORDERNODE* nodes = GET_ZORDERNODE(zi);
do {
next = kernel_get_next_znode (zi, from);
next = __kernel_get_next_znode (zi, from);
if (next <= 0)
break;
@@ -3367,7 +3367,8 @@ static int dskMoveWindow (int cli, int idx_znode, const RECT* rcWin)
InitClipRgn (&bblt_rgn, &sg_FreeClipRectList);
if (nodes[idx_znode].idx_mask_rect == 0){
SelectClipRect (HDC_SCREEN_SYS, rcWin);
} else {
}
else {
firstmaskrect = GET_MASKRECT(zi);
idx = nodes [idx_znode].idx_mask_rect;
@@ -3441,9 +3442,9 @@ static int dskMoveWindow (int cli, int idx_znode, const RECT* rcWin)
ExcludeClipRect (HDC_SCREEN_SYS, &nodes [slot].rc);
}
#endif
/* houhh 20090730, if slot wind is no regular.*/
/* houhh 20090730, if slot window is no regular.*/
if (nodes [slot].flags & ZOF_VISIBLE) {
if (nodes[slot].idx_mask_rect == 0){
if (nodes[slot].idx_mask_rect == 0) {
ExcludeClipRect (HDC_SCREEN_SYS, &nodes [slot].rc);
}
else {
@@ -4106,7 +4107,7 @@ void GUIAPI DumpWindow (FILE* fp, HWND hWnd)
}
#endif /* _DEBUG */
int kernel_get_window_region (HWND pWin, CLIPRGN* region)
int __kernel_get_window_region (HWND pWin, CLIPRGN* region)
{
RECT rc;
MASKRECT *maskrect;
+5 -5
View File
@@ -100,7 +100,7 @@ inline static key_t get_layer_shm_key (void)
}
#endif
int kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
int __kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
{
#if defined(_MGRM_PROCESSES)
key_t shm_key;
@@ -199,7 +199,7 @@ int kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
#endif
}
void kernel_free_z_order_info (ZORDERINFO* zi)
void __kernel_free_z_order_info (ZORDERINFO* zi)
{
#if defined(_MGRM_PROCESSES)
if (shmdt (zi) < 0)
@@ -221,7 +221,7 @@ void kernel_free_z_order_info (ZORDERINFO* zi)
#if 0
#if IS_SHAREDFB_SCHEMA
int kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
int __kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
{
key_t shm_key;
int zorder_shmid;
@@ -246,7 +246,7 @@ int kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
#else /* not IS_SHAREDFB_SCHEMA */
ZORDERINFO* kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
ZORDERINFO* __kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
{
ZORDERINFO* zi;
ZORDERNODE* znodes;
@@ -325,7 +325,7 @@ ZORDERINFO* kernel_alloc_z_order_info (int nr_topmosts, int nr_normals)
#endif /* not IS_SHAREDFB_SCHEMA */
void kernel_free_z_order_info (ZORDERINFO* zi)
void __kernel_free_z_order_info (ZORDERINFO* zi)
{
#if IS_SHAREDFB_SCHEMA
if (shmdt (zi) < 0)
-36
View File
@@ -181,42 +181,6 @@ static void watermark_init(void)
/***********************************************************
* Screensaver
***********************************************************/
#if 0
// moved to desktop.c
static int s_screensaver_node;
void screensaver_show(void)
{
dskShowWindow (0, s_screensaver_node);
dskMove2Top (0, s_screensaver_node);
}
void screensaver_hide(void)
{
dskHideWindow (0, s_screensaver_node);
}
void __mg_screensaver_create(void)
{
/* create screensaver node. */
if (!s_screensaver_node) {
RECT rcScr = GetScreenRect();
s_screensaver_node = dskCreateTopZOrderNode (0, &rcScr);
dskSetZNodeAlwaysTop (0, s_screensaver_node);
dskHideWindow (0, s_screensaver_node);
}
}
void __mg_screensaver_destroy(void)
{
/* destroy screensaver node. */
if (s_screensaver_node) {
dskDestroyTopZOrderNode(0, s_screensaver_node);
s_screensaver_node = 0;
}
}
#endif
#ifdef _MG_ENABLE_SCREENSAVER
static void screensaver_update(void)
+5 -5
View File
@@ -398,7 +398,7 @@ static int _bmp_decode_alpha_rle (const BITMAP* bmp, const BYTE* encoded,
return consumed;
}
PDC _begin_fill_bitmap (HDC hdc, int x, int y, int w, int h,
PDC __mg_begin_fill_bitmap (HDC hdc, int x, int y, int w, int h,
const BITMAP* bmp, FILLINFO* fill_info)
{
PDC pdc;
@@ -499,7 +499,7 @@ fail:
return NULL;
}
void _end_fill_bitmap (PDC pdc, const BITMAP* bmp, FILLINFO *fill_info)
void __mg_end_fill_bitmap (PDC pdc, const BITMAP* bmp, FILLINFO *fill_info)
{
pdc->bkmode = fill_info->old_bkmode;
@@ -543,7 +543,7 @@ static void _fill_bitmap (PDC pdc, const BITMAP *bmp, FILLINFO *fill_info)
}
}
void _fill_bitmap_scanline (PDC pdc, const BITMAP* bmp,
void __mg_fill_bitmap_scanline (PDC pdc, const BITMAP* bmp,
FILLINFO* fill_info, int y)
{
GAL_Rect dst_rect;
@@ -561,7 +561,7 @@ BOOL GUIAPI FillBoxWithBitmap (HDC hdc, int x, int y, int w, int h,
PDC pdc;
FILLINFO fill_info;
pdc = _begin_fill_bitmap (hdc, x, y, w, h, bmp, &fill_info);
pdc = __mg_begin_fill_bitmap (hdc, x, y, w, h, bmp, &fill_info);
if (pdc == NULL)
return FALSE;
@@ -614,7 +614,7 @@ BOOL GUIAPI FillBoxWithBitmap (HDC hdc, int x, int y, int w, int h,
else
_fill_bitmap (pdc, bmp, &fill_info);
_end_fill_bitmap (pdc, bmp, &fill_info);
__mg_end_fill_bitmap (pdc, bmp, &fill_info);
return TRUE;
}
+3 -3
View File
@@ -357,7 +357,7 @@ BOOL mg_InitGDI (void)
/* TODO: add other font support here */
#if defined (_MGFONT_SEF) && !defined(_LITE_VERSION)
if(!initialize_scripteasy()) {
if(!font_InitializeScripteasy()) {
_WRN_PRINTF ("Can not initialize ScriptEasy fonts!\n");
goto error;
}
@@ -368,7 +368,7 @@ BOOL mg_InitGDI (void)
goto error;
}
#ifdef _DEBUG
#ifdef _DEBUG_DEVFONT
dbg_dumpDevFonts ();
#endif
@@ -411,7 +411,7 @@ void mg_TerminateGDI( void )
#endif
#if defined (_MGFONT_SEF) && !defined(_LITE_VERSION)
uninitialize_scripteasy();
font_UninitializeScripteasy();
#endif
font_TerminateIncoreFonts ();
+1 -1
View File
@@ -143,7 +143,7 @@ gal_pixel _dc_get_pixel_cursor (PDC pdc, int x, int y)
&& x < pdc->DevRC.right && y < pdc->DevRC.bottom) {
#ifdef _MGHAVE_CURSOR
if (!dc_IsMemDC (pdc)) {
dst = GetPixelUnderCursor (x, y, &pixel);
dst = kernel_GetPixelUnderCursor (x, y, &pixel);
}
if (dst == NULL) {
+7 -7
View File
@@ -648,7 +648,7 @@ static void cb_paint_image_sl (void* context, MYBITMAP* my_bmp, int y)
break;
}
_fill_bitmap_scanline (info->pdc, info->bmp, &info->fill_info, y);
__mg_fill_bitmap_scanline (info->pdc, info->bmp, &info->fill_info, y);
}
int GUIAPI PaintImageEx (HDC hdc, int x, int y, MG_RWops* area, const char *ext)
@@ -674,7 +674,7 @@ int GUIAPI PaintImageEx (HDC hdc, int x, int y, MG_RWops* area, const char *ext)
if (ret)
goto fail1;
info.pdc = _begin_fill_bitmap (hdc, x, y, 0, 0, &bmp, &info.fill_info);
info.pdc = __mg_begin_fill_bitmap (hdc, x, y, 0, 0, &bmp, &info.fill_info);
if (info.pdc == NULL) {
ret = ERR_BMP_OTHER;
goto fail2;
@@ -683,7 +683,7 @@ int GUIAPI PaintImageEx (HDC hdc, int x, int y, MG_RWops* area, const char *ext)
bmp.bmHeight = 1;
ret = LoadMyBitmapSL (area, load_info, &my_bmp, cb_paint_image_sl, &info);
_end_fill_bitmap (info.pdc, &bmp, &info.fill_info);
__mg_end_fill_bitmap (info.pdc, &bmp, &info.fill_info);
fail2:
UnloadBitmap (&bmp);
@@ -894,13 +894,13 @@ static void _cb_stretch_paint_image_sl (void* context, MYBITMAP* my_bmp, int yy)
int i = 0;
nr_ident_lines = info->dda_ys [yy + 1] - info->dda_ys [yy];
for (i = 0; i < nr_ident_lines; i++) {
_fill_bitmap_scanline (info->pdc, info->bmp, &info->fill_info,
__mg_fill_bitmap_scanline (info->pdc, info->bmp, &info->fill_info,
info->dda_ys [yy] + i);
}
}
}
else
_fill_bitmap_scanline (info->pdc, info->bmp, &info->fill_info, yy);
__mg_fill_bitmap_scanline (info->pdc, info->bmp, &info->fill_info, yy);
}
static void _deinit_stretch_paint_info (STRETCH_PAINT_IMAGE_INFO* info)
@@ -1012,7 +1012,7 @@ int GUIAPI StretchPaintImageEx (HDC hdc, int x, int y, int w, int h,
_init_stretch_paint_info (&info, &my_bmp, &bmp);
info.pdc = _begin_fill_bitmap (hdc, x, y, 0, 0, &bmp, &info.fill_info);
info.pdc = __mg_begin_fill_bitmap (hdc, x, y, 0, 0, &bmp, &info.fill_info);
if (info.pdc == NULL) {
free (info.dda_ys);
ret = ERR_BMP_OTHER;
@@ -1023,7 +1023,7 @@ int GUIAPI StretchPaintImageEx (HDC hdc, int x, int y, int w, int h,
ret = LoadMyBitmapSL (area, load_info, &my_bmp,
_cb_stretch_paint_image_sl, &info);
_end_fill_bitmap (info.pdc, &bmp, &info.fill_info);
__mg_end_fill_bitmap (info.pdc, &bmp, &info.fill_info);
_deinit_stretch_paint_info (&info);
+3 -3
View File
@@ -360,7 +360,7 @@ static void _parallelogram_map(HDC hdc, const BITMAP *bmp, fixed sx[4],
_init_bitmap_buffer(&buffer, bmp, w);
pdc = _begin_fill_bitmap (hdc, leftx, topy, w, h, bmp, &fill_info);
pdc = __mg_begin_fill_bitmap (hdc, leftx, topy, w, h, bmp, &fill_info);
if (pdc == NULL) {
free (buffer.bmBits);
if (buffer.bmAlphaMask) free (buffer.bmAlphaMask);
@@ -544,7 +544,7 @@ static void _parallelogram_map(HDC hdc, const BITMAP *bmp, fixed sx[4],
fill_info.dst_rect.x = (unsigned int) rect_lx;
fill_info.dst_rect.w = buffer.bmWidth;
_fill_bitmap_scanline(pdc, &buffer, &fill_info, scanline - topy);
__mg_fill_bitmap_scanline(pdc, &buffer, &fill_info, scanline - topy);
}
skip_draw:
@@ -560,7 +560,7 @@ skip_draw:
dc_rx += dc_rdx;
}
_end_fill_bitmap (pdc, &buffer, &fill_info);
__mg_end_fill_bitmap (pdc, &buffer, &fill_info);
if (buffer.bmAlphaMask) free (buffer.bmAlphaMask);
free (buffer.bmBits);
+5 -5
View File
@@ -91,7 +91,7 @@ static BOOL do_alloc_layer (MG_Layer* layer, const char* name,
ZORDERNODE* znodes;
void* maskrect_usage_bmp;
layer->zorder_shmid = kernel_alloc_z_order_info (nr_topmosts, nr_normals);
layer->zorder_shmid = __kernel_alloc_z_order_info (nr_topmosts, nr_normals);
if (layer->zorder_shmid == -1)
return FALSE;
@@ -105,7 +105,7 @@ static BOOL do_alloc_layer (MG_Layer* layer, const char* name,
return FALSE;
#if 0
zi = kernel_alloc_z_order_info (nr_topmosts, nr_normals);
zi = __kernel_alloc_z_order_info (nr_topmosts, nr_normals);
if (zi == NULL)
return FALSE;
#endif
@@ -218,7 +218,7 @@ static void do_free_layer (MG_Layer* layer)
/* free zorder_semid for reuse here... */
__mg_slot_clear_use (sem_usage, zi->zi_semnum);
kernel_free_z_order_info (zi);
__kernel_free_z_order_info (zi);
if (layer->prev)
layer->prev->next = layer->next;
@@ -735,7 +735,7 @@ int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode, int* cli)
return -1;
}
next = kernel_get_next_znode (zi, idx_znode);
next = __kernel_get_next_znode (zi, idx_znode);
if (next > 0 && cli) {
*cli = nodes [next].cli;
return next;
@@ -768,7 +768,7 @@ int GUIAPI ServerGetPrevZNode (MG_Layer* layer, int idx_znode, int* cli)
return -1;
}
prev = kernel_get_prev_znode (zi, idx_znode);
prev = __kernel_get_prev_znode (zi, idx_znode);
if (prev > 0 && cli) {
*cli = nodes [prev].cli;
return prev;
+1 -1
View File
@@ -360,7 +360,7 @@ BOOL server_IdleHandler4Server (PMSGQUEUE msg_queue)
#endif
#ifdef _MGSCHEMA_COMPOSITING
__compsor_check_znodes ();
__mg_compsor_check_znodes ();
#endif
extra.params_mask = 0;
+2 -2
View File
@@ -83,7 +83,7 @@
#endif
BOOL sysres_init_inner_resource()
BOOL __sysres_init_inner_resource()
{
#ifdef _MGINCORE_RES
AddInnerRes((INNER_RES*)__mgir_bmp_inner_res, TABLESIZE(__mgir_bmp_inner_res), FALSE);
@@ -158,7 +158,7 @@ HCURSOR __mg_load_cursor_from_res (int i)
if (!hCursor) {
char path [MAX_PATH + 1];
strncpy (path, sysres_get_system_res_path(), MAX_PATH);
strncpy (path, __sysres_get_system_res_path(), MAX_PATH);
path [MAX_PATH] = 0;
strcat (path, "cursor/");
path [MAX_PATH] = 0;
+1 -1
View File
@@ -444,7 +444,7 @@ void TerminateResManager()
UNINIT_LOCKER();
}
const char* sysres_get_system_res_path()
const char* __sysres_get_system_res_path()
{
return cfg_res_path;
}
+2 -2
View File
@@ -177,7 +177,7 @@ HICON GUIAPI LoadSystemIconEx (HDC hdc, const char* rdr_name,
else{
//load from file
char szfile[MAX_PATH+1];
sprintf(szfile, "%s/%s",sysres_get_system_res_path(), szValue);
sprintf(szfile, "%s/%s",__sysres_get_system_res_path(), szValue);
hIcon = LoadIconFromFile(hdc, szfile, which);
}
@@ -345,7 +345,7 @@ BOOL mg_InitSystemRes (void)
#undef _SIZE_RES_HASH_TABLE
sysres_init_inner_resource();
__sysres_init_inner_resource();
return TRUE;
}