osdmessage.h

来自「MiniWinOuterSM MiniWinOuterSM」· C头文件 代码 · 共 100 行

H
100
字号
/*
	Copyright (C) 2004-2005 Li Yudong
*/
/*
** 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
*/

#ifndef _MESSAGE_H_
#define _MESSAGE_H_
#include"osdwinuser.h"
#include"prsync.h"
#ifdef __cplusplus
extern "C" {
#endif
 
#define PM_NOREMOVE         0x0000
#define PM_REMOVE           0x0001
#define PM_NOYIELD          0x0002


typedef struct _QMSG
{
    MSG    msg;
    struct _QMSG*next;
}NOTIFYMSG,*PNOTIFYMSG;

typedef struct _SYNCMSG
{
    MSG     msg;
    int     retval;
    PRSem   sem;
    struct _SYNCMSG* pNext;
}SYNCMSG,* PSYNCMSG;
typedef struct _MSGQUEUE
{
    DWORD dwState;              // message queue states
    PRMutex lock;       // lock
    PRSem wait;                 // wait semaphores

    PNOTIFYMSG  notifyHead;     // head of the notify message queue
    PNOTIFYMSG  notifyTail;      // tail of the notify message queue

//#ifndef _LITE_VERSION
    PSYNCMSG pFirstSyncMsg;     // head of the sync message queue
    PSYNCMSG pLastSyncMsg;      // tail of the sync message queue

    MSG* msg;                   // post message buffer
    int len;                    // buffer len
    int iReadPos,iWritePos;      // positions for reading and writing
}MSGQUEUE,*PMSGQUEUE;


BOOL InitMsgQueueHeap(void);

void DestroyMsgQueueHeap(void);


PMSGQUEUE CreateMsgQueue(void);

void DestroyMsgQueue(HWND hWnd);

PMSGQUEUE GetMsgQueue(HWND hWnd);
//BOOL PostMessage(HWND hWnd,UINT iMsg,WPARAM wParam,LPARAM lParam);

BOOL PostQuitMessage(HWND hWnd);

BOOL SendNotifyMessage(HWND hWnd,UINT iMsg,WPARAM wParam,LPARAM lParam);

//BOOL TranslateMessage(MSG*pMsg);

INT PostSyncMessage(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam);

//INT DispatchMessage(MSG*pMsg);

//BOOL NotifyParent(HWND hWnd,UINT iMsg);
int ThrowAwayMessages (HWND hWnd);



#ifdef __cplusplus
}
#endif 

#endif



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?