亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? message.c

?? 這是針對 Linux (i386)平臺的 minigui 3.6.2 開發包(MiniGUI-Processes 運行模式)。
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*** $Id: message.c,v 1.22.6.1 2005/02/15 08:27:56 weiym Exp $**** message.c: The Messaging module.**** Copyright (C) 2003 Feynman Software.** Copyright (C) 2000 ~ 2002 Wei Yongming.**** Current maintainer: Wei Yongming.**** Create date: 2000/11/05*//*** 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 2 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, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//*** TODO:*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include "common.h"#include "minigui.h"#include "gdi.h"#include "window.h"#include "blockheap.h"#include "cliprect.h"#include "gal.h"#include "internals.h"#include "ctrlclass.h"#include "timer.h"/****************************** Message support ******************************/static BLOCKHEAP QMSGHeap;/* QMSG allocation */BOOL InitFreeQMSGList (void){    InitBlockDataHeap (&QMSGHeap, sizeof (QMSG), SIZE_QMSG_HEAP);    return TRUE;}void DestroyFreeQMSGList (void){    DestroyBlockDataHeap (&QMSGHeap);}inline static PQMSG QMSGAlloc (void){    return (PQMSG) BlockDataAlloc (&QMSGHeap);}inline static void FreeQMSG (PQMSG pqmsg){    BlockDataFree (&QMSGHeap, pqmsg);}BOOL InitMsgQueue (PMSGQUEUE pMsgQueue, int iBufferLen){    int i;        pMsgQueue->dwState = QS_EMPTY;#ifndef _LITE_VERSION    pthread_mutex_init (&pMsgQueue->lock, NULL);    sem_init (&pMsgQueue->wait, 0, 0);#endif    pMsgQueue->pFirstNotifyMsg = NULL;    pMsgQueue->pLastNotifyMsg = NULL;    pMsgQueue->readpos = 0;    pMsgQueue->writepos = 0;#ifndef _LITE_VERSION    pMsgQueue->pFirstSyncMsg = NULL;    pMsgQueue->pLastSyncMsg = NULL;#endif    if (iBufferLen <= 0)        iBufferLen = DEF_MSGQUEUE_LEN;            pMsgQueue->msg = malloc (sizeof (MSG) * iBufferLen);    pMsgQueue->len = iBufferLen;#ifndef _LITE_VERSION    pMsgQueue->TimerMask = 0xFF;#else    pMsgQueue->TimerMask = 0xFFFF;#endif    for (i = 0; i < DEF_NR_TIMERS; i++) {        pMsgQueue->TimerOwner [i] = HWND_DESKTOP;        pMsgQueue->TimerID [i] = 0;    }    return pMsgQueue->msg != NULL;}void DestroyMsgQueue (PMSGQUEUE pMsgQueue){    PQMSG head;    PQMSG next;    head = next = pMsgQueue->pFirstNotifyMsg;    while (head) {        next = head->next;        FreeQMSG (head);        head = next;    }#ifndef _LITE_VERSION    pthread_mutex_destroy (&pMsgQueue->lock);    sem_destroy (&pMsgQueue->wait);#endif    free (pMsgQueue->msg);    pMsgQueue->msg = NULL;}#ifdef _LITE_VERSIONBOOL InitDskMsgQueue (void){    return InitMsgQueue (&__mg_dsk_msgs, 0);}void DestroyDskMsgQueue (void){    DestroyMsgQueue (&__mg_dsk_msgs);}#endifPMAINWIN CheckAndGetMainWindowPtr (HWND hWnd){    PMAINWIN pWin;    pWin = (PMAINWIN)hWnd;    if(pWin->DataType != TYPE_HWND)        return NULL;    if (pWin->WinType == TYPE_MAINWIN)        return pWin;    return NULL; }PMAINWIN GetMainWindowPtrOfControl (HWND hWnd){    PMAINWIN pWin;    if (hWnd == HWND_DESKTOP || hWnd == HWND_INVALID)        return NULL;    pWin = (PMAINWIN)hWnd;    if(pWin->DataType != TYPE_HWND)        return NULL;    if (pWin->WinType == TYPE_MAINWIN)        return pWin;    return ((PCONTROL)hWnd)->pMainWin;}PMSGQUEUE GetMsgQueue (HWND hWnd){    if (hWnd == HWND_DESKTOP) return &__mg_dsk_msgs;    return GetMainWindowPtrOfControl (hWnd)->pMessages;}static inline WNDPROC GetWndProc (HWND hWnd){     PMAINWIN  pMainWin = (PMAINWIN)hWnd;     if (hWnd == HWND_DESKTOP)         return DesktopWinProc;     return pMainWin->MainWindowProc;}static HWND msgCheckInvalidRegion (PMAINWIN pWin){    PCONTROL pCtrl = (PCONTROL)pWin;    HWND hwnd;    if (pCtrl->InvRgn.rgn.head)        return (HWND)pCtrl;    pCtrl = pCtrl->children;    while (pCtrl) {        if ((hwnd = msgCheckInvalidRegion ((PMAINWIN) pCtrl)))            return hwnd;        pCtrl = pCtrl->next;    }    return 0;}static PMAINWIN msgGetHostingRoot (PMAINWIN pHosted){    PMAINWIN pHosting;        pHosting = pHosted->pHosting;    if (pHosting)        return msgGetHostingRoot (pHosting);    return pHosted;}static HWND msgCheckHostedTree (PMAINWIN pHosting){    HWND hNeedPaint;    PMAINWIN pHosted;    if ( (hNeedPaint = msgCheckInvalidRegion (pHosting)) )        return hNeedPaint;    pHosted = pHosting->pFirstHosted;    while (pHosted) {        if ( (hNeedPaint = msgCheckHostedTree (pHosted)) )            return hNeedPaint;        pHosted = pHosted->pNextHosted;    }    return 0;}static void CheckCapturedMouseMessage (PMSG pMsg){    if (pMsg->message >= MSG_FIRSTMOUSEMSG             && pMsg->message <= MSG_LASTMOUSEMSG) {#ifndef _LITE_VERSION        if (__mg_capture_wnd && (__mg_capture_wnd != HWND_INVALID)                && (GetMsgQueue (__mg_capture_wnd) == GetMsgQueue (pMsg->hwnd))) {#else        if (__mg_capture_wnd && (__mg_capture_wnd != HWND_INVALID)                 && pMsg->hwnd != HWND_DESKTOP) {#endif            if (!(pMsg->wParam | KS_CAPTURED)) {                int x, y;                x = LOSWORD (pMsg->lParam);                y = HISWORD (pMsg->lParam);                ClientToScreen (pMsg->hwnd, &x, &y);                pMsg->lParam = MAKELONG (x, y);                pMsg->wParam |= KS_CAPTURED;            }            pMsg->hwnd = __mg_capture_wnd;        }    }}BOOL GUIAPI HavePendingMessage (HWND hWnd){    PMSGQUEUE pMsgQueue;    if( !(pMsgQueue = GetMsgQueue(hWnd)) ) return FALSE;        if (pMsgQueue->dwState & QS_NOTIFYMSG) {        if (pMsgQueue->pFirstNotifyMsg)            return TRUE;    }#ifndef _LITE_VERSION    if (pMsgQueue->dwState & QS_SYNCMSG) {        if (pMsgQueue->pFirstSyncMsg)            return TRUE;    }#endif    if (pMsgQueue->dwState & QS_POSTMSG) {        if (pMsgQueue->readpos != pMsgQueue->writepos)            return TRUE;    }#ifndef _LITE_VERSION    if (pMsgQueue->dwState & (QS_QUIT | QS_PAINT | QS_TIMER))#else    if (pMsgQueue->dwState & (QS_QUIT | QS_PAINT | QS_TIMER | QS_DESKTIMER))#endif        return TRUE;#ifdef _LITE_VERSION    return pMsgQueue->OnIdle (NULL);#else    return FALSE;#endif}int GUIAPI BroadcastMessage (int iMsg, WPARAM wParam, LPARAM lParam){    MSG msg;        msg.message = iMsg;    msg.wParam = wParam;    msg.lParam = lParam;    return SendMessage (HWND_DESKTOP, MSG_BROADCASTMSG, 0, (LPARAM)(&msg));}#ifdef _MSG_STRING#include "msgstr.h"const char* GUIAPI Message2Str (int message){    if (message >= 0x0000 && message <= 0x006F)        return msgstr1 [message];    else if (message >= 0x00A0 && message <= 0x010F)        return msgstr2 [message - 0x00A0];    else if (message >= 0x0120 && message <= 0x017F)        return msgstr3 [message - 0x0120];    else if (message >= 0xF000)        return "Control Messages";    else        return "MSG_USER";}void GUIAPI PrintMessage (FILE* fp, HWND hWnd, int iMsg, WPARAM wParam, LPARAM lParam){    fprintf (fp, "Message %s: hWnd: %#x, wP: %x, lP: %lx.\n",        Message2Str (iMsg), hWnd, wParam, lParam);}#endif#ifdef _LITE_VERSIONint GUIAPI GetMessage (PMSG pMsg, HWND hWnd){    PMSGQUEUE pMsgQueue;    PQMSG phead;    int slot;    if( !(pMsgQueue = GetMsgQueue(hWnd)) ) return ERR_INV_HWND;    memset (pMsg, 0, sizeof(MSG));checkagain:    if (pMsgQueue->dwState & QS_QUIT) {        pMsg->hwnd = hWnd;        pMsg->message = MSG_QUIT;        pMsg->wParam = 0;        pMsg->lParam = 0;        pMsgQueue->dwState &= ~QS_QUIT;                return 0;    }    if (pMsgQueue->dwState & QS_NOTIFYMSG) {               if (pMsgQueue->pFirstNotifyMsg) {            phead = pMsgQueue->pFirstNotifyMsg;            pMsgQueue->pFirstNotifyMsg = phead->next;                        *pMsg = phead->Msg;            FreeQMSG (phead);            return 1;        }        else            pMsgQueue->dwState &= ~QS_NOTIFYMSG;            }    if (pMsgQueue->dwState & QS_POSTMSG) {            if (pMsgQueue->readpos != pMsgQueue->writepos) {            *pMsg = pMsgQueue->msg[pMsgQueue->readpos];            CheckCapturedMouseMessage (pMsg);            pMsgQueue->readpos++;            if (pMsgQueue->readpos >= pMsgQueue->len) pMsgQueue->readpos = 0;            return 1;        }        else            pMsgQueue->dwState &= ~QS_POSTMSG;    }    if (pMsgQueue->dwState & QS_PAINT) {        PMAINWIN pHostingRoot;        HWND hNeedPaint;        PMAINWIN pWin;                if (hWnd == HWND_DESKTOP) {            pMsg->hwnd = hWnd;            pMsg->message = MSG_PAINT;            pMsg->wParam = 0;            pMsg->lParam = 0;            pMsgQueue->dwState &= ~QS_PAINT;            return 1;        }        pMsg->message = MSG_PAINT;        pMsg->wParam = 0;        pMsg->lParam = 0;        pWin = GetMainWindowPtrOfControl (hWnd);        pHostingRoot = msgGetHostingRoot (pWin);        if ( (hNeedPaint = msgCheckHostedTree (pHostingRoot)) ) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级片在线观看| 久久国产精品色婷婷| 日韩一区二区电影| www.成人网.com| 极品少妇xxxx精品少妇偷拍| 亚洲欧美韩国综合色| 久久久久久久久97黄色工厂| 欧美日韩免费高清一区色橹橹| 国产在线视频不卡二| 青青草视频一区| 亚洲最大成人综合| 国产精品嫩草久久久久| 精品国产成人系列| 欧美一区二区三区日韩| 91黄视频在线观看| 91一区二区在线| 9色porny自拍视频一区二区| 国产河南妇女毛片精品久久久| 麻豆专区一区二区三区四区五区| 亚洲国产美国国产综合一区二区| 亚洲另类春色校园小说| 国产精品激情偷乱一区二区∴| 久久久久久**毛片大全| 国产日韩一级二级三级| 国产日韩高清在线| 中文av一区二区| 中文字幕永久在线不卡| 亚洲免费在线看| 中文字幕一区在线| 亚洲激情av在线| 亚洲一二三专区| 亚洲综合激情网| 亚洲在线视频网站| 一区二区视频在线| 午夜视频在线观看一区| 视频一区二区国产| 青娱乐精品视频在线| 国产在线不卡视频| caoporen国产精品视频| 91老师国产黑色丝袜在线| 在线观看91视频| 91成人国产精品| 日韩免费看网站| 国产嫩草影院久久久久| 337p日本欧洲亚洲大胆色噜噜| 欧美激情一二三区| 亚洲激情图片小说视频| 蜜臀va亚洲va欧美va天堂| 国产又黄又大久久| 欧美亚洲动漫另类| 精品电影一区二区| 亚洲色图丝袜美腿| 免费成人av在线| 国产成人高清在线| 欧美丝袜丝交足nylons图片| 日韩久久免费av| 国产精品高潮呻吟| 免费成人在线观看| av不卡免费电影| 精品入口麻豆88视频| 国产精品不卡在线| 精品制服美女丁香| 国产成人精品三级麻豆| 欧美色电影在线| 国产精品家庭影院| 国产一区在线看| 7777精品伊人久久久大香线蕉最新版| 国产欧美视频一区二区| 免费欧美高清视频| 一本色道久久综合狠狠躁的推荐 | 色天天综合久久久久综合片| av中文一区二区三区| 欧美一区二区视频在线观看| 最近中文字幕一区二区三区| 精品午夜久久福利影院| 在线视频欧美精品| 国产欧美日韩不卡免费| 久久精品国产99国产| 欧美日韩高清在线| 亚洲天堂中文字幕| 国产福利一区二区三区视频在线| 欧美喷水一区二区| 亚洲www啪成人一区二区麻豆 | 亚洲成人免费电影| 欧美在线观看视频在线| 亚洲电影一级片| 欧美精品在线观看播放| 日韩av电影天堂| 日韩丝袜情趣美女图片| 久久精品72免费观看| 日韩欧美一区电影| 狠狠色狠狠色综合| 中文乱码免费一区二区| 成av人片一区二区| 一区二区三区高清| 欧美另类videos死尸| 久久99久久99| 亚洲国产精品ⅴa在线观看| 99久久国产综合精品麻豆| 亚洲男帅同性gay1069| 欧美日韩www| 国产尤物一区二区在线| **性色生活片久久毛片| 欧美视频在线观看一区二区| 热久久国产精品| 国产精品麻豆视频| 在线影院国内精品| 极品少妇xxxx精品少妇| 中文字幕中文字幕一区| 在线播放视频一区| 国产999精品久久久久久| 亚洲精品欧美二区三区中文字幕| 欧美亚洲国产一区二区三区| 久久精品国产99| 日韩美女久久久| 精品日韩成人av| 日本伦理一区二区| 精品一区二区影视| 亚洲影视资源网| 久久久久久久久久久黄色| 欧美色偷偷大香| 国产成人在线视频网站| 亚洲国产视频在线| 国产精品私人影院| 欧美福利视频导航| 91在线视频免费91| 久久av中文字幕片| 亚洲国产一二三| 国产精品久久久久天堂| 91精品免费观看| www.日韩精品| 国产资源在线一区| 天天做天天摸天天爽国产一区| 欧美激情中文字幕一区二区| 欧美一区二区三区白人| 91国产免费观看| av中文字幕亚洲| 成人免费观看视频| 国产精品18久久久久久久网站| 久久er精品视频| 亚洲成人中文在线| 一区二区国产视频| 国产精品毛片久久久久久 | 国产69精品久久99不卡| 免费在线看一区| 日韩国产高清在线| 天天色天天操综合| 午夜影视日本亚洲欧洲精品| 一二三区精品福利视频| 中文字幕一区二区5566日韩| 国产网红主播福利一区二区| 日韩精品一区二区三区在线观看| 欧美日韩和欧美的一区二区| 色综合久久综合| 91浏览器打开| 一本久久综合亚洲鲁鲁五月天| 97se亚洲国产综合在线| 国产大陆a不卡| 丁香六月综合激情| thepron国产精品| 色哟哟国产精品免费观看| 一本大道久久a久久综合| 91蜜桃在线免费视频| 在线观看免费成人| 欧美精品 日韩| 精品99999| 中文字幕av一区 二区| 国产精品传媒在线| 一区二区三区美女| 性久久久久久久久久久久| 日韩在线一区二区三区| 日本不卡的三区四区五区| 国内成人精品2018免费看| 国产69精品久久777的优势| 成人精品鲁一区一区二区| 日本电影欧美片| 欧美裸体一区二区三区| 欧美白人最猛性xxxxx69交| 久久精品亚洲乱码伦伦中文| 中文天堂在线一区| 亚洲午夜电影在线观看| 男女男精品网站| 国产成人av一区二区| 色综合欧美在线视频区| 日韩视频免费观看高清完整版| 国产亚洲欧美在线| 一区二区三区美女| 久久国产精品99精品国产 | 免费成人在线网站| 国产成人免费高清| 欧美天堂一区二区三区| 日韩三级高清在线| 中文字幕精品三区| 亚洲国产va精品久久久不卡综合| 美女国产一区二区| 97久久精品人人爽人人爽蜜臀| 欧美另类久久久品| 国产精品久久久久毛片软件| 日韩高清在线电影| 一本久道中文字幕精品亚洲嫩|