src/video/win32/SDL_win32video.h
changeset 4763 518d1679d2d0
parent 4694 c24ba2cc9583
parent 4759 863ba7d1f029
child 4868 d6adaafcfb10
     1.1 --- a/src/video/win32/SDL_win32video.h	Sun Aug 22 12:35:34 2010 -0700
     1.2 +++ b/src/video/win32/SDL_win32video.h	Sun Aug 22 12:39:27 2010 -0700
     1.3 @@ -42,6 +42,8 @@
     1.4  
     1.5  #include <windows.h>
     1.6  
     1.7 +#include <msctf.h>
     1.8 +
     1.9  #if SDL_VIDEO_RENDER_D3D
    1.10  //#include <d3d9.h>
    1.11  #define D3D_DEBUG_INFO
    1.12 @@ -62,6 +64,7 @@
    1.13  #include "SDL_win32mouse.h"
    1.14  #include "SDL_win32opengl.h"
    1.15  #include "SDL_win32window.h"
    1.16 +#include "SDL_events.h"
    1.17  
    1.18  #ifdef UNICODE
    1.19  #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (SDL_wcslen(S)+1)*sizeof(WCHAR))
    1.20 @@ -77,6 +80,37 @@
    1.21  typedef BOOL  (*PFNSHFullScreen)(HWND, DWORD);
    1.22  typedef void  (*PFCoordTransform)(SDL_Window*, POINT*);
    1.23  
    1.24 +typedef struct  
    1.25 +{
    1.26 +    void **lpVtbl;
    1.27 +    int refcount;
    1.28 +    void *data;
    1.29 +} TSFSink;
    1.30 +
    1.31 +// Definition from Win98DDK version of IMM.H
    1.32 +typedef struct tagINPUTCONTEXT2 {
    1.33 +    HWND                hWnd;                           
    1.34 +    BOOL                fOpen;                          
    1.35 +    POINT               ptStatusWndPos;                 
    1.36 +    POINT               ptSoftKbdPos;                   
    1.37 +    DWORD               fdwConversion;                  
    1.38 +    DWORD               fdwSentence;                    
    1.39 +    union   {                                           
    1.40 +        LOGFONTA        A;                              
    1.41 +        LOGFONTW        W;                              
    1.42 +    } lfFont;                                           
    1.43 +    COMPOSITIONFORM     cfCompForm;                     
    1.44 +    CANDIDATEFORM       cfCandForm[4];                  
    1.45 +    HIMCC               hCompStr;                       
    1.46 +    HIMCC               hCandInfo;                      
    1.47 +    HIMCC               hGuideLine;                     
    1.48 +    HIMCC               hPrivate;                       
    1.49 +    DWORD               dwNumMsgBuf;                    
    1.50 +    HIMCC               hMsgBuf;                        
    1.51 +    DWORD               fdwInit;                        
    1.52 +    DWORD               dwReserve[3];                   
    1.53 +} INPUTCONTEXT2, *PINPUTCONTEXT2, NEAR *NPINPUTCONTEXT2, FAR *LPINPUTCONTEXT2;  
    1.54 +
    1.55  /* Private display data */
    1.56  
    1.57  typedef struct SDL_VideoData
    1.58 @@ -97,9 +131,39 @@
    1.59      PFCoordTransform CoordTransform;
    1.60  #endif
    1.61  
    1.62 +    const SDL_scancode *key_layout;
    1.63      DWORD clipboard_count;
    1.64  
    1.65 -    const SDL_scancode *key_layout;
    1.66 +    SDL_bool ime_com_initialized;
    1.67 +    struct ITfThreadMgr *ime_threadmgr;
    1.68 +    SDL_bool ime_initialized;
    1.69 +    SDL_bool ime_enabled;
    1.70 +    SDL_bool ime_available;
    1.71 +    HWND ime_hwnd_main;
    1.72 +    HWND ime_hwnd_current;
    1.73 +    HIMC ime_himc;
    1.74 +
    1.75 +    WCHAR ime_composition[SDL_TEXTEDITINGEVENT_TEXT_SIZE];
    1.76 +    WCHAR ime_readingstring[16];
    1.77 +    int ime_cursor;
    1.78 +
    1.79 +    HKL ime_hkl;
    1.80 +    HMODULE ime_himm32;
    1.81 +    UINT (WINAPI *GetReadingString)(HIMC himc, UINT uReadingBufLen, LPWSTR lpwReadingBuf, PINT pnErrorIndex, BOOL *pfIsVertical, PUINT puMaxReadingLen);
    1.82 +    BOOL (WINAPI *ShowReadingWindow)(HIMC himc, BOOL bShow);
    1.83 +    LPINPUTCONTEXT2 (WINAPI *ImmLockIMC)(HIMC himc);
    1.84 +    BOOL (WINAPI *ImmUnlockIMC)(HIMC himc);
    1.85 +    LPVOID (WINAPI *ImmLockIMCC)(HIMCC himcc);
    1.86 +    BOOL (WINAPI *ImmUnlockIMCC)(HIMCC himcc);
    1.87 +
    1.88 +    SDL_bool ime_uiless;
    1.89 +    struct ITfThreadMgrEx *ime_threadmgrex;
    1.90 +    DWORD ime_uielemsinkcookie;
    1.91 +    DWORD ime_alpnsinkcookie;
    1.92 +    DWORD ime_openmodesinkcookie;
    1.93 +    DWORD ime_convmodesinkcookie;
    1.94 +    TSFSink *ime_uielemsink;
    1.95 +    TSFSink *ime_ippasink;
    1.96  } SDL_VideoData;
    1.97  
    1.98  #endif /* _SDL_win32video_h */