gui_int_api.h
上传用户:sunhongbo
上传日期:2022-01-25
资源大小:3010k
文件大小:4k
源码类别:

数据库系统

开发平台:

C/C++

  1. /*===============================================================================
  2.  File Name:gui_int_api.h
  3.  Author:szhy
  4.  Create Time:2007-7-27
  5.  
  6.  Description:interpreter
  7.  History:
  8. ===============================================================================*/
  9. #ifndef __GUI_INT_API_H_
  10. #define __GUI_INT_API_H_
  11. /*-------------------------------------------------------------------------------
  12. Constant Define
  13. -------------------------------------------------------------------------------*/
  14. /*
  15. stateTable flag
  16. */
  17. #define STF_NORMAL 0x00000001
  18. #define STF_PRESTATE 0x00000002
  19. #define STF_SAVEREGION 0x00000004
  20. #define STF_RESET 0x00000008
  21. #define STF_ORIGIN 0X00000010
  22. /*
  23. stateTable controlID
  24. */
  25. #define IDC_ALL 0
  26. /*
  27. focusTable keyValue
  28. */
  29. #define GUI_VK_NULL -1
  30. /*
  31. stateTable and focusTable info
  32. */
  33. #define IDI_ALL          -1
  34. /*-------------------------------------------------------------------------------
  35. Struct Define
  36. -------------------------------------------------------------------------------*/
  37. /*
  38. OSDTable
  39. */
  40. typedef struct _tagGUI_OSDTable_s
  41. {
  42. PU08 lpClassName;
  43. BU32 x;
  44. BU32 y;
  45. BU32 nWidth;
  46. BU32 nHeight;
  47. BU32 ID;
  48. BU32 parentID;
  49. BU32 selectAndFocusStyle;
  50. BU32 selectAndUnFocusStyle;
  51. BU32 unSelectStyle;
  52. BU32 styleWidth;
  53. BU32 styleHeight;
  54. BU32 var1;
  55. BU32 var2;
  56. BU32 var3;
  57. BU32 var4;
  58. } GUI_OSDTable_s;
  59. typedef GUI_OSDTable_s * GUI_OSDTable_sp;
  60. /*
  61. stateTable
  62. */
  63. typedef struct _tagGUI_StateTable_s
  64. {
  65. BU32 dialogIDSrc;
  66. BU32 controlID;
  67. BU32 info;
  68. BU32 keyValue;
  69. BU32 dialogIDDes;
  70. BU32 flag;
  71. } GUI_StateTable_s;
  72. typedef GUI_StateTable_s * GUI_StateTable_sp;
  73. /*
  74. focusTable
  75. */
  76. typedef struct _tagGUI_FocusTable_s
  77. {
  78. BU32 ScrID;
  79. BU32 info;
  80. BU32 keyValue;
  81. BU32 DesID;
  82. } GUI_FocusTable_s;
  83. typedef GUI_FocusTable_s * GUI_FocusTable_sp;
  84. /*
  85. eventTable
  86. */
  87. typedef struct _tagGUI_EventTable_s
  88. {
  89. BU32 ID;
  90. void (* lpEnter)(void);
  91. void (* lpEnd)(void);
  92. void (* lpOnPaint)(BU32 hdc,BU32 lParam);
  93. void (* lpOnKey)(BU32 keyValue);
  94. void (* lpFunc1)(void);
  95. } GUI_EventTable_s;
  96. typedef GUI_EventTable_s * GUI_EventTable_sp;
  97. /*
  98. resource
  99. */
  100. typedef struct _tagGUI_Resource_s
  101. {
  102. void * styleDataAddr;
  103. void * styleTableAddr;
  104. void * dictionaryDataAddr;
  105. void * keyTable;
  106. BU32 keyTableNum;
  107. void * osdTable;
  108. BU32 osdTableNum;
  109. void * stateTable;
  110. BU32 stateTableNum;
  111. void * focusTable;
  112. BU32 focusTableNum;
  113. void * eventTable;
  114. BU32 eventTableNum;
  115. } GUI_Resource_s;
  116. typedef GUI_Resource_s * GUI_Resource_sp;
  117. typedef struct _tagGUI_FocusWidget_s
  118. {
  119. BU32 info;
  120. BU32 keyValue;
  121. } GUI_FocusWidget_s;
  122. typedef GUI_FocusWidget_s * GUI_FocusWidget_sp;
  123. /*-------------------------------------------------------------------------------
  124. Function Declare
  125. -------------------------------------------------------------------------------*/
  126. void GUI_INT_API_RegisterResource(GUI_Resource_sp resource);
  127. BU32 GUI_INT_API_ChangeFocus(GUI_FocusWidget_sp focusWidget,PU32 focusTable,BU32 focusTableNum);
  128. BU32 GUI_INT_API_ChangeState(GUI_FocusWidget_sp focusWidget,PU32 stateTable,BU32 stateTableNum);
  129. PU08 GUI_INT_API_GetVersion(void);
  130. void GUI_INT_API_Encode(PU08 pu08Src, PU08 pu08Des1, PU08 pu08Des2);
  131. void GUI_INT_API_Decode(PU08 pu08Src1, PU08 pu08Src2, PU08 pu08Des);
  132. void GUI_INT_API_RegisterEvent(GUI_EventTable_sp pEventTable);
  133. void GUI_INT_API_State(PU32 * stateAddr , PU32 stateMax, PU32 stateNum,void * para);
  134. void GUI_INT_API_Focus(PU32 * focusAddr, PU32 focusMax, PU32 focusNum,void * para);
  135. void GUI_INT_API_InitState(PU32 * stateAddr , PU32 stateMax, PU32 stateNum);
  136. void GUI_INT_API_InitFocus(PU32 * focusAddr, PU32 focusMax, PU32 focusNum);
  137. #endif