/project/jni/sdl-1.3/src/video/windows/SDL_windowsvideo.h

https://github.com/aichunyu/FFPlayer · C Header · 182 lines · 128 code · 29 blank · 25 comment · 1 complexity · 7aa6c6c5a24a5af26f021a0826435dae MD5 · raw file

  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. #include "SDL_config.h"
  19. #ifndef _SDL_windowsvideo_h
  20. #define _SDL_windowsvideo_h
  21. #include "../SDL_sysvideo.h"
  22. #include "../../core/windows/SDL_windows.h"
  23. #if defined(_MSC_VER) && !defined(_WIN32_WCE)
  24. #include <msctf.h>
  25. #else
  26. #include "SDL_msctf.h"
  27. #endif
  28. #include <imm.h>
  29. #define MAX_CANDLIST 10
  30. #define MAX_CANDLENGTH 256
  31. #include "SDL_windowsclipboard.h"
  32. #include "SDL_windowsevents.h"
  33. #include "SDL_windowskeyboard.h"
  34. #include "SDL_windowsmodes.h"
  35. #include "SDL_windowsmouse.h"
  36. #include "SDL_windowsopengl.h"
  37. #include "SDL_windowswindow.h"
  38. #include "SDL_events.h"
  39. #include "SDL_loadso.h"
  40. #if WINVER < 0x0601
  41. /* Touch input definitions */
  42. #define TWF_FINETOUCH 1
  43. #define TWF_WANTPALM 2
  44. #define TOUCHEVENTF_MOVE 0x0001
  45. #define TOUCHEVENTF_DOWN 0x0002
  46. #define TOUCHEVENTF_UP 0x0004
  47. DECLARE_HANDLE(HTOUCHINPUT);
  48. typedef struct _TOUCHINPUT {
  49. LONG x;
  50. LONG y;
  51. HANDLE hSource;
  52. DWORD dwID;
  53. DWORD dwFlags;
  54. DWORD dwMask;
  55. DWORD dwTime;
  56. ULONG_PTR dwExtraInfo;
  57. DWORD cxContact;
  58. DWORD cyContact;
  59. } TOUCHINPUT, *PTOUCHINPUT;
  60. #endif /* WINVER < 0x0601 */
  61. typedef BOOL (*PFNSHFullScreen)(HWND, DWORD);
  62. typedef void (*PFCoordTransform)(SDL_Window*, POINT*);
  63. typedef struct
  64. {
  65. void **lpVtbl;
  66. int refcount;
  67. void *data;
  68. } TSFSink;
  69. /* Definition from Win98DDK version of IMM.H */
  70. typedef struct tagINPUTCONTEXT2 {
  71. HWND hWnd;
  72. BOOL fOpen;
  73. POINT ptStatusWndPos;
  74. POINT ptSoftKbdPos;
  75. DWORD fdwConversion;
  76. DWORD fdwSentence;
  77. union {
  78. LOGFONTA A;
  79. LOGFONTW W;
  80. } lfFont;
  81. COMPOSITIONFORM cfCompForm;
  82. CANDIDATEFORM cfCandForm[4];
  83. HIMCC hCompStr;
  84. HIMCC hCandInfo;
  85. HIMCC hGuideLine;
  86. HIMCC hPrivate;
  87. DWORD dwNumMsgBuf;
  88. HIMCC hMsgBuf;
  89. DWORD fdwInit;
  90. DWORD dwReserve[3];
  91. } INPUTCONTEXT2, *PINPUTCONTEXT2, NEAR *NPINPUTCONTEXT2, FAR *LPINPUTCONTEXT2;
  92. /* Private display data */
  93. typedef struct SDL_VideoData
  94. {
  95. int render;
  96. #ifdef _WIN32_WCE
  97. void* hAygShell;
  98. PFNSHFullScreen SHFullScreen;
  99. PFCoordTransform CoordTransform;
  100. #endif
  101. const SDL_Scancode *key_layout;
  102. DWORD clipboard_count;
  103. /* Touch input functions */
  104. void* userDLL;
  105. BOOL (WINAPI *CloseTouchInputHandle)( HTOUCHINPUT );
  106. BOOL (WINAPI *GetTouchInputInfo)( HTOUCHINPUT, UINT, PTOUCHINPUT, int );
  107. BOOL (WINAPI *RegisterTouchWindow)( HWND, ULONG );
  108. SDL_bool ime_com_initialized;
  109. struct ITfThreadMgr *ime_threadmgr;
  110. SDL_bool ime_initialized;
  111. SDL_bool ime_enabled;
  112. SDL_bool ime_available;
  113. HWND ime_hwnd_main;
  114. HWND ime_hwnd_current;
  115. HIMC ime_himc;
  116. WCHAR ime_composition[SDL_TEXTEDITINGEVENT_TEXT_SIZE];
  117. WCHAR ime_readingstring[16];
  118. int ime_cursor;
  119. SDL_bool ime_candlist;
  120. WCHAR ime_candidates[MAX_CANDLIST][MAX_CANDLENGTH];
  121. DWORD ime_candcount;
  122. DWORD ime_candref;
  123. DWORD ime_candsel;
  124. UINT ime_candpgsize;
  125. int ime_candlistindexbase;
  126. SDL_bool ime_candvertical;
  127. SDL_bool ime_dirty;
  128. SDL_Rect ime_rect;
  129. SDL_Rect ime_candlistrect;
  130. int ime_winwidth;
  131. int ime_winheight;
  132. HKL ime_hkl;
  133. void* ime_himm32;
  134. UINT (WINAPI *GetReadingString)(HIMC himc, UINT uReadingBufLen, LPWSTR lpwReadingBuf, PINT pnErrorIndex, BOOL *pfIsVertical, PUINT puMaxReadingLen);
  135. BOOL (WINAPI *ShowReadingWindow)(HIMC himc, BOOL bShow);
  136. LPINPUTCONTEXT2 (WINAPI *ImmLockIMC)(HIMC himc);
  137. BOOL (WINAPI *ImmUnlockIMC)(HIMC himc);
  138. LPVOID (WINAPI *ImmLockIMCC)(HIMCC himcc);
  139. BOOL (WINAPI *ImmUnlockIMCC)(HIMCC himcc);
  140. SDL_bool ime_uiless;
  141. struct ITfThreadMgrEx *ime_threadmgrex;
  142. DWORD ime_uielemsinkcookie;
  143. DWORD ime_alpnsinkcookie;
  144. DWORD ime_openmodesinkcookie;
  145. DWORD ime_convmodesinkcookie;
  146. TSFSink *ime_uielemsink;
  147. TSFSink *ime_ippasink;
  148. } SDL_VideoData;
  149. #endif /* _SDL_windowsvideo_h */
  150. /* vi: set ts=4 sw=4 expandtab: */