tune code for 64b (MiniGUI-Processes runmode)

This commit is contained in:
VincentWei
2018-01-19 15:35:26 +08:00
parent 01bc3d7c42
commit 766ddb5555
19 changed files with 347 additions and 553 deletions
+8 -8
View File
@@ -42,8 +42,8 @@ int mgClientSize = 0;
#define off_pointer(p,off) \
do { \
if (p) { \
unsigned int tmp; \
tmp = (unsigned int)p; \
intptr_t tmp; \
tmp = (intptr_t)p; \
tmp += off; \
p = (void*)tmp; \
} \
@@ -190,7 +190,7 @@ void __mg_remove_client (int cli, int clifd)
close (clifd);
}
int __mg_send2client (MSG* msg, MG_Client* client)
int __mg_send2client (const MSG* msg, MG_Client* client)
{
int ret;
@@ -243,7 +243,7 @@ void __mg_set_active_client (MG_Client* client)
}
/* send message to client(s) */
int GUIAPI Send2Client (MSG* msg, int cli)
int GUIAPI Send2Client (const MSG* msg, int cli)
{
int i, n;
@@ -296,9 +296,9 @@ int GUIAPI Send2Client (MSG* msg, int cli)
return SOCKERR_OK;
}
BOOL GUIAPI Send2TopMostClients (int iMsg, WPARAM wParam, LPARAM lParam)
BOOL GUIAPI Send2TopMostClients (UINT nMsg, WPARAM wParam, LPARAM lParam)
{
MSG msg = {0, iMsg, wParam, lParam, __mg_timer_counter};
MSG msg = {0, nMsg, wParam, lParam, __mg_timer_counter};
if (!mgIsServer)
return FALSE;
@@ -310,7 +310,7 @@ BOOL GUIAPI Send2TopMostClients (int iMsg, WPARAM wParam, LPARAM lParam)
}
BOOL GUIAPI Send2ActiveWindow (const MG_Layer* layer,
int iMsg, WPARAM wParam, LPARAM lParam)
UINT nMsg, WPARAM wParam, LPARAM lParam)
{
int active_win;
@@ -322,7 +322,7 @@ BOOL GUIAPI Send2ActiveWindow (const MG_Layer* layer,
return FALSE;
if (__mg_post_msg_by_znode (layer->zorder_info,
active_win, iMsg, wParam, lParam) > 0)
active_win, nMsg, wParam, lParam) > 0)
return TRUE;
return FALSE;
+1 -1
View File
@@ -89,7 +89,7 @@ static BOOL do_alloc_layer (MG_Layer* layer, const char* name,
zi->active_win = 0;
zi->cli_trackmenu = -1;
zi->ptmi_in_cli = -1;
zi->ptmi_in_cli = HWND_INVALID;
zi->zi_semid = SHAREDRES_SEMID_LAYER;
+5 -5
View File
@@ -170,7 +170,7 @@ static int create_cursor (int cli, int clifd, void* buff, size_t len)
static int copy_cursor (int cli, int clifd, void* buff, size_t len)
{
HCURSOR hcsr = CopyCursor ((HCURSOR)*(int*)buff);
HCURSOR hcsr = CopyCursor ((HCURSOR)*(intptr_t*)buff);
#ifdef _MGHAVE_CURSOR
if (hcsr) {
add_global_res (cli, (void*) hcsr, (void*)hcsr, NULL);
@@ -338,22 +338,22 @@ ret:
static int zorder_op (int cli, int clifd, void* buff, size_t len)
{
int ret_value;
intptr_t ret_value;
ZORDEROPINFO* info = (ZORDEROPINFO*)buff;
ret_value = __mg_do_zorder_operation (cli, info);
return ServerSendReply (clifd, &ret_value, sizeof (int));
return ServerSendReply (clifd, &ret_value, sizeof (intptr_t));
}
static int change_zorder_maskrect (int cli, int clifd, void* buff, size_t len)
{
int ret_value;
intptr_t ret_value;
ZORDERMASKRECTOPINFO* info = (ZORDERMASKRECTOPINFO *)buff;
info->rc = (RECT4MASK*)(buff + sizeof (ZORDERMASKRECTOPINFO));
ret_value = __mg_do_zorder_maskrect_operation (cli, info);
return ServerSendReply (clifd, &ret_value, sizeof (int));
return ServerSendReply (clifd, &ret_value, sizeof (intptr_t));
}
#ifdef _MGGAL_SIGMA8654
extern int Sigma8654_ServerOnGetSurface(REQ_SIGMA8654_GETSURFACE *request, REP_SIGMA8654_GETSURFACE *reply);