22# define W32_ISO639_LEN 9
34 GHOST_IWindow *window,
35 const void *customdata)
36 : GHOST_Event(msec, type, window)
38 this->data_ = customdata;
84struct ImeComposition {
105 std::wstring ime_string;
106 std::vector<char> utf8_buf;
107 std::vector<unsigned char>
format;
126class GHOST_ImeWin32 {
132 bool is_composing()
const
134 return is_composing_;
138 void UpdateInputLanguage();
140 BOOL IsLanguage(
const char name[W32_ISO639_LEN]);
143 void UpdateConversionStatus(HWND window_handle);
146 bool IsEnglishMode();
149 bool IsImeKeyEvent(
char ascii,
GHOST_TKey key);
157 void CreateImeWindow(HWND window_handle);
179 void SetImeWindowStyle(
180 HWND window_handle, UINT message, WPARAM wparam, LPARAM lparam, BOOL *handled);
188 void DestroyImeWindow(HWND window_handle);
196 void UpdateImeWindow(HWND window_handle);
205 void CleanupComposition(HWND window_handle);
215 void ResetComposition(HWND window_handle);
238 bool GetResult(HWND window_handle, LPARAM lparam, ImeComposition *composition);
261 bool GetComposition(HWND window_handle, LPARAM lparam, ImeComposition *composition);
285 void BeginIME(HWND window_handle,
const GHOST_Rect &caret_rect,
bool complete);
296 void EndIME(HWND window_handle);
299 void UpdateInfo(HWND window_handle);
302 void CheckFirst(HWND window_handle);
304 ImeComposition resultInfo, compInfo;
305 GHOST_TEventImeData eventImeData;
309 bool IsTargetAttribute(
char attribute)
const
315 void GetCaret(HIMC imm_context, LPARAM lparam, ImeComposition *composition);
318 void MoveImeWindow(HWND window_handle, HIMC imm_context);
321 void CompleteComposition(HWND window_handle, HIMC imm_context);
324 bool GetString(HIMC imm_context, WPARAM lparam,
int type, ImeComposition *composition);
334 char language_[W32_ISO639_LEN];
337 DWORD conversion_modes_;
340 DWORD sentence_mode_;
351 GHOST_Rect caret_rect_;
354 bool is_first, is_enable;
unsigned long long int uint64_t
std::string format(const std::string &fmt, Args &&...args)