ui_public.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. //
  19. #ifndef __UI_PUBLIC_H__
  20. #define __UI_PUBLIC_H__
  21. #define UI_API_VERSION 6
  22. typedef struct {
  23. connstate_t connState;
  24. int connectPacketCount;
  25. int clientNum;
  26. char servername[MAX_STRING_CHARS];
  27. char updateInfoString[MAX_STRING_CHARS];
  28. char messageString[MAX_STRING_CHARS];
  29. } uiClientState_t;
  30. typedef enum {
  31. UI_ERROR,
  32. UI_PRINT,
  33. UI_MILLISECONDS,
  34. UI_CVAR_SET,
  35. UI_CVAR_VARIABLEVALUE,
  36. UI_CVAR_VARIABLESTRINGBUFFER,
  37. UI_CVAR_SETVALUE,
  38. UI_CVAR_RESET,
  39. UI_CVAR_CREATE,
  40. UI_CVAR_INFOSTRINGBUFFER,
  41. UI_ARGC,
  42. UI_ARGV,
  43. UI_CMD_EXECUTETEXT,
  44. UI_FS_FOPENFILE,
  45. UI_FS_READ,
  46. UI_FS_WRITE,
  47. UI_FS_FCLOSEFILE,
  48. UI_FS_GETFILELIST,
  49. UI_R_REGISTERMODEL,
  50. UI_R_REGISTERSKIN,
  51. UI_R_REGISTERSHADERNOMIP,
  52. UI_R_CLEARSCENE,
  53. UI_R_ADDREFENTITYTOSCENE,
  54. UI_R_ADDPOLYTOSCENE,
  55. UI_R_ADDLIGHTTOSCENE,
  56. UI_R_RENDERSCENE,
  57. UI_R_SETCOLOR,
  58. UI_R_DRAWSTRETCHPIC,
  59. UI_UPDATESCREEN,
  60. UI_CM_LERPTAG,
  61. UI_CM_LOADMODEL,
  62. UI_S_REGISTERSOUND,
  63. UI_S_STARTLOCALSOUND,
  64. UI_KEY_KEYNUMTOSTRINGBUF,
  65. UI_KEY_GETBINDINGBUF,
  66. UI_KEY_SETBINDING,
  67. UI_KEY_ISDOWN,
  68. UI_KEY_GETOVERSTRIKEMODE,
  69. UI_KEY_SETOVERSTRIKEMODE,
  70. UI_KEY_CLEARSTATES,
  71. UI_KEY_GETCATCHER,
  72. UI_KEY_SETCATCHER,
  73. UI_GETCLIPBOARDDATA,
  74. UI_GETGLCONFIG,
  75. UI_GETCLIENTSTATE,
  76. UI_GETCONFIGSTRING,
  77. UI_LAN_GETPINGQUEUECOUNT,
  78. UI_LAN_CLEARPING,
  79. UI_LAN_GETPING,
  80. UI_LAN_GETPINGINFO,
  81. UI_CVAR_REGISTER,
  82. UI_CVAR_UPDATE,
  83. UI_MEMORY_REMAINING,
  84. UI_GET_CDKEY,
  85. UI_SET_CDKEY,
  86. UI_R_REGISTERFONT,
  87. UI_R_MODELBOUNDS,
  88. UI_PC_ADD_GLOBAL_DEFINE,
  89. UI_PC_LOAD_SOURCE,
  90. UI_PC_FREE_SOURCE,
  91. UI_PC_READ_TOKEN,
  92. UI_PC_SOURCE_FILE_AND_LINE,
  93. UI_S_STOPBACKGROUNDTRACK,
  94. UI_S_STARTBACKGROUNDTRACK,
  95. UI_REAL_TIME,
  96. UI_LAN_GETSERVERCOUNT,
  97. UI_LAN_GETSERVERADDRESSSTRING,
  98. UI_LAN_GETSERVERINFO,
  99. UI_LAN_MARKSERVERVISIBLE,
  100. UI_LAN_UPDATEVISIBLEPINGS,
  101. UI_LAN_RESETPINGS,
  102. UI_LAN_LOADCACHEDSERVERS,
  103. UI_LAN_SAVECACHEDSERVERS,
  104. UI_LAN_ADDSERVER,
  105. UI_LAN_REMOVESERVER,
  106. UI_CIN_PLAYCINEMATIC,
  107. UI_CIN_STOPCINEMATIC,
  108. UI_CIN_RUNCINEMATIC,
  109. UI_CIN_DRAWCINEMATIC,
  110. UI_CIN_SETEXTENTS,
  111. UI_R_REMAP_SHADER,
  112. UI_VERIFY_CDKEY,
  113. UI_LAN_SERVERSTATUS,
  114. UI_LAN_GETSERVERPING,
  115. UI_LAN_SERVERISVISIBLE,
  116. UI_LAN_COMPARESERVERS,
  117. // 1.32
  118. UI_FS_SEEK,
  119. UI_SET_PBCLSTATUS,
  120. UI_MEMSET = 100,
  121. UI_MEMCPY,
  122. UI_STRNCPY,
  123. UI_SIN,
  124. UI_COS,
  125. UI_ATAN2,
  126. UI_SQRT,
  127. UI_FLOOR,
  128. UI_CEIL
  129. } uiImport_t;
  130. typedef enum {
  131. UIMENU_NONE,
  132. UIMENU_MAIN,
  133. UIMENU_INGAME,
  134. UIMENU_NEED_CD,
  135. UIMENU_BAD_CD_KEY,
  136. UIMENU_TEAM,
  137. UIMENU_POSTGAME
  138. } uiMenuCommand_t;
  139. #define SORT_HOST 0
  140. #define SORT_MAP 1
  141. #define SORT_CLIENTS 2
  142. #define SORT_GAME 3
  143. #define SORT_PING 4
  144. #define SORT_PUNKBUSTER 5
  145. typedef enum {
  146. UI_GETAPIVERSION = 0, // system reserved
  147. UI_INIT,
  148. // void UI_Init( void );
  149. UI_SHUTDOWN,
  150. // void UI_Shutdown( void );
  151. UI_KEY_EVENT,
  152. // void UI_KeyEvent( int key );
  153. UI_MOUSE_EVENT,
  154. // void UI_MouseEvent( int dx, int dy );
  155. UI_REFRESH,
  156. // void UI_Refresh( int time );
  157. UI_IS_FULLSCREEN,
  158. // qboolean UI_IsFullscreen( void );
  159. UI_SET_ACTIVE_MENU,
  160. // void UI_SetActiveMenu( uiMenuCommand_t menu );
  161. UI_CONSOLE_COMMAND,
  162. // qboolean UI_ConsoleCommand( int realTime );
  163. UI_DRAW_CONNECT_SCREEN,
  164. // void UI_DrawConnectScreen( qboolean overlay );
  165. UI_HASUNIQUECDKEY
  166. // if !overlay, the background will be drawn, otherwise it will be
  167. // overlayed over whatever the cgame has drawn.
  168. // a GetClientState syscall will be made to get the current strings
  169. } uiExport_t;
  170. #endif