]> Pileus Git - ~andy/gtk/blob - gdk/win32/surrogate-dimm.h
5d773fcefd105487cf231af68a35c9d2fbea04f1
[~andy/gtk] / gdk / win32 / surrogate-dimm.h
1 #ifndef __SURROGATE_DIMM_H__
2 #define __SURROGATE_DIMM_H__
3
4 /* The Win32api headers doesn't include <dimm.h>, thus we need
5  * this file, which covers just the stuff we need from <dimm.h>.
6  */
7
8 typedef struct IActiveIMMApp IActiveIMMApp;
9 typedef struct IActiveIMMMessagePumpOwner IActiveIMMMessagePumpOwner;
10
11 /* Dummy vtable structs that contain real names and arg lists for
12  * only those methods we need.
13  */
14 typedef struct {
15   HRESULT (__stdcall *QueryInterface) (IActiveIMMApp *This,
16                                        REFIID riid,
17                                        void *ppvObject);
18   /* Dummy method prototypes for those we don't use */
19   ULONG (__stdcall *dummy_AddRef)();
20   ULONG (__stdcall *dummy_Release)();
21   HRESULT (__stdcall *dummy_AssociateContext)();
22   HRESULT (__stdcall *dummy_ConfigureIMEA)();
23   HRESULT (__stdcall *dummy_ConfigureIMEW)();
24   HRESULT (__stdcall *dummy_CreateContext)();
25   HRESULT (__stdcall *dummy_DestroyContext)();
26   HRESULT (__stdcall *dummy_EnumRegisterWordA)();
27   HRESULT (__stdcall *dummy_EnumRegisterWordW)();
28   HRESULT (__stdcall *dummy_EscapeA)();
29   HRESULT (__stdcall *dummy_EscapeW)();
30   HRESULT (__stdcall *dummy_GetCandidateListA)();
31   HRESULT (__stdcall *dummy_GetCandidateListW)();
32   HRESULT (__stdcall *dummy_GetCandidateListCountA)();
33   HRESULT (__stdcall *dummy_GetCandidateListCountW)();
34   HRESULT (__stdcall *dummy_GetCandidateWindow)();
35   HRESULT (__stdcall *dummy_GetCompositionFontA)();
36   HRESULT (__stdcall *dummy_GetCompositionFontW)();
37   HRESULT (__stdcall *dummy_GetCompositionStringA)();
38   HRESULT (__stdcall *dummy_GetCompositionStringW)();
39   HRESULT (__stdcall *dummy_GetCompositionWindow)();
40   HRESULT (__stdcall *dummy_GetContext)();
41   HRESULT (__stdcall *dummy_GetConversionListA)();
42   HRESULT (__stdcall *dummy_GetConversionListW)();
43   HRESULT (__stdcall *dummy_GetConversionStatus)();
44
45   HRESULT (__stdcall *GetDefaultIMEWnd)(IActiveIMMApp *This,
46                                         HWND hWnd,
47                                         HWND *phDefWnd);
48
49   HRESULT (__stdcall *dummy_GetDescriptionA)();
50   HRESULT (__stdcall *dummy_GetDescriptionW)();
51   HRESULT (__stdcall *dummy_GetGuideLineA)();
52   HRESULT (__stdcall *dummy_GetGuideLineW)();
53   HRESULT (__stdcall *dummy_GetIMEFileNameA)();
54   HRESULT (__stdcall *dummy_GetIMEFileNameW)();
55   HRESULT (__stdcall *dummy_GetOpenStatus)();
56   HRESULT (__stdcall *dummy_GetProperty)();
57   HRESULT (__stdcall *dummy_GetRegisterWordStyleA)();
58   HRESULT (__stdcall *dummy_GetRegisterWordStyleW)();
59   HRESULT (__stdcall *dummy_GetStatusWindowPos)();
60   HRESULT (__stdcall *dummy_GetVirtualKey)();
61   HRESULT (__stdcall *dummy_InstallIMEA)();
62   HRESULT (__stdcall *dummy_InstallIMEW)();
63
64   HRESULT (__stdcall *IsIME)(IActiveIMMApp *This,
65                              HKL hKL);
66   HRESULT (__stdcall *IsUIMessageA )(IActiveIMMApp *This,
67                                      HWND hWndIME,
68                                      UINT msg,
69                                      WPARAM wParam,
70                                      LPARAM lParam);
71   HRESULT (__stdcall *dummy_IsUIMessageW)();
72   HRESULT (__stdcall *dummy_NotifyIME)();
73   HRESULT (__stdcall *dummy_RegisterWordA)();
74   HRESULT (__stdcall *dummy_RegisterWordW)();
75   HRESULT (__stdcall *dummy_ReleaseContext)();
76   HRESULT (__stdcall *dummy_SetCandidateWindow)();
77   HRESULT (__stdcall *dummy_SetCompositionFontA)();
78   HRESULT (__stdcall *dummy_SetCompositionFontW)();
79   HRESULT (__stdcall *dummy_SetCompositionStringA)();
80   HRESULT (__stdcall *dummy_SetCompositionStringW)();
81   HRESULT (__stdcall *dummy_SetCompositionWindow)();
82   HRESULT (__stdcall *dummy_SetConversionStatus)();
83   HRESULT (__stdcall *dummy_SetOpenStatus)();
84   HRESULT (__stdcall *dummy_SetStatusWindowPos)();
85   HRESULT (__stdcall *dummy_SimulateHotKey)();
86   HRESULT (__stdcall *dummy_UnregisterWordA)();
87   HRESULT (__stdcall *dummy_UnregisterWordW)();
88
89   HRESULT (__stdcall *Activate)(IActiveIMMApp *This,
90                                 BOOL restore);
91   HRESULT (__stdcall *Deactivate)(IActiveIMMApp *This);
92   HRESULT (__stdcall *OnDefWindowProc)(IActiveIMMApp *This,
93                                        HWND hWnd,
94                                        UINT Msg,
95                                        WPARAM wParam,
96                                        LPARAM lParam,
97                                        LRESULT *plResult);
98
99   HRESULT (__stdcall *dummy_FilterClientWindows)();
100
101   HRESULT (__stdcall *GetCodePageA)(IActiveIMMApp *This,
102                                     HKL hKL,
103                                     UINT *uCodePage);
104   HRESULT (__stdcall *GetLangId)(IActiveIMMApp *This,
105                                  HKL hKL,
106                                  LANGID *plid);
107
108   HRESULT (__stdcall *dummy_AssociateContextEx)();
109   HRESULT (__stdcall *dummy_DisableIME)();
110   HRESULT (__stdcall *dummy_GetImeMenuItemsA)();
111   HRESULT (__stdcall *dummy_GetImeMenuItemsW)();
112   HRESULT (__stdcall *dummy_EnumInputContext)();
113 } IActiveIMMAppVtbl;
114
115 struct IActiveIMMApp {
116   IActiveIMMAppVtbl *lpVtbl;
117 };
118
119 typedef struct {
120   HRESULT (__stdcall *dummy_QueryInterface)();
121   ULONG (__stdcall *dummy_AddRef)();
122   ULONG (__stdcall *dummy_Release)();
123
124   HRESULT (__stdcall *Start)(IActiveIMMMessagePumpOwner *This);
125   HRESULT (__stdcall *End)(IActiveIMMMessagePumpOwner *This);
126   HRESULT (__stdcall *OnTranslateMessage)(IActiveIMMMessagePumpOwner *This,
127                                           MSG *pMSG);
128
129   HRESULT (__stdcall *dummy_Pause)();
130   HRESULT (__stdcall *dummy_Resume)();
131 } IActiveIMMMessagePumpOwnerVtbl;
132
133 struct IActiveIMMMessagePumpOwner {
134   IActiveIMMMessagePumpOwnerVtbl *lpVtbl;
135 };
136
137 static UUID CLSID_CActiveIMM = {
138   0x4955DD33, 0xB159, 0x11d0, { 0x8F,0xCF,0x00,0xAA,0x00,0x6B,0xCC,0x59 } };
139 static IID IID_IActiveIMMApp = {
140   0x08C0E040, 0x62D1, 0x11D1, { 0x93,0x26,0x00,0x60,0xB0,0x67,0xB8,0x6E } };
141 static IID IID_IActiveIMMMessagePumpOwner = {
142   0xB5CF2CFA, 0x8AEB, 0x11D1, { 0x93,0x64,0x00,0x60,0xB0,0x67,0xB8,0x6E } };
143
144 #endif /* __SURROGATE_DIMM_H__ */