ReactOS 0.4.15-dev-8222-g9164419
CIMEUIWindowHandler Struct Reference

Static Public Member Functions

static LRESULT CALLBACK ImeUIMsImeHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 @implemented
 
static HRESULT CALLBACK ImeUIMsImeMouseHandler (HWND hWnd, WPARAM wParam, LPARAM lParam)
 @implemented
 
static LRESULT CALLBACK ImeUIMsImeModeBiasHandler (HWND hWnd, WPARAM wParam, LPARAM lParam)
 @implemented
 
static LRESULT CALLBACK ImeUIMsImeReconvertRequest (HWND hWnd, WPARAM wParam, LPARAM lParam)
 @implemented
 
static LRESULT CALLBACK ImeUIWndProcWorker (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 @implemented
 
static HRESULT CALLBACK ImeUIDelayedReconvertFuncCall (HWND hWnd)
 @implemented
 
static HRESULT CALLBACK ImeUIOnLayoutChange (LPARAM lParam)
 @implemented
 
static HRESULT CALLBACK ImeUIPrivateHandler (UINT uMsg, WPARAM wParam, LPARAM lParam)
 @implemented
 
static LRESULT CALLBACK ImeUINotifyHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 @unimplemented
 

Detailed Description

Definition at line 935 of file ui.cpp.

Member Function Documentation

◆ ImeUIDelayedReconvertFuncCall()

HRESULT CALLBACK CIMEUIWindowHandler::ImeUIDelayedReconvertFuncCall ( HWND  hWnd)
static

@implemented

Definition at line 1127 of file ui.cpp.

1128{
1130 CicIMCLock imcLock(hIMC);
1131 if (FAILED(imcLock.m_hr))
1132 return imcLock.m_hr;
1133 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
1134 if (FAILED(imeContext.m_hr))
1135 return imeContext.m_hr;
1136 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
1137 if (pCicIC)
1138 pCicIC->DelayedReconvertFuncCall(imcLock);
1139 return S_OK;
1140}
HWND hWnd
Definition: settings.c:17
HRESULT DelayedReconvertFuncCall(CicIMCLock &imcLock)
@unimplemented
DWORD HIMC
Definition: dimm.idl:75
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define UI_GWLP_HIMC
Definition: ui.cpp:872
#define GetWindowLongPtrW
Definition: winuser.h:4829

Referenced by ImeUIWndProcWorker().

◆ ImeUIMsImeHandler()

LRESULT CALLBACK CIMEUIWindowHandler::ImeUIMsImeHandler ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

@implemented

Definition at line 1102 of file ui.cpp.

1103{
1104 if (uMsg == WM_MSIME_MOUSE)
1106 if (uMsg == WM_MSIME_MODEBIAS)
1108 if (uMsg == WM_MSIME_RECONVERTREQUEST)
1110 if (uMsg == WM_MSIME_SERVICE)
1111 {
1112 TLS *pTLS = TLS::GetTLS();
1113 if (pTLS && pTLS->m_pProfile)
1114 {
1115 LANGID LangID;
1116 pTLS->m_pProfile->GetLangId(&LangID);
1118 return FALSE;
1119 }
1120 return TRUE;
1121 }
1122 return 0;
1123}
HRESULT GetLangId(_Out_ LANGID *pLangID)
@implemented
Definition: profile.cpp:114
Definition: tls.h:14
static TLS * GetTLS()
@implemented
Definition: tls.cpp:32
CicProfile * m_pProfile
Definition: tls.h:20
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
USHORT LANGID
Definition: mui.h:9
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define LANG_KOREAN
Definition: nls.h:84
static LRESULT CALLBACK ImeUIMsImeModeBiasHandler(HWND hWnd, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:1028
static LRESULT CALLBACK ImeUIMsImeReconvertRequest(HWND hWnd, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:1069
static HRESULT CALLBACK ImeUIMsImeMouseHandler(HWND hWnd, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:950
UINT WM_MSIME_RECONVERTREQUEST
Definition: ui.cpp:16
UINT WM_MSIME_MODEBIAS
Definition: ui.cpp:20
UINT WM_MSIME_SERVICE
Definition: ui.cpp:14
UINT WM_MSIME_MOUSE
Definition: ui.cpp:22
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
Definition: wdfusb.h:1083

Referenced by ImeUIWndProcWorker().

◆ ImeUIMsImeModeBiasHandler()

LRESULT CALLBACK CIMEUIWindowHandler::ImeUIMsImeModeBiasHandler ( HWND  hWnd,
WPARAM  wParam,
LPARAM  lParam 
)
static

@implemented

Definition at line 1028 of file ui.cpp.

1029{
1030 if (!wParam)
1031 return TRUE;
1032
1033 CicIMCLock imcLock((HIMC)lParam);
1034 if (FAILED(imcLock.m_hr))
1035 return imcLock.m_hr;
1036
1037 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
1038 if (FAILED(imeContext.m_hr))
1039 return FALSE;
1040
1041 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
1042 if (!pCicIC)
1043 return FALSE;
1044
1045 if (wParam == 1)
1046 {
1047 if (lParam == 0 || lParam == 1 || lParam == 4 || lParam == 0x10000)
1048 {
1050 pCicIC->m_ModeBias.SetModeBias(guid);
1051
1052 pCicIC->m_dwUnknown7[2] |= 1;
1054 pCicIC->m_pContextOwnerServices->OnAttributeChange(GUID_PROP_MODEBIAS);
1056 return TRUE;
1057 }
1058 }
1059 else if (wParam == 2)
1060 {
1061 return pCicIC->m_ModeBias.ConvertModeBias(pCicIC->m_ModeBias.m_guid);
1062 }
1063
1064 return FALSE;
1065}
void SetModeBias(REFGUID rguid)
@implemented
Definition: misc.cpp:388
GUID ConvertModeBias(LONG bias)
@implemented
Definition: misc.cpp:394
GUID m_guid
Definition: misc.h:65
ITfContextOwnerServices * m_pContextOwnerServices
Definition: inputcontext.h:84
CModeBias m_ModeBias
Definition: inputcontext.h:94
DWORD m_dwUnknown7[5]
Definition: inputcontext.h:101
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT OnAttributeChange([in] REFGUID rguidAttribute)
ULONG AddRef()
ULONG Release()
const GUID * guid

Referenced by ImeUIMsImeHandler().

◆ ImeUIMsImeMouseHandler()

HRESULT CALLBACK CIMEUIWindowHandler::ImeUIMsImeMouseHandler ( HWND  hWnd,
WPARAM  wParam,
LPARAM  lParam 
)
static

@implemented

Definition at line 950 of file ui.cpp.

951{
952 if ((BYTE)wParam == 0xFF)
953 return TRUE;
954
955 CicIMCLock imcLock((HIMC)lParam);
956 if (FAILED(imcLock.m_hr))
957 return imcLock.m_hr;
958
959 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
960 if (FAILED(imeContext.m_hr))
961 return FALSE;
962
963 HRESULT hr = E_FAIL;
964 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
965 if (pCicIC)
966 {
967 UINT keys = 0;
968 if (wParam & MK_LBUTTON)
969 keys |= 0x1;
970 if (wParam & MK_SHIFT)
971 keys |= 0x10;
972 if (wParam & MK_RBUTTON)
973 keys |= 0x2;
974 if (wParam & MK_MBUTTON)
975 keys |= 0x780000;
976 else if (wParam & MK_ALT)
977 keys |= 0xFF880000;
978 hr = pCicIC->MsImeMouseHandler(HIWORD(wParam), HIBYTE(LOWORD(wParam)), keys, imcLock);
979 }
980
981 return hr;
982}
HRESULT MsImeMouseHandler(DWORD dwUnknown58, DWORD dwUnknown59, UINT keys, CicIMCLock &imcLock)
@unimplemented
#define E_FAIL
Definition: ddrawi.h:102
#define HIBYTE(W)
Definition: jmemdos.c:486
unsigned int UINT
Definition: ndis.h:50
#define LOWORD(l)
Definition: pedump.c:82
HRESULT hr
Definition: shlfolder.c:183
#define HIWORD(l)
Definition: typedefs.h:247
#define MK_RBUTTON
Definition: winuser.h:2368
#define MK_SHIFT
Definition: winuser.h:2369
#define MK_MBUTTON
Definition: winuser.h:2371
#define MK_LBUTTON
Definition: winuser.h:2367
unsigned char BYTE
Definition: xxhash.c:193

Referenced by ImeUIMsImeHandler().

◆ ImeUIMsImeReconvertRequest()

LRESULT CALLBACK CIMEUIWindowHandler::ImeUIMsImeReconvertRequest ( HWND  hWnd,
WPARAM  wParam,
LPARAM  lParam 
)
static

@implemented

Definition at line 1069 of file ui.cpp.

1070{
1071 if (wParam == 0x10000000)
1072 return TRUE;
1073
1075 CicIMCLock imcLock(hIMC);
1076 if (FAILED(imcLock.m_hr))
1077 return FALSE;
1078
1079 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
1080 if (FAILED(imeContext.m_hr))
1081 return FALSE;
1082
1083 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
1084 TLS *pTLS = TLS::GetTLS();
1085 if (!pCicIC || !pTLS)
1086 return FALSE;
1087
1088 auto pThreadMgr = pTLS->m_pThreadMgr;
1089 auto pProfile = pTLS->m_pProfile;
1090 if (!pThreadMgr || !pProfile)
1091 return FALSE;
1092
1093 UINT uCodePage = 0;
1094 pProfile->GetCodePageA(&uCodePage);
1095 pCicIC->SetupReconvertString(imcLock, pThreadMgr, uCodePage, WM_MSIME_RECONVERT, FALSE);
1096 pCicIC->EndReconvertString(imcLock);
1097 return TRUE;
1098}
HRESULT SetupReconvertString(CicIMCLock &imcLock, ITfThreadMgr_P *pThreadMgr, UINT uCodePage, UINT uMsg, BOOL bUndo)
@unimplemented
HRESULT EndReconvertString(CicIMCLock &imcLock)
@unimplemented
ITfThreadMgr_P * m_pThreadMgr
Definition: tls.h:21
UINT WM_MSIME_RECONVERT
Definition: ui.cpp:17

Referenced by ImeUIMsImeHandler().

◆ ImeUINotifyHandler()

LRESULT CALLBACK CIMEUIWindowHandler::ImeUINotifyHandler ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

@unimplemented

Definition at line 1144 of file ui.cpp.

1145{
1147 CicIMCLock imcLock(hIMC);
1148 if (FAILED(imcLock.m_hr))
1149 return imcLock.m_hr;
1150 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
1151 if (FAILED(imeContext.m_hr))
1152 return imeContext.m_hr;
1153
1154 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
1155 if (pCicIC)
1156 {
1157 switch (wParam)
1158 {
1159 case IMN_CLOSECANDIDATE:
1160 {
1161 pCicIC->m_bCandidateOpen = FALSE;
1162 HWND hImeWnd = ::ImmGetDefaultIMEWnd(NULL);
1163 if (::IsWindow(hImeWnd))
1164 ::PostMessage(hImeWnd, WM_IME_NOTIFY, 0x10, (LPARAM)hIMC);
1165 break;
1166 }
1167 case IMN_OPENCANDIDATE:
1168 {
1169 pCicIC->m_bCandidateOpen = TRUE;
1170 pCicIC->ClearPrevCandidatePos();
1171 break;
1172 }
1174 {
1175 //FIXME
1176 break;
1177 }
1179 {
1180 //FIXME
1181 break;
1182 }
1184 {
1185 //FIXME
1186 break;
1187 }
1188 case 0xF:
1189 {
1191 break;
1192 }
1193 case 0x10:
1194 {
1196 break;
1197 }
1198 case 0x13:
1199 {
1201 break;
1202 }
1203 case 0x14:
1204 {
1205 //FIXME
1206 break;
1207 }
1208 case 0x16:
1209 {
1210 ::SetTimer(hWnd, 2, 100, NULL);
1211 break;
1212 }
1213 case 0x17:
1214 {
1215 return (LRESULT)hWnd;
1216 }
1217 case 0x10D:
1218 {
1219 //FIXME
1220 break;
1221 }
1222 case 0x10E:
1223 pCicIC->m_dwQueryPos = 0;
1224 break;
1225 }
1226 }
1227
1228 return 0;
1229}
void ClearPrevCandidatePos()
#define NULL
Definition: types.h:112
HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd)
Definition: ime.c:890
#define IMN_SETCOMPOSITIONFONT
Definition: imm.h:381
#define IMN_CLOSECANDIDATE
Definition: imm.h:375
#define IMN_OPENCANDIDATE
Definition: imm.h:376
#define IMN_SETCOMPOSITIONWINDOW
Definition: imm.h:382
#define IMN_SETCANDIDATEPOS
Definition: imm.h:380
static HRESULT CALLBACK ImeUIOnLayoutChange(LPARAM lParam)
@implemented
Definition: ui.cpp:985
static HRESULT CALLBACK ImeUIPrivateHandler(UINT uMsg, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:1009
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_IME_NOTIFY
Definition: winuser.h:1830
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define PostMessage
Definition: winuser.h:5841

◆ ImeUIOnLayoutChange()

HRESULT CALLBACK CIMEUIWindowHandler::ImeUIOnLayoutChange ( LPARAM  lParam)
static

@implemented

Definition at line 985 of file ui.cpp.

986{
987 CicIMCLock imcLock((HIMC)lParam);
988 if (FAILED(imcLock.m_hr))
989 return S_OK;
990
991 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
992 if (FAILED(imeContext.m_hr))
993 return S_OK;
994
995 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
996 if (pCicIC)
997 {
998 auto pContextOwnerServices = pCicIC->m_pContextOwnerServices;
999 pContextOwnerServices->AddRef();
1000 pContextOwnerServices->OnLayoutChange();
1001 pContextOwnerServices->Release();
1002 }
1003
1004 return S_OK;
1005}

Referenced by ImeUINotifyHandler().

◆ ImeUIPrivateHandler()

HRESULT CALLBACK CIMEUIWindowHandler::ImeUIPrivateHandler ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

@implemented

Definition at line 1009 of file ui.cpp.

1010{
1011 CicIMCLock imcLock((HIMC)lParam);
1012 if (FAILED(imcLock.m_hr))
1013 return imcLock.m_hr;
1014
1015 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
1016 if (FAILED(imeContext.m_hr))
1017 return imeContext.m_hr;
1018
1019 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
1020 if (pCicIC && wParam == 0x10)
1021 pCicIC->EscbClearDocFeedBuffer(imcLock, TRUE);
1022
1023 return S_OK;
1024}
HRESULT EscbClearDocFeedBuffer(CicIMCLock &imcLock, BOOL bFlag)
@unimplemented

Referenced by ImeUINotifyHandler().

◆ ImeUIWndProcWorker()

LRESULT CALLBACK CIMEUIWindowHandler::ImeUIWndProcWorker ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

@implemented

Definition at line 1233 of file ui.cpp.

1234{
1235 TLS *pTLS = TLS::GetTLS();
1236 if (pTLS && (pTLS->m_dwSystemInfoFlags & IME_SYSINFO_WINLOGON))
1237 {
1238 if (uMsg == WM_CREATE)
1239 return -1;
1240 return ::DefWindowProcW(hWnd, uMsg, wParam, lParam);
1241 }
1242
1243 switch (uMsg)
1244 {
1245 case WM_CREATE:
1246 {
1248 break;
1249 }
1250 case WM_DESTROY:
1251 case WM_ENDSESSION:
1252 {
1254 break;
1255 }
1256 case WM_IME_STARTCOMPOSITION:
1257 case WM_IME_COMPOSITION:
1258 case WM_IME_ENDCOMPOSITION:
1259 case WM_IME_SETCONTEXT:
1260 case WM_IME_NOTIFY:
1261 case WM_IME_SELECT:
1262 case WM_TIMER:
1263 {
1266 CicIMCLock imcLock(hIMC);
1267 switch (uMsg)
1268 {
1269 case WM_IME_STARTCOMPOSITION:
1270 {
1271 pUI->m_pComp->OnImeStartComposition(imcLock, pUI->m_hWnd);
1272 break;
1273 }
1274 case WM_IME_COMPOSITION:
1275 {
1276 if (lParam & GCS_COMPSTR)
1277 {
1278 pUI->m_pComp->OnImeCompositionUpdate(imcLock);
1279 ::SetTimer(hWnd, 0, 10, NULL);
1281 }
1282 break;
1283 }
1284 case WM_IME_ENDCOMPOSITION:
1285 {
1286 ::KillTimer(hWnd, 0);
1288 break;
1289 }
1290 case WM_IME_SETCONTEXT:
1291 {
1292 pUI->OnImeSetContext(imcLock, wParam, lParam);
1293 ::KillTimer(hWnd, 1);
1294 ::SetTimer(hWnd, 1, 300, NULL);
1295 break;
1296 }
1297 case WM_TIMER:
1298 {
1299 switch (wParam)
1300 {
1301 case 0:
1305 break;
1306 case 1:
1308 pUI->m_pComp->OnImeSetContextAfter(imcLock);
1309 break;
1310 case 2:
1313 break;
1314 default:
1315 break;
1316 }
1317 break;
1318 }
1319 case WM_IME_NOTIFY:
1320 case WM_IME_SELECT:
1321 default:
1322 {
1324 break;
1325 }
1326 }
1327 break;
1328 }
1329 default:
1330 {
1331 if (IsMsImeMessage(uMsg))
1333 return ::DefWindowProcW(hWnd, uMsg, wParam, lParam);
1334 }
1335 }
1336
1337 return 0;
1338}
DWORD m_dwSystemInfoFlags
Definition: tls.h:18
BOOL m_bInComposition
Definition: ui.h:160
void OnImeStartComposition(CicIMCLock &imcLock, HWND hUIWnd)
@unimplemented
Definition: ui.cpp:741
HRESULT OnImeSetContextAfter(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:825
HRESULT OnImeNotifySetCompositionWindow(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:788
HRESULT OnImeEndComposition()
@unimplemented
Definition: ui.cpp:754
HRESULT OnImeCompositionUpdate(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:747
void OnPaintTheme(WPARAM wParam)
@unimplemented
Definition: ui.cpp:767
#define GCS_COMPSTR
Definition: imm.h:227
#define IME_SYSINFO_WINLOGON
Definition: immdev.h:409
static LRESULT CALLBACK ImeUIMsImeHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:1102
static HRESULT CALLBACK ImeUIDelayedReconvertFuncCall(HWND hWnd)
@implemented
Definition: ui.cpp:1127
Definition: ui.h:200
void OnImeSetContext(CicIMCLock &imcLock, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:928
HWND m_hWnd
Definition: ui.h:201
static void OnCreate(HWND hWnd)
@implemented
Definition: ui.cpp:906
static void OnDestroy(HWND hWnd)
@implemented
Definition: ui.cpp:917
UIComposition * m_pComp
Definition: ui.h:202
BOOL IsMsImeMessage(_In_ UINT uMsg)
@implemented
Definition: ui.cpp:26
#define UI_GWLP_UI
Definition: ui.cpp:873
#define WM_CREATE
Definition: winuser.h:1608
#define WM_IME_SETCONTEXT
Definition: winuser.h:1829
#define WM_TIMER
Definition: winuser.h:1742
#define WM_IME_SELECT
Definition: winuser.h:1833
#define WM_DESTROY
Definition: winuser.h:1609
#define WM_ENDSESSION
Definition: winuser.h:1627
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

Referenced by UIWndProc().


The documentation for this struct was generated from the following file: