KMessage.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:2k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //---------------------------------------------------------------------------
  2. // Sword3 Engine (c) 1999-2000 by Kingsoft
  3. //
  4. // File: KMessage.h
  5. // Date: 2000.08.08
  6. // Code: WangWei(Daphnis)
  7. // Desc: Header File
  8. //---------------------------------------------------------------------------
  9. #ifndef KMessage_H
  10. #define KMessage_H
  11. //---------------------------------------------------------------------------
  12. typedef struct {
  13. int nType; // 消息类型
  14. int nParam[3]; // 消息参数
  15. } KMessage;
  16. //---------------------------------------------------------------------------
  17. ENGINE_API void g_SendMessage(int nType, int nP0=0, int nP1=0, int nP2=0);
  18. ENGINE_API BOOL g_PeekMessage(KMessage* pMsg);
  19. ENGINE_API BOOL g_GetMessage(KMessage* pMsg);
  20. ENGINE_API void g_ClearMessage();
  21. //---------------------------------------------------------------------------
  22. #define TM_NONE 0
  23. //---------------------------------------------------------------------------
  24. // Key Message
  25. #define TM_KEY_BEGIN 10
  26. #define TM_KEY_UP TM_KEY_BEGIN + 1
  27. #define TM_KEY_DOWN TM_KEY_BEGIN + 2
  28. #define TM_KEY_HOLD TM_KEY_BEGIN + 3
  29. #define TM_KEY_END TM_KEY_BEGIN + 4
  30. //---------------------------------------------------------------------------
  31. // Mouse Message
  32. #define TM_MOUSE_BEGIN 20
  33. #define TM_MOUSE_LBUP TM_MOUSE_BEGIN + 1
  34. #define TM_MOUSE_LBDOWN TM_MOUSE_BEGIN + 2
  35. #define TM_MOUSE_LBMOVE TM_MOUSE_BEGIN + 3
  36. #define TM_MOUSE_RBUP TM_MOUSE_BEGIN + 4
  37. #define TM_MOUSE_RBDOWN TM_MOUSE_BEGIN + 5
  38. #define TM_MOUSE_RBMOVE TM_MOUSE_BEGIN + 6
  39. #define TM_MOUSE_MOVE TM_MOUSE_BEGIN + 7
  40. #define TM_MOUSE_STOP TM_MOUSE_BEGIN + 8
  41. #define TM_MOUSE_END TM_MOUSE_BEGIN + 9
  42. #endif