changeset 4912:37576cdf6751

Add variables needed for win32 candidate list support.
author Daniel Wyatt <Daniel.Wyatt@gmail.com>
date Tue, 23 Nov 2010 17:44:10 -0500
parents 56206f6e4e58
children 6b89d83b0b5a
files src/video/win32/SDL_win32video.h
diffstat 1 files changed, 38 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/win32/SDL_win32video.h	Tue Nov 23 17:43:10 2010 -0500
+++ b/src/video/win32/SDL_win32video.h	Tue Nov 23 17:44:10 2010 -0500
@@ -44,6 +44,9 @@
 
 #include <imm.h>
 
+#define MAX_CANDLIST    10
+#define MAX_CANDLENGTH  256
+
 #if SDL_VIDEO_RENDER_D3D
 //#include <d3d9.h>
 #define D3D_DEBUG_INFO
@@ -89,26 +92,26 @@
 
 /* Definition from Win98DDK version of IMM.H */
 typedef struct tagINPUTCONTEXT2 {
-    HWND                hWnd;
-    BOOL                fOpen;
-    POINT               ptStatusWndPos;
-    POINT               ptSoftKbdPos;
-    DWORD               fdwConversion;
-    DWORD               fdwSentence;
-    union   {
-        LOGFONTA        A;
-        LOGFONTW        W;
+    HWND hWnd;
+    BOOL fOpen;
+    POINT ptStatusWndPos;
+    POINT ptSoftKbdPos;
+    DWORD fdwConversion;
+    DWORD fdwSentence;
+    union {
+        LOGFONTA A;
+        LOGFONTW W;
     } lfFont;
-    COMPOSITIONFORM     cfCompForm;
-    CANDIDATEFORM       cfCandForm[4];
-    HIMCC               hCompStr;
-    HIMCC               hCandInfo;
-    HIMCC               hGuideLine;
-    HIMCC               hPrivate;
-    DWORD               dwNumMsgBuf;
-    HIMCC               hMsgBuf;
-    DWORD               fdwInit;
-    DWORD               dwReserve[3];
+    COMPOSITIONFORM cfCompForm;
+    CANDIDATEFORM cfCandForm[4];
+    HIMCC hCompStr;
+    HIMCC hCandInfo;
+    HIMCC hGuideLine;
+    HIMCC hPrivate;
+    DWORD dwNumMsgBuf;
+    HIMCC hMsgBuf;
+    DWORD fdwInit;
+    DWORD dwReserve[3];
 } INPUTCONTEXT2, *PINPUTCONTEXT2, NEAR *NPINPUTCONTEXT2, FAR *LPINPUTCONTEXT2;
 
 /* Private display data */
@@ -147,6 +150,22 @@
     WCHAR ime_readingstring[16];
     int ime_cursor;
 
+    SDL_bool ime_candlist;
+    WCHAR ime_candidates[MAX_CANDLIST][MAX_CANDLENGTH];
+    DWORD ime_candcount;
+    DWORD ime_candref;
+    DWORD ime_candsel;
+    UINT ime_candpgsize;
+    int ime_candlistindexbase;
+    SDL_bool ime_candvertical;
+
+    SDL_Texture *ime_candtex;
+    SDL_bool ime_dirty;
+    SDL_Rect ime_rect;
+    SDL_Rect ime_candlistrect;
+    int ime_winwidth;
+    int ime_winheight;
+
     HKL ime_hkl;
     HMODULE ime_himm32;
     UINT (WINAPI *GetReadingString)(HIMC himc, UINT uReadingBufLen, LPWSTR lpwReadingBuf, PINT pnErrorIndex, BOOL *pfIsVertical, PUINT puMaxReadingLen);